From b4fc81bce2f3be2b27a12da4e615ad92a42f5a9e Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Wed, 26 Jul 2023 18:47:29 +0800 Subject: [PATCH 01/47] add isAuthorshipAnalyzed flag --- src/main/java/reposense/parser/ArgsParser.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/reposense/parser/ArgsParser.java b/src/main/java/reposense/parser/ArgsParser.java index 68e27c9c57..e9b068047c 100644 --- a/src/main/java/reposense/parser/ArgsParser.java +++ b/src/main/java/reposense/parser/ArgsParser.java @@ -58,12 +58,11 @@ public class ArgsParser { public static final String[] VERSION_FLAGS = new String[] {"--version", "-V"}; public static final String[] LAST_MODIFIED_DATE_FLAGS = new String[] {"--last-modified-date", "-l"}; public static final String[] FIND_PREVIOUS_AUTHORS_FLAGS = new String[] {"--find-previous-authors", "-F"}; - public static final String[] CLONING_THREADS_FLAG = new String[] {"--cloning-threads"}; public static final String[] ANALYSIS_THREADS_FLAG = new String[] {"--analysis-threads"}; - public static final String[] TEST_MODE_FLAG = new String[] {"--test-mode"}; public static final String[] FRESH_CLONING_FLAG = new String[] {"--fresh-cloning"}; + public static final String[] ANALYZE_AUTHORSHIP_FLAGS = new String[] {"--analyze-authorship", "-A"}; private static final Logger logger = LogsManager.getLogger(ArgsParser.class); @@ -197,6 +196,11 @@ private static ArgumentParser getArgumentParser() { + "will attempt to blame the line changes caused by commits in the ignore commit list to the " + "previous authors who altered those lines (if available)"); + parser.addArgument(ANALYZE_AUTHORSHIP_FLAGS) + .dest(ANALYZE_AUTHORSHIP_FLAGS[0]) + .action(Arguments.storeTrue()) + .help("A flag to perform analysis of code authorship."); + // Mutex flags - these will always be the last parameters in help message. mutexParser.addArgument(CONFIG_FLAGS) .dest(CONFIG_FLAGS[0]) @@ -275,6 +279,7 @@ public static CliArguments parse(String[] args) throws HelpScreenException, Pars boolean shouldPerformShallowCloning = results.get(SHALLOW_CLONING_FLAGS[0]); boolean shouldFindPreviousAuthors = results.get(FIND_PREVIOUS_AUTHORS_FLAGS[0]); boolean isTestMode = results.get(TEST_MODE_FLAG[0]); + boolean isAuthorshipAnalyzed = results.get(ANALYZE_AUTHORSHIP_FLAGS[0]); int numCloningThreads = results.get(CLONING_THREADS_FLAG[0]); int numAnalysisThreads = results.get(ANALYSIS_THREADS_FLAG[0]); @@ -316,7 +321,6 @@ public static CliArguments parse(String[] args) throws HelpScreenException, Pars } cliArgumentsBuilder.isAutomaticallyLaunching(isAutomaticallyLaunching); - boolean shouldPerformFreshCloning = isTestMode ? results.get(FRESH_CLONING_FLAG[0]) : DEFAULT_SHOULD_FRESH_CLONE; From 1ea3210cb7ca016abac18bb046a7f69d8cc68c53 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Wed, 26 Jul 2023 18:48:50 +0800 Subject: [PATCH 02/47] add isAuthorshipAnalyzed to cli arguments --- .../java/reposense/model/CliArguments.java | 19 ++++++++++++++++++- .../java/reposense/parser/ArgsParser.java | 3 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/java/reposense/model/CliArguments.java b/src/main/java/reposense/model/CliArguments.java index 18ca162285..cb79e2adfd 100644 --- a/src/main/java/reposense/model/CliArguments.java +++ b/src/main/java/reposense/model/CliArguments.java @@ -35,10 +35,11 @@ public class CliArguments { private final int numAnalysisThreads; private final ZoneId zoneId; private final boolean isFindingPreviousAuthorsPerformed; + private final boolean isAuthorshipAnalyzed; + private boolean isTestMode = ArgsParser.DEFAULT_IS_TEST_MODE; private boolean isFreshClonePerformed = ArgsParser.DEFAULT_SHOULD_FRESH_CLONE; - private List locations; private boolean isViewModeOnly; @@ -79,6 +80,7 @@ private CliArguments(Builder builder) { this.groupConfigFilePath = builder.groupConfigFilePath; this.reportConfigFilePath = builder.reportConfigFilePath; this.reportConfiguration = builder.reportConfiguration; + this.isAuthorshipAnalyzed = builder.isAuthorshipAnalyzed; } public ZoneId getZoneId() { @@ -189,6 +191,10 @@ public boolean isViewModeOnly() { return isViewModeOnly; } + public boolean isAuthorshipAnalyzed() { + return isAuthorshipAnalyzed; + } + @Override public boolean equals(Object other) { // short circuit if same object @@ -260,6 +266,7 @@ public static final class Builder { private Path groupConfigFilePath; private Path reportConfigFilePath; private ReportConfiguration reportConfiguration; + private boolean isAuthorshipAnalyzed; public Builder() { } @@ -502,6 +509,16 @@ public Builder reportConfiguration(ReportConfiguration reportConfiguration) { return this; } + /** + * Adds the {@code isAuthorshipAnalyzed} to CliArguments. + * + * @param isAuthorshipAnalyzed Is authorship analyzed. + */ + public Builder isAuthorshipAnalyzed(boolean isAuthorshipAnalyzed) { + this.isAuthorshipAnalyzed = isAuthorshipAnalyzed; + return this; + } + /** * Builds CliArguments. * diff --git a/src/main/java/reposense/parser/ArgsParser.java b/src/main/java/reposense/parser/ArgsParser.java index e9b068047c..00e24cc0dc 100644 --- a/src/main/java/reposense/parser/ArgsParser.java +++ b/src/main/java/reposense/parser/ArgsParser.java @@ -298,7 +298,8 @@ public static CliArguments parse(String[] args) throws HelpScreenException, Pars .isFindingPreviousAuthorsPerformed(shouldFindPreviousAuthors) .numCloningThreads(numCloningThreads) .numAnalysisThreads(numAnalysisThreads) - .isTestMode(isTestMode); + .isTestMode(isTestMode) + .isAuthorshipAnalyzed(isAuthorshipAnalyzed); LogsManager.setLogFolderLocation(outputFolderPath); From 5e2cdeaed3d1a700cdd1e636bc2b0b3388adedb5 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Wed, 26 Jul 2023 18:53:07 +0800 Subject: [PATCH 03/47] reformat cli args --- src/main/java/reposense/model/CliArguments.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/reposense/model/CliArguments.java b/src/main/java/reposense/model/CliArguments.java index cb79e2adfd..c29cb63b8e 100644 --- a/src/main/java/reposense/model/CliArguments.java +++ b/src/main/java/reposense/model/CliArguments.java @@ -490,8 +490,8 @@ public Builder reportDirectoryPath(Path reportDirectoryPath) { */ public Builder configFolderPath(Path configFolderPath) { this.configFolderPath = configFolderPath.equals(EMPTY_PATH) - ? configFolderPath.toAbsolutePath() - : configFolderPath; + ? configFolderPath.toAbsolutePath() + : configFolderPath; this.repoConfigFilePath = configFolderPath.resolve(RepoConfigCsvParser.REPO_CONFIG_FILENAME); this.authorConfigFilePath = configFolderPath.resolve(AuthorConfigCsvParser.AUTHOR_CONFIG_FILENAME); this.groupConfigFilePath = configFolderPath.resolve(GroupConfigCsvParser.GROUP_CONFIG_FILENAME); From df5e498566b8af929df3bfad695d367693577da9 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Thu, 27 Jul 2023 11:06:28 +0800 Subject: [PATCH 04/47] added test cases for args parser --- .../java/reposense/parser/ArgsParserTest.java | 26 +++++++++++++++++++ .../java/reposense/util/InputBuilder.java | 9 +++++++ 2 files changed, 35 insertions(+) diff --git a/src/test/java/reposense/parser/ArgsParserTest.java b/src/test/java/reposense/parser/ArgsParserTest.java index 11fa3a5714..21c56069bd 100644 --- a/src/test/java/reposense/parser/ArgsParserTest.java +++ b/src/test/java/reposense/parser/ArgsParserTest.java @@ -696,6 +696,32 @@ public void parse_shallowCloning_success() throws Exception { Assertions.assertEquals(true, cliArgumentsShallow.isShallowCloningPerformed()); } + @Test + public void parse_withAnalyzeAuthorship_success() throws Exception { + String input = new InputBuilder().addRepos(TEST_REPO_REPOSENSE, TEST_REPO_DELTA) + .addAnalyzeAuthorship() + .build(); + CliArguments cliArguments = ArgsParser.parse(translateCommandline(input)); + + String inputWithAlias = new InputBuilder().addRepos(TEST_REPO_REPOSENSE, TEST_REPO_DELTA) + .add("-A") + .build(); + CliArguments cliArgumentsWithAlias = ArgsParser.parse(translateCommandline(inputWithAlias)); + + Assertions.assertTrue(cliArguments.isAuthorshipAnalyzed()); + Assertions.assertTrue(cliArgumentsWithAlias.isAuthorshipAnalyzed()); + + Assertions.assertEquals(cliArguments, cliArgumentsWithAlias); + } + + @Test + public void parse_withoutAnalyzeAuthorship_success() throws Exception { + String input = new InputBuilder().addRepos(TEST_REPO_REPOSENSE, TEST_REPO_BETA).build(); + CliArguments cliArguments = ArgsParser.parse(translateCommandline(input)); + + Assertions.assertFalse(cliArguments.isAuthorshipAnalyzed()); + } + /** * Ensures that {@code actualSinceDate} is exactly one month before {@code untilDate}. * diff --git a/src/test/java/reposense/util/InputBuilder.java b/src/test/java/reposense/util/InputBuilder.java index f3f2ddef21..44caa9e4c3 100644 --- a/src/test/java/reposense/util/InputBuilder.java +++ b/src/test/java/reposense/util/InputBuilder.java @@ -250,6 +250,15 @@ public InputBuilder addFreshCloning() { return this; } + /** + * Adds the flag to enable authorship analysis. + * This method should only be called once in one build. + */ + public InputBuilder addAnalyzeAuthorship() { + input.append(ArgsParser.ANALYZE_AUTHORSHIP_FLAGS[0] + WHITESPACE); + return this; + } + /** * Adds {@code content} to the input. */ From 9b77bda9c7dee1230d706d0b878ada52e7d76c06 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Thu, 27 Jul 2023 11:12:38 +0800 Subject: [PATCH 05/47] reformat ArgsParserTest and InputBuilder --- src/test/java/reposense/parser/ArgsParserTest.java | 4 ++-- src/test/java/reposense/util/InputBuilder.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/reposense/parser/ArgsParserTest.java b/src/test/java/reposense/parser/ArgsParserTest.java index 21c56069bd..5a6d056a27 100644 --- a/src/test/java/reposense/parser/ArgsParserTest.java +++ b/src/test/java/reposense/parser/ArgsParserTest.java @@ -526,7 +526,7 @@ public void parse_configOrLocationsSimilar_success() throws Exception { @Test public void emptyArgs_defaultConfigFolderPath() throws Exception { - CliArguments cliArguments = ArgsParser.parse(new String[]{}); + CliArguments cliArguments = ArgsParser.parse(new String[] {}); Assertions.assertEquals(CONFIG_DIRECTORY.toString(), cliArguments.getConfigFolderPath().toString()); } @@ -671,7 +671,7 @@ public void parse_withTimezone_success() throws Exception { @Test public void parse_incorrectTimezone_throwsParseException() { String input = DEFAULT_INPUT_BUILDER.addTimezone("UTC+").build(); - Assertions.assertThrows(ParseException.class, () -> ArgsParser.parse(translateCommandline(input)));; + Assertions.assertThrows(ParseException.class, () -> ArgsParser.parse(translateCommandline(input))); } @Test diff --git a/src/test/java/reposense/util/InputBuilder.java b/src/test/java/reposense/util/InputBuilder.java index 44caa9e4c3..8d8f2dd7fa 100644 --- a/src/test/java/reposense/util/InputBuilder.java +++ b/src/test/java/reposense/util/InputBuilder.java @@ -8,7 +8,7 @@ /** * A utility class to help with building command line input. * Example usage:
- * {@code String input = new InputBuilder().addSinceDate("27/01/2017").build();} + * {@code String input = new InputBuilder().addSinceDate("27/01/2017").build();} */ public class InputBuilder { private static final String WHITESPACE = " "; From 689cdb3afda05a75a34815a4a30c1b4d0749c719 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Thu, 27 Jul 2023 15:08:08 +0800 Subject: [PATCH 06/47] update equals method in cli args --- src/main/java/reposense/model/CliArguments.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/reposense/model/CliArguments.java b/src/main/java/reposense/model/CliArguments.java index c29cb63b8e..89bc2200ec 100644 --- a/src/main/java/reposense/model/CliArguments.java +++ b/src/main/java/reposense/model/CliArguments.java @@ -232,7 +232,8 @@ public boolean equals(Object other) { && Objects.equals(this.repoConfigFilePath, otherCliArguments.repoConfigFilePath) && Objects.equals(this.authorConfigFilePath, otherCliArguments.authorConfigFilePath) && Objects.equals(this.groupConfigFilePath, otherCliArguments.groupConfigFilePath) - && Objects.equals(this.reportConfigFilePath, otherCliArguments.reportConfigFilePath); + && Objects.equals(this.reportConfigFilePath, otherCliArguments.reportConfigFilePath) + && this.isAuthorshipAnalyzed == otherCliArguments.isAuthorshipAnalyzed; } /** From cb0cf909cf3447619ebd9265839b24b19c998ab5 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Sun, 30 Jul 2023 16:37:46 +0800 Subject: [PATCH 07/47] pass shouldAnalyzeAuthorship flag from reposense to report generator to authorship reporter --- src/main/java/reposense/RepoSense.java | 3 ++- .../authorship/AuthorshipReporter.java | 2 +- .../reposense/report/ReportGenerator.java | 24 +++++++++++-------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/main/java/reposense/RepoSense.java b/src/main/java/reposense/RepoSense.java index 63cfdd92ff..df65df6fdd 100644 --- a/src/main/java/reposense/RepoSense.java +++ b/src/main/java/reposense/RepoSense.java @@ -88,7 +88,8 @@ public static void main(String[] args) { cliArguments.getSinceDate(), cliArguments.getUntilDate(), cliArguments.isSinceDateProvided(), cliArguments.isUntilDateProvided(), cliArguments.getNumCloningThreads(), cliArguments.getNumAnalysisThreads(), - TimeUtil::getElapsedTime, cliArguments.getZoneId(), cliArguments.isFreshClonePerformed()); + TimeUtil::getElapsedTime, cliArguments.getZoneId(), cliArguments.isFreshClonePerformed(), + cliArguments.isAuthorshipAnalyzed()); FileUtil.zipFoldersAndFiles(reportFoldersAndFiles, cliArguments.getOutputFilePath().toAbsolutePath(), ".json"); diff --git a/src/main/java/reposense/authorship/AuthorshipReporter.java b/src/main/java/reposense/authorship/AuthorshipReporter.java index 24f55ce8f4..7f5b6ab4fc 100644 --- a/src/main/java/reposense/authorship/AuthorshipReporter.java +++ b/src/main/java/reposense/authorship/AuthorshipReporter.java @@ -33,7 +33,7 @@ public class AuthorshipReporter { /** * Generates and returns the authorship summary for each repo in {@code config}. */ - public AuthorshipSummary generateAuthorshipSummary(RepoConfiguration config) { + public AuthorshipSummary generateAuthorshipSummary(RepoConfiguration config, boolean shouldAnalyzeAuthorship) { List textFileInfos = fileInfoExtractor.extractTextFileInfos(config); int numFiles = textFileInfos.size(); diff --git a/src/main/java/reposense/report/ReportGenerator.java b/src/main/java/reposense/report/ReportGenerator.java index d0229ced40..341eb9d93b 100644 --- a/src/main/java/reposense/report/ReportGenerator.java +++ b/src/main/java/reposense/report/ReportGenerator.java @@ -117,7 +117,7 @@ public List generateReposReport(List configs, String ou ReportConfiguration reportConfig, String generationDate, LocalDateTime cliSinceDate, LocalDateTime untilDate, boolean isSinceDateProvided, boolean isUntilDateProvided, int numCloningThreads, int numAnalysisThreads, Supplier reportGenerationTimeProvider, ZoneId zoneId, - boolean shouldFreshClone) throws IOException { + boolean shouldFreshClone, boolean shouldAnalyzeAuthorship) throws IOException { prepareTemplateFile(outputPath); if (Files.exists(Paths.get(assetsPath))) { FileUtil.copyDirectoryContents(assetsPath, outputPath, assetsFilesWhiteList); @@ -127,7 +127,7 @@ public List generateReposReport(List configs, String ou progressTracker = new ProgressTracker(configs.size()); List reportFoldersAndFiles = cloneAndAnalyzeRepos(configs, outputPath, - numCloningThreads, numAnalysisThreads, shouldFreshClone); + numCloningThreads, numAnalysisThreads, shouldFreshClone, shouldAnalyzeAuthorship); LocalDateTime reportSinceDate = (TimeUtil.isEqualToArbitraryFirstDateConverted(cliSinceDate, zoneId)) ? earliestSinceDate : cliSinceDate; @@ -188,8 +188,8 @@ private Map> groupConfigsByRepoLocation( * * @return A list of paths to the JSON report files generated for each repository. */ - private List cloneAndAnalyzeRepos(List configs, String outputPath, - int numCloningThreads, int numAnalysisThreads, boolean shouldFreshClone) { + private List cloneAndAnalyzeRepos(List configs, String outputPath, int numCloningThreads, + int numAnalysisThreads, boolean shouldFreshClone, boolean shouldAnalyzeAuthorship) { Map> repoLocationMap = groupConfigsByRepoLocation(configs); List repoLocationList = new ArrayList<>(repoLocationMap.keySet()); @@ -212,7 +212,9 @@ private List cloneAndAnalyzeRepos(List configs, String // Note that the `analyzeExecutor` is passed as a parameter to ensure that the number of threads used // for analysis is no more than `numAnalysisThreads`. CompletableFuture analyzeFuture = cloneFuture.thenApplyAsync( - cloneJobOutput -> analyzeRepos(outputPath, configsToAnalyze, cloneJobOutput), analyzeExecutor); + cloneJobOutput -> analyzeRepos(outputPath, configsToAnalyze, cloneJobOutput, + shouldAnalyzeAuthorship), + analyzeExecutor); analyzeJobFutures.add(analyzeFuture); } @@ -277,7 +279,7 @@ private CloneJobOutput cloneRepo(RepoConfiguration config, RepoLocation location * successful, the list of {@code generatedFiles} by the analysis and a list of {@code analysisErrors} encountered. */ private AnalyzeJobOutput analyzeRepos(String outputPath, List configsToAnalyze, - CloneJobOutput cloneJobOutput) { + CloneJobOutput cloneJobOutput, boolean shouldAnalyzeAuthorship) { RepoLocation location = cloneJobOutput.getLocation(); boolean cloneSuccessful = cloneJobOutput.isCloneSuccessful(); @@ -303,7 +305,8 @@ private AnalyzeJobOutput analyzeRepos(String outputPath, List GitClone.cloneFromBareAndUpdateBranch(Paths.get("."), configToAnalyze); FileUtil.createDirectory(repoReportDirectory); - generatedFiles.addAll(analyzeRepo(configToAnalyze, repoReportDirectory.toString())); + generatedFiles.addAll(analyzeRepo(configToAnalyze, repoReportDirectory.toString(), + shouldAnalyzeAuthorship)); } catch (IOException ioe) { String logMessage = String.format(MESSAGE_ERROR_CREATING_DIRECTORY, configToAnalyze.getLocation(), configToAnalyze.getBranch()); @@ -339,8 +342,8 @@ private AnalyzeJobOutput analyzeRepos(String outputPath, List * @return A list of paths to the JSON report files generated for the repo specified by {@code config}. * @throws NoAuthorsWithCommitsFoundException if there are no authors with commits found for the repo. */ - private List analyzeRepo(RepoConfiguration config, String repoReportDirectory) - throws NoAuthorsWithCommitsFoundException { + private List analyzeRepo(RepoConfiguration config, String repoReportDirectory, + boolean shouldAnalyzeAuthorship) throws NoAuthorsWithCommitsFoundException { // preprocess the config and repo updateRepoConfig(config); updateAuthorList(config); @@ -351,7 +354,8 @@ private List analyzeRepo(RepoConfiguration config, String repoReportDirect } AuthorshipReporter authorshipReporter = new AuthorshipReporter(); - AuthorshipSummary authorshipSummary = authorshipReporter.generateAuthorshipSummary(config); + AuthorshipSummary authorshipSummary = authorshipReporter.generateAuthorshipSummary(config, + shouldAnalyzeAuthorship); CommitsReporter commitsReporter = new CommitsReporter(); CommitContributionSummary commitSummary = commitsReporter.generateCommitSummary(config); From 81b76216353d18289770a2e01dd0eda7b01a17ca Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Sun, 30 Jul 2023 16:39:59 +0800 Subject: [PATCH 08/47] update javadocs for report generator and authorship reporter --- src/main/java/reposense/authorship/AuthorshipReporter.java | 1 + src/main/java/reposense/report/ReportGenerator.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/reposense/authorship/AuthorshipReporter.java b/src/main/java/reposense/authorship/AuthorshipReporter.java index 7f5b6ab4fc..36abf75e4e 100644 --- a/src/main/java/reposense/authorship/AuthorshipReporter.java +++ b/src/main/java/reposense/authorship/AuthorshipReporter.java @@ -32,6 +32,7 @@ public class AuthorshipReporter { /** * Generates and returns the authorship summary for each repo in {@code config}. + * Further analyzes the authorship of each line in the commit if {@code shouldAnalyzeAuthorship} is true. */ public AuthorshipSummary generateAuthorshipSummary(RepoConfiguration config, boolean shouldAnalyzeAuthorship) { List textFileInfos = fileInfoExtractor.extractTextFileInfos(config); diff --git a/src/main/java/reposense/report/ReportGenerator.java b/src/main/java/reposense/report/ReportGenerator.java index 341eb9d93b..4fb4af6671 100644 --- a/src/main/java/reposense/report/ReportGenerator.java +++ b/src/main/java/reposense/report/ReportGenerator.java @@ -110,8 +110,9 @@ public class ReportGenerator { * @param reportGenerationTimeProvider Supplier for time taken to generate the report. * @param zoneId The timezone to adjust all date-times to. * @param shouldFreshClone The boolean variable for whether to clone a repo again during tests. + * @param shouldAnalyzeAuthorship The boolean variable for whether to further analyze authorship. * @return the list of file paths that were generated. - * @throws IOException if templateZip.zip does not exists in jar file. + * @throws IOException if templateZip.zip does not exist in jar file. */ public List generateReposReport(List configs, String outputPath, String assetsPath, ReportConfiguration reportConfig, String generationDate, LocalDateTime cliSinceDate, @@ -185,6 +186,7 @@ private Map> groupConfigsByRepoLocation( * To turn off multi-threading, run the program with the flags * {@code --cloning-threads 1 --analysis-threads 1}. * For test environments, cloning is skipped if it has been done before and {@code shouldFreshClone} is false. + * Further analyzes the authorship of each line in the commit if {@code shouldAnalyzeAuthorship} is true. * * @return A list of paths to the JSON report files generated for each repository. */ @@ -274,6 +276,7 @@ private CloneJobOutput cloneRepo(RepoConfiguration config, RepoLocation location /** * Analyzes all repos in {@code configsToAnalyze} and generates their report at {@code outputPath}. * Uses {@code cloneJobOutput} to find repo location, default branch and whether cloning was successful. + * Further analyzes the authorship of each line in the commit if {@code shouldAnalyzeAuthorship} is true. * * @return An {@link AnalyzeJobOutput} object comprising the {@code location} of the repo, whether the cloning was * successful, the list of {@code generatedFiles} by the analysis and a list of {@code analysisErrors} encountered. @@ -338,6 +341,7 @@ private AnalyzeJobOutput analyzeRepos(String outputPath, List /** * Analyzes repo specified by {@code config} and generates the report at {@code repoReportDirectory}. + * Further analyzes the authorship of each line in the commit if {@code shouldAnalyzeAuthorship} is true. * * @return A list of paths to the JSON report files generated for the repo specified by {@code config}. * @throws NoAuthorsWithCommitsFoundException if there are no authors with commits found for the repo. From bce2fb22b879b743f28231c7136efedb15aa2669 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Sun, 30 Jul 2023 16:41:00 +0800 Subject: [PATCH 09/47] reformat report generator and authorship reporter --- .../reposense/authorship/AuthorshipReporter.java | 4 +--- .../java/reposense/report/ReportGenerator.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/reposense/authorship/AuthorshipReporter.java b/src/main/java/reposense/authorship/AuthorshipReporter.java index 36abf75e4e..d41f744503 100644 --- a/src/main/java/reposense/authorship/AuthorshipReporter.java +++ b/src/main/java/reposense/authorship/AuthorshipReporter.java @@ -11,7 +11,6 @@ import reposense.model.RepoConfiguration; import reposense.system.LogsManager; - /** * Generates the authorship summary data for each repository. */ @@ -29,7 +28,6 @@ public class AuthorshipReporter { private final FileInfoAnalyzer fileInfoAnalyzer = new FileInfoAnalyzer(); private final FileResultAggregator fileResultAggregator = new FileResultAggregator(); - /** * Generates and returns the authorship summary for each repo in {@code config}. * Further analyzes the authorship of each line in the commit if {@code shouldAnalyzeAuthorship} is true. @@ -39,7 +37,7 @@ public AuthorshipSummary generateAuthorshipSummary(RepoConfiguration config, boo int numFiles = textFileInfos.size(); int totalNumLines = textFileInfos.stream() - .mapToInt(fileInfo -> fileInfo.getNumOfLines()) + .mapToInt(FileInfo::getNumOfLines) .sum(); if (totalNumLines > HIGH_NUMBER_LINES_THRESHOLD) { diff --git a/src/main/java/reposense/report/ReportGenerator.java b/src/main/java/reposense/report/ReportGenerator.java index 4fb4af6671..23b4cbe7a2 100644 --- a/src/main/java/reposense/report/ReportGenerator.java +++ b/src/main/java/reposense/report/ReportGenerator.java @@ -238,7 +238,7 @@ private List cloneAndAnalyzeRepos(List configs, String List cloneFailLocations = jobOutputs .stream() .filter(jobOutput -> !jobOutput.isCloneSuccessful()) - .map(jobOutput -> jobOutput.getLocation()) + .map(AnalyzeJobOutput::getLocation) .collect(Collectors.toList()); cloneFailLocations.forEach(location -> handleCloningFailed(configs, location)); @@ -285,24 +285,23 @@ private AnalyzeJobOutput analyzeRepos(String outputPath, List CloneJobOutput cloneJobOutput, boolean shouldAnalyzeAuthorship) { RepoLocation location = cloneJobOutput.getLocation(); boolean cloneSuccessful = cloneJobOutput.isCloneSuccessful(); - List generatedFiles = new ArrayList<>(); List analysisErrors = new ArrayList<>(); RepoCloner repoCloner = new RepoCloner(); + if (!cloneSuccessful) { repoCloner.cleanupRepo(configsToAnalyze.get(0)); return new AnalyzeJobOutput(location, cloneSuccessful, generatedFiles, analysisErrors); } - Iterator itr = configsToAnalyze.iterator(); - while (itr.hasNext()) { + + for (RepoConfiguration configToAnalyze : configsToAnalyze) { progressTracker.incrementProgress(); - RepoConfiguration configToAnalyze = itr.next(); configToAnalyze.updateBranch(cloneJobOutput.getDefaultBranch()); Path repoReportDirectory = Paths.get(outputPath, configToAnalyze.getOutputFolderName()); - logger.info( - String.format(progressTracker.getProgress() + " " - + MESSAGE_START_ANALYSIS, configToAnalyze.getLocation(), configToAnalyze.getBranch())); + logger.info(String.format(progressTracker.getProgress() + " " + MESSAGE_START_ANALYSIS, + configToAnalyze.getLocation(), configToAnalyze.getBranch())); + try { GitRevParse.assertBranchExists(configToAnalyze, FileUtil.getBareRepoPath(configToAnalyze)); GitClone.cloneFromBareAndUpdateBranch(Paths.get("."), configToAnalyze); @@ -335,6 +334,7 @@ private AnalyzeJobOutput analyzeRepos(String outputPath, List String.format(LOG_UNEXPECTED_ERROR, configToAnalyze.getLocation(), sw.toString()))); } } + repoCloner.cleanupRepo(configsToAnalyze.get(0)); return new AnalyzeJobOutput(location, cloneSuccessful, generatedFiles, analysisErrors); } From eb488bc38e1f799a7d81af3ffdfdc2dad232c811 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Tue, 1 Aug 2023 12:24:01 +0800 Subject: [PATCH 10/47] pass shouldAnalyzeAuthorship flag from authorship reporter to file info analyzer --- .../reposense/authorship/AuthorshipReporter.java | 2 +- .../java/reposense/authorship/FileInfoAnalyzer.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/reposense/authorship/AuthorshipReporter.java b/src/main/java/reposense/authorship/AuthorshipReporter.java index d41f744503..343aeb9af5 100644 --- a/src/main/java/reposense/authorship/AuthorshipReporter.java +++ b/src/main/java/reposense/authorship/AuthorshipReporter.java @@ -45,7 +45,7 @@ public AuthorshipSummary generateAuthorshipSummary(RepoConfiguration config, boo } List fileResults = textFileInfos.stream() - .map(fileInfo -> fileInfoAnalyzer.analyzeTextFile(config, fileInfo)) + .map(fileInfo -> fileInfoAnalyzer.analyzeTextFile(config, fileInfo, shouldAnalyzeAuthorship)) .filter(Objects::nonNull) .collect(Collectors.toList()); diff --git a/src/main/java/reposense/authorship/FileInfoAnalyzer.java b/src/main/java/reposense/authorship/FileInfoAnalyzer.java index 4114b23f3b..479b52eeed 100644 --- a/src/main/java/reposense/authorship/FileInfoAnalyzer.java +++ b/src/main/java/reposense/authorship/FileInfoAnalyzer.java @@ -47,7 +47,7 @@ public class FileInfoAnalyzer { * Returns null if the file is missing from the local system, or none of the * {@link Author} specified in {@code config} contributed to the file in {@code fileInfo}. */ - public FileResult analyzeTextFile(RepoConfiguration config, FileInfo fileInfo) { + public FileResult analyzeTextFile(RepoConfiguration config, FileInfo fileInfo, boolean shouldAnalyzeAuthorship) { String relativePath = fileInfo.getPath(); if (Files.notExists(Paths.get(config.getRepoRoot(), relativePath))) { @@ -59,7 +59,7 @@ public FileResult analyzeTextFile(RepoConfiguration config, FileInfo fileInfo) { return null; } - aggregateBlameAuthorModifiedAndDateInfo(config, fileInfo); + aggregateBlameAuthorModifiedAndDateInfo(config, fileInfo, shouldAnalyzeAuthorship); fileInfo.setFileType(config.getFileType(fileInfo.getPath())); AnnotatorAnalyzer.aggregateAnnotationAuthorInfo(fileInfo, config.getAuthorConfig()); @@ -100,9 +100,8 @@ private FileResult generateTextFileResult(FileInfo fileInfo) { authorContributionMap.put(author, authorContributionMap.getOrDefault(author, 0) + 1); } - return FileResult.createTextFileResult( - fileInfo.getPath(), fileInfo.getFileType(), fileInfo.getLines(), authorContributionMap, - fileInfo.exceedsFileLimit()); + return FileResult.createTextFileResult(fileInfo.getPath(), fileInfo.getFileType(), fileInfo.getLines(), + authorContributionMap, fileInfo.exceedsFileLimit()); } /** @@ -140,7 +139,8 @@ private FileResult generateBinaryFileResult(RepoConfiguration config, FileInfo f * in determining which author to assign to each line and whether to set the last modified date for a * {@code lineInfo}. */ - private void aggregateBlameAuthorModifiedAndDateInfo(RepoConfiguration config, FileInfo fileInfo) { + private void aggregateBlameAuthorModifiedAndDateInfo(RepoConfiguration config, FileInfo fileInfo, + boolean shouldAnalyzeAuthorship) { String blameResults; if (!config.isFindingPreviousAuthorsPerformed()) { From e724d47e0d26c2084183c5c7561c69586ebae8e0 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Tue, 1 Aug 2023 12:25:39 +0800 Subject: [PATCH 11/47] update javadocs for file info analyzer --- src/main/java/reposense/authorship/FileInfoAnalyzer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/reposense/authorship/FileInfoAnalyzer.java b/src/main/java/reposense/authorship/FileInfoAnalyzer.java index 479b52eeed..61d8b5c075 100644 --- a/src/main/java/reposense/authorship/FileInfoAnalyzer.java +++ b/src/main/java/reposense/authorship/FileInfoAnalyzer.java @@ -44,6 +44,7 @@ public class FileInfoAnalyzer { /** * Analyzes the lines of the file, given in the {@code fileInfo}, that has changed in the time period provided * by {@code config}. + * Further analyzes the authorship of each line in the commit if {@code shouldAnalyzeAuthorship} is true. * Returns null if the file is missing from the local system, or none of the * {@link Author} specified in {@code config} contributed to the file in {@code fileInfo}. */ @@ -138,6 +139,7 @@ private FileResult generateBinaryFileResult(RepoConfiguration config, FileInfo f * The {@code config} is used to obtain the root directory for running git blame as well as other parameters used * in determining which author to assign to each line and whether to set the last modified date for a * {@code lineInfo}. + * Further analyzes the authorship of each line in the commit if {@code shouldAnalyzeAuthorship} is true. */ private void aggregateBlameAuthorModifiedAndDateInfo(RepoConfiguration config, FileInfo fileInfo, boolean shouldAnalyzeAuthorship) { From 33e393d8ecc785ab77a086bd2b6f2cdba2b6051c Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Tue, 1 Aug 2023 12:29:42 +0800 Subject: [PATCH 12/47] add overloading method to fix failing testcases --- .../java/reposense/authorship/FileInfoAnalyzer.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/reposense/authorship/FileInfoAnalyzer.java b/src/main/java/reposense/authorship/FileInfoAnalyzer.java index 61d8b5c075..e716532234 100644 --- a/src/main/java/reposense/authorship/FileInfoAnalyzer.java +++ b/src/main/java/reposense/authorship/FileInfoAnalyzer.java @@ -72,6 +72,19 @@ public FileResult analyzeTextFile(RepoConfiguration config, FileInfo fileInfo, b return generateTextFileResult(fileInfo); } + /** + * Overloading method for test cases. + *
+ * Analyzes the lines of the file, given in the {@code fileInfo}, that has changed in the time period provided + * by {@code config}, without further analyzing the authorship of each line in the commit. + * Does not further analyze the authorship of each line in the commit. + * Returns null if the file is missing from the local system, or none of the + * {@link Author} specified in {@code config} contributed to the file in {@code fileInfo}. + */ + public FileResult analyzeTextFile(RepoConfiguration config, FileInfo fileInfo) { + return analyzeTextFile(config, fileInfo, false); + } + /** * Analyzes the binary file, given in the {@code fileInfo}, that has changed in the time period provided * by {@code config}. From 72921d78286a1b0124c8ccc58b70e13f0533d685 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Sun, 6 Aug 2023 21:02:00 +0800 Subject: [PATCH 13/47] implement authorship analyzer --- .../authorship/FileInfoAnalyzer.java | 7 + .../analyzer/AuthorshipAnalyzer.java | 248 ++++++++++++++++++ .../authorship/model/CandidateLine.java | 41 +++ .../reposense/authorship/model/FileInfo.java | 7 + .../authorship/model/GitBlameLineInfo.java | 30 +++ .../reposense/authorship/model/LineInfo.java | 13 +- src/main/java/reposense/git/GitBlame.java | 14 + src/main/java/reposense/git/GitDiff.java | 8 + src/main/java/reposense/git/GitLog.java | 12 + 9 files changed, 379 insertions(+), 1 deletion(-) create mode 100644 src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java create mode 100644 src/main/java/reposense/authorship/model/CandidateLine.java create mode 100644 src/main/java/reposense/authorship/model/GitBlameLineInfo.java diff --git a/src/main/java/reposense/authorship/FileInfoAnalyzer.java b/src/main/java/reposense/authorship/FileInfoAnalyzer.java index e716532234..a2782cb36a 100644 --- a/src/main/java/reposense/authorship/FileInfoAnalyzer.java +++ b/src/main/java/reposense/authorship/FileInfoAnalyzer.java @@ -194,6 +194,13 @@ private void aggregateBlameAuthorModifiedAndDateInfo(RepoConfiguration config, F fileInfo.setLineLastModifiedDate(lineCount / 5, commitDate); } fileInfo.setLineAuthor(lineCount / 5, author); + + if (shouldAnalyzeAuthorship && !author.equals(Author.UNKNOWN_AUTHOR)) { + String lineContent = fileInfo.getLine(lineCount / 5 + 1).getContent(); + boolean isFullCredit = AuthorshipAnalyzer.analyzeAuthorship(config, fileInfo.getPath(), lineContent, + commitHash, author); + fileInfo.setIsFullCredit(lineCount / 5, isFullCredit); + } } } diff --git a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java new file mode 100644 index 0000000000..f9aba512b6 --- /dev/null +++ b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java @@ -0,0 +1,248 @@ +package reposense.authorship.analyzer; + +import java.nio.file.Paths; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.logging.Logger; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import reposense.authorship.model.CandidateLine; +import reposense.authorship.model.GitBlameLineInfo; +import reposense.git.GitBlame; +import reposense.git.GitDiff; +import reposense.git.GitLog; +import reposense.model.Author; +import reposense.model.CommitHash; +import reposense.model.RepoConfiguration; +import reposense.system.LogsManager; + +/** + * Analyzes a line to find out if the author should be assigned partial or full credit. + */ +public class AuthorshipAnalyzer { + private static final Logger logger = LogsManager.getLogger(AuthorshipAnalyzer.class); + + private static final double SIMILARITY_THRESHOLD = 0.8; + + private static final String DIFF_FILE_CHUNK_SEPARATOR = "\ndiff --git a/.*\n"; + private static final Pattern FILE_CHANGED_PATTERN = + Pattern.compile("\n(-){3} a?/(?.*)\n(\\+){3} b?/(?.*)\n"); + private static final String PRE_IMAGE_FILE_PATH_GROUP_NAME = "preImageFilePath"; + private static final String POST_IMAGE_FILE_PATH_GROUP_NAME = "postImageFilePath"; + private static final String FILE_ADDED_SYMBOL = "dev/null"; + private static final String HUNK_SEPARATOR = "\n@@ "; + private static final int LINES_CHANGED_HEADER_INDEX = 0; + private static final Pattern STARTING_LINE_NUMBER_PATTERN = + Pattern.compile("-(?\\d+),?\\d* \\+\\d+,?\\d* @@"); + private static final String PREIMAGE_START_LINE_GROUP_NAME = "preImageStartLine"; + private static final String MATCH_GROUP_FAIL_MESSAGE_FORMAT = "Failed to match the %s group for:\n%s"; + private static final int AUTHOR_NAME_OFFSET = "author ".length(); + private static final int AUTHOR_EMAIL_OFFSET = "author-mail ".length(); + private static final int FULL_COMMIT_HASH_LENGTH = 40; + private static final int COMMIT_TIME_OFFSET = "committer-time ".length(); + private static final String ADDED_LINE_SYMBOL = "+"; + private static final String DELETED_LINE_SYMBOL = "-"; + + /** + * Analyzes the authorship of {@code lineContent} in {@code filePath}. + * Returns {@code true} if {@code currentAuthor} should be assigned full credit, {@code false} otherwise. + */ + public static boolean analyzeAuthorship(RepoConfiguration config, String filePath, String lineContent, + String commitHash, Author currentAuthor) { + // Empty lines are ignored and given full credit + if (lineContent.length() == 0) { + return true; + } + + CandidateLine deletedLine = getDeletedLineWithHighestSimilarity(config, filePath, lineContent, commitHash); + + // Give full credit if there are no deleted lines found or deleted line is less than similarity threshold + if (deletedLine == null || deletedLine.getSimilarityScore() < SIMILARITY_THRESHOLD) { + return true; + } + + GitBlameLineInfo deletedLineInfo = getGitBlameLineInfo(config, deletedLine); + long sinceDateInMilliseconds = ZonedDateTime.of(config.getSinceDate(), ZoneId.systemDefault()).toEpochSecond(); + + // Give full credit if author is unknown, is before since date, is in ignored list, or is an ignored file + if (deletedLineInfo.getAuthor().equals(Author.UNKNOWN_AUTHOR) + || deletedLineInfo.getTimestampMilliseconds() < sinceDateInMilliseconds + || CommitHash.isInsideCommitList(deletedLineInfo.getCommitHash(), config.getIgnoreCommitList()) + || deletedLineInfo.getAuthor().isIgnoringFile(Paths.get(deletedLine.getFilePath()))) { + return true; + } + + // Give partial credit if currentAuthor is not the author of the previous version + if (!currentAuthor.equals(deletedLineInfo.getAuthor())) { + return false; + } + + // Continue with next iteration + return analyzeAuthorship(config, deletedLine.getFilePath(), deletedLine.getLineContent(), + deletedLineInfo.getCommitHash(), deletedLineInfo.getAuthor()); + } + + /** + * Returns the deleted line in {@code commitHash} that has the highest similarity with {@code lineContent}. + */ + private static CandidateLine getDeletedLineWithHighestSimilarity(RepoConfiguration config, String filePath, + String lineContent, String commitHash) { + String gitLogResults = GitLog.getParentCommits(config.getRepoRoot(), commitHash); + String[] parentCommits = gitLogResults.split(" "); + + CandidateLine highestSimilarityLine = null; + + for (String parentCommit : parentCommits) { + // Generate diff between commit and parent commit + String gitDiffResult = GitDiff.diffCommits(config.getRepoRoot(), parentCommit, commitHash); + String[] fileDiffResultList = gitDiffResult.split(DIFF_FILE_CHUNK_SEPARATOR); + + for (String fileDiffResult : fileDiffResultList) { + Matcher filePathMatcher = FILE_CHANGED_PATTERN.matcher(fileDiffResult); + if (!filePathMatcher.find()) { + continue; + } + + String preImageFilePath = filePathMatcher.group(PRE_IMAGE_FILE_PATH_GROUP_NAME); + String postImageFilePath = filePathMatcher.group(POST_IMAGE_FILE_PATH_GROUP_NAME); + + // If file was added in the commit or file name does not match + if (preImageFilePath.equals(FILE_ADDED_SYMBOL) || !postImageFilePath.equals(filePath)) { + continue; + } + + CandidateLine candidateLine = getDeletedLineWithHighestSimilarityInDiff( + fileDiffResult, lineContent, parentCommit, preImageFilePath); + if (highestSimilarityLine == null + || candidateLine.getSimilarityScore() > highestSimilarityLine.getSimilarityScore()) { + highestSimilarityLine = candidateLine; + } + } + } + + return highestSimilarityLine; + } + + /** + * Returns the deleted line in {@code fileDiffResult} that has the highest similarity with {@code lineContent}. + */ + private static CandidateLine getDeletedLineWithHighestSimilarityInDiff(String fileDiffResult, String lineContent, + String commitHash, String filePath) { + CandidateLine highestSimilarityLine = null; + + String[] hunks = fileDiffResult.split(HUNK_SEPARATOR); + + // skip the diff header, index starts from 1 + for (int index = 1; index < hunks.length; index++) { + String hunk = hunks[index]; + + // skip hunk if lines added in the hunk does not include lineContent + if (!hunk.contains(ADDED_LINE_SYMBOL + lineContent)) { + continue; + } + + String[] linesChanged = hunk.split("\n"); + int currentPreImageLineNumber = getPreImageStartingLineNumber(linesChanged[LINES_CHANGED_HEADER_INDEX]); + + // skip the lines changed header, index starts from 1 + for (int lineIndex = 1; lineIndex < linesChanged.length; lineIndex++) { + String lineChanged = linesChanged[lineIndex]; + + if (lineChanged.startsWith(DELETED_LINE_SYMBOL)) { + String deletedLineContent = lineChanged.substring(DELETED_LINE_SYMBOL.length()); + double similarityScore = similarityScore(lineContent, deletedLineContent); + + if (highestSimilarityLine == null || similarityScore > highestSimilarityLine.getSimilarityScore()) { + highestSimilarityLine = new CandidateLine( + currentPreImageLineNumber, deletedLineContent, filePath, commitHash, similarityScore); + } + } + + if (!lineChanged.startsWith(ADDED_LINE_SYMBOL)) { + currentPreImageLineNumber++; + } + } + } + + return highestSimilarityLine; + } + + /** + * Returns the pre-image starting line number by matching the pattern inside {@code linesChangedHeader}. + * + * @throws AssertionError if lines changed header matcher failed to find anything. + */ + private static int getPreImageStartingLineNumber(String linesChangedHeader) { + Matcher linesChangedHeaderMatcher = STARTING_LINE_NUMBER_PATTERN.matcher(linesChangedHeader); + + if (!linesChangedHeaderMatcher.find()) { + logger.severe( + String.format(MATCH_GROUP_FAIL_MESSAGE_FORMAT, PREIMAGE_START_LINE_GROUP_NAME, linesChangedHeader)); + throw new AssertionError( + "Should not have error matching line number pattern inside lines changed header!"); + } + + return Integer.parseInt(linesChangedHeaderMatcher.group(PREIMAGE_START_LINE_GROUP_NAME)); + } + + /** + * Calculates the similarity score of {@code s} with {@code baseString}. + */ + private static double similarityScore(String s, String baseString) { + double levenshteinDistance = getLevenshteinDistance(s, baseString); + return 1 - (levenshteinDistance / baseString.length()); + } + + /** + * Calculates the Levenshtein Distance between two strings using Dynamic Programming. + */ + private static int getLevenshteinDistance(String s, String t) { + // dp[i][j] stores the distance between s.substring(0, i) and t.substring(0, j) -> distance(s[:i], t[:j]) + int[][] dp = new int[s.length() + 1][t.length() + 1]; + + // Distance between a string and an empty string is the length of the string + for (int i = 0; i <= s.length(); i++) { + dp[i][0] = i; + } + + for (int i = 0; i <= t.length(); i++) { + dp[0][i] = i; + } + + for (int i = 1; i <= s.length(); i++) { + for (int j = 1; j <= t.length(); j++) { + // If s[i-1] and t[j-1] are equal, distance(s[:i], t[:j]) equals to distance(s[:i-1], t[:j-1]) + if (s.charAt(i - 1) == t.charAt(j - 1)) { + dp[i][j] = dp[i - 1][j - 1]; + } else { + // distance(s[:i], t[:j]) is the minimum of: + // 1) distance(s[:i-1], t[:j]) + 1 -> add s[i] + // 2) distance(s[:i], t[:j-1]) + 1 -> add t[j] + // 3) distance(s[:i-1], t[:j-1]) + 1 -> substitute s[i] with t[j] + dp[i][j] = Math.min(dp[i - 1][j], Math.min(dp[i][j - 1], dp[i - 1][j - 1])) + 1; + } + } + } + + return dp[s.length()][t.length()]; + } + + /** + * Returns the git blame line info for {@code line}. + */ + private static GitBlameLineInfo getGitBlameLineInfo(RepoConfiguration config, CandidateLine line) { + String blameResults = GitBlame.blameLine( + config.getRepoRoot(), line.getGitBlameCommitHash(), line.getFilePath(), line.getLineNumber()); + String[] blameResultLines = blameResults.split("\n"); + + String commitHash = blameResultLines[0].substring(0, FULL_COMMIT_HASH_LENGTH); + String authorName = blameResultLines[1].substring(AUTHOR_NAME_OFFSET); + String authorEmail = blameResultLines[2] + .substring(AUTHOR_EMAIL_OFFSET).replaceAll("<|>", ""); + long timestampMilliseconds = Long.parseLong(blameResultLines[3].substring(COMMIT_TIME_OFFSET)) * 1000; + Author author = config.getAuthor(authorName, authorEmail); + + return new GitBlameLineInfo(commitHash, author, timestampMilliseconds); + } +} diff --git a/src/main/java/reposense/authorship/model/CandidateLine.java b/src/main/java/reposense/authorship/model/CandidateLine.java new file mode 100644 index 0000000000..e03e89056d --- /dev/null +++ b/src/main/java/reposense/authorship/model/CandidateLine.java @@ -0,0 +1,41 @@ +package reposense.authorship.model; + +/** + * Stores the information of a candidate line used in {@code AuthorshipAnalyzer}. + */ +public class CandidateLine { + private final int lineNumber; + private final String lineContent; + private final String filePath; + private final String gitBlameCommitHash; + private final double similarityScore; + + public CandidateLine(int lineNumber, String lineContent, String filePath, String gitBlameCommitHash, + double similarityScore) { + this.lineNumber = lineNumber; + this.lineContent = lineContent; + this.filePath = filePath; + this.gitBlameCommitHash = gitBlameCommitHash; + this.similarityScore = similarityScore; + } + + public int getLineNumber() { + return lineNumber; + } + + public String getLineContent() { + return lineContent; + } + + public String getFilePath() { + return filePath; + } + + public String getGitBlameCommitHash() { + return gitBlameCommitHash; + } + + public double getSimilarityScore() { + return similarityScore; + } +} diff --git a/src/main/java/reposense/authorship/model/FileInfo.java b/src/main/java/reposense/authorship/model/FileInfo.java index c5acb7f5db..cc3c8f3b9b 100644 --- a/src/main/java/reposense/authorship/model/FileInfo.java +++ b/src/main/java/reposense/authorship/model/FileInfo.java @@ -110,6 +110,13 @@ public boolean isFileLineTracked(int lineNumber) { return getLines().get(lineNumber).isTracked(); } + /** + * Sets whether {@code lineNumber} is fully credited to its {@code author}. + */ + public void setIsFullCredit(int lineNumber, boolean isFullCredit) { + lines.get(lineNumber).setIsFullCredit(isFullCredit); + } + @Override public boolean equals(Object other) { if (this == other) { diff --git a/src/main/java/reposense/authorship/model/GitBlameLineInfo.java b/src/main/java/reposense/authorship/model/GitBlameLineInfo.java new file mode 100644 index 0000000000..48470e80f4 --- /dev/null +++ b/src/main/java/reposense/authorship/model/GitBlameLineInfo.java @@ -0,0 +1,30 @@ +package reposense.authorship.model; + +import reposense.model.Author; + +/** + * Stores the git blame info of a single line. + */ +public class GitBlameLineInfo { + private final String commitHash; + private final Author author; + private final long timestampMilliseconds; + + public GitBlameLineInfo(String commitHash, Author author, long timestampMilliseconds) { + this.commitHash = commitHash; + this.author = author; + this.timestampMilliseconds = timestampMilliseconds; + } + + public String getCommitHash() { + return commitHash; + } + + public Author getAuthor() { + return author; + } + + public long getTimestampMilliseconds() { + return timestampMilliseconds; + } +} diff --git a/src/main/java/reposense/authorship/model/LineInfo.java b/src/main/java/reposense/authorship/model/LineInfo.java index f60fb916fa..2563a0cb56 100644 --- a/src/main/java/reposense/authorship/model/LineInfo.java +++ b/src/main/java/reposense/authorship/model/LineInfo.java @@ -13,6 +13,7 @@ public class LineInfo { private Author author; private String content; private LocalDateTime lastModifiedDate; + private boolean isFullCredit; private transient boolean isTracked; @@ -21,6 +22,7 @@ public LineInfo(int lineNumber, String content) { this.content = content; isTracked = true; + isFullCredit = false; } public Author getAuthor() { @@ -55,6 +57,14 @@ public boolean isTracked() { return isTracked; } + public boolean isFullCredit() { + return isFullCredit; + } + + public void setIsFullCredit(boolean isFullCredit) { + this.isFullCredit = isFullCredit; + } + @Override public boolean equals(Object other) { if (this == other) { @@ -71,7 +81,8 @@ public boolean equals(Object other) { && content.equals(otherLineInfo.content) && isTracked == otherLineInfo.isTracked && ((lastModifiedDate == null && otherLineInfo.lastModifiedDate == null) - || (lastModifiedDate.equals(otherLineInfo.lastModifiedDate))); + || lastModifiedDate.equals(otherLineInfo.lastModifiedDate)) + && isFullCredit == otherLineInfo.isFullCredit; } } diff --git a/src/main/java/reposense/git/GitBlame.java b/src/main/java/reposense/git/GitBlame.java index e6f129364c..4b09d69d7a 100644 --- a/src/main/java/reposense/git/GitBlame.java +++ b/src/main/java/reposense/git/GitBlame.java @@ -20,8 +20,10 @@ public class GitBlame { private static final String AUTHOR_EMAIL_REGEX = "(^author-mail .*)"; private static final String AUTHOR_TIME_REGEX = "(^author-time [0-9]+)"; private static final String AUTHOR_TIMEZONE_REGEX = "(^author-tz .*)"; + private static final String COMMIT_TIME_REGEX = "(^committer-time .*)"; private static final String COMBINATION_REGEX = COMMIT_HASH_REGEX + "|" + AUTHOR_NAME_REGEX + "|" + AUTHOR_EMAIL_REGEX + "|" + AUTHOR_TIME_REGEX + "|" + AUTHOR_TIMEZONE_REGEX; + private static final String COMBINATION_WITH_COMMIT_TIME_REGEX = COMBINATION_REGEX + "|" + COMMIT_TIME_REGEX; /** * Returns the raw git blame result for the {@code fileDirectory}, performed at the {@code root} directory. @@ -48,4 +50,16 @@ public static String blameWithPreviousAuthors(String root, String fileDirectory) return StringsUtil.filterText(runCommand(rootPath, blameCommandWithFindingPreviousAuthors), COMBINATION_REGEX); } + + /** + * Returns the raw git blame result for {@code lineNumber} of {@code fileDirectory} at {@code commitHash}. + */ + public static String blameLine(String root, String commitHash, String fileDirectory, int lineNumber) { + Path rootPath = Paths.get(root); + + String blameCommand = String.format("git blame -w --line-porcelain %s -L %d,+1 -- %s", + commitHash, lineNumber, fileDirectory); + + return StringsUtil.filterText(runCommand(rootPath, blameCommand), COMBINATION_WITH_COMMIT_TIME_REGEX); + } } diff --git a/src/main/java/reposense/git/GitDiff.java b/src/main/java/reposense/git/GitDiff.java index 2e070aadd1..14a25339a0 100644 --- a/src/main/java/reposense/git/GitDiff.java +++ b/src/main/java/reposense/git/GitDiff.java @@ -34,4 +34,12 @@ public static List getModifiedFilesList(Path repoRoot) { String diffResult = runCommand(repoRoot.toAbsolutePath(), diffCommand); return Arrays.asList(diffResult.split("\n")); } + + /** + * Returns the git diff result of {@code currentCommitHash} compared to {@code baseCommitHash}. + */ + public static String diffCommits(String root, String baseCommitHash, String currentCommitHash) { + Path rootPath = Paths.get(root); + return runCommand(rootPath, String.format("git diff %s...%s", baseCommitHash, currentCommitHash)); + } } diff --git a/src/main/java/reposense/git/GitLog.java b/src/main/java/reposense/git/GitLog.java index f9540ec143..362bbfcfbe 100644 --- a/src/main/java/reposense/git/GitLog.java +++ b/src/main/java/reposense/git/GitLog.java @@ -76,4 +76,16 @@ public static List getFileAuthors(RepoConfiguration config, String fil : authorAndEmailArray) .collect(Collectors.toList()); } + + /** + * Returns the git log result containing the parents of {@code commitHash}. + */ + public static String getParentCommits(String root, String commitHash) { + Path rootPath = Paths.get(root); + + String command = "git log --pretty=%P -1 "; + command += commitHash; + + return runCommand(rootPath, command).trim(); + } } From f3fbc33a0135028a96db02038d43765747a1f88f Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Sun, 6 Aug 2023 21:08:55 +0800 Subject: [PATCH 14/47] reformat files --- .../java/reposense/authorship/FileInfoAnalyzer.java | 5 +++-- .../java/reposense/authorship/model/FileInfo.java | 8 ++++---- .../java/reposense/authorship/model/LineInfo.java | 12 ++++++------ 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/java/reposense/authorship/FileInfoAnalyzer.java b/src/main/java/reposense/authorship/FileInfoAnalyzer.java index a2782cb36a..ba3f65b315 100644 --- a/src/main/java/reposense/authorship/FileInfoAnalyzer.java +++ b/src/main/java/reposense/authorship/FileInfoAnalyzer.java @@ -12,6 +12,7 @@ import java.util.logging.Logger; import reposense.authorship.analyzer.AnnotatorAnalyzer; +import reposense.authorship.analyzer.AuthorshipAnalyzer; import reposense.authorship.model.FileInfo; import reposense.authorship.model.FileResult; import reposense.authorship.model.LineInfo; @@ -174,14 +175,14 @@ private void aggregateBlameAuthorModifiedAndDateInfo(RepoConfiguration config, F String authorName = blameResultLines[lineCount + 1].substring(AUTHOR_NAME_OFFSET); String authorEmail = blameResultLines[lineCount + 2] .substring(AUTHOR_EMAIL_OFFSET).replaceAll("<|>", ""); - Long commitDateInMs = Long.parseLong(blameResultLines[lineCount + 3].substring(AUTHOR_TIME_OFFSET)) * 1000; + long commitDateInMs = Long.parseLong(blameResultLines[lineCount + 3].substring(AUTHOR_TIME_OFFSET)) * 1000; LocalDateTime commitDate = LocalDateTime.ofInstant(Instant.ofEpochMilli(commitDateInMs), config.getZoneId()); Author author = config.getAuthor(authorName, authorEmail); if (!fileInfo.isFileLineTracked(lineCount / 5) || author.isIgnoringFile(filePath) || CommitHash.isInsideCommitList(commitHash, config.getIgnoreCommitList()) - || commitDate.compareTo(sinceDate) < 0 || commitDate.compareTo(untilDate) > 0) { + || commitDate.isBefore(sinceDate) || commitDate.isAfter(untilDate)) { author = Author.UNKNOWN_AUTHOR; } diff --git a/src/main/java/reposense/authorship/model/FileInfo.java b/src/main/java/reposense/authorship/model/FileInfo.java index cc3c8f3b9b..4ccce204d5 100644 --- a/src/main/java/reposense/authorship/model/FileInfo.java +++ b/src/main/java/reposense/authorship/model/FileInfo.java @@ -73,14 +73,14 @@ public void setFileSize(long fileSize) { this.fileSize = fileSize; } - public void setFileAnalyzed(boolean isFileAnalyzed) { - this.isFileAnalyzed = isFileAnalyzed; - } - public boolean isFileAnalyzed() { return isFileAnalyzed; } + public void setFileAnalyzed(boolean isFileAnalyzed) { + this.isFileAnalyzed = isFileAnalyzed; + } + public boolean exceedsFileLimit() { return exceedsFileLimit; } diff --git a/src/main/java/reposense/authorship/model/LineInfo.java b/src/main/java/reposense/authorship/model/LineInfo.java index 2563a0cb56..ba9328df49 100644 --- a/src/main/java/reposense/authorship/model/LineInfo.java +++ b/src/main/java/reposense/authorship/model/LineInfo.java @@ -41,10 +41,6 @@ public String getContent() { return content; } - public void setTracked(boolean isTracked) { - this.isTracked = isTracked; - } - public LocalDateTime getLastModifiedDate() { return lastModifiedDate; } @@ -57,6 +53,10 @@ public boolean isTracked() { return isTracked; } + public void setTracked(boolean isTracked) { + this.isTracked = isTracked; + } + public boolean isFullCredit() { return isFullCredit; } @@ -81,8 +81,8 @@ public boolean equals(Object other) { && content.equals(otherLineInfo.content) && isTracked == otherLineInfo.isTracked && ((lastModifiedDate == null && otherLineInfo.lastModifiedDate == null) - || lastModifiedDate.equals(otherLineInfo.lastModifiedDate)) + || (lastModifiedDate != null && otherLineInfo.lastModifiedDate != null + && lastModifiedDate.equals(otherLineInfo.lastModifiedDate))) && isFullCredit == otherLineInfo.isFullCredit; } } - From f7cbe5bcb3f136bedef674e1124061b06f7f1d29 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Mon, 7 Aug 2023 11:23:32 +0800 Subject: [PATCH 15/47] set to default full credit --- src/main/java/reposense/authorship/model/LineInfo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/reposense/authorship/model/LineInfo.java b/src/main/java/reposense/authorship/model/LineInfo.java index ba9328df49..ea5e3d909f 100644 --- a/src/main/java/reposense/authorship/model/LineInfo.java +++ b/src/main/java/reposense/authorship/model/LineInfo.java @@ -22,7 +22,7 @@ public LineInfo(int lineNumber, String content) { this.content = content; isTracked = true; - isFullCredit = false; + isFullCredit = true; } public Author getAuthor() { From 03c1a2af8cd269d28789f763af24d0fabd5cbafc Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Mon, 7 Aug 2023 11:26:24 +0800 Subject: [PATCH 16/47] update expected outputs for local repo system tests --- .../parent1_test-repo_master/authorship.json | 2 +- .../parent1_test-repo_master/authorship.json | 2 +- .../parent2_test-repo_master/authorship.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/systemtest/resources/LocalRepoSystemTest/testRelativePathing/parent1_test-repo_master/authorship.json b/src/systemtest/resources/LocalRepoSystemTest/testRelativePathing/parent1_test-repo_master/authorship.json index 74c1e42b87..dfd2f1fa9c 100644 --- a/src/systemtest/resources/LocalRepoSystemTest/testRelativePathing/parent1_test-repo_master/authorship.json +++ b/src/systemtest/resources/LocalRepoSystemTest/testRelativePathing/parent1_test-repo_master/authorship.json @@ -1 +1 @@ -[{"path":"README.md","fileType":"md","lines":[{"lineNumber":1,"author":{"gitId":"eugenepeh"},"content":"This is a test repository for [RepoSense](https://github.com/reposense/RepoSense)."}],"authorContributionMap":{"eugenepeh":1}},{"path":"_reposense/config.json","fileType":"json","lines":[{"lineNumber":1,"author":{"gitId":"Eugene Peh"},"content":"{"},{"lineNumber":2,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"about-us/**\", \"**index.html\"],"},{"lineNumber":3,"author":{"gitId":"Eugene Peh"},"content":" \"formats\": [\"html\", \"css\"],"},{"lineNumber":4,"author":{"gitId":"FH-30"},"content":" \"ignoreCommitsList\": [\"\", \"67890def\"],"},{"lineNumber":5,"author":{"gitId":"Eugene Peh"},"content":" \"authors\":"},{"lineNumber":6,"author":{"gitId":"Eugene Peh"},"content":" ["},{"lineNumber":7,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":8,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"alice\","},{"lineNumber":9,"author":{"gitId":"Eugene Peh"},"content":" \"displayName\": \"Alice T.\","},{"lineNumber":10,"author":{"gitId":"Eugene Peh"},"content":" \"authorNames\": [\"AT\", \"A\"],"},{"lineNumber":11,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"**.css\"]"},{"lineNumber":12,"author":{"gitId":"Eugene Peh"},"content":" },"},{"lineNumber":13,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":14,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"bob\""},{"lineNumber":15,"author":{"gitId":"Eugene Peh"},"content":" }"},{"lineNumber":16,"author":{"gitId":"Eugene Peh"},"content":" ]"},{"lineNumber":17,"author":{"gitId":"Eugene Peh"},"content":"}"}],"authorContributionMap":{"FH-30":1,"Eugene Peh":16}},{"path":"annotationTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"fakeAuthor"},"content":"fake all the lines in this file is writtened by fakeAuthor"},{"lineNumber":2,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg"},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author"},{"lineNumber":10,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":11,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":12,"author":{"gitId":"-unconventional_author-"},"content":"//@@author -unconventional_author-"},{"lineNumber":13,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 1"},{"lineNumber":14,"author":{"gitId":"-unconventional_author-"},"content":"System.out.println(\"//@@author invalidAuthorLineFormat\"); unconventional line 2"},{"lineNumber":15,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 3"},{"lineNumber":16,"author":{"gitId":"-unconventional_author-"},"content":"//@@author"},{"lineNumber":17,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":18,"author":{"gitId":"whitespace author"},"content":"//@@author whitespace author"},{"lineNumber":19,"author":{"gitId":"whitespace author"},"content":"whitespace line 1"},{"lineNumber":20,"author":{"gitId":"whitespace author"},"content":"//@@author"},{"lineNumber":21,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":22,"author":{"gitId":"fakeAuthor"},"content":"fake"}],"authorContributionMap":{"fakeAuthor":9,"-unconventional_author-":5,"whitespace author":3,"harryggg":5}},{"path":"blameTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3"}],"authorContributionMap":{"fakeAuthor":1,"harryggg":3}},{"path":"newFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4"}],"authorContributionMap":{"harryggg":4}},{"path":"space test.txt","fileType":"txt","lines":[{"lineNumber":1,"author":{"gitId":"chan-j-d"},"content":"1"}],"authorContributionMap":{"chan-j-d":1}}] +[{"path":"README.md","fileType":"md","lines":[{"lineNumber":1,"author":{"gitId":"eugenepeh"},"content":"This is a test repository for [RepoSense](https://github.com/reposense/RepoSense).","isFullCredit":true}],"authorContributionMap":{"eugenepeh":1}},{"path":"_reposense/config.json","fileType":"json","lines":[{"lineNumber":1,"author":{"gitId":"Eugene Peh"},"content":"{","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"about-us/**\", \"**index.html\"],","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Eugene Peh"},"content":" \"formats\": [\"html\", \"css\"],","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"FH-30"},"content":" \"ignoreCommitsList\": [\"\", \"67890def\"],","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Eugene Peh"},"content":" \"authors\":","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Eugene Peh"},"content":" [","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Eugene Peh"},"content":" {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"alice\",","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Eugene Peh"},"content":" \"displayName\": \"Alice T.\",","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Eugene Peh"},"content":" \"authorNames\": [\"AT\", \"A\"],","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"**.css\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Eugene Peh"},"content":" },","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Eugene Peh"},"content":" {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"bob\"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Eugene Peh"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Eugene Peh"},"content":" ]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Eugene Peh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"FH-30":1,"Eugene Peh":16}},{"path":"annotationTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"fakeAuthor"},"content":"fake all the lines in this file is writtened by fakeAuthor","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-unconventional_author-"},"content":"//@@author -unconventional_author-","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 1","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-unconventional_author-"},"content":"System.out.println(\"//@@author invalidAuthorLineFormat\"); unconventional line 2","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 3","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-unconventional_author-"},"content":"//@@author","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"whitespace author"},"content":"//@@author whitespace author","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"whitespace author"},"content":"whitespace line 1","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"whitespace author"},"content":"//@@author","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true}],"authorContributionMap":{"fakeAuthor":9,"-unconventional_author-":5,"whitespace author":3,"harryggg":5}},{"path":"blameTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true}],"authorContributionMap":{"fakeAuthor":1,"harryggg":3}},{"path":"newFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4","isFullCredit":true}],"authorContributionMap":{"harryggg":4}},{"path":"space test.txt","fileType":"txt","lines":[{"lineNumber":1,"author":{"gitId":"chan-j-d"},"content":"1","isFullCredit":true}],"authorContributionMap":{"chan-j-d":1}}] diff --git a/src/systemtest/resources/LocalRepoSystemTest/testSameFinalDirectory/parent1_test-repo_master/authorship.json b/src/systemtest/resources/LocalRepoSystemTest/testSameFinalDirectory/parent1_test-repo_master/authorship.json index 74c1e42b87..dfd2f1fa9c 100644 --- a/src/systemtest/resources/LocalRepoSystemTest/testSameFinalDirectory/parent1_test-repo_master/authorship.json +++ b/src/systemtest/resources/LocalRepoSystemTest/testSameFinalDirectory/parent1_test-repo_master/authorship.json @@ -1 +1 @@ -[{"path":"README.md","fileType":"md","lines":[{"lineNumber":1,"author":{"gitId":"eugenepeh"},"content":"This is a test repository for [RepoSense](https://github.com/reposense/RepoSense)."}],"authorContributionMap":{"eugenepeh":1}},{"path":"_reposense/config.json","fileType":"json","lines":[{"lineNumber":1,"author":{"gitId":"Eugene Peh"},"content":"{"},{"lineNumber":2,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"about-us/**\", \"**index.html\"],"},{"lineNumber":3,"author":{"gitId":"Eugene Peh"},"content":" \"formats\": [\"html\", \"css\"],"},{"lineNumber":4,"author":{"gitId":"FH-30"},"content":" \"ignoreCommitsList\": [\"\", \"67890def\"],"},{"lineNumber":5,"author":{"gitId":"Eugene Peh"},"content":" \"authors\":"},{"lineNumber":6,"author":{"gitId":"Eugene Peh"},"content":" ["},{"lineNumber":7,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":8,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"alice\","},{"lineNumber":9,"author":{"gitId":"Eugene Peh"},"content":" \"displayName\": \"Alice T.\","},{"lineNumber":10,"author":{"gitId":"Eugene Peh"},"content":" \"authorNames\": [\"AT\", \"A\"],"},{"lineNumber":11,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"**.css\"]"},{"lineNumber":12,"author":{"gitId":"Eugene Peh"},"content":" },"},{"lineNumber":13,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":14,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"bob\""},{"lineNumber":15,"author":{"gitId":"Eugene Peh"},"content":" }"},{"lineNumber":16,"author":{"gitId":"Eugene Peh"},"content":" ]"},{"lineNumber":17,"author":{"gitId":"Eugene Peh"},"content":"}"}],"authorContributionMap":{"FH-30":1,"Eugene Peh":16}},{"path":"annotationTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"fakeAuthor"},"content":"fake all the lines in this file is writtened by fakeAuthor"},{"lineNumber":2,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg"},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author"},{"lineNumber":10,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":11,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":12,"author":{"gitId":"-unconventional_author-"},"content":"//@@author -unconventional_author-"},{"lineNumber":13,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 1"},{"lineNumber":14,"author":{"gitId":"-unconventional_author-"},"content":"System.out.println(\"//@@author invalidAuthorLineFormat\"); unconventional line 2"},{"lineNumber":15,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 3"},{"lineNumber":16,"author":{"gitId":"-unconventional_author-"},"content":"//@@author"},{"lineNumber":17,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":18,"author":{"gitId":"whitespace author"},"content":"//@@author whitespace author"},{"lineNumber":19,"author":{"gitId":"whitespace author"},"content":"whitespace line 1"},{"lineNumber":20,"author":{"gitId":"whitespace author"},"content":"//@@author"},{"lineNumber":21,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":22,"author":{"gitId":"fakeAuthor"},"content":"fake"}],"authorContributionMap":{"fakeAuthor":9,"-unconventional_author-":5,"whitespace author":3,"harryggg":5}},{"path":"blameTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3"}],"authorContributionMap":{"fakeAuthor":1,"harryggg":3}},{"path":"newFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4"}],"authorContributionMap":{"harryggg":4}},{"path":"space test.txt","fileType":"txt","lines":[{"lineNumber":1,"author":{"gitId":"chan-j-d"},"content":"1"}],"authorContributionMap":{"chan-j-d":1}}] +[{"path":"README.md","fileType":"md","lines":[{"lineNumber":1,"author":{"gitId":"eugenepeh"},"content":"This is a test repository for [RepoSense](https://github.com/reposense/RepoSense).","isFullCredit":true}],"authorContributionMap":{"eugenepeh":1}},{"path":"_reposense/config.json","fileType":"json","lines":[{"lineNumber":1,"author":{"gitId":"Eugene Peh"},"content":"{","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"about-us/**\", \"**index.html\"],","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Eugene Peh"},"content":" \"formats\": [\"html\", \"css\"],","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"FH-30"},"content":" \"ignoreCommitsList\": [\"\", \"67890def\"],","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Eugene Peh"},"content":" \"authors\":","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Eugene Peh"},"content":" [","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Eugene Peh"},"content":" {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"alice\",","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Eugene Peh"},"content":" \"displayName\": \"Alice T.\",","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Eugene Peh"},"content":" \"authorNames\": [\"AT\", \"A\"],","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"**.css\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Eugene Peh"},"content":" },","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Eugene Peh"},"content":" {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"bob\"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Eugene Peh"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Eugene Peh"},"content":" ]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Eugene Peh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"FH-30":1,"Eugene Peh":16}},{"path":"annotationTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"fakeAuthor"},"content":"fake all the lines in this file is writtened by fakeAuthor","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-unconventional_author-"},"content":"//@@author -unconventional_author-","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 1","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-unconventional_author-"},"content":"System.out.println(\"//@@author invalidAuthorLineFormat\"); unconventional line 2","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 3","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-unconventional_author-"},"content":"//@@author","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"whitespace author"},"content":"//@@author whitespace author","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"whitespace author"},"content":"whitespace line 1","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"whitespace author"},"content":"//@@author","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true}],"authorContributionMap":{"fakeAuthor":9,"-unconventional_author-":5,"whitespace author":3,"harryggg":5}},{"path":"blameTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true}],"authorContributionMap":{"fakeAuthor":1,"harryggg":3}},{"path":"newFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4","isFullCredit":true}],"authorContributionMap":{"harryggg":4}},{"path":"space test.txt","fileType":"txt","lines":[{"lineNumber":1,"author":{"gitId":"chan-j-d"},"content":"1","isFullCredit":true}],"authorContributionMap":{"chan-j-d":1}}] diff --git a/src/systemtest/resources/LocalRepoSystemTest/testSameFinalDirectory/parent2_test-repo_master/authorship.json b/src/systemtest/resources/LocalRepoSystemTest/testSameFinalDirectory/parent2_test-repo_master/authorship.json index 74c1e42b87..dfd2f1fa9c 100644 --- a/src/systemtest/resources/LocalRepoSystemTest/testSameFinalDirectory/parent2_test-repo_master/authorship.json +++ b/src/systemtest/resources/LocalRepoSystemTest/testSameFinalDirectory/parent2_test-repo_master/authorship.json @@ -1 +1 @@ -[{"path":"README.md","fileType":"md","lines":[{"lineNumber":1,"author":{"gitId":"eugenepeh"},"content":"This is a test repository for [RepoSense](https://github.com/reposense/RepoSense)."}],"authorContributionMap":{"eugenepeh":1}},{"path":"_reposense/config.json","fileType":"json","lines":[{"lineNumber":1,"author":{"gitId":"Eugene Peh"},"content":"{"},{"lineNumber":2,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"about-us/**\", \"**index.html\"],"},{"lineNumber":3,"author":{"gitId":"Eugene Peh"},"content":" \"formats\": [\"html\", \"css\"],"},{"lineNumber":4,"author":{"gitId":"FH-30"},"content":" \"ignoreCommitsList\": [\"\", \"67890def\"],"},{"lineNumber":5,"author":{"gitId":"Eugene Peh"},"content":" \"authors\":"},{"lineNumber":6,"author":{"gitId":"Eugene Peh"},"content":" ["},{"lineNumber":7,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":8,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"alice\","},{"lineNumber":9,"author":{"gitId":"Eugene Peh"},"content":" \"displayName\": \"Alice T.\","},{"lineNumber":10,"author":{"gitId":"Eugene Peh"},"content":" \"authorNames\": [\"AT\", \"A\"],"},{"lineNumber":11,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"**.css\"]"},{"lineNumber":12,"author":{"gitId":"Eugene Peh"},"content":" },"},{"lineNumber":13,"author":{"gitId":"Eugene Peh"},"content":" {"},{"lineNumber":14,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"bob\""},{"lineNumber":15,"author":{"gitId":"Eugene Peh"},"content":" }"},{"lineNumber":16,"author":{"gitId":"Eugene Peh"},"content":" ]"},{"lineNumber":17,"author":{"gitId":"Eugene Peh"},"content":"}"}],"authorContributionMap":{"FH-30":1,"Eugene Peh":16}},{"path":"annotationTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"fakeAuthor"},"content":"fake all the lines in this file is writtened by fakeAuthor"},{"lineNumber":2,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg"},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author"},{"lineNumber":10,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":11,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":12,"author":{"gitId":"-unconventional_author-"},"content":"//@@author -unconventional_author-"},{"lineNumber":13,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 1"},{"lineNumber":14,"author":{"gitId":"-unconventional_author-"},"content":"System.out.println(\"//@@author invalidAuthorLineFormat\"); unconventional line 2"},{"lineNumber":15,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 3"},{"lineNumber":16,"author":{"gitId":"-unconventional_author-"},"content":"//@@author"},{"lineNumber":17,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":18,"author":{"gitId":"whitespace author"},"content":"//@@author whitespace author"},{"lineNumber":19,"author":{"gitId":"whitespace author"},"content":"whitespace line 1"},{"lineNumber":20,"author":{"gitId":"whitespace author"},"content":"//@@author"},{"lineNumber":21,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":22,"author":{"gitId":"fakeAuthor"},"content":"fake"}],"authorContributionMap":{"fakeAuthor":9,"-unconventional_author-":5,"whitespace author":3,"harryggg":5}},{"path":"blameTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3"}],"authorContributionMap":{"fakeAuthor":1,"harryggg":3}},{"path":"newFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4"}],"authorContributionMap":{"harryggg":4}},{"path":"space test.txt","fileType":"txt","lines":[{"lineNumber":1,"author":{"gitId":"chan-j-d"},"content":"1"}],"authorContributionMap":{"chan-j-d":1}}] +[{"path":"README.md","fileType":"md","lines":[{"lineNumber":1,"author":{"gitId":"eugenepeh"},"content":"This is a test repository for [RepoSense](https://github.com/reposense/RepoSense).","isFullCredit":true}],"authorContributionMap":{"eugenepeh":1}},{"path":"_reposense/config.json","fileType":"json","lines":[{"lineNumber":1,"author":{"gitId":"Eugene Peh"},"content":"{","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"about-us/**\", \"**index.html\"],","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Eugene Peh"},"content":" \"formats\": [\"html\", \"css\"],","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"FH-30"},"content":" \"ignoreCommitsList\": [\"\", \"67890def\"],","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Eugene Peh"},"content":" \"authors\":","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Eugene Peh"},"content":" [","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Eugene Peh"},"content":" {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"alice\",","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Eugene Peh"},"content":" \"displayName\": \"Alice T.\",","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Eugene Peh"},"content":" \"authorNames\": [\"AT\", \"A\"],","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Eugene Peh"},"content":" \"ignoreGlobList\": [\"**.css\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Eugene Peh"},"content":" },","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Eugene Peh"},"content":" {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Eugene Peh"},"content":" \"githubId\": \"bob\"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Eugene Peh"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Eugene Peh"},"content":" ]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Eugene Peh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"FH-30":1,"Eugene Peh":16}},{"path":"annotationTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"fakeAuthor"},"content":"fake all the lines in this file is writtened by fakeAuthor","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-unconventional_author-"},"content":"//@@author -unconventional_author-","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 1","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-unconventional_author-"},"content":"System.out.println(\"//@@author invalidAuthorLineFormat\"); unconventional line 2","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-unconventional_author-"},"content":"unconventional line 3","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-unconventional_author-"},"content":"//@@author","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"whitespace author"},"content":"//@@author whitespace author","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"whitespace author"},"content":"whitespace line 1","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"whitespace author"},"content":"//@@author","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true}],"authorContributionMap":{"fakeAuthor":9,"-unconventional_author-":5,"whitespace author":3,"harryggg":5}},{"path":"blameTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"fakeAuthor"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true}],"authorContributionMap":{"fakeAuthor":1,"harryggg":3}},{"path":"newFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4","isFullCredit":true}],"authorContributionMap":{"harryggg":4}},{"path":"space test.txt","fileType":"txt","lines":[{"lineNumber":1,"author":{"gitId":"chan-j-d"},"content":"1","isFullCredit":true}],"authorContributionMap":{"chan-j-d":1}}] From acc66658e7eb51058ce6e4d315e747486cd9cd39 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Mon, 7 Aug 2023 15:16:14 +0800 Subject: [PATCH 17/47] update expected outputs for config system tests --- .../expected/reposense_testrepo-Beta_master/authorship.json | 2 +- .../expected/reposense_testrepo-Charlie_master/authorship.json | 2 +- .../expected/reposense_testrepo-Beta_master/authorship.json | 2 +- .../expected/reposense_testrepo-Charlie_master/authorship.json | 2 +- .../expected/reposense_testrepo-Beta_master/authorship.json | 2 +- .../expected/reposense_testrepo-Charlie_master/authorship.json | 2 +- .../expected/reposense_testrepo-Beta_master/authorship.json | 2 +- .../expected/reposense_testrepo-Charlie_master/authorship.json | 2 +- .../expected/reposense_testrepo-Alpha_master/authorship.json | 2 +- .../expected/reposense_testrepo-Beta_master/authorship.json | 2 +- .../expected/reposense_testrepo-Charlie_master/authorship.json | 2 +- .../expected/reposense_testrepo-Delta_master/authorship.json | 2 +- .../expected/reposense_testrepo-Alpha_master/authorship.json | 2 +- .../expected/reposense_testrepo-Beta_master/authorship.json | 2 +- .../expected/reposense_testrepo-Charlie_master/authorship.json | 2 +- .../expected/reposense_testrepo-Delta_master/authorship.json | 2 +- .../expected/reposense_testrepo-Alpha_master/authorship.json | 2 +- .../expected/reposense_testrepo-Beta_master/authorship.json | 2 +- .../expected/reposense_testrepo-Charlie_master/authorship.json | 2 +- .../expected/reposense_testrepo-Delta_master/authorship.json | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDate/expected/reposense_testrepo-Beta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDate/expected/reposense_testrepo-Beta_master/authorship.json index 79c4693058..c1030bef2f 100644 --- a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDate/expected/reposense_testrepo-Beta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDate/expected/reposense_testrepo-Beta_master/authorship.json @@ -1 +1 @@ -[{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import java.net.URL?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Menu?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cstylesheets\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@DarkTheme.css\" /\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/stylesheets\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/MenuBar\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":27,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e"},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":29,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e"},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003c/StackPane\u003e"},{"lineNumber":31,"author":{"gitId":"nbr"},"content":""},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" maxHeight\u003d\"100\" minHeight\u003d\"100\" prefHeight\u003d\"100\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":34,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" maxHeight\u003d\"60\" minHeight\u003d\"60\" prefHeight\u003d\"60\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":47,"author":{"gitId":"nbr"},"content":" \u003cVBox fx:id\u003d\"personList\" minWidth\u003d\"335.0\" prefHeight\u003d\"143.0\" prefWidth\u003d\"335.0\" SplitPane.resizableWithParent\u003d\"false\"\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":49,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" prefWidth\u003d\"340\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":57,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e"},{"lineNumber":64,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e"}],"authorContributionMap":{"April0616":1,"-":53,"nbr":10}},{"path":"src/main/resources/view/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e"},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e"},{"lineNumber":16,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e"},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e"},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cchildren\u003e"},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":21,"author":{"gitId":"April0616"},"content":""},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e"},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e"},{"lineNumber":24,"author":{"gitId":"April0616"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e"},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e"},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" /\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e"},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e"},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" /\u003e"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"April0616":14,"-":48,"nbr":3}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets top\u003d\"5\" right\u003d\"5\" bottom\u003d\"5\" left\u003d\"15\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cHBox spacing\u003d\"5\" alignment\u003d\"CENTER_LEFT\"\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" text\u003d\"\\$first\" styleClass\u003d\"cell_big_label\" /\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$gender\" /\u003e"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$address\" /\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":36,"author":{"gitId":"CindyTsai1"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"timetable\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$timetable\" /\u003e"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$remark\" /\u003e"},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"photoPath\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$photoPath\" /\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"CindyTsai1":1,"April0616":4,"-":37}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"nbr"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"-":24,"nbr":2}}] +[{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import java.net.URL?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Menu?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cstylesheets\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@DarkTheme.css\" /\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/stylesheets\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/MenuBar\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"nbr"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" maxHeight\u003d\"100\" minHeight\u003d\"100\" prefHeight\u003d\"100\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" maxHeight\u003d\"60\" minHeight\u003d\"60\" prefHeight\u003d\"60\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"nbr"},"content":" \u003cVBox fx:id\u003d\"personList\" minWidth\u003d\"335.0\" prefHeight\u003d\"143.0\" prefWidth\u003d\"335.0\" SplitPane.resizableWithParent\u003d\"false\"\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" prefWidth\u003d\"340\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":1,"-":53,"nbr":10}},{"path":"src/main/resources/view/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cchildren\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" /\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" /\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":14,"-":48,"nbr":3}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets top\u003d\"5\" right\u003d\"5\" bottom\u003d\"5\" left\u003d\"15\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cHBox spacing\u003d\"5\" alignment\u003d\"CENTER_LEFT\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" text\u003d\"\\$first\" styleClass\u003d\"cell_big_label\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$gender\" /\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$address\" /\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"CindyTsai1"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"timetable\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$timetable\" /\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$remark\" /\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"photoPath\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$photoPath\" /\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"CindyTsai1":1,"April0616":4,"-":37}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"nbr"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":24,"nbr":2}}] diff --git a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDate/expected/reposense_testrepo-Charlie_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDate/expected/reposense_testrepo-Charlie_master/authorship.json index 17759c193d..e4236ea96a 100644 --- a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDate/expected/reposense_testrepo-Charlie_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDate/expected/reposense_testrepo-Charlie_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++"},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]"},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\"]"},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface)."},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"* It is a Java application primarily targeted for students doing group projects."},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls."},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by"},{"lineNumber":33,"author":{"gitId":"-"},"content":"_Marco Jakob_."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_."},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]"}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":7,"-":26}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us"},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team."},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/."},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Charles Goh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://charlesgoh.me[homepage]] [https://github.com/charlesgoh[github]]"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Jeffrey Goh"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Kelvin Lin"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esiloke[github]]"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Wang Yi Ming"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1090[github]]"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"}],"authorContributionMap":{"charlesgoh":22,"-":26}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later"},{"lineNumber":22,"author":{"gitId":"-"},"content":"+"},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":26,"author":{"gitId":"-"},"content":"+"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE"},{"lineNumber":29,"author":{"gitId":"-"},"content":"+"},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them."},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer"},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)"},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle"},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`"},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK"},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`"},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`"},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`"},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings"},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +"},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests."},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands"},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)"},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`"},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code."},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork."},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up."},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e)."},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section."},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started]."},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]"},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component."},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`."},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other."},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary."},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level."},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)"},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file."},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components."},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App."},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor."},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory."},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk."},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component."},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class."},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class."},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`."},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]"},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk."},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time."},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]"},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components."},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component."},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class."},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component."},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change."},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly."},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :"},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command."},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`."},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events."},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`."},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call."},{"lineNumber":183,"author":{"gitId":"-"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]"},{"lineNumber":193,"author":{"gitId":"-"},"content":""},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences."},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data."},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change."},{"lineNumber":199,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components."},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":204,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":"The `Storage` component,"},{"lineNumber":209,"author":{"gitId":"-"},"content":""},{"lineNumber":210,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back."},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back."},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package."},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented."},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go."},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size. The first way is through the UI. The Class Diagram for this"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":"procedure is shown below:"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"The other method of calling changes in font size is through a CLI command. When the relevant command is entered,"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"the Command class calls MainWindow. The rest of the process flow is identical to that of the UI triggered font size"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"command."},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder"},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of Task-related commands +"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +"},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Create new classes for all new commands +"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Simpler to implement. +"},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure."},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Storage of Task objects +"},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +"},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa."},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage."},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +"},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons** Any changes to the Person or Task"},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":259,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":260,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`."},{"lineNumber":263,"author":{"gitId":"-"},"content":""},{"lineNumber":264,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":267,"author":{"gitId":"-"},"content":""},{"lineNumber":268,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern]."},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:"},{"lineNumber":271,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":272,"author":{"gitId":"-"},"content":"----"},{"lineNumber":273,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":274,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":275,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":276,"author":{"gitId":"-"},"content":" // ... list logic ..."},{"lineNumber":277,"author":{"gitId":"-"},"content":" }"},{"lineNumber":278,"author":{"gitId":"-"},"content":"}"},{"lineNumber":279,"author":{"gitId":"-"},"content":"----"},{"lineNumber":280,"author":{"gitId":"-"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:"},{"lineNumber":282,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":283,"author":{"gitId":"-"},"content":"----"},{"lineNumber":284,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {"},{"lineNumber":285,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":286,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":287,"author":{"gitId":"-"},"content":" // ... undo logic ..."},{"lineNumber":288,"author":{"gitId":"-"},"content":""},{"lineNumber":289,"author":{"gitId":"-"},"content":" executeUndoableCommand();"},{"lineNumber":290,"author":{"gitId":"-"},"content":" }"},{"lineNumber":291,"author":{"gitId":"-"},"content":"}"},{"lineNumber":292,"author":{"gitId":"-"},"content":""},{"lineNumber":293,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":294,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":295,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":296,"author":{"gitId":"-"},"content":" // ... delete logic ..."},{"lineNumber":297,"author":{"gitId":"-"},"content":" }"},{"lineNumber":298,"author":{"gitId":"-"},"content":"}"},{"lineNumber":299,"author":{"gitId":"-"},"content":"----"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning."},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command)."},{"lineNumber":304,"author":{"gitId":"-"},"content":""},{"lineNumber":305,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":306,"author":{"gitId":"-"},"content":""},{"lineNumber":307,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person."},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":310,"author":{"gitId":"-"},"content":""},{"lineNumber":311,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":312,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all."},{"lineNumber":313,"author":{"gitId":"-"},"content":""},{"lineNumber":314,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`."},{"lineNumber":315,"author":{"gitId":"-"},"content":""},{"lineNumber":316,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed."},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":319,"author":{"gitId":"-"},"content":""},{"lineNumber":320,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":321,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`."},{"lineNumber":322,"author":{"gitId":"-"},"content":""},{"lineNumber":323,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:"},{"lineNumber":324,"author":{"gitId":"-"},"content":""},{"lineNumber":325,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":326,"author":{"gitId":"-"},"content":""},{"lineNumber":327,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed)."},{"lineNumber":328,"author":{"gitId":"-"},"content":""},{"lineNumber":329,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":330,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`."},{"lineNumber":331,"author":{"gitId":"-"},"content":""},{"lineNumber":332,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow)."},{"lineNumber":333,"author":{"gitId":"-"},"content":""},{"lineNumber":334,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":335,"author":{"gitId":"-"},"content":""},{"lineNumber":336,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:"},{"lineNumber":337,"author":{"gitId":"-"},"content":""},{"lineNumber":338,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":339,"author":{"gitId":"-"},"content":""},{"lineNumber":340,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":345,"author":{"gitId":"-"},"content":""},{"lineNumber":346,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +"},{"lineNumber":347,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +"},{"lineNumber":348,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +"},{"lineNumber":349,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +"},{"lineNumber":350,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +"},{"lineNumber":351,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +"},{"lineNumber":352,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo."},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"-"},"content":"---"},{"lineNumber":355,"author":{"gitId":"-"},"content":""},{"lineNumber":356,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +"},{"lineNumber":357,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +"},{"lineNumber":358,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +"},{"lineNumber":359,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +"},{"lineNumber":360,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +"},{"lineNumber":361,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +"},{"lineNumber":362,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct."},{"lineNumber":363,"author":{"gitId":"-"},"content":""},{"lineNumber":364,"author":{"gitId":"-"},"content":"---"},{"lineNumber":365,"author":{"gitId":"-"},"content":""},{"lineNumber":366,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +"},{"lineNumber":367,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +"},{"lineNumber":368,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +"},{"lineNumber":369,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +"},{"lineNumber":370,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +"},{"lineNumber":371,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +"},{"lineNumber":372,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +"},{"lineNumber":373,"author":{"gitId":"-"},"content":""},{"lineNumber":374,"author":{"gitId":"-"},"content":"---"},{"lineNumber":375,"author":{"gitId":"-"},"content":""},{"lineNumber":376,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +"},{"lineNumber":377,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +"},{"lineNumber":378,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +"},{"lineNumber":379,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +"},{"lineNumber":380,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +"},{"lineNumber":381,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +"},{"lineNumber":382,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +"},{"lineNumber":383,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the add, delete, list, select, and edit commands."},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Instead of making a new Logic object for each new command, polymorphism is used to implement the \"Task\" version of each command."},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"An example of using polymorphism to handle Person vs Task addition:"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":"public class AddCommand extends Command {"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyPerson person) {"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Person(person);"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_PERSON;"},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Task(task);"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_TASK;"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"The AddCommand will thus call a different constructor depending on the type of the argument supplied to it. To facilitate this, the respective Parser class must also be modified:"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(toAdd);"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The AddCommandParser checks the args to see if this is a task, then creates the object to be added, and creates a new AddCommand to handle the result. +"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"To support the addition of Task objects, the Storage component is modified to accept Task objects in a similar manner as to how Person objects are being stored."},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"[source, html]"},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e"},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e"},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e"},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e"},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"Tasks objects are stored in the same level of hierarchy as Person objects, and during startup, are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book."},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Create new classes for all new commands +"},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"**Pros:** Simpler to implement. +"},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure."},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +"},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa."},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage."},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +"},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes."},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":470,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":471,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":472,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` method in UniquePersonList. It supports"},{"lineNumber":473,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field."},{"lineNumber":474,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":475,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator."},{"lineNumber":476,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":477,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`"},{"lineNumber":478,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class."},{"lineNumber":479,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":480,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for this sort command implementation is shown below:"},{"lineNumber":481,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":482,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandDiagram.png[width\u003d\"800\"]"},{"lineNumber":483,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":484,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort name desc`. The following sequence diagram"},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works."},{"lineNumber":486,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":487,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]"},{"lineNumber":488,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":489,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted. The resulting list"},{"lineNumber":490,"author":{"gitId":"charlesgoh"},"content":"is not returned, but will be reflected in the application\u0027s storage and graphical user interface."},{"lineNumber":491,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":492,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":494,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +"},{"lineNumber":495,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` class. +"},{"lineNumber":496,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the person lists. Future changes to the implementation will be easier as a consequence. +"},{"lineNumber":497,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +"},{"lineNumber":498,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +"},{"lineNumber":499,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +"},{"lineNumber":500,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList` will have to rely on the `SortCommand` class."},{"lineNumber":501,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":502,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":503,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":504,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +"},{"lineNumber":505,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +"},{"lineNumber":506,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for both user and developer and reduced complexity in implementation. +"},{"lineNumber":507,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +"},{"lineNumber":508,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +"},{"lineNumber":509,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +"},{"lineNumber":510,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system."},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":513,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":514,"author":{"gitId":"charlesgoh"},"content":"The backup command makes use of both the model manager and the storage manager. The `LogicManager` class was"},{"lineNumber":515,"author":{"gitId":"charlesgoh"},"content":"improved to support the accessing of storage value."},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":517,"author":{"gitId":"charlesgoh"},"content":"The backup command arguments are parsed through the `BackupCommandParser`, which passes control over to the"},{"lineNumber":518,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class. If there is a file path specified by the user, then the `execute()` command within the"},{"lineNumber":519,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class will save the backup file to that path. If not file path is specified, the backup file will be"},{"lineNumber":520,"author":{"gitId":"charlesgoh"},"content":"saved to a default location."},{"lineNumber":521,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":522,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup`. The backup file will be saved to a default location:"},{"lineNumber":523,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDefaultDiagram.png[width\u003d\"800\"]"},{"lineNumber":525,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":526,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup testBackup.xml`. The following sequence diagram"},{"lineNumber":527,"author":{"gitId":"charlesgoh"},"content":"demonstrates how this works:"},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":529,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceCustomDiagram.png[width\u003d\"800]"},{"lineNumber":530,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":531,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted."},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":534,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":535,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +"},{"lineNumber":536,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement backup command via Command Line Interface +"},{"lineNumber":537,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Backing up data is easier and faster for users who are familiar with the commands. Less button clicks. +"},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":"**Cons:** UI not as intuitive. Users who are not familiar with the application may not know about this feature +"},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement backup command via GUI +"},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for all users since the options are all graphical +"},{"lineNumber":541,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hinders productivity. Excessive number of clicks to accomplish an essential task."},{"lineNumber":542,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":544,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":545,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Custom and/or Default file paths for backup file +"},{"lineNumber":546,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implemented both types of commands +"},{"lineNumber":547,"author":{"gitId":"charlesgoh"},"content":"**Pros:** User can choose either command option. Gives the user more choices +"},{"lineNumber":548,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May seem confusing to the user at first +"},{"lineNumber":549,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement only the default option (save backup file to data directory of application) +"},{"lineNumber":550,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Faster for the user to key in one word rather than a command with many words +"},{"lineNumber":551,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Reduces choice for experienced users who may want to save to another location or use a different save name"},{"lineNumber":552,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":553,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields"},{"lineNumber":554,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":555,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email` and `Address` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not."},{"lineNumber":556,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":557,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +"},{"lineNumber":558,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +"},{"lineNumber":559,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +"},{"lineNumber":560,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":561,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes."},{"lineNumber":562,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field."},{"lineNumber":563,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor."},{"lineNumber":564,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`."},{"lineNumber":565,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":566,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":567,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : Sequence Diagram for adding a Person with private fields_"},{"lineNumber":568,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":569,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +"},{"lineNumber":570,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:"},{"lineNumber":571,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":572,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":573,"author":{"gitId":"jeffreygohkw"},"content":"@Override"},{"lineNumber":574,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {"},{"lineNumber":575,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":576,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":577,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":578,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;"},{"lineNumber":579,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":580,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":581,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":582,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI."},{"lineNumber":583,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":584,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name."},{"lineNumber":585,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":586,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`."},{"lineNumber":587,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":588,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`."},{"lineNumber":589,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following"},{"lineNumber":590,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":591,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format"},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]"},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e"},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e"},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e"},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e"},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e"},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e"},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e"},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e"},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e"},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e"},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e"},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same."},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +"},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was."},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":625,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`."},{"lineNumber":626,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true."},{"lineNumber":627,"author":{"gitId":"-"},"content":""},{"lineNumber":628,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false."},{"lineNumber":629,"author":{"gitId":"-"},"content":""},{"lineNumber":630,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object."},{"lineNumber":631,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":632,"author":{"gitId":"-"},"content":"----"},{"lineNumber":633,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":634,"author":{"gitId":"-"},"content":" Name updatedName;"},{"lineNumber":635,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {"},{"lineNumber":636,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":637,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":638,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":639,"author":{"gitId":"-"},"content":" }"},{"lineNumber":640,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":641,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":642,"author":{"gitId":"-"},"content":" }"},{"lineNumber":643,"author":{"gitId":"-"},"content":" return updatedName;"},{"lineNumber":644,"author":{"gitId":"-"},"content":" }"},{"lineNumber":645,"author":{"gitId":"-"},"content":"----"},{"lineNumber":646,"author":{"gitId":"-"},"content":""},{"lineNumber":647,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing."},{"lineNumber":648,"author":{"gitId":"-"},"content":""},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":650,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":651,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +"},{"lineNumber":652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +"},{"lineNumber":653,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +"},{"lineNumber":654,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +"},{"lineNumber":655,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +"},{"lineNumber":656,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +"},{"lineNumber":657,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to."},{"lineNumber":658,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":659,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":660,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +"},{"lineNumber":661,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +"},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +"},{"lineNumber":663,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +"},{"lineNumber":664,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +"},{"lineNumber":665,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +"},{"lineNumber":666,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users."},{"lineNumber":667,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy"},{"lineNumber":669,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":670,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`."},{"lineNumber":671,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below."},{"lineNumber":673,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":675,"author":{"gitId":"-"},"content":"_Figure 3.6.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_"},{"lineNumber":676,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object."},{"lineNumber":678,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":679,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`."},{"lineNumber":680,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`"},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":683,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`."},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`."},{"lineNumber":685,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`."},{"lineNumber":687,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":688,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":689,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`."},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all."},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":694,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +"},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +"},{"lineNumber":696,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +"},{"lineNumber":697,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +"},{"lineNumber":698,"author":{"gitId":"-"},"content":"**Alternative 2:** Enhance the functi-onality of EditCommand. +"},{"lineNumber":699,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +"},{"lineNumber":700,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data."},{"lineNumber":701,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps"},{"lineNumber":703,"author":{"gitId":"-"},"content":""},{"lineNumber":704,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +"},{"lineNumber":705,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:"},{"lineNumber":706,"author":{"gitId":"-"},"content":""},{"lineNumber":707,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":708,"author":{"gitId":"-"},"content":"----"},{"lineNumber":709,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":710,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":711,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":712,"author":{"gitId":"-"},"content":" return new LocateCommand(index);"},{"lineNumber":713,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":714,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":715,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":716,"author":{"gitId":"-"},"content":" }"},{"lineNumber":717,"author":{"gitId":"-"},"content":" }"},{"lineNumber":718,"author":{"gitId":"-"},"content":"----"},{"lineNumber":719,"author":{"gitId":"-"},"content":""},{"lineNumber":720,"author":{"gitId":"-"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of `Person`s, a `CommandException` will be thrown."},{"lineNumber":721,"author":{"gitId":"-"},"content":""},{"lineNumber":722,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution."},{"lineNumber":723,"author":{"gitId":"-"},"content":""},{"lineNumber":724,"author":{"gitId":"-"},"content":"This code for this can be found below:"},{"lineNumber":725,"author":{"gitId":"-"},"content":""},{"lineNumber":726,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":727,"author":{"gitId":"-"},"content":"----"},{"lineNumber":728,"author":{"gitId":"-"},"content":"@Override"},{"lineNumber":729,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":730,"author":{"gitId":"-"},"content":""},{"lineNumber":731,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":732,"author":{"gitId":"-"},"content":""},{"lineNumber":733,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":734,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":735,"author":{"gitId":"-"},"content":" }"},{"lineNumber":736,"author":{"gitId":"-"},"content":""},{"lineNumber":737,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":738,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":739,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":740,"author":{"gitId":"-"},"content":""},{"lineNumber":741,"author":{"gitId":"-"},"content":" }"},{"lineNumber":742,"author":{"gitId":"-"},"content":"----"},{"lineNumber":743,"author":{"gitId":"-"},"content":""},{"lineNumber":744,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:"},{"lineNumber":745,"author":{"gitId":"-"},"content":""},{"lineNumber":746,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":747,"author":{"gitId":"-"},"content":"----"},{"lineNumber":748,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":749,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":750,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":751,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":752,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":753,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":754,"author":{"gitId":"-"},"content":" }"},{"lineNumber":755,"author":{"gitId":"-"},"content":" }"},{"lineNumber":756,"author":{"gitId":"-"},"content":"----"},{"lineNumber":757,"author":{"gitId":"-"},"content":""},{"lineNumber":758,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:"},{"lineNumber":759,"author":{"gitId":"-"},"content":""},{"lineNumber":760,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":761,"author":{"gitId":"-"},"content":"_Figure 3.7.1 : Sequence Diagram for Locating a Person\u0027s Address_"},{"lineNumber":762,"author":{"gitId":"-"},"content":""},{"lineNumber":763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":764,"author":{"gitId":"-"},"content":""},{"lineNumber":765,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +"},{"lineNumber":766,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Create a seperate command `locate`. +"},{"lineNumber":767,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +"},{"lineNumber":768,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +"},{"lineNumber":769,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +"},{"lineNumber":770,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +"},{"lineNumber":771,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users."},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":773,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism"},{"lineNumber":774,"author":{"gitId":"-"},"content":""},{"lineNumber":775,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete"},{"lineNumber":776,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`."},{"lineNumber":777,"author":{"gitId":"-"},"content":""},{"lineNumber":778,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`."},{"lineNumber":779,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once."},{"lineNumber":780,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`addtag 1 2 3 t/friends`) will be executed."},{"lineNumber":781,"author":{"gitId":"-"},"content":"The same operation will happen for `deletetag` command."},{"lineNumber":782,"author":{"gitId":"-"},"content":""},{"lineNumber":783,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works"},{"lineNumber":784,"author":{"gitId":"-"},"content":"in a similar way."},{"lineNumber":785,"author":{"gitId":"-"},"content":""},{"lineNumber":786,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:"},{"lineNumber":787,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":788,"author":{"gitId":"-"},"content":"----"},{"lineNumber":789,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":790,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book."},{"lineNumber":791,"author":{"gitId":"-"},"content":" */"},{"lineNumber":792,"author":{"gitId":"-"},"content":"public class AddTagCommand extends UndoableCommand {"},{"lineNumber":793,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":794,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":795,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":796,"author":{"gitId":"-"},"content":" */"},{"lineNumber":797,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":798,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":799,"author":{"gitId":"-"},"content":""},{"lineNumber":800,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":801,"author":{"gitId":"-"},"content":" // check whether the index within the range"},{"lineNumber":802,"author":{"gitId":"-"},"content":" }"},{"lineNumber":803,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":804,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag"},{"lineNumber":805,"author":{"gitId":"-"},"content":" }"},{"lineNumber":806,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag"},{"lineNumber":807,"author":{"gitId":"-"},"content":" return new CommandResult();"},{"lineNumber":808,"author":{"gitId":"-"},"content":" }"},{"lineNumber":809,"author":{"gitId":"-"},"content":"----"},{"lineNumber":810,"author":{"gitId":"-"},"content":""},{"lineNumber":811,"author":{"gitId":"-"},"content":"Suppose the user enter the `addtag 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:"},{"lineNumber":812,"author":{"gitId":"-"},"content":""},{"lineNumber":813,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":814,"author":{"gitId":"-"},"content":"_Figure 3.8.1 : Add Tag Sequence Diagram for Logic_ +"},{"lineNumber":815,"author":{"gitId":"-"},"content":"The `deletetag` command works the same as `addtag` command with different name only."},{"lineNumber":816,"author":{"gitId":"-"},"content":""},{"lineNumber":817,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":818,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +"},{"lineNumber":819,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +"},{"lineNumber":820,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception."},{"lineNumber":821,"author":{"gitId":"-"},"content":""},{"lineNumber":822,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":823,"author":{"gitId":"-"},"content":""},{"lineNumber":824,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `addtag` and `deletetag` +"},{"lineNumber":825,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +"},{"lineNumber":826,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +"},{"lineNumber":827,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+"},{"lineNumber":828,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +"},{"lineNumber":829,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +"},{"lineNumber":830,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list."},{"lineNumber":831,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle."},{"lineNumber":832,"author":{"gitId":"-"},"content":""},{"lineNumber":833,"author":{"gitId":"-"},"content":"---"},{"lineNumber":834,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +"},{"lineNumber":835,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `addtag` and `deletetag` +"},{"lineNumber":836,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +"},{"lineNumber":837,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +"},{"lineNumber":838,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +"},{"lineNumber":839,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +"},{"lineNumber":840,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner."},{"lineNumber":841,"author":{"gitId":"-"},"content":""},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism"},{"lineNumber":843,"author":{"gitId":"-"},"content":""},{"lineNumber":844,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book."},{"lineNumber":845,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`."},{"lineNumber":846,"author":{"gitId":"-"},"content":""},{"lineNumber":847,"author":{"gitId":"-"},"content":"The `findtag` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`."},{"lineNumber":848,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first."},{"lineNumber":849,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar."},{"lineNumber":850,"author":{"gitId":"-"},"content":""},{"lineNumber":851,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences."},{"lineNumber":852,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`."},{"lineNumber":853,"author":{"gitId":"-"},"content":""},{"lineNumber":854,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:"},{"lineNumber":855,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String."},{"lineNumber":856,"author":{"gitId":"-"},"content":""},{"lineNumber":857,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":858,"author":{"gitId":"-"},"content":"----"},{"lineNumber":859,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":860,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":861,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":862,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {"},{"lineNumber":863,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":864,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");"},{"lineNumber":865,"author":{"gitId":"-"},"content":" }"},{"lineNumber":866,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();"},{"lineNumber":867,"author":{"gitId":"-"},"content":" }"},{"lineNumber":868,"author":{"gitId":"-"},"content":"----"},{"lineNumber":869,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one"},{"lineNumber":870,"author":{"gitId":"-"},"content":"is for the tags to be excluded."},{"lineNumber":871,"author":{"gitId":"-"},"content":""},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":873,"author":{"gitId":"-"},"content":"----"},{"lineNumber":874,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":875,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":876,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":877,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":878,"author":{"gitId":"-"},"content":" */"},{"lineNumber":879,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":880,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {"},{"lineNumber":881,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {"},{"lineNumber":882,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);"},{"lineNumber":883,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":884,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));"},{"lineNumber":885,"author":{"gitId":"-"},"content":" }"},{"lineNumber":886,"author":{"gitId":"-"},"content":" }"},{"lineNumber":887,"author":{"gitId":"-"},"content":" }"},{"lineNumber":888,"author":{"gitId":"-"},"content":"----"},{"lineNumber":889,"author":{"gitId":"-"},"content":""},{"lineNumber":890,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +"},{"lineNumber":891,"author":{"gitId":"-"},"content":"Suppose the user enter `findtag friends` command. The following sequence diagram shows how the find tag command works:"},{"lineNumber":892,"author":{"gitId":"-"},"content":""},{"lineNumber":893,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":894,"author":{"gitId":"-"},"content":"_Figure 3.9.1 : Find Tag Sequence Diagram for Logic_ +"},{"lineNumber":895,"author":{"gitId":"-"},"content":""},{"lineNumber":896,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":897,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list."},{"lineNumber":898,"author":{"gitId":"-"},"content":""},{"lineNumber":899,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":900,"author":{"gitId":"-"},"content":""},{"lineNumber":901,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `findtag` +"},{"lineNumber":902,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `findtag` +"},{"lineNumber":903,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `findtag` command will be similar to the `find` command. +"},{"lineNumber":904,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +"},{"lineNumber":905,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `findtag` in `FindCommand`. +"},{"lineNumber":906,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +"},{"lineNumber":907,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle"},{"lineNumber":908,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things."},{"lineNumber":909,"author":{"gitId":"-"},"content":""},{"lineNumber":910,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging"},{"lineNumber":911,"author":{"gitId":"-"},"content":""},{"lineNumber":912,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations."},{"lineNumber":913,"author":{"gitId":"-"},"content":""},{"lineNumber":914,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])"},{"lineNumber":915,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level"},{"lineNumber":916,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file."},{"lineNumber":917,"author":{"gitId":"-"},"content":""},{"lineNumber":918,"author":{"gitId":"-"},"content":"*Logging Levels*"},{"lineNumber":919,"author":{"gitId":"-"},"content":""},{"lineNumber":920,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application"},{"lineNumber":921,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution"},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App"},{"lineNumber":923,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size"},{"lineNumber":924,"author":{"gitId":"-"},"content":""},{"lineNumber":925,"author":{"gitId":"-"},"content":""},{"lineNumber":926,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration"},{"lineNumber":927,"author":{"gitId":"-"},"content":""},{"lineNumber":928,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`)."},{"lineNumber":929,"author":{"gitId":"-"},"content":""},{"lineNumber":930,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation"},{"lineNumber":931,"author":{"gitId":"-"},"content":""},{"lineNumber":932,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation."},{"lineNumber":933,"author":{"gitId":"-"},"content":""},{"lineNumber":934,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":935,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting."},{"lineNumber":936,"author":{"gitId":"-"},"content":""},{"lineNumber":937,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation"},{"lineNumber":938,"author":{"gitId":"-"},"content":""},{"lineNumber":939,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits."},{"lineNumber":940,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time."},{"lineNumber":941,"author":{"gitId":"-"},"content":""},{"lineNumber":942,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation"},{"lineNumber":943,"author":{"gitId":"-"},"content":""},{"lineNumber":944,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis."},{"lineNumber":945,"author":{"gitId":"-"},"content":""},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format"},{"lineNumber":947,"author":{"gitId":"-"},"content":""},{"lineNumber":948,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages."},{"lineNumber":949,"author":{"gitId":"-"},"content":""},{"lineNumber":950,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format."},{"lineNumber":951,"author":{"gitId":"-"},"content":""},{"lineNumber":952,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format."},{"lineNumber":953,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`."},{"lineNumber":954,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu."},{"lineNumber":955,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below."},{"lineNumber":956,"author":{"gitId":"-"},"content":""},{"lineNumber":957,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]"},{"lineNumber":958,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_"},{"lineNumber":959,"author":{"gitId":"-"},"content":""},{"lineNumber":960,"author":{"gitId":"-"},"content":"\u003d\u003d Testing"},{"lineNumber":961,"author":{"gitId":"-"},"content":""},{"lineNumber":962,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests"},{"lineNumber":963,"author":{"gitId":"-"},"content":""},{"lineNumber":964,"author":{"gitId":"-"},"content":"There are three ways to run tests."},{"lineNumber":965,"author":{"gitId":"-"},"content":""},{"lineNumber":966,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":967,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies."},{"lineNumber":968,"author":{"gitId":"-"},"content":""},{"lineNumber":969,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*"},{"lineNumber":970,"author":{"gitId":"-"},"content":""},{"lineNumber":971,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`"},{"lineNumber":972,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`"},{"lineNumber":973,"author":{"gitId":"-"},"content":""},{"lineNumber":974,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*"},{"lineNumber":975,"author":{"gitId":"-"},"content":""},{"lineNumber":976,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)"},{"lineNumber":977,"author":{"gitId":"-"},"content":""},{"lineNumber":978,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":979,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle."},{"lineNumber":980,"author":{"gitId":"-"},"content":""},{"lineNumber":981,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*"},{"lineNumber":982,"author":{"gitId":"-"},"content":""},{"lineNumber":983,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running."},{"lineNumber":984,"author":{"gitId":"-"},"content":""},{"lineNumber":985,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)"},{"lineNumber":986,"author":{"gitId":"-"},"content":""},{"lineNumber":987,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests"},{"lineNumber":988,"author":{"gitId":"-"},"content":""},{"lineNumber":989,"author":{"gitId":"-"},"content":"We have two types of tests:"},{"lineNumber":990,"author":{"gitId":"-"},"content":""},{"lineNumber":991,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,"},{"lineNumber":992,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package."},{"lineNumber":993,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package."},{"lineNumber":994,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,"},{"lineNumber":995,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +"},{"lineNumber":996,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`"},{"lineNumber":997,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +"},{"lineNumber":998,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`"},{"lineNumber":999,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`"},{"lineNumber":1001,"author":{"gitId":"-"},"content":""},{"lineNumber":1002,"author":{"gitId":"-"},"content":""},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing"},{"lineNumber":1004,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**"},{"lineNumber":1005,"author":{"gitId":"-"},"content":""},{"lineNumber":1006,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing."},{"lineNumber":1007,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`."},{"lineNumber":1008,"author":{"gitId":"-"},"content":""},{"lineNumber":1009,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops"},{"lineNumber":1010,"author":{"gitId":"-"},"content":""},{"lineNumber":1011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation"},{"lineNumber":1012,"author":{"gitId":"-"},"content":""},{"lineNumber":1013,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation."},{"lineNumber":1014,"author":{"gitId":"-"},"content":""},{"lineNumber":1015,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration"},{"lineNumber":1016,"author":{"gitId":"-"},"content":""},{"lineNumber":1017,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details."},{"lineNumber":1018,"author":{"gitId":"-"},"content":""},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release"},{"lineNumber":1020,"author":{"gitId":"-"},"content":""},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Here are the steps to create a new release."},{"lineNumber":1022,"author":{"gitId":"-"},"content":""},{"lineNumber":1023,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]."},{"lineNumber":1024,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e."},{"lineNumber":1025,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`"},{"lineNumber":1026,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created."},{"lineNumber":1027,"author":{"gitId":"-"},"content":""},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies"},{"lineNumber":1029,"author":{"gitId":"-"},"content":""},{"lineNumber":1030,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +"},{"lineNumber":1031,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +"},{"lineNumber":1032,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)"},{"lineNumber":1033,"author":{"gitId":"-"},"content":""},{"lineNumber":1034,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1035,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories"},{"lineNumber":1036,"author":{"gitId":"-"},"content":""},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`"},{"lineNumber":1038,"author":{"gitId":"-"},"content":""},{"lineNumber":1039,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]"},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can..."},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App"},{"lineNumber":1043,"author":{"gitId":"-"},"content":""},{"lineNumber":1044,"author":{"gitId":"-"},"content":"|`* * *` |user |add a new person |"},{"lineNumber":1045,"author":{"gitId":"-"},"content":""},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need"},{"lineNumber":1047,"author":{"gitId":"-"},"content":""},{"lineNumber":1048,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts"},{"lineNumber":1049,"author":{"gitId":"-"},"content":""},{"lineNumber":1050,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added"},{"lineNumber":1051,"author":{"gitId":"-"},"content":""},{"lineNumber":1052,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made"},{"lineNumber":1053,"author":{"gitId":"-"},"content":""},{"lineNumber":1054,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values"},{"lineNumber":1055,"author":{"gitId":"-"},"content":""},{"lineNumber":1056,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident"},{"lineNumber":1057,"author":{"gitId":"-"},"content":""},{"lineNumber":1058,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location"},{"lineNumber":1059,"author":{"gitId":"-"},"content":""},{"lineNumber":1060,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs"},{"lineNumber":1061,"author":{"gitId":"-"},"content":""},{"lineNumber":1062,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity"},{"lineNumber":1063,"author":{"gitId":"-"},"content":""},{"lineNumber":1064,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |first-time user |be able to see a user guide when I first start the program |be clear on how to use it"},{"lineNumber":1065,"author":{"gitId":"-"},"content":""},{"lineNumber":1066,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better"},{"lineNumber":1067,"author":{"gitId":"-"},"content":""},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me"},{"lineNumber":1069,"author":{"gitId":"-"},"content":""},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts"},{"lineNumber":1071,"author":{"gitId":"-"},"content":""},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms"},{"lineNumber":1073,"author":{"gitId":"-"},"content":""},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with many social media accounts |be able to add my contacts\u0027 social media accounts to the address book |improve connectivity and learn more about my contacts"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others"},{"lineNumber":1077,"author":{"gitId":"-"},"content":""},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|`*` |user with many persons in the address book |sort persons by name |locate a person easily"},{"lineNumber":1079,"author":{"gitId":"-"},"content":""},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly"},{"lineNumber":1081,"author":{"gitId":"-"},"content":""},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like"},{"lineNumber":1083,"author":{"gitId":"-"},"content":""},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts"},{"lineNumber":1085,"author":{"gitId":"-"},"content":""},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently"},{"lineNumber":1087,"author":{"gitId":"-"},"content":""},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |non tech-savvy user |have the option to fill out certain fields |use the address book without having to use the intimidating CLI."},{"lineNumber":1089,"author":{"gitId":"-"},"content":""},{"lineNumber":1090,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |error-prone user |have minor typos auto corrected |continue using the address book without correcting my mistakes"},{"lineNumber":1091,"author":{"gitId":"-"},"content":""},{"lineNumber":1092,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features"},{"lineNumber":1093,"author":{"gitId":"-"},"content":""},{"lineNumber":1094,"author":{"gitId":"-"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1096,"author":{"gitId":"-"},"content":""},{"lineNumber":1097,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1098,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases"},{"lineNumber":1099,"author":{"gitId":"-"},"content":""},{"lineNumber":1100,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)"},{"lineNumber":1101,"author":{"gitId":"-"},"content":""},{"lineNumber":1102,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person"},{"lineNumber":1104,"author":{"gitId":"-"},"content":""},{"lineNumber":1105,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1106,"author":{"gitId":"-"},"content":""},{"lineNumber":1107,"author":{"gitId":"-"},"content":"1. User requests to list persons"},{"lineNumber":1108,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1109,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list"},{"lineNumber":1110,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person"},{"lineNumber":1111,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1112,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1113,"author":{"gitId":"-"},"content":""},{"lineNumber":1114,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1115,"author":{"gitId":"-"},"content":""},{"lineNumber":1116,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1117,"author":{"gitId":"-"},"content":"* 2a. The list is empty."},{"lineNumber":1118,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1119,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1120,"author":{"gitId":"-"},"content":""},{"lineNumber":1121,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid."},{"lineNumber":1122,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1123,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1124,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1125,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1126,"author":{"gitId":"-"},"content":"Use case resumes at step 2."},{"lineNumber":1127,"author":{"gitId":"-"},"content":""},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person"},{"lineNumber":1130,"author":{"gitId":"-"},"content":""},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1132,"author":{"gitId":"-"},"content":""},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria"},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria"},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1136,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1137,"author":{"gitId":"-"},"content":""},{"lineNumber":1138,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1139,"author":{"gitId":"-"},"content":""},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1144,"author":{"gitId":"-"},"content":""},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found."},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1147,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1148,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found."},{"lineNumber":1149,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1150,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1151,"author":{"gitId":"-"},"content":""},{"lineNumber":1152,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person"},{"lineNumber":1154,"author":{"gitId":"-"},"content":""},{"lineNumber":1155,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1156,"author":{"gitId":"-"},"content":""},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons"},{"lineNumber":1158,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1159,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list"},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person."},{"lineNumber":1161,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person."},{"lineNumber":1162,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1163,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1164,"author":{"gitId":"-"},"content":""},{"lineNumber":1165,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1166,"author":{"gitId":"-"},"content":""},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1171,"author":{"gitId":"-"},"content":""},{"lineNumber":1172,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid."},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1174,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1175,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1178,"author":{"gitId":"-"},"content":""},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid."},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1181,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1182,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message."},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1184,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1185,"author":{"gitId":"-"},"content":""},{"lineNumber":1186,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail."},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1188,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made."},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1191,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1192,"author":{"gitId":"-"},"content":""},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps"},{"lineNumber":1195,"author":{"gitId":"-"},"content":""},{"lineNumber":1196,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1197,"author":{"gitId":"-"},"content":""},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps"},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo"},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone."},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1204,"author":{"gitId":"-"},"content":""},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1206,"author":{"gitId":"-"},"content":""},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands."},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1210,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands."},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3."},{"lineNumber":1214,"author":{"gitId":"-"},"content":""},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands."},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands."},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3"},{"lineNumber":1222,"author":{"gitId":"-"},"content":""},{"lineNumber":1223,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort"},{"lineNumber":1225,"author":{"gitId":"-"},"content":""},{"lineNumber":1226,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1227,"author":{"gitId":"-"},"content":""},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria"},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria"},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message."},{"lineNumber":1231,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1232,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1233,"author":{"gitId":"-"},"content":""},{"lineNumber":1234,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1235,"author":{"gitId":"-"},"content":""},{"lineNumber":1236,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1237,"author":{"gitId":"-"},"content":"* 2a. The list is empty."},{"lineNumber":1238,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1239,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1240,"author":{"gitId":"-"},"content":""},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid."},{"lineNumber":1242,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1243,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message."},{"lineNumber":1245,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1."},{"lineNumber":1247,"author":{"gitId":"-"},"content":""},{"lineNumber":1248,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1249,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements"},{"lineNumber":1250,"author":{"gitId":"-"},"content":""},{"lineNumber":1251,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed."},{"lineNumber":1252,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage."},{"lineNumber":1253,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse."},{"lineNumber":1254,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure."},{"lineNumber":1255,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse."},{"lineNumber":1256,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0."},{"lineNumber":1257,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing."},{"lineNumber":1258,"author":{"gitId":"-"},"content":""},{"lineNumber":1259,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1260,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary"},{"lineNumber":1261,"author":{"gitId":"-"},"content":""},{"lineNumber":1262,"author":{"gitId":"-"},"content":"[[mainstream-os]]"},{"lineNumber":1263,"author":{"gitId":"-"},"content":"Mainstream OS"},{"lineNumber":1264,"author":{"gitId":"-"},"content":""},{"lineNumber":1265,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1266,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X"},{"lineNumber":1267,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1268,"author":{"gitId":"-"},"content":""},{"lineNumber":1269,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]"},{"lineNumber":1270,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible"},{"lineNumber":1271,"author":{"gitId":"-"},"content":""},{"lineNumber":1272,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1273,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data."},{"lineNumber":1274,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1275,"author":{"gitId":"-"},"content":""},{"lineNumber":1276,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1277,"author":{"gitId":"-"},"content":"\u003d\u003d Product Survey"},{"lineNumber":1278,"author":{"gitId":"-"},"content":""},{"lineNumber":1279,"author":{"gitId":"-"},"content":"*Product Name*"},{"lineNumber":1280,"author":{"gitId":"-"},"content":""},{"lineNumber":1281,"author":{"gitId":"-"},"content":"Author: ..."},{"lineNumber":1282,"author":{"gitId":"-"},"content":""},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Pros:"},{"lineNumber":1284,"author":{"gitId":"-"},"content":""},{"lineNumber":1285,"author":{"gitId":"-"},"content":"* ..."},{"lineNumber":1286,"author":{"gitId":"-"},"content":"* ..."},{"lineNumber":1287,"author":{"gitId":"-"},"content":""},{"lineNumber":1288,"author":{"gitId":"-"},"content":"Cons:"},{"lineNumber":1289,"author":{"gitId":"-"},"content":""},{"lineNumber":1290,"author":{"gitId":"-"},"content":"* ..."},{"lineNumber":1291,"author":{"gitId":"-"},"content":"* ..."}],"authorContributionMap":{"charlesgoh":130,"jeffreygohkw":140,"Esilocke":169,"-":852}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:"},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT`"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Overview"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"Address++ is an address book application that can store contacts, as well as maintain a list of ongoing tasks. You can use the various commands in Address++ to maintain, create, and delete your contacts, or tasks. +"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"Address++ is targeted at NUS students, such as those working on projects or assignments."},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer."},{"lineNumber":30,"author":{"gitId":"-"},"content":"+"},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":34,"author":{"gitId":"-"},"content":"+"},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here]."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++."},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds."},{"lineNumber":38,"author":{"gitId":"-"},"content":"+"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]"},{"lineNumber":40,"author":{"gitId":"-"},"content":"+"},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +"},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window."},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window"},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++."},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list"},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`."},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`."},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc."},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable."},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too large?"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"You can change the font sizes by clicking on the Font Size button and selecting any of the following options:"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"Keyboard shortcuts have been provided for your convenience."},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"There is a limit to how much your font sizes can increase or decrease. Also, font sizes will increase for the"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"contacts entries and the todo list\u0027s entries."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"Format: `help` +"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1]."},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a person/task: `add`"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book, be it a newly met project member, or your friend who is taking the same module as you. +"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"`add` can be replaced by `a` for faster input. +"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] r/[REMARK] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address` or `Remark` to be private by placing a `p` in front of the prefix. +"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears`"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"* `add n/Betsy Crowe t/friend e/betsycrowe@example.com b/29-02-1996 a/Newgate Prison p/1234567 t/criminal r/Stares at the wall`"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"* `add n/Ima Hidearu b/ a/ e/ p/ r/ t/secretive`"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"* `add n/Luke Groundswimmer p/ a/ e/ c/`"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"* `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate c/`"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"By adding the word `task`, you can use the same command to add a new task or deadline, such as a reminder of project deadlines. +"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"Format: `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"* Task deadlines should be in the format DD-MM-YYYY +"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 1 to 5 inclusive, with 5 being the highest priority +"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default."},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"* `add task n/Update documentation d/Update docs for V1.1 for CS2103T t/10-10-2017 p/4`"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"* `add task n/Buy new pencil p/2`"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a tag to persons : `addtag` (Since V1.2)"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":"You can use the `addtag` command to add tag for multiple persons in the address book. For example, you may wish to add tag `friends` to the first two persons in the address book. +"},{"lineNumber":130,"author":{"gitId":"-"},"content":"`addtag` can be replaced by `atag` for faster input. +"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"Format: `addtag INDEX... t/[TAG]` +"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":"****"},{"lineNumber":135,"author":{"gitId":"-"},"content":"* You can add the tag of the person at the specific `INDEX`."},{"lineNumber":136,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":137,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":138,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, addtag will add the tag to all contacts in the address book."},{"lineNumber":139,"author":{"gitId":"-"},"content":"****"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":144,"author":{"gitId":"-"},"content":"`addtag 1 2 t/friends` +"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"Adds the friends tag of the 1st and 2nd person in the address book."},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"`addtag t/acquaintance` +"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Adds the acquaintance tag to all contacts in the address book."},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all persons : `list`"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts, or tasks, in the address book. +"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"Format: `list` +"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"Instead of typing out `list` every time, you can alternatively use `l` to shorten the command."},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing a person : `edit`"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":"****"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command."},{"lineNumber":167,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values."},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands."},{"lineNumber":169,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it."},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command."},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message."},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields."},{"lineNumber":173,"author":{"gitId":"-"},"content":"****"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com` +"},{"lineNumber":178,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively."},{"lineNumber":179,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/` +"},{"lineNumber":180,"author":{"gitId":"-"},"content":"Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags."},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"* `edit 1 p/` +"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Removes the phone number of the 1st person."},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `edit` will allow you to edit task details instead. You may wish to edit your task deadlines, for example, when your project schedule changes, or your task priorities, when a task becomes more urgent. +"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"Format: `edit task INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY]` +"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided."},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values."},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/5` +"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"Edits the priority of the 2nd task to be `5`."},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/ t/` +"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"Removes the priority and deadline of the second task."},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edittag` (Since v1.2)"},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"You can use `edittag` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"`edittag` can be replaced by `et` for faster input. +"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"Format: `edittag TAGTOBERENAMED NEWTAGNAME` +"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":"****"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different."},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `TAGTOBERENAMED` value."},{"lineNumber":210,"author":{"gitId":"-"},"content":"****"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"* `edittag friends enemies` +"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"Changes the tag called `friends` to one called `enemies` instead. All existing contacts with a `friends` tag will now have an `enemies` tag instead."},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS]`"},{"lineNumber":221,"author":{"gitId":"-"},"content":"Shorthand commands: `cp`"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields."},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix."},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI."},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI."},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy."},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting."},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"Examples:"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"* `changeprivacy 1 p/false e/true` +"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Sets the phone number of the 1st person to be public and their email address to be private. The 1st person\u0027s phone number will be displayed, if available, while their email address will be hidden in the UI."},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":"* `cp 2 a/false n/true e/false` +"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":"Sets the address and email of the 2nd person to be public and their name to be private. The 2nd person\u0027s address and email will be displayed, if available, while their name will be hidden in the UI."},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":""},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)"},{"lineNumber":242,"author":{"gitId":"-"},"content":""},{"lineNumber":243,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite persons. For example, you may wish to set your girlfriend as your favourite contact. +"},{"lineNumber":244,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +"},{"lineNumber":245,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +"},{"lineNumber":246,"author":{"gitId":"-"},"content":""},{"lineNumber":247,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":248,"author":{"gitId":"-"},"content":""},{"lineNumber":249,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":250,"author":{"gitId":"-"},"content":"`favourite 2` +"},{"lineNumber":251,"author":{"gitId":"-"},"content":"Favourites the 2nd person in the address book."},{"lineNumber":252,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":253,"author":{"gitId":"-"},"content":"`favourite 1` +"},{"lineNumber":254,"author":{"gitId":"-"},"content":"Favourite the 1st person in the results of the `find` command."},{"lineNumber":255,"author":{"gitId":"-"},"content":""},{"lineNumber":256,"author":{"gitId":"-"},"content":"****"},{"lineNumber":257,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`."},{"lineNumber":258,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":259,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":260,"author":{"gitId":"-"},"content":"****"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)"},{"lineNumber":263,"author":{"gitId":"-"},"content":""},{"lineNumber":264,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +"},{"lineNumber":265,"author":{"gitId":"-"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +"},{"lineNumber":266,"author":{"gitId":"-"},"content":"Format: `showfavourite` +"},{"lineNumber":267,"author":{"gitId":"-"},"content":""},{"lineNumber":268,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":270,"author":{"gitId":"-"},"content":"`showfavourite` command: It will return an empty list if there is no favourite persons."},{"lineNumber":271,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":272,"author":{"gitId":"-"},"content":""},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":"* `find John` +"},{"lineNumber":282,"author":{"gitId":"-"},"content":"Returns `john` and `John Doe`"},{"lineNumber":283,"author":{"gitId":"-"},"content":"* `find Betsy Tim John` +"},{"lineNumber":284,"author":{"gitId":"-"},"content":"Returns any person having names `Betsy`, `Tim`, or `John`"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `find` will allow you to sieve through your tasks, instead of your contacts. +"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"In addition to searching the name and description of tasks, you can also opt to filter your tasks by their priority. Simply include `p/PRIORITY` after all your other criteria to do so. +"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"All tasks with a priority higher than or equal to the value provided will be shown. +"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"Format: `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` (Priority search to be coming in v2.0) +"},{"lineNumber":290,"author":{"gitId":"-"},"content":""},{"lineNumber":291,"author":{"gitId":"-"},"content":"****"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"*Important note on `find` criteria*"},{"lineNumber":293,"author":{"gitId":"-"},"content":""},{"lineNumber":294,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`"},{"lineNumber":295,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`"},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"* You can only search for names in Address++"},{"lineNumber":297,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`"},{"lineNumber":298,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`"},{"lineNumber":299,"author":{"gitId":"-"},"content":"****"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"Returns any task that has the word `update` in their names or descriptions"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* `find task update 4` +"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"Returns all tasks that has the word `update` in their names or descriptions"},{"lineNumber":307,"author":{"gitId":"-"},"content":""},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `findtag` (Since V1.4)"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":"You can use the `findtag` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +"},{"lineNumber":311,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/not` in front of the `friends`. +"},{"lineNumber":312,"author":{"gitId":"-"},"content":"`findtag` can be replaced by `ftag` for faster input. +"},{"lineNumber":313,"author":{"gitId":"-"},"content":"Format: `findtag KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":314,"author":{"gitId":"-"},"content":""},{"lineNumber":315,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":"* `findtag friends` +"},{"lineNumber":318,"author":{"gitId":"-"},"content":"Returns any persons having tag `friends`"},{"lineNumber":319,"author":{"gitId":"-"},"content":"* `findtag friends colleagues` +"},{"lineNumber":320,"author":{"gitId":"-"},"content":"Returns any person having tags `friends` or `colleagues`"},{"lineNumber":321,"author":{"gitId":"-"},"content":"* `findtag /notfriends` +"},{"lineNumber":322,"author":{"gitId":"-"},"content":"Returns any persons not have tag `friends`"},{"lineNumber":323,"author":{"gitId":"-"},"content":"* `findtag classmates /notfriends` +"},{"lineNumber":324,"author":{"gitId":"-"},"content":"Returns any person have tags `classmates` but not have tag `friends`"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":"****"},{"lineNumber":327,"author":{"gitId":"-"},"content":"*Important note on `findtag` criteria"},{"lineNumber":328,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`"},{"lineNumber":329,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`"},{"lineNumber":330,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons."},{"lineNumber":331,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `friend` will not match `friends`"},{"lineNumber":332,"author":{"gitId":"-"},"content":"* There is no space `/not` and tag name e.g. `/not friends` will not match `/notfriends`"},{"lineNumber":333,"author":{"gitId":"-"},"content":"****"},{"lineNumber":334,"author":{"gitId":"-"},"content":""},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`"},{"lineNumber":336,"author":{"gitId":"-"},"content":""},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts or tasks from the address book. The `delete` command will help you clean up obsolete or completed tasks, or contacts who you may not wish to associate with anymore. +"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +"},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +"},{"lineNumber":340,"author":{"gitId":"-"},"content":""},{"lineNumber":341,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":342,"author":{"gitId":"-"},"content":""},{"lineNumber":343,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":344,"author":{"gitId":"-"},"content":"`delete 2` +"},{"lineNumber":345,"author":{"gitId":"-"},"content":"Deletes the 2nd person in the address book."},{"lineNumber":346,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":347,"author":{"gitId":"-"},"content":"`delete 1` +"},{"lineNumber":348,"author":{"gitId":"-"},"content":"Deletes the 1st person in the results of the `find` command."},{"lineNumber":349,"author":{"gitId":"-"},"content":""},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"In order to delete tasks, an additional `task` keyword must be specified after the `delete` command. +"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Format: `delete task INDEX`+"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"* Deletes the person or task at the specified `INDEX`."},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"`delete task 2` +"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Deletes the 2nd task in the address book."},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"`delete task 1` +"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"Deletes the 1st task in the results of the `find task` command."},{"lineNumber":367,"author":{"gitId":"-"},"content":""},{"lineNumber":368,"author":{"gitId":"-"},"content":""},{"lineNumber":369,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `deletetag` (Since V1.2)"},{"lineNumber":370,"author":{"gitId":"-"},"content":""},{"lineNumber":371,"author":{"gitId":"-"},"content":"You can use `deletetag` to delete the tag of multiple persons from the address book. +"},{"lineNumber":372,"author":{"gitId":"-"},"content":"`deletetag` can be replaced by `dtag` for faster input. +"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"Format: `deletetag INDEX... t/[TAG]` +"},{"lineNumber":374,"author":{"gitId":"-"},"content":""},{"lineNumber":375,"author":{"gitId":"-"},"content":""},{"lineNumber":376,"author":{"gitId":"-"},"content":"****"},{"lineNumber":377,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`."},{"lineNumber":378,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":379,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":380,"author":{"gitId":"-"},"content":"* If you do not key in any index, deletetag will delete the tag from all contacts in the address book."},{"lineNumber":381,"author":{"gitId":"-"},"content":"****"},{"lineNumber":382,"author":{"gitId":"-"},"content":""},{"lineNumber":383,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":386,"author":{"gitId":"-"},"content":"`deletetag 1 2 t/friends` +"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag of the 1st and 2nd person in the address book."},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"`deletetag t/friends` +"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag from all contacts in the address book."},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sorting your contact list : `sort`"},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts by any field in ascending or descending order using the `sort` command +"},{"lineNumber":395,"author":{"gitId":"-"},"content":"`sort` can be replaced by `so` for faster input. +"},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":"Format: `sort FIELD ORDER` +"},{"lineNumber":397,"author":{"gitId":"-"},"content":""},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":400,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":401,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contact by any field in either ascending or descending order"},{"lineNumber":402,"author":{"gitId":"jeffreygohkw"},"content":"* Field parameters are limited to the following fields: NAME, PHONE, EMAIL, ADDRESS."},{"lineNumber":403,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC."},{"lineNumber":404,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts"},{"lineNumber":405,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":406,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":407,"author":{"gitId":"jeffreygohkw"},"content":"Examples:"},{"lineNumber":408,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":409,"author":{"gitId":"jeffreygohkw"},"content":"* `sort name asc` +"},{"lineNumber":410,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in ascending order by the name field."},{"lineNumber":411,"author":{"gitId":"jeffreygohkw"},"content":"* `sort address desc` +"},{"lineNumber":412,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in descending order by the address field."},{"lineNumber":413,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":414,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Backing up your data : `backup`"},{"lineNumber":415,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":416,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +"},{"lineNumber":417,"author":{"gitId":"-"},"content":"`backup` can be replaced by `bk` for faster input. +"},{"lineNumber":418,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [RELATIVE LOCATION]` +"},{"lineNumber":419,"author":{"gitId":"-"},"content":""},{"lineNumber":420,"author":{"gitId":"-"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":"****"},{"lineNumber":422,"author":{"gitId":"charlesgoh"},"content":"* Allows you to backup your saved data on Address++ in another file."},{"lineNumber":423,"author":{"gitId":"charlesgoh"},"content":"* You can backup your data in the default location or you can specify your desired save location."},{"lineNumber":424,"author":{"gitId":"charlesgoh"},"content":"* You can use the default save name or use your own."},{"lineNumber":425,"author":{"gitId":"-"},"content":"****"},{"lineNumber":426,"author":{"gitId":"-"},"content":""},{"lineNumber":427,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":428,"author":{"gitId":"-"},"content":""},{"lineNumber":429,"author":{"gitId":"charlesgoh"},"content":"* `backup` or `bk` +"},{"lineNumber":430,"author":{"gitId":"charlesgoh"},"content":"This command will help you back up in the default save location --\u003e In the data directory of your application."},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":"* `backup ./test.xml` or `bk ./test.xml` +"},{"lineNumber":432,"author":{"gitId":"charlesgoh"},"content":"This saves the backup file in the current data directory, with the name `test.xml`."},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`"},{"lineNumber":435,"author":{"gitId":"-"},"content":""},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact or task, and look at it in greater detail, such as examining a task with a very long description, or checking out the full address of one of your friends. +"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"Format (person): `select INDEX` +"},{"lineNumber":439,"author":{"gitId":"-"},"content":""},{"lineNumber":440,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":443,"author":{"gitId":"-"},"content":"`select 2` +"},{"lineNumber":444,"author":{"gitId":"-"},"content":"Selects the 2nd person in the address book."},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":446,"author":{"gitId":"-"},"content":"`select 1` +"},{"lineNumber":447,"author":{"gitId":"-"},"content":"Selects the 1st person in the results of the `find` command."},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"To select a task, a `task` keyword must additionally be specified after `select` +"},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Format: `select task INDEX` +"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Selecting a task will load a list of the people who are assigned to it, instead of the Google search page."},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"`select task 2` +"},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Selects the 2nd task in the address book."},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"`select task 1` +"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"Selects the 1st task in the results of the `find task` command."},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)"},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +"},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +"},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +"},{"lineNumber":472,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":473,"author":{"gitId":"jeffreygohkw"},"content":"Examples:"},{"lineNumber":474,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":475,"author":{"gitId":"jeffreygohkw"},"content":"* `list` +"},{"lineNumber":476,"author":{"gitId":"jeffreygohkw"},"content":"`locate 2` +"},{"lineNumber":477,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 2nd person in the address book on Google Maps."},{"lineNumber":478,"author":{"gitId":"jeffreygohkw"},"content":"* `find Betsy` +"},{"lineNumber":479,"author":{"gitId":"jeffreygohkw"},"content":"`locate 1` +"},{"lineNumber":480,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 1st person in the results of the `find` command on Google Maps."},{"lineNumber":481,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":482,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":483,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +"},{"lineNumber":484,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide a specific and valid address."},{"lineNumber":485,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps."},{"lineNumber":486,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":487,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":488,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":489,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Mark task as complete : `setcomplete` (To be coming in V2.0)"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +"},{"lineNumber":494,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +"},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed."},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"`setcomplete 2` +"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as completed."},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"`setcomplete 1` +"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as completed."},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Mark task as incomplete : `setincomplete` (To be coming in V2.0)"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +"},{"lineNumber":515,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +"},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete."},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"`setincomplete 2` +"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as incomplete."},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"`setincomplete 1` +"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as incomplete."},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign contacts to task : `assign` (Since V1.4)"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"`list task` +"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"`assign 1 4 5 to/2` +"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"Assigns the 1st, 4th and 5th contacts to 2nd task in the address book."},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"`find task update` +"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"`assign 2 to/1` +"},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Assigns the 2nd person in the address book to the 1st task in the results of the `find task` command."},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismiss contacts from task : `dismiss` (Since V1.4)"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":558,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"`list task` +"},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"`dismiss 1 4 5 from/2` +"},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"Dismisses 1st, 4th and 5th contacts in the address book from the 2nd task."},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"`find task update` +"},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"`dismiss 2 from/1` +"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"Dismisses the 2nd person in the address book from the 1st task in the results of the `find task` command."},{"lineNumber":579,"author":{"gitId":"-"},"content":""},{"lineNumber":580,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`"},{"lineNumber":581,"author":{"gitId":"-"},"content":""},{"lineNumber":582,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +"},{"lineNumber":583,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +"},{"lineNumber":584,"author":{"gitId":"-"},"content":"Format: `history` +"},{"lineNumber":585,"author":{"gitId":"-"},"content":""},{"lineNumber":586,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":588,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box."},{"lineNumber":589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":592,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`"},{"lineNumber":593,"author":{"gitId":"-"},"content":""},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +"},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +"},{"lineNumber":596,"author":{"gitId":"-"},"content":"Format: `undo` +"},{"lineNumber":597,"author":{"gitId":"-"},"content":""},{"lineNumber":598,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":599,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":600,"author":{"gitId":"-"},"content":"Undoable commands: those commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`)."},{"lineNumber":601,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":602,"author":{"gitId":"-"},"content":""},{"lineNumber":603,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":604,"author":{"gitId":"-"},"content":""},{"lineNumber":605,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":606,"author":{"gitId":"-"},"content":"`list` +"},{"lineNumber":607,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":608,"author":{"gitId":"-"},"content":""},{"lineNumber":609,"author":{"gitId":"-"},"content":"* `select 1` +"},{"lineNumber":610,"author":{"gitId":"-"},"content":"`list` +"},{"lineNumber":611,"author":{"gitId":"-"},"content":"`undo` +"},{"lineNumber":612,"author":{"gitId":"-"},"content":"The `undo` command fails as there are no undoable commands executed previously."},{"lineNumber":613,"author":{"gitId":"-"},"content":""},{"lineNumber":614,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":615,"author":{"gitId":"-"},"content":"`clear` +"},{"lineNumber":616,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +"},{"lineNumber":617,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":618,"author":{"gitId":"-"},"content":""},{"lineNumber":619,"author":{"gitId":"-"},"content":""},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)"},{"lineNumber":621,"author":{"gitId":"-"},"content":""},{"lineNumber":622,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +"},{"lineNumber":623,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +"},{"lineNumber":624,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +"},{"lineNumber":625,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +"},{"lineNumber":626,"author":{"gitId":"-"},"content":""},{"lineNumber":627,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":628,"author":{"gitId":"-"},"content":""},{"lineNumber":629,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":630,"author":{"gitId":"-"},"content":"`unfavourite 2` +"},{"lineNumber":631,"author":{"gitId":"-"},"content":"Unfavourites the 2nd person in the address book."},{"lineNumber":632,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":633,"author":{"gitId":"-"},"content":"`unfavourite 1` +"},{"lineNumber":634,"author":{"gitId":"-"},"content":"Unfavourite the 1st person in the results of the `find` command."},{"lineNumber":635,"author":{"gitId":"-"},"content":""},{"lineNumber":636,"author":{"gitId":"-"},"content":"****"},{"lineNumber":637,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`."},{"lineNumber":638,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":639,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":640,"author":{"gitId":"-"},"content":"****"},{"lineNumber":641,"author":{"gitId":"-"},"content":""},{"lineNumber":642,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`"},{"lineNumber":643,"author":{"gitId":"-"},"content":""},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` wasn\u0027t necessary. `redo` reverses the most recent `undo` command. +"},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +"},{"lineNumber":646,"author":{"gitId":"-"},"content":"Format: `redo` +"},{"lineNumber":647,"author":{"gitId":"-"},"content":""},{"lineNumber":648,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":649,"author":{"gitId":"-"},"content":""},{"lineNumber":650,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":651,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":652,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +"},{"lineNumber":653,"author":{"gitId":"-"},"content":""},{"lineNumber":654,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":655,"author":{"gitId":"-"},"content":"`redo` +"},{"lineNumber":656,"author":{"gitId":"-"},"content":"The `redo` command fails as there are no `undo` commands executed previously."},{"lineNumber":657,"author":{"gitId":"-"},"content":""},{"lineNumber":658,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":659,"author":{"gitId":"-"},"content":"`clear` +"},{"lineNumber":660,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +"},{"lineNumber":661,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":662,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +"},{"lineNumber":663,"author":{"gitId":"-"},"content":"`redo` (reapplies the `clear` command) +"},{"lineNumber":664,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":665,"author":{"gitId":"-"},"content":""},{"lineNumber":666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`"},{"lineNumber":667,"author":{"gitId":"-"},"content":""},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +"},{"lineNumber":669,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +"},{"lineNumber":670,"author":{"gitId":"-"},"content":"Format: `clear` +"},{"lineNumber":671,"author":{"gitId":"-"},"content":""},{"lineNumber":672,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`"},{"lineNumber":673,"author":{"gitId":"-"},"content":""},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +"},{"lineNumber":675,"author":{"gitId":"-"},"content":"Format: `exit`"},{"lineNumber":676,"author":{"gitId":"-"},"content":""},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4]."},{"lineNumber":678,"author":{"gitId":"-"},"content":""},{"lineNumber":679,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data"},{"lineNumber":680,"author":{"gitId":"-"},"content":""},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +"},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually."},{"lineNumber":683,"author":{"gitId":"-"},"content":""},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window."},{"lineNumber":685,"author":{"gitId":"-"},"content":""},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window."},{"lineNumber":687,"author":{"gitId":"-"},"content":""},{"lineNumber":688,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Using the browser"},{"lineNumber":689,"author":{"gitId":"-"},"content":""},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"If you click on a box containing a contact, an internet browser on the right side of the window."},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"* Performing a left click will allow you to perform a search on Google for the name of the contact, and is equivalent to doing a `select` on that oerson."},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":"* If a person\u0027s name or address is set to private, the browser will not perform a search if you click on their box."},{"lineNumber":694,"author":{"gitId":"-"},"content":"* Right clicking on the browser will allow you to go to the previous or next page, as well as reload the page."},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Exporting the data"},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Address book data can be exported in a number of different formats, thus allowing the data to be compatible to any device."},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":701,"author":{"gitId":"-"},"content":"To export data, click on `File -\u003e Export As...` or use the keyboard shortcut kbd:[CTRL]+kbd:[E]` and select the new location and file name for the export file in the pop-up window."},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Auto-Complete: Learning Your Typing Habits"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"The program will learn your typing habits and give autocomplete suggestions that become more accurate over time."},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ"},{"lineNumber":708,"author":{"gitId":"-"},"content":""},{"lineNumber":709,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +"},{"lineNumber":710,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location."},{"lineNumber":711,"author":{"gitId":"-"},"content":""},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet"},{"lineNumber":713,"author":{"gitId":"-"},"content":""},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":715,"author":{"gitId":"-"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665, b/29-02-1996 f/SOC c/www.enteryourcalendarurlhere.com t/friend t/colleague`"},{"lineNumber":716,"author":{"gitId":"jeffreygohkw"},"content":"* *Add with private fields* : `add or a pn/NAME pp/PHONE_NUMBER pe/EMAIL pa/ADDRESS b/BIRTHDAY f/FACULTY c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":717,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665`"},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +"},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"e.g. `add task n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high`"},{"lineNumber":720,"author":{"gitId":"-"},"content":"* *Add tag* : `addtag INDEX t/[TAG]` +"},{"lineNumber":721,"author":{"gitId":"-"},"content":"e.g. `addtag 1 2 t/friends`"},{"lineNumber":722,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE]` +"},{"lineNumber":723,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false`"},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"* *Clear person* : `clear`"},{"lineNumber":725,"author":{"gitId":"-"},"content":"* *Clear tasks* : `cleartask`"},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +"},{"lineNumber":727,"author":{"gitId":"-"},"content":"e.g. `delete 3`"},{"lineNumber":728,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task INDEX` +"},{"lineNumber":729,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task 4`"},{"lineNumber":730,"author":{"gitId":"-"},"content":"* *Delete tag* : `deletetag INDEX t/[TAG]` +"},{"lineNumber":731,"author":{"gitId":"-"},"content":"e.g. `deletetag 1 2 t/friends`"},{"lineNumber":732,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] c/[GOOGLE CALENDAR URL] [a/ADDRESS] [t/TAG]...` +"},{"lineNumber":733,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`"},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +"},{"lineNumber":735,"author":{"gitId":"-"},"content":"e.g. `edit task 2 p/veryhigh`"},{"lineNumber":736,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edittag TAGTOCHANGE NEWTAGNAME` +"},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"e.g. `edittag friends enemies`"},{"lineNumber":738,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +"},{"lineNumber":739,"author":{"gitId":"-"},"content":"e.g. `favourite 1`"},{"lineNumber":740,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +"},{"lineNumber":741,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`"},{"lineNumber":742,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +"},{"lineNumber":743,"author":{"gitId":"-"},"content":"e.g. `showfavourite`"},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":745,"author":{"gitId":"-"},"content":"e.g. `find James Jake`"},{"lineNumber":746,"author":{"gitId":"-"},"content":"* *Find tag* : `findtag Tag [MORE_TAGS]` +"},{"lineNumber":747,"author":{"gitId":"-"},"content":"e.g. `findtag friends`"},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +"},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"e.g. `find task update p/high`"},{"lineNumber":750,"author":{"gitId":"-"},"content":"* *Help* : `help`"},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"* *List persons* : `list`"},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":"* *List tasks* : `list task`"},{"lineNumber":753,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate`"},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +"},{"lineNumber":755,"author":{"gitId":"-"},"content":"e.g.`select 2`"},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task INDEX` +"},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"e.g.`select task 2`"},{"lineNumber":758,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +"},{"lineNumber":759,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`"},{"lineNumber":760,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +"},{"lineNumber":761,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`"},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +"},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`"},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +"},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`"},{"lineNumber":766,"author":{"gitId":"-"},"content":"* *History* : `history`"},{"lineNumber":767,"author":{"gitId":"-"},"content":"* *Undo* : `undo`"},{"lineNumber":768,"author":{"gitId":"-"},"content":"* *Redo* : `redo`"},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts"},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]"},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[[F1]"},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]"},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]"},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept"},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary."},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]"}],"authorContributionMap":{"charlesgoh":70,"jeffreygohkw":88,"Esilocke":252,"-":373}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 3, 0, true);"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());"},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model, storage);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book."},{"lineNumber":88,"author":{"gitId":"-"},"content":" */"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");"},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null."},{"lineNumber":117,"author":{"gitId":"-"},"content":" */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;"},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());"},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \""},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");"},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;"},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \""},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");"},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":169,"author":{"gitId":"-"},"content":" }"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(userPrefs);"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/"},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;"},{"lineNumber":13,"author":{"gitId":"-"},"content":" }"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user."},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution."},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();"},{"lineNumber":31,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model, Storage storage) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");"},{"lineNumber":49,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" Command command \u003d addressBookParser.parseCommand(commandText);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return result;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } finally {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" history.add(commandText);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":8,"-":63}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Adds a person or task to the address book."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \""},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Parameters: \""},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":34,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"PHONE \""},{"lineNumber":35,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \""},{"lineNumber":36,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"ADDRESS \""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \""},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":39,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \""},{"lineNumber":41,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \""},{"lineNumber":42,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \""},{"lineNumber":43,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \""},{"lineNumber":45,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"friends \""},{"lineNumber":46,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"owesMoney\";"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Adds a task to the address book. \""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"DESCRIPTION \""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"DEADLINE \""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"PRIORITY \""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \";"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_SUCCESS \u003d \"New task added: \\n%1$s\";"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private boolean isTask \u003d false;"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}"},{"lineNumber":71,"author":{"gitId":"-"},"content":" */"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public AddCommand(ReadOnlyPerson person) {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d null;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@Code ReadOnlyTask}"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d null;"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" isTask \u003d true;"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" if (isTask) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_TASK_SUCCESS, taskToAdd));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddCommand)) {"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } else if (taskToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).taskToAdd \u003d\u003d null) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert(personToAdd !\u003d null);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddCommand) other).personToAdd);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else if (personToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).personToAdd \u003d\u003d null) {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assert(taskToAdd !\u003d null);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddCommand) other).taskToAdd);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":60,"wangyiming1019":1,"-":58}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends UndoableCommand {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"addtag\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"atag\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all persons in the current list.\";"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends Command {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.io.IOException;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location."},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" ~/Desktop\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" super();"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(storage);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (args.equals(\"\")) {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBookDefault(model.getAddressBook());"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBook(model.getAddressBook(), args);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" } catch (IOException e) {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD;"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d person.getName();"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d person.getPhone();"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d person.getEmail();"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d person.getAddress();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Remark r \u003d person.getRemark();"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Boolean f \u003d person.getFavourite();"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e t \u003d person.getTags();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" n.setPrivate(pps.getNameIsPrivate());"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" p.setPrivate(pps.getPhoneIsPrivate());"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" e.setPrivate(pps.getEmailIsPrivate());"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" a.setPrivate(pps.getAddressIsPrivate());"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" r.setPrivate(pps.getRemarkIsPrivate());"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(n, p, e, a, f, r, t);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return index;"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person."},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null."},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of nameIsPrivate"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of phoneIsPrivate"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of emailIsPrivate"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of addressIsPrivate"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of remarkIsPrivate"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of remarkIsPrivate"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getRemarkIsPrivate() {"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" return remarkIsPrivate;"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remarkIsPrivate);"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":273}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Clears the address book."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"%s has been cleared!\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_PERSONS \u003d \"Contact list\";"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_TASKS \u003d \"Task list\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_ALL \u003d \"Address book\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private boolean isClearTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private boolean isClearPerson;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private boolean isClearAll;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Prefix type;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String cleared;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public ClearCommand() {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d true;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" type \u003d null;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_ALL;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public ClearCommand(Prefix type) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d true;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_TASK;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_TASKS;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d true;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_PERSON;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_PERSONS;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"An invalid type was provided!\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (isClearAll) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else if (isClearTask) {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } else if (isClearPerson) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assert false : \"At least one boolean must be true.\";"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, cleared));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public abstract class Command {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" protected MainWindow mainWindow;"},{"lineNumber":18,"author":{"gitId":"-"},"content":" protected CommandHistory history;"},{"lineNumber":19,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed"},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks."},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message."},{"lineNumber":43,"author":{"gitId":"-"},"content":" *"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command."},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * access to the dependencies."},{"lineNumber":53,"author":{"gitId":"-"},"content":" */"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a person or task identified using its last displayed index from the address book."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person or task identified by the index number used in the last listing.\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DELETE_TASK_SUCCESS \u003d \"Deleted Task: %1$s\";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_PERSON \u003d 0;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_TASK \u003d 1;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private int type;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public DeleteCommand(Index targetIndex, int objectType) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.type \u003d objectType;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_PERSON) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (targetIndex.getZeroBased() \u003e\u003d tasksList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_TASK) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (type \u003d\u003d DELETE_TYPE_PERSON) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TASK_SUCCESS, taskToDelete));"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex)"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.type \u003d\u003d ((DeleteCommand) other).type); // state check"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":28,"wangyiming1019":1,"-":47}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends UndoableCommand {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"deletetag\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"dtag\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"This is an nonexistent tag in the given persons list.\";"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons."},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list."},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends Command {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toDismiss)) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toDismiss);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Edits the details of an existing person or task in the address book."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \""},{"lineNumber":53,"author":{"gitId":"-"},"content":" + \"by the index number used in the last person listing. \""},{"lineNumber":54,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":55,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \""},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":63,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \""},{"lineNumber":64,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Edits the details of the task identified \""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: \\n%1$s\";"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TASK_SUCCESS \u003d \"Edited Task: \\n%1$s\";"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean areFieldsAllPrivate \u003d true;"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" private final Index index;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @param index of the person in the filtered person list to edit"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the person with"},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" requireNonNull(index);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.index \u003d index;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d null;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public EditCommand(Index index, EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d null;"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //TODO see if we can use Singleton pattern to handle the Descriptors."},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":127,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" }"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" if (isTask) {"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, editedTask));"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":145,"author":{"gitId":"-"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" }"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}."},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedTags);"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().isPrivate()) {"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().isPrivate()) {"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().isPrivate()) {"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().isPrivate()) {"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().isPrivate()) {"},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());"},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {"},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();"},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;"},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson"},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editTaskDescriptor}."},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" assert taskToEdit !\u003d null;"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" TaskName updatedTaskName;"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" Description updatedDescription;"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" Deadline updatedDeadline;"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" Priority updatedPriority;"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" Assignees assignees;"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updatedState;"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" // You cannot edit assignees or state using edit command"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" assignees \u003d taskToEdit.getAssignees();"},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" updatedState \u003d taskToEdit.getCompleteState();"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState);"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":361,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":362,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":363,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":364,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":365,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":366,"author":{"gitId":"-"},"content":" }"},{"lineNumber":367,"author":{"gitId":"-"},"content":""},{"lineNumber":368,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":369,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {"},{"lineNumber":370,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":371,"author":{"gitId":"-"},"content":" }"},{"lineNumber":372,"author":{"gitId":"-"},"content":""},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":" if (this.isTask !\u003d ((EditCommand) other).isTask) {"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":377,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" if (this.isTask) {"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":383,"author":{"gitId":"-"},"content":" }"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":386,"author":{"gitId":"-"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the"},{"lineNumber":387,"author":{"gitId":"-"},"content":" * corresponding field value of the person."},{"lineNumber":388,"author":{"gitId":"-"},"content":" */"},{"lineNumber":389,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {"},{"lineNumber":390,"author":{"gitId":"-"},"content":" private Name name;"},{"lineNumber":391,"author":{"gitId":"-"},"content":" private Phone phone;"},{"lineNumber":392,"author":{"gitId":"-"},"content":" private Email email;"},{"lineNumber":393,"author":{"gitId":"-"},"content":" private Address address;"},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" private Boolean favourite;"},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" private Remark remark;"},{"lineNumber":396,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;"},{"lineNumber":397,"author":{"gitId":"-"},"content":""},{"lineNumber":398,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}"},{"lineNumber":399,"author":{"gitId":"-"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {"},{"lineNumber":401,"author":{"gitId":"-"},"content":" this.name \u003d toCopy.name;"},{"lineNumber":402,"author":{"gitId":"-"},"content":" this.phone \u003d toCopy.phone;"},{"lineNumber":403,"author":{"gitId":"-"},"content":" this.email \u003d toCopy.email;"},{"lineNumber":404,"author":{"gitId":"-"},"content":" this.address \u003d toCopy.address;"},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d toCopy.favourite;"},{"lineNumber":406,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d toCopy.remark;"},{"lineNumber":407,"author":{"gitId":"-"},"content":" this.tags \u003d toCopy.tags;"},{"lineNumber":408,"author":{"gitId":"-"},"content":" }"},{"lineNumber":409,"author":{"gitId":"-"},"content":""},{"lineNumber":410,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":411,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited."},{"lineNumber":412,"author":{"gitId":"-"},"content":" */"},{"lineNumber":413,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":414,"author":{"gitId":"charlesgoh"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark, this.tags);"},{"lineNumber":415,"author":{"gitId":"-"},"content":" }"},{"lineNumber":416,"author":{"gitId":"-"},"content":""},{"lineNumber":417,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":418,"author":{"gitId":"-"},"content":" this.name \u003d name;"},{"lineNumber":419,"author":{"gitId":"-"},"content":" }"},{"lineNumber":420,"author":{"gitId":"-"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {"},{"lineNumber":422,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);"},{"lineNumber":423,"author":{"gitId":"-"},"content":" }"},{"lineNumber":424,"author":{"gitId":"-"},"content":""},{"lineNumber":425,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":426,"author":{"gitId":"-"},"content":" this.phone \u003d phone;"},{"lineNumber":427,"author":{"gitId":"-"},"content":" }"},{"lineNumber":428,"author":{"gitId":"-"},"content":""},{"lineNumber":429,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {"},{"lineNumber":430,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);"},{"lineNumber":431,"author":{"gitId":"-"},"content":" }"},{"lineNumber":432,"author":{"gitId":"-"},"content":""},{"lineNumber":433,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":434,"author":{"gitId":"-"},"content":" this.email \u003d email;"},{"lineNumber":435,"author":{"gitId":"-"},"content":" }"},{"lineNumber":436,"author":{"gitId":"-"},"content":""},{"lineNumber":437,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {"},{"lineNumber":438,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);"},{"lineNumber":439,"author":{"gitId":"-"},"content":" }"},{"lineNumber":440,"author":{"gitId":"-"},"content":""},{"lineNumber":441,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":442,"author":{"gitId":"-"},"content":" this.address \u003d address;"},{"lineNumber":443,"author":{"gitId":"-"},"content":" }"},{"lineNumber":444,"author":{"gitId":"-"},"content":""},{"lineNumber":445,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {"},{"lineNumber":446,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);"},{"lineNumber":447,"author":{"gitId":"-"},"content":" }"},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;"},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {"},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);"},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":457,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":458,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d remark;"},{"lineNumber":459,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":460,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":461,"author":{"gitId":"charlesgoh"},"content":" public Optional\u003cRemark\u003e getRemark() {"},{"lineNumber":462,"author":{"gitId":"charlesgoh"},"content":" return Optional.ofNullable(remark);"},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":465,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":466,"author":{"gitId":"-"},"content":" this.tags \u003d tags;"},{"lineNumber":467,"author":{"gitId":"-"},"content":" }"},{"lineNumber":468,"author":{"gitId":"-"},"content":""},{"lineNumber":469,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {"},{"lineNumber":470,"author":{"gitId":"-"},"content":" return Optional.ofNullable(tags);"},{"lineNumber":471,"author":{"gitId":"-"},"content":" }"},{"lineNumber":472,"author":{"gitId":"-"},"content":""},{"lineNumber":473,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":474,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":475,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":476,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":477,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":478,"author":{"gitId":"-"},"content":" }"},{"lineNumber":479,"author":{"gitId":"-"},"content":""},{"lineNumber":480,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":481,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {"},{"lineNumber":482,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":483,"author":{"gitId":"-"},"content":" }"},{"lineNumber":484,"author":{"gitId":"-"},"content":""},{"lineNumber":485,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":486,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;"},{"lineNumber":487,"author":{"gitId":"-"},"content":""},{"lineNumber":488,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())"},{"lineNumber":489,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())"},{"lineNumber":490,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())"},{"lineNumber":491,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())"},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())"},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())"},{"lineNumber":494,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags());"},{"lineNumber":495,"author":{"gitId":"-"},"content":" }"},{"lineNumber":496,"author":{"gitId":"-"},"content":" }"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task."},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;"},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":" private Description description;"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":" private Priority priority;"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;"},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited."},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority);"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;"},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {"},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);"},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {"},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {"},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);"},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {"},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;"},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())"},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())"},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority());"},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":199,"Esilocke":159,"wangyiming1019":14,"-":193}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"edittag\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"etag\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the specified tag \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(personToFavourite);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Finds and lists all persons or tasks in address book whose name contains any of the argument keywords."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive."},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \""},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Finds all tasks whose names or descriptions \""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d null;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public FindCommand(TaskContainsKeywordPredicate predicate) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d null;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (isTask) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof FindCommand)) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask !\u003d ((FindCommand) other).isTask) {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask) {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return this.taskPredicate.equals(((FindCommand) other).taskPredicate);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return this.personPredicate.equals(((FindCommand) other).personPredicate);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":36,"wangyiming1019":1,"-":30}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive."},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends Command {"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"findtag\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"ftag\";"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose tags contain any of \""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" friends colleagues\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person: %1$s\";"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().isPrivate()) {"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":58}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as complete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as incomplete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\"));"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons by chosen \""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS] and by order [ASC/DESC]. Case insensitive\\n\""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [FIELD] [ORDER]\\n\""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" email desc\";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All persons in address book successfully sorted\";"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private final String field;"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" private final String order;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String field, String order) {"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public String getField() {"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return this.field;"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return this.order;"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":48,"jeffreygohkw":2,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.unfavouritePerson(personToUnfavourite);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object"},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution."},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" PREFIX_REMARK_PRIVATE, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE,"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" PREFIX_EMAIL_PRIVATE, PREFIX_ADDRESS_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_DEADLINE,"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" PREFIX_DESCRIPTION, PREFIX_PRIORITY, PREFIX_TASK);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d constructTask(args);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(taskToAdd);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d constructPerson(args);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(personToAdd);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided."},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" private static ReadOnlyPerson constructPerson(String args) throws ParseException {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PHONE)"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)))) {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_EMAIL)"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)))) {"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_ADDRESS)"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)))) {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_REMARK)"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)))) {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, tagList);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided."},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyTask constructTask(String args) throws ParseException {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY);"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION))) {"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DEADLINE))) {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PRIORITY))) {"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" TaskName name;"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Description description;"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" Priority priority;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" description \u003d ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get();"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" deadline \u003d ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get();"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" priority \u003d ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get();"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d new Task(name, description, deadline, priority);"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return task;"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":83,"Esilocke":69,"-":35}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser implements Parser\u003cAddTagCommand\u003e {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution."},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":70}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses user input."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class AddressBookParser {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Parses user input into command for execution."},{"lineNumber":51,"author":{"gitId":"-"},"content":" *"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @param userInput full user input string"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @return the command based on the user input"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":55,"author":{"gitId":"-"},"content":" */"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public Command parseCommand(String userInput) throws ParseException {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");"},{"lineNumber":64,"author":{"gitId":"-"},"content":" switch (commandWord) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_WORD:"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_ALIAS:"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommandParser().parse(arguments);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:"},{"lineNumber":88,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_WORD:"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_ALIAS:"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(arguments);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" case SelectCommand.COMMAND_ALIAS:"},{"lineNumber":103,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_WORD:"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_ALIAS:"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommandParser().parse(arguments);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:"},{"lineNumber":111,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_WORD:"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_ALIAS:"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommandParser().parse(arguments);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_WORD:"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_ALIAS:"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommandParser().parse(arguments);"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":143,"author":{"gitId":"-"},"content":" return new ListCommand();"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:"},{"lineNumber":147,"author":{"gitId":"-"},"content":" return new HistoryCommand();"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":150,"author":{"gitId":"-"},"content":" return new ExitCommand();"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":153,"author":{"gitId":"-"},"content":" return new HelpCommand();"},{"lineNumber":154,"author":{"gitId":"-"},"content":""},{"lineNumber":155,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:"},{"lineNumber":157,"author":{"gitId":"-"},"content":" return new UndoCommand();"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:"},{"lineNumber":161,"author":{"gitId":"-"},"content":" return new RedoCommand();"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":9,"Esilocke":25,"wangyiming1019":41,"-":91}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String."},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * filepath."},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":18}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditCommand object"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_PERSON);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_TASK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person\");"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task\");"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"pri/\");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"Esilocke":6,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(filteredString.trim());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_PERSON);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":36,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":12,"-":28}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution."},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":67}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String."},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object"},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(args);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return constructTaskDescriptor(args);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return constructPersonDescriptor(args);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Person object. **/"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructPersonDescriptor(String args) throws ParseException {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" Index index;"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor \u003d new EditPersonDescriptor();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" return new EditCommand(index, editPersonDescriptor);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Task object. **/"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructTaskDescriptor(String args) throws ParseException {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor \u003d new EditTaskDescriptor();"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return new EditCommand(index, editTaskDescriptor);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty."},{"lineNumber":116,"author":{"gitId":"-"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * {@code Set\u003cTag\u003e} containing zero tags."},{"lineNumber":118,"author":{"gitId":"-"},"content":" */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assert tags !\u003d null;"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" if (tags.isEmpty()) {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return Optional.empty();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":47,"-":78}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return tagList;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":30,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" trimmedArgs \u003d argsWithNoTaskPrefix.trim();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return new FindCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords)));"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":14,"-":31}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new SelectCommand object"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an SelectCommand object for execution."},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes."},{"lineNumber":26,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type."},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods."},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class ParserUtil {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * trimmed."},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer)."},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":54,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":55,"author":{"gitId":"-"},"content":" */"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Name to be private if true."},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":73,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":74,"author":{"gitId":"-"},"content":" */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" requireNonNull(phone);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Phone to be private if true."},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":92,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":93,"author":{"gitId":"-"},"content":" */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" requireNonNull(address);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Address to be private if true."},{"lineNumber":102,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" * Takes in a (@code boolean isPrivate) which will set the Remark to be private if true."},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" throws IllegalValueException {"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":134,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":135,"author":{"gitId":"-"},"content":" */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" requireNonNull(email);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Email to be private if true."},{"lineNumber":144,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" requireNonNull(email);"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();"},{"lineNumber":149,"author":{"gitId":"-"},"content":" }"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(tags);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" for (String tagName : tags) {"},{"lineNumber":158,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":" return tagSet;"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present."},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present."},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present."},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present."},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":29,"Esilocke":39,"-":104}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 0;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 1;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution."},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 2) {"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"},{"lineNumber":42,"author":{"gitId":"-"},"content":" *"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}"},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":91,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}."},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":118,"author":{"gitId":"-"},"content":" //// person-level operations"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Adds a person to the address book."},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,"},{"lineNumber":123,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}."},{"lineNumber":124,"author":{"gitId":"-"},"content":" *"},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists."},{"lineNumber":126,"author":{"gitId":"-"},"content":" */"},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":131,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":132,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":133,"author":{"gitId":"-"},"content":" persons.add(newPerson);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}."},{"lineNumber":138,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}."},{"lineNumber":139,"author":{"gitId":"-"},"content":" *"},{"lineNumber":140,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":142,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":143,"author":{"gitId":"-"},"content":" *"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)"},{"lineNumber":147,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":148,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);"},{"lineNumber":151,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":153,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":154,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":155,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}."},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);"},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}."},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);"},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":186,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:"},{"lineNumber":188,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":190,"author":{"gitId":"-"},"content":" */"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());"},{"lineNumber":193,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list"},{"lineNumber":196,"author":{"gitId":"-"},"content":" // used for checking person tag references"},{"lineNumber":197,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();"},{"lineNumber":198,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list."},{"lineNumber":201,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();"},{"lineNumber":202,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));"},{"lineNumber":203,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:"},{"lineNumber":208,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":209,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":210,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":211,"author":{"gitId":"-"},"content":" */"},{"lineNumber":212,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":218,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":219,"author":{"gitId":"-"},"content":" */"},{"lineNumber":220,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {"},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {"},{"lineNumber":222,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":223,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":225,"author":{"gitId":"-"},"content":" }"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" //// tag-level operations"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" tags.add(t);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" //// task-level operations"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book."},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists."},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}."},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" //// util methods"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" // TODO: refine later"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList();"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":296,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":297,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":298,"author":{"gitId":"-"},"content":" return tags.asObservableList();"},{"lineNumber":299,"author":{"gitId":"-"},"content":" }"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":302,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":303,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":304,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls"},{"lineNumber":305,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);"},{"lineNumber":308,"author":{"gitId":"-"},"content":" }"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":311,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":312,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);"},{"lineNumber":314,"author":{"gitId":"-"},"content":" }"},{"lineNumber":315,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":11,"Esilocke":106,"wangyiming1019":17,"-":181}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * The API of the Model component."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public interface Model {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */"},{"lineNumber":33,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Deletes the given person. */"},{"lineNumber":36,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /** Adds the given person */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}."},{"lineNumber":61,"author":{"gitId":"-"},"content":" *"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":64,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}."},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}."},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":105,"author":{"gitId":"-"},"content":" */"},{"lineNumber":106,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}."},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by field in ascending (asc) or descending (desc) order"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);"},{"lineNumber":120,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":48,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data."},{"lineNumber":41,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized."},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ModelManager() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":89,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list."},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list."},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":149,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);"},{"lineNumber":153,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();"},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes."},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag."},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" int index;"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);"},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);"},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" updateFilteredPersonList(new NameContainsFavouritePredicate());"},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToAssignTo.getTaskName();"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToAssignTo.getDescription();"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToAssignTo.getDeadline();"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToAssignTo.getPriority();"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToAssignTo.getCompleteState();"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" assignees.assign(personsToAssign);"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToAssignTo, updatedTask);"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToDismissFrom.getTaskName();"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToDismissFrom.getDescription();"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToDismissFrom.getDeadline();"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToDismissFrom.getPriority();"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToDismissFrom.getCompleteState();"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assignees.dismiss(personsToDismiss);"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToDismissFrom, updatedTask);"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":275,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":276,"author":{"gitId":"-"},"content":""},{"lineNumber":277,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":278,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of"},{"lineNumber":279,"author":{"gitId":"-"},"content":" * {@code addressBook}"},{"lineNumber":280,"author":{"gitId":"-"},"content":" */"},{"lineNumber":281,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":282,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":283,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);"},{"lineNumber":284,"author":{"gitId":"-"},"content":" }"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" requireNonNull(predicate);"},{"lineNumber":296,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":297,"author":{"gitId":"-"},"content":" }"},{"lineNumber":298,"author":{"gitId":"-"},"content":""},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":307,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":308,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {"},{"lineNumber":309,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":310,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {"},{"lineNumber":311,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":312,"author":{"gitId":"-"},"content":" }"},{"lineNumber":313,"author":{"gitId":"-"},"content":""},{"lineNumber":314,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":315,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {"},{"lineNumber":316,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":317,"author":{"gitId":"-"},"content":" }"},{"lineNumber":318,"author":{"gitId":"-"},"content":""},{"lineNumber":319,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":320,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;"},{"lineNumber":321,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":145,"wangyiming1019":59,"-":116}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list."},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Validates given address."},{"lineNumber":26,"author":{"gitId":"-"},"content":" *"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public Address(String address) throws IllegalValueException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.value \u003d address;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(address);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":50}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Validates given email."},{"lineNumber":21,"author":{"gitId":"-"},"content":" *"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public Email(String email) throws IllegalValueException {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this(email);"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":62,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls"},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":45}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String fullName;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given name."},{"lineNumber":27,"author":{"gitId":"-"},"content":" *"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Name(String name) throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.fullName \u003d trimmedName;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this(name);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls"},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.fullName.equals(((Name) other).fullName)); // state check"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return fullName.hashCode();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27,"-":55}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/not\")) {"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(4));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Every field must be present and not null."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Boolean favourite, Remark remark, Set\u003cTag\u003e tags) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" source.getRemark(), source.getTags());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public Name getName() {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return name.get();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return phone;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public Phone getPhone() {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.get();"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return email;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Email getEmail() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return email.get();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return address;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public Address getAddress() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return address.get();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return favourite;"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark.get();"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}"},{"lineNumber":138,"author":{"gitId":"-"},"content":" * if modification is attempted."},{"lineNumber":139,"author":{"gitId":"-"},"content":" */"},{"lineNumber":140,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":141,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set."},{"lineNumber":151,"author":{"gitId":"-"},"content":" */"},{"lineNumber":152,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":157,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":158,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":159,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls"},{"lineNumber":160,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags);"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":170,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":171,"author":{"gitId":"-"},"content":" return getAsText();"},{"lineNumber":172,"author":{"gitId":"-"},"content":" }"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":15,"wangyiming1019":23,"-":136}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given phone number."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) throws IllegalValueException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":64,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls"},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":28,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook."},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();"},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();"},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark());"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" default String getAsText() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" builder.append(getName())"},{"lineNumber":50,"author":{"gitId":"-"},"content":" .append(\" Phone: \")"},{"lineNumber":51,"author":{"gitId":"-"},"content":" .append(getPhone())"},{"lineNumber":52,"author":{"gitId":"-"},"content":" .append(\" Email: \")"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .append(getEmail())"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .append(\" Address: \")"},{"lineNumber":55,"author":{"gitId":"-"},"content":" .append(getAddress())"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Tags: \");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return builder.toString();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book."},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid."},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" return;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this(remark);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public String toString() {"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (isPrivate) {"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return \"\u003cPrivate Remark\u003e\";"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" return value;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean isPrivate() {"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return isPrivate;"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":79}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Iterator;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":21,"author":{"gitId":"-"},"content":" *"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" // used by asObservableList()"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the list contains an equivalent person as the given argument."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public boolean contains(ReadOnlyPerson toCheck) {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toCheck);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return internalList.contains(toCheck);"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" * Adds a person to the list."},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list."},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toAdd);"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" if (contains(toAdd)) {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" internalList.add(new Person(toAdd));"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}."},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list."},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(editedPerson);"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" internalList.set(index, new Person(editedPerson));"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Removes the equivalent person from the list."},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toRemove);"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" if (!personFoundAndDeleted) {"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" return personFoundAndDeleted;"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list."},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list."},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":126,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();"},{"lineNumber":127,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));"},{"lineNumber":129,"author":{"gitId":"-"},"content":" }"},{"lineNumber":130,"author":{"gitId":"-"},"content":" setPersons(replacement);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" }"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":135,"author":{"gitId":"-"},"content":" */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().fullName.compareTo(o2.getName().fullName);"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" switch (field) {"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" case \"name\":"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" case \"email\":"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case \"address\":"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" switch (order) {"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" public Iterator\u003cPerson\u003e iterator() {"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return internalList.iterator();"},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls"},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));"},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return internalList.hashCode();"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":171,"wangyiming1019":31,"-":42}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name."},{"lineNumber":20,"author":{"gitId":"-"},"content":" *"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing."},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Assignees {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private HashSet\u003cReadOnlyPerson\u003e assignedList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public Assignees(HashSet\u003cReadOnlyPerson\u003e assignees) {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public Assignees() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new HashSet\u003c\u003e();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void assign(ArrayList\u003cReadOnlyPerson\u003e personsToAssign) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToAssign) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assignedList.add(p);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list */"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public void dismiss(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToDismiss) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (assignedList.contains(p)) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(p);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyPerson toFind) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return assignedList.contains(toFind);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Calendar;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Deadline {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DEADLINE_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task deadlines must be in the format DD-MM-YYYY, with \u0027-\u0027, \u0027.\u0027, \u0027.\u0027 as separators\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" Deadline format: DDSMMSYYYY, in DAY-MONTH-YEAR format."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" S represents the separators, and can be any of these characters: - . /"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_VALIDATION_REGEX \u003d \"\\\\d\\\\d[-./]\\\\d\\\\d[-./]\\\\d\\\\d\\\\d\\\\d.*\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String DEADLINE_PERIOD_DELIMITER \u003d \".\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" Expected indexes for the separator characters"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_1 \u003d 2;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_2 \u003d 5;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_DAY_INDEX \u003d 0;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_MONTH_INDEX \u003d 1;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_YEAR_INDEX \u003d 2;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public final Calendar calendar;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline."},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid."},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } else if (deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String trimmedDeadline \u003d deadline.trim();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (!isValidDeadline(trimmedDeadline)) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DEADLINE_CONSTRAINTS);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDeadline;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d Calendar.getInstance();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" calendar.clear();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" char separator \u003d trimmedDeadline.charAt(DEADLINE_SEPARATOR_INDEX_1);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d trimmedDeadline.split(Character.toString(separator));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.calendar.set(year, month, day);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is in valid deadline format."},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(DEADLINE_VALIDATION_REGEX)) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } else if (test.charAt(DEADLINE_SEPARATOR_INDEX_1) !\u003d test.charAt(DEADLINE_SEPARATOR_INDEX_2)) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return isValidDate(test);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date."},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDate(String test) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" Calendar testCalendar \u003d setCalendar(test);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" testCalendar.setLenient(false);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" testCalendar.getTime();"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Returns a Calendar object that represents the given date string."},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private static Calendar setCalendar(String date) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" Calendar result \u003d Calendar.getInstance();"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" result.clear();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String separator \u003d Character.toString(date.charAt(DEADLINE_SEPARATOR_INDEX_1));"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (separator.equals(DEADLINE_PERIOD_DELIMITER)) {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" separator \u003d \"\\\\.\";"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d date.split(separator);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" result.set(year, month, day);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return result;"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":131}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description."},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Priority {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 1 to 5, inclusive, where 1 represents the lowest priority\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 1;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Validates given priority."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Integer.parseInt(trimmedPriority);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedPriority;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Priority) other).value)); // state check"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":83}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return builder.toString();"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * by default."},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return taskName.get();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return description.get();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return deadline.get();"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return priority.get();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return assignees.get();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return state.get();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return getAsText();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return description;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return deadline;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return priority;"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return assignees;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" String printableState;"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return printableState;"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":164}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c keywords.size(); i++) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String keyword \u003d keywords.get(i);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)); // state check"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskName {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public final String taskName;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Validates given name."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name."},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument."},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list."},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list."},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}."},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list."},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list."},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list."},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return taskFoundAndDeleted;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":124}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task."},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class SampleDataUtil {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" return new Person[] {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"),"},{"lineNumber":28,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),"},{"lineNumber":29,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"),"},{"lineNumber":32,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),"},{"lineNumber":33,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"),"},{"lineNumber":36,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),"},{"lineNumber":37,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"),"},{"lineNumber":40,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),"},{"lineNumber":41,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"),"},{"lineNumber":44,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),"},{"lineNumber":45,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"),"},{"lineNumber":48,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))"},{"lineNumber":49,"author":{"gitId":"-"},"content":" };"},{"lineNumber":50,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return sampleAb;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given."},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (String s : strings) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}."},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found."},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format."},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook cannot be null."},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException if there was any problem writing to the file."},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBook(ReadOnlyAddressBook addressBook, String args) throws IOException;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" void changeFilePath(String fp, UserPrefs u);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" //@author"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":20,"jeffreygohkw":1,"-":31}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * @param filePath"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath() + \"-backup.xml\");"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));"},{"lineNumber":109,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":22,"jeffreygohkw":8,"-":92}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private String name;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private String phone;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String email;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private String address;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private String remark;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson."},{"lineNumber":52,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":53,"author":{"gitId":"-"},"content":" */"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use."},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().fullName;"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().isPrivate();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().isPrivate();"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().isPrivate();"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().isPrivate();"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().isPrivate();"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object."},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, tags);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":66,"wangyiming1019":3,"-":43}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private String name;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private String description;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private String deadline;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private String priority;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private String state;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use."},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" priority \u003d source.getPriority().value;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object."},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, new Assignees(), state);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":61}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format."},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,"},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);"},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location."},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath + \"-backup.xml\");"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook."},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":17,"-":74}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private WebView browser;"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public BrowserPanel() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page."},{"lineNumber":48,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" loadDefaultPage();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().isPrivate()) {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().fullName.replaceAll(\" \", \"+\")"},{"lineNumber":64,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027saddress if their address is not private"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void loadPage(String url) {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a default HTML file with a background that matches the general theme."},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDefaultPage() {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(defaultPage.toExternalForm());"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * Frees resources allocated to the browser."},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" public void freeResources() {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" browser \u003d null;"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" loadPersonPage(event.getNewSelection().person);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":66,"-":48}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed."},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Stage primaryStage;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container"},{"lineNumber":58,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":65,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":71,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":92,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":98,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":101,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":" // Set dependencies"},{"lineNumber":108,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":110,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":111,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" // Configure the UI"},{"lineNumber":114,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());"},{"lineNumber":115,"author":{"gitId":"-"},"content":" setIcon(ICON);"},{"lineNumber":116,"author":{"gitId":"-"},"content":" setWindowMinSize();"},{"lineNumber":117,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());"},{"lineNumber":119,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" setAccelerators();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return primaryStage;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the accelerator of a MenuItem."},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param keyCombination the KeyCombination value of the accelerator"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.setAccelerator(keyCombination);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" /*"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" * TODO: the code below can be removed once the bug reported here"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" * is fixed in later version of SDK."},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * consume function-key events. Because CommandBox contains a TextField, and"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * not work when the focus is in them because the key event is consumed by"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * the TextInputControl(s)."},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * For now, we add following event filter to capture such key events and open"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * help window purposely so to support accelerators even when focus is"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * in CommandBox or ResultDisplay."},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.getOnAction().handle(new ActionEvent());"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" event.consume();"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" });"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself."},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Fills up all the placeholders of this window."},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" void fillInnerParts() {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" browserPanel \u003d new BrowserPanel();"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" CommandBox commandBox \u003d new CommandBox(logic);"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" void hide() {"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.hide();"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" private void setTitle(String appTitle) {"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setTitle(appTitle);"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the given image as the icon of the main window."},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" private void setIcon(String iconSource) {"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default size based on user preferences."},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowMinSize() {"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinWidth(MIN_WIDTH);"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the current size and the position of the main Window."},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" GuiSettings getCurrentGuiSetting() {"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command"},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {"},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" personListPanel.increaseFontSize();"},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.increaseFontSize();"},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command"},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {"},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":" personListPanel.decreaseFontSize();"},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.decreaseFontSize();"},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command"},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {"},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" personListPanel.resetFontSize();"},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.resetFontSize();"},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":294,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Opens the help window."},{"lineNumber":296,"author":{"gitId":"-"},"content":" */"},{"lineNumber":297,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":298,"author":{"gitId":"-"},"content":" public void handleHelp() {"},{"lineNumber":299,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();"},{"lineNumber":300,"author":{"gitId":"-"},"content":" helpWindow.show();"},{"lineNumber":301,"author":{"gitId":"-"},"content":" }"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" void show() {"},{"lineNumber":304,"author":{"gitId":"-"},"content":" primaryStage.show();"},{"lineNumber":305,"author":{"gitId":"-"},"content":" }"},{"lineNumber":306,"author":{"gitId":"-"},"content":""},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog"},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" raise(new OpenRequestEvent());"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" raise(new SaveAsRequestEvent());"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":361,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":362,"author":{"gitId":"-"},"content":" private void handleExit() {"},{"lineNumber":363,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());"},{"lineNumber":364,"author":{"gitId":"-"},"content":" }"},{"lineNumber":365,"author":{"gitId":"-"},"content":""},{"lineNumber":366,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {"},{"lineNumber":367,"author":{"gitId":"-"},"content":" return this.personListPanel;"},{"lineNumber":368,"author":{"gitId":"-"},"content":" }"},{"lineNumber":369,"author":{"gitId":"-"},"content":""},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":374,"author":{"gitId":"-"},"content":" void releaseResources() {"},{"lineNumber":375,"author":{"gitId":"-"},"content":" browserPanel.freeResources();"},{"lineNumber":376,"author":{"gitId":"-"},"content":" }"},{"lineNumber":377,"author":{"gitId":"-"},"content":""},{"lineNumber":378,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":379,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {"},{"lineNumber":380,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":381,"author":{"gitId":"-"},"content":" handleHelp();"},{"lineNumber":382,"author":{"gitId":"-"},"content":" }"},{"lineNumber":383,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":212,"Esilocke":8,"-":121}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later."},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":40,"author":{"gitId":"-"},"content":" *"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultipler;"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":69,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":70,"author":{"gitId":"-"},"content":" initTags(person);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));"},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" });"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" * @param tag"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @return"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * @param person"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" });"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":139,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":140,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":146,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":151,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;"},{"lineNumber":152,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":153,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" return name;"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return phone;"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return address;"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return email;"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":69,"wangyiming1019":37,"-":81}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Panel containing the list of persons."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d 0;"},{"lineNumber":39,"author":{"gitId":"-"},"content":" setConnections(personList);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));"},{"lineNumber":46,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":56,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":" });"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" });"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":103,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}."},{"lineNumber":108,"author":{"gitId":"-"},"content":" */"},{"lineNumber":109,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":112,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {"},{"lineNumber":116,"author":{"gitId":"-"},"content":" setGraphic(null);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" setText(null);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());"},{"lineNumber":120,"author":{"gitId":"-"},"content":" }"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":38,"-":86}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // short circuit if same object"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" return true;"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" // instanceof handles nulls"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" if (!(other instanceof TaskCard)) {"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return false;"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // state check"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" TaskCard card \u003d (TaskCard) other;"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 task.equals(card.task);"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" return taskName;"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return description;"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return deadline;"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return priority;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":63,"Esilocke":75}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks."},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d 0;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map("},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it."},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}."},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" setText(null);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":29,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component"},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */"},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */"},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");"},{"lineNumber":50,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" //Set the application icon."},{"lineNumber":53,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts"},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (Throwable e) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());"},{"lineNumber":69,"author":{"gitId":"-"},"content":" mainWindow.hide();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters."},{"lineNumber":92,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog."},{"lineNumber":93,"author":{"gitId":"-"},"content":" */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,"},{"lineNumber":95,"author":{"gitId":"-"},"content":" String contentText) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");"},{"lineNumber":98,"author":{"gitId":"-"},"content":" alert.initOwner(owner);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" alert.setTitle(title);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.showAndWait();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},"},{"lineNumber":108,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog."},{"lineNumber":109,"author":{"gitId":"-"},"content":" */"},{"lineNumber":110,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));"},{"lineNumber":112,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());"},{"lineNumber":113,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" System.exit(1);"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":122,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,"},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.exception);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":4,"-":120}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" });"},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));"},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data."},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully."},{"lineNumber":97,"author":{"gitId":"-"},"content":" */"},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel."},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}."},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}."},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected."},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card."},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected."},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task."},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list."},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list."},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list."},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call."},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list."},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code AddCommand}."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class AddCommandIntegrationTest {"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,"},{"lineNumber":38,"author":{"gitId":"-"},"content":" String.format(AddCommand.MESSAGE_SUCCESS, validPerson), expectedModel);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Generates a new {@code AddCommand} which upon execution, adds {@code person} into the {@code model}."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" private AddCommand prepareCommand(Person person, Model model) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":53}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddCommandTest {"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d getAddCommandForTask(validTask, modelStub).execute();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddCommand.MESSAGE_TASK_SUCCESS, validTask), commandResult.feedbackToUser);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_TASK);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" getAddCommandForTask(validTask, modelStub).execute();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommand \u003d new AddCommand(paper);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" AddCommand addPencilCommand \u003d new AddCommand(pencil);"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":104,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommandCopy \u003d new AddCommand(paper);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":110,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false"},{"lineNumber":118,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" // add person vs add task -\u003e returns false"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertFalse(addAliceCommand.equals(addPaperCommand));"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person."},{"lineNumber":127,"author":{"gitId":"-"},"content":" */"},{"lineNumber":128,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {"},{"lineNumber":129,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":131,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddCommand with the details of the given person."},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private AddCommand getAddCommandForTask(Task task, Model model) {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AddCommand command \u003d new AddCommand(task);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing."},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":150,"author":{"gitId":"-"},"content":" }"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":158,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }"},{"lineNumber":166,"author":{"gitId":"-"},"content":""},{"lineNumber":167,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":168,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":170,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":184,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":185,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {"},{"lineNumber":186,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":187,"author":{"gitId":"-"},"content":" }"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":196,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":198,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":217,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":219,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":220,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }"},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":264,"author":{"gitId":"-"},"content":" }"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateDataException when trying to add a person or task."},{"lineNumber":268,"author":{"gitId":"-"},"content":" */"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {"},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":271,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":272,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":273,"author":{"gitId":"-"},"content":" }"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":281,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":282,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":283,"author":{"gitId":"-"},"content":" }"},{"lineNumber":284,"author":{"gitId":"-"},"content":" }"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added."},{"lineNumber":288,"author":{"gitId":"-"},"content":" */"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingObjectAdded extends ModelStub {"},{"lineNumber":290,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":292,"author":{"gitId":"-"},"content":""},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));"},{"lineNumber":296,"author":{"gitId":"-"},"content":" }"},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":304,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":305,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":306,"author":{"gitId":"-"},"content":" }"},{"lineNumber":307,"author":{"gitId":"-"},"content":" }"},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":121,"wangyiming1019":24,"-":160}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}."},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_addSuccessful() throws Exception {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_addSuccessful() throws Exception {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_addSuccessful() throws Exception {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets."},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index task) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, task);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":120}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").build();"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"false\").build();"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").build();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":129}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandTest {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":33,"author":{"gitId":"-"},"content":" */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands."},{"lineNumber":35,"author":{"gitId":"-"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_FAVOURITE \u003d \"false\";"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017\";"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017\";"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_AMY;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_BOB;"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_AMY;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_BOB;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_AMY;"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_BOB;"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_AMY;"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_BOB;"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_AMY;"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_BOB;"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"20-20-20000\"; // bad date format"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_AMY;"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_BOB;"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PENCIL;"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PAPER;"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" static {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)"},{"lineNumber":110,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_AMY).withFavourite(VALID_FAVOURITE)"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":114,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_BOB).withFavourite(VALID_FAVOURITE)"},{"lineNumber":116,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":128,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}"},{"lineNumber":129,"author":{"gitId":"-"},"content":" */"},{"lineNumber":130,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,"},{"lineNumber":131,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged"},{"lineNumber":146,"author":{"gitId":"-"},"content":" */"},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {"},{"lineNumber":148,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can"},{"lineNumber":149,"author":{"gitId":"-"},"content":" // only do so by copying its components."},{"lineNumber":150,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());"},{"lineNumber":151,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" command.execute();"},{"lineNumber":155,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":156,"author":{"gitId":"-"},"content":" } catch (CommandException e) {"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());"},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book."},{"lineNumber":165,"author":{"gitId":"-"},"content":" */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" final String[] splitName \u003d person.getName().fullName.split(\"\\\\s+\");"},{"lineNumber":169,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;"},{"lineNumber":172,"author":{"gitId":"-"},"content":" }"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":175,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":176,"author":{"gitId":"-"},"content":" */"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":179,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":180,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);"},{"lineNumber":181,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {"},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);"},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":12,"Esilocke":34,"wangyiming1019":16,"-":128}},{"path":"src/test/java/seedu/address/logic/commands/DeleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeleteCommand}."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class DeleteCommandTest {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":72,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommand \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteSecondCommand \u003d new DeleteCommand(INDEX_SECOND_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommandCopy \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns a {@code DeleteCommand} with the parameter {@code index}."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" private DeleteCommand prepareCommand(Index index, int type) {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(index, type);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" deleteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return deleteCommand;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":112,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one."},{"lineNumber":113,"author":{"gitId":"-"},"content":" */"},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":12,"-":107}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}."},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_addSuccessful() throws Exception {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_addSuccessful() throws Exception {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_addSuccessful() throws Exception {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets."},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index task) {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, task);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":121}},{"path":"src/test/java/seedu/address/logic/commands/EditCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditCommand."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class EditCommandTest {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(indexLastPerson, descriptor);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));"},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book"},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":167,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex, descriptor);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book"},{"lineNumber":185,"author":{"gitId":"-"},"content":" */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex,"},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":201,"author":{"gitId":"-"},"content":" final EditCommand standardCommand \u003d new EditCommand(INDEX_FIRST_PERSON, DESC_AMY);"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);"},{"lineNumber":205,"author":{"gitId":"-"},"content":" EditCommand commandWithSameValues \u003d new EditCommand(INDEX_FIRST_PERSON, copyDescriptor);"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false"},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_SECOND_PERSON, DESC_AMY)));"},{"lineNumber":219,"author":{"gitId":"-"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false"},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_BOB)));"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":225,"author":{"gitId":"-"},"content":" * Returns an {@code EditCommand} with parameters {@code index} and {@code descriptor}"},{"lineNumber":226,"author":{"gitId":"-"},"content":" */"},{"lineNumber":227,"author":{"gitId":"-"},"content":" private EditCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {"},{"lineNumber":228,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d new EditCommand(index, descriptor);"},{"lineNumber":229,"author":{"gitId":"-"},"content":" editCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" return editCommand;"},{"lineNumber":231,"author":{"gitId":"-"},"content":" }"},{"lineNumber":232,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":2,"-":169}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent() throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public AddressBook prepareAddressBook() throws DuplicatePersonException {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":54}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code FindCommand}."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class FindCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d"},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" FindCommand findFirstCommand \u003d new FindCommand(firstPredicate);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" FindCommand findSecondCommand \u003d new FindCommand(secondPredicate);"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":47,"author":{"gitId":"-"},"content":" FindCommand findFirstCommandCopy \u003d new FindCommand(firstPredicate);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\" \");"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Parses {@code userInput} into a {@code FindCommand}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" */"},{"lineNumber":77,"author":{"gitId":"-"},"content":" private FindCommand prepareCommand(String userInput) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" FindCommand command \u003d"},{"lineNumber":79,"author":{"gitId":"-"},"content":" new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":89,"author":{"gitId":"-"},"content":" */"},{"lineNumber":90,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(FindCommand command, String expectedMessage, List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":92,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}."},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}."},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index."},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}."},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}."},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class RedoCommandTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":40,"author":{"gitId":"-"},"content":" Collections.emptyList(), Arrays.asList(deleteCommandTwo, deleteCommandOne));"},{"lineNumber":41,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in redoStack"},{"lineNumber":46,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // single command in redoStack"},{"lineNumber":50,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // no command in redoStack"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":6,"-":50}},{"path":"src/test/java/seedu/address/logic/commands/SelectCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectCommand}."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class SelectCommandTest {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":70,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommand \u003d new SelectCommand(INDEX_FIRST_PERSON);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" SelectCommand selectSecondCommand \u003d new SelectCommand(INDEX_SECOND_PERSON);"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":85,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommandCopy \u003d new SelectCommand(INDEX_FIRST_PERSON);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(1));"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(null));"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * is raised with the correct index."},{"lineNumber":101,"author":{"gitId":"-"},"content":" */"},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d selectCommand.execute();"},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertEquals(String.format(SelectCommand.MESSAGE_SELECT_PERSON_SUCCESS, index.getOneBased()),"},{"lineNumber":108,"author":{"gitId":"-"},"content":" commandResult.feedbackToUser);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" JumpToListRequestEvent lastEvent \u003d (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":119,"author":{"gitId":"-"},"content":" * is thrown with the {@code expectedMessage}."},{"lineNumber":120,"author":{"gitId":"-"},"content":" */"},{"lineNumber":121,"author":{"gitId":"-"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" selectCommand.execute();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":127,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }"},{"lineNumber":131,"author":{"gitId":"-"},"content":" }"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns a {@code SelectCommand} with parameters {@code index}."},{"lineNumber":135,"author":{"gitId":"-"},"content":" */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" private SelectCommand prepareCommand(Index index) {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d new SelectCommand(index);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" selectCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":139,"author":{"gitId":"-"},"content":" return selectCommand;"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":139}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setCompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, setCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}."},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setIncompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, setIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class UndoCommandTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":40,"author":{"gitId":"-"},"content":" Arrays.asList(deleteCommandOne, deleteCommandTwo), Collections.emptyList());"},{"lineNumber":41,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" deleteCommandOne.execute();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteCommandTwo.execute();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" // multiple commands in undoStack"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" // single command in undoStack"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no command in undoStack"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":51}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/parser/AddCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class AddCommandParserTest {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY)"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" // multiple names - last name accepted"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // multiple tags - all accepted"},{"lineNumber":95,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":97,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,"},{"lineNumber":100,"author":{"gitId":"-"},"content":" new AddCommand(expectedPersonMultipleTags));"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" // zero tags"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY, new AddCommand(expectedPerson));"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":143,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE);"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" // missing name prefix"},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB"},{"lineNumber":148,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" // missing phone prefix"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + VALID_PHONE_BOB"},{"lineNumber":152,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" // missing email prefix"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":156,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" // missing address prefix"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":160,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + VALID_ADDRESS_BOB, expectedMessage);"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" // all prefixes missing"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB"},{"lineNumber":164,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }"},{"lineNumber":166,"author":{"gitId":"-"},"content":""},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE);"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" // missing description prefix"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" // missing deadline prefix"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + VALID_DEADLINE_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" // missing priority prefix"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" // invalid phone"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" // invalid email"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" // invalid tag"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" // invalid deadline"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" // invalid priority"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Priority.MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }"},{"lineNumber":236,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":33,"Esilocke":89,"-":114}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command \u003d (AddCommand) parser.parseCommand(TaskUtil.getAddCommand(task));"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddCommand(task), command);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \""},{"lineNumber":92,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person));"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \""},{"lineNumber":97,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(task), command);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD) instanceof ClearCommand);"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS) instanceof ClearCommand);"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {"},{"lineNumber":166,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":167,"author":{"gitId":"-"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {"},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);"},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \""},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":209,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":210,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \""},{"lineNumber":211,"author":{"gitId":"-"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));"},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":222,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {"},{"lineNumber":223,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":224,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":225,"author":{"gitId":"wangyiming1019"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \""},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));"},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \""},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD + \" \""},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS + \" \""},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":255,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":256,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":257,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD) instanceof ExitCommand);"},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\") instanceof ExitCommand);"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":263,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":265,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":266,"author":{"gitId":"-"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);"},{"lineNumber":273,"author":{"gitId":"-"},"content":" }"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":276,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {"},{"lineNumber":277,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":278,"author":{"gitId":"wangyiming1019"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":279,"author":{"gitId":"wangyiming1019"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":280,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \""},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);"},{"lineNumber":286,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":287,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":288,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":289,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {"},{"lineNumber":290,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":291,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":292,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":293,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":294,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":295,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":296,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":297,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {"},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":302,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":303,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":304,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":305,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":306,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":307,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {"},{"lineNumber":308,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD) instanceof HelpCommand);"},{"lineNumber":309,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\") instanceof HelpCommand);"},{"lineNumber":310,"author":{"gitId":"-"},"content":" }"},{"lineNumber":311,"author":{"gitId":"-"},"content":""},{"lineNumber":312,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":313,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {"},{"lineNumber":314,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD) instanceof HistoryCommand);"},{"lineNumber":315,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\") instanceof HistoryCommand);"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":318,"author":{"gitId":"-"},"content":" parser.parseCommand(\"histories\");"},{"lineNumber":319,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":320,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {"},{"lineNumber":321,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":322,"author":{"gitId":"-"},"content":" }"},{"lineNumber":323,"author":{"gitId":"-"},"content":" }"},{"lineNumber":324,"author":{"gitId":"-"},"content":""},{"lineNumber":325,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":326,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {"},{"lineNumber":327,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS) instanceof HistoryCommand);"},{"lineNumber":328,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\") instanceof HistoryCommand);"},{"lineNumber":329,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":330,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":331,"author":{"gitId":"wangyiming1019"},"content":" parser.parseCommand(\"histories\");"},{"lineNumber":332,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":333,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {"},{"lineNumber":334,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":335,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":336,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":337,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":338,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":339,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {"},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD) instanceof ListCommand);"},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\") instanceof ListCommand);"},{"lineNumber":342,"author":{"gitId":"-"},"content":" }"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":345,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {"},{"lineNumber":346,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS) instanceof ListCommand);"},{"lineNumber":347,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\") instanceof ListCommand);"},{"lineNumber":348,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":349,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":350,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":351,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {"},{"lineNumber":352,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":353,"author":{"gitId":"-"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":354,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":355,"author":{"gitId":"-"},"content":" }"},{"lineNumber":356,"author":{"gitId":"-"},"content":""},{"lineNumber":357,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":358,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {"},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":360,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":361,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":362,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":363,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":380,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":381,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWord() throws Exception {"},{"lineNumber":382,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD) instanceof BackupCommand);"},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":386,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWordWithInput() throws Exception {"},{"lineNumber":387,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD + \" test.xml\") instanceof BackupCommand);"},{"lineNumber":388,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":389,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":390,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":391,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAlias() throws Exception {"},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS) instanceof BackupCommand);"},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":396,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAliasWithInput() throws Exception {"},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS + \" test.xml\") instanceof BackupCommand);"},{"lineNumber":398,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {"},{"lineNumber":402,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD) instanceof RedoCommand);"},{"lineNumber":403,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"redo 1\") instanceof RedoCommand);"},{"lineNumber":404,"author":{"gitId":"-"},"content":" }"},{"lineNumber":405,"author":{"gitId":"-"},"content":""},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD"},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":436,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {"},{"lineNumber":438,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD) instanceof UndoCommand);"},{"lineNumber":439,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"undo 3\") instanceof UndoCommand);"},{"lineNumber":440,"author":{"gitId":"-"},"content":" }"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {"},{"lineNumber":444,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":445,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":446,"author":{"gitId":"-"},"content":" parser.parseCommand(\"\");"},{"lineNumber":447,"author":{"gitId":"-"},"content":" }"},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {"},{"lineNumber":451,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":452,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":453,"author":{"gitId":"-"},"content":" parser.parseCommand(\"unknownCommand\");"},{"lineNumber":454,"author":{"gitId":"-"},"content":" }"},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal"},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command"},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command"},{"lineNumber":461,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal"},{"lineNumber":462,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":463,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {"},{"lineNumber":464,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());"},{"lineNumber":465,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":466,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":75,"Esilocke":147,"wangyiming1019":80,"-":148}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * outside of the DeleteCommand code. For example, inputs \"1\" and \"1 abc\" take the"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * same path through the DeleteCommand, and therefore we test only one of them."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class DeleteCommandParserTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\","},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_TASK));"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\","},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\","},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":52,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":23,"-":29}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \","},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate("},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectCommandParserTest}."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectCommandParserTest"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"asc\","},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"desc\","},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"name\","},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"phone\","},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"email\","},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"address\","},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no field or order"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\","},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArguments_success() throws ParseException {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand expectedCommand;"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand actualCommand;"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"asc\");"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name asc\");"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"desc\");"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name desc\");"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"asc\");"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone asc\");"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"desc\");"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone desc\");"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"asc\");"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email asc\");"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"desc\");"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email desc\");"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"asc\");"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address asc\");"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"desc\");"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address desc\");"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":101}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice"},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints."},{"lineNumber":190,"author":{"gitId":"-"},"content":" */"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();"},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":" }"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":106,"Esilocke":18,"-":93}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.isPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":20}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.isPrivate());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":39}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name"},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.isPrivate());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":25}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.isPrivate());"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":24}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"-04-17\")); // missing day"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04--17\")); // missing month"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04\")); // missing year"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"day-04-17\")); // invalid day"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-month-17\")); // invalid month"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-year\")); // invalid year"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"32-04-17\")); // impossible day"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-13-17\")); // impossible month"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04--1\")); // impossible year"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"0-04-17\")); // incomplete day"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-0-17\")); // incomplete month"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-1\")); // incomplete year"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-201\")); // incomplete year"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04/17\")); // inconsistent separators"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-042017\")); // missing separator"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // valid deadlines"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04/04/2017\")); // slashes"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04.04.2017\")); // dots"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":44}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"0\")); // priority out of range"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));"},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class."},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class."},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),"},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called"},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder"},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored."},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method"},{"lineNumber":61,"author":{"gitId":"-"},"content":" */"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back"},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back"},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));"},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path"},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified"},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}."},{"lineNumber":112,"author":{"gitId":"-"},"content":" */"},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));"},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());"},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());"},{"lineNumber":36,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":53,"author":{"gitId":"-"},"content":" */"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }"},{"lineNumber":84,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}"},{"lineNumber":101,"author":{"gitId":"-"},"content":" * that we are building."},{"lineNumber":102,"author":{"gitId":"-"},"content":" */"},{"lineNumber":103,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));"},{"lineNumber":106,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" return descriptor;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":9,"-":101}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return descriptor;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonBuilder {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private Person person;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public PersonBuilder() {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" defaultRemark, defaultTags);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));"},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building."},{"lineNumber":80,"author":{"gitId":"-"},"content":" */"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));"},{"lineNumber":108,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building."},{"lineNumber":116,"author":{"gitId":"-"},"content":" */"},{"lineNumber":117,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));"},{"lineNumber":120,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building."},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" public Person build() {"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return this.person;"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":18,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects."},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().isPrivate());"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().isPrivate());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().isPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().isPrivate());"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":91}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * A utility class for Person."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class PersonUtil {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" return AddCommand.COMMAND_WORD + \" \" + getPersonDetails(person);"},{"lineNumber":23,"author":{"gitId":"-"},"content":" }"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" sb.append(PREFIX_NAME + person.getName().fullName + \" \");"},{"lineNumber":31,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");"},{"lineNumber":35,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach("},{"lineNumber":36,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")"},{"lineNumber":37,"author":{"gitId":"-"},"content":" );"},{"lineNumber":38,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"-":38}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Task task;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}."},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building."},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building."},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building."},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building."},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building."},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public Task build() {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" return this.task;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" return AddCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + task.getPriority().value + \" \");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return sb.toString();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":35}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests."},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class TypicalPersons {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":31,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")"},{"lineNumber":33,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")"},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // Manually added"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_AMY)"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_BOB)"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":71,"author":{"gitId":"-"},"content":" */"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" ab.addPerson(person);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" assert false : \"not possible\";"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return ab;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":15,"wangyiming1019":15,"-":67}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests."},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").build();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\")"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").build();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).build();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").build();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").build();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).build();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\").build();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":76}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" // default web page"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // associated web page of a person"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" postNow(selectionChangedEventStub);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedPersonUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + ALICE.getName().fullName.replaceAll(\" \", \"+\") + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPersonUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":31,"-":34}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultipler());"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier + 1);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags"},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card"},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" });"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock"},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock"},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated"},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());"},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final JumpToListRequestEvent JUMP_TO_SECOND_EVENT \u003d new"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" JumpToListRequestEvent(INDEX_SECOND_PERSON);"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void handleJumpToListRequestEvent() {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"}"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""}],"authorContributionMap":{"charlesgoh":60}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing."},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"-":94}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards."},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),"},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}."},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getPriority().value, actualCard.getPriority());"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":24,"-":72}},{"path":"src/test/java/seedu/address/ui/testutil/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.GuiUnitTest;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // no tags"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public void equals() {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}."},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * -\u003e added"},{"lineNumber":66,"author":{"gitId":"-"},"content":" */"},{"lineNumber":67,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" String command \u003d \" \" + AddCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */"},{"lineNumber":73,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */"},{"lineNumber":89,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in"},{"lineNumber":91,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)"},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */"},{"lineNumber":111,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":120,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */"},{"lineNumber":132,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()"},{"lineNumber":134,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */"},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */"},{"lineNumber":143,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;"},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */"},{"lineNumber":149,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" 1\");"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e rejected */"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e rejected */"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */"},{"lineNumber":173,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":184,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":185,"author":{"gitId":"-"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }"},{"lineNumber":196,"author":{"gitId":"-"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":198,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and verifies that the command box displays"},{"lineNumber":199,"author":{"gitId":"-"},"content":" * an empty string, the result display box displays the success message of executing {@code AddCommand} with the"},{"lineNumber":200,"author":{"gitId":"-"},"content":" * details of {@code toAdd}, and the model related components equal to the current model added with {@code toAdd}."},{"lineNumber":201,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":203,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,"},{"lineNumber":204,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged."},{"lineNumber":205,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":206,"author":{"gitId":"-"},"content":" */"},{"lineNumber":207,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":212,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * instead."},{"lineNumber":214,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)"},{"lineNumber":215,"author":{"gitId":"-"},"content":" */"},{"lineNumber":216,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {"},{"lineNumber":217,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":218,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":219,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);"},{"lineNumber":220,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":221,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result"},{"lineNumber":230,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to"},{"lineNumber":231,"author":{"gitId":"-"},"content":" * {@code expectedModel}."},{"lineNumber":232,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)"},{"lineNumber":233,"author":{"gitId":"-"},"content":" */"},{"lineNumber":234,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":235,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":236,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":245,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":247,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":248,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":249,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":250,"author":{"gitId":"-"},"content":" */"},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":252,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }"},{"lineNumber":260,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":34,"-":226}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void clear() {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared"},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS, TYPE_ALL);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */"},{"lineNumber":41,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":42,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":48,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model."},{"lineNumber":63,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes."},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":74,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)"},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":88,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":89,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":93,"author":{"gitId":"-"},"content":" */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":6,"-":97}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited"},{"lineNumber":64,"author":{"gitId":"-"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson("},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */"},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":93,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":110,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;"},{"lineNumber":111,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":112,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":117,"author":{"gitId":"-"},"content":" */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":121,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * browser url changes"},{"lineNumber":127,"author":{"gitId":"-"},"content":" */"},{"lineNumber":128,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":130,"author":{"gitId":"-"},"content":" selectPerson(index);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":133,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the"},{"lineNumber":134,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,"},{"lineNumber":141,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,"},{"lineNumber":145,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":148,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":150,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":158,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,"},{"lineNumber":162,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,"},{"lineNumber":166,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,"},{"lineNumber":170,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,"},{"lineNumber":174,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */"},{"lineNumber":177,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));"},{"lineNumber":179,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));"},{"lineNumber":181,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that"},{"lineNumber":193,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged."},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list"},{"lineNumber":195,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)"},{"lineNumber":196,"author":{"gitId":"-"},"content":" */"},{"lineNumber":197,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e"},{"lineNumber":203,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e"},{"lineNumber":204,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being"},{"lineNumber":205,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e"},{"lineNumber":206,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list."},{"lineNumber":207,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":208,"author":{"gitId":"-"},"content":" */"},{"lineNumber":209,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,"},{"lineNumber":210,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":211,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":212,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" expectedModel.updatePerson("},{"lineNumber":214,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);"},{"lineNumber":215,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":216,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {"},{"lineNumber":217,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException("},{"lineNumber":218,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,"},{"lineNumber":222,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);"},{"lineNumber":223,"author":{"gitId":"-"},"content":" }"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the"},{"lineNumber":227,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged."},{"lineNumber":228,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":229,"author":{"gitId":"-"},"content":" */"},{"lineNumber":230,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":235,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":236,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":237,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":238,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":239,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at"},{"lineNumber":240,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":247,"author":{"gitId":"-"},"content":" */"},{"lineNumber":248,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":249,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":250,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":251,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":272,"author":{"gitId":"-"},"content":" */"},{"lineNumber":273,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":274,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":275,"author":{"gitId":"-"},"content":""},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":277,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":281,"author":{"gitId":"-"},"content":" }"},{"lineNumber":282,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":13,"-":269}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,"},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" });"},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":70}}] +[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface).","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"* It is a Java application primarily targeted for students doing group projects.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"_Marco Jakob_.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":7,"-":26}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Charles Goh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://charlesgoh.me[homepage]] [https://github.com/charlesgoh[github]]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Jeffrey Goh","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Kelvin Lin","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esiloke[github]]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Wang Yi Ming","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1090[github]]","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"-":26}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started].","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"The `Storage` component,","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go.","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size. The first way is through the UI. The Class Diagram for this","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":"procedure is shown below:","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"The other method of calling changes in font size is through a CLI command. When the relevant command is entered,","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"the Command class calls MainWindow. The rest of the process flow is identical to that of the UI triggered font size","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"command.","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of Task-related commands +","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Create new classes for all new commands +","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Simpler to implement. +","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure.","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Storage of Task objects +","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage.","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons** Any changes to the Person or Task","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" // ... list logic ...","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" // ... undo logic ...","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" executeUndoableCommand();","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" // ... delete logic ...","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct.","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the add, delete, list, select, and edit commands.","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Instead of making a new Logic object for each new command, polymorphism is used to implement the \"Task\" version of each command.","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"An example of using polymorphism to handle Person vs Task addition:","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":"public class AddCommand extends Command {","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Person(person);","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Task(task);","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_TASK;","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"The AddCommand will thus call a different constructor depending on the type of the argument supplied to it. To facilitate this, the respective Parser class must also be modified:","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(toAdd);","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The AddCommandParser checks the args to see if this is a task, then creates the object to be added, and creates a new AddCommand to handle the result. +","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"To support the addition of Task objects, the Storage component is modified to accept Task objects in a similar manner as to how Person objects are being stored.","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"[source, html]","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"Tasks objects are stored in the same level of hierarchy as Person objects, and during startup, are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book.","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Create new classes for all new commands +","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"**Pros:** Simpler to implement. +","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure.","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa.","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage.","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes.","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` method in UniquePersonList. It supports","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field.","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator.","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class.","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for this sort command implementation is shown below:","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort name desc`. The following sequence diagram","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works.","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted. The resulting list","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"charlesgoh"},"content":"is not returned, but will be reflected in the application\u0027s storage and graphical user interface.","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` class. +","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the person lists. Future changes to the implementation will be easier as a consequence. +","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList` will have to rely on the `SortCommand` class.","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for both user and developer and reduced complexity in implementation. +","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system.","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"charlesgoh"},"content":"The backup command makes use of both the model manager and the storage manager. The `LogicManager` class was","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"charlesgoh"},"content":"improved to support the accessing of storage value.","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"charlesgoh"},"content":"The backup command arguments are parsed through the `BackupCommandParser`, which passes control over to the","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class. If there is a file path specified by the user, then the `execute()` command within the","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class will save the backup file to that path. If not file path is specified, the backup file will be","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"charlesgoh"},"content":"saved to a default location.","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup`. The backup file will be saved to a default location:","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDefaultDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup testBackup.xml`. The following sequence diagram","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"charlesgoh"},"content":"demonstrates how this works:","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceCustomDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted.","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement backup command via Command Line Interface +","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Backing up data is easier and faster for users who are familiar with the commands. Less button clicks. +","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":"**Cons:** UI not as intuitive. Users who are not familiar with the application may not know about this feature +","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement backup command via GUI +","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for all users since the options are all graphical +","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hinders productivity. Excessive number of clicks to accomplish an essential task.","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Custom and/or Default file paths for backup file +","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implemented both types of commands +","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"charlesgoh"},"content":"**Pros:** User can choose either command option. Gives the user more choices +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May seem confusing to the user at first +","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement only the default option (save backup file to data directory of application) +","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Faster for the user to key in one word rather than a command with many words +","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Reduces choice for experienced users who may want to save to another location or use a different save name","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email` and `Address` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not.","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes.","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field.","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor.","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`.","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : Sequence Diagram for adding a Person with private fields_","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"jeffreygohkw"},"content":"@Override","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI.","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name.","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`.","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`.","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same.","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was.","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`.","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false.","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object.","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing.","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to.","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users.","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`.","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below.","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"_Figure 3.6.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object.","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`.","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`.","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`.","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`.","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`.","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all.","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"-"},"content":"**Alternative 2:** Enhance the functi-onality of EditCommand. +","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data.","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of `Person`s, a `CommandException` will be thrown.","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution.","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":"This code for this can be found below:","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"@Override","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"-"},"content":"_Figure 3.7.1 : Sequence Diagram for Locating a Person\u0027s Address_","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Create a seperate command `locate`. +","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users.","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`.","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once.","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`addtag 1 2 3 t/friends`) will be executed.","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"-"},"content":"The same operation will happen for `deletetag` command.","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"-"},"content":"in a similar way.","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book.","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"-"},"content":"public class AddTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"-"},"content":" // check whether the index within the range","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"-"},"content":" return new CommandResult();","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"-"},"content":"Suppose the user enter the `addtag 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"-"},"content":"_Figure 3.8.1 : Add Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"-"},"content":"The `deletetag` command works the same as `addtag` command with different name only.","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception.","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `addtag` and `deletetag` +","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list.","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle.","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `addtag` and `deletetag` +","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner.","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book.","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"-"},"content":"The `findtag` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`.","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first.","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar.","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences.","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`.","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String.","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"is for the tags to be excluded.","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"Suppose the user enter `findtag friends` command. The following sequence diagram shows how the find tag command works:","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"_Figure 3.9.1 : Find Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list.","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `findtag` +","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `findtag` +","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `findtag` command will be similar to the `find` command. +","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `findtag` in `FindCommand`. +","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things.","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":"*Logging Levels*","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation.","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":"There are three ways to run tests.","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"We have two types of tests:","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":"|`* * *` |user |add a new person |","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |first-time user |be able to see a user guide when I first start the program |be clear on how to use it","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with many social media accounts |be able to add my contacts\u0027 social media accounts to the address book |improve connectivity and learn more about my contacts","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|`*` |user with many persons in the address book |sort persons by name |locate a person easily","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |non tech-savvy user |have the option to fill out certain fields |use the address book without having to use the intimidating CLI.","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |error-prone user |have minor typos auto corrected |continue using the address book without correcting my mistakes","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"-"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"-"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found.","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found.","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person.","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person.","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid.","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail.","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made.","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone.","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands.","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands.","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3.","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands.","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands.","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message.","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid.","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1.","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed.","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure.","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse.","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0.","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing.","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"-"},"content":"[[mainstream-os]]","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"-"},"content":"Mainstream OS","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data.","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"-"},"content":"\u003d\u003d Product Survey","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"-"},"content":"*Product Name*","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"-"},"content":"Author: ...","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Pros:","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"-"},"content":"Cons:","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true}],"authorContributionMap":{"charlesgoh":130,"jeffreygohkw":140,"Esilocke":169,"-":852}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT`","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"Address++ is an address book application that can store contacts, as well as maintain a list of ongoing tasks. You can use the various commands in Address++ to maintain, create, and delete your contacts, or tasks. +","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"Address++ is targeted at NUS students, such as those working on projects or assignments.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here].","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too large?","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"You can change the font sizes by clicking on the Font Size button and selecting any of the following options:","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"Keyboard shortcuts have been provided for your convenience.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"There is a limit to how much your font sizes can increase or decrease. Also, font sizes will increase for the","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"contacts entries and the todo list\u0027s entries.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"Format: `help` +","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1].","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a person/task: `add`","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book, be it a newly met project member, or your friend who is taking the same module as you. +","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"`add` can be replaced by `a` for faster input. +","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] r/[REMARK] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address` or `Remark` to be private by placing a `p` in front of the prefix. +","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears`","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"* `add n/Betsy Crowe t/friend e/betsycrowe@example.com b/29-02-1996 a/Newgate Prison p/1234567 t/criminal r/Stares at the wall`","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"* `add n/Ima Hidearu b/ a/ e/ p/ r/ t/secretive`","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"* `add n/Luke Groundswimmer p/ a/ e/ c/`","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"* `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate c/`","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"By adding the word `task`, you can use the same command to add a new task or deadline, such as a reminder of project deadlines. +","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"Format: `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"* Task deadlines should be in the format DD-MM-YYYY +","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 1 to 5 inclusive, with 5 being the highest priority +","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"* `add task n/Update documentation d/Update docs for V1.1 for CS2103T t/10-10-2017 p/4`","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"* `add task n/Buy new pencil p/2`","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a tag to persons : `addtag` (Since V1.2)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"You can use the `addtag` command to add tag for multiple persons in the address book. For example, you may wish to add tag `friends` to the first two persons in the address book. +","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"`addtag` can be replaced by `atag` for faster input. +","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"Format: `addtag INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"* You can add the tag of the person at the specific `INDEX`.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, addtag will add the tag to all contacts in the address book.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"`addtag 1 2 t/friends` +","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"Adds the friends tag of the 1st and 2nd person in the address book.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"`addtag t/acquaintance` +","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Adds the acquaintance tag to all contacts in the address book.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all persons : `list`","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts, or tasks, in the address book. +","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"Format: `list` +","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"Instead of typing out `list` every time, you can alternatively use `l` to shorten the command.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing a person : `edit`","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command.","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands.","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command.","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields.","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com` +","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/` +","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"* `edit 1 p/` +","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Removes the phone number of the 1st person.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `edit` will allow you to edit task details instead. You may wish to edit your task deadlines, for example, when your project schedule changes, or your task priorities, when a task becomes more urgent. +","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"Format: `edit task INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/5` +","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"Edits the priority of the 2nd task to be `5`.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/ t/` +","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"Removes the priority and deadline of the second task.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edittag` (Since v1.2)","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"You can use `edittag` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"`edittag` can be replaced by `et` for faster input. +","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"Format: `edittag TAGTOBERENAMED NEWTAGNAME` +","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different.","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `TAGTOBERENAMED` value.","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"* `edittag friends enemies` +","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"Changes the tag called `friends` to one called `enemies` instead. All existing contacts with a `friends` tag will now have an `enemies` tag instead.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS]`","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"Shorthand commands: `cp`","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields.","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI.","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI.","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy.","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"* `changeprivacy 1 p/false e/true` +","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Sets the phone number of the 1st person to be public and their email address to be private. The 1st person\u0027s phone number will be displayed, if available, while their email address will be hidden in the UI.","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":"* `cp 2 a/false n/true e/false` +","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":"Sets the address and email of the 2nd person to be public and their name to be private. The 2nd person\u0027s address and email will be displayed, if available, while their name will be hidden in the UI.","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite persons. For example, you may wish to set your girlfriend as your favourite contact. +","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"`favourite 2` +","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"Favourites the 2nd person in the address book.","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"`favourite 1` +","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"Favourite the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"Format: `showfavourite` +","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"`showfavourite` command: It will return an empty list if there is no favourite persons.","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"* `find John` +","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"Returns `john` and `John Doe`","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"* `find Betsy Tim John` +","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"Returns any person having names `Betsy`, `Tim`, or `John`","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `find` will allow you to sieve through your tasks, instead of your contacts. +","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"In addition to searching the name and description of tasks, you can also opt to filter your tasks by their priority. Simply include `p/PRIORITY` after all your other criteria to do so. +","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"All tasks with a priority higher than or equal to the value provided will be shown. +","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"Format: `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` (Priority search to be coming in v2.0) +","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"*Important note on `find` criteria*","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"* You can only search for names in Address++","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"Returns any task that has the word `update` in their names or descriptions","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* `find task update 4` +","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"Returns all tasks that has the word `update` in their names or descriptions","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `findtag` (Since V1.4)","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"You can use the `findtag` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/not` in front of the `friends`. +","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"`findtag` can be replaced by `ftag` for faster input. +","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"Format: `findtag KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"* `findtag friends` +","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"Returns any persons having tag `friends`","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"* `findtag friends colleagues` +","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"Returns any person having tags `friends` or `colleagues`","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"* `findtag /notfriends` +","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"Returns any persons not have tag `friends`","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"* `findtag classmates /notfriends` +","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"Returns any person have tags `classmates` but not have tag `friends`","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"*Important note on `findtag` criteria","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `friend` will not match `friends`","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"* There is no space `/not` and tag name e.g. `/not friends` will not match `/notfriends`","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts or tasks from the address book. The `delete` command will help you clean up obsolete or completed tasks, or contacts who you may not wish to associate with anymore. +","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"`delete 2` +","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"Deletes the 2nd person in the address book.","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"`delete 1` +","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"Deletes the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"In order to delete tasks, an additional `task` keyword must be specified after the `delete` command. +","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Format: `delete task INDEX`+","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"* Deletes the person or task at the specified `INDEX`.","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"`delete task 2` +","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Deletes the 2nd task in the address book.","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"`delete task 1` +","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"Deletes the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `deletetag` (Since V1.2)","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"You can use `deletetag` to delete the tag of multiple persons from the address book. +","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"`deletetag` can be replaced by `dtag` for faster input. +","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"Format: `deletetag INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`.","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"* If you do not key in any index, deletetag will delete the tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"`deletetag 1 2 t/friends` +","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag of the 1st and 2nd person in the address book.","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"`deletetag t/friends` +","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sorting your contact list : `sort`","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts by any field in ascending or descending order using the `sort` command +","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"`sort` can be replaced by `so` for faster input. +","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":"Format: `sort FIELD ORDER` +","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contact by any field in either ascending or descending order","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"jeffreygohkw"},"content":"* Field parameters are limited to the following fields: NAME, PHONE, EMAIL, ADDRESS.","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC.","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"jeffreygohkw"},"content":"* `sort name asc` +","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in ascending order by the name field.","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"jeffreygohkw"},"content":"* `sort address desc` +","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in descending order by the address field.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Backing up your data : `backup`","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"`backup` can be replaced by `bk` for faster input. +","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [RELATIVE LOCATION]` +","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"charlesgoh"},"content":"* Allows you to backup your saved data on Address++ in another file.","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"charlesgoh"},"content":"* You can backup your data in the default location or you can specify your desired save location.","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"charlesgoh"},"content":"* You can use the default save name or use your own.","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"charlesgoh"},"content":"* `backup` or `bk` +","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"charlesgoh"},"content":"This command will help you back up in the default save location --\u003e In the data directory of your application.","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":"* `backup ./test.xml` or `bk ./test.xml` +","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"charlesgoh"},"content":"This saves the backup file in the current data directory, with the name `test.xml`.","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact or task, and look at it in greater detail, such as examining a task with a very long description, or checking out the full address of one of your friends. +","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"Format (person): `select INDEX` +","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"`select 2` +","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":"Selects the 2nd person in the address book.","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":"`select 1` +","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":"Selects the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"To select a task, a `task` keyword must additionally be specified after `select` +","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Format: `select task INDEX` +","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Selecting a task will load a list of the people who are assigned to it, instead of the Google search page.","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"`select task 2` +","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Selects the 2nd task in the address book.","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"`select task 1` +","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"Selects the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"jeffreygohkw"},"content":"* `list` +","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"jeffreygohkw"},"content":"`locate 2` +","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 2nd person in the address book on Google Maps.","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"jeffreygohkw"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"jeffreygohkw"},"content":"`locate 1` +","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 1st person in the results of the `find` command on Google Maps.","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide a specific and valid address.","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps.","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Mark task as complete : `setcomplete` (To be coming in V2.0)","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed.","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"`setcomplete 2` +","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as completed.","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"`setcomplete 1` +","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as completed.","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Mark task as incomplete : `setincomplete` (To be coming in V2.0)","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete.","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"`setincomplete 2` +","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as incomplete.","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"`setincomplete 1` +","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as incomplete.","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign contacts to task : `assign` (Since V1.4)","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"`list task` +","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"`assign 1 4 5 to/2` +","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"Assigns the 1st, 4th and 5th contacts to 2nd task in the address book.","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"`find task update` +","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"`assign 2 to/1` +","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Assigns the 2nd person in the address book to the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismiss contacts from task : `dismiss` (Since V1.4)","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"`list task` +","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"`dismiss 1 4 5 from/2` +","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"Dismisses 1st, 4th and 5th contacts in the address book from the 2nd task.","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"`find task update` +","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"`dismiss 2 from/1` +","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"Dismisses the 2nd person in the address book from the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"Format: `history` +","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"Format: `undo` +","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"-"},"content":"Undoable commands: those commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`).","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"-"},"content":"`list` +","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":"* `select 1` +","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":"`list` +","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":"`undo` +","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"-"},"content":"The `undo` command fails as there are no undoable commands executed previously.","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":"`clear` +","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"`unfavourite 2` +","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"Unfavourites the 2nd person in the address book.","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"`unfavourite 1` +","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"Unfavourite the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` wasn\u0027t necessary. `redo` reverses the most recent `undo` command. +","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"Format: `redo` +","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"`redo` +","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"The `redo` command fails as there are no `undo` commands executed previously.","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"-"},"content":"`clear` +","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"-"},"content":"`redo` (reapplies the `clear` command) +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"Format: `clear` +","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"Format: `exit`","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4].","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually.","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window.","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window.","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Using the browser","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"If you click on a box containing a contact, an internet browser on the right side of the window.","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"* Performing a left click will allow you to perform a search on Google for the name of the contact, and is equivalent to doing a `select` on that oerson.","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":"* If a person\u0027s name or address is set to private, the browser will not perform a search if you click on their box.","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"* Right clicking on the browser will allow you to go to the previous or next page, as well as reload the page.","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Exporting the data","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Address book data can be exported in a number of different formats, thus allowing the data to be compatible to any device.","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"-"},"content":"To export data, click on `File -\u003e Export As...` or use the keyboard shortcut kbd:[CTRL]+kbd:[E]` and select the new location and file name for the export file in the pop-up window.","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Auto-Complete: Learning Your Typing Habits","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"The program will learn your typing habits and give autocomplete suggestions that become more accurate over time.","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location.","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665, b/29-02-1996 f/SOC c/www.enteryourcalendarurlhere.com t/friend t/colleague`","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"jeffreygohkw"},"content":"* *Add with private fields* : `add or a pn/NAME pp/PHONE_NUMBER pe/EMAIL pa/ADDRESS b/BIRTHDAY f/FACULTY c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665`","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"e.g. `add task n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high`","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"* *Add tag* : `addtag INDEX t/[TAG]` +","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"e.g. `addtag 1 2 t/friends`","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE]` +","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false`","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"* *Clear person* : `clear`","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"* *Clear tasks* : `cleartask`","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"e.g. `delete 3`","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task INDEX` +","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task 4`","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"* *Delete tag* : `deletetag INDEX t/[TAG]` +","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"e.g. `deletetag 1 2 t/friends`","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] c/[GOOGLE CALENDAR URL] [a/ADDRESS] [t/TAG]...` +","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"e.g. `edit task 2 p/veryhigh`","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edittag TAGTOCHANGE NEWTAGNAME` +","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"e.g. `edittag friends enemies`","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"e.g. `favourite 1`","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"e.g. `showfavourite`","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"e.g. `find James Jake`","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"* *Find tag* : `findtag Tag [MORE_TAGS]` +","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"e.g. `findtag friends`","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"e.g. `find task update p/high`","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"* *Help* : `help`","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"* *List persons* : `list`","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":"* *List tasks* : `list task`","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate`","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":"e.g.`select 2`","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task INDEX` +","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"e.g.`select task 2`","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":"* *History* : `history`","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":"* *Undo* : `undo`","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":"* *Redo* : `redo`","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[[F1]","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary.","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":70,"jeffreygohkw":88,"Esilocke":252,"-":373}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 3, 0, true);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model, storage);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model, Storage storage) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" Command command \u003d addressBookParser.parseCommand(commandText);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return result;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } finally {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" history.add(commandText);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":8,"-":63}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Adds a person or task to the address book.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"PHONE \"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"ADDRESS \"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"friends \"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"owesMoney\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Adds a task to the address book. \"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"DESCRIPTION \"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"DEADLINE \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"PRIORITY \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_SUCCESS \u003d \"New task added: \\n%1$s\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private boolean isTask \u003d false;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public AddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d null;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@Code ReadOnlyTask}","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d null;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" isTask \u003d true;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_TASK_SUCCESS, taskToAdd));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddCommand)) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } else if (taskToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).taskToAdd \u003d\u003d null) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert(personToAdd !\u003d null);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddCommand) other).personToAdd);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else if (personToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).personToAdd \u003d\u003d null) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assert(taskToAdd !\u003d null);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddCommand) other).taskToAdd);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":60,"wangyiming1019":1,"-":58}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"addtag\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"atag\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all persons in the current list.\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends Command {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" ~/Desktop\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" super();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(storage);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (args.equals(\"\")) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBookDefault(model.getAddressBook());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBook(model.getAddressBook(), args);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d person.getName();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d person.getPhone();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d person.getEmail();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d person.getAddress();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Remark r \u003d person.getRemark();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Boolean f \u003d person.getFavourite();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e t \u003d person.getTags();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" n.setPrivate(pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" p.setPrivate(pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" e.setPrivate(pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" a.setPrivate(pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" r.setPrivate(pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(n, p, e, a, f, r, t);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return index;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of nameIsPrivate","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of phoneIsPrivate","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of emailIsPrivate","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of addressIsPrivate","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of remarkIsPrivate","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of remarkIsPrivate","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getRemarkIsPrivate() {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" return remarkIsPrivate;","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remarkIsPrivate);","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":273}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Clears the address book.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"%s has been cleared!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_PERSONS \u003d \"Contact list\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_TASKS \u003d \"Task list\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_ALL \u003d \"Address book\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private boolean isClearTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private boolean isClearPerson;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private boolean isClearAll;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Prefix type;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String cleared;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public ClearCommand() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d true;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" type \u003d null;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_ALL;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public ClearCommand(Prefix type) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d true;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_TASK;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_TASKS;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d true;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_PERSON;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_PERSONS;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"An invalid type was provided!\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (isClearAll) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else if (isClearTask) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } else if (isClearPerson) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assert false : \"At least one boolean must be true.\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, cleared));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public abstract class Command {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" protected MainWindow mainWindow;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" protected CommandHistory history;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * access to the dependencies.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a person or task identified using its last displayed index from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person or task identified by the index number used in the last listing.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DELETE_TASK_SUCCESS \u003d \"Deleted Task: %1$s\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_PERSON \u003d 0;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_TASK \u003d 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private int type;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public DeleteCommand(Index targetIndex, int objectType) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.type \u003d objectType;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (targetIndex.getZeroBased() \u003e\u003d tasksList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_TASK) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (type \u003d\u003d DELETE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TASK_SUCCESS, taskToDelete));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex)","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.type \u003d\u003d ((DeleteCommand) other).type); // state check","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28,"wangyiming1019":1,"-":47}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"deletetag\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"dtag\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"This is an nonexistent tag in the given persons list.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends Command {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toDismiss)) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toDismiss);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Edits the details of an existing person or task in the address book.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" + \"by the index number used in the last person listing. \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Edits the details of the task identified \"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: \\n%1$s\";","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TASK_SUCCESS \u003d \"Edited Task: \\n%1$s\";","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @param index of the person in the filtered person list to edit","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the person with","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d null;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public EditCommand(Index index, EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d null;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //TODO see if we can use Singleton pattern to handle the Descriptors.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, editedTask));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedTags);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().isPrivate()) {","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().isPrivate()) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editTaskDescriptor}.","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" assert taskToEdit !\u003d null;","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" TaskName updatedTaskName;","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" Description updatedDescription;","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" Deadline updatedDeadline;","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" Priority updatedPriority;","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" Assignees assignees;","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updatedState;","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" // You cannot edit assignees or state using edit command","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" assignees \u003d taskToEdit.getAssignees();","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" updatedState \u003d taskToEdit.getCompleteState();","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState);","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":" if (this.isTask !\u003d ((EditCommand) other).isTask) {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" if (this.isTask) {","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":" * corresponding field value of the person.","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" private Name name;","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":" private Phone phone;","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":" private Email email;","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" private Address address;","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" private Boolean favourite;","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" private Remark remark;","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":" this.name \u003d toCopy.name;","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" this.phone \u003d toCopy.phone;","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" this.email \u003d toCopy.email;","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" this.address \u003d toCopy.address;","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d toCopy.favourite;","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d toCopy.remark;","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" this.tags \u003d toCopy.tags;","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"charlesgoh"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark, this.tags);","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"charlesgoh"},"content":" public Optional\u003cRemark\u003e getRemark() {","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"charlesgoh"},"content":" return Optional.ofNullable(remark);","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"-"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"-"},"content":" return Optional.ofNullable(tags);","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags());","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task.","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":" private Description description;","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":" private Priority priority;","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority);","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority());","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":199,"Esilocke":159,"wangyiming1019":14,"-":193}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"edittag\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"etag\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the specified tag \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(personToFavourite);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Finds and lists all persons or tasks in address book whose name contains any of the argument keywords.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Finds all tasks whose names or descriptions \"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d null;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public FindCommand(TaskContainsKeywordPredicate predicate) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d null;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof FindCommand)) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask !\u003d ((FindCommand) other).isTask) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return this.taskPredicate.equals(((FindCommand) other).taskPredicate);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return this.personPredicate.equals(((FindCommand) other).personPredicate);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36,"wangyiming1019":1,"-":30}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends Command {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"findtag\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"ftag\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose tags contain any of \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" friends colleagues\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person: %1$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":58}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as complete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as incomplete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons by chosen \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS] and by order [ASC/DESC]. Case insensitive\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [FIELD] [ORDER]\\n\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" email desc\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All persons in address book successfully sorted\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private final String field;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" private final String order;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String field, String order) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public String getField() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return this.field;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return this.order;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":48,"jeffreygohkw":2,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.unfavouritePerson(personToUnfavourite);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" PREFIX_REMARK_PRIVATE, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE,","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" PREFIX_EMAIL_PRIVATE, PREFIX_ADDRESS_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_DEADLINE,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" PREFIX_DESCRIPTION, PREFIX_PRIORITY, PREFIX_TASK);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d constructTask(args);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(taskToAdd);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d constructPerson(args);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(personToAdd);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" private static ReadOnlyPerson constructPerson(String args) throws ParseException {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PHONE)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)))) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_EMAIL)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)))) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_ADDRESS)","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)))) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_REMARK)","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)))) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, tagList);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyTask constructTask(String args) throws ParseException {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION))) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DEADLINE))) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PRIORITY))) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" TaskName name;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Description description;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" Priority priority;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" description \u003d ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get();","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" deadline \u003d ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get();","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" priority \u003d ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d new Task(name, description, deadline, priority);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return task;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":83,"Esilocke":69,"-":35}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser implements Parser\u003cAddTagCommand\u003e {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":70}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses user input.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class AddressBookParser {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @param userInput full user input string","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @return the command based on the user input","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public Command parseCommand(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" case SelectCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" return new HistoryCommand();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" return new UndoCommand();","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" return new RedoCommand();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":9,"Esilocke":25,"wangyiming1019":41,"-":91}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * filepath.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_PERSON);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_TASK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person\");","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"pri/\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"Esilocke":6,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(filteredString.trim());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":12,"-":28}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":67}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return constructTaskDescriptor(args);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return constructPersonDescriptor(args);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Person object. **/","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructPersonDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" Index index;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return new EditCommand(index, editPersonDescriptor);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Task object. **/","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructTaskDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return new EditCommand(index, editTaskDescriptor);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * {@code Set\u003cTag\u003e} containing zero tags.","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assert tags !\u003d null;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" if (tags.isEmpty()) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":47,"-":78}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return tagList;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" trimmedArgs \u003d argsWithNoTaskPrefix.trim();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return new FindCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords)));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":14,"-":31}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new SelectCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an SelectCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class ParserUtil {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * trimmed.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer).","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Name to be private if true.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Phone to be private if true.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Address to be private if true.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" * Takes in a (@code boolean isPrivate) which will set the Remark to be private if true.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Email to be private if true.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(tags);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" for (String tagName : tags) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" return tagSet;","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present.","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present.","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":29,"Esilocke":39,"-":104}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 0;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 1;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 2) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" //// person-level operations","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" persons.add(newPerson);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" // used for checking person tag references","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" //// tag-level operations","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" tags.add(t);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" //// task-level operations","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists.","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}.","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" //// util methods","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" // TODO: refine later","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList();","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" return tags.asObservableList();","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":11,"Esilocke":106,"wangyiming1019":17,"-":181}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * The API of the Model component.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public interface Model {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /** Adds the given person */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by field in ascending (asc) or descending (desc) order","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":48,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ModelManager() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" int index;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" updateFilteredPersonList(new NameContainsFavouritePredicate());","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToAssignTo.getTaskName();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToAssignTo.getDescription();","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToAssignTo.getDeadline();","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToAssignTo.getPriority();","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToAssignTo.getCompleteState();","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" assignees.assign(personsToAssign);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToAssignTo, updatedTask);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToDismissFrom.getTaskName();","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToDismissFrom.getDescription();","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToDismissFrom.getDeadline();","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToDismissFrom.getPriority();","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToDismissFrom.getCompleteState();","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assignees.dismiss(personsToDismiss);","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToDismissFrom, updatedTask);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" * {@code addressBook}","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":145,"wangyiming1019":59,"-":116}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public Address(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(address);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":50}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Validates given email.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public Email(String email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this(email);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":45}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String fullName;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Name(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.fullName \u003d trimmedName;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this(name);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.fullName.equals(((Name) other).fullName)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return fullName.hashCode();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27,"-":55}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/not\")) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(4));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Every field must be present and not null.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Boolean favourite, Remark remark, Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" source.getRemark(), source.getTags());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public Name getName() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return name.get();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return phone;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public Phone getPhone() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.get();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return email;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Email getEmail() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return email.get();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return address;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public Address getAddress() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return address.get();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return favourite;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark.get();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * if modification is attempted.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":15,"wangyiming1019":23,"-":136}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given phone number.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":28,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" builder.append(getName())","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" .append(\" Phone: \")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" .append(getPhone())","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" .append(\" Email: \")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .append(getEmail())","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .append(\" Address: \")","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" .append(getAddress())","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Tags: \");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" return;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this(remark);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return \"\u003cPrivate Remark\u003e\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" return value;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":79}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the list contains an equivalent person as the given argument.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public boolean contains(ReadOnlyPerson toCheck) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" * Adds a person to the list.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" internalList.add(new Person(toAdd));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" internalList.set(index, new Person(editedPerson));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Removes the equivalent person from the list.","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" if (!personFoundAndDeleted) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" return personFoundAndDeleted;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list.","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" setPersons(replacement);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().fullName.compareTo(o2.getName().fullName);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" public Iterator\u003cPerson\u003e iterator() {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":171,"wangyiming1019":31,"-":42}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Assignees {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private HashSet\u003cReadOnlyPerson\u003e assignedList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public Assignees(HashSet\u003cReadOnlyPerson\u003e assignees) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public Assignees() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void assign(ArrayList\u003cReadOnlyPerson\u003e personsToAssign) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToAssign) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assignedList.add(p);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public void dismiss(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToDismiss) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (assignedList.contains(p)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(p);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyPerson toFind) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return assignedList.contains(toFind);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Calendar;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Deadline {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DEADLINE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task deadlines must be in the format DD-MM-YYYY, with \u0027-\u0027, \u0027.\u0027, \u0027.\u0027 as separators\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" Deadline format: DDSMMSYYYY, in DAY-MONTH-YEAR format.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" S represents the separators, and can be any of these characters: - . /","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_VALIDATION_REGEX \u003d \"\\\\d\\\\d[-./]\\\\d\\\\d[-./]\\\\d\\\\d\\\\d\\\\d.*\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String DEADLINE_PERIOD_DELIMITER \u003d \".\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" Expected indexes for the separator characters","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_1 \u003d 2;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_2 \u003d 5;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_DAY_INDEX \u003d 0;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_MONTH_INDEX \u003d 1;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_YEAR_INDEX \u003d 2;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public final Calendar calendar;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } else if (deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String trimmedDeadline \u003d deadline.trim();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (!isValidDeadline(trimmedDeadline)) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DEADLINE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDeadline;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d Calendar.getInstance();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" calendar.clear();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" char separator \u003d trimmedDeadline.charAt(DEADLINE_SEPARATOR_INDEX_1);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d trimmedDeadline.split(Character.toString(separator));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.calendar.set(year, month, day);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is in valid deadline format.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(DEADLINE_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } else if (test.charAt(DEADLINE_SEPARATOR_INDEX_1) !\u003d test.charAt(DEADLINE_SEPARATOR_INDEX_2)) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return isValidDate(test);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDate(String test) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" Calendar testCalendar \u003d setCalendar(test);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" testCalendar.setLenient(false);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" testCalendar.getTime();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Returns a Calendar object that represents the given date string.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private static Calendar setCalendar(String date) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" Calendar result \u003d Calendar.getInstance();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" result.clear();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String separator \u003d Character.toString(date.charAt(DEADLINE_SEPARATOR_INDEX_1));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (separator.equals(DEADLINE_PERIOD_DELIMITER)) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" separator \u003d \"\\\\.\";","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d date.split(separator);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" result.set(year, month, day);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return result;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":131}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Priority {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 1 to 5, inclusive, where 1 represents the lowest priority\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 1;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Validates given priority.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Integer.parseInt(trimmedPriority);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedPriority;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Priority) other).value)); // state check","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":83}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * by default.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return taskName.get();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return description.get();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return deadline.get();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return priority.get();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return assignees.get();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return state.get();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return description;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return deadline;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return priority;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return assignees;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" String printableState;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return printableState;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":164}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c keywords.size(); i++) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String keyword \u003d keywords.get(i);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)); // state check","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskName {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public final String taskName;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list.","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return taskFoundAndDeleted;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":124}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task.","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" return new Person[] {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"),","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"),","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"),","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"),","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"),","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"),","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return sampleAb;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (String s : strings) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook cannot be null.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException if there was any problem writing to the file.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBook(ReadOnlyAddressBook addressBook, String args) throws IOException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" void changeFilePath(String fp, UserPrefs u);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" //@author","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":20,"jeffreygohkw":1,"-":31}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath() + \"-backup.xml\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"jeffreygohkw":8,"-":92}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private String name;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private String phone;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String email;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private String address;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private String remark;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().fullName;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().isPrivate();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().isPrivate();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().isPrivate();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().isPrivate();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().isPrivate();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, tags);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":66,"wangyiming1019":3,"-":43}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private String name;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private String description;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private String deadline;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private String priority;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private String state;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" priority \u003d source.getPriority().value;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, new Assignees(), state);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":61}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath + \"-backup.xml\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":17,"-":74}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private WebView browser;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public BrowserPanel() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" loadDefaultPage();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().fullName.replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027saddress if their address is not private","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void loadPage(String url) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a default HTML file with a background that matches the general theme.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDefaultPage() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(defaultPage.toExternalForm());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * Frees resources allocated to the browser.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" public void freeResources() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" browser \u003d null;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" loadPersonPage(event.getNewSelection().person);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":66,"-":48}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Stage primaryStage;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" // Set dependencies","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" // Configure the UI","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" setIcon(ICON);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" setWindowMinSize();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" setAccelerators();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return primaryStage;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the accelerator of a MenuItem.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param keyCombination the KeyCombination value of the accelerator","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.setAccelerator(keyCombination);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" /*","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" * TODO: the code below can be removed once the bug reported here","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" * is fixed in later version of SDK.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * not work when the focus is in them because the key event is consumed by","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * the TextInputControl(s).","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * For now, we add following event filter to capture such key events and open","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * help window purposely so to support accelerators even when focus is","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * in CommandBox or ResultDisplay.","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.getOnAction().handle(new ActionEvent());","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" event.consume();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" });","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Fills up all the placeholders of this window.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" void fillInnerParts() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" browserPanel \u003d new BrowserPanel();","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" void hide() {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.hide();","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" private void setTitle(String appTitle) {","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setTitle(appTitle);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the given image as the icon of the main window.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" private void setIcon(String iconSource) {","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default size based on user preferences.","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowMinSize() {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinWidth(MIN_WIDTH);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the current size and the position of the main Window.","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" GuiSettings getCurrentGuiSetting() {","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" personListPanel.increaseFontSize();","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.increaseFontSize();","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":" personListPanel.decreaseFontSize();","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.decreaseFontSize();","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" personListPanel.resetFontSize();","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.resetFontSize();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Opens the help window.","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" public void handleHelp() {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" helpWindow.show();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" void show() {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" primaryStage.show();","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" raise(new OpenRequestEvent());","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" raise(new SaveAsRequestEvent());","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" private void handleExit() {","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":" return this.personListPanel;","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":" void releaseResources() {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" browserPanel.freeResources();","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":" handleHelp();","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":212,"Esilocke":8,"-":121}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" * @param tag","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @return","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * @param person","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" });","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" return name;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return phone;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return address;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return email;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":69,"wangyiming1019":37,"-":81}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Panel containing the list of persons.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d 0;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}.","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" setText(null);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":38,"-":86}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" return true;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" if (!(other instanceof TaskCard)) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return false;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // state check","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" TaskCard card \u003d (TaskCard) other;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 task.equals(card.task);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" return taskName;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return description;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return deadline;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return priority;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":63,"Esilocke":75}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d 0;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map(","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" setText(null);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":29,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" //Set the application icon.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" mainWindow.hide();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" String contentText) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" alert.setTitle(title);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.showAndWait();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" System.exit(1);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.exception);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":4,"-":120}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code AddCommand}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class AddCommandIntegrationTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" String.format(AddCommand.MESSAGE_SUCCESS, validPerson), expectedModel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Generates a new {@code AddCommand} which upon execution, adds {@code person} into the {@code model}.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private AddCommand prepareCommand(Person person, Model model) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":53}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddCommandTest {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d getAddCommandForTask(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddCommand.MESSAGE_TASK_SUCCESS, validTask), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" getAddCommandForTask(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommand \u003d new AddCommand(paper);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" AddCommand addPencilCommand \u003d new AddCommand(pencil);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommandCopy \u003d new AddCommand(paper);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" // add person vs add task -\u003e returns false","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertFalse(addAliceCommand.equals(addPaperCommand));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person.","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddCommand with the details of the given person.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private AddCommand getAddCommandForTask(Task task, Model model) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AddCommand command \u003d new AddCommand(task);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateDataException when trying to add a person or task.","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added.","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingObjectAdded extends ModelStub {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":121,"wangyiming1019":24,"-":160}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index task) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, task);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":120}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"false\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":129}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_FAVOURITE \u003d \"false\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"20-20-20000\"; // bad date format","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_AMY;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_BOB;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PENCIL;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PAPER;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" static {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_AMY).withFavourite(VALID_FAVOURITE)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_BOB).withFavourite(VALID_FAVOURITE)","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" // only do so by copying its components.","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" command.execute();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" } catch (CommandException e) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" final String[] splitName \u003d person.getName().fullName.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":12,"Esilocke":34,"wangyiming1019":16,"-":128}},{"path":"src/test/java/seedu/address/logic/commands/DeleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeleteCommand}.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class DeleteCommandTest {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommand \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteSecondCommand \u003d new DeleteCommand(INDEX_SECOND_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommandCopy \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns a {@code DeleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" private DeleteCommand prepareCommand(Index index, int type) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(index, type);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" deleteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return deleteCommand;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":12,"-":107}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index task) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, task);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":121}},{"path":"src/test/java/seedu/address/logic/commands/EditCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditCommand.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class EditCommandTest {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(indexLastPerson, descriptor);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex,","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" final EditCommand standardCommand \u003d new EditCommand(INDEX_FIRST_PERSON, DESC_AMY);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" EditCommand commandWithSameValues \u003d new EditCommand(INDEX_FIRST_PERSON, copyDescriptor);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_SECOND_PERSON, DESC_AMY)));","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_BOB)));","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" * Returns an {@code EditCommand} with parameters {@code index} and {@code descriptor}","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" private EditCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d new EditCommand(index, descriptor);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" editCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" return editCommand;","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":2,"-":169}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent() throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public AddressBook prepareAddressBook() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":54}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code FindCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class FindCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" FindCommand findFirstCommand \u003d new FindCommand(firstPredicate);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" FindCommand findSecondCommand \u003d new FindCommand(secondPredicate);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" FindCommand findFirstCommandCopy \u003d new FindCommand(firstPredicate);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Parses {@code userInput} into a {@code FindCommand}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private FindCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" FindCommand command \u003d","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(FindCommand command, String expectedMessage, List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class RedoCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Collections.emptyList(), Arrays.asList(deleteCommandTwo, deleteCommandOne));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in redoStack","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // single command in redoStack","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // no command in redoStack","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":50}},{"path":"src/test/java/seedu/address/logic/commands/SelectCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectCommand}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class SelectCommandTest {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommand \u003d new SelectCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" SelectCommand selectSecondCommand \u003d new SelectCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommandCopy \u003d new SelectCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * is raised with the correct index.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d selectCommand.execute();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertEquals(String.format(SelectCommand.MESSAGE_SELECT_PERSON_SUCCESS, index.getOneBased()),","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" JumpToListRequestEvent lastEvent \u003d (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * is thrown with the {@code expectedMessage}.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" selectCommand.execute();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns a {@code SelectCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" private SelectCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d new SelectCommand(index);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" selectCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" return selectCommand;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":139}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setCompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, setCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setIncompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, setIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class UndoCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Arrays.asList(deleteCommandOne, deleteCommandTwo), Collections.emptyList());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" deleteCommandOne.execute();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteCommandTwo.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // multiple commands in undoStack","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" // single command in undoStack","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no command in undoStack","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":51}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/parser/AddCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class AddCommandParserTest {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // multiple tags - all accepted","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" new AddCommand(expectedPersonMultipleTags));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // zero tags","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // missing name prefix","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" // missing phone prefix","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + VALID_PHONE_BOB","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // missing email prefix","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" // missing address prefix","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + VALID_ADDRESS_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" // missing description prefix","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" // missing deadline prefix","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + VALID_DEADLINE_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" // missing priority prefix","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" // invalid phone","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" // invalid email","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" // invalid tag","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" // invalid deadline","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" // invalid priority","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Priority.MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":33,"Esilocke":89,"-":114}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command \u003d (AddCommand) parser.parseCommand(TaskUtil.getAddCommand(task));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddCommand(task), command);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(task), command);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"wangyiming1019"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\") instanceof ExitCommand);","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"wangyiming1019"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"wangyiming1019"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\") instanceof HelpCommand);","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\") instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" parser.parseCommand(\"histories\");","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\") instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"wangyiming1019"},"content":" parser.parseCommand(\"histories\");","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD) instanceof ListCommand);","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\") instanceof ListCommand);","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS) instanceof ListCommand);","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\") instanceof ListCommand);","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWord() throws Exception {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWordWithInput() throws Exception {","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD + \" test.xml\") instanceof BackupCommand);","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAlias() throws Exception {","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAliasWithInput() throws Exception {","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS + \" test.xml\") instanceof BackupCommand);","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"redo 1\") instanceof RedoCommand);","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"undo 3\") instanceof UndoCommand);","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":" parser.parseCommand(\"\");","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"-"},"content":" parser.parseCommand(\"unknownCommand\");","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":75,"Esilocke":147,"wangyiming1019":80,"-":148}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * outside of the DeleteCommand code. For example, inputs \"1\" and \"1 abc\" take the","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * same path through the DeleteCommand, and therefore we test only one of them.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class DeleteCommandParserTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\",","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_TASK));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\",","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23,"-":29}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \",","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectCommandParserTest}.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectCommandParserTest","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"asc\",","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"desc\",","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"name\",","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"phone\",","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"email\",","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"address\",","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no field or order","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\",","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArguments_success() throws ParseException {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand expectedCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand actualCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name asc\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name desc\");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone asc\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone desc\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email asc\");","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email desc\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address asc\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address desc\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":101}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":106,"Esilocke":18,"-":93}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.isPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":20}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.isPrivate());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":39}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.isPrivate());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":25}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.isPrivate());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":24}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"-04-17\")); // missing day","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04--17\")); // missing month","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04\")); // missing year","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"day-04-17\")); // invalid day","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-month-17\")); // invalid month","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-year\")); // invalid year","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"32-04-17\")); // impossible day","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-13-17\")); // impossible month","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04--1\")); // impossible year","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"0-04-17\")); // incomplete day","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-0-17\")); // incomplete month","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-1\")); // incomplete year","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-201\")); // incomplete year","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04/17\")); // inconsistent separators","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-042017\")); // missing separator","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // valid deadlines","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04/04/2017\")); // slashes","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04.04.2017\")); // dots","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":44}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"0\")); // priority out of range","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * that we are building.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":9,"-":101}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonBuilder {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private Person person;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public PersonBuilder() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" defaultRemark, defaultTags);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" public Person build() {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return this.person;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":18,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().isPrivate());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":91}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * A utility class for Person.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class PersonUtil {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" return AddCommand.COMMAND_WORD + \" \" + getPersonDetails(person);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" sb.append(PREFIX_NAME + person.getName().fullName + \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach(","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" );","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"-":38}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Task task;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public Task build() {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" return this.task;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" return AddCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + task.getPriority().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":35}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class TypicalPersons {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // Manually added","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return ab;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":15,"wangyiming1019":15,"-":67}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").build();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\")","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").build();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").build();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":76}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" // default web page","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // associated web page of a person","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" postNow(selectionChangedEventStub);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedPersonUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + ALICE.getName().fullName.replaceAll(\" \", \"+\") + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPersonUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":31,"-":34}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultipler());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final JumpToListRequestEvent JUMP_TO_SECOND_EVENT \u003d new","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" JumpToListRequestEvent(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void handleJumpToListRequestEvent() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true}],"authorContributionMap":{"charlesgoh":60}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"-":94}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getPriority().value, actualCard.getPriority());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":24,"-":72}},{"path":"src/test/java/seedu/address/ui/testutil/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.GuiUnitTest;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // no tags","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * -\u003e added","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" String command \u003d \" \" + AddCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" 1\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e rejected */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e rejected */","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and verifies that the command box displays","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" * an empty string, the result display box displays the success message of executing {@code AddCommand} with the","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" * details of {@code toAdd}, and the model related components equal to the current model added with {@code toAdd}.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged.","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * instead.","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" * {@code expectedModel}.","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":34,"-":226}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void clear() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS, TYPE_ALL);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":97}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson(","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * browser url changes","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" selectPerson(index);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"-":269}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":70}}] diff --git a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateFindPreviousAuthors/expected/reposense_testrepo-Beta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateFindPreviousAuthors/expected/reposense_testrepo-Beta_master/authorship.json index 79c4693058..c1030bef2f 100644 --- a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateFindPreviousAuthors/expected/reposense_testrepo-Beta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateFindPreviousAuthors/expected/reposense_testrepo-Beta_master/authorship.json @@ -1 +1 @@ -[{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import java.net.URL?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Menu?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cstylesheets\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@DarkTheme.css\" /\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/stylesheets\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/MenuBar\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":27,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e"},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":29,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e"},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003c/StackPane\u003e"},{"lineNumber":31,"author":{"gitId":"nbr"},"content":""},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" maxHeight\u003d\"100\" minHeight\u003d\"100\" prefHeight\u003d\"100\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":34,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" maxHeight\u003d\"60\" minHeight\u003d\"60\" prefHeight\u003d\"60\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":47,"author":{"gitId":"nbr"},"content":" \u003cVBox fx:id\u003d\"personList\" minWidth\u003d\"335.0\" prefHeight\u003d\"143.0\" prefWidth\u003d\"335.0\" SplitPane.resizableWithParent\u003d\"false\"\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":49,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" prefWidth\u003d\"340\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":57,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e"},{"lineNumber":64,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e"}],"authorContributionMap":{"April0616":1,"-":53,"nbr":10}},{"path":"src/main/resources/view/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e"},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e"},{"lineNumber":16,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e"},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e"},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cchildren\u003e"},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":21,"author":{"gitId":"April0616"},"content":""},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e"},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e"},{"lineNumber":24,"author":{"gitId":"April0616"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e"},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e"},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" /\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e"},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e"},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" /\u003e"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"April0616":14,"-":48,"nbr":3}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets top\u003d\"5\" right\u003d\"5\" bottom\u003d\"5\" left\u003d\"15\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cHBox spacing\u003d\"5\" alignment\u003d\"CENTER_LEFT\"\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" text\u003d\"\\$first\" styleClass\u003d\"cell_big_label\" /\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$gender\" /\u003e"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$address\" /\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":36,"author":{"gitId":"CindyTsai1"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"timetable\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$timetable\" /\u003e"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$remark\" /\u003e"},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"photoPath\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$photoPath\" /\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"CindyTsai1":1,"April0616":4,"-":37}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"nbr"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"-":24,"nbr":2}}] +[{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import java.net.URL?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Menu?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cstylesheets\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@DarkTheme.css\" /\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/stylesheets\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/MenuBar\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"nbr"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" maxHeight\u003d\"100\" minHeight\u003d\"100\" prefHeight\u003d\"100\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" maxHeight\u003d\"60\" minHeight\u003d\"60\" prefHeight\u003d\"60\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"nbr"},"content":" \u003cVBox fx:id\u003d\"personList\" minWidth\u003d\"335.0\" prefHeight\u003d\"143.0\" prefWidth\u003d\"335.0\" SplitPane.resizableWithParent\u003d\"false\"\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" prefWidth\u003d\"340\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":1,"-":53,"nbr":10}},{"path":"src/main/resources/view/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cchildren\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" /\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" /\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":14,"-":48,"nbr":3}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets top\u003d\"5\" right\u003d\"5\" bottom\u003d\"5\" left\u003d\"15\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cHBox spacing\u003d\"5\" alignment\u003d\"CENTER_LEFT\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" text\u003d\"\\$first\" styleClass\u003d\"cell_big_label\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$gender\" /\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$address\" /\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"CindyTsai1"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"timetable\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$timetable\" /\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$remark\" /\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"photoPath\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$photoPath\" /\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"CindyTsai1":1,"April0616":4,"-":37}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"nbr"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":24,"nbr":2}}] diff --git a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateFindPreviousAuthors/expected/reposense_testrepo-Charlie_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateFindPreviousAuthors/expected/reposense_testrepo-Charlie_master/authorship.json index 17759c193d..e4236ea96a 100644 --- a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateFindPreviousAuthors/expected/reposense_testrepo-Charlie_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateFindPreviousAuthors/expected/reposense_testrepo-Charlie_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++"},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]"},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\"]"},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface)."},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"* It is a Java application primarily targeted for students doing group projects."},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls."},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by"},{"lineNumber":33,"author":{"gitId":"-"},"content":"_Marco Jakob_."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_."},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]"}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":7,"-":26}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us"},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team."},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/."},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Charles Goh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://charlesgoh.me[homepage]] [https://github.com/charlesgoh[github]]"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Jeffrey Goh"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Kelvin Lin"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esiloke[github]]"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Wang Yi Ming"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1090[github]]"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"}],"authorContributionMap":{"charlesgoh":22,"-":26}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later"},{"lineNumber":22,"author":{"gitId":"-"},"content":"+"},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":26,"author":{"gitId":"-"},"content":"+"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE"},{"lineNumber":29,"author":{"gitId":"-"},"content":"+"},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them."},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer"},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)"},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle"},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`"},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK"},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`"},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`"},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`"},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings"},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +"},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests."},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands"},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)"},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`"},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code."},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork."},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up."},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e)."},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section."},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started]."},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]"},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component."},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`."},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other."},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary."},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level."},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)"},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file."},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components."},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App."},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor."},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory."},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk."},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component."},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class."},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class."},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`."},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]"},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk."},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time."},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]"},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components."},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component."},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class."},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component."},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change."},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly."},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :"},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command."},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`."},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events."},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`."},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call."},{"lineNumber":183,"author":{"gitId":"-"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]"},{"lineNumber":193,"author":{"gitId":"-"},"content":""},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences."},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data."},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change."},{"lineNumber":199,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components."},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":204,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":"The `Storage` component,"},{"lineNumber":209,"author":{"gitId":"-"},"content":""},{"lineNumber":210,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back."},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back."},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package."},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented."},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go."},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size. The first way is through the UI. The Class Diagram for this"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":"procedure is shown below:"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"The other method of calling changes in font size is through a CLI command. When the relevant command is entered,"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"the Command class calls MainWindow. The rest of the process flow is identical to that of the UI triggered font size"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"command."},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder"},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of Task-related commands +"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +"},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Create new classes for all new commands +"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Simpler to implement. +"},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure."},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Storage of Task objects +"},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +"},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa."},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage."},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +"},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons** Any changes to the Person or Task"},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":259,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":260,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`."},{"lineNumber":263,"author":{"gitId":"-"},"content":""},{"lineNumber":264,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":267,"author":{"gitId":"-"},"content":""},{"lineNumber":268,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern]."},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:"},{"lineNumber":271,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":272,"author":{"gitId":"-"},"content":"----"},{"lineNumber":273,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":274,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":275,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":276,"author":{"gitId":"-"},"content":" // ... list logic ..."},{"lineNumber":277,"author":{"gitId":"-"},"content":" }"},{"lineNumber":278,"author":{"gitId":"-"},"content":"}"},{"lineNumber":279,"author":{"gitId":"-"},"content":"----"},{"lineNumber":280,"author":{"gitId":"-"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:"},{"lineNumber":282,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":283,"author":{"gitId":"-"},"content":"----"},{"lineNumber":284,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {"},{"lineNumber":285,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":286,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":287,"author":{"gitId":"-"},"content":" // ... undo logic ..."},{"lineNumber":288,"author":{"gitId":"-"},"content":""},{"lineNumber":289,"author":{"gitId":"-"},"content":" executeUndoableCommand();"},{"lineNumber":290,"author":{"gitId":"-"},"content":" }"},{"lineNumber":291,"author":{"gitId":"-"},"content":"}"},{"lineNumber":292,"author":{"gitId":"-"},"content":""},{"lineNumber":293,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":294,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":295,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":296,"author":{"gitId":"-"},"content":" // ... delete logic ..."},{"lineNumber":297,"author":{"gitId":"-"},"content":" }"},{"lineNumber":298,"author":{"gitId":"-"},"content":"}"},{"lineNumber":299,"author":{"gitId":"-"},"content":"----"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning."},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command)."},{"lineNumber":304,"author":{"gitId":"-"},"content":""},{"lineNumber":305,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":306,"author":{"gitId":"-"},"content":""},{"lineNumber":307,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person."},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":310,"author":{"gitId":"-"},"content":""},{"lineNumber":311,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":312,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all."},{"lineNumber":313,"author":{"gitId":"-"},"content":""},{"lineNumber":314,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`."},{"lineNumber":315,"author":{"gitId":"-"},"content":""},{"lineNumber":316,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed."},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":319,"author":{"gitId":"-"},"content":""},{"lineNumber":320,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":321,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`."},{"lineNumber":322,"author":{"gitId":"-"},"content":""},{"lineNumber":323,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:"},{"lineNumber":324,"author":{"gitId":"-"},"content":""},{"lineNumber":325,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":326,"author":{"gitId":"-"},"content":""},{"lineNumber":327,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed)."},{"lineNumber":328,"author":{"gitId":"-"},"content":""},{"lineNumber":329,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":330,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`."},{"lineNumber":331,"author":{"gitId":"-"},"content":""},{"lineNumber":332,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow)."},{"lineNumber":333,"author":{"gitId":"-"},"content":""},{"lineNumber":334,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":335,"author":{"gitId":"-"},"content":""},{"lineNumber":336,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:"},{"lineNumber":337,"author":{"gitId":"-"},"content":""},{"lineNumber":338,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":339,"author":{"gitId":"-"},"content":""},{"lineNumber":340,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":345,"author":{"gitId":"-"},"content":""},{"lineNumber":346,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +"},{"lineNumber":347,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +"},{"lineNumber":348,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +"},{"lineNumber":349,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +"},{"lineNumber":350,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +"},{"lineNumber":351,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +"},{"lineNumber":352,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo."},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"-"},"content":"---"},{"lineNumber":355,"author":{"gitId":"-"},"content":""},{"lineNumber":356,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +"},{"lineNumber":357,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +"},{"lineNumber":358,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +"},{"lineNumber":359,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +"},{"lineNumber":360,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +"},{"lineNumber":361,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +"},{"lineNumber":362,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct."},{"lineNumber":363,"author":{"gitId":"-"},"content":""},{"lineNumber":364,"author":{"gitId":"-"},"content":"---"},{"lineNumber":365,"author":{"gitId":"-"},"content":""},{"lineNumber":366,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +"},{"lineNumber":367,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +"},{"lineNumber":368,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +"},{"lineNumber":369,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +"},{"lineNumber":370,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +"},{"lineNumber":371,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +"},{"lineNumber":372,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +"},{"lineNumber":373,"author":{"gitId":"-"},"content":""},{"lineNumber":374,"author":{"gitId":"-"},"content":"---"},{"lineNumber":375,"author":{"gitId":"-"},"content":""},{"lineNumber":376,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +"},{"lineNumber":377,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +"},{"lineNumber":378,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +"},{"lineNumber":379,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +"},{"lineNumber":380,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +"},{"lineNumber":381,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +"},{"lineNumber":382,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +"},{"lineNumber":383,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the add, delete, list, select, and edit commands."},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Instead of making a new Logic object for each new command, polymorphism is used to implement the \"Task\" version of each command."},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"An example of using polymorphism to handle Person vs Task addition:"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":"public class AddCommand extends Command {"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyPerson person) {"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Person(person);"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_PERSON;"},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Task(task);"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_TASK;"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"The AddCommand will thus call a different constructor depending on the type of the argument supplied to it. To facilitate this, the respective Parser class must also be modified:"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(toAdd);"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The AddCommandParser checks the args to see if this is a task, then creates the object to be added, and creates a new AddCommand to handle the result. +"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"To support the addition of Task objects, the Storage component is modified to accept Task objects in a similar manner as to how Person objects are being stored."},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"[source, html]"},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e"},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e"},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e"},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e"},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"Tasks objects are stored in the same level of hierarchy as Person objects, and during startup, are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book."},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Create new classes for all new commands +"},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"**Pros:** Simpler to implement. +"},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure."},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +"},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa."},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage."},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +"},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes."},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":470,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":471,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":472,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` method in UniquePersonList. It supports"},{"lineNumber":473,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field."},{"lineNumber":474,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":475,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator."},{"lineNumber":476,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":477,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`"},{"lineNumber":478,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class."},{"lineNumber":479,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":480,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for this sort command implementation is shown below:"},{"lineNumber":481,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":482,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandDiagram.png[width\u003d\"800\"]"},{"lineNumber":483,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":484,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort name desc`. The following sequence diagram"},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works."},{"lineNumber":486,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":487,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]"},{"lineNumber":488,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":489,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted. The resulting list"},{"lineNumber":490,"author":{"gitId":"charlesgoh"},"content":"is not returned, but will be reflected in the application\u0027s storage and graphical user interface."},{"lineNumber":491,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":492,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":494,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +"},{"lineNumber":495,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` class. +"},{"lineNumber":496,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the person lists. Future changes to the implementation will be easier as a consequence. +"},{"lineNumber":497,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +"},{"lineNumber":498,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +"},{"lineNumber":499,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +"},{"lineNumber":500,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList` will have to rely on the `SortCommand` class."},{"lineNumber":501,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":502,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":503,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":504,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +"},{"lineNumber":505,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +"},{"lineNumber":506,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for both user and developer and reduced complexity in implementation. +"},{"lineNumber":507,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +"},{"lineNumber":508,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +"},{"lineNumber":509,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +"},{"lineNumber":510,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system."},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":513,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":514,"author":{"gitId":"charlesgoh"},"content":"The backup command makes use of both the model manager and the storage manager. The `LogicManager` class was"},{"lineNumber":515,"author":{"gitId":"charlesgoh"},"content":"improved to support the accessing of storage value."},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":517,"author":{"gitId":"charlesgoh"},"content":"The backup command arguments are parsed through the `BackupCommandParser`, which passes control over to the"},{"lineNumber":518,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class. If there is a file path specified by the user, then the `execute()` command within the"},{"lineNumber":519,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class will save the backup file to that path. If not file path is specified, the backup file will be"},{"lineNumber":520,"author":{"gitId":"charlesgoh"},"content":"saved to a default location."},{"lineNumber":521,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":522,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup`. The backup file will be saved to a default location:"},{"lineNumber":523,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDefaultDiagram.png[width\u003d\"800\"]"},{"lineNumber":525,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":526,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup testBackup.xml`. The following sequence diagram"},{"lineNumber":527,"author":{"gitId":"charlesgoh"},"content":"demonstrates how this works:"},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":529,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceCustomDiagram.png[width\u003d\"800]"},{"lineNumber":530,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":531,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted."},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":534,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":535,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +"},{"lineNumber":536,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement backup command via Command Line Interface +"},{"lineNumber":537,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Backing up data is easier and faster for users who are familiar with the commands. Less button clicks. +"},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":"**Cons:** UI not as intuitive. Users who are not familiar with the application may not know about this feature +"},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement backup command via GUI +"},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for all users since the options are all graphical +"},{"lineNumber":541,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hinders productivity. Excessive number of clicks to accomplish an essential task."},{"lineNumber":542,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":544,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":545,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Custom and/or Default file paths for backup file +"},{"lineNumber":546,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implemented both types of commands +"},{"lineNumber":547,"author":{"gitId":"charlesgoh"},"content":"**Pros:** User can choose either command option. Gives the user more choices +"},{"lineNumber":548,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May seem confusing to the user at first +"},{"lineNumber":549,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement only the default option (save backup file to data directory of application) +"},{"lineNumber":550,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Faster for the user to key in one word rather than a command with many words +"},{"lineNumber":551,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Reduces choice for experienced users who may want to save to another location or use a different save name"},{"lineNumber":552,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":553,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields"},{"lineNumber":554,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":555,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email` and `Address` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not."},{"lineNumber":556,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":557,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +"},{"lineNumber":558,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +"},{"lineNumber":559,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +"},{"lineNumber":560,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":561,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes."},{"lineNumber":562,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field."},{"lineNumber":563,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor."},{"lineNumber":564,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`."},{"lineNumber":565,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":566,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":567,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : Sequence Diagram for adding a Person with private fields_"},{"lineNumber":568,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":569,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +"},{"lineNumber":570,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:"},{"lineNumber":571,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":572,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":573,"author":{"gitId":"jeffreygohkw"},"content":"@Override"},{"lineNumber":574,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {"},{"lineNumber":575,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":576,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":577,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":578,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;"},{"lineNumber":579,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":580,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":581,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":582,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI."},{"lineNumber":583,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":584,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name."},{"lineNumber":585,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":586,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`."},{"lineNumber":587,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":588,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`."},{"lineNumber":589,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following"},{"lineNumber":590,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":591,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format"},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]"},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e"},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e"},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e"},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e"},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e"},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e"},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e"},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e"},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e"},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e"},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e"},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same."},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +"},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was."},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":625,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`."},{"lineNumber":626,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true."},{"lineNumber":627,"author":{"gitId":"-"},"content":""},{"lineNumber":628,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false."},{"lineNumber":629,"author":{"gitId":"-"},"content":""},{"lineNumber":630,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object."},{"lineNumber":631,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":632,"author":{"gitId":"-"},"content":"----"},{"lineNumber":633,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":634,"author":{"gitId":"-"},"content":" Name updatedName;"},{"lineNumber":635,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {"},{"lineNumber":636,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":637,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":638,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":639,"author":{"gitId":"-"},"content":" }"},{"lineNumber":640,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":641,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":642,"author":{"gitId":"-"},"content":" }"},{"lineNumber":643,"author":{"gitId":"-"},"content":" return updatedName;"},{"lineNumber":644,"author":{"gitId":"-"},"content":" }"},{"lineNumber":645,"author":{"gitId":"-"},"content":"----"},{"lineNumber":646,"author":{"gitId":"-"},"content":""},{"lineNumber":647,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing."},{"lineNumber":648,"author":{"gitId":"-"},"content":""},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":650,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":651,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +"},{"lineNumber":652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +"},{"lineNumber":653,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +"},{"lineNumber":654,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +"},{"lineNumber":655,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +"},{"lineNumber":656,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +"},{"lineNumber":657,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to."},{"lineNumber":658,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":659,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":660,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +"},{"lineNumber":661,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +"},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +"},{"lineNumber":663,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +"},{"lineNumber":664,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +"},{"lineNumber":665,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +"},{"lineNumber":666,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users."},{"lineNumber":667,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy"},{"lineNumber":669,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":670,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`."},{"lineNumber":671,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below."},{"lineNumber":673,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":675,"author":{"gitId":"-"},"content":"_Figure 3.6.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_"},{"lineNumber":676,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object."},{"lineNumber":678,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":679,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`."},{"lineNumber":680,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`"},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":683,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`."},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`."},{"lineNumber":685,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`."},{"lineNumber":687,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":688,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":689,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`."},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all."},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":694,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +"},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +"},{"lineNumber":696,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +"},{"lineNumber":697,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +"},{"lineNumber":698,"author":{"gitId":"-"},"content":"**Alternative 2:** Enhance the functi-onality of EditCommand. +"},{"lineNumber":699,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +"},{"lineNumber":700,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data."},{"lineNumber":701,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps"},{"lineNumber":703,"author":{"gitId":"-"},"content":""},{"lineNumber":704,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +"},{"lineNumber":705,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:"},{"lineNumber":706,"author":{"gitId":"-"},"content":""},{"lineNumber":707,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":708,"author":{"gitId":"-"},"content":"----"},{"lineNumber":709,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":710,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":711,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":712,"author":{"gitId":"-"},"content":" return new LocateCommand(index);"},{"lineNumber":713,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":714,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":715,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":716,"author":{"gitId":"-"},"content":" }"},{"lineNumber":717,"author":{"gitId":"-"},"content":" }"},{"lineNumber":718,"author":{"gitId":"-"},"content":"----"},{"lineNumber":719,"author":{"gitId":"-"},"content":""},{"lineNumber":720,"author":{"gitId":"-"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of `Person`s, a `CommandException` will be thrown."},{"lineNumber":721,"author":{"gitId":"-"},"content":""},{"lineNumber":722,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution."},{"lineNumber":723,"author":{"gitId":"-"},"content":""},{"lineNumber":724,"author":{"gitId":"-"},"content":"This code for this can be found below:"},{"lineNumber":725,"author":{"gitId":"-"},"content":""},{"lineNumber":726,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":727,"author":{"gitId":"-"},"content":"----"},{"lineNumber":728,"author":{"gitId":"-"},"content":"@Override"},{"lineNumber":729,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":730,"author":{"gitId":"-"},"content":""},{"lineNumber":731,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":732,"author":{"gitId":"-"},"content":""},{"lineNumber":733,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":734,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":735,"author":{"gitId":"-"},"content":" }"},{"lineNumber":736,"author":{"gitId":"-"},"content":""},{"lineNumber":737,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":738,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":739,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":740,"author":{"gitId":"-"},"content":""},{"lineNumber":741,"author":{"gitId":"-"},"content":" }"},{"lineNumber":742,"author":{"gitId":"-"},"content":"----"},{"lineNumber":743,"author":{"gitId":"-"},"content":""},{"lineNumber":744,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:"},{"lineNumber":745,"author":{"gitId":"-"},"content":""},{"lineNumber":746,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":747,"author":{"gitId":"-"},"content":"----"},{"lineNumber":748,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":749,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":750,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":751,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":752,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":753,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":754,"author":{"gitId":"-"},"content":" }"},{"lineNumber":755,"author":{"gitId":"-"},"content":" }"},{"lineNumber":756,"author":{"gitId":"-"},"content":"----"},{"lineNumber":757,"author":{"gitId":"-"},"content":""},{"lineNumber":758,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:"},{"lineNumber":759,"author":{"gitId":"-"},"content":""},{"lineNumber":760,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":761,"author":{"gitId":"-"},"content":"_Figure 3.7.1 : Sequence Diagram for Locating a Person\u0027s Address_"},{"lineNumber":762,"author":{"gitId":"-"},"content":""},{"lineNumber":763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":764,"author":{"gitId":"-"},"content":""},{"lineNumber":765,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +"},{"lineNumber":766,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Create a seperate command `locate`. +"},{"lineNumber":767,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +"},{"lineNumber":768,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +"},{"lineNumber":769,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +"},{"lineNumber":770,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +"},{"lineNumber":771,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users."},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":773,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism"},{"lineNumber":774,"author":{"gitId":"-"},"content":""},{"lineNumber":775,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete"},{"lineNumber":776,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`."},{"lineNumber":777,"author":{"gitId":"-"},"content":""},{"lineNumber":778,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`."},{"lineNumber":779,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once."},{"lineNumber":780,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`addtag 1 2 3 t/friends`) will be executed."},{"lineNumber":781,"author":{"gitId":"-"},"content":"The same operation will happen for `deletetag` command."},{"lineNumber":782,"author":{"gitId":"-"},"content":""},{"lineNumber":783,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works"},{"lineNumber":784,"author":{"gitId":"-"},"content":"in a similar way."},{"lineNumber":785,"author":{"gitId":"-"},"content":""},{"lineNumber":786,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:"},{"lineNumber":787,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":788,"author":{"gitId":"-"},"content":"----"},{"lineNumber":789,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":790,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book."},{"lineNumber":791,"author":{"gitId":"-"},"content":" */"},{"lineNumber":792,"author":{"gitId":"-"},"content":"public class AddTagCommand extends UndoableCommand {"},{"lineNumber":793,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":794,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":795,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":796,"author":{"gitId":"-"},"content":" */"},{"lineNumber":797,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":798,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":799,"author":{"gitId":"-"},"content":""},{"lineNumber":800,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":801,"author":{"gitId":"-"},"content":" // check whether the index within the range"},{"lineNumber":802,"author":{"gitId":"-"},"content":" }"},{"lineNumber":803,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":804,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag"},{"lineNumber":805,"author":{"gitId":"-"},"content":" }"},{"lineNumber":806,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag"},{"lineNumber":807,"author":{"gitId":"-"},"content":" return new CommandResult();"},{"lineNumber":808,"author":{"gitId":"-"},"content":" }"},{"lineNumber":809,"author":{"gitId":"-"},"content":"----"},{"lineNumber":810,"author":{"gitId":"-"},"content":""},{"lineNumber":811,"author":{"gitId":"-"},"content":"Suppose the user enter the `addtag 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:"},{"lineNumber":812,"author":{"gitId":"-"},"content":""},{"lineNumber":813,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":814,"author":{"gitId":"-"},"content":"_Figure 3.8.1 : Add Tag Sequence Diagram for Logic_ +"},{"lineNumber":815,"author":{"gitId":"-"},"content":"The `deletetag` command works the same as `addtag` command with different name only."},{"lineNumber":816,"author":{"gitId":"-"},"content":""},{"lineNumber":817,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":818,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +"},{"lineNumber":819,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +"},{"lineNumber":820,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception."},{"lineNumber":821,"author":{"gitId":"-"},"content":""},{"lineNumber":822,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":823,"author":{"gitId":"-"},"content":""},{"lineNumber":824,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `addtag` and `deletetag` +"},{"lineNumber":825,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +"},{"lineNumber":826,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +"},{"lineNumber":827,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+"},{"lineNumber":828,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +"},{"lineNumber":829,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +"},{"lineNumber":830,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list."},{"lineNumber":831,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle."},{"lineNumber":832,"author":{"gitId":"-"},"content":""},{"lineNumber":833,"author":{"gitId":"-"},"content":"---"},{"lineNumber":834,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +"},{"lineNumber":835,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `addtag` and `deletetag` +"},{"lineNumber":836,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +"},{"lineNumber":837,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +"},{"lineNumber":838,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +"},{"lineNumber":839,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +"},{"lineNumber":840,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner."},{"lineNumber":841,"author":{"gitId":"-"},"content":""},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism"},{"lineNumber":843,"author":{"gitId":"-"},"content":""},{"lineNumber":844,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book."},{"lineNumber":845,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`."},{"lineNumber":846,"author":{"gitId":"-"},"content":""},{"lineNumber":847,"author":{"gitId":"-"},"content":"The `findtag` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`."},{"lineNumber":848,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first."},{"lineNumber":849,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar."},{"lineNumber":850,"author":{"gitId":"-"},"content":""},{"lineNumber":851,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences."},{"lineNumber":852,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`."},{"lineNumber":853,"author":{"gitId":"-"},"content":""},{"lineNumber":854,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:"},{"lineNumber":855,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String."},{"lineNumber":856,"author":{"gitId":"-"},"content":""},{"lineNumber":857,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":858,"author":{"gitId":"-"},"content":"----"},{"lineNumber":859,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":860,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":861,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":862,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {"},{"lineNumber":863,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":864,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");"},{"lineNumber":865,"author":{"gitId":"-"},"content":" }"},{"lineNumber":866,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();"},{"lineNumber":867,"author":{"gitId":"-"},"content":" }"},{"lineNumber":868,"author":{"gitId":"-"},"content":"----"},{"lineNumber":869,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one"},{"lineNumber":870,"author":{"gitId":"-"},"content":"is for the tags to be excluded."},{"lineNumber":871,"author":{"gitId":"-"},"content":""},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":873,"author":{"gitId":"-"},"content":"----"},{"lineNumber":874,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":875,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":876,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":877,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":878,"author":{"gitId":"-"},"content":" */"},{"lineNumber":879,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":880,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {"},{"lineNumber":881,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {"},{"lineNumber":882,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);"},{"lineNumber":883,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":884,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));"},{"lineNumber":885,"author":{"gitId":"-"},"content":" }"},{"lineNumber":886,"author":{"gitId":"-"},"content":" }"},{"lineNumber":887,"author":{"gitId":"-"},"content":" }"},{"lineNumber":888,"author":{"gitId":"-"},"content":"----"},{"lineNumber":889,"author":{"gitId":"-"},"content":""},{"lineNumber":890,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +"},{"lineNumber":891,"author":{"gitId":"-"},"content":"Suppose the user enter `findtag friends` command. The following sequence diagram shows how the find tag command works:"},{"lineNumber":892,"author":{"gitId":"-"},"content":""},{"lineNumber":893,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":894,"author":{"gitId":"-"},"content":"_Figure 3.9.1 : Find Tag Sequence Diagram for Logic_ +"},{"lineNumber":895,"author":{"gitId":"-"},"content":""},{"lineNumber":896,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":897,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list."},{"lineNumber":898,"author":{"gitId":"-"},"content":""},{"lineNumber":899,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":900,"author":{"gitId":"-"},"content":""},{"lineNumber":901,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `findtag` +"},{"lineNumber":902,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `findtag` +"},{"lineNumber":903,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `findtag` command will be similar to the `find` command. +"},{"lineNumber":904,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +"},{"lineNumber":905,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `findtag` in `FindCommand`. +"},{"lineNumber":906,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +"},{"lineNumber":907,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle"},{"lineNumber":908,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things."},{"lineNumber":909,"author":{"gitId":"-"},"content":""},{"lineNumber":910,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging"},{"lineNumber":911,"author":{"gitId":"-"},"content":""},{"lineNumber":912,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations."},{"lineNumber":913,"author":{"gitId":"-"},"content":""},{"lineNumber":914,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])"},{"lineNumber":915,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level"},{"lineNumber":916,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file."},{"lineNumber":917,"author":{"gitId":"-"},"content":""},{"lineNumber":918,"author":{"gitId":"-"},"content":"*Logging Levels*"},{"lineNumber":919,"author":{"gitId":"-"},"content":""},{"lineNumber":920,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application"},{"lineNumber":921,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution"},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App"},{"lineNumber":923,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size"},{"lineNumber":924,"author":{"gitId":"-"},"content":""},{"lineNumber":925,"author":{"gitId":"-"},"content":""},{"lineNumber":926,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration"},{"lineNumber":927,"author":{"gitId":"-"},"content":""},{"lineNumber":928,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`)."},{"lineNumber":929,"author":{"gitId":"-"},"content":""},{"lineNumber":930,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation"},{"lineNumber":931,"author":{"gitId":"-"},"content":""},{"lineNumber":932,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation."},{"lineNumber":933,"author":{"gitId":"-"},"content":""},{"lineNumber":934,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":935,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting."},{"lineNumber":936,"author":{"gitId":"-"},"content":""},{"lineNumber":937,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation"},{"lineNumber":938,"author":{"gitId":"-"},"content":""},{"lineNumber":939,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits."},{"lineNumber":940,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time."},{"lineNumber":941,"author":{"gitId":"-"},"content":""},{"lineNumber":942,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation"},{"lineNumber":943,"author":{"gitId":"-"},"content":""},{"lineNumber":944,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis."},{"lineNumber":945,"author":{"gitId":"-"},"content":""},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format"},{"lineNumber":947,"author":{"gitId":"-"},"content":""},{"lineNumber":948,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages."},{"lineNumber":949,"author":{"gitId":"-"},"content":""},{"lineNumber":950,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format."},{"lineNumber":951,"author":{"gitId":"-"},"content":""},{"lineNumber":952,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format."},{"lineNumber":953,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`."},{"lineNumber":954,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu."},{"lineNumber":955,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below."},{"lineNumber":956,"author":{"gitId":"-"},"content":""},{"lineNumber":957,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]"},{"lineNumber":958,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_"},{"lineNumber":959,"author":{"gitId":"-"},"content":""},{"lineNumber":960,"author":{"gitId":"-"},"content":"\u003d\u003d Testing"},{"lineNumber":961,"author":{"gitId":"-"},"content":""},{"lineNumber":962,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests"},{"lineNumber":963,"author":{"gitId":"-"},"content":""},{"lineNumber":964,"author":{"gitId":"-"},"content":"There are three ways to run tests."},{"lineNumber":965,"author":{"gitId":"-"},"content":""},{"lineNumber":966,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":967,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies."},{"lineNumber":968,"author":{"gitId":"-"},"content":""},{"lineNumber":969,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*"},{"lineNumber":970,"author":{"gitId":"-"},"content":""},{"lineNumber":971,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`"},{"lineNumber":972,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`"},{"lineNumber":973,"author":{"gitId":"-"},"content":""},{"lineNumber":974,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*"},{"lineNumber":975,"author":{"gitId":"-"},"content":""},{"lineNumber":976,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)"},{"lineNumber":977,"author":{"gitId":"-"},"content":""},{"lineNumber":978,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":979,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle."},{"lineNumber":980,"author":{"gitId":"-"},"content":""},{"lineNumber":981,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*"},{"lineNumber":982,"author":{"gitId":"-"},"content":""},{"lineNumber":983,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running."},{"lineNumber":984,"author":{"gitId":"-"},"content":""},{"lineNumber":985,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)"},{"lineNumber":986,"author":{"gitId":"-"},"content":""},{"lineNumber":987,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests"},{"lineNumber":988,"author":{"gitId":"-"},"content":""},{"lineNumber":989,"author":{"gitId":"-"},"content":"We have two types of tests:"},{"lineNumber":990,"author":{"gitId":"-"},"content":""},{"lineNumber":991,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,"},{"lineNumber":992,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package."},{"lineNumber":993,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package."},{"lineNumber":994,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,"},{"lineNumber":995,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +"},{"lineNumber":996,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`"},{"lineNumber":997,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +"},{"lineNumber":998,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`"},{"lineNumber":999,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`"},{"lineNumber":1001,"author":{"gitId":"-"},"content":""},{"lineNumber":1002,"author":{"gitId":"-"},"content":""},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing"},{"lineNumber":1004,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**"},{"lineNumber":1005,"author":{"gitId":"-"},"content":""},{"lineNumber":1006,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing."},{"lineNumber":1007,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`."},{"lineNumber":1008,"author":{"gitId":"-"},"content":""},{"lineNumber":1009,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops"},{"lineNumber":1010,"author":{"gitId":"-"},"content":""},{"lineNumber":1011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation"},{"lineNumber":1012,"author":{"gitId":"-"},"content":""},{"lineNumber":1013,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation."},{"lineNumber":1014,"author":{"gitId":"-"},"content":""},{"lineNumber":1015,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration"},{"lineNumber":1016,"author":{"gitId":"-"},"content":""},{"lineNumber":1017,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details."},{"lineNumber":1018,"author":{"gitId":"-"},"content":""},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release"},{"lineNumber":1020,"author":{"gitId":"-"},"content":""},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Here are the steps to create a new release."},{"lineNumber":1022,"author":{"gitId":"-"},"content":""},{"lineNumber":1023,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]."},{"lineNumber":1024,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e."},{"lineNumber":1025,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`"},{"lineNumber":1026,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created."},{"lineNumber":1027,"author":{"gitId":"-"},"content":""},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies"},{"lineNumber":1029,"author":{"gitId":"-"},"content":""},{"lineNumber":1030,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +"},{"lineNumber":1031,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +"},{"lineNumber":1032,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)"},{"lineNumber":1033,"author":{"gitId":"-"},"content":""},{"lineNumber":1034,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1035,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories"},{"lineNumber":1036,"author":{"gitId":"-"},"content":""},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`"},{"lineNumber":1038,"author":{"gitId":"-"},"content":""},{"lineNumber":1039,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]"},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can..."},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App"},{"lineNumber":1043,"author":{"gitId":"-"},"content":""},{"lineNumber":1044,"author":{"gitId":"-"},"content":"|`* * *` |user |add a new person |"},{"lineNumber":1045,"author":{"gitId":"-"},"content":""},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need"},{"lineNumber":1047,"author":{"gitId":"-"},"content":""},{"lineNumber":1048,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts"},{"lineNumber":1049,"author":{"gitId":"-"},"content":""},{"lineNumber":1050,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added"},{"lineNumber":1051,"author":{"gitId":"-"},"content":""},{"lineNumber":1052,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made"},{"lineNumber":1053,"author":{"gitId":"-"},"content":""},{"lineNumber":1054,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values"},{"lineNumber":1055,"author":{"gitId":"-"},"content":""},{"lineNumber":1056,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident"},{"lineNumber":1057,"author":{"gitId":"-"},"content":""},{"lineNumber":1058,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location"},{"lineNumber":1059,"author":{"gitId":"-"},"content":""},{"lineNumber":1060,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs"},{"lineNumber":1061,"author":{"gitId":"-"},"content":""},{"lineNumber":1062,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity"},{"lineNumber":1063,"author":{"gitId":"-"},"content":""},{"lineNumber":1064,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |first-time user |be able to see a user guide when I first start the program |be clear on how to use it"},{"lineNumber":1065,"author":{"gitId":"-"},"content":""},{"lineNumber":1066,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better"},{"lineNumber":1067,"author":{"gitId":"-"},"content":""},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me"},{"lineNumber":1069,"author":{"gitId":"-"},"content":""},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts"},{"lineNumber":1071,"author":{"gitId":"-"},"content":""},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms"},{"lineNumber":1073,"author":{"gitId":"-"},"content":""},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with many social media accounts |be able to add my contacts\u0027 social media accounts to the address book |improve connectivity and learn more about my contacts"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others"},{"lineNumber":1077,"author":{"gitId":"-"},"content":""},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|`*` |user with many persons in the address book |sort persons by name |locate a person easily"},{"lineNumber":1079,"author":{"gitId":"-"},"content":""},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly"},{"lineNumber":1081,"author":{"gitId":"-"},"content":""},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like"},{"lineNumber":1083,"author":{"gitId":"-"},"content":""},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts"},{"lineNumber":1085,"author":{"gitId":"-"},"content":""},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently"},{"lineNumber":1087,"author":{"gitId":"-"},"content":""},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |non tech-savvy user |have the option to fill out certain fields |use the address book without having to use the intimidating CLI."},{"lineNumber":1089,"author":{"gitId":"-"},"content":""},{"lineNumber":1090,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |error-prone user |have minor typos auto corrected |continue using the address book without correcting my mistakes"},{"lineNumber":1091,"author":{"gitId":"-"},"content":""},{"lineNumber":1092,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features"},{"lineNumber":1093,"author":{"gitId":"-"},"content":""},{"lineNumber":1094,"author":{"gitId":"-"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1096,"author":{"gitId":"-"},"content":""},{"lineNumber":1097,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1098,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases"},{"lineNumber":1099,"author":{"gitId":"-"},"content":""},{"lineNumber":1100,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)"},{"lineNumber":1101,"author":{"gitId":"-"},"content":""},{"lineNumber":1102,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person"},{"lineNumber":1104,"author":{"gitId":"-"},"content":""},{"lineNumber":1105,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1106,"author":{"gitId":"-"},"content":""},{"lineNumber":1107,"author":{"gitId":"-"},"content":"1. User requests to list persons"},{"lineNumber":1108,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1109,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list"},{"lineNumber":1110,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person"},{"lineNumber":1111,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1112,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1113,"author":{"gitId":"-"},"content":""},{"lineNumber":1114,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1115,"author":{"gitId":"-"},"content":""},{"lineNumber":1116,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1117,"author":{"gitId":"-"},"content":"* 2a. The list is empty."},{"lineNumber":1118,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1119,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1120,"author":{"gitId":"-"},"content":""},{"lineNumber":1121,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid."},{"lineNumber":1122,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1123,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1124,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1125,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1126,"author":{"gitId":"-"},"content":"Use case resumes at step 2."},{"lineNumber":1127,"author":{"gitId":"-"},"content":""},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person"},{"lineNumber":1130,"author":{"gitId":"-"},"content":""},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1132,"author":{"gitId":"-"},"content":""},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria"},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria"},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1136,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1137,"author":{"gitId":"-"},"content":""},{"lineNumber":1138,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1139,"author":{"gitId":"-"},"content":""},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1144,"author":{"gitId":"-"},"content":""},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found."},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1147,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1148,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found."},{"lineNumber":1149,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1150,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1151,"author":{"gitId":"-"},"content":""},{"lineNumber":1152,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person"},{"lineNumber":1154,"author":{"gitId":"-"},"content":""},{"lineNumber":1155,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1156,"author":{"gitId":"-"},"content":""},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons"},{"lineNumber":1158,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1159,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list"},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person."},{"lineNumber":1161,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person."},{"lineNumber":1162,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1163,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1164,"author":{"gitId":"-"},"content":""},{"lineNumber":1165,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1166,"author":{"gitId":"-"},"content":""},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1171,"author":{"gitId":"-"},"content":""},{"lineNumber":1172,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid."},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1174,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1175,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1178,"author":{"gitId":"-"},"content":""},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid."},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1181,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1182,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message."},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1184,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1185,"author":{"gitId":"-"},"content":""},{"lineNumber":1186,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail."},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1188,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made."},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1191,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1192,"author":{"gitId":"-"},"content":""},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps"},{"lineNumber":1195,"author":{"gitId":"-"},"content":""},{"lineNumber":1196,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1197,"author":{"gitId":"-"},"content":""},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps"},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo"},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone."},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1204,"author":{"gitId":"-"},"content":""},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1206,"author":{"gitId":"-"},"content":""},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands."},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1210,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands."},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3."},{"lineNumber":1214,"author":{"gitId":"-"},"content":""},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands."},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands."},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3"},{"lineNumber":1222,"author":{"gitId":"-"},"content":""},{"lineNumber":1223,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort"},{"lineNumber":1225,"author":{"gitId":"-"},"content":""},{"lineNumber":1226,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1227,"author":{"gitId":"-"},"content":""},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria"},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria"},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message."},{"lineNumber":1231,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1232,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1233,"author":{"gitId":"-"},"content":""},{"lineNumber":1234,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1235,"author":{"gitId":"-"},"content":""},{"lineNumber":1236,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1237,"author":{"gitId":"-"},"content":"* 2a. The list is empty."},{"lineNumber":1238,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1239,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1240,"author":{"gitId":"-"},"content":""},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid."},{"lineNumber":1242,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1243,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message."},{"lineNumber":1245,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1."},{"lineNumber":1247,"author":{"gitId":"-"},"content":""},{"lineNumber":1248,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1249,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements"},{"lineNumber":1250,"author":{"gitId":"-"},"content":""},{"lineNumber":1251,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed."},{"lineNumber":1252,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage."},{"lineNumber":1253,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse."},{"lineNumber":1254,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure."},{"lineNumber":1255,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse."},{"lineNumber":1256,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0."},{"lineNumber":1257,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing."},{"lineNumber":1258,"author":{"gitId":"-"},"content":""},{"lineNumber":1259,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1260,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary"},{"lineNumber":1261,"author":{"gitId":"-"},"content":""},{"lineNumber":1262,"author":{"gitId":"-"},"content":"[[mainstream-os]]"},{"lineNumber":1263,"author":{"gitId":"-"},"content":"Mainstream OS"},{"lineNumber":1264,"author":{"gitId":"-"},"content":""},{"lineNumber":1265,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1266,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X"},{"lineNumber":1267,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1268,"author":{"gitId":"-"},"content":""},{"lineNumber":1269,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]"},{"lineNumber":1270,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible"},{"lineNumber":1271,"author":{"gitId":"-"},"content":""},{"lineNumber":1272,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1273,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data."},{"lineNumber":1274,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1275,"author":{"gitId":"-"},"content":""},{"lineNumber":1276,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1277,"author":{"gitId":"-"},"content":"\u003d\u003d Product Survey"},{"lineNumber":1278,"author":{"gitId":"-"},"content":""},{"lineNumber":1279,"author":{"gitId":"-"},"content":"*Product Name*"},{"lineNumber":1280,"author":{"gitId":"-"},"content":""},{"lineNumber":1281,"author":{"gitId":"-"},"content":"Author: ..."},{"lineNumber":1282,"author":{"gitId":"-"},"content":""},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Pros:"},{"lineNumber":1284,"author":{"gitId":"-"},"content":""},{"lineNumber":1285,"author":{"gitId":"-"},"content":"* ..."},{"lineNumber":1286,"author":{"gitId":"-"},"content":"* ..."},{"lineNumber":1287,"author":{"gitId":"-"},"content":""},{"lineNumber":1288,"author":{"gitId":"-"},"content":"Cons:"},{"lineNumber":1289,"author":{"gitId":"-"},"content":""},{"lineNumber":1290,"author":{"gitId":"-"},"content":"* ..."},{"lineNumber":1291,"author":{"gitId":"-"},"content":"* ..."}],"authorContributionMap":{"charlesgoh":130,"jeffreygohkw":140,"Esilocke":169,"-":852}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:"},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT`"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Overview"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"Address++ is an address book application that can store contacts, as well as maintain a list of ongoing tasks. You can use the various commands in Address++ to maintain, create, and delete your contacts, or tasks. +"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"Address++ is targeted at NUS students, such as those working on projects or assignments."},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer."},{"lineNumber":30,"author":{"gitId":"-"},"content":"+"},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":34,"author":{"gitId":"-"},"content":"+"},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here]."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++."},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds."},{"lineNumber":38,"author":{"gitId":"-"},"content":"+"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]"},{"lineNumber":40,"author":{"gitId":"-"},"content":"+"},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +"},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window."},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window"},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++."},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list"},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`."},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`."},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc."},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable."},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too large?"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"You can change the font sizes by clicking on the Font Size button and selecting any of the following options:"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"Keyboard shortcuts have been provided for your convenience."},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"There is a limit to how much your font sizes can increase or decrease. Also, font sizes will increase for the"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"contacts entries and the todo list\u0027s entries."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"Format: `help` +"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1]."},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a person/task: `add`"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book, be it a newly met project member, or your friend who is taking the same module as you. +"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"`add` can be replaced by `a` for faster input. +"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] r/[REMARK] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address` or `Remark` to be private by placing a `p` in front of the prefix. +"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears`"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"* `add n/Betsy Crowe t/friend e/betsycrowe@example.com b/29-02-1996 a/Newgate Prison p/1234567 t/criminal r/Stares at the wall`"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"* `add n/Ima Hidearu b/ a/ e/ p/ r/ t/secretive`"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"* `add n/Luke Groundswimmer p/ a/ e/ c/`"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"* `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate c/`"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"By adding the word `task`, you can use the same command to add a new task or deadline, such as a reminder of project deadlines. +"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"Format: `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"* Task deadlines should be in the format DD-MM-YYYY +"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 1 to 5 inclusive, with 5 being the highest priority +"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default."},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"* `add task n/Update documentation d/Update docs for V1.1 for CS2103T t/10-10-2017 p/4`"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"* `add task n/Buy new pencil p/2`"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a tag to persons : `addtag` (Since V1.2)"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":"You can use the `addtag` command to add tag for multiple persons in the address book. For example, you may wish to add tag `friends` to the first two persons in the address book. +"},{"lineNumber":130,"author":{"gitId":"-"},"content":"`addtag` can be replaced by `atag` for faster input. +"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"Format: `addtag INDEX... t/[TAG]` +"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":"****"},{"lineNumber":135,"author":{"gitId":"-"},"content":"* You can add the tag of the person at the specific `INDEX`."},{"lineNumber":136,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":137,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":138,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, addtag will add the tag to all contacts in the address book."},{"lineNumber":139,"author":{"gitId":"-"},"content":"****"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":144,"author":{"gitId":"-"},"content":"`addtag 1 2 t/friends` +"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"Adds the friends tag of the 1st and 2nd person in the address book."},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"`addtag t/acquaintance` +"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Adds the acquaintance tag to all contacts in the address book."},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all persons : `list`"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts, or tasks, in the address book. +"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"Format: `list` +"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"Instead of typing out `list` every time, you can alternatively use `l` to shorten the command."},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing a person : `edit`"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":"****"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command."},{"lineNumber":167,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values."},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands."},{"lineNumber":169,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it."},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command."},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message."},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields."},{"lineNumber":173,"author":{"gitId":"-"},"content":"****"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com` +"},{"lineNumber":178,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively."},{"lineNumber":179,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/` +"},{"lineNumber":180,"author":{"gitId":"-"},"content":"Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags."},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"* `edit 1 p/` +"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Removes the phone number of the 1st person."},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `edit` will allow you to edit task details instead. You may wish to edit your task deadlines, for example, when your project schedule changes, or your task priorities, when a task becomes more urgent. +"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"Format: `edit task INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY]` +"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided."},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values."},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/5` +"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"Edits the priority of the 2nd task to be `5`."},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/ t/` +"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"Removes the priority and deadline of the second task."},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edittag` (Since v1.2)"},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"You can use `edittag` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"`edittag` can be replaced by `et` for faster input. +"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"Format: `edittag TAGTOBERENAMED NEWTAGNAME` +"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":"****"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different."},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `TAGTOBERENAMED` value."},{"lineNumber":210,"author":{"gitId":"-"},"content":"****"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"* `edittag friends enemies` +"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"Changes the tag called `friends` to one called `enemies` instead. All existing contacts with a `friends` tag will now have an `enemies` tag instead."},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS]`"},{"lineNumber":221,"author":{"gitId":"-"},"content":"Shorthand commands: `cp`"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields."},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix."},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI."},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI."},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy."},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting."},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"Examples:"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"* `changeprivacy 1 p/false e/true` +"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Sets the phone number of the 1st person to be public and their email address to be private. The 1st person\u0027s phone number will be displayed, if available, while their email address will be hidden in the UI."},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":"* `cp 2 a/false n/true e/false` +"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":"Sets the address and email of the 2nd person to be public and their name to be private. The 2nd person\u0027s address and email will be displayed, if available, while their name will be hidden in the UI."},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":""},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)"},{"lineNumber":242,"author":{"gitId":"-"},"content":""},{"lineNumber":243,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite persons. For example, you may wish to set your girlfriend as your favourite contact. +"},{"lineNumber":244,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +"},{"lineNumber":245,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +"},{"lineNumber":246,"author":{"gitId":"-"},"content":""},{"lineNumber":247,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":248,"author":{"gitId":"-"},"content":""},{"lineNumber":249,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":250,"author":{"gitId":"-"},"content":"`favourite 2` +"},{"lineNumber":251,"author":{"gitId":"-"},"content":"Favourites the 2nd person in the address book."},{"lineNumber":252,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":253,"author":{"gitId":"-"},"content":"`favourite 1` +"},{"lineNumber":254,"author":{"gitId":"-"},"content":"Favourite the 1st person in the results of the `find` command."},{"lineNumber":255,"author":{"gitId":"-"},"content":""},{"lineNumber":256,"author":{"gitId":"-"},"content":"****"},{"lineNumber":257,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`."},{"lineNumber":258,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":259,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":260,"author":{"gitId":"-"},"content":"****"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)"},{"lineNumber":263,"author":{"gitId":"-"},"content":""},{"lineNumber":264,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +"},{"lineNumber":265,"author":{"gitId":"-"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +"},{"lineNumber":266,"author":{"gitId":"-"},"content":"Format: `showfavourite` +"},{"lineNumber":267,"author":{"gitId":"-"},"content":""},{"lineNumber":268,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":270,"author":{"gitId":"-"},"content":"`showfavourite` command: It will return an empty list if there is no favourite persons."},{"lineNumber":271,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":272,"author":{"gitId":"-"},"content":""},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":"* `find John` +"},{"lineNumber":282,"author":{"gitId":"-"},"content":"Returns `john` and `John Doe`"},{"lineNumber":283,"author":{"gitId":"-"},"content":"* `find Betsy Tim John` +"},{"lineNumber":284,"author":{"gitId":"-"},"content":"Returns any person having names `Betsy`, `Tim`, or `John`"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `find` will allow you to sieve through your tasks, instead of your contacts. +"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"In addition to searching the name and description of tasks, you can also opt to filter your tasks by their priority. Simply include `p/PRIORITY` after all your other criteria to do so. +"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"All tasks with a priority higher than or equal to the value provided will be shown. +"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"Format: `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` (Priority search to be coming in v2.0) +"},{"lineNumber":290,"author":{"gitId":"-"},"content":""},{"lineNumber":291,"author":{"gitId":"-"},"content":"****"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"*Important note on `find` criteria*"},{"lineNumber":293,"author":{"gitId":"-"},"content":""},{"lineNumber":294,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`"},{"lineNumber":295,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`"},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"* You can only search for names in Address++"},{"lineNumber":297,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`"},{"lineNumber":298,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`"},{"lineNumber":299,"author":{"gitId":"-"},"content":"****"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"Returns any task that has the word `update` in their names or descriptions"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* `find task update 4` +"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"Returns all tasks that has the word `update` in their names or descriptions"},{"lineNumber":307,"author":{"gitId":"-"},"content":""},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `findtag` (Since V1.4)"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":"You can use the `findtag` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +"},{"lineNumber":311,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/not` in front of the `friends`. +"},{"lineNumber":312,"author":{"gitId":"-"},"content":"`findtag` can be replaced by `ftag` for faster input. +"},{"lineNumber":313,"author":{"gitId":"-"},"content":"Format: `findtag KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":314,"author":{"gitId":"-"},"content":""},{"lineNumber":315,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":"* `findtag friends` +"},{"lineNumber":318,"author":{"gitId":"-"},"content":"Returns any persons having tag `friends`"},{"lineNumber":319,"author":{"gitId":"-"},"content":"* `findtag friends colleagues` +"},{"lineNumber":320,"author":{"gitId":"-"},"content":"Returns any person having tags `friends` or `colleagues`"},{"lineNumber":321,"author":{"gitId":"-"},"content":"* `findtag /notfriends` +"},{"lineNumber":322,"author":{"gitId":"-"},"content":"Returns any persons not have tag `friends`"},{"lineNumber":323,"author":{"gitId":"-"},"content":"* `findtag classmates /notfriends` +"},{"lineNumber":324,"author":{"gitId":"-"},"content":"Returns any person have tags `classmates` but not have tag `friends`"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":"****"},{"lineNumber":327,"author":{"gitId":"-"},"content":"*Important note on `findtag` criteria"},{"lineNumber":328,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`"},{"lineNumber":329,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`"},{"lineNumber":330,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons."},{"lineNumber":331,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `friend` will not match `friends`"},{"lineNumber":332,"author":{"gitId":"-"},"content":"* There is no space `/not` and tag name e.g. `/not friends` will not match `/notfriends`"},{"lineNumber":333,"author":{"gitId":"-"},"content":"****"},{"lineNumber":334,"author":{"gitId":"-"},"content":""},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`"},{"lineNumber":336,"author":{"gitId":"-"},"content":""},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts or tasks from the address book. The `delete` command will help you clean up obsolete or completed tasks, or contacts who you may not wish to associate with anymore. +"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +"},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +"},{"lineNumber":340,"author":{"gitId":"-"},"content":""},{"lineNumber":341,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":342,"author":{"gitId":"-"},"content":""},{"lineNumber":343,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":344,"author":{"gitId":"-"},"content":"`delete 2` +"},{"lineNumber":345,"author":{"gitId":"-"},"content":"Deletes the 2nd person in the address book."},{"lineNumber":346,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":347,"author":{"gitId":"-"},"content":"`delete 1` +"},{"lineNumber":348,"author":{"gitId":"-"},"content":"Deletes the 1st person in the results of the `find` command."},{"lineNumber":349,"author":{"gitId":"-"},"content":""},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"In order to delete tasks, an additional `task` keyword must be specified after the `delete` command. +"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Format: `delete task INDEX`+"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"* Deletes the person or task at the specified `INDEX`."},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"`delete task 2` +"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Deletes the 2nd task in the address book."},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"`delete task 1` +"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"Deletes the 1st task in the results of the `find task` command."},{"lineNumber":367,"author":{"gitId":"-"},"content":""},{"lineNumber":368,"author":{"gitId":"-"},"content":""},{"lineNumber":369,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `deletetag` (Since V1.2)"},{"lineNumber":370,"author":{"gitId":"-"},"content":""},{"lineNumber":371,"author":{"gitId":"-"},"content":"You can use `deletetag` to delete the tag of multiple persons from the address book. +"},{"lineNumber":372,"author":{"gitId":"-"},"content":"`deletetag` can be replaced by `dtag` for faster input. +"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"Format: `deletetag INDEX... t/[TAG]` +"},{"lineNumber":374,"author":{"gitId":"-"},"content":""},{"lineNumber":375,"author":{"gitId":"-"},"content":""},{"lineNumber":376,"author":{"gitId":"-"},"content":"****"},{"lineNumber":377,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`."},{"lineNumber":378,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":379,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":380,"author":{"gitId":"-"},"content":"* If you do not key in any index, deletetag will delete the tag from all contacts in the address book."},{"lineNumber":381,"author":{"gitId":"-"},"content":"****"},{"lineNumber":382,"author":{"gitId":"-"},"content":""},{"lineNumber":383,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":386,"author":{"gitId":"-"},"content":"`deletetag 1 2 t/friends` +"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag of the 1st and 2nd person in the address book."},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"`deletetag t/friends` +"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag from all contacts in the address book."},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sorting your contact list : `sort`"},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts by any field in ascending or descending order using the `sort` command +"},{"lineNumber":395,"author":{"gitId":"-"},"content":"`sort` can be replaced by `so` for faster input. +"},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":"Format: `sort FIELD ORDER` +"},{"lineNumber":397,"author":{"gitId":"-"},"content":""},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":400,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":401,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contact by any field in either ascending or descending order"},{"lineNumber":402,"author":{"gitId":"jeffreygohkw"},"content":"* Field parameters are limited to the following fields: NAME, PHONE, EMAIL, ADDRESS."},{"lineNumber":403,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC."},{"lineNumber":404,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts"},{"lineNumber":405,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":406,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":407,"author":{"gitId":"jeffreygohkw"},"content":"Examples:"},{"lineNumber":408,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":409,"author":{"gitId":"jeffreygohkw"},"content":"* `sort name asc` +"},{"lineNumber":410,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in ascending order by the name field."},{"lineNumber":411,"author":{"gitId":"jeffreygohkw"},"content":"* `sort address desc` +"},{"lineNumber":412,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in descending order by the address field."},{"lineNumber":413,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":414,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Backing up your data : `backup`"},{"lineNumber":415,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":416,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +"},{"lineNumber":417,"author":{"gitId":"-"},"content":"`backup` can be replaced by `bk` for faster input. +"},{"lineNumber":418,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [RELATIVE LOCATION]` +"},{"lineNumber":419,"author":{"gitId":"-"},"content":""},{"lineNumber":420,"author":{"gitId":"-"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":"****"},{"lineNumber":422,"author":{"gitId":"charlesgoh"},"content":"* Allows you to backup your saved data on Address++ in another file."},{"lineNumber":423,"author":{"gitId":"charlesgoh"},"content":"* You can backup your data in the default location or you can specify your desired save location."},{"lineNumber":424,"author":{"gitId":"charlesgoh"},"content":"* You can use the default save name or use your own."},{"lineNumber":425,"author":{"gitId":"-"},"content":"****"},{"lineNumber":426,"author":{"gitId":"-"},"content":""},{"lineNumber":427,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":428,"author":{"gitId":"-"},"content":""},{"lineNumber":429,"author":{"gitId":"charlesgoh"},"content":"* `backup` or `bk` +"},{"lineNumber":430,"author":{"gitId":"charlesgoh"},"content":"This command will help you back up in the default save location --\u003e In the data directory of your application."},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":"* `backup ./test.xml` or `bk ./test.xml` +"},{"lineNumber":432,"author":{"gitId":"charlesgoh"},"content":"This saves the backup file in the current data directory, with the name `test.xml`."},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`"},{"lineNumber":435,"author":{"gitId":"-"},"content":""},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact or task, and look at it in greater detail, such as examining a task with a very long description, or checking out the full address of one of your friends. +"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"Format (person): `select INDEX` +"},{"lineNumber":439,"author":{"gitId":"-"},"content":""},{"lineNumber":440,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":443,"author":{"gitId":"-"},"content":"`select 2` +"},{"lineNumber":444,"author":{"gitId":"-"},"content":"Selects the 2nd person in the address book."},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":446,"author":{"gitId":"-"},"content":"`select 1` +"},{"lineNumber":447,"author":{"gitId":"-"},"content":"Selects the 1st person in the results of the `find` command."},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"To select a task, a `task` keyword must additionally be specified after `select` +"},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Format: `select task INDEX` +"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Selecting a task will load a list of the people who are assigned to it, instead of the Google search page."},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"`select task 2` +"},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Selects the 2nd task in the address book."},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"`select task 1` +"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"Selects the 1st task in the results of the `find task` command."},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)"},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +"},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +"},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +"},{"lineNumber":472,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":473,"author":{"gitId":"jeffreygohkw"},"content":"Examples:"},{"lineNumber":474,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":475,"author":{"gitId":"jeffreygohkw"},"content":"* `list` +"},{"lineNumber":476,"author":{"gitId":"jeffreygohkw"},"content":"`locate 2` +"},{"lineNumber":477,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 2nd person in the address book on Google Maps."},{"lineNumber":478,"author":{"gitId":"jeffreygohkw"},"content":"* `find Betsy` +"},{"lineNumber":479,"author":{"gitId":"jeffreygohkw"},"content":"`locate 1` +"},{"lineNumber":480,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 1st person in the results of the `find` command on Google Maps."},{"lineNumber":481,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":482,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":483,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +"},{"lineNumber":484,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide a specific and valid address."},{"lineNumber":485,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps."},{"lineNumber":486,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":487,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":488,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":489,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Mark task as complete : `setcomplete` (To be coming in V2.0)"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +"},{"lineNumber":494,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +"},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed."},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"`setcomplete 2` +"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as completed."},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"`setcomplete 1` +"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as completed."},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Mark task as incomplete : `setincomplete` (To be coming in V2.0)"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +"},{"lineNumber":515,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +"},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete."},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"`setincomplete 2` +"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as incomplete."},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"`setincomplete 1` +"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as incomplete."},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign contacts to task : `assign` (Since V1.4)"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"`list task` +"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"`assign 1 4 5 to/2` +"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"Assigns the 1st, 4th and 5th contacts to 2nd task in the address book."},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"`find task update` +"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"`assign 2 to/1` +"},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Assigns the 2nd person in the address book to the 1st task in the results of the `find task` command."},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismiss contacts from task : `dismiss` (Since V1.4)"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":558,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"`list task` +"},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"`dismiss 1 4 5 from/2` +"},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"Dismisses 1st, 4th and 5th contacts in the address book from the 2nd task."},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"`find task update` +"},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"`dismiss 2 from/1` +"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"Dismisses the 2nd person in the address book from the 1st task in the results of the `find task` command."},{"lineNumber":579,"author":{"gitId":"-"},"content":""},{"lineNumber":580,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`"},{"lineNumber":581,"author":{"gitId":"-"},"content":""},{"lineNumber":582,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +"},{"lineNumber":583,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +"},{"lineNumber":584,"author":{"gitId":"-"},"content":"Format: `history` +"},{"lineNumber":585,"author":{"gitId":"-"},"content":""},{"lineNumber":586,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":588,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box."},{"lineNumber":589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":592,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`"},{"lineNumber":593,"author":{"gitId":"-"},"content":""},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +"},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +"},{"lineNumber":596,"author":{"gitId":"-"},"content":"Format: `undo` +"},{"lineNumber":597,"author":{"gitId":"-"},"content":""},{"lineNumber":598,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":599,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":600,"author":{"gitId":"-"},"content":"Undoable commands: those commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`)."},{"lineNumber":601,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":602,"author":{"gitId":"-"},"content":""},{"lineNumber":603,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":604,"author":{"gitId":"-"},"content":""},{"lineNumber":605,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":606,"author":{"gitId":"-"},"content":"`list` +"},{"lineNumber":607,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":608,"author":{"gitId":"-"},"content":""},{"lineNumber":609,"author":{"gitId":"-"},"content":"* `select 1` +"},{"lineNumber":610,"author":{"gitId":"-"},"content":"`list` +"},{"lineNumber":611,"author":{"gitId":"-"},"content":"`undo` +"},{"lineNumber":612,"author":{"gitId":"-"},"content":"The `undo` command fails as there are no undoable commands executed previously."},{"lineNumber":613,"author":{"gitId":"-"},"content":""},{"lineNumber":614,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":615,"author":{"gitId":"-"},"content":"`clear` +"},{"lineNumber":616,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +"},{"lineNumber":617,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":618,"author":{"gitId":"-"},"content":""},{"lineNumber":619,"author":{"gitId":"-"},"content":""},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)"},{"lineNumber":621,"author":{"gitId":"-"},"content":""},{"lineNumber":622,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +"},{"lineNumber":623,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +"},{"lineNumber":624,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +"},{"lineNumber":625,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +"},{"lineNumber":626,"author":{"gitId":"-"},"content":""},{"lineNumber":627,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":628,"author":{"gitId":"-"},"content":""},{"lineNumber":629,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":630,"author":{"gitId":"-"},"content":"`unfavourite 2` +"},{"lineNumber":631,"author":{"gitId":"-"},"content":"Unfavourites the 2nd person in the address book."},{"lineNumber":632,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":633,"author":{"gitId":"-"},"content":"`unfavourite 1` +"},{"lineNumber":634,"author":{"gitId":"-"},"content":"Unfavourite the 1st person in the results of the `find` command."},{"lineNumber":635,"author":{"gitId":"-"},"content":""},{"lineNumber":636,"author":{"gitId":"-"},"content":"****"},{"lineNumber":637,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`."},{"lineNumber":638,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":639,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":640,"author":{"gitId":"-"},"content":"****"},{"lineNumber":641,"author":{"gitId":"-"},"content":""},{"lineNumber":642,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`"},{"lineNumber":643,"author":{"gitId":"-"},"content":""},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` wasn\u0027t necessary. `redo` reverses the most recent `undo` command. +"},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +"},{"lineNumber":646,"author":{"gitId":"-"},"content":"Format: `redo` +"},{"lineNumber":647,"author":{"gitId":"-"},"content":""},{"lineNumber":648,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":649,"author":{"gitId":"-"},"content":""},{"lineNumber":650,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":651,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":652,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +"},{"lineNumber":653,"author":{"gitId":"-"},"content":""},{"lineNumber":654,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":655,"author":{"gitId":"-"},"content":"`redo` +"},{"lineNumber":656,"author":{"gitId":"-"},"content":"The `redo` command fails as there are no `undo` commands executed previously."},{"lineNumber":657,"author":{"gitId":"-"},"content":""},{"lineNumber":658,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":659,"author":{"gitId":"-"},"content":"`clear` +"},{"lineNumber":660,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +"},{"lineNumber":661,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":662,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +"},{"lineNumber":663,"author":{"gitId":"-"},"content":"`redo` (reapplies the `clear` command) +"},{"lineNumber":664,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":665,"author":{"gitId":"-"},"content":""},{"lineNumber":666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`"},{"lineNumber":667,"author":{"gitId":"-"},"content":""},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +"},{"lineNumber":669,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +"},{"lineNumber":670,"author":{"gitId":"-"},"content":"Format: `clear` +"},{"lineNumber":671,"author":{"gitId":"-"},"content":""},{"lineNumber":672,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`"},{"lineNumber":673,"author":{"gitId":"-"},"content":""},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +"},{"lineNumber":675,"author":{"gitId":"-"},"content":"Format: `exit`"},{"lineNumber":676,"author":{"gitId":"-"},"content":""},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4]."},{"lineNumber":678,"author":{"gitId":"-"},"content":""},{"lineNumber":679,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data"},{"lineNumber":680,"author":{"gitId":"-"},"content":""},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +"},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually."},{"lineNumber":683,"author":{"gitId":"-"},"content":""},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window."},{"lineNumber":685,"author":{"gitId":"-"},"content":""},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window."},{"lineNumber":687,"author":{"gitId":"-"},"content":""},{"lineNumber":688,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Using the browser"},{"lineNumber":689,"author":{"gitId":"-"},"content":""},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"If you click on a box containing a contact, an internet browser on the right side of the window."},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"* Performing a left click will allow you to perform a search on Google for the name of the contact, and is equivalent to doing a `select` on that oerson."},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":"* If a person\u0027s name or address is set to private, the browser will not perform a search if you click on their box."},{"lineNumber":694,"author":{"gitId":"-"},"content":"* Right clicking on the browser will allow you to go to the previous or next page, as well as reload the page."},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Exporting the data"},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Address book data can be exported in a number of different formats, thus allowing the data to be compatible to any device."},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":701,"author":{"gitId":"-"},"content":"To export data, click on `File -\u003e Export As...` or use the keyboard shortcut kbd:[CTRL]+kbd:[E]` and select the new location and file name for the export file in the pop-up window."},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Auto-Complete: Learning Your Typing Habits"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"The program will learn your typing habits and give autocomplete suggestions that become more accurate over time."},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ"},{"lineNumber":708,"author":{"gitId":"-"},"content":""},{"lineNumber":709,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +"},{"lineNumber":710,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location."},{"lineNumber":711,"author":{"gitId":"-"},"content":""},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet"},{"lineNumber":713,"author":{"gitId":"-"},"content":""},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":715,"author":{"gitId":"-"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665, b/29-02-1996 f/SOC c/www.enteryourcalendarurlhere.com t/friend t/colleague`"},{"lineNumber":716,"author":{"gitId":"jeffreygohkw"},"content":"* *Add with private fields* : `add or a pn/NAME pp/PHONE_NUMBER pe/EMAIL pa/ADDRESS b/BIRTHDAY f/FACULTY c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":717,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665`"},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +"},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"e.g. `add task n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high`"},{"lineNumber":720,"author":{"gitId":"-"},"content":"* *Add tag* : `addtag INDEX t/[TAG]` +"},{"lineNumber":721,"author":{"gitId":"-"},"content":"e.g. `addtag 1 2 t/friends`"},{"lineNumber":722,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE]` +"},{"lineNumber":723,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false`"},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"* *Clear person* : `clear`"},{"lineNumber":725,"author":{"gitId":"-"},"content":"* *Clear tasks* : `cleartask`"},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +"},{"lineNumber":727,"author":{"gitId":"-"},"content":"e.g. `delete 3`"},{"lineNumber":728,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task INDEX` +"},{"lineNumber":729,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task 4`"},{"lineNumber":730,"author":{"gitId":"-"},"content":"* *Delete tag* : `deletetag INDEX t/[TAG]` +"},{"lineNumber":731,"author":{"gitId":"-"},"content":"e.g. `deletetag 1 2 t/friends`"},{"lineNumber":732,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] c/[GOOGLE CALENDAR URL] [a/ADDRESS] [t/TAG]...` +"},{"lineNumber":733,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`"},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +"},{"lineNumber":735,"author":{"gitId":"-"},"content":"e.g. `edit task 2 p/veryhigh`"},{"lineNumber":736,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edittag TAGTOCHANGE NEWTAGNAME` +"},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"e.g. `edittag friends enemies`"},{"lineNumber":738,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +"},{"lineNumber":739,"author":{"gitId":"-"},"content":"e.g. `favourite 1`"},{"lineNumber":740,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +"},{"lineNumber":741,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`"},{"lineNumber":742,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +"},{"lineNumber":743,"author":{"gitId":"-"},"content":"e.g. `showfavourite`"},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":745,"author":{"gitId":"-"},"content":"e.g. `find James Jake`"},{"lineNumber":746,"author":{"gitId":"-"},"content":"* *Find tag* : `findtag Tag [MORE_TAGS]` +"},{"lineNumber":747,"author":{"gitId":"-"},"content":"e.g. `findtag friends`"},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +"},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"e.g. `find task update p/high`"},{"lineNumber":750,"author":{"gitId":"-"},"content":"* *Help* : `help`"},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"* *List persons* : `list`"},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":"* *List tasks* : `list task`"},{"lineNumber":753,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate`"},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +"},{"lineNumber":755,"author":{"gitId":"-"},"content":"e.g.`select 2`"},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task INDEX` +"},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"e.g.`select task 2`"},{"lineNumber":758,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +"},{"lineNumber":759,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`"},{"lineNumber":760,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +"},{"lineNumber":761,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`"},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +"},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`"},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +"},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`"},{"lineNumber":766,"author":{"gitId":"-"},"content":"* *History* : `history`"},{"lineNumber":767,"author":{"gitId":"-"},"content":"* *Undo* : `undo`"},{"lineNumber":768,"author":{"gitId":"-"},"content":"* *Redo* : `redo`"},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts"},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]"},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[[F1]"},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]"},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]"},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept"},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary."},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]"}],"authorContributionMap":{"charlesgoh":70,"jeffreygohkw":88,"Esilocke":252,"-":373}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 3, 0, true);"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());"},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model, storage);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book."},{"lineNumber":88,"author":{"gitId":"-"},"content":" */"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");"},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null."},{"lineNumber":117,"author":{"gitId":"-"},"content":" */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;"},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());"},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \""},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");"},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;"},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \""},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");"},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":169,"author":{"gitId":"-"},"content":" }"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(userPrefs);"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/"},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;"},{"lineNumber":13,"author":{"gitId":"-"},"content":" }"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user."},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution."},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();"},{"lineNumber":31,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model, Storage storage) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");"},{"lineNumber":49,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" Command command \u003d addressBookParser.parseCommand(commandText);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return result;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } finally {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" history.add(commandText);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":8,"-":63}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Adds a person or task to the address book."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \""},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Parameters: \""},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":34,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"PHONE \""},{"lineNumber":35,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \""},{"lineNumber":36,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"ADDRESS \""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \""},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":39,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \""},{"lineNumber":41,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \""},{"lineNumber":42,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \""},{"lineNumber":43,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \""},{"lineNumber":45,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"friends \""},{"lineNumber":46,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"owesMoney\";"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Adds a task to the address book. \""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"DESCRIPTION \""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"DEADLINE \""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"PRIORITY \""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \";"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_SUCCESS \u003d \"New task added: \\n%1$s\";"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private boolean isTask \u003d false;"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}"},{"lineNumber":71,"author":{"gitId":"-"},"content":" */"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public AddCommand(ReadOnlyPerson person) {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d null;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@Code ReadOnlyTask}"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d null;"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" isTask \u003d true;"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" if (isTask) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_TASK_SUCCESS, taskToAdd));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddCommand)) {"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } else if (taskToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).taskToAdd \u003d\u003d null) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert(personToAdd !\u003d null);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddCommand) other).personToAdd);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else if (personToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).personToAdd \u003d\u003d null) {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assert(taskToAdd !\u003d null);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddCommand) other).taskToAdd);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":60,"wangyiming1019":1,"-":58}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends UndoableCommand {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"addtag\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"atag\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all persons in the current list.\";"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends Command {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.io.IOException;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location."},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" ~/Desktop\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" super();"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(storage);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (args.equals(\"\")) {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBookDefault(model.getAddressBook());"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBook(model.getAddressBook(), args);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" } catch (IOException e) {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD;"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d person.getName();"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d person.getPhone();"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d person.getEmail();"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d person.getAddress();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Remark r \u003d person.getRemark();"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Boolean f \u003d person.getFavourite();"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e t \u003d person.getTags();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" n.setPrivate(pps.getNameIsPrivate());"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" p.setPrivate(pps.getPhoneIsPrivate());"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" e.setPrivate(pps.getEmailIsPrivate());"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" a.setPrivate(pps.getAddressIsPrivate());"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" r.setPrivate(pps.getRemarkIsPrivate());"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(n, p, e, a, f, r, t);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return index;"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person."},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null."},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of nameIsPrivate"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of phoneIsPrivate"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of emailIsPrivate"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of addressIsPrivate"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of remarkIsPrivate"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of remarkIsPrivate"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getRemarkIsPrivate() {"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" return remarkIsPrivate;"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remarkIsPrivate);"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":273}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Clears the address book."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"%s has been cleared!\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_PERSONS \u003d \"Contact list\";"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_TASKS \u003d \"Task list\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_ALL \u003d \"Address book\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private boolean isClearTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private boolean isClearPerson;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private boolean isClearAll;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Prefix type;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String cleared;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public ClearCommand() {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d true;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" type \u003d null;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_ALL;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public ClearCommand(Prefix type) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d true;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_TASK;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_TASKS;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d true;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_PERSON;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_PERSONS;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"An invalid type was provided!\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (isClearAll) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else if (isClearTask) {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } else if (isClearPerson) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assert false : \"At least one boolean must be true.\";"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, cleared));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public abstract class Command {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" protected MainWindow mainWindow;"},{"lineNumber":18,"author":{"gitId":"-"},"content":" protected CommandHistory history;"},{"lineNumber":19,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed"},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks."},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message."},{"lineNumber":43,"author":{"gitId":"-"},"content":" *"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command."},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * access to the dependencies."},{"lineNumber":53,"author":{"gitId":"-"},"content":" */"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a person or task identified using its last displayed index from the address book."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person or task identified by the index number used in the last listing.\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DELETE_TASK_SUCCESS \u003d \"Deleted Task: %1$s\";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_PERSON \u003d 0;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_TASK \u003d 1;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private int type;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public DeleteCommand(Index targetIndex, int objectType) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.type \u003d objectType;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_PERSON) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (targetIndex.getZeroBased() \u003e\u003d tasksList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_TASK) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (type \u003d\u003d DELETE_TYPE_PERSON) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TASK_SUCCESS, taskToDelete));"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex)"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.type \u003d\u003d ((DeleteCommand) other).type); // state check"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":28,"wangyiming1019":1,"-":47}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends UndoableCommand {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"deletetag\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"dtag\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"This is an nonexistent tag in the given persons list.\";"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons."},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list."},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends Command {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toDismiss)) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toDismiss);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Edits the details of an existing person or task in the address book."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \""},{"lineNumber":53,"author":{"gitId":"-"},"content":" + \"by the index number used in the last person listing. \""},{"lineNumber":54,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":55,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \""},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":63,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \""},{"lineNumber":64,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Edits the details of the task identified \""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: \\n%1$s\";"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TASK_SUCCESS \u003d \"Edited Task: \\n%1$s\";"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean areFieldsAllPrivate \u003d true;"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" private final Index index;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @param index of the person in the filtered person list to edit"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the person with"},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" requireNonNull(index);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.index \u003d index;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d null;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public EditCommand(Index index, EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d null;"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //TODO see if we can use Singleton pattern to handle the Descriptors."},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":127,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" }"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" if (isTask) {"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, editedTask));"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":145,"author":{"gitId":"-"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" }"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}."},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedTags);"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().isPrivate()) {"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().isPrivate()) {"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().isPrivate()) {"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().isPrivate()) {"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().isPrivate()) {"},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());"},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {"},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();"},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;"},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson"},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editTaskDescriptor}."},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" assert taskToEdit !\u003d null;"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" TaskName updatedTaskName;"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" Description updatedDescription;"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" Deadline updatedDeadline;"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" Priority updatedPriority;"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" Assignees assignees;"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updatedState;"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" // You cannot edit assignees or state using edit command"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" assignees \u003d taskToEdit.getAssignees();"},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" updatedState \u003d taskToEdit.getCompleteState();"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState);"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":361,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":362,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":363,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":364,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":365,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":366,"author":{"gitId":"-"},"content":" }"},{"lineNumber":367,"author":{"gitId":"-"},"content":""},{"lineNumber":368,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":369,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {"},{"lineNumber":370,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":371,"author":{"gitId":"-"},"content":" }"},{"lineNumber":372,"author":{"gitId":"-"},"content":""},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":" if (this.isTask !\u003d ((EditCommand) other).isTask) {"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":377,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" if (this.isTask) {"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":383,"author":{"gitId":"-"},"content":" }"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":386,"author":{"gitId":"-"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the"},{"lineNumber":387,"author":{"gitId":"-"},"content":" * corresponding field value of the person."},{"lineNumber":388,"author":{"gitId":"-"},"content":" */"},{"lineNumber":389,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {"},{"lineNumber":390,"author":{"gitId":"-"},"content":" private Name name;"},{"lineNumber":391,"author":{"gitId":"-"},"content":" private Phone phone;"},{"lineNumber":392,"author":{"gitId":"-"},"content":" private Email email;"},{"lineNumber":393,"author":{"gitId":"-"},"content":" private Address address;"},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" private Boolean favourite;"},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" private Remark remark;"},{"lineNumber":396,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;"},{"lineNumber":397,"author":{"gitId":"-"},"content":""},{"lineNumber":398,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}"},{"lineNumber":399,"author":{"gitId":"-"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {"},{"lineNumber":401,"author":{"gitId":"-"},"content":" this.name \u003d toCopy.name;"},{"lineNumber":402,"author":{"gitId":"-"},"content":" this.phone \u003d toCopy.phone;"},{"lineNumber":403,"author":{"gitId":"-"},"content":" this.email \u003d toCopy.email;"},{"lineNumber":404,"author":{"gitId":"-"},"content":" this.address \u003d toCopy.address;"},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d toCopy.favourite;"},{"lineNumber":406,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d toCopy.remark;"},{"lineNumber":407,"author":{"gitId":"-"},"content":" this.tags \u003d toCopy.tags;"},{"lineNumber":408,"author":{"gitId":"-"},"content":" }"},{"lineNumber":409,"author":{"gitId":"-"},"content":""},{"lineNumber":410,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":411,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited."},{"lineNumber":412,"author":{"gitId":"-"},"content":" */"},{"lineNumber":413,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":414,"author":{"gitId":"charlesgoh"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark, this.tags);"},{"lineNumber":415,"author":{"gitId":"-"},"content":" }"},{"lineNumber":416,"author":{"gitId":"-"},"content":""},{"lineNumber":417,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":418,"author":{"gitId":"-"},"content":" this.name \u003d name;"},{"lineNumber":419,"author":{"gitId":"-"},"content":" }"},{"lineNumber":420,"author":{"gitId":"-"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {"},{"lineNumber":422,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);"},{"lineNumber":423,"author":{"gitId":"-"},"content":" }"},{"lineNumber":424,"author":{"gitId":"-"},"content":""},{"lineNumber":425,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":426,"author":{"gitId":"-"},"content":" this.phone \u003d phone;"},{"lineNumber":427,"author":{"gitId":"-"},"content":" }"},{"lineNumber":428,"author":{"gitId":"-"},"content":""},{"lineNumber":429,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {"},{"lineNumber":430,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);"},{"lineNumber":431,"author":{"gitId":"-"},"content":" }"},{"lineNumber":432,"author":{"gitId":"-"},"content":""},{"lineNumber":433,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":434,"author":{"gitId":"-"},"content":" this.email \u003d email;"},{"lineNumber":435,"author":{"gitId":"-"},"content":" }"},{"lineNumber":436,"author":{"gitId":"-"},"content":""},{"lineNumber":437,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {"},{"lineNumber":438,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);"},{"lineNumber":439,"author":{"gitId":"-"},"content":" }"},{"lineNumber":440,"author":{"gitId":"-"},"content":""},{"lineNumber":441,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":442,"author":{"gitId":"-"},"content":" this.address \u003d address;"},{"lineNumber":443,"author":{"gitId":"-"},"content":" }"},{"lineNumber":444,"author":{"gitId":"-"},"content":""},{"lineNumber":445,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {"},{"lineNumber":446,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);"},{"lineNumber":447,"author":{"gitId":"-"},"content":" }"},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;"},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {"},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);"},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":457,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":458,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d remark;"},{"lineNumber":459,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":460,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":461,"author":{"gitId":"charlesgoh"},"content":" public Optional\u003cRemark\u003e getRemark() {"},{"lineNumber":462,"author":{"gitId":"charlesgoh"},"content":" return Optional.ofNullable(remark);"},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":465,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":466,"author":{"gitId":"-"},"content":" this.tags \u003d tags;"},{"lineNumber":467,"author":{"gitId":"-"},"content":" }"},{"lineNumber":468,"author":{"gitId":"-"},"content":""},{"lineNumber":469,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {"},{"lineNumber":470,"author":{"gitId":"-"},"content":" return Optional.ofNullable(tags);"},{"lineNumber":471,"author":{"gitId":"-"},"content":" }"},{"lineNumber":472,"author":{"gitId":"-"},"content":""},{"lineNumber":473,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":474,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":475,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":476,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":477,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":478,"author":{"gitId":"-"},"content":" }"},{"lineNumber":479,"author":{"gitId":"-"},"content":""},{"lineNumber":480,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":481,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {"},{"lineNumber":482,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":483,"author":{"gitId":"-"},"content":" }"},{"lineNumber":484,"author":{"gitId":"-"},"content":""},{"lineNumber":485,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":486,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;"},{"lineNumber":487,"author":{"gitId":"-"},"content":""},{"lineNumber":488,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())"},{"lineNumber":489,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())"},{"lineNumber":490,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())"},{"lineNumber":491,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())"},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())"},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())"},{"lineNumber":494,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags());"},{"lineNumber":495,"author":{"gitId":"-"},"content":" }"},{"lineNumber":496,"author":{"gitId":"-"},"content":" }"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task."},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;"},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":" private Description description;"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":" private Priority priority;"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;"},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited."},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority);"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;"},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {"},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);"},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {"},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {"},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);"},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {"},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;"},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())"},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())"},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority());"},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":199,"Esilocke":159,"wangyiming1019":14,"-":193}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"edittag\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"etag\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the specified tag \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(personToFavourite);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Finds and lists all persons or tasks in address book whose name contains any of the argument keywords."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive."},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \""},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Finds all tasks whose names or descriptions \""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d null;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public FindCommand(TaskContainsKeywordPredicate predicate) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d null;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (isTask) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof FindCommand)) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask !\u003d ((FindCommand) other).isTask) {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask) {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return this.taskPredicate.equals(((FindCommand) other).taskPredicate);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return this.personPredicate.equals(((FindCommand) other).personPredicate);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":36,"wangyiming1019":1,"-":30}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive."},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends Command {"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"findtag\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"ftag\";"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose tags contain any of \""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" friends colleagues\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person: %1$s\";"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().isPrivate()) {"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":58}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as complete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as incomplete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\"));"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons by chosen \""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS] and by order [ASC/DESC]. Case insensitive\\n\""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [FIELD] [ORDER]\\n\""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" email desc\";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All persons in address book successfully sorted\";"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private final String field;"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" private final String order;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String field, String order) {"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public String getField() {"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return this.field;"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return this.order;"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":48,"jeffreygohkw":2,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.unfavouritePerson(personToUnfavourite);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object"},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution."},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" PREFIX_REMARK_PRIVATE, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE,"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" PREFIX_EMAIL_PRIVATE, PREFIX_ADDRESS_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_DEADLINE,"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" PREFIX_DESCRIPTION, PREFIX_PRIORITY, PREFIX_TASK);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d constructTask(args);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(taskToAdd);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d constructPerson(args);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(personToAdd);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided."},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" private static ReadOnlyPerson constructPerson(String args) throws ParseException {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PHONE)"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)))) {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_EMAIL)"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)))) {"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_ADDRESS)"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)))) {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_REMARK)"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)))) {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, tagList);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided."},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyTask constructTask(String args) throws ParseException {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY);"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION))) {"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DEADLINE))) {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PRIORITY))) {"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" TaskName name;"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Description description;"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" Priority priority;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" description \u003d ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get();"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" deadline \u003d ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get();"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" priority \u003d ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get();"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d new Task(name, description, deadline, priority);"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return task;"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":83,"Esilocke":69,"-":35}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser implements Parser\u003cAddTagCommand\u003e {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution."},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":70}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses user input."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class AddressBookParser {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Parses user input into command for execution."},{"lineNumber":51,"author":{"gitId":"-"},"content":" *"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @param userInput full user input string"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @return the command based on the user input"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":55,"author":{"gitId":"-"},"content":" */"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public Command parseCommand(String userInput) throws ParseException {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");"},{"lineNumber":64,"author":{"gitId":"-"},"content":" switch (commandWord) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_WORD:"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_ALIAS:"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommandParser().parse(arguments);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:"},{"lineNumber":88,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_WORD:"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_ALIAS:"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(arguments);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" case SelectCommand.COMMAND_ALIAS:"},{"lineNumber":103,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_WORD:"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_ALIAS:"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommandParser().parse(arguments);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:"},{"lineNumber":111,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_WORD:"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_ALIAS:"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommandParser().parse(arguments);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_WORD:"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_ALIAS:"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommandParser().parse(arguments);"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":143,"author":{"gitId":"-"},"content":" return new ListCommand();"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:"},{"lineNumber":147,"author":{"gitId":"-"},"content":" return new HistoryCommand();"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":150,"author":{"gitId":"-"},"content":" return new ExitCommand();"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":153,"author":{"gitId":"-"},"content":" return new HelpCommand();"},{"lineNumber":154,"author":{"gitId":"-"},"content":""},{"lineNumber":155,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:"},{"lineNumber":157,"author":{"gitId":"-"},"content":" return new UndoCommand();"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:"},{"lineNumber":161,"author":{"gitId":"-"},"content":" return new RedoCommand();"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":9,"Esilocke":25,"wangyiming1019":41,"-":91}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String."},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * filepath."},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":18}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditCommand object"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_PERSON);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_TASK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person\");"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task\");"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"pri/\");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"Esilocke":6,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(filteredString.trim());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_PERSON);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":36,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":12,"-":28}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution."},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":67}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String."},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object"},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(args);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return constructTaskDescriptor(args);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return constructPersonDescriptor(args);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Person object. **/"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructPersonDescriptor(String args) throws ParseException {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" Index index;"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor \u003d new EditPersonDescriptor();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" return new EditCommand(index, editPersonDescriptor);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Task object. **/"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructTaskDescriptor(String args) throws ParseException {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor \u003d new EditTaskDescriptor();"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return new EditCommand(index, editTaskDescriptor);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty."},{"lineNumber":116,"author":{"gitId":"-"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * {@code Set\u003cTag\u003e} containing zero tags."},{"lineNumber":118,"author":{"gitId":"-"},"content":" */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assert tags !\u003d null;"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" if (tags.isEmpty()) {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return Optional.empty();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":47,"-":78}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return tagList;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":30,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" trimmedArgs \u003d argsWithNoTaskPrefix.trim();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return new FindCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords)));"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":14,"-":31}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new SelectCommand object"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an SelectCommand object for execution."},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes."},{"lineNumber":26,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type."},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods."},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class ParserUtil {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * trimmed."},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer)."},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":54,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":55,"author":{"gitId":"-"},"content":" */"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Name to be private if true."},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":73,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":74,"author":{"gitId":"-"},"content":" */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" requireNonNull(phone);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Phone to be private if true."},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":92,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":93,"author":{"gitId":"-"},"content":" */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" requireNonNull(address);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Address to be private if true."},{"lineNumber":102,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" * Takes in a (@code boolean isPrivate) which will set the Remark to be private if true."},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" throws IllegalValueException {"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":134,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":135,"author":{"gitId":"-"},"content":" */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" requireNonNull(email);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Email to be private if true."},{"lineNumber":144,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" requireNonNull(email);"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();"},{"lineNumber":149,"author":{"gitId":"-"},"content":" }"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(tags);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" for (String tagName : tags) {"},{"lineNumber":158,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":" return tagSet;"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present."},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present."},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present."},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present."},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":29,"Esilocke":39,"-":104}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 0;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 1;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution."},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 2) {"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"},{"lineNumber":42,"author":{"gitId":"-"},"content":" *"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}"},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":91,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}."},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":118,"author":{"gitId":"-"},"content":" //// person-level operations"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Adds a person to the address book."},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,"},{"lineNumber":123,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}."},{"lineNumber":124,"author":{"gitId":"-"},"content":" *"},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists."},{"lineNumber":126,"author":{"gitId":"-"},"content":" */"},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":131,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":132,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":133,"author":{"gitId":"-"},"content":" persons.add(newPerson);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}."},{"lineNumber":138,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}."},{"lineNumber":139,"author":{"gitId":"-"},"content":" *"},{"lineNumber":140,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":142,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":143,"author":{"gitId":"-"},"content":" *"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)"},{"lineNumber":147,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":148,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);"},{"lineNumber":151,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":153,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":154,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":155,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}."},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);"},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}."},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);"},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":186,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:"},{"lineNumber":188,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":190,"author":{"gitId":"-"},"content":" */"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());"},{"lineNumber":193,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list"},{"lineNumber":196,"author":{"gitId":"-"},"content":" // used for checking person tag references"},{"lineNumber":197,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();"},{"lineNumber":198,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list."},{"lineNumber":201,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();"},{"lineNumber":202,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));"},{"lineNumber":203,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:"},{"lineNumber":208,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":209,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":210,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":211,"author":{"gitId":"-"},"content":" */"},{"lineNumber":212,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":218,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":219,"author":{"gitId":"-"},"content":" */"},{"lineNumber":220,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {"},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {"},{"lineNumber":222,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":223,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":225,"author":{"gitId":"-"},"content":" }"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" //// tag-level operations"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" tags.add(t);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" //// task-level operations"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book."},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists."},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}."},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" //// util methods"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" // TODO: refine later"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList();"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":296,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":297,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":298,"author":{"gitId":"-"},"content":" return tags.asObservableList();"},{"lineNumber":299,"author":{"gitId":"-"},"content":" }"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":302,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":303,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":304,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls"},{"lineNumber":305,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);"},{"lineNumber":308,"author":{"gitId":"-"},"content":" }"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":311,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":312,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);"},{"lineNumber":314,"author":{"gitId":"-"},"content":" }"},{"lineNumber":315,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":11,"Esilocke":106,"wangyiming1019":17,"-":181}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * The API of the Model component."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public interface Model {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */"},{"lineNumber":33,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Deletes the given person. */"},{"lineNumber":36,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /** Adds the given person */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}."},{"lineNumber":61,"author":{"gitId":"-"},"content":" *"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":64,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}."},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}."},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":105,"author":{"gitId":"-"},"content":" */"},{"lineNumber":106,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}."},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by field in ascending (asc) or descending (desc) order"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);"},{"lineNumber":120,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":48,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data."},{"lineNumber":41,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized."},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ModelManager() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":89,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list."},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list."},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":149,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);"},{"lineNumber":153,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();"},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes."},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag."},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" int index;"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);"},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);"},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" updateFilteredPersonList(new NameContainsFavouritePredicate());"},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToAssignTo.getTaskName();"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToAssignTo.getDescription();"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToAssignTo.getDeadline();"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToAssignTo.getPriority();"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToAssignTo.getCompleteState();"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" assignees.assign(personsToAssign);"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToAssignTo, updatedTask);"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToDismissFrom.getTaskName();"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToDismissFrom.getDescription();"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToDismissFrom.getDeadline();"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToDismissFrom.getPriority();"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToDismissFrom.getCompleteState();"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assignees.dismiss(personsToDismiss);"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToDismissFrom, updatedTask);"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":275,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":276,"author":{"gitId":"-"},"content":""},{"lineNumber":277,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":278,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of"},{"lineNumber":279,"author":{"gitId":"-"},"content":" * {@code addressBook}"},{"lineNumber":280,"author":{"gitId":"-"},"content":" */"},{"lineNumber":281,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":282,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":283,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);"},{"lineNumber":284,"author":{"gitId":"-"},"content":" }"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" requireNonNull(predicate);"},{"lineNumber":296,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":297,"author":{"gitId":"-"},"content":" }"},{"lineNumber":298,"author":{"gitId":"-"},"content":""},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":307,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":308,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {"},{"lineNumber":309,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":310,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {"},{"lineNumber":311,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":312,"author":{"gitId":"-"},"content":" }"},{"lineNumber":313,"author":{"gitId":"-"},"content":""},{"lineNumber":314,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":315,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {"},{"lineNumber":316,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":317,"author":{"gitId":"-"},"content":" }"},{"lineNumber":318,"author":{"gitId":"-"},"content":""},{"lineNumber":319,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":320,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;"},{"lineNumber":321,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":145,"wangyiming1019":59,"-":116}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list."},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Validates given address."},{"lineNumber":26,"author":{"gitId":"-"},"content":" *"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public Address(String address) throws IllegalValueException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.value \u003d address;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(address);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":50}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Validates given email."},{"lineNumber":21,"author":{"gitId":"-"},"content":" *"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public Email(String email) throws IllegalValueException {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this(email);"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":62,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls"},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":45}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String fullName;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given name."},{"lineNumber":27,"author":{"gitId":"-"},"content":" *"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Name(String name) throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.fullName \u003d trimmedName;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this(name);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls"},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.fullName.equals(((Name) other).fullName)); // state check"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return fullName.hashCode();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27,"-":55}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/not\")) {"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(4));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Every field must be present and not null."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Boolean favourite, Remark remark, Set\u003cTag\u003e tags) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" source.getRemark(), source.getTags());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public Name getName() {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return name.get();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return phone;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public Phone getPhone() {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.get();"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return email;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Email getEmail() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return email.get();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return address;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public Address getAddress() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return address.get();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return favourite;"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark.get();"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}"},{"lineNumber":138,"author":{"gitId":"-"},"content":" * if modification is attempted."},{"lineNumber":139,"author":{"gitId":"-"},"content":" */"},{"lineNumber":140,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":141,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set."},{"lineNumber":151,"author":{"gitId":"-"},"content":" */"},{"lineNumber":152,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":157,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":158,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":159,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls"},{"lineNumber":160,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags);"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":170,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":171,"author":{"gitId":"-"},"content":" return getAsText();"},{"lineNumber":172,"author":{"gitId":"-"},"content":" }"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":15,"wangyiming1019":23,"-":136}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given phone number."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) throws IllegalValueException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":64,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls"},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":28,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook."},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();"},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();"},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark());"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" default String getAsText() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" builder.append(getName())"},{"lineNumber":50,"author":{"gitId":"-"},"content":" .append(\" Phone: \")"},{"lineNumber":51,"author":{"gitId":"-"},"content":" .append(getPhone())"},{"lineNumber":52,"author":{"gitId":"-"},"content":" .append(\" Email: \")"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .append(getEmail())"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .append(\" Address: \")"},{"lineNumber":55,"author":{"gitId":"-"},"content":" .append(getAddress())"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Tags: \");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return builder.toString();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book."},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid."},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" return;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this(remark);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public String toString() {"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (isPrivate) {"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return \"\u003cPrivate Remark\u003e\";"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" return value;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean isPrivate() {"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return isPrivate;"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":79}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Iterator;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":21,"author":{"gitId":"-"},"content":" *"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" // used by asObservableList()"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the list contains an equivalent person as the given argument."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public boolean contains(ReadOnlyPerson toCheck) {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toCheck);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return internalList.contains(toCheck);"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" * Adds a person to the list."},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list."},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toAdd);"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" if (contains(toAdd)) {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" internalList.add(new Person(toAdd));"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}."},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list."},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(editedPerson);"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" internalList.set(index, new Person(editedPerson));"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Removes the equivalent person from the list."},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toRemove);"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" if (!personFoundAndDeleted) {"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" return personFoundAndDeleted;"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list."},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list."},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":126,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();"},{"lineNumber":127,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));"},{"lineNumber":129,"author":{"gitId":"-"},"content":" }"},{"lineNumber":130,"author":{"gitId":"-"},"content":" setPersons(replacement);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" }"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":135,"author":{"gitId":"-"},"content":" */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().fullName.compareTo(o2.getName().fullName);"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" switch (field) {"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" case \"name\":"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" case \"email\":"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case \"address\":"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" switch (order) {"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" public Iterator\u003cPerson\u003e iterator() {"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return internalList.iterator();"},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls"},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));"},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return internalList.hashCode();"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":171,"wangyiming1019":31,"-":42}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name."},{"lineNumber":20,"author":{"gitId":"-"},"content":" *"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing."},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Assignees {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private HashSet\u003cReadOnlyPerson\u003e assignedList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public Assignees(HashSet\u003cReadOnlyPerson\u003e assignees) {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public Assignees() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new HashSet\u003c\u003e();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void assign(ArrayList\u003cReadOnlyPerson\u003e personsToAssign) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToAssign) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assignedList.add(p);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list */"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public void dismiss(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToDismiss) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (assignedList.contains(p)) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(p);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyPerson toFind) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return assignedList.contains(toFind);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Calendar;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Deadline {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DEADLINE_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task deadlines must be in the format DD-MM-YYYY, with \u0027-\u0027, \u0027.\u0027, \u0027.\u0027 as separators\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" Deadline format: DDSMMSYYYY, in DAY-MONTH-YEAR format."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" S represents the separators, and can be any of these characters: - . /"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_VALIDATION_REGEX \u003d \"\\\\d\\\\d[-./]\\\\d\\\\d[-./]\\\\d\\\\d\\\\d\\\\d.*\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String DEADLINE_PERIOD_DELIMITER \u003d \".\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" Expected indexes for the separator characters"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_1 \u003d 2;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_2 \u003d 5;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_DAY_INDEX \u003d 0;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_MONTH_INDEX \u003d 1;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_YEAR_INDEX \u003d 2;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public final Calendar calendar;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline."},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid."},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } else if (deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String trimmedDeadline \u003d deadline.trim();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (!isValidDeadline(trimmedDeadline)) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DEADLINE_CONSTRAINTS);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDeadline;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d Calendar.getInstance();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" calendar.clear();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" char separator \u003d trimmedDeadline.charAt(DEADLINE_SEPARATOR_INDEX_1);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d trimmedDeadline.split(Character.toString(separator));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.calendar.set(year, month, day);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is in valid deadline format."},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(DEADLINE_VALIDATION_REGEX)) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } else if (test.charAt(DEADLINE_SEPARATOR_INDEX_1) !\u003d test.charAt(DEADLINE_SEPARATOR_INDEX_2)) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return isValidDate(test);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date."},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDate(String test) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" Calendar testCalendar \u003d setCalendar(test);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" testCalendar.setLenient(false);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" testCalendar.getTime();"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Returns a Calendar object that represents the given date string."},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private static Calendar setCalendar(String date) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" Calendar result \u003d Calendar.getInstance();"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" result.clear();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String separator \u003d Character.toString(date.charAt(DEADLINE_SEPARATOR_INDEX_1));"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (separator.equals(DEADLINE_PERIOD_DELIMITER)) {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" separator \u003d \"\\\\.\";"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d date.split(separator);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" result.set(year, month, day);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return result;"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":131}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description."},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Priority {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 1 to 5, inclusive, where 1 represents the lowest priority\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 1;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Validates given priority."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Integer.parseInt(trimmedPriority);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedPriority;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Priority) other).value)); // state check"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":83}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return builder.toString();"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * by default."},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return taskName.get();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return description.get();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return deadline.get();"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return priority.get();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return assignees.get();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return state.get();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return getAsText();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return description;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return deadline;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return priority;"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return assignees;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" String printableState;"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return printableState;"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":164}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c keywords.size(); i++) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String keyword \u003d keywords.get(i);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)); // state check"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskName {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public final String taskName;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Validates given name."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name."},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument."},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list."},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list."},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}."},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list."},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list."},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list."},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return taskFoundAndDeleted;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":124}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task."},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class SampleDataUtil {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" return new Person[] {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"),"},{"lineNumber":28,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),"},{"lineNumber":29,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"),"},{"lineNumber":32,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),"},{"lineNumber":33,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"),"},{"lineNumber":36,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),"},{"lineNumber":37,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"),"},{"lineNumber":40,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),"},{"lineNumber":41,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"),"},{"lineNumber":44,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),"},{"lineNumber":45,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"),"},{"lineNumber":48,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))"},{"lineNumber":49,"author":{"gitId":"-"},"content":" };"},{"lineNumber":50,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return sampleAb;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given."},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (String s : strings) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}."},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found."},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format."},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook cannot be null."},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException if there was any problem writing to the file."},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBook(ReadOnlyAddressBook addressBook, String args) throws IOException;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" void changeFilePath(String fp, UserPrefs u);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" //@author"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":20,"jeffreygohkw":1,"-":31}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * @param filePath"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath() + \"-backup.xml\");"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));"},{"lineNumber":109,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":22,"jeffreygohkw":8,"-":92}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private String name;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private String phone;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String email;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private String address;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private String remark;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson."},{"lineNumber":52,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":53,"author":{"gitId":"-"},"content":" */"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use."},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().fullName;"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().isPrivate();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().isPrivate();"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().isPrivate();"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().isPrivate();"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().isPrivate();"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object."},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, tags);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":66,"wangyiming1019":3,"-":43}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private String name;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private String description;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private String deadline;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private String priority;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private String state;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use."},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" priority \u003d source.getPriority().value;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object."},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, new Assignees(), state);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":61}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format."},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,"},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);"},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location."},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath + \"-backup.xml\");"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook."},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":17,"-":74}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private WebView browser;"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public BrowserPanel() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page."},{"lineNumber":48,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" loadDefaultPage();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().isPrivate()) {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().fullName.replaceAll(\" \", \"+\")"},{"lineNumber":64,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027saddress if their address is not private"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void loadPage(String url) {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a default HTML file with a background that matches the general theme."},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDefaultPage() {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(defaultPage.toExternalForm());"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * Frees resources allocated to the browser."},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" public void freeResources() {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" browser \u003d null;"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" loadPersonPage(event.getNewSelection().person);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":66,"-":48}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed."},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Stage primaryStage;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container"},{"lineNumber":58,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":65,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":71,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":92,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":98,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":101,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":" // Set dependencies"},{"lineNumber":108,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":110,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":111,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" // Configure the UI"},{"lineNumber":114,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());"},{"lineNumber":115,"author":{"gitId":"-"},"content":" setIcon(ICON);"},{"lineNumber":116,"author":{"gitId":"-"},"content":" setWindowMinSize();"},{"lineNumber":117,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());"},{"lineNumber":119,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" setAccelerators();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return primaryStage;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the accelerator of a MenuItem."},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param keyCombination the KeyCombination value of the accelerator"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.setAccelerator(keyCombination);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" /*"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" * TODO: the code below can be removed once the bug reported here"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" * is fixed in later version of SDK."},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * consume function-key events. Because CommandBox contains a TextField, and"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * not work when the focus is in them because the key event is consumed by"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * the TextInputControl(s)."},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * For now, we add following event filter to capture such key events and open"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * help window purposely so to support accelerators even when focus is"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * in CommandBox or ResultDisplay."},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.getOnAction().handle(new ActionEvent());"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" event.consume();"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" });"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself."},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Fills up all the placeholders of this window."},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" void fillInnerParts() {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" browserPanel \u003d new BrowserPanel();"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" CommandBox commandBox \u003d new CommandBox(logic);"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" void hide() {"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.hide();"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" private void setTitle(String appTitle) {"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setTitle(appTitle);"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the given image as the icon of the main window."},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" private void setIcon(String iconSource) {"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default size based on user preferences."},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowMinSize() {"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinWidth(MIN_WIDTH);"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the current size and the position of the main Window."},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" GuiSettings getCurrentGuiSetting() {"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command"},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {"},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" personListPanel.increaseFontSize();"},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.increaseFontSize();"},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command"},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {"},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":" personListPanel.decreaseFontSize();"},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.decreaseFontSize();"},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command"},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {"},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" personListPanel.resetFontSize();"},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.resetFontSize();"},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":294,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Opens the help window."},{"lineNumber":296,"author":{"gitId":"-"},"content":" */"},{"lineNumber":297,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":298,"author":{"gitId":"-"},"content":" public void handleHelp() {"},{"lineNumber":299,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();"},{"lineNumber":300,"author":{"gitId":"-"},"content":" helpWindow.show();"},{"lineNumber":301,"author":{"gitId":"-"},"content":" }"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" void show() {"},{"lineNumber":304,"author":{"gitId":"-"},"content":" primaryStage.show();"},{"lineNumber":305,"author":{"gitId":"-"},"content":" }"},{"lineNumber":306,"author":{"gitId":"-"},"content":""},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog"},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" raise(new OpenRequestEvent());"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" raise(new SaveAsRequestEvent());"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":361,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":362,"author":{"gitId":"-"},"content":" private void handleExit() {"},{"lineNumber":363,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());"},{"lineNumber":364,"author":{"gitId":"-"},"content":" }"},{"lineNumber":365,"author":{"gitId":"-"},"content":""},{"lineNumber":366,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {"},{"lineNumber":367,"author":{"gitId":"-"},"content":" return this.personListPanel;"},{"lineNumber":368,"author":{"gitId":"-"},"content":" }"},{"lineNumber":369,"author":{"gitId":"-"},"content":""},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":374,"author":{"gitId":"-"},"content":" void releaseResources() {"},{"lineNumber":375,"author":{"gitId":"-"},"content":" browserPanel.freeResources();"},{"lineNumber":376,"author":{"gitId":"-"},"content":" }"},{"lineNumber":377,"author":{"gitId":"-"},"content":""},{"lineNumber":378,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":379,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {"},{"lineNumber":380,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":381,"author":{"gitId":"-"},"content":" handleHelp();"},{"lineNumber":382,"author":{"gitId":"-"},"content":" }"},{"lineNumber":383,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":212,"Esilocke":8,"-":121}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later."},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":40,"author":{"gitId":"-"},"content":" *"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultipler;"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":69,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":70,"author":{"gitId":"-"},"content":" initTags(person);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));"},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" });"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" * @param tag"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @return"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * @param person"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" });"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":139,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":140,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":146,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":151,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;"},{"lineNumber":152,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":153,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" return name;"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return phone;"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return address;"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return email;"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":69,"wangyiming1019":37,"-":81}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Panel containing the list of persons."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d 0;"},{"lineNumber":39,"author":{"gitId":"-"},"content":" setConnections(personList);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));"},{"lineNumber":46,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":56,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":" });"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" });"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":103,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}."},{"lineNumber":108,"author":{"gitId":"-"},"content":" */"},{"lineNumber":109,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":112,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {"},{"lineNumber":116,"author":{"gitId":"-"},"content":" setGraphic(null);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" setText(null);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());"},{"lineNumber":120,"author":{"gitId":"-"},"content":" }"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":38,"-":86}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // short circuit if same object"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" return true;"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" // instanceof handles nulls"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" if (!(other instanceof TaskCard)) {"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return false;"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // state check"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" TaskCard card \u003d (TaskCard) other;"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 task.equals(card.task);"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" return taskName;"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return description;"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return deadline;"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return priority;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":63,"Esilocke":75}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks."},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d 0;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map("},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it."},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}."},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" setText(null);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":29,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component"},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */"},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */"},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");"},{"lineNumber":50,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" //Set the application icon."},{"lineNumber":53,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts"},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (Throwable e) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());"},{"lineNumber":69,"author":{"gitId":"-"},"content":" mainWindow.hide();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters."},{"lineNumber":92,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog."},{"lineNumber":93,"author":{"gitId":"-"},"content":" */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,"},{"lineNumber":95,"author":{"gitId":"-"},"content":" String contentText) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");"},{"lineNumber":98,"author":{"gitId":"-"},"content":" alert.initOwner(owner);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" alert.setTitle(title);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.showAndWait();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},"},{"lineNumber":108,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog."},{"lineNumber":109,"author":{"gitId":"-"},"content":" */"},{"lineNumber":110,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));"},{"lineNumber":112,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());"},{"lineNumber":113,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" System.exit(1);"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":122,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,"},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.exception);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":4,"-":120}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" });"},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));"},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data."},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully."},{"lineNumber":97,"author":{"gitId":"-"},"content":" */"},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel."},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}."},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}."},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected."},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card."},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected."},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task."},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list."},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list."},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list."},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call."},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list."},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code AddCommand}."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class AddCommandIntegrationTest {"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,"},{"lineNumber":38,"author":{"gitId":"-"},"content":" String.format(AddCommand.MESSAGE_SUCCESS, validPerson), expectedModel);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Generates a new {@code AddCommand} which upon execution, adds {@code person} into the {@code model}."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" private AddCommand prepareCommand(Person person, Model model) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":53}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddCommandTest {"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d getAddCommandForTask(validTask, modelStub).execute();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddCommand.MESSAGE_TASK_SUCCESS, validTask), commandResult.feedbackToUser);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_TASK);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" getAddCommandForTask(validTask, modelStub).execute();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommand \u003d new AddCommand(paper);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" AddCommand addPencilCommand \u003d new AddCommand(pencil);"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":104,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommandCopy \u003d new AddCommand(paper);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":110,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false"},{"lineNumber":118,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" // add person vs add task -\u003e returns false"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertFalse(addAliceCommand.equals(addPaperCommand));"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person."},{"lineNumber":127,"author":{"gitId":"-"},"content":" */"},{"lineNumber":128,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {"},{"lineNumber":129,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":131,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddCommand with the details of the given person."},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private AddCommand getAddCommandForTask(Task task, Model model) {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AddCommand command \u003d new AddCommand(task);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing."},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":150,"author":{"gitId":"-"},"content":" }"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":158,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }"},{"lineNumber":166,"author":{"gitId":"-"},"content":""},{"lineNumber":167,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":168,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":170,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":184,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":185,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {"},{"lineNumber":186,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":187,"author":{"gitId":"-"},"content":" }"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":196,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":198,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":217,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":219,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":220,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }"},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":264,"author":{"gitId":"-"},"content":" }"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateDataException when trying to add a person or task."},{"lineNumber":268,"author":{"gitId":"-"},"content":" */"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {"},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":271,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":272,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":273,"author":{"gitId":"-"},"content":" }"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":281,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":282,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":283,"author":{"gitId":"-"},"content":" }"},{"lineNumber":284,"author":{"gitId":"-"},"content":" }"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added."},{"lineNumber":288,"author":{"gitId":"-"},"content":" */"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingObjectAdded extends ModelStub {"},{"lineNumber":290,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":292,"author":{"gitId":"-"},"content":""},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));"},{"lineNumber":296,"author":{"gitId":"-"},"content":" }"},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":304,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":305,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":306,"author":{"gitId":"-"},"content":" }"},{"lineNumber":307,"author":{"gitId":"-"},"content":" }"},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":121,"wangyiming1019":24,"-":160}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}."},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_addSuccessful() throws Exception {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_addSuccessful() throws Exception {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_addSuccessful() throws Exception {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets."},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index task) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, task);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":120}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").build();"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"false\").build();"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").build();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":129}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandTest {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":33,"author":{"gitId":"-"},"content":" */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands."},{"lineNumber":35,"author":{"gitId":"-"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_FAVOURITE \u003d \"false\";"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017\";"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017\";"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_AMY;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_BOB;"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_AMY;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_BOB;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_AMY;"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_BOB;"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_AMY;"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_BOB;"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_AMY;"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_BOB;"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"20-20-20000\"; // bad date format"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_AMY;"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_BOB;"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PENCIL;"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PAPER;"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" static {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)"},{"lineNumber":110,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_AMY).withFavourite(VALID_FAVOURITE)"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":114,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_BOB).withFavourite(VALID_FAVOURITE)"},{"lineNumber":116,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":128,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}"},{"lineNumber":129,"author":{"gitId":"-"},"content":" */"},{"lineNumber":130,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,"},{"lineNumber":131,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged"},{"lineNumber":146,"author":{"gitId":"-"},"content":" */"},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {"},{"lineNumber":148,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can"},{"lineNumber":149,"author":{"gitId":"-"},"content":" // only do so by copying its components."},{"lineNumber":150,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());"},{"lineNumber":151,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" command.execute();"},{"lineNumber":155,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":156,"author":{"gitId":"-"},"content":" } catch (CommandException e) {"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());"},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book."},{"lineNumber":165,"author":{"gitId":"-"},"content":" */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" final String[] splitName \u003d person.getName().fullName.split(\"\\\\s+\");"},{"lineNumber":169,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;"},{"lineNumber":172,"author":{"gitId":"-"},"content":" }"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":175,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":176,"author":{"gitId":"-"},"content":" */"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":179,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":180,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);"},{"lineNumber":181,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {"},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);"},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":12,"Esilocke":34,"wangyiming1019":16,"-":128}},{"path":"src/test/java/seedu/address/logic/commands/DeleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeleteCommand}."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class DeleteCommandTest {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":72,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommand \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteSecondCommand \u003d new DeleteCommand(INDEX_SECOND_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommandCopy \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns a {@code DeleteCommand} with the parameter {@code index}."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" private DeleteCommand prepareCommand(Index index, int type) {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(index, type);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" deleteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return deleteCommand;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":112,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one."},{"lineNumber":113,"author":{"gitId":"-"},"content":" */"},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":12,"-":107}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}."},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_addSuccessful() throws Exception {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_addSuccessful() throws Exception {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_addSuccessful() throws Exception {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets."},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index task) {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, task);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":121}},{"path":"src/test/java/seedu/address/logic/commands/EditCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditCommand."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class EditCommandTest {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(indexLastPerson, descriptor);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));"},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book"},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":167,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex, descriptor);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book"},{"lineNumber":185,"author":{"gitId":"-"},"content":" */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex,"},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":201,"author":{"gitId":"-"},"content":" final EditCommand standardCommand \u003d new EditCommand(INDEX_FIRST_PERSON, DESC_AMY);"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);"},{"lineNumber":205,"author":{"gitId":"-"},"content":" EditCommand commandWithSameValues \u003d new EditCommand(INDEX_FIRST_PERSON, copyDescriptor);"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false"},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_SECOND_PERSON, DESC_AMY)));"},{"lineNumber":219,"author":{"gitId":"-"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false"},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_BOB)));"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":225,"author":{"gitId":"-"},"content":" * Returns an {@code EditCommand} with parameters {@code index} and {@code descriptor}"},{"lineNumber":226,"author":{"gitId":"-"},"content":" */"},{"lineNumber":227,"author":{"gitId":"-"},"content":" private EditCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {"},{"lineNumber":228,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d new EditCommand(index, descriptor);"},{"lineNumber":229,"author":{"gitId":"-"},"content":" editCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" return editCommand;"},{"lineNumber":231,"author":{"gitId":"-"},"content":" }"},{"lineNumber":232,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":2,"-":169}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent() throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public AddressBook prepareAddressBook() throws DuplicatePersonException {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":54}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code FindCommand}."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class FindCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d"},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" FindCommand findFirstCommand \u003d new FindCommand(firstPredicate);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" FindCommand findSecondCommand \u003d new FindCommand(secondPredicate);"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":47,"author":{"gitId":"-"},"content":" FindCommand findFirstCommandCopy \u003d new FindCommand(firstPredicate);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\" \");"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Parses {@code userInput} into a {@code FindCommand}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" */"},{"lineNumber":77,"author":{"gitId":"-"},"content":" private FindCommand prepareCommand(String userInput) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" FindCommand command \u003d"},{"lineNumber":79,"author":{"gitId":"-"},"content":" new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":89,"author":{"gitId":"-"},"content":" */"},{"lineNumber":90,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(FindCommand command, String expectedMessage, List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":92,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}."},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}."},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index."},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}."},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}."},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class RedoCommandTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":40,"author":{"gitId":"-"},"content":" Collections.emptyList(), Arrays.asList(deleteCommandTwo, deleteCommandOne));"},{"lineNumber":41,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in redoStack"},{"lineNumber":46,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // single command in redoStack"},{"lineNumber":50,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // no command in redoStack"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":6,"-":50}},{"path":"src/test/java/seedu/address/logic/commands/SelectCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectCommand}."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class SelectCommandTest {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":70,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommand \u003d new SelectCommand(INDEX_FIRST_PERSON);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" SelectCommand selectSecondCommand \u003d new SelectCommand(INDEX_SECOND_PERSON);"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":85,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommandCopy \u003d new SelectCommand(INDEX_FIRST_PERSON);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(1));"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(null));"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * is raised with the correct index."},{"lineNumber":101,"author":{"gitId":"-"},"content":" */"},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d selectCommand.execute();"},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertEquals(String.format(SelectCommand.MESSAGE_SELECT_PERSON_SUCCESS, index.getOneBased()),"},{"lineNumber":108,"author":{"gitId":"-"},"content":" commandResult.feedbackToUser);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" JumpToListRequestEvent lastEvent \u003d (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":119,"author":{"gitId":"-"},"content":" * is thrown with the {@code expectedMessage}."},{"lineNumber":120,"author":{"gitId":"-"},"content":" */"},{"lineNumber":121,"author":{"gitId":"-"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" selectCommand.execute();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":127,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }"},{"lineNumber":131,"author":{"gitId":"-"},"content":" }"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns a {@code SelectCommand} with parameters {@code index}."},{"lineNumber":135,"author":{"gitId":"-"},"content":" */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" private SelectCommand prepareCommand(Index index) {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d new SelectCommand(index);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" selectCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":139,"author":{"gitId":"-"},"content":" return selectCommand;"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":139}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setCompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, setCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}."},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setIncompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, setIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class UndoCommandTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":40,"author":{"gitId":"-"},"content":" Arrays.asList(deleteCommandOne, deleteCommandTwo), Collections.emptyList());"},{"lineNumber":41,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" deleteCommandOne.execute();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteCommandTwo.execute();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" // multiple commands in undoStack"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" // single command in undoStack"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no command in undoStack"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":51}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/parser/AddCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class AddCommandParserTest {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY)"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" // multiple names - last name accepted"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // multiple tags - all accepted"},{"lineNumber":95,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":97,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,"},{"lineNumber":100,"author":{"gitId":"-"},"content":" new AddCommand(expectedPersonMultipleTags));"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" // zero tags"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY, new AddCommand(expectedPerson));"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":143,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE);"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" // missing name prefix"},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB"},{"lineNumber":148,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" // missing phone prefix"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + VALID_PHONE_BOB"},{"lineNumber":152,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" // missing email prefix"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":156,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" // missing address prefix"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":160,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + VALID_ADDRESS_BOB, expectedMessage);"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" // all prefixes missing"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB"},{"lineNumber":164,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }"},{"lineNumber":166,"author":{"gitId":"-"},"content":""},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE);"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" // missing description prefix"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" // missing deadline prefix"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + VALID_DEADLINE_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" // missing priority prefix"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" // invalid phone"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" // invalid email"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" // invalid tag"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" // invalid deadline"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" // invalid priority"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Priority.MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }"},{"lineNumber":236,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":33,"Esilocke":89,"-":114}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command \u003d (AddCommand) parser.parseCommand(TaskUtil.getAddCommand(task));"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddCommand(task), command);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \""},{"lineNumber":92,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person));"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \""},{"lineNumber":97,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(task), command);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD) instanceof ClearCommand);"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS) instanceof ClearCommand);"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {"},{"lineNumber":166,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":167,"author":{"gitId":"-"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {"},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);"},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \""},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":209,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":210,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \""},{"lineNumber":211,"author":{"gitId":"-"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));"},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":222,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {"},{"lineNumber":223,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":224,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":225,"author":{"gitId":"wangyiming1019"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \""},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));"},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \""},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD + \" \""},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS + \" \""},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":255,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":256,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":257,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD) instanceof ExitCommand);"},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\") instanceof ExitCommand);"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":263,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":265,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":266,"author":{"gitId":"-"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);"},{"lineNumber":273,"author":{"gitId":"-"},"content":" }"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":276,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {"},{"lineNumber":277,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":278,"author":{"gitId":"wangyiming1019"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":279,"author":{"gitId":"wangyiming1019"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":280,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \""},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);"},{"lineNumber":286,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":287,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":288,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":289,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {"},{"lineNumber":290,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":291,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":292,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":293,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":294,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":295,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":296,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":297,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {"},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":302,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":303,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":304,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":305,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":306,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":307,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {"},{"lineNumber":308,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD) instanceof HelpCommand);"},{"lineNumber":309,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\") instanceof HelpCommand);"},{"lineNumber":310,"author":{"gitId":"-"},"content":" }"},{"lineNumber":311,"author":{"gitId":"-"},"content":""},{"lineNumber":312,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":313,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {"},{"lineNumber":314,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD) instanceof HistoryCommand);"},{"lineNumber":315,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\") instanceof HistoryCommand);"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":318,"author":{"gitId":"-"},"content":" parser.parseCommand(\"histories\");"},{"lineNumber":319,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":320,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {"},{"lineNumber":321,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":322,"author":{"gitId":"-"},"content":" }"},{"lineNumber":323,"author":{"gitId":"-"},"content":" }"},{"lineNumber":324,"author":{"gitId":"-"},"content":""},{"lineNumber":325,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":326,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {"},{"lineNumber":327,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS) instanceof HistoryCommand);"},{"lineNumber":328,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\") instanceof HistoryCommand);"},{"lineNumber":329,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":330,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":331,"author":{"gitId":"wangyiming1019"},"content":" parser.parseCommand(\"histories\");"},{"lineNumber":332,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":333,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {"},{"lineNumber":334,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":335,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":336,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":337,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":338,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":339,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {"},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD) instanceof ListCommand);"},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\") instanceof ListCommand);"},{"lineNumber":342,"author":{"gitId":"-"},"content":" }"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":345,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {"},{"lineNumber":346,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS) instanceof ListCommand);"},{"lineNumber":347,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\") instanceof ListCommand);"},{"lineNumber":348,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":349,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":350,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":351,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {"},{"lineNumber":352,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":353,"author":{"gitId":"-"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":354,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":355,"author":{"gitId":"-"},"content":" }"},{"lineNumber":356,"author":{"gitId":"-"},"content":""},{"lineNumber":357,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":358,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {"},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":360,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":361,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":362,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":363,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":380,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":381,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWord() throws Exception {"},{"lineNumber":382,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD) instanceof BackupCommand);"},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":386,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWordWithInput() throws Exception {"},{"lineNumber":387,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD + \" test.xml\") instanceof BackupCommand);"},{"lineNumber":388,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":389,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":390,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":391,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAlias() throws Exception {"},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS) instanceof BackupCommand);"},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":396,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAliasWithInput() throws Exception {"},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS + \" test.xml\") instanceof BackupCommand);"},{"lineNumber":398,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {"},{"lineNumber":402,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD) instanceof RedoCommand);"},{"lineNumber":403,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"redo 1\") instanceof RedoCommand);"},{"lineNumber":404,"author":{"gitId":"-"},"content":" }"},{"lineNumber":405,"author":{"gitId":"-"},"content":""},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD"},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":436,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {"},{"lineNumber":438,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD) instanceof UndoCommand);"},{"lineNumber":439,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"undo 3\") instanceof UndoCommand);"},{"lineNumber":440,"author":{"gitId":"-"},"content":" }"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {"},{"lineNumber":444,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":445,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":446,"author":{"gitId":"-"},"content":" parser.parseCommand(\"\");"},{"lineNumber":447,"author":{"gitId":"-"},"content":" }"},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {"},{"lineNumber":451,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":452,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":453,"author":{"gitId":"-"},"content":" parser.parseCommand(\"unknownCommand\");"},{"lineNumber":454,"author":{"gitId":"-"},"content":" }"},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal"},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command"},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command"},{"lineNumber":461,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal"},{"lineNumber":462,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":463,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {"},{"lineNumber":464,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());"},{"lineNumber":465,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":466,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":75,"Esilocke":147,"wangyiming1019":80,"-":148}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * outside of the DeleteCommand code. For example, inputs \"1\" and \"1 abc\" take the"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * same path through the DeleteCommand, and therefore we test only one of them."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class DeleteCommandParserTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\","},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_TASK));"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\","},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\","},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":52,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":23,"-":29}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \","},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate("},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectCommandParserTest}."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectCommandParserTest"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"asc\","},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"desc\","},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"name\","},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"phone\","},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"email\","},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"address\","},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no field or order"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\","},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArguments_success() throws ParseException {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand expectedCommand;"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand actualCommand;"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"asc\");"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name asc\");"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"desc\");"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name desc\");"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"asc\");"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone asc\");"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"desc\");"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone desc\");"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"asc\");"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email asc\");"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"desc\");"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email desc\");"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"asc\");"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address asc\");"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"desc\");"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address desc\");"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":101}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice"},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints."},{"lineNumber":190,"author":{"gitId":"-"},"content":" */"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();"},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":" }"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":106,"Esilocke":18,"-":93}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.isPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":20}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.isPrivate());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":39}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name"},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.isPrivate());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":25}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.isPrivate());"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":24}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"-04-17\")); // missing day"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04--17\")); // missing month"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04\")); // missing year"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"day-04-17\")); // invalid day"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-month-17\")); // invalid month"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-year\")); // invalid year"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"32-04-17\")); // impossible day"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-13-17\")); // impossible month"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04--1\")); // impossible year"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"0-04-17\")); // incomplete day"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-0-17\")); // incomplete month"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-1\")); // incomplete year"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-201\")); // incomplete year"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04/17\")); // inconsistent separators"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-042017\")); // missing separator"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // valid deadlines"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04/04/2017\")); // slashes"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04.04.2017\")); // dots"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":44}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"0\")); // priority out of range"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));"},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class."},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class."},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),"},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called"},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder"},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored."},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method"},{"lineNumber":61,"author":{"gitId":"-"},"content":" */"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back"},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back"},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));"},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path"},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified"},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}."},{"lineNumber":112,"author":{"gitId":"-"},"content":" */"},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));"},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());"},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());"},{"lineNumber":36,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":53,"author":{"gitId":"-"},"content":" */"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }"},{"lineNumber":84,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}"},{"lineNumber":101,"author":{"gitId":"-"},"content":" * that we are building."},{"lineNumber":102,"author":{"gitId":"-"},"content":" */"},{"lineNumber":103,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));"},{"lineNumber":106,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" return descriptor;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":9,"-":101}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return descriptor;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonBuilder {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private Person person;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public PersonBuilder() {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" defaultRemark, defaultTags);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));"},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building."},{"lineNumber":80,"author":{"gitId":"-"},"content":" */"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));"},{"lineNumber":108,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building."},{"lineNumber":116,"author":{"gitId":"-"},"content":" */"},{"lineNumber":117,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));"},{"lineNumber":120,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building."},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" public Person build() {"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return this.person;"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":18,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects."},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().isPrivate());"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().isPrivate());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().isPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().isPrivate());"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":91}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * A utility class for Person."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class PersonUtil {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" return AddCommand.COMMAND_WORD + \" \" + getPersonDetails(person);"},{"lineNumber":23,"author":{"gitId":"-"},"content":" }"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" sb.append(PREFIX_NAME + person.getName().fullName + \" \");"},{"lineNumber":31,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");"},{"lineNumber":35,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach("},{"lineNumber":36,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")"},{"lineNumber":37,"author":{"gitId":"-"},"content":" );"},{"lineNumber":38,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"-":38}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Task task;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}."},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building."},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building."},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building."},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building."},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building."},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public Task build() {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" return this.task;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" return AddCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + task.getPriority().value + \" \");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return sb.toString();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":35}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests."},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class TypicalPersons {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":31,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")"},{"lineNumber":33,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")"},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // Manually added"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_AMY)"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_BOB)"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":71,"author":{"gitId":"-"},"content":" */"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" ab.addPerson(person);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" assert false : \"not possible\";"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return ab;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":15,"wangyiming1019":15,"-":67}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests."},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").build();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\")"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").build();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).build();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").build();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").build();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).build();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\").build();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":76}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" // default web page"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // associated web page of a person"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" postNow(selectionChangedEventStub);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedPersonUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + ALICE.getName().fullName.replaceAll(\" \", \"+\") + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPersonUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":31,"-":34}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultipler());"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier + 1);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags"},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card"},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" });"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock"},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock"},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated"},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());"},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final JumpToListRequestEvent JUMP_TO_SECOND_EVENT \u003d new"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" JumpToListRequestEvent(INDEX_SECOND_PERSON);"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void handleJumpToListRequestEvent() {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"}"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""}],"authorContributionMap":{"charlesgoh":60}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing."},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"-":94}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards."},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),"},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}."},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getPriority().value, actualCard.getPriority());"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":24,"-":72}},{"path":"src/test/java/seedu/address/ui/testutil/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.GuiUnitTest;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // no tags"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public void equals() {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}."},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * -\u003e added"},{"lineNumber":66,"author":{"gitId":"-"},"content":" */"},{"lineNumber":67,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" String command \u003d \" \" + AddCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */"},{"lineNumber":73,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */"},{"lineNumber":89,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in"},{"lineNumber":91,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)"},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */"},{"lineNumber":111,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":120,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */"},{"lineNumber":132,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()"},{"lineNumber":134,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */"},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */"},{"lineNumber":143,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;"},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */"},{"lineNumber":149,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" 1\");"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e rejected */"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e rejected */"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */"},{"lineNumber":173,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":184,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":185,"author":{"gitId":"-"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }"},{"lineNumber":196,"author":{"gitId":"-"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":198,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and verifies that the command box displays"},{"lineNumber":199,"author":{"gitId":"-"},"content":" * an empty string, the result display box displays the success message of executing {@code AddCommand} with the"},{"lineNumber":200,"author":{"gitId":"-"},"content":" * details of {@code toAdd}, and the model related components equal to the current model added with {@code toAdd}."},{"lineNumber":201,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":203,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,"},{"lineNumber":204,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged."},{"lineNumber":205,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":206,"author":{"gitId":"-"},"content":" */"},{"lineNumber":207,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":212,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * instead."},{"lineNumber":214,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)"},{"lineNumber":215,"author":{"gitId":"-"},"content":" */"},{"lineNumber":216,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {"},{"lineNumber":217,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":218,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":219,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);"},{"lineNumber":220,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":221,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result"},{"lineNumber":230,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to"},{"lineNumber":231,"author":{"gitId":"-"},"content":" * {@code expectedModel}."},{"lineNumber":232,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)"},{"lineNumber":233,"author":{"gitId":"-"},"content":" */"},{"lineNumber":234,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":235,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":236,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":245,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":247,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":248,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":249,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":250,"author":{"gitId":"-"},"content":" */"},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":252,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }"},{"lineNumber":260,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":34,"-":226}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void clear() {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared"},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS, TYPE_ALL);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */"},{"lineNumber":41,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":42,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":48,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model."},{"lineNumber":63,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes."},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":74,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)"},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":88,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":89,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":93,"author":{"gitId":"-"},"content":" */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":6,"-":97}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited"},{"lineNumber":64,"author":{"gitId":"-"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson("},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */"},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":93,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":110,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;"},{"lineNumber":111,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":112,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":117,"author":{"gitId":"-"},"content":" */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":121,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * browser url changes"},{"lineNumber":127,"author":{"gitId":"-"},"content":" */"},{"lineNumber":128,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":130,"author":{"gitId":"-"},"content":" selectPerson(index);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":133,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the"},{"lineNumber":134,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,"},{"lineNumber":141,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,"},{"lineNumber":145,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":148,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":150,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":158,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,"},{"lineNumber":162,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,"},{"lineNumber":166,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,"},{"lineNumber":170,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,"},{"lineNumber":174,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */"},{"lineNumber":177,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));"},{"lineNumber":179,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));"},{"lineNumber":181,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that"},{"lineNumber":193,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged."},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list"},{"lineNumber":195,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)"},{"lineNumber":196,"author":{"gitId":"-"},"content":" */"},{"lineNumber":197,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e"},{"lineNumber":203,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e"},{"lineNumber":204,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being"},{"lineNumber":205,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e"},{"lineNumber":206,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list."},{"lineNumber":207,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":208,"author":{"gitId":"-"},"content":" */"},{"lineNumber":209,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,"},{"lineNumber":210,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":211,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":212,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" expectedModel.updatePerson("},{"lineNumber":214,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);"},{"lineNumber":215,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":216,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {"},{"lineNumber":217,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException("},{"lineNumber":218,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,"},{"lineNumber":222,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);"},{"lineNumber":223,"author":{"gitId":"-"},"content":" }"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the"},{"lineNumber":227,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged."},{"lineNumber":228,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":229,"author":{"gitId":"-"},"content":" */"},{"lineNumber":230,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":235,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":236,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":237,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":238,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":239,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at"},{"lineNumber":240,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":247,"author":{"gitId":"-"},"content":" */"},{"lineNumber":248,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":249,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":250,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":251,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":272,"author":{"gitId":"-"},"content":" */"},{"lineNumber":273,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":274,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":275,"author":{"gitId":"-"},"content":""},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":277,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":281,"author":{"gitId":"-"},"content":" }"},{"lineNumber":282,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":13,"-":269}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,"},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" });"},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":70}}] +[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface).","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"* It is a Java application primarily targeted for students doing group projects.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"_Marco Jakob_.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":7,"-":26}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Charles Goh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://charlesgoh.me[homepage]] [https://github.com/charlesgoh[github]]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Jeffrey Goh","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Kelvin Lin","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esiloke[github]]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Wang Yi Ming","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1090[github]]","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"-":26}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started].","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"The `Storage` component,","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go.","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size. The first way is through the UI. The Class Diagram for this","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":"procedure is shown below:","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"The other method of calling changes in font size is through a CLI command. When the relevant command is entered,","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"the Command class calls MainWindow. The rest of the process flow is identical to that of the UI triggered font size","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"command.","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of Task-related commands +","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Create new classes for all new commands +","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Simpler to implement. +","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure.","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Storage of Task objects +","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage.","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons** Any changes to the Person or Task","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" // ... list logic ...","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" // ... undo logic ...","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" executeUndoableCommand();","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" // ... delete logic ...","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct.","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the add, delete, list, select, and edit commands.","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Instead of making a new Logic object for each new command, polymorphism is used to implement the \"Task\" version of each command.","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"An example of using polymorphism to handle Person vs Task addition:","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":"public class AddCommand extends Command {","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Person(person);","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Task(task);","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_TASK;","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"The AddCommand will thus call a different constructor depending on the type of the argument supplied to it. To facilitate this, the respective Parser class must also be modified:","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(toAdd);","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The AddCommandParser checks the args to see if this is a task, then creates the object to be added, and creates a new AddCommand to handle the result. +","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"To support the addition of Task objects, the Storage component is modified to accept Task objects in a similar manner as to how Person objects are being stored.","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"[source, html]","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"Tasks objects are stored in the same level of hierarchy as Person objects, and during startup, are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book.","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Create new classes for all new commands +","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"**Pros:** Simpler to implement. +","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure.","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa.","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage.","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes.","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` method in UniquePersonList. It supports","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field.","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator.","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class.","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for this sort command implementation is shown below:","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort name desc`. The following sequence diagram","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works.","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted. The resulting list","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"charlesgoh"},"content":"is not returned, but will be reflected in the application\u0027s storage and graphical user interface.","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` class. +","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the person lists. Future changes to the implementation will be easier as a consequence. +","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList` will have to rely on the `SortCommand` class.","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for both user and developer and reduced complexity in implementation. +","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system.","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"charlesgoh"},"content":"The backup command makes use of both the model manager and the storage manager. The `LogicManager` class was","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"charlesgoh"},"content":"improved to support the accessing of storage value.","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"charlesgoh"},"content":"The backup command arguments are parsed through the `BackupCommandParser`, which passes control over to the","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class. If there is a file path specified by the user, then the `execute()` command within the","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class will save the backup file to that path. If not file path is specified, the backup file will be","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"charlesgoh"},"content":"saved to a default location.","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup`. The backup file will be saved to a default location:","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDefaultDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup testBackup.xml`. The following sequence diagram","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"charlesgoh"},"content":"demonstrates how this works:","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceCustomDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted.","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement backup command via Command Line Interface +","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Backing up data is easier and faster for users who are familiar with the commands. Less button clicks. +","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":"**Cons:** UI not as intuitive. Users who are not familiar with the application may not know about this feature +","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement backup command via GUI +","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for all users since the options are all graphical +","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hinders productivity. Excessive number of clicks to accomplish an essential task.","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Custom and/or Default file paths for backup file +","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implemented both types of commands +","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"charlesgoh"},"content":"**Pros:** User can choose either command option. Gives the user more choices +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May seem confusing to the user at first +","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement only the default option (save backup file to data directory of application) +","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Faster for the user to key in one word rather than a command with many words +","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Reduces choice for experienced users who may want to save to another location or use a different save name","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email` and `Address` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not.","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes.","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field.","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor.","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`.","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : Sequence Diagram for adding a Person with private fields_","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"jeffreygohkw"},"content":"@Override","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI.","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name.","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`.","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`.","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same.","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was.","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`.","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false.","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object.","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing.","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to.","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users.","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`.","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below.","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"_Figure 3.6.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object.","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`.","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`.","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`.","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`.","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`.","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all.","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"-"},"content":"**Alternative 2:** Enhance the functi-onality of EditCommand. +","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data.","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of `Person`s, a `CommandException` will be thrown.","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution.","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":"This code for this can be found below:","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"@Override","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"-"},"content":"_Figure 3.7.1 : Sequence Diagram for Locating a Person\u0027s Address_","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Create a seperate command `locate`. +","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users.","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`.","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once.","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`addtag 1 2 3 t/friends`) will be executed.","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"-"},"content":"The same operation will happen for `deletetag` command.","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"-"},"content":"in a similar way.","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book.","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"-"},"content":"public class AddTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"-"},"content":" // check whether the index within the range","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"-"},"content":" return new CommandResult();","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"-"},"content":"Suppose the user enter the `addtag 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"-"},"content":"_Figure 3.8.1 : Add Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"-"},"content":"The `deletetag` command works the same as `addtag` command with different name only.","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception.","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `addtag` and `deletetag` +","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list.","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle.","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `addtag` and `deletetag` +","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner.","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book.","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"-"},"content":"The `findtag` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`.","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first.","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar.","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences.","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`.","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String.","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"is for the tags to be excluded.","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"Suppose the user enter `findtag friends` command. The following sequence diagram shows how the find tag command works:","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"_Figure 3.9.1 : Find Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list.","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `findtag` +","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `findtag` +","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `findtag` command will be similar to the `find` command. +","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `findtag` in `FindCommand`. +","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things.","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":"*Logging Levels*","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation.","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":"There are three ways to run tests.","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"We have two types of tests:","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":"|`* * *` |user |add a new person |","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |first-time user |be able to see a user guide when I first start the program |be clear on how to use it","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with many social media accounts |be able to add my contacts\u0027 social media accounts to the address book |improve connectivity and learn more about my contacts","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|`*` |user with many persons in the address book |sort persons by name |locate a person easily","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |non tech-savvy user |have the option to fill out certain fields |use the address book without having to use the intimidating CLI.","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |error-prone user |have minor typos auto corrected |continue using the address book without correcting my mistakes","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"-"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"-"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found.","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found.","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person.","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person.","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid.","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail.","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made.","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone.","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands.","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands.","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3.","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands.","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands.","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message.","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid.","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1.","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed.","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure.","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse.","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0.","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing.","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"-"},"content":"[[mainstream-os]]","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"-"},"content":"Mainstream OS","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data.","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"-"},"content":"\u003d\u003d Product Survey","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"-"},"content":"*Product Name*","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"-"},"content":"Author: ...","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Pros:","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"-"},"content":"Cons:","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true}],"authorContributionMap":{"charlesgoh":130,"jeffreygohkw":140,"Esilocke":169,"-":852}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT`","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"Address++ is an address book application that can store contacts, as well as maintain a list of ongoing tasks. You can use the various commands in Address++ to maintain, create, and delete your contacts, or tasks. +","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"Address++ is targeted at NUS students, such as those working on projects or assignments.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here].","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too large?","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"You can change the font sizes by clicking on the Font Size button and selecting any of the following options:","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"Keyboard shortcuts have been provided for your convenience.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"There is a limit to how much your font sizes can increase or decrease. Also, font sizes will increase for the","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"contacts entries and the todo list\u0027s entries.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"Format: `help` +","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1].","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a person/task: `add`","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book, be it a newly met project member, or your friend who is taking the same module as you. +","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"`add` can be replaced by `a` for faster input. +","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] r/[REMARK] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address` or `Remark` to be private by placing a `p` in front of the prefix. +","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears`","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"* `add n/Betsy Crowe t/friend e/betsycrowe@example.com b/29-02-1996 a/Newgate Prison p/1234567 t/criminal r/Stares at the wall`","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"* `add n/Ima Hidearu b/ a/ e/ p/ r/ t/secretive`","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"* `add n/Luke Groundswimmer p/ a/ e/ c/`","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"* `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate c/`","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"By adding the word `task`, you can use the same command to add a new task or deadline, such as a reminder of project deadlines. +","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"Format: `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"* Task deadlines should be in the format DD-MM-YYYY +","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 1 to 5 inclusive, with 5 being the highest priority +","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"* `add task n/Update documentation d/Update docs for V1.1 for CS2103T t/10-10-2017 p/4`","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"* `add task n/Buy new pencil p/2`","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a tag to persons : `addtag` (Since V1.2)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"You can use the `addtag` command to add tag for multiple persons in the address book. For example, you may wish to add tag `friends` to the first two persons in the address book. +","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"`addtag` can be replaced by `atag` for faster input. +","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"Format: `addtag INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"* You can add the tag of the person at the specific `INDEX`.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, addtag will add the tag to all contacts in the address book.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"`addtag 1 2 t/friends` +","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"Adds the friends tag of the 1st and 2nd person in the address book.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"`addtag t/acquaintance` +","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Adds the acquaintance tag to all contacts in the address book.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all persons : `list`","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts, or tasks, in the address book. +","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"Format: `list` +","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"Instead of typing out `list` every time, you can alternatively use `l` to shorten the command.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing a person : `edit`","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command.","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands.","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command.","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields.","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com` +","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/` +","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"* `edit 1 p/` +","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Removes the phone number of the 1st person.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `edit` will allow you to edit task details instead. You may wish to edit your task deadlines, for example, when your project schedule changes, or your task priorities, when a task becomes more urgent. +","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"Format: `edit task INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/5` +","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"Edits the priority of the 2nd task to be `5`.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/ t/` +","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"Removes the priority and deadline of the second task.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edittag` (Since v1.2)","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"You can use `edittag` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"`edittag` can be replaced by `et` for faster input. +","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"Format: `edittag TAGTOBERENAMED NEWTAGNAME` +","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different.","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `TAGTOBERENAMED` value.","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"* `edittag friends enemies` +","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"Changes the tag called `friends` to one called `enemies` instead. All existing contacts with a `friends` tag will now have an `enemies` tag instead.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS]`","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"Shorthand commands: `cp`","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields.","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI.","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI.","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy.","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"* `changeprivacy 1 p/false e/true` +","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Sets the phone number of the 1st person to be public and their email address to be private. The 1st person\u0027s phone number will be displayed, if available, while their email address will be hidden in the UI.","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":"* `cp 2 a/false n/true e/false` +","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":"Sets the address and email of the 2nd person to be public and their name to be private. The 2nd person\u0027s address and email will be displayed, if available, while their name will be hidden in the UI.","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite persons. For example, you may wish to set your girlfriend as your favourite contact. +","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"`favourite 2` +","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"Favourites the 2nd person in the address book.","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"`favourite 1` +","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"Favourite the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"Format: `showfavourite` +","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"`showfavourite` command: It will return an empty list if there is no favourite persons.","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"* `find John` +","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"Returns `john` and `John Doe`","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"* `find Betsy Tim John` +","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"Returns any person having names `Betsy`, `Tim`, or `John`","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `find` will allow you to sieve through your tasks, instead of your contacts. +","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"In addition to searching the name and description of tasks, you can also opt to filter your tasks by their priority. Simply include `p/PRIORITY` after all your other criteria to do so. +","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"All tasks with a priority higher than or equal to the value provided will be shown. +","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"Format: `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` (Priority search to be coming in v2.0) +","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"*Important note on `find` criteria*","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"* You can only search for names in Address++","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"Returns any task that has the word `update` in their names or descriptions","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* `find task update 4` +","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"Returns all tasks that has the word `update` in their names or descriptions","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `findtag` (Since V1.4)","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"You can use the `findtag` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/not` in front of the `friends`. +","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"`findtag` can be replaced by `ftag` for faster input. +","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"Format: `findtag KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"* `findtag friends` +","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"Returns any persons having tag `friends`","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"* `findtag friends colleagues` +","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"Returns any person having tags `friends` or `colleagues`","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"* `findtag /notfriends` +","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"Returns any persons not have tag `friends`","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"* `findtag classmates /notfriends` +","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"Returns any person have tags `classmates` but not have tag `friends`","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"*Important note on `findtag` criteria","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `friend` will not match `friends`","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"* There is no space `/not` and tag name e.g. `/not friends` will not match `/notfriends`","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts or tasks from the address book. The `delete` command will help you clean up obsolete or completed tasks, or contacts who you may not wish to associate with anymore. +","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"`delete 2` +","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"Deletes the 2nd person in the address book.","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"`delete 1` +","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"Deletes the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"In order to delete tasks, an additional `task` keyword must be specified after the `delete` command. +","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Format: `delete task INDEX`+","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"* Deletes the person or task at the specified `INDEX`.","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"`delete task 2` +","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Deletes the 2nd task in the address book.","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"`delete task 1` +","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"Deletes the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `deletetag` (Since V1.2)","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"You can use `deletetag` to delete the tag of multiple persons from the address book. +","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"`deletetag` can be replaced by `dtag` for faster input. +","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"Format: `deletetag INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`.","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"* If you do not key in any index, deletetag will delete the tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"`deletetag 1 2 t/friends` +","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag of the 1st and 2nd person in the address book.","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"`deletetag t/friends` +","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sorting your contact list : `sort`","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts by any field in ascending or descending order using the `sort` command +","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"`sort` can be replaced by `so` for faster input. +","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":"Format: `sort FIELD ORDER` +","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contact by any field in either ascending or descending order","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"jeffreygohkw"},"content":"* Field parameters are limited to the following fields: NAME, PHONE, EMAIL, ADDRESS.","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC.","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"jeffreygohkw"},"content":"* `sort name asc` +","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in ascending order by the name field.","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"jeffreygohkw"},"content":"* `sort address desc` +","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in descending order by the address field.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Backing up your data : `backup`","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"`backup` can be replaced by `bk` for faster input. +","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [RELATIVE LOCATION]` +","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"charlesgoh"},"content":"* Allows you to backup your saved data on Address++ in another file.","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"charlesgoh"},"content":"* You can backup your data in the default location or you can specify your desired save location.","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"charlesgoh"},"content":"* You can use the default save name or use your own.","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"charlesgoh"},"content":"* `backup` or `bk` +","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"charlesgoh"},"content":"This command will help you back up in the default save location --\u003e In the data directory of your application.","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":"* `backup ./test.xml` or `bk ./test.xml` +","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"charlesgoh"},"content":"This saves the backup file in the current data directory, with the name `test.xml`.","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact or task, and look at it in greater detail, such as examining a task with a very long description, or checking out the full address of one of your friends. +","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"Format (person): `select INDEX` +","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"`select 2` +","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":"Selects the 2nd person in the address book.","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":"`select 1` +","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":"Selects the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"To select a task, a `task` keyword must additionally be specified after `select` +","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Format: `select task INDEX` +","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Selecting a task will load a list of the people who are assigned to it, instead of the Google search page.","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"`select task 2` +","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Selects the 2nd task in the address book.","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"`select task 1` +","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"Selects the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"jeffreygohkw"},"content":"* `list` +","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"jeffreygohkw"},"content":"`locate 2` +","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 2nd person in the address book on Google Maps.","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"jeffreygohkw"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"jeffreygohkw"},"content":"`locate 1` +","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 1st person in the results of the `find` command on Google Maps.","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide a specific and valid address.","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps.","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Mark task as complete : `setcomplete` (To be coming in V2.0)","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed.","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"`setcomplete 2` +","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as completed.","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"`setcomplete 1` +","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as completed.","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Mark task as incomplete : `setincomplete` (To be coming in V2.0)","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete.","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"`setincomplete 2` +","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as incomplete.","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"`setincomplete 1` +","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as incomplete.","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign contacts to task : `assign` (Since V1.4)","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"`list task` +","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"`assign 1 4 5 to/2` +","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"Assigns the 1st, 4th and 5th contacts to 2nd task in the address book.","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"`find task update` +","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"`assign 2 to/1` +","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Assigns the 2nd person in the address book to the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismiss contacts from task : `dismiss` (Since V1.4)","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"`list task` +","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"`dismiss 1 4 5 from/2` +","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"Dismisses 1st, 4th and 5th contacts in the address book from the 2nd task.","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"`find task update` +","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"`dismiss 2 from/1` +","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"Dismisses the 2nd person in the address book from the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"Format: `history` +","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"Format: `undo` +","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"-"},"content":"Undoable commands: those commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`).","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"-"},"content":"`list` +","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":"* `select 1` +","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":"`list` +","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":"`undo` +","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"-"},"content":"The `undo` command fails as there are no undoable commands executed previously.","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":"`clear` +","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"`unfavourite 2` +","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"Unfavourites the 2nd person in the address book.","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"`unfavourite 1` +","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"Unfavourite the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` wasn\u0027t necessary. `redo` reverses the most recent `undo` command. +","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"Format: `redo` +","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"`redo` +","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"The `redo` command fails as there are no `undo` commands executed previously.","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"-"},"content":"`clear` +","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"-"},"content":"`redo` (reapplies the `clear` command) +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"Format: `clear` +","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"Format: `exit`","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4].","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually.","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window.","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window.","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Using the browser","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"If you click on a box containing a contact, an internet browser on the right side of the window.","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"* Performing a left click will allow you to perform a search on Google for the name of the contact, and is equivalent to doing a `select` on that oerson.","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":"* If a person\u0027s name or address is set to private, the browser will not perform a search if you click on their box.","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"* Right clicking on the browser will allow you to go to the previous or next page, as well as reload the page.","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Exporting the data","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Address book data can be exported in a number of different formats, thus allowing the data to be compatible to any device.","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"-"},"content":"To export data, click on `File -\u003e Export As...` or use the keyboard shortcut kbd:[CTRL]+kbd:[E]` and select the new location and file name for the export file in the pop-up window.","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Auto-Complete: Learning Your Typing Habits","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"The program will learn your typing habits and give autocomplete suggestions that become more accurate over time.","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location.","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665, b/29-02-1996 f/SOC c/www.enteryourcalendarurlhere.com t/friend t/colleague`","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"jeffreygohkw"},"content":"* *Add with private fields* : `add or a pn/NAME pp/PHONE_NUMBER pe/EMAIL pa/ADDRESS b/BIRTHDAY f/FACULTY c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665`","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"e.g. `add task n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high`","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"* *Add tag* : `addtag INDEX t/[TAG]` +","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"e.g. `addtag 1 2 t/friends`","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE]` +","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false`","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"* *Clear person* : `clear`","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"* *Clear tasks* : `cleartask`","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"e.g. `delete 3`","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task INDEX` +","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task 4`","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"* *Delete tag* : `deletetag INDEX t/[TAG]` +","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"e.g. `deletetag 1 2 t/friends`","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] c/[GOOGLE CALENDAR URL] [a/ADDRESS] [t/TAG]...` +","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"e.g. `edit task 2 p/veryhigh`","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edittag TAGTOCHANGE NEWTAGNAME` +","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"e.g. `edittag friends enemies`","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"e.g. `favourite 1`","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"e.g. `showfavourite`","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"e.g. `find James Jake`","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"* *Find tag* : `findtag Tag [MORE_TAGS]` +","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"e.g. `findtag friends`","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"e.g. `find task update p/high`","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"* *Help* : `help`","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"* *List persons* : `list`","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":"* *List tasks* : `list task`","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate`","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":"e.g.`select 2`","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task INDEX` +","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"e.g.`select task 2`","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":"* *History* : `history`","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":"* *Undo* : `undo`","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":"* *Redo* : `redo`","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[[F1]","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary.","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":70,"jeffreygohkw":88,"Esilocke":252,"-":373}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 3, 0, true);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model, storage);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model, Storage storage) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" Command command \u003d addressBookParser.parseCommand(commandText);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return result;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } finally {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" history.add(commandText);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":8,"-":63}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Adds a person or task to the address book.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"PHONE \"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"ADDRESS \"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"friends \"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"owesMoney\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Adds a task to the address book. \"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"DESCRIPTION \"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"DEADLINE \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"PRIORITY \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_SUCCESS \u003d \"New task added: \\n%1$s\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private boolean isTask \u003d false;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public AddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d null;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@Code ReadOnlyTask}","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d null;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" isTask \u003d true;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_TASK_SUCCESS, taskToAdd));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddCommand)) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } else if (taskToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).taskToAdd \u003d\u003d null) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert(personToAdd !\u003d null);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddCommand) other).personToAdd);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else if (personToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).personToAdd \u003d\u003d null) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assert(taskToAdd !\u003d null);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddCommand) other).taskToAdd);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":60,"wangyiming1019":1,"-":58}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"addtag\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"atag\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all persons in the current list.\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends Command {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" ~/Desktop\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" super();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(storage);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (args.equals(\"\")) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBookDefault(model.getAddressBook());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBook(model.getAddressBook(), args);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d person.getName();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d person.getPhone();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d person.getEmail();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d person.getAddress();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Remark r \u003d person.getRemark();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Boolean f \u003d person.getFavourite();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e t \u003d person.getTags();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" n.setPrivate(pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" p.setPrivate(pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" e.setPrivate(pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" a.setPrivate(pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" r.setPrivate(pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(n, p, e, a, f, r, t);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return index;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of nameIsPrivate","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of phoneIsPrivate","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of emailIsPrivate","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of addressIsPrivate","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of remarkIsPrivate","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of remarkIsPrivate","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getRemarkIsPrivate() {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" return remarkIsPrivate;","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remarkIsPrivate);","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":273}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Clears the address book.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"%s has been cleared!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_PERSONS \u003d \"Contact list\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_TASKS \u003d \"Task list\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_ALL \u003d \"Address book\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private boolean isClearTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private boolean isClearPerson;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private boolean isClearAll;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Prefix type;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String cleared;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public ClearCommand() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d true;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" type \u003d null;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_ALL;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public ClearCommand(Prefix type) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d true;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_TASK;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_TASKS;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d true;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_PERSON;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_PERSONS;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"An invalid type was provided!\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (isClearAll) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else if (isClearTask) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } else if (isClearPerson) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assert false : \"At least one boolean must be true.\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, cleared));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public abstract class Command {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" protected MainWindow mainWindow;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" protected CommandHistory history;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * access to the dependencies.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a person or task identified using its last displayed index from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person or task identified by the index number used in the last listing.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DELETE_TASK_SUCCESS \u003d \"Deleted Task: %1$s\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_PERSON \u003d 0;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_TASK \u003d 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private int type;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public DeleteCommand(Index targetIndex, int objectType) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.type \u003d objectType;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (targetIndex.getZeroBased() \u003e\u003d tasksList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_TASK) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (type \u003d\u003d DELETE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TASK_SUCCESS, taskToDelete));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex)","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.type \u003d\u003d ((DeleteCommand) other).type); // state check","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28,"wangyiming1019":1,"-":47}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"deletetag\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"dtag\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"This is an nonexistent tag in the given persons list.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends Command {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toDismiss)) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toDismiss);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Edits the details of an existing person or task in the address book.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" + \"by the index number used in the last person listing. \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Edits the details of the task identified \"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: \\n%1$s\";","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TASK_SUCCESS \u003d \"Edited Task: \\n%1$s\";","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @param index of the person in the filtered person list to edit","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the person with","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d null;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public EditCommand(Index index, EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d null;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //TODO see if we can use Singleton pattern to handle the Descriptors.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, editedTask));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedTags);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().isPrivate()) {","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().isPrivate()) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editTaskDescriptor}.","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" assert taskToEdit !\u003d null;","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" TaskName updatedTaskName;","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" Description updatedDescription;","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" Deadline updatedDeadline;","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" Priority updatedPriority;","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" Assignees assignees;","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updatedState;","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" // You cannot edit assignees or state using edit command","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" assignees \u003d taskToEdit.getAssignees();","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" updatedState \u003d taskToEdit.getCompleteState();","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState);","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":" if (this.isTask !\u003d ((EditCommand) other).isTask) {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" if (this.isTask) {","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":" * corresponding field value of the person.","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" private Name name;","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":" private Phone phone;","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":" private Email email;","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" private Address address;","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" private Boolean favourite;","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" private Remark remark;","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":" this.name \u003d toCopy.name;","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" this.phone \u003d toCopy.phone;","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" this.email \u003d toCopy.email;","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" this.address \u003d toCopy.address;","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d toCopy.favourite;","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d toCopy.remark;","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" this.tags \u003d toCopy.tags;","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"charlesgoh"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark, this.tags);","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"charlesgoh"},"content":" public Optional\u003cRemark\u003e getRemark() {","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"charlesgoh"},"content":" return Optional.ofNullable(remark);","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"-"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"-"},"content":" return Optional.ofNullable(tags);","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags());","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task.","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":" private Description description;","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":" private Priority priority;","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority);","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority());","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":199,"Esilocke":159,"wangyiming1019":14,"-":193}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"edittag\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"etag\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the specified tag \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(personToFavourite);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Finds and lists all persons or tasks in address book whose name contains any of the argument keywords.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Finds all tasks whose names or descriptions \"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d null;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public FindCommand(TaskContainsKeywordPredicate predicate) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d null;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof FindCommand)) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask !\u003d ((FindCommand) other).isTask) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return this.taskPredicate.equals(((FindCommand) other).taskPredicate);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return this.personPredicate.equals(((FindCommand) other).personPredicate);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36,"wangyiming1019":1,"-":30}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends Command {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"findtag\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"ftag\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose tags contain any of \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" friends colleagues\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person: %1$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":58}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as complete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as incomplete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons by chosen \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS] and by order [ASC/DESC]. Case insensitive\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [FIELD] [ORDER]\\n\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" email desc\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All persons in address book successfully sorted\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private final String field;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" private final String order;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String field, String order) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public String getField() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return this.field;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return this.order;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":48,"jeffreygohkw":2,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.unfavouritePerson(personToUnfavourite);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" PREFIX_REMARK_PRIVATE, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE,","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" PREFIX_EMAIL_PRIVATE, PREFIX_ADDRESS_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_DEADLINE,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" PREFIX_DESCRIPTION, PREFIX_PRIORITY, PREFIX_TASK);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d constructTask(args);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(taskToAdd);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d constructPerson(args);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(personToAdd);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" private static ReadOnlyPerson constructPerson(String args) throws ParseException {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PHONE)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)))) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_EMAIL)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)))) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_ADDRESS)","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)))) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_REMARK)","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)))) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, tagList);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyTask constructTask(String args) throws ParseException {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION))) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DEADLINE))) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PRIORITY))) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" TaskName name;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Description description;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" Priority priority;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" description \u003d ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get();","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" deadline \u003d ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get();","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" priority \u003d ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d new Task(name, description, deadline, priority);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return task;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":83,"Esilocke":69,"-":35}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser implements Parser\u003cAddTagCommand\u003e {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":70}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses user input.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class AddressBookParser {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @param userInput full user input string","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @return the command based on the user input","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public Command parseCommand(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" case SelectCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" return new HistoryCommand();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" return new UndoCommand();","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" return new RedoCommand();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":9,"Esilocke":25,"wangyiming1019":41,"-":91}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * filepath.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_PERSON);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_TASK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person\");","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"pri/\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"Esilocke":6,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(filteredString.trim());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":12,"-":28}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":67}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return constructTaskDescriptor(args);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return constructPersonDescriptor(args);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Person object. **/","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructPersonDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" Index index;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return new EditCommand(index, editPersonDescriptor);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Task object. **/","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructTaskDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return new EditCommand(index, editTaskDescriptor);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * {@code Set\u003cTag\u003e} containing zero tags.","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assert tags !\u003d null;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" if (tags.isEmpty()) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":47,"-":78}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return tagList;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" trimmedArgs \u003d argsWithNoTaskPrefix.trim();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return new FindCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords)));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":14,"-":31}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new SelectCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an SelectCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class ParserUtil {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * trimmed.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer).","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Name to be private if true.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Phone to be private if true.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Address to be private if true.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" * Takes in a (@code boolean isPrivate) which will set the Remark to be private if true.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Email to be private if true.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(tags);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" for (String tagName : tags) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" return tagSet;","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present.","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present.","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":29,"Esilocke":39,"-":104}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 0;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 1;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 2) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" //// person-level operations","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" persons.add(newPerson);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" // used for checking person tag references","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" //// tag-level operations","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" tags.add(t);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" //// task-level operations","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists.","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}.","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" //// util methods","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" // TODO: refine later","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList();","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" return tags.asObservableList();","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":11,"Esilocke":106,"wangyiming1019":17,"-":181}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * The API of the Model component.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public interface Model {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /** Adds the given person */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by field in ascending (asc) or descending (desc) order","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":48,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ModelManager() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" int index;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" updateFilteredPersonList(new NameContainsFavouritePredicate());","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToAssignTo.getTaskName();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToAssignTo.getDescription();","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToAssignTo.getDeadline();","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToAssignTo.getPriority();","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToAssignTo.getCompleteState();","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" assignees.assign(personsToAssign);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToAssignTo, updatedTask);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToDismissFrom.getTaskName();","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToDismissFrom.getDescription();","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToDismissFrom.getDeadline();","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToDismissFrom.getPriority();","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToDismissFrom.getCompleteState();","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assignees.dismiss(personsToDismiss);","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToDismissFrom, updatedTask);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" * {@code addressBook}","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":145,"wangyiming1019":59,"-":116}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public Address(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(address);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":50}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Validates given email.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public Email(String email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this(email);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":45}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String fullName;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Name(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.fullName \u003d trimmedName;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this(name);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.fullName.equals(((Name) other).fullName)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return fullName.hashCode();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27,"-":55}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/not\")) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(4));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Every field must be present and not null.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Boolean favourite, Remark remark, Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" source.getRemark(), source.getTags());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public Name getName() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return name.get();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return phone;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public Phone getPhone() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.get();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return email;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Email getEmail() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return email.get();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return address;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public Address getAddress() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return address.get();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return favourite;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark.get();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * if modification is attempted.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":15,"wangyiming1019":23,"-":136}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given phone number.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":28,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" builder.append(getName())","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" .append(\" Phone: \")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" .append(getPhone())","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" .append(\" Email: \")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .append(getEmail())","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .append(\" Address: \")","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" .append(getAddress())","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Tags: \");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" return;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this(remark);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return \"\u003cPrivate Remark\u003e\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" return value;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":79}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the list contains an equivalent person as the given argument.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public boolean contains(ReadOnlyPerson toCheck) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" * Adds a person to the list.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" internalList.add(new Person(toAdd));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" internalList.set(index, new Person(editedPerson));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Removes the equivalent person from the list.","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" if (!personFoundAndDeleted) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" return personFoundAndDeleted;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list.","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" setPersons(replacement);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().fullName.compareTo(o2.getName().fullName);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" public Iterator\u003cPerson\u003e iterator() {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":171,"wangyiming1019":31,"-":42}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Assignees {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private HashSet\u003cReadOnlyPerson\u003e assignedList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public Assignees(HashSet\u003cReadOnlyPerson\u003e assignees) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public Assignees() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void assign(ArrayList\u003cReadOnlyPerson\u003e personsToAssign) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToAssign) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assignedList.add(p);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public void dismiss(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToDismiss) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (assignedList.contains(p)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(p);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyPerson toFind) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return assignedList.contains(toFind);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Calendar;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Deadline {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DEADLINE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task deadlines must be in the format DD-MM-YYYY, with \u0027-\u0027, \u0027.\u0027, \u0027.\u0027 as separators\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" Deadline format: DDSMMSYYYY, in DAY-MONTH-YEAR format.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" S represents the separators, and can be any of these characters: - . /","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_VALIDATION_REGEX \u003d \"\\\\d\\\\d[-./]\\\\d\\\\d[-./]\\\\d\\\\d\\\\d\\\\d.*\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String DEADLINE_PERIOD_DELIMITER \u003d \".\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" Expected indexes for the separator characters","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_1 \u003d 2;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_2 \u003d 5;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_DAY_INDEX \u003d 0;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_MONTH_INDEX \u003d 1;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_YEAR_INDEX \u003d 2;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public final Calendar calendar;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } else if (deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String trimmedDeadline \u003d deadline.trim();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (!isValidDeadline(trimmedDeadline)) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DEADLINE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDeadline;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d Calendar.getInstance();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" calendar.clear();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" char separator \u003d trimmedDeadline.charAt(DEADLINE_SEPARATOR_INDEX_1);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d trimmedDeadline.split(Character.toString(separator));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.calendar.set(year, month, day);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is in valid deadline format.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(DEADLINE_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } else if (test.charAt(DEADLINE_SEPARATOR_INDEX_1) !\u003d test.charAt(DEADLINE_SEPARATOR_INDEX_2)) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return isValidDate(test);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDate(String test) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" Calendar testCalendar \u003d setCalendar(test);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" testCalendar.setLenient(false);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" testCalendar.getTime();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Returns a Calendar object that represents the given date string.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private static Calendar setCalendar(String date) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" Calendar result \u003d Calendar.getInstance();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" result.clear();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String separator \u003d Character.toString(date.charAt(DEADLINE_SEPARATOR_INDEX_1));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (separator.equals(DEADLINE_PERIOD_DELIMITER)) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" separator \u003d \"\\\\.\";","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d date.split(separator);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" result.set(year, month, day);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return result;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":131}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Priority {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 1 to 5, inclusive, where 1 represents the lowest priority\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 1;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Validates given priority.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Integer.parseInt(trimmedPriority);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedPriority;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Priority) other).value)); // state check","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":83}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * by default.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return taskName.get();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return description.get();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return deadline.get();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return priority.get();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return assignees.get();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return state.get();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return description;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return deadline;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return priority;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return assignees;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" String printableState;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return printableState;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":164}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c keywords.size(); i++) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String keyword \u003d keywords.get(i);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)); // state check","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskName {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public final String taskName;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list.","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return taskFoundAndDeleted;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":124}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task.","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" return new Person[] {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"),","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"),","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"),","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"),","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"),","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"),","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return sampleAb;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (String s : strings) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook cannot be null.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException if there was any problem writing to the file.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBook(ReadOnlyAddressBook addressBook, String args) throws IOException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" void changeFilePath(String fp, UserPrefs u);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" //@author","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":20,"jeffreygohkw":1,"-":31}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath() + \"-backup.xml\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"jeffreygohkw":8,"-":92}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private String name;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private String phone;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String email;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private String address;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private String remark;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().fullName;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().isPrivate();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().isPrivate();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().isPrivate();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().isPrivate();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().isPrivate();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, tags);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":66,"wangyiming1019":3,"-":43}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private String name;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private String description;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private String deadline;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private String priority;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private String state;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" priority \u003d source.getPriority().value;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, new Assignees(), state);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":61}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath + \"-backup.xml\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":17,"-":74}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private WebView browser;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public BrowserPanel() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" loadDefaultPage();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().fullName.replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027saddress if their address is not private","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void loadPage(String url) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a default HTML file with a background that matches the general theme.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDefaultPage() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(defaultPage.toExternalForm());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * Frees resources allocated to the browser.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" public void freeResources() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" browser \u003d null;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" loadPersonPage(event.getNewSelection().person);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":66,"-":48}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Stage primaryStage;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" // Set dependencies","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" // Configure the UI","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" setIcon(ICON);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" setWindowMinSize();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" setAccelerators();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return primaryStage;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the accelerator of a MenuItem.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param keyCombination the KeyCombination value of the accelerator","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.setAccelerator(keyCombination);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" /*","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" * TODO: the code below can be removed once the bug reported here","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" * is fixed in later version of SDK.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * not work when the focus is in them because the key event is consumed by","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * the TextInputControl(s).","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * For now, we add following event filter to capture such key events and open","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * help window purposely so to support accelerators even when focus is","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * in CommandBox or ResultDisplay.","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.getOnAction().handle(new ActionEvent());","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" event.consume();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" });","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Fills up all the placeholders of this window.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" void fillInnerParts() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" browserPanel \u003d new BrowserPanel();","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" void hide() {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.hide();","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" private void setTitle(String appTitle) {","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setTitle(appTitle);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the given image as the icon of the main window.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" private void setIcon(String iconSource) {","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default size based on user preferences.","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowMinSize() {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinWidth(MIN_WIDTH);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the current size and the position of the main Window.","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" GuiSettings getCurrentGuiSetting() {","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" personListPanel.increaseFontSize();","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.increaseFontSize();","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":" personListPanel.decreaseFontSize();","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.decreaseFontSize();","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" personListPanel.resetFontSize();","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.resetFontSize();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Opens the help window.","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" public void handleHelp() {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" helpWindow.show();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" void show() {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" primaryStage.show();","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" raise(new OpenRequestEvent());","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" raise(new SaveAsRequestEvent());","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" private void handleExit() {","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":" return this.personListPanel;","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":" void releaseResources() {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" browserPanel.freeResources();","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":" handleHelp();","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":212,"Esilocke":8,"-":121}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" * @param tag","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @return","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * @param person","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" });","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" return name;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return phone;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return address;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return email;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":69,"wangyiming1019":37,"-":81}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Panel containing the list of persons.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d 0;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}.","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" setText(null);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":38,"-":86}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" return true;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" if (!(other instanceof TaskCard)) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return false;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // state check","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" TaskCard card \u003d (TaskCard) other;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 task.equals(card.task);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" return taskName;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return description;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return deadline;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return priority;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":63,"Esilocke":75}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d 0;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map(","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" setText(null);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":29,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" //Set the application icon.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" mainWindow.hide();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" String contentText) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" alert.setTitle(title);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.showAndWait();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" System.exit(1);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.exception);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":4,"-":120}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code AddCommand}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class AddCommandIntegrationTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" String.format(AddCommand.MESSAGE_SUCCESS, validPerson), expectedModel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Generates a new {@code AddCommand} which upon execution, adds {@code person} into the {@code model}.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private AddCommand prepareCommand(Person person, Model model) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":53}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddCommandTest {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d getAddCommandForTask(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddCommand.MESSAGE_TASK_SUCCESS, validTask), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" getAddCommandForTask(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommand \u003d new AddCommand(paper);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" AddCommand addPencilCommand \u003d new AddCommand(pencil);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommandCopy \u003d new AddCommand(paper);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" // add person vs add task -\u003e returns false","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertFalse(addAliceCommand.equals(addPaperCommand));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person.","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddCommand with the details of the given person.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private AddCommand getAddCommandForTask(Task task, Model model) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AddCommand command \u003d new AddCommand(task);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateDataException when trying to add a person or task.","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added.","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingObjectAdded extends ModelStub {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":121,"wangyiming1019":24,"-":160}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index task) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, task);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":120}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"false\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":129}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_FAVOURITE \u003d \"false\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"20-20-20000\"; // bad date format","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_AMY;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_BOB;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PENCIL;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PAPER;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" static {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_AMY).withFavourite(VALID_FAVOURITE)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_BOB).withFavourite(VALID_FAVOURITE)","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" // only do so by copying its components.","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" command.execute();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" } catch (CommandException e) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" final String[] splitName \u003d person.getName().fullName.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":12,"Esilocke":34,"wangyiming1019":16,"-":128}},{"path":"src/test/java/seedu/address/logic/commands/DeleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeleteCommand}.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class DeleteCommandTest {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommand \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteSecondCommand \u003d new DeleteCommand(INDEX_SECOND_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommandCopy \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns a {@code DeleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" private DeleteCommand prepareCommand(Index index, int type) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(index, type);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" deleteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return deleteCommand;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":12,"-":107}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index task) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, task);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":121}},{"path":"src/test/java/seedu/address/logic/commands/EditCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditCommand.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class EditCommandTest {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(indexLastPerson, descriptor);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex,","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" final EditCommand standardCommand \u003d new EditCommand(INDEX_FIRST_PERSON, DESC_AMY);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" EditCommand commandWithSameValues \u003d new EditCommand(INDEX_FIRST_PERSON, copyDescriptor);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_SECOND_PERSON, DESC_AMY)));","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_BOB)));","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" * Returns an {@code EditCommand} with parameters {@code index} and {@code descriptor}","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" private EditCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d new EditCommand(index, descriptor);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" editCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" return editCommand;","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":2,"-":169}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent() throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public AddressBook prepareAddressBook() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":54}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code FindCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class FindCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" FindCommand findFirstCommand \u003d new FindCommand(firstPredicate);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" FindCommand findSecondCommand \u003d new FindCommand(secondPredicate);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" FindCommand findFirstCommandCopy \u003d new FindCommand(firstPredicate);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Parses {@code userInput} into a {@code FindCommand}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private FindCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" FindCommand command \u003d","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(FindCommand command, String expectedMessage, List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class RedoCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Collections.emptyList(), Arrays.asList(deleteCommandTwo, deleteCommandOne));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in redoStack","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // single command in redoStack","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // no command in redoStack","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":50}},{"path":"src/test/java/seedu/address/logic/commands/SelectCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectCommand}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class SelectCommandTest {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommand \u003d new SelectCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" SelectCommand selectSecondCommand \u003d new SelectCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommandCopy \u003d new SelectCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * is raised with the correct index.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d selectCommand.execute();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertEquals(String.format(SelectCommand.MESSAGE_SELECT_PERSON_SUCCESS, index.getOneBased()),","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" JumpToListRequestEvent lastEvent \u003d (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * is thrown with the {@code expectedMessage}.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" selectCommand.execute();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns a {@code SelectCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" private SelectCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d new SelectCommand(index);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" selectCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" return selectCommand;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":139}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setCompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, setCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setIncompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, setIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class UndoCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Arrays.asList(deleteCommandOne, deleteCommandTwo), Collections.emptyList());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" deleteCommandOne.execute();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteCommandTwo.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // multiple commands in undoStack","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" // single command in undoStack","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no command in undoStack","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":51}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/parser/AddCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class AddCommandParserTest {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // multiple tags - all accepted","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" new AddCommand(expectedPersonMultipleTags));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // zero tags","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // missing name prefix","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" // missing phone prefix","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + VALID_PHONE_BOB","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // missing email prefix","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" // missing address prefix","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + VALID_ADDRESS_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" // missing description prefix","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" // missing deadline prefix","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + VALID_DEADLINE_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" // missing priority prefix","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" // invalid phone","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" // invalid email","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" // invalid tag","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" // invalid deadline","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" // invalid priority","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Priority.MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":33,"Esilocke":89,"-":114}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command \u003d (AddCommand) parser.parseCommand(TaskUtil.getAddCommand(task));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddCommand(task), command);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(task), command);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"wangyiming1019"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\") instanceof ExitCommand);","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"wangyiming1019"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"wangyiming1019"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\") instanceof HelpCommand);","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\") instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" parser.parseCommand(\"histories\");","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\") instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"wangyiming1019"},"content":" parser.parseCommand(\"histories\");","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD) instanceof ListCommand);","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\") instanceof ListCommand);","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS) instanceof ListCommand);","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\") instanceof ListCommand);","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWord() throws Exception {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWordWithInput() throws Exception {","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD + \" test.xml\") instanceof BackupCommand);","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAlias() throws Exception {","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAliasWithInput() throws Exception {","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS + \" test.xml\") instanceof BackupCommand);","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"redo 1\") instanceof RedoCommand);","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"undo 3\") instanceof UndoCommand);","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":" parser.parseCommand(\"\");","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"-"},"content":" parser.parseCommand(\"unknownCommand\");","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":75,"Esilocke":147,"wangyiming1019":80,"-":148}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * outside of the DeleteCommand code. For example, inputs \"1\" and \"1 abc\" take the","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * same path through the DeleteCommand, and therefore we test only one of them.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class DeleteCommandParserTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\",","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_TASK));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\",","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23,"-":29}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \",","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectCommandParserTest}.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectCommandParserTest","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"asc\",","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"desc\",","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"name\",","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"phone\",","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"email\",","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"address\",","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no field or order","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\",","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArguments_success() throws ParseException {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand expectedCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand actualCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name asc\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name desc\");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone asc\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone desc\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email asc\");","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email desc\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address asc\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address desc\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":101}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":106,"Esilocke":18,"-":93}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.isPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":20}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.isPrivate());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":39}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.isPrivate());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":25}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.isPrivate());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":24}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"-04-17\")); // missing day","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04--17\")); // missing month","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04\")); // missing year","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"day-04-17\")); // invalid day","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-month-17\")); // invalid month","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-year\")); // invalid year","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"32-04-17\")); // impossible day","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-13-17\")); // impossible month","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04--1\")); // impossible year","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"0-04-17\")); // incomplete day","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-0-17\")); // incomplete month","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-1\")); // incomplete year","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-201\")); // incomplete year","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04/17\")); // inconsistent separators","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-042017\")); // missing separator","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // valid deadlines","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04/04/2017\")); // slashes","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04.04.2017\")); // dots","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":44}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"0\")); // priority out of range","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * that we are building.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":9,"-":101}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonBuilder {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private Person person;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public PersonBuilder() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" defaultRemark, defaultTags);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" public Person build() {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return this.person;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":18,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().isPrivate());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":91}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * A utility class for Person.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class PersonUtil {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" return AddCommand.COMMAND_WORD + \" \" + getPersonDetails(person);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" sb.append(PREFIX_NAME + person.getName().fullName + \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach(","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" );","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"-":38}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Task task;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public Task build() {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" return this.task;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" return AddCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + task.getPriority().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":35}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class TypicalPersons {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // Manually added","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return ab;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":15,"wangyiming1019":15,"-":67}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").build();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\")","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").build();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").build();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":76}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" // default web page","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // associated web page of a person","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" postNow(selectionChangedEventStub);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedPersonUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + ALICE.getName().fullName.replaceAll(\" \", \"+\") + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPersonUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":31,"-":34}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultipler());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final JumpToListRequestEvent JUMP_TO_SECOND_EVENT \u003d new","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" JumpToListRequestEvent(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void handleJumpToListRequestEvent() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true}],"authorContributionMap":{"charlesgoh":60}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"-":94}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getPriority().value, actualCard.getPriority());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":24,"-":72}},{"path":"src/test/java/seedu/address/ui/testutil/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.GuiUnitTest;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // no tags","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * -\u003e added","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" String command \u003d \" \" + AddCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" 1\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e rejected */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e rejected */","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and verifies that the command box displays","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" * an empty string, the result display box displays the success message of executing {@code AddCommand} with the","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" * details of {@code toAdd}, and the model related components equal to the current model added with {@code toAdd}.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged.","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * instead.","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" * {@code expectedModel}.","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":34,"-":226}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void clear() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS, TYPE_ALL);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":97}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson(","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * browser url changes","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" selectPerson(index);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"-":269}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":70}}] diff --git a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateWithShallowCloning/expected/reposense_testrepo-Beta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateWithShallowCloning/expected/reposense_testrepo-Beta_master/authorship.json index 79c4693058..c1030bef2f 100644 --- a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateWithShallowCloning/expected/reposense_testrepo-Beta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateWithShallowCloning/expected/reposense_testrepo-Beta_master/authorship.json @@ -1 +1 @@ -[{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import java.net.URL?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Menu?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cstylesheets\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@DarkTheme.css\" /\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/stylesheets\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/MenuBar\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":27,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e"},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":29,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e"},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003c/StackPane\u003e"},{"lineNumber":31,"author":{"gitId":"nbr"},"content":""},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" maxHeight\u003d\"100\" minHeight\u003d\"100\" prefHeight\u003d\"100\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":34,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" maxHeight\u003d\"60\" minHeight\u003d\"60\" prefHeight\u003d\"60\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":47,"author":{"gitId":"nbr"},"content":" \u003cVBox fx:id\u003d\"personList\" minWidth\u003d\"335.0\" prefHeight\u003d\"143.0\" prefWidth\u003d\"335.0\" SplitPane.resizableWithParent\u003d\"false\"\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":49,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" prefWidth\u003d\"340\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":57,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e"},{"lineNumber":64,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e"}],"authorContributionMap":{"April0616":1,"-":53,"nbr":10}},{"path":"src/main/resources/view/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e"},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e"},{"lineNumber":16,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e"},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e"},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cchildren\u003e"},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":21,"author":{"gitId":"April0616"},"content":""},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e"},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e"},{"lineNumber":24,"author":{"gitId":"April0616"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e"},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e"},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" /\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e"},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e"},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" /\u003e"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"April0616":14,"-":48,"nbr":3}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets top\u003d\"5\" right\u003d\"5\" bottom\u003d\"5\" left\u003d\"15\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cHBox spacing\u003d\"5\" alignment\u003d\"CENTER_LEFT\"\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" text\u003d\"\\$first\" styleClass\u003d\"cell_big_label\" /\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$gender\" /\u003e"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$address\" /\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":36,"author":{"gitId":"CindyTsai1"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"timetable\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$timetable\" /\u003e"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$remark\" /\u003e"},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"photoPath\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$photoPath\" /\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"CindyTsai1":1,"April0616":4,"-":37}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"nbr"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"-":24,"nbr":2}}] +[{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import java.net.URL?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Menu?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cstylesheets\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@DarkTheme.css\" /\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/stylesheets\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/MenuBar\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"nbr"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" maxHeight\u003d\"100\" minHeight\u003d\"100\" prefHeight\u003d\"100\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" maxHeight\u003d\"60\" minHeight\u003d\"60\" prefHeight\u003d\"60\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"nbr"},"content":" \u003cVBox fx:id\u003d\"personList\" minWidth\u003d\"335.0\" prefHeight\u003d\"143.0\" prefWidth\u003d\"335.0\" SplitPane.resizableWithParent\u003d\"false\"\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" prefWidth\u003d\"340\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c!-- @@author --\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":1,"-":53,"nbr":10}},{"path":"src/main/resources/view/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cchildren\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" /\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" /\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":14,"-":48,"nbr":3}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets top\u003d\"5\" right\u003d\"5\" bottom\u003d\"5\" left\u003d\"15\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cHBox spacing\u003d\"5\" alignment\u003d\"CENTER_LEFT\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" text\u003d\"\\$first\" styleClass\u003d\"cell_big_label\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$gender\" /\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$address\" /\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"CindyTsai1"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"timetable\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$timetable\" /\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$remark\" /\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"photoPath\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$photoPath\" /\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"CindyTsai1":1,"April0616":4,"-":37}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"nbr"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":24,"nbr":2}}] diff --git a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateWithShallowCloning/expected/reposense_testrepo-Charlie_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateWithShallowCloning/expected/reposense_testrepo-Charlie_master/authorship.json index 17759c193d..e4236ea96a 100644 --- a/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateWithShallowCloning/expected/reposense_testrepo-Charlie_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/30daysFromUntilDateWithShallowCloning/expected/reposense_testrepo-Charlie_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++"},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]"},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\"]"},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface)."},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"* It is a Java application primarily targeted for students doing group projects."},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls."},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by"},{"lineNumber":33,"author":{"gitId":"-"},"content":"_Marco Jakob_."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_."},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]"}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":7,"-":26}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us"},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team."},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/."},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Charles Goh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://charlesgoh.me[homepage]] [https://github.com/charlesgoh[github]]"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Jeffrey Goh"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Kelvin Lin"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esiloke[github]]"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Wang Yi Ming"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1090[github]]"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"}],"authorContributionMap":{"charlesgoh":22,"-":26}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later"},{"lineNumber":22,"author":{"gitId":"-"},"content":"+"},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":26,"author":{"gitId":"-"},"content":"+"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE"},{"lineNumber":29,"author":{"gitId":"-"},"content":"+"},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them."},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer"},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)"},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle"},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`"},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK"},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`"},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`"},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`"},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings"},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +"},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests."},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands"},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)"},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`"},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code."},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork."},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up."},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e)."},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section."},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started]."},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]"},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component."},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`."},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other."},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary."},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level."},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)"},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file."},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components."},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App."},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor."},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory."},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk."},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component."},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class."},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class."},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`."},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]"},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk."},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time."},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]"},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components."},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component."},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class."},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component."},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change."},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly."},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :"},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command."},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`."},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events."},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`."},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call."},{"lineNumber":183,"author":{"gitId":"-"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]"},{"lineNumber":193,"author":{"gitId":"-"},"content":""},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences."},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data."},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change."},{"lineNumber":199,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components."},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":204,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":"The `Storage` component,"},{"lineNumber":209,"author":{"gitId":"-"},"content":""},{"lineNumber":210,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back."},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back."},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package."},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented."},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go."},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size. The first way is through the UI. The Class Diagram for this"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":"procedure is shown below:"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"The other method of calling changes in font size is through a CLI command. When the relevant command is entered,"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"the Command class calls MainWindow. The rest of the process flow is identical to that of the UI triggered font size"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"command."},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder"},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of Task-related commands +"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +"},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Create new classes for all new commands +"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Simpler to implement. +"},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure."},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Storage of Task objects +"},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +"},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa."},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage."},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +"},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons** Any changes to the Person or Task"},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":259,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":260,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`."},{"lineNumber":263,"author":{"gitId":"-"},"content":""},{"lineNumber":264,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":267,"author":{"gitId":"-"},"content":""},{"lineNumber":268,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern]."},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:"},{"lineNumber":271,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":272,"author":{"gitId":"-"},"content":"----"},{"lineNumber":273,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":274,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":275,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":276,"author":{"gitId":"-"},"content":" // ... list logic ..."},{"lineNumber":277,"author":{"gitId":"-"},"content":" }"},{"lineNumber":278,"author":{"gitId":"-"},"content":"}"},{"lineNumber":279,"author":{"gitId":"-"},"content":"----"},{"lineNumber":280,"author":{"gitId":"-"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:"},{"lineNumber":282,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":283,"author":{"gitId":"-"},"content":"----"},{"lineNumber":284,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {"},{"lineNumber":285,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":286,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":287,"author":{"gitId":"-"},"content":" // ... undo logic ..."},{"lineNumber":288,"author":{"gitId":"-"},"content":""},{"lineNumber":289,"author":{"gitId":"-"},"content":" executeUndoableCommand();"},{"lineNumber":290,"author":{"gitId":"-"},"content":" }"},{"lineNumber":291,"author":{"gitId":"-"},"content":"}"},{"lineNumber":292,"author":{"gitId":"-"},"content":""},{"lineNumber":293,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":294,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":295,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":296,"author":{"gitId":"-"},"content":" // ... delete logic ..."},{"lineNumber":297,"author":{"gitId":"-"},"content":" }"},{"lineNumber":298,"author":{"gitId":"-"},"content":"}"},{"lineNumber":299,"author":{"gitId":"-"},"content":"----"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning."},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command)."},{"lineNumber":304,"author":{"gitId":"-"},"content":""},{"lineNumber":305,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":306,"author":{"gitId":"-"},"content":""},{"lineNumber":307,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person."},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":310,"author":{"gitId":"-"},"content":""},{"lineNumber":311,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":312,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all."},{"lineNumber":313,"author":{"gitId":"-"},"content":""},{"lineNumber":314,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`."},{"lineNumber":315,"author":{"gitId":"-"},"content":""},{"lineNumber":316,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed."},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":319,"author":{"gitId":"-"},"content":""},{"lineNumber":320,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":321,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`."},{"lineNumber":322,"author":{"gitId":"-"},"content":""},{"lineNumber":323,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:"},{"lineNumber":324,"author":{"gitId":"-"},"content":""},{"lineNumber":325,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":326,"author":{"gitId":"-"},"content":""},{"lineNumber":327,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed)."},{"lineNumber":328,"author":{"gitId":"-"},"content":""},{"lineNumber":329,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":330,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`."},{"lineNumber":331,"author":{"gitId":"-"},"content":""},{"lineNumber":332,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow)."},{"lineNumber":333,"author":{"gitId":"-"},"content":""},{"lineNumber":334,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":335,"author":{"gitId":"-"},"content":""},{"lineNumber":336,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:"},{"lineNumber":337,"author":{"gitId":"-"},"content":""},{"lineNumber":338,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":339,"author":{"gitId":"-"},"content":""},{"lineNumber":340,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":345,"author":{"gitId":"-"},"content":""},{"lineNumber":346,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +"},{"lineNumber":347,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +"},{"lineNumber":348,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +"},{"lineNumber":349,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +"},{"lineNumber":350,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +"},{"lineNumber":351,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +"},{"lineNumber":352,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo."},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"-"},"content":"---"},{"lineNumber":355,"author":{"gitId":"-"},"content":""},{"lineNumber":356,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +"},{"lineNumber":357,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +"},{"lineNumber":358,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +"},{"lineNumber":359,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +"},{"lineNumber":360,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +"},{"lineNumber":361,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +"},{"lineNumber":362,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct."},{"lineNumber":363,"author":{"gitId":"-"},"content":""},{"lineNumber":364,"author":{"gitId":"-"},"content":"---"},{"lineNumber":365,"author":{"gitId":"-"},"content":""},{"lineNumber":366,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +"},{"lineNumber":367,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +"},{"lineNumber":368,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +"},{"lineNumber":369,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +"},{"lineNumber":370,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +"},{"lineNumber":371,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +"},{"lineNumber":372,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +"},{"lineNumber":373,"author":{"gitId":"-"},"content":""},{"lineNumber":374,"author":{"gitId":"-"},"content":"---"},{"lineNumber":375,"author":{"gitId":"-"},"content":""},{"lineNumber":376,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +"},{"lineNumber":377,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +"},{"lineNumber":378,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +"},{"lineNumber":379,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +"},{"lineNumber":380,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +"},{"lineNumber":381,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +"},{"lineNumber":382,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +"},{"lineNumber":383,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the add, delete, list, select, and edit commands."},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Instead of making a new Logic object for each new command, polymorphism is used to implement the \"Task\" version of each command."},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"An example of using polymorphism to handle Person vs Task addition:"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":"public class AddCommand extends Command {"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyPerson person) {"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Person(person);"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_PERSON;"},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Task(task);"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_TASK;"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"The AddCommand will thus call a different constructor depending on the type of the argument supplied to it. To facilitate this, the respective Parser class must also be modified:"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(toAdd);"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The AddCommandParser checks the args to see if this is a task, then creates the object to be added, and creates a new AddCommand to handle the result. +"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"To support the addition of Task objects, the Storage component is modified to accept Task objects in a similar manner as to how Person objects are being stored."},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"[source, html]"},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e"},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e"},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e"},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e"},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"Tasks objects are stored in the same level of hierarchy as Person objects, and during startup, are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book."},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Create new classes for all new commands +"},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"**Pros:** Simpler to implement. +"},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure."},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +"},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa."},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage."},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +"},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes."},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":470,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":471,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":472,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` method in UniquePersonList. It supports"},{"lineNumber":473,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field."},{"lineNumber":474,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":475,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator."},{"lineNumber":476,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":477,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`"},{"lineNumber":478,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class."},{"lineNumber":479,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":480,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for this sort command implementation is shown below:"},{"lineNumber":481,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":482,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandDiagram.png[width\u003d\"800\"]"},{"lineNumber":483,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":484,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort name desc`. The following sequence diagram"},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works."},{"lineNumber":486,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":487,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]"},{"lineNumber":488,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":489,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted. The resulting list"},{"lineNumber":490,"author":{"gitId":"charlesgoh"},"content":"is not returned, but will be reflected in the application\u0027s storage and graphical user interface."},{"lineNumber":491,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":492,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":494,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +"},{"lineNumber":495,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` class. +"},{"lineNumber":496,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the person lists. Future changes to the implementation will be easier as a consequence. +"},{"lineNumber":497,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +"},{"lineNumber":498,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +"},{"lineNumber":499,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +"},{"lineNumber":500,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList` will have to rely on the `SortCommand` class."},{"lineNumber":501,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":502,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":503,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":504,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +"},{"lineNumber":505,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +"},{"lineNumber":506,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for both user and developer and reduced complexity in implementation. +"},{"lineNumber":507,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +"},{"lineNumber":508,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +"},{"lineNumber":509,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +"},{"lineNumber":510,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system."},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":513,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":514,"author":{"gitId":"charlesgoh"},"content":"The backup command makes use of both the model manager and the storage manager. The `LogicManager` class was"},{"lineNumber":515,"author":{"gitId":"charlesgoh"},"content":"improved to support the accessing of storage value."},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":517,"author":{"gitId":"charlesgoh"},"content":"The backup command arguments are parsed through the `BackupCommandParser`, which passes control over to the"},{"lineNumber":518,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class. If there is a file path specified by the user, then the `execute()` command within the"},{"lineNumber":519,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class will save the backup file to that path. If not file path is specified, the backup file will be"},{"lineNumber":520,"author":{"gitId":"charlesgoh"},"content":"saved to a default location."},{"lineNumber":521,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":522,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup`. The backup file will be saved to a default location:"},{"lineNumber":523,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDefaultDiagram.png[width\u003d\"800\"]"},{"lineNumber":525,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":526,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup testBackup.xml`. The following sequence diagram"},{"lineNumber":527,"author":{"gitId":"charlesgoh"},"content":"demonstrates how this works:"},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":529,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceCustomDiagram.png[width\u003d\"800]"},{"lineNumber":530,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":531,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted."},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":534,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":535,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +"},{"lineNumber":536,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement backup command via Command Line Interface +"},{"lineNumber":537,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Backing up data is easier and faster for users who are familiar with the commands. Less button clicks. +"},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":"**Cons:** UI not as intuitive. Users who are not familiar with the application may not know about this feature +"},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement backup command via GUI +"},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for all users since the options are all graphical +"},{"lineNumber":541,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hinders productivity. Excessive number of clicks to accomplish an essential task."},{"lineNumber":542,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":544,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":545,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Custom and/or Default file paths for backup file +"},{"lineNumber":546,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implemented both types of commands +"},{"lineNumber":547,"author":{"gitId":"charlesgoh"},"content":"**Pros:** User can choose either command option. Gives the user more choices +"},{"lineNumber":548,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May seem confusing to the user at first +"},{"lineNumber":549,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement only the default option (save backup file to data directory of application) +"},{"lineNumber":550,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Faster for the user to key in one word rather than a command with many words +"},{"lineNumber":551,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Reduces choice for experienced users who may want to save to another location or use a different save name"},{"lineNumber":552,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":553,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields"},{"lineNumber":554,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":555,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email` and `Address` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not."},{"lineNumber":556,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":557,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +"},{"lineNumber":558,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +"},{"lineNumber":559,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +"},{"lineNumber":560,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":561,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes."},{"lineNumber":562,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field."},{"lineNumber":563,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor."},{"lineNumber":564,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`."},{"lineNumber":565,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":566,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":567,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : Sequence Diagram for adding a Person with private fields_"},{"lineNumber":568,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":569,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +"},{"lineNumber":570,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:"},{"lineNumber":571,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":572,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":573,"author":{"gitId":"jeffreygohkw"},"content":"@Override"},{"lineNumber":574,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {"},{"lineNumber":575,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":576,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":577,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":578,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;"},{"lineNumber":579,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":580,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":581,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":582,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI."},{"lineNumber":583,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":584,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name."},{"lineNumber":585,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":586,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`."},{"lineNumber":587,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":588,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`."},{"lineNumber":589,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following"},{"lineNumber":590,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":591,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format"},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]"},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e"},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e"},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e"},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e"},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e"},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e"},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e"},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e"},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e"},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e"},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e"},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same."},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +"},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was."},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":625,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`."},{"lineNumber":626,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true."},{"lineNumber":627,"author":{"gitId":"-"},"content":""},{"lineNumber":628,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false."},{"lineNumber":629,"author":{"gitId":"-"},"content":""},{"lineNumber":630,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object."},{"lineNumber":631,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":632,"author":{"gitId":"-"},"content":"----"},{"lineNumber":633,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":634,"author":{"gitId":"-"},"content":" Name updatedName;"},{"lineNumber":635,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {"},{"lineNumber":636,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":637,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":638,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":639,"author":{"gitId":"-"},"content":" }"},{"lineNumber":640,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":641,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":642,"author":{"gitId":"-"},"content":" }"},{"lineNumber":643,"author":{"gitId":"-"},"content":" return updatedName;"},{"lineNumber":644,"author":{"gitId":"-"},"content":" }"},{"lineNumber":645,"author":{"gitId":"-"},"content":"----"},{"lineNumber":646,"author":{"gitId":"-"},"content":""},{"lineNumber":647,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing."},{"lineNumber":648,"author":{"gitId":"-"},"content":""},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":650,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":651,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +"},{"lineNumber":652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +"},{"lineNumber":653,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +"},{"lineNumber":654,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +"},{"lineNumber":655,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +"},{"lineNumber":656,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +"},{"lineNumber":657,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to."},{"lineNumber":658,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":659,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":660,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +"},{"lineNumber":661,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +"},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +"},{"lineNumber":663,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +"},{"lineNumber":664,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +"},{"lineNumber":665,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +"},{"lineNumber":666,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users."},{"lineNumber":667,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy"},{"lineNumber":669,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":670,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`."},{"lineNumber":671,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below."},{"lineNumber":673,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":675,"author":{"gitId":"-"},"content":"_Figure 3.6.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_"},{"lineNumber":676,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object."},{"lineNumber":678,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":679,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`."},{"lineNumber":680,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`"},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":683,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`."},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`."},{"lineNumber":685,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`."},{"lineNumber":687,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":688,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":689,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`."},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all."},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":694,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +"},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +"},{"lineNumber":696,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +"},{"lineNumber":697,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +"},{"lineNumber":698,"author":{"gitId":"-"},"content":"**Alternative 2:** Enhance the functi-onality of EditCommand. +"},{"lineNumber":699,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +"},{"lineNumber":700,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data."},{"lineNumber":701,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps"},{"lineNumber":703,"author":{"gitId":"-"},"content":""},{"lineNumber":704,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +"},{"lineNumber":705,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:"},{"lineNumber":706,"author":{"gitId":"-"},"content":""},{"lineNumber":707,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":708,"author":{"gitId":"-"},"content":"----"},{"lineNumber":709,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":710,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":711,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":712,"author":{"gitId":"-"},"content":" return new LocateCommand(index);"},{"lineNumber":713,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":714,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":715,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":716,"author":{"gitId":"-"},"content":" }"},{"lineNumber":717,"author":{"gitId":"-"},"content":" }"},{"lineNumber":718,"author":{"gitId":"-"},"content":"----"},{"lineNumber":719,"author":{"gitId":"-"},"content":""},{"lineNumber":720,"author":{"gitId":"-"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of `Person`s, a `CommandException` will be thrown."},{"lineNumber":721,"author":{"gitId":"-"},"content":""},{"lineNumber":722,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution."},{"lineNumber":723,"author":{"gitId":"-"},"content":""},{"lineNumber":724,"author":{"gitId":"-"},"content":"This code for this can be found below:"},{"lineNumber":725,"author":{"gitId":"-"},"content":""},{"lineNumber":726,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":727,"author":{"gitId":"-"},"content":"----"},{"lineNumber":728,"author":{"gitId":"-"},"content":"@Override"},{"lineNumber":729,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":730,"author":{"gitId":"-"},"content":""},{"lineNumber":731,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":732,"author":{"gitId":"-"},"content":""},{"lineNumber":733,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":734,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":735,"author":{"gitId":"-"},"content":" }"},{"lineNumber":736,"author":{"gitId":"-"},"content":""},{"lineNumber":737,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":738,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":739,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":740,"author":{"gitId":"-"},"content":""},{"lineNumber":741,"author":{"gitId":"-"},"content":" }"},{"lineNumber":742,"author":{"gitId":"-"},"content":"----"},{"lineNumber":743,"author":{"gitId":"-"},"content":""},{"lineNumber":744,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:"},{"lineNumber":745,"author":{"gitId":"-"},"content":""},{"lineNumber":746,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":747,"author":{"gitId":"-"},"content":"----"},{"lineNumber":748,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":749,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":750,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":751,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":752,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":753,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":754,"author":{"gitId":"-"},"content":" }"},{"lineNumber":755,"author":{"gitId":"-"},"content":" }"},{"lineNumber":756,"author":{"gitId":"-"},"content":"----"},{"lineNumber":757,"author":{"gitId":"-"},"content":""},{"lineNumber":758,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:"},{"lineNumber":759,"author":{"gitId":"-"},"content":""},{"lineNumber":760,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":761,"author":{"gitId":"-"},"content":"_Figure 3.7.1 : Sequence Diagram for Locating a Person\u0027s Address_"},{"lineNumber":762,"author":{"gitId":"-"},"content":""},{"lineNumber":763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":764,"author":{"gitId":"-"},"content":""},{"lineNumber":765,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +"},{"lineNumber":766,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Create a seperate command `locate`. +"},{"lineNumber":767,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +"},{"lineNumber":768,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +"},{"lineNumber":769,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +"},{"lineNumber":770,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +"},{"lineNumber":771,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users."},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":773,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism"},{"lineNumber":774,"author":{"gitId":"-"},"content":""},{"lineNumber":775,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete"},{"lineNumber":776,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`."},{"lineNumber":777,"author":{"gitId":"-"},"content":""},{"lineNumber":778,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`."},{"lineNumber":779,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once."},{"lineNumber":780,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`addtag 1 2 3 t/friends`) will be executed."},{"lineNumber":781,"author":{"gitId":"-"},"content":"The same operation will happen for `deletetag` command."},{"lineNumber":782,"author":{"gitId":"-"},"content":""},{"lineNumber":783,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works"},{"lineNumber":784,"author":{"gitId":"-"},"content":"in a similar way."},{"lineNumber":785,"author":{"gitId":"-"},"content":""},{"lineNumber":786,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:"},{"lineNumber":787,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":788,"author":{"gitId":"-"},"content":"----"},{"lineNumber":789,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":790,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book."},{"lineNumber":791,"author":{"gitId":"-"},"content":" */"},{"lineNumber":792,"author":{"gitId":"-"},"content":"public class AddTagCommand extends UndoableCommand {"},{"lineNumber":793,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":794,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":795,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":796,"author":{"gitId":"-"},"content":" */"},{"lineNumber":797,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":798,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":799,"author":{"gitId":"-"},"content":""},{"lineNumber":800,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":801,"author":{"gitId":"-"},"content":" // check whether the index within the range"},{"lineNumber":802,"author":{"gitId":"-"},"content":" }"},{"lineNumber":803,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":804,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag"},{"lineNumber":805,"author":{"gitId":"-"},"content":" }"},{"lineNumber":806,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag"},{"lineNumber":807,"author":{"gitId":"-"},"content":" return new CommandResult();"},{"lineNumber":808,"author":{"gitId":"-"},"content":" }"},{"lineNumber":809,"author":{"gitId":"-"},"content":"----"},{"lineNumber":810,"author":{"gitId":"-"},"content":""},{"lineNumber":811,"author":{"gitId":"-"},"content":"Suppose the user enter the `addtag 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:"},{"lineNumber":812,"author":{"gitId":"-"},"content":""},{"lineNumber":813,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":814,"author":{"gitId":"-"},"content":"_Figure 3.8.1 : Add Tag Sequence Diagram for Logic_ +"},{"lineNumber":815,"author":{"gitId":"-"},"content":"The `deletetag` command works the same as `addtag` command with different name only."},{"lineNumber":816,"author":{"gitId":"-"},"content":""},{"lineNumber":817,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":818,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +"},{"lineNumber":819,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +"},{"lineNumber":820,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception."},{"lineNumber":821,"author":{"gitId":"-"},"content":""},{"lineNumber":822,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":823,"author":{"gitId":"-"},"content":""},{"lineNumber":824,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `addtag` and `deletetag` +"},{"lineNumber":825,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +"},{"lineNumber":826,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +"},{"lineNumber":827,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+"},{"lineNumber":828,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +"},{"lineNumber":829,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +"},{"lineNumber":830,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list."},{"lineNumber":831,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle."},{"lineNumber":832,"author":{"gitId":"-"},"content":""},{"lineNumber":833,"author":{"gitId":"-"},"content":"---"},{"lineNumber":834,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +"},{"lineNumber":835,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `addtag` and `deletetag` +"},{"lineNumber":836,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +"},{"lineNumber":837,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +"},{"lineNumber":838,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +"},{"lineNumber":839,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +"},{"lineNumber":840,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner."},{"lineNumber":841,"author":{"gitId":"-"},"content":""},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism"},{"lineNumber":843,"author":{"gitId":"-"},"content":""},{"lineNumber":844,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book."},{"lineNumber":845,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`."},{"lineNumber":846,"author":{"gitId":"-"},"content":""},{"lineNumber":847,"author":{"gitId":"-"},"content":"The `findtag` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`."},{"lineNumber":848,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first."},{"lineNumber":849,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar."},{"lineNumber":850,"author":{"gitId":"-"},"content":""},{"lineNumber":851,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences."},{"lineNumber":852,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`."},{"lineNumber":853,"author":{"gitId":"-"},"content":""},{"lineNumber":854,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:"},{"lineNumber":855,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String."},{"lineNumber":856,"author":{"gitId":"-"},"content":""},{"lineNumber":857,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":858,"author":{"gitId":"-"},"content":"----"},{"lineNumber":859,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":860,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":861,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":862,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {"},{"lineNumber":863,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":864,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");"},{"lineNumber":865,"author":{"gitId":"-"},"content":" }"},{"lineNumber":866,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();"},{"lineNumber":867,"author":{"gitId":"-"},"content":" }"},{"lineNumber":868,"author":{"gitId":"-"},"content":"----"},{"lineNumber":869,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one"},{"lineNumber":870,"author":{"gitId":"-"},"content":"is for the tags to be excluded."},{"lineNumber":871,"author":{"gitId":"-"},"content":""},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":873,"author":{"gitId":"-"},"content":"----"},{"lineNumber":874,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":875,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":876,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":877,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":878,"author":{"gitId":"-"},"content":" */"},{"lineNumber":879,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":880,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {"},{"lineNumber":881,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {"},{"lineNumber":882,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);"},{"lineNumber":883,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":884,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));"},{"lineNumber":885,"author":{"gitId":"-"},"content":" }"},{"lineNumber":886,"author":{"gitId":"-"},"content":" }"},{"lineNumber":887,"author":{"gitId":"-"},"content":" }"},{"lineNumber":888,"author":{"gitId":"-"},"content":"----"},{"lineNumber":889,"author":{"gitId":"-"},"content":""},{"lineNumber":890,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +"},{"lineNumber":891,"author":{"gitId":"-"},"content":"Suppose the user enter `findtag friends` command. The following sequence diagram shows how the find tag command works:"},{"lineNumber":892,"author":{"gitId":"-"},"content":""},{"lineNumber":893,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":894,"author":{"gitId":"-"},"content":"_Figure 3.9.1 : Find Tag Sequence Diagram for Logic_ +"},{"lineNumber":895,"author":{"gitId":"-"},"content":""},{"lineNumber":896,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":897,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list."},{"lineNumber":898,"author":{"gitId":"-"},"content":""},{"lineNumber":899,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":900,"author":{"gitId":"-"},"content":""},{"lineNumber":901,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `findtag` +"},{"lineNumber":902,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `findtag` +"},{"lineNumber":903,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `findtag` command will be similar to the `find` command. +"},{"lineNumber":904,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +"},{"lineNumber":905,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `findtag` in `FindCommand`. +"},{"lineNumber":906,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +"},{"lineNumber":907,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle"},{"lineNumber":908,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things."},{"lineNumber":909,"author":{"gitId":"-"},"content":""},{"lineNumber":910,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging"},{"lineNumber":911,"author":{"gitId":"-"},"content":""},{"lineNumber":912,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations."},{"lineNumber":913,"author":{"gitId":"-"},"content":""},{"lineNumber":914,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])"},{"lineNumber":915,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level"},{"lineNumber":916,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file."},{"lineNumber":917,"author":{"gitId":"-"},"content":""},{"lineNumber":918,"author":{"gitId":"-"},"content":"*Logging Levels*"},{"lineNumber":919,"author":{"gitId":"-"},"content":""},{"lineNumber":920,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application"},{"lineNumber":921,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution"},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App"},{"lineNumber":923,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size"},{"lineNumber":924,"author":{"gitId":"-"},"content":""},{"lineNumber":925,"author":{"gitId":"-"},"content":""},{"lineNumber":926,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration"},{"lineNumber":927,"author":{"gitId":"-"},"content":""},{"lineNumber":928,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`)."},{"lineNumber":929,"author":{"gitId":"-"},"content":""},{"lineNumber":930,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation"},{"lineNumber":931,"author":{"gitId":"-"},"content":""},{"lineNumber":932,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation."},{"lineNumber":933,"author":{"gitId":"-"},"content":""},{"lineNumber":934,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":935,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting."},{"lineNumber":936,"author":{"gitId":"-"},"content":""},{"lineNumber":937,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation"},{"lineNumber":938,"author":{"gitId":"-"},"content":""},{"lineNumber":939,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits."},{"lineNumber":940,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time."},{"lineNumber":941,"author":{"gitId":"-"},"content":""},{"lineNumber":942,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation"},{"lineNumber":943,"author":{"gitId":"-"},"content":""},{"lineNumber":944,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis."},{"lineNumber":945,"author":{"gitId":"-"},"content":""},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format"},{"lineNumber":947,"author":{"gitId":"-"},"content":""},{"lineNumber":948,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages."},{"lineNumber":949,"author":{"gitId":"-"},"content":""},{"lineNumber":950,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format."},{"lineNumber":951,"author":{"gitId":"-"},"content":""},{"lineNumber":952,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format."},{"lineNumber":953,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`."},{"lineNumber":954,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu."},{"lineNumber":955,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below."},{"lineNumber":956,"author":{"gitId":"-"},"content":""},{"lineNumber":957,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]"},{"lineNumber":958,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_"},{"lineNumber":959,"author":{"gitId":"-"},"content":""},{"lineNumber":960,"author":{"gitId":"-"},"content":"\u003d\u003d Testing"},{"lineNumber":961,"author":{"gitId":"-"},"content":""},{"lineNumber":962,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests"},{"lineNumber":963,"author":{"gitId":"-"},"content":""},{"lineNumber":964,"author":{"gitId":"-"},"content":"There are three ways to run tests."},{"lineNumber":965,"author":{"gitId":"-"},"content":""},{"lineNumber":966,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":967,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies."},{"lineNumber":968,"author":{"gitId":"-"},"content":""},{"lineNumber":969,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*"},{"lineNumber":970,"author":{"gitId":"-"},"content":""},{"lineNumber":971,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`"},{"lineNumber":972,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`"},{"lineNumber":973,"author":{"gitId":"-"},"content":""},{"lineNumber":974,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*"},{"lineNumber":975,"author":{"gitId":"-"},"content":""},{"lineNumber":976,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)"},{"lineNumber":977,"author":{"gitId":"-"},"content":""},{"lineNumber":978,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":979,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle."},{"lineNumber":980,"author":{"gitId":"-"},"content":""},{"lineNumber":981,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*"},{"lineNumber":982,"author":{"gitId":"-"},"content":""},{"lineNumber":983,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running."},{"lineNumber":984,"author":{"gitId":"-"},"content":""},{"lineNumber":985,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)"},{"lineNumber":986,"author":{"gitId":"-"},"content":""},{"lineNumber":987,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests"},{"lineNumber":988,"author":{"gitId":"-"},"content":""},{"lineNumber":989,"author":{"gitId":"-"},"content":"We have two types of tests:"},{"lineNumber":990,"author":{"gitId":"-"},"content":""},{"lineNumber":991,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,"},{"lineNumber":992,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package."},{"lineNumber":993,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package."},{"lineNumber":994,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,"},{"lineNumber":995,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +"},{"lineNumber":996,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`"},{"lineNumber":997,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +"},{"lineNumber":998,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`"},{"lineNumber":999,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`"},{"lineNumber":1001,"author":{"gitId":"-"},"content":""},{"lineNumber":1002,"author":{"gitId":"-"},"content":""},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing"},{"lineNumber":1004,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**"},{"lineNumber":1005,"author":{"gitId":"-"},"content":""},{"lineNumber":1006,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing."},{"lineNumber":1007,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`."},{"lineNumber":1008,"author":{"gitId":"-"},"content":""},{"lineNumber":1009,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops"},{"lineNumber":1010,"author":{"gitId":"-"},"content":""},{"lineNumber":1011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation"},{"lineNumber":1012,"author":{"gitId":"-"},"content":""},{"lineNumber":1013,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation."},{"lineNumber":1014,"author":{"gitId":"-"},"content":""},{"lineNumber":1015,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration"},{"lineNumber":1016,"author":{"gitId":"-"},"content":""},{"lineNumber":1017,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details."},{"lineNumber":1018,"author":{"gitId":"-"},"content":""},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release"},{"lineNumber":1020,"author":{"gitId":"-"},"content":""},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Here are the steps to create a new release."},{"lineNumber":1022,"author":{"gitId":"-"},"content":""},{"lineNumber":1023,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]."},{"lineNumber":1024,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e."},{"lineNumber":1025,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`"},{"lineNumber":1026,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created."},{"lineNumber":1027,"author":{"gitId":"-"},"content":""},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies"},{"lineNumber":1029,"author":{"gitId":"-"},"content":""},{"lineNumber":1030,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +"},{"lineNumber":1031,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +"},{"lineNumber":1032,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)"},{"lineNumber":1033,"author":{"gitId":"-"},"content":""},{"lineNumber":1034,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1035,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories"},{"lineNumber":1036,"author":{"gitId":"-"},"content":""},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`"},{"lineNumber":1038,"author":{"gitId":"-"},"content":""},{"lineNumber":1039,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]"},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can..."},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App"},{"lineNumber":1043,"author":{"gitId":"-"},"content":""},{"lineNumber":1044,"author":{"gitId":"-"},"content":"|`* * *` |user |add a new person |"},{"lineNumber":1045,"author":{"gitId":"-"},"content":""},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need"},{"lineNumber":1047,"author":{"gitId":"-"},"content":""},{"lineNumber":1048,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts"},{"lineNumber":1049,"author":{"gitId":"-"},"content":""},{"lineNumber":1050,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added"},{"lineNumber":1051,"author":{"gitId":"-"},"content":""},{"lineNumber":1052,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made"},{"lineNumber":1053,"author":{"gitId":"-"},"content":""},{"lineNumber":1054,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values"},{"lineNumber":1055,"author":{"gitId":"-"},"content":""},{"lineNumber":1056,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident"},{"lineNumber":1057,"author":{"gitId":"-"},"content":""},{"lineNumber":1058,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location"},{"lineNumber":1059,"author":{"gitId":"-"},"content":""},{"lineNumber":1060,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs"},{"lineNumber":1061,"author":{"gitId":"-"},"content":""},{"lineNumber":1062,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity"},{"lineNumber":1063,"author":{"gitId":"-"},"content":""},{"lineNumber":1064,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |first-time user |be able to see a user guide when I first start the program |be clear on how to use it"},{"lineNumber":1065,"author":{"gitId":"-"},"content":""},{"lineNumber":1066,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better"},{"lineNumber":1067,"author":{"gitId":"-"},"content":""},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me"},{"lineNumber":1069,"author":{"gitId":"-"},"content":""},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts"},{"lineNumber":1071,"author":{"gitId":"-"},"content":""},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms"},{"lineNumber":1073,"author":{"gitId":"-"},"content":""},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with many social media accounts |be able to add my contacts\u0027 social media accounts to the address book |improve connectivity and learn more about my contacts"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others"},{"lineNumber":1077,"author":{"gitId":"-"},"content":""},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|`*` |user with many persons in the address book |sort persons by name |locate a person easily"},{"lineNumber":1079,"author":{"gitId":"-"},"content":""},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly"},{"lineNumber":1081,"author":{"gitId":"-"},"content":""},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like"},{"lineNumber":1083,"author":{"gitId":"-"},"content":""},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts"},{"lineNumber":1085,"author":{"gitId":"-"},"content":""},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently"},{"lineNumber":1087,"author":{"gitId":"-"},"content":""},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |non tech-savvy user |have the option to fill out certain fields |use the address book without having to use the intimidating CLI."},{"lineNumber":1089,"author":{"gitId":"-"},"content":""},{"lineNumber":1090,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |error-prone user |have minor typos auto corrected |continue using the address book without correcting my mistakes"},{"lineNumber":1091,"author":{"gitId":"-"},"content":""},{"lineNumber":1092,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features"},{"lineNumber":1093,"author":{"gitId":"-"},"content":""},{"lineNumber":1094,"author":{"gitId":"-"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1096,"author":{"gitId":"-"},"content":""},{"lineNumber":1097,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1098,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases"},{"lineNumber":1099,"author":{"gitId":"-"},"content":""},{"lineNumber":1100,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)"},{"lineNumber":1101,"author":{"gitId":"-"},"content":""},{"lineNumber":1102,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person"},{"lineNumber":1104,"author":{"gitId":"-"},"content":""},{"lineNumber":1105,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1106,"author":{"gitId":"-"},"content":""},{"lineNumber":1107,"author":{"gitId":"-"},"content":"1. User requests to list persons"},{"lineNumber":1108,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1109,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list"},{"lineNumber":1110,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person"},{"lineNumber":1111,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1112,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1113,"author":{"gitId":"-"},"content":""},{"lineNumber":1114,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1115,"author":{"gitId":"-"},"content":""},{"lineNumber":1116,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1117,"author":{"gitId":"-"},"content":"* 2a. The list is empty."},{"lineNumber":1118,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1119,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1120,"author":{"gitId":"-"},"content":""},{"lineNumber":1121,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid."},{"lineNumber":1122,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1123,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1124,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1125,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1126,"author":{"gitId":"-"},"content":"Use case resumes at step 2."},{"lineNumber":1127,"author":{"gitId":"-"},"content":""},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person"},{"lineNumber":1130,"author":{"gitId":"-"},"content":""},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1132,"author":{"gitId":"-"},"content":""},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria"},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria"},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1136,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1137,"author":{"gitId":"-"},"content":""},{"lineNumber":1138,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1139,"author":{"gitId":"-"},"content":""},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1144,"author":{"gitId":"-"},"content":""},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found."},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1147,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1148,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found."},{"lineNumber":1149,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1150,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1151,"author":{"gitId":"-"},"content":""},{"lineNumber":1152,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person"},{"lineNumber":1154,"author":{"gitId":"-"},"content":""},{"lineNumber":1155,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1156,"author":{"gitId":"-"},"content":""},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons"},{"lineNumber":1158,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1159,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list"},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person."},{"lineNumber":1161,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person."},{"lineNumber":1162,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1163,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1164,"author":{"gitId":"-"},"content":""},{"lineNumber":1165,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1166,"author":{"gitId":"-"},"content":""},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1171,"author":{"gitId":"-"},"content":""},{"lineNumber":1172,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid."},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1174,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1175,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1178,"author":{"gitId":"-"},"content":""},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid."},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1181,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1182,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message."},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1184,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1185,"author":{"gitId":"-"},"content":""},{"lineNumber":1186,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail."},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1188,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made."},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1191,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1192,"author":{"gitId":"-"},"content":""},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps"},{"lineNumber":1195,"author":{"gitId":"-"},"content":""},{"lineNumber":1196,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1197,"author":{"gitId":"-"},"content":""},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps"},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo"},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone."},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1204,"author":{"gitId":"-"},"content":""},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1206,"author":{"gitId":"-"},"content":""},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands."},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1210,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands."},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3."},{"lineNumber":1214,"author":{"gitId":"-"},"content":""},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands."},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands."},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3"},{"lineNumber":1222,"author":{"gitId":"-"},"content":""},{"lineNumber":1223,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort"},{"lineNumber":1225,"author":{"gitId":"-"},"content":""},{"lineNumber":1226,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1227,"author":{"gitId":"-"},"content":""},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria"},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria"},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message."},{"lineNumber":1231,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1232,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1233,"author":{"gitId":"-"},"content":""},{"lineNumber":1234,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1235,"author":{"gitId":"-"},"content":""},{"lineNumber":1236,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1237,"author":{"gitId":"-"},"content":"* 2a. The list is empty."},{"lineNumber":1238,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1239,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1240,"author":{"gitId":"-"},"content":""},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid."},{"lineNumber":1242,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1243,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message."},{"lineNumber":1245,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1."},{"lineNumber":1247,"author":{"gitId":"-"},"content":""},{"lineNumber":1248,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1249,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements"},{"lineNumber":1250,"author":{"gitId":"-"},"content":""},{"lineNumber":1251,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed."},{"lineNumber":1252,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage."},{"lineNumber":1253,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse."},{"lineNumber":1254,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure."},{"lineNumber":1255,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse."},{"lineNumber":1256,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0."},{"lineNumber":1257,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing."},{"lineNumber":1258,"author":{"gitId":"-"},"content":""},{"lineNumber":1259,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1260,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary"},{"lineNumber":1261,"author":{"gitId":"-"},"content":""},{"lineNumber":1262,"author":{"gitId":"-"},"content":"[[mainstream-os]]"},{"lineNumber":1263,"author":{"gitId":"-"},"content":"Mainstream OS"},{"lineNumber":1264,"author":{"gitId":"-"},"content":""},{"lineNumber":1265,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1266,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X"},{"lineNumber":1267,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1268,"author":{"gitId":"-"},"content":""},{"lineNumber":1269,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]"},{"lineNumber":1270,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible"},{"lineNumber":1271,"author":{"gitId":"-"},"content":""},{"lineNumber":1272,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1273,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data."},{"lineNumber":1274,"author":{"gitId":"-"},"content":"...."},{"lineNumber":1275,"author":{"gitId":"-"},"content":""},{"lineNumber":1276,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1277,"author":{"gitId":"-"},"content":"\u003d\u003d Product Survey"},{"lineNumber":1278,"author":{"gitId":"-"},"content":""},{"lineNumber":1279,"author":{"gitId":"-"},"content":"*Product Name*"},{"lineNumber":1280,"author":{"gitId":"-"},"content":""},{"lineNumber":1281,"author":{"gitId":"-"},"content":"Author: ..."},{"lineNumber":1282,"author":{"gitId":"-"},"content":""},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Pros:"},{"lineNumber":1284,"author":{"gitId":"-"},"content":""},{"lineNumber":1285,"author":{"gitId":"-"},"content":"* ..."},{"lineNumber":1286,"author":{"gitId":"-"},"content":"* ..."},{"lineNumber":1287,"author":{"gitId":"-"},"content":""},{"lineNumber":1288,"author":{"gitId":"-"},"content":"Cons:"},{"lineNumber":1289,"author":{"gitId":"-"},"content":""},{"lineNumber":1290,"author":{"gitId":"-"},"content":"* ..."},{"lineNumber":1291,"author":{"gitId":"-"},"content":"* ..."}],"authorContributionMap":{"charlesgoh":130,"jeffreygohkw":140,"Esilocke":169,"-":852}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:"},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT`"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Overview"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"Address++ is an address book application that can store contacts, as well as maintain a list of ongoing tasks. You can use the various commands in Address++ to maintain, create, and delete your contacts, or tasks. +"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"Address++ is targeted at NUS students, such as those working on projects or assignments."},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer."},{"lineNumber":30,"author":{"gitId":"-"},"content":"+"},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":34,"author":{"gitId":"-"},"content":"+"},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here]."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++."},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds."},{"lineNumber":38,"author":{"gitId":"-"},"content":"+"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]"},{"lineNumber":40,"author":{"gitId":"-"},"content":"+"},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +"},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window."},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window"},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++."},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list"},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`."},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`."},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc."},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable."},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too large?"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"You can change the font sizes by clicking on the Font Size button and selecting any of the following options:"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"Keyboard shortcuts have been provided for your convenience."},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"There is a limit to how much your font sizes can increase or decrease. Also, font sizes will increase for the"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"contacts entries and the todo list\u0027s entries."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"Format: `help` +"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1]."},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a person/task: `add`"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book, be it a newly met project member, or your friend who is taking the same module as you. +"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"`add` can be replaced by `a` for faster input. +"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] r/[REMARK] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address` or `Remark` to be private by placing a `p` in front of the prefix. +"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears`"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"* `add n/Betsy Crowe t/friend e/betsycrowe@example.com b/29-02-1996 a/Newgate Prison p/1234567 t/criminal r/Stares at the wall`"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"* `add n/Ima Hidearu b/ a/ e/ p/ r/ t/secretive`"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"* `add n/Luke Groundswimmer p/ a/ e/ c/`"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"* `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate c/`"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"By adding the word `task`, you can use the same command to add a new task or deadline, such as a reminder of project deadlines. +"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"Format: `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"* Task deadlines should be in the format DD-MM-YYYY +"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 1 to 5 inclusive, with 5 being the highest priority +"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default."},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"* `add task n/Update documentation d/Update docs for V1.1 for CS2103T t/10-10-2017 p/4`"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"* `add task n/Buy new pencil p/2`"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a tag to persons : `addtag` (Since V1.2)"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":"You can use the `addtag` command to add tag for multiple persons in the address book. For example, you may wish to add tag `friends` to the first two persons in the address book. +"},{"lineNumber":130,"author":{"gitId":"-"},"content":"`addtag` can be replaced by `atag` for faster input. +"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"Format: `addtag INDEX... t/[TAG]` +"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":"****"},{"lineNumber":135,"author":{"gitId":"-"},"content":"* You can add the tag of the person at the specific `INDEX`."},{"lineNumber":136,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":137,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":138,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, addtag will add the tag to all contacts in the address book."},{"lineNumber":139,"author":{"gitId":"-"},"content":"****"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":144,"author":{"gitId":"-"},"content":"`addtag 1 2 t/friends` +"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"Adds the friends tag of the 1st and 2nd person in the address book."},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"`addtag t/acquaintance` +"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Adds the acquaintance tag to all contacts in the address book."},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all persons : `list`"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts, or tasks, in the address book. +"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"Format: `list` +"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"Instead of typing out `list` every time, you can alternatively use `l` to shorten the command."},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing a person : `edit`"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":"****"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command."},{"lineNumber":167,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values."},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands."},{"lineNumber":169,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it."},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command."},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message."},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields."},{"lineNumber":173,"author":{"gitId":"-"},"content":"****"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com` +"},{"lineNumber":178,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively."},{"lineNumber":179,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/` +"},{"lineNumber":180,"author":{"gitId":"-"},"content":"Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags."},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"* `edit 1 p/` +"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Removes the phone number of the 1st person."},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `edit` will allow you to edit task details instead. You may wish to edit your task deadlines, for example, when your project schedule changes, or your task priorities, when a task becomes more urgent. +"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"Format: `edit task INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY]` +"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided."},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values."},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/5` +"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"Edits the priority of the 2nd task to be `5`."},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/ t/` +"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"Removes the priority and deadline of the second task."},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edittag` (Since v1.2)"},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"You can use `edittag` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"`edittag` can be replaced by `et` for faster input. +"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"Format: `edittag TAGTOBERENAMED NEWTAGNAME` +"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":"****"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different."},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `TAGTOBERENAMED` value."},{"lineNumber":210,"author":{"gitId":"-"},"content":"****"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"* `edittag friends enemies` +"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"Changes the tag called `friends` to one called `enemies` instead. All existing contacts with a `friends` tag will now have an `enemies` tag instead."},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS]`"},{"lineNumber":221,"author":{"gitId":"-"},"content":"Shorthand commands: `cp`"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields."},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix."},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI."},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI."},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy."},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting."},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"Examples:"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"* `changeprivacy 1 p/false e/true` +"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Sets the phone number of the 1st person to be public and their email address to be private. The 1st person\u0027s phone number will be displayed, if available, while their email address will be hidden in the UI."},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":"* `cp 2 a/false n/true e/false` +"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":"Sets the address and email of the 2nd person to be public and their name to be private. The 2nd person\u0027s address and email will be displayed, if available, while their name will be hidden in the UI."},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":""},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)"},{"lineNumber":242,"author":{"gitId":"-"},"content":""},{"lineNumber":243,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite persons. For example, you may wish to set your girlfriend as your favourite contact. +"},{"lineNumber":244,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +"},{"lineNumber":245,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +"},{"lineNumber":246,"author":{"gitId":"-"},"content":""},{"lineNumber":247,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":248,"author":{"gitId":"-"},"content":""},{"lineNumber":249,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":250,"author":{"gitId":"-"},"content":"`favourite 2` +"},{"lineNumber":251,"author":{"gitId":"-"},"content":"Favourites the 2nd person in the address book."},{"lineNumber":252,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":253,"author":{"gitId":"-"},"content":"`favourite 1` +"},{"lineNumber":254,"author":{"gitId":"-"},"content":"Favourite the 1st person in the results of the `find` command."},{"lineNumber":255,"author":{"gitId":"-"},"content":""},{"lineNumber":256,"author":{"gitId":"-"},"content":"****"},{"lineNumber":257,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`."},{"lineNumber":258,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":259,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":260,"author":{"gitId":"-"},"content":"****"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)"},{"lineNumber":263,"author":{"gitId":"-"},"content":""},{"lineNumber":264,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +"},{"lineNumber":265,"author":{"gitId":"-"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +"},{"lineNumber":266,"author":{"gitId":"-"},"content":"Format: `showfavourite` +"},{"lineNumber":267,"author":{"gitId":"-"},"content":""},{"lineNumber":268,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":270,"author":{"gitId":"-"},"content":"`showfavourite` command: It will return an empty list if there is no favourite persons."},{"lineNumber":271,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":272,"author":{"gitId":"-"},"content":""},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":"* `find John` +"},{"lineNumber":282,"author":{"gitId":"-"},"content":"Returns `john` and `John Doe`"},{"lineNumber":283,"author":{"gitId":"-"},"content":"* `find Betsy Tim John` +"},{"lineNumber":284,"author":{"gitId":"-"},"content":"Returns any person having names `Betsy`, `Tim`, or `John`"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `find` will allow you to sieve through your tasks, instead of your contacts. +"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"In addition to searching the name and description of tasks, you can also opt to filter your tasks by their priority. Simply include `p/PRIORITY` after all your other criteria to do so. +"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"All tasks with a priority higher than or equal to the value provided will be shown. +"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"Format: `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` (Priority search to be coming in v2.0) +"},{"lineNumber":290,"author":{"gitId":"-"},"content":""},{"lineNumber":291,"author":{"gitId":"-"},"content":"****"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"*Important note on `find` criteria*"},{"lineNumber":293,"author":{"gitId":"-"},"content":""},{"lineNumber":294,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`"},{"lineNumber":295,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`"},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"* You can only search for names in Address++"},{"lineNumber":297,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`"},{"lineNumber":298,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`"},{"lineNumber":299,"author":{"gitId":"-"},"content":"****"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"Returns any task that has the word `update` in their names or descriptions"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* `find task update 4` +"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"Returns all tasks that has the word `update` in their names or descriptions"},{"lineNumber":307,"author":{"gitId":"-"},"content":""},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `findtag` (Since V1.4)"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":"You can use the `findtag` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +"},{"lineNumber":311,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/not` in front of the `friends`. +"},{"lineNumber":312,"author":{"gitId":"-"},"content":"`findtag` can be replaced by `ftag` for faster input. +"},{"lineNumber":313,"author":{"gitId":"-"},"content":"Format: `findtag KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":314,"author":{"gitId":"-"},"content":""},{"lineNumber":315,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":"* `findtag friends` +"},{"lineNumber":318,"author":{"gitId":"-"},"content":"Returns any persons having tag `friends`"},{"lineNumber":319,"author":{"gitId":"-"},"content":"* `findtag friends colleagues` +"},{"lineNumber":320,"author":{"gitId":"-"},"content":"Returns any person having tags `friends` or `colleagues`"},{"lineNumber":321,"author":{"gitId":"-"},"content":"* `findtag /notfriends` +"},{"lineNumber":322,"author":{"gitId":"-"},"content":"Returns any persons not have tag `friends`"},{"lineNumber":323,"author":{"gitId":"-"},"content":"* `findtag classmates /notfriends` +"},{"lineNumber":324,"author":{"gitId":"-"},"content":"Returns any person have tags `classmates` but not have tag `friends`"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":"****"},{"lineNumber":327,"author":{"gitId":"-"},"content":"*Important note on `findtag` criteria"},{"lineNumber":328,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`"},{"lineNumber":329,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`"},{"lineNumber":330,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons."},{"lineNumber":331,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `friend` will not match `friends`"},{"lineNumber":332,"author":{"gitId":"-"},"content":"* There is no space `/not` and tag name e.g. `/not friends` will not match `/notfriends`"},{"lineNumber":333,"author":{"gitId":"-"},"content":"****"},{"lineNumber":334,"author":{"gitId":"-"},"content":""},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`"},{"lineNumber":336,"author":{"gitId":"-"},"content":""},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts or tasks from the address book. The `delete` command will help you clean up obsolete or completed tasks, or contacts who you may not wish to associate with anymore. +"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +"},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +"},{"lineNumber":340,"author":{"gitId":"-"},"content":""},{"lineNumber":341,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":342,"author":{"gitId":"-"},"content":""},{"lineNumber":343,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":344,"author":{"gitId":"-"},"content":"`delete 2` +"},{"lineNumber":345,"author":{"gitId":"-"},"content":"Deletes the 2nd person in the address book."},{"lineNumber":346,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":347,"author":{"gitId":"-"},"content":"`delete 1` +"},{"lineNumber":348,"author":{"gitId":"-"},"content":"Deletes the 1st person in the results of the `find` command."},{"lineNumber":349,"author":{"gitId":"-"},"content":""},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"In order to delete tasks, an additional `task` keyword must be specified after the `delete` command. +"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Format: `delete task INDEX`+"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"* Deletes the person or task at the specified `INDEX`."},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"`delete task 2` +"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Deletes the 2nd task in the address book."},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"`delete task 1` +"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"Deletes the 1st task in the results of the `find task` command."},{"lineNumber":367,"author":{"gitId":"-"},"content":""},{"lineNumber":368,"author":{"gitId":"-"},"content":""},{"lineNumber":369,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `deletetag` (Since V1.2)"},{"lineNumber":370,"author":{"gitId":"-"},"content":""},{"lineNumber":371,"author":{"gitId":"-"},"content":"You can use `deletetag` to delete the tag of multiple persons from the address book. +"},{"lineNumber":372,"author":{"gitId":"-"},"content":"`deletetag` can be replaced by `dtag` for faster input. +"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"Format: `deletetag INDEX... t/[TAG]` +"},{"lineNumber":374,"author":{"gitId":"-"},"content":""},{"lineNumber":375,"author":{"gitId":"-"},"content":""},{"lineNumber":376,"author":{"gitId":"-"},"content":"****"},{"lineNumber":377,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`."},{"lineNumber":378,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":379,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":380,"author":{"gitId":"-"},"content":"* If you do not key in any index, deletetag will delete the tag from all contacts in the address book."},{"lineNumber":381,"author":{"gitId":"-"},"content":"****"},{"lineNumber":382,"author":{"gitId":"-"},"content":""},{"lineNumber":383,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":386,"author":{"gitId":"-"},"content":"`deletetag 1 2 t/friends` +"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag of the 1st and 2nd person in the address book."},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"`deletetag t/friends` +"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag from all contacts in the address book."},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sorting your contact list : `sort`"},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts by any field in ascending or descending order using the `sort` command +"},{"lineNumber":395,"author":{"gitId":"-"},"content":"`sort` can be replaced by `so` for faster input. +"},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":"Format: `sort FIELD ORDER` +"},{"lineNumber":397,"author":{"gitId":"-"},"content":""},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":400,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":401,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contact by any field in either ascending or descending order"},{"lineNumber":402,"author":{"gitId":"jeffreygohkw"},"content":"* Field parameters are limited to the following fields: NAME, PHONE, EMAIL, ADDRESS."},{"lineNumber":403,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC."},{"lineNumber":404,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts"},{"lineNumber":405,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":406,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":407,"author":{"gitId":"jeffreygohkw"},"content":"Examples:"},{"lineNumber":408,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":409,"author":{"gitId":"jeffreygohkw"},"content":"* `sort name asc` +"},{"lineNumber":410,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in ascending order by the name field."},{"lineNumber":411,"author":{"gitId":"jeffreygohkw"},"content":"* `sort address desc` +"},{"lineNumber":412,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in descending order by the address field."},{"lineNumber":413,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":414,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Backing up your data : `backup`"},{"lineNumber":415,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":416,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +"},{"lineNumber":417,"author":{"gitId":"-"},"content":"`backup` can be replaced by `bk` for faster input. +"},{"lineNumber":418,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [RELATIVE LOCATION]` +"},{"lineNumber":419,"author":{"gitId":"-"},"content":""},{"lineNumber":420,"author":{"gitId":"-"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":"****"},{"lineNumber":422,"author":{"gitId":"charlesgoh"},"content":"* Allows you to backup your saved data on Address++ in another file."},{"lineNumber":423,"author":{"gitId":"charlesgoh"},"content":"* You can backup your data in the default location or you can specify your desired save location."},{"lineNumber":424,"author":{"gitId":"charlesgoh"},"content":"* You can use the default save name or use your own."},{"lineNumber":425,"author":{"gitId":"-"},"content":"****"},{"lineNumber":426,"author":{"gitId":"-"},"content":""},{"lineNumber":427,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":428,"author":{"gitId":"-"},"content":""},{"lineNumber":429,"author":{"gitId":"charlesgoh"},"content":"* `backup` or `bk` +"},{"lineNumber":430,"author":{"gitId":"charlesgoh"},"content":"This command will help you back up in the default save location --\u003e In the data directory of your application."},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":"* `backup ./test.xml` or `bk ./test.xml` +"},{"lineNumber":432,"author":{"gitId":"charlesgoh"},"content":"This saves the backup file in the current data directory, with the name `test.xml`."},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`"},{"lineNumber":435,"author":{"gitId":"-"},"content":""},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact or task, and look at it in greater detail, such as examining a task with a very long description, or checking out the full address of one of your friends. +"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"Format (person): `select INDEX` +"},{"lineNumber":439,"author":{"gitId":"-"},"content":""},{"lineNumber":440,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":443,"author":{"gitId":"-"},"content":"`select 2` +"},{"lineNumber":444,"author":{"gitId":"-"},"content":"Selects the 2nd person in the address book."},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":446,"author":{"gitId":"-"},"content":"`select 1` +"},{"lineNumber":447,"author":{"gitId":"-"},"content":"Selects the 1st person in the results of the `find` command."},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"To select a task, a `task` keyword must additionally be specified after `select` +"},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Format: `select task INDEX` +"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Selecting a task will load a list of the people who are assigned to it, instead of the Google search page."},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"`select task 2` +"},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Selects the 2nd task in the address book."},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"`select task 1` +"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"Selects the 1st task in the results of the `find task` command."},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)"},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +"},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +"},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +"},{"lineNumber":472,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":473,"author":{"gitId":"jeffreygohkw"},"content":"Examples:"},{"lineNumber":474,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":475,"author":{"gitId":"jeffreygohkw"},"content":"* `list` +"},{"lineNumber":476,"author":{"gitId":"jeffreygohkw"},"content":"`locate 2` +"},{"lineNumber":477,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 2nd person in the address book on Google Maps."},{"lineNumber":478,"author":{"gitId":"jeffreygohkw"},"content":"* `find Betsy` +"},{"lineNumber":479,"author":{"gitId":"jeffreygohkw"},"content":"`locate 1` +"},{"lineNumber":480,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 1st person in the results of the `find` command on Google Maps."},{"lineNumber":481,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":482,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":483,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +"},{"lineNumber":484,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide a specific and valid address."},{"lineNumber":485,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps."},{"lineNumber":486,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":487,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":488,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":489,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Mark task as complete : `setcomplete` (To be coming in V2.0)"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +"},{"lineNumber":494,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +"},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed."},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"`setcomplete 2` +"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as completed."},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"`setcomplete 1` +"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as completed."},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Mark task as incomplete : `setincomplete` (To be coming in V2.0)"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +"},{"lineNumber":515,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +"},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete."},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"* `list task` +"},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"`setincomplete 2` +"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as incomplete."},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"* `find task update` +"},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"`setincomplete 1` +"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as incomplete."},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign contacts to task : `assign` (Since V1.4)"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"`list task` +"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"`assign 1 4 5 to/2` +"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"Assigns the 1st, 4th and 5th contacts to 2nd task in the address book."},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"`find task update` +"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"`assign 2 to/1` +"},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Assigns the 2nd person in the address book to the 1st task in the results of the `find task` command."},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismiss contacts from task : `dismiss` (Since V1.4)"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":558,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"Examples:"},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"`list task` +"},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"`dismiss 1 4 5 from/2` +"},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"Dismisses 1st, 4th and 5th contacts in the address book from the 2nd task."},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"* `list` +"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"`find task update` +"},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"`dismiss 2 from/1` +"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"Dismisses the 2nd person in the address book from the 1st task in the results of the `find task` command."},{"lineNumber":579,"author":{"gitId":"-"},"content":""},{"lineNumber":580,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`"},{"lineNumber":581,"author":{"gitId":"-"},"content":""},{"lineNumber":582,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +"},{"lineNumber":583,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +"},{"lineNumber":584,"author":{"gitId":"-"},"content":"Format: `history` +"},{"lineNumber":585,"author":{"gitId":"-"},"content":""},{"lineNumber":586,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":588,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box."},{"lineNumber":589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":592,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`"},{"lineNumber":593,"author":{"gitId":"-"},"content":""},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +"},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +"},{"lineNumber":596,"author":{"gitId":"-"},"content":"Format: `undo` +"},{"lineNumber":597,"author":{"gitId":"-"},"content":""},{"lineNumber":598,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":599,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":600,"author":{"gitId":"-"},"content":"Undoable commands: those commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`)."},{"lineNumber":601,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":602,"author":{"gitId":"-"},"content":""},{"lineNumber":603,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":604,"author":{"gitId":"-"},"content":""},{"lineNumber":605,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":606,"author":{"gitId":"-"},"content":"`list` +"},{"lineNumber":607,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":608,"author":{"gitId":"-"},"content":""},{"lineNumber":609,"author":{"gitId":"-"},"content":"* `select 1` +"},{"lineNumber":610,"author":{"gitId":"-"},"content":"`list` +"},{"lineNumber":611,"author":{"gitId":"-"},"content":"`undo` +"},{"lineNumber":612,"author":{"gitId":"-"},"content":"The `undo` command fails as there are no undoable commands executed previously."},{"lineNumber":613,"author":{"gitId":"-"},"content":""},{"lineNumber":614,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":615,"author":{"gitId":"-"},"content":"`clear` +"},{"lineNumber":616,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +"},{"lineNumber":617,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":618,"author":{"gitId":"-"},"content":""},{"lineNumber":619,"author":{"gitId":"-"},"content":""},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)"},{"lineNumber":621,"author":{"gitId":"-"},"content":""},{"lineNumber":622,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +"},{"lineNumber":623,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +"},{"lineNumber":624,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +"},{"lineNumber":625,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +"},{"lineNumber":626,"author":{"gitId":"-"},"content":""},{"lineNumber":627,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":628,"author":{"gitId":"-"},"content":""},{"lineNumber":629,"author":{"gitId":"-"},"content":"* `list` +"},{"lineNumber":630,"author":{"gitId":"-"},"content":"`unfavourite 2` +"},{"lineNumber":631,"author":{"gitId":"-"},"content":"Unfavourites the 2nd person in the address book."},{"lineNumber":632,"author":{"gitId":"-"},"content":"* `find Betsy` +"},{"lineNumber":633,"author":{"gitId":"-"},"content":"`unfavourite 1` +"},{"lineNumber":634,"author":{"gitId":"-"},"content":"Unfavourite the 1st person in the results of the `find` command."},{"lineNumber":635,"author":{"gitId":"-"},"content":""},{"lineNumber":636,"author":{"gitId":"-"},"content":"****"},{"lineNumber":637,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`."},{"lineNumber":638,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":639,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":640,"author":{"gitId":"-"},"content":"****"},{"lineNumber":641,"author":{"gitId":"-"},"content":""},{"lineNumber":642,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`"},{"lineNumber":643,"author":{"gitId":"-"},"content":""},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` wasn\u0027t necessary. `redo` reverses the most recent `undo` command. +"},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +"},{"lineNumber":646,"author":{"gitId":"-"},"content":"Format: `redo` +"},{"lineNumber":647,"author":{"gitId":"-"},"content":""},{"lineNumber":648,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":649,"author":{"gitId":"-"},"content":""},{"lineNumber":650,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":651,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":652,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +"},{"lineNumber":653,"author":{"gitId":"-"},"content":""},{"lineNumber":654,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":655,"author":{"gitId":"-"},"content":"`redo` +"},{"lineNumber":656,"author":{"gitId":"-"},"content":"The `redo` command fails as there are no `undo` commands executed previously."},{"lineNumber":657,"author":{"gitId":"-"},"content":""},{"lineNumber":658,"author":{"gitId":"-"},"content":"* `delete 1` +"},{"lineNumber":659,"author":{"gitId":"-"},"content":"`clear` +"},{"lineNumber":660,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +"},{"lineNumber":661,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +"},{"lineNumber":662,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +"},{"lineNumber":663,"author":{"gitId":"-"},"content":"`redo` (reapplies the `clear` command) +"},{"lineNumber":664,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":665,"author":{"gitId":"-"},"content":""},{"lineNumber":666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`"},{"lineNumber":667,"author":{"gitId":"-"},"content":""},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +"},{"lineNumber":669,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +"},{"lineNumber":670,"author":{"gitId":"-"},"content":"Format: `clear` +"},{"lineNumber":671,"author":{"gitId":"-"},"content":""},{"lineNumber":672,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`"},{"lineNumber":673,"author":{"gitId":"-"},"content":""},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +"},{"lineNumber":675,"author":{"gitId":"-"},"content":"Format: `exit`"},{"lineNumber":676,"author":{"gitId":"-"},"content":""},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4]."},{"lineNumber":678,"author":{"gitId":"-"},"content":""},{"lineNumber":679,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data"},{"lineNumber":680,"author":{"gitId":"-"},"content":""},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +"},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually."},{"lineNumber":683,"author":{"gitId":"-"},"content":""},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window."},{"lineNumber":685,"author":{"gitId":"-"},"content":""},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window."},{"lineNumber":687,"author":{"gitId":"-"},"content":""},{"lineNumber":688,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Using the browser"},{"lineNumber":689,"author":{"gitId":"-"},"content":""},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"If you click on a box containing a contact, an internet browser on the right side of the window."},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"* Performing a left click will allow you to perform a search on Google for the name of the contact, and is equivalent to doing a `select` on that oerson."},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":"* If a person\u0027s name or address is set to private, the browser will not perform a search if you click on their box."},{"lineNumber":694,"author":{"gitId":"-"},"content":"* Right clicking on the browser will allow you to go to the previous or next page, as well as reload the page."},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Exporting the data"},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Address book data can be exported in a number of different formats, thus allowing the data to be compatible to any device."},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":701,"author":{"gitId":"-"},"content":"To export data, click on `File -\u003e Export As...` or use the keyboard shortcut kbd:[CTRL]+kbd:[E]` and select the new location and file name for the export file in the pop-up window."},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Auto-Complete: Learning Your Typing Habits"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"The program will learn your typing habits and give autocomplete suggestions that become more accurate over time."},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ"},{"lineNumber":708,"author":{"gitId":"-"},"content":""},{"lineNumber":709,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +"},{"lineNumber":710,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location."},{"lineNumber":711,"author":{"gitId":"-"},"content":""},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet"},{"lineNumber":713,"author":{"gitId":"-"},"content":""},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":715,"author":{"gitId":"-"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665, b/29-02-1996 f/SOC c/www.enteryourcalendarurlhere.com t/friend t/colleague`"},{"lineNumber":716,"author":{"gitId":"jeffreygohkw"},"content":"* *Add with private fields* : `add or a pn/NAME pp/PHONE_NUMBER pe/EMAIL pa/ADDRESS b/BIRTHDAY f/FACULTY c/[GOOGLE CALENDAR URL] [t/TAG]...` +"},{"lineNumber":717,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665`"},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +"},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"e.g. `add task n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high`"},{"lineNumber":720,"author":{"gitId":"-"},"content":"* *Add tag* : `addtag INDEX t/[TAG]` +"},{"lineNumber":721,"author":{"gitId":"-"},"content":"e.g. `addtag 1 2 t/friends`"},{"lineNumber":722,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE]` +"},{"lineNumber":723,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false`"},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"* *Clear person* : `clear`"},{"lineNumber":725,"author":{"gitId":"-"},"content":"* *Clear tasks* : `cleartask`"},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +"},{"lineNumber":727,"author":{"gitId":"-"},"content":"e.g. `delete 3`"},{"lineNumber":728,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task INDEX` +"},{"lineNumber":729,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task 4`"},{"lineNumber":730,"author":{"gitId":"-"},"content":"* *Delete tag* : `deletetag INDEX t/[TAG]` +"},{"lineNumber":731,"author":{"gitId":"-"},"content":"e.g. `deletetag 1 2 t/friends`"},{"lineNumber":732,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] c/[GOOGLE CALENDAR URL] [a/ADDRESS] [t/TAG]...` +"},{"lineNumber":733,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`"},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +"},{"lineNumber":735,"author":{"gitId":"-"},"content":"e.g. `edit task 2 p/veryhigh`"},{"lineNumber":736,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edittag TAGTOCHANGE NEWTAGNAME` +"},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"e.g. `edittag friends enemies`"},{"lineNumber":738,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +"},{"lineNumber":739,"author":{"gitId":"-"},"content":"e.g. `favourite 1`"},{"lineNumber":740,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +"},{"lineNumber":741,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`"},{"lineNumber":742,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +"},{"lineNumber":743,"author":{"gitId":"-"},"content":"e.g. `showfavourite`"},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":745,"author":{"gitId":"-"},"content":"e.g. `find James Jake`"},{"lineNumber":746,"author":{"gitId":"-"},"content":"* *Find tag* : `findtag Tag [MORE_TAGS]` +"},{"lineNumber":747,"author":{"gitId":"-"},"content":"e.g. `findtag friends`"},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +"},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"e.g. `find task update p/high`"},{"lineNumber":750,"author":{"gitId":"-"},"content":"* *Help* : `help`"},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"* *List persons* : `list`"},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":"* *List tasks* : `list task`"},{"lineNumber":753,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate`"},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +"},{"lineNumber":755,"author":{"gitId":"-"},"content":"e.g.`select 2`"},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task INDEX` +"},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"e.g.`select task 2`"},{"lineNumber":758,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +"},{"lineNumber":759,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`"},{"lineNumber":760,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +"},{"lineNumber":761,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`"},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +"},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`"},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +"},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`"},{"lineNumber":766,"author":{"gitId":"-"},"content":"* *History* : `history`"},{"lineNumber":767,"author":{"gitId":"-"},"content":"* *Undo* : `undo`"},{"lineNumber":768,"author":{"gitId":"-"},"content":"* *Redo* : `redo`"},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts"},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]"},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[[F1]"},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]"},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]"},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept"},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary."},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]"}],"authorContributionMap":{"charlesgoh":70,"jeffreygohkw":88,"Esilocke":252,"-":373}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 3, 0, true);"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());"},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model, storage);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book."},{"lineNumber":88,"author":{"gitId":"-"},"content":" */"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");"},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null."},{"lineNumber":117,"author":{"gitId":"-"},"content":" */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;"},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());"},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \""},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");"},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;"},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \""},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");"},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":169,"author":{"gitId":"-"},"content":" }"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(userPrefs);"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/"},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;"},{"lineNumber":13,"author":{"gitId":"-"},"content":" }"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user."},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution."},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();"},{"lineNumber":31,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model, Storage storage) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");"},{"lineNumber":49,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" Command command \u003d addressBookParser.parseCommand(commandText);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return result;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } finally {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" history.add(commandText);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":8,"-":63}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Adds a person or task to the address book."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \""},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Parameters: \""},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":34,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"PHONE \""},{"lineNumber":35,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \""},{"lineNumber":36,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"ADDRESS \""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \""},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":39,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \""},{"lineNumber":41,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \""},{"lineNumber":42,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \""},{"lineNumber":43,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \""},{"lineNumber":45,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"friends \""},{"lineNumber":46,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"owesMoney\";"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Adds a task to the address book. \""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"DESCRIPTION \""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"DEADLINE \""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"PRIORITY \""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \";"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_SUCCESS \u003d \"New task added: \\n%1$s\";"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private boolean isTask \u003d false;"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}"},{"lineNumber":71,"author":{"gitId":"-"},"content":" */"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public AddCommand(ReadOnlyPerson person) {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d null;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@Code ReadOnlyTask}"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d null;"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" isTask \u003d true;"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" if (isTask) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_TASK_SUCCESS, taskToAdd));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddCommand)) {"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } else if (taskToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).taskToAdd \u003d\u003d null) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert(personToAdd !\u003d null);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddCommand) other).personToAdd);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else if (personToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).personToAdd \u003d\u003d null) {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assert(taskToAdd !\u003d null);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddCommand) other).taskToAdd);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":60,"wangyiming1019":1,"-":58}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends UndoableCommand {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"addtag\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"atag\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all persons in the current list.\";"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends Command {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.io.IOException;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location."},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" ~/Desktop\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" super();"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(storage);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (args.equals(\"\")) {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBookDefault(model.getAddressBook());"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBook(model.getAddressBook(), args);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" } catch (IOException e) {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD;"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d person.getName();"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d person.getPhone();"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d person.getEmail();"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d person.getAddress();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Remark r \u003d person.getRemark();"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Boolean f \u003d person.getFavourite();"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e t \u003d person.getTags();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" n.setPrivate(pps.getNameIsPrivate());"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" p.setPrivate(pps.getPhoneIsPrivate());"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" e.setPrivate(pps.getEmailIsPrivate());"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" a.setPrivate(pps.getAddressIsPrivate());"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" r.setPrivate(pps.getRemarkIsPrivate());"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(n, p, e, a, f, r, t);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return index;"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person."},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null."},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of nameIsPrivate"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of phoneIsPrivate"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of emailIsPrivate"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of addressIsPrivate"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of remarkIsPrivate"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of remarkIsPrivate"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getRemarkIsPrivate() {"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" return remarkIsPrivate;"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remarkIsPrivate);"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":273}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Clears the address book."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"%s has been cleared!\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_PERSONS \u003d \"Contact list\";"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_TASKS \u003d \"Task list\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_ALL \u003d \"Address book\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private boolean isClearTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private boolean isClearPerson;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private boolean isClearAll;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Prefix type;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String cleared;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public ClearCommand() {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d true;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" type \u003d null;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_ALL;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public ClearCommand(Prefix type) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d true;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_TASK;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_TASKS;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d true;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_PERSON;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_PERSONS;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"An invalid type was provided!\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (isClearAll) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else if (isClearTask) {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } else if (isClearPerson) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assert false : \"At least one boolean must be true.\";"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, cleared));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public abstract class Command {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" protected MainWindow mainWindow;"},{"lineNumber":18,"author":{"gitId":"-"},"content":" protected CommandHistory history;"},{"lineNumber":19,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed"},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks."},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message."},{"lineNumber":43,"author":{"gitId":"-"},"content":" *"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command."},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * access to the dependencies."},{"lineNumber":53,"author":{"gitId":"-"},"content":" */"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a person or task identified using its last displayed index from the address book."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person or task identified by the index number used in the last listing.\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DELETE_TASK_SUCCESS \u003d \"Deleted Task: %1$s\";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_PERSON \u003d 0;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_TASK \u003d 1;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private int type;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public DeleteCommand(Index targetIndex, int objectType) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.type \u003d objectType;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_PERSON) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (targetIndex.getZeroBased() \u003e\u003d tasksList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_TASK) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (type \u003d\u003d DELETE_TYPE_PERSON) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TASK_SUCCESS, taskToDelete));"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex)"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.type \u003d\u003d ((DeleteCommand) other).type); // state check"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":28,"wangyiming1019":1,"-":47}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends UndoableCommand {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"deletetag\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"dtag\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"This is an nonexistent tag in the given persons list.\";"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons."},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list."},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends Command {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toDismiss)) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toDismiss);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Edits the details of an existing person or task in the address book."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \""},{"lineNumber":53,"author":{"gitId":"-"},"content":" + \"by the index number used in the last person listing. \""},{"lineNumber":54,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":55,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \""},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":63,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \""},{"lineNumber":64,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Edits the details of the task identified \""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: \\n%1$s\";"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TASK_SUCCESS \u003d \"Edited Task: \\n%1$s\";"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean areFieldsAllPrivate \u003d true;"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" private final Index index;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @param index of the person in the filtered person list to edit"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the person with"},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" requireNonNull(index);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.index \u003d index;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d null;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public EditCommand(Index index, EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d null;"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //TODO see if we can use Singleton pattern to handle the Descriptors."},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":127,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" }"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" if (isTask) {"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, editedTask));"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":145,"author":{"gitId":"-"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" }"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}."},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedTags);"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().isPrivate()) {"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().isPrivate()) {"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().isPrivate()) {"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().isPrivate()) {"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().isPrivate()) {"},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());"},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {"},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();"},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;"},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson"},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editTaskDescriptor}."},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" assert taskToEdit !\u003d null;"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" TaskName updatedTaskName;"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" Description updatedDescription;"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" Deadline updatedDeadline;"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" Priority updatedPriority;"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" Assignees assignees;"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updatedState;"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" // You cannot edit assignees or state using edit command"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" assignees \u003d taskToEdit.getAssignees();"},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" updatedState \u003d taskToEdit.getCompleteState();"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState);"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":361,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":362,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":363,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":364,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":365,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":366,"author":{"gitId":"-"},"content":" }"},{"lineNumber":367,"author":{"gitId":"-"},"content":""},{"lineNumber":368,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":369,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {"},{"lineNumber":370,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":371,"author":{"gitId":"-"},"content":" }"},{"lineNumber":372,"author":{"gitId":"-"},"content":""},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":" if (this.isTask !\u003d ((EditCommand) other).isTask) {"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":377,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" if (this.isTask) {"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":383,"author":{"gitId":"-"},"content":" }"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":386,"author":{"gitId":"-"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the"},{"lineNumber":387,"author":{"gitId":"-"},"content":" * corresponding field value of the person."},{"lineNumber":388,"author":{"gitId":"-"},"content":" */"},{"lineNumber":389,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {"},{"lineNumber":390,"author":{"gitId":"-"},"content":" private Name name;"},{"lineNumber":391,"author":{"gitId":"-"},"content":" private Phone phone;"},{"lineNumber":392,"author":{"gitId":"-"},"content":" private Email email;"},{"lineNumber":393,"author":{"gitId":"-"},"content":" private Address address;"},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" private Boolean favourite;"},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" private Remark remark;"},{"lineNumber":396,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;"},{"lineNumber":397,"author":{"gitId":"-"},"content":""},{"lineNumber":398,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}"},{"lineNumber":399,"author":{"gitId":"-"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {"},{"lineNumber":401,"author":{"gitId":"-"},"content":" this.name \u003d toCopy.name;"},{"lineNumber":402,"author":{"gitId":"-"},"content":" this.phone \u003d toCopy.phone;"},{"lineNumber":403,"author":{"gitId":"-"},"content":" this.email \u003d toCopy.email;"},{"lineNumber":404,"author":{"gitId":"-"},"content":" this.address \u003d toCopy.address;"},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d toCopy.favourite;"},{"lineNumber":406,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d toCopy.remark;"},{"lineNumber":407,"author":{"gitId":"-"},"content":" this.tags \u003d toCopy.tags;"},{"lineNumber":408,"author":{"gitId":"-"},"content":" }"},{"lineNumber":409,"author":{"gitId":"-"},"content":""},{"lineNumber":410,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":411,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited."},{"lineNumber":412,"author":{"gitId":"-"},"content":" */"},{"lineNumber":413,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":414,"author":{"gitId":"charlesgoh"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark, this.tags);"},{"lineNumber":415,"author":{"gitId":"-"},"content":" }"},{"lineNumber":416,"author":{"gitId":"-"},"content":""},{"lineNumber":417,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":418,"author":{"gitId":"-"},"content":" this.name \u003d name;"},{"lineNumber":419,"author":{"gitId":"-"},"content":" }"},{"lineNumber":420,"author":{"gitId":"-"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {"},{"lineNumber":422,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);"},{"lineNumber":423,"author":{"gitId":"-"},"content":" }"},{"lineNumber":424,"author":{"gitId":"-"},"content":""},{"lineNumber":425,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":426,"author":{"gitId":"-"},"content":" this.phone \u003d phone;"},{"lineNumber":427,"author":{"gitId":"-"},"content":" }"},{"lineNumber":428,"author":{"gitId":"-"},"content":""},{"lineNumber":429,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {"},{"lineNumber":430,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);"},{"lineNumber":431,"author":{"gitId":"-"},"content":" }"},{"lineNumber":432,"author":{"gitId":"-"},"content":""},{"lineNumber":433,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":434,"author":{"gitId":"-"},"content":" this.email \u003d email;"},{"lineNumber":435,"author":{"gitId":"-"},"content":" }"},{"lineNumber":436,"author":{"gitId":"-"},"content":""},{"lineNumber":437,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {"},{"lineNumber":438,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);"},{"lineNumber":439,"author":{"gitId":"-"},"content":" }"},{"lineNumber":440,"author":{"gitId":"-"},"content":""},{"lineNumber":441,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":442,"author":{"gitId":"-"},"content":" this.address \u003d address;"},{"lineNumber":443,"author":{"gitId":"-"},"content":" }"},{"lineNumber":444,"author":{"gitId":"-"},"content":""},{"lineNumber":445,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {"},{"lineNumber":446,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);"},{"lineNumber":447,"author":{"gitId":"-"},"content":" }"},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;"},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {"},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);"},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":457,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":458,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d remark;"},{"lineNumber":459,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":460,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":461,"author":{"gitId":"charlesgoh"},"content":" public Optional\u003cRemark\u003e getRemark() {"},{"lineNumber":462,"author":{"gitId":"charlesgoh"},"content":" return Optional.ofNullable(remark);"},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":465,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":466,"author":{"gitId":"-"},"content":" this.tags \u003d tags;"},{"lineNumber":467,"author":{"gitId":"-"},"content":" }"},{"lineNumber":468,"author":{"gitId":"-"},"content":""},{"lineNumber":469,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {"},{"lineNumber":470,"author":{"gitId":"-"},"content":" return Optional.ofNullable(tags);"},{"lineNumber":471,"author":{"gitId":"-"},"content":" }"},{"lineNumber":472,"author":{"gitId":"-"},"content":""},{"lineNumber":473,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":474,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":475,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":476,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":477,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":478,"author":{"gitId":"-"},"content":" }"},{"lineNumber":479,"author":{"gitId":"-"},"content":""},{"lineNumber":480,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":481,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {"},{"lineNumber":482,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":483,"author":{"gitId":"-"},"content":" }"},{"lineNumber":484,"author":{"gitId":"-"},"content":""},{"lineNumber":485,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":486,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;"},{"lineNumber":487,"author":{"gitId":"-"},"content":""},{"lineNumber":488,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())"},{"lineNumber":489,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())"},{"lineNumber":490,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())"},{"lineNumber":491,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())"},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())"},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())"},{"lineNumber":494,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags());"},{"lineNumber":495,"author":{"gitId":"-"},"content":" }"},{"lineNumber":496,"author":{"gitId":"-"},"content":" }"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task."},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;"},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":" private Description description;"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":" private Priority priority;"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;"},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited."},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority);"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;"},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {"},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);"},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {"},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {"},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);"},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {"},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;"},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())"},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())"},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority());"},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":199,"Esilocke":159,"wangyiming1019":14,"-":193}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"edittag\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"etag\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the specified tag \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(personToFavourite);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Finds and lists all persons or tasks in address book whose name contains any of the argument keywords."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive."},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \""},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Finds all tasks whose names or descriptions \""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d null;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public FindCommand(TaskContainsKeywordPredicate predicate) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d null;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (isTask) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof FindCommand)) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask !\u003d ((FindCommand) other).isTask) {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask) {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return this.taskPredicate.equals(((FindCommand) other).taskPredicate);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return this.personPredicate.equals(((FindCommand) other).personPredicate);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":36,"wangyiming1019":1,"-":30}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive."},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends Command {"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"findtag\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"ftag\";"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose tags contain any of \""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" friends colleagues\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person: %1$s\";"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().isPrivate()) {"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":58}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as complete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as incomplete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\"));"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons by chosen \""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS] and by order [ASC/DESC]. Case insensitive\\n\""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [FIELD] [ORDER]\\n\""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" email desc\";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All persons in address book successfully sorted\";"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private final String field;"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" private final String order;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String field, String order) {"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public String getField() {"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return this.field;"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return this.order;"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":48,"jeffreygohkw":2,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.unfavouritePerson(personToUnfavourite);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object"},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution."},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" PREFIX_REMARK_PRIVATE, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE,"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" PREFIX_EMAIL_PRIVATE, PREFIX_ADDRESS_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_DEADLINE,"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" PREFIX_DESCRIPTION, PREFIX_PRIORITY, PREFIX_TASK);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d constructTask(args);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(taskToAdd);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d constructPerson(args);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(personToAdd);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided."},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" private static ReadOnlyPerson constructPerson(String args) throws ParseException {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PHONE)"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)))) {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_EMAIL)"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)))) {"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_ADDRESS)"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)))) {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_REMARK)"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)))) {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, tagList);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided."},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyTask constructTask(String args) throws ParseException {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY);"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION))) {"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DEADLINE))) {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PRIORITY))) {"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" TaskName name;"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Description description;"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" Priority priority;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" description \u003d ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get();"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" deadline \u003d ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get();"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" priority \u003d ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get();"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d new Task(name, description, deadline, priority);"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return task;"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":83,"Esilocke":69,"-":35}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser implements Parser\u003cAddTagCommand\u003e {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution."},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":70}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses user input."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class AddressBookParser {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Parses user input into command for execution."},{"lineNumber":51,"author":{"gitId":"-"},"content":" *"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @param userInput full user input string"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @return the command based on the user input"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":55,"author":{"gitId":"-"},"content":" */"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public Command parseCommand(String userInput) throws ParseException {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");"},{"lineNumber":64,"author":{"gitId":"-"},"content":" switch (commandWord) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_WORD:"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_ALIAS:"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommandParser().parse(arguments);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:"},{"lineNumber":88,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_WORD:"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_ALIAS:"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(arguments);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" case SelectCommand.COMMAND_ALIAS:"},{"lineNumber":103,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_WORD:"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_ALIAS:"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommandParser().parse(arguments);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:"},{"lineNumber":111,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_WORD:"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_ALIAS:"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommandParser().parse(arguments);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_WORD:"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_ALIAS:"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommandParser().parse(arguments);"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":143,"author":{"gitId":"-"},"content":" return new ListCommand();"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:"},{"lineNumber":147,"author":{"gitId":"-"},"content":" return new HistoryCommand();"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":150,"author":{"gitId":"-"},"content":" return new ExitCommand();"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":153,"author":{"gitId":"-"},"content":" return new HelpCommand();"},{"lineNumber":154,"author":{"gitId":"-"},"content":""},{"lineNumber":155,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:"},{"lineNumber":157,"author":{"gitId":"-"},"content":" return new UndoCommand();"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:"},{"lineNumber":161,"author":{"gitId":"-"},"content":" return new RedoCommand();"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":9,"Esilocke":25,"wangyiming1019":41,"-":91}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String."},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * filepath."},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":18}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditCommand object"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_PERSON);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_TASK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person\");"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task\");"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"pri/\");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"Esilocke":6,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(filteredString.trim());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_PERSON);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":36,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":12,"-":28}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution."},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":67}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String."},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object"},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(args);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return constructTaskDescriptor(args);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return constructPersonDescriptor(args);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Person object. **/"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructPersonDescriptor(String args) throws ParseException {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" Index index;"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor \u003d new EditPersonDescriptor();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" return new EditCommand(index, editPersonDescriptor);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Task object. **/"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructTaskDescriptor(String args) throws ParseException {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor \u003d new EditTaskDescriptor();"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return new EditCommand(index, editTaskDescriptor);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty."},{"lineNumber":116,"author":{"gitId":"-"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * {@code Set\u003cTag\u003e} containing zero tags."},{"lineNumber":118,"author":{"gitId":"-"},"content":" */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assert tags !\u003d null;"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" if (tags.isEmpty()) {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return Optional.empty();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":47,"-":78}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return tagList;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":30,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" trimmedArgs \u003d argsWithNoTaskPrefix.trim();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_TASK_USAGE));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return new FindCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords)));"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":14,"-":31}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new SelectCommand object"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an SelectCommand object for execution."},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes."},{"lineNumber":26,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type."},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods."},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class ParserUtil {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * trimmed."},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer)."},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":54,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":55,"author":{"gitId":"-"},"content":" */"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Name to be private if true."},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":73,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":74,"author":{"gitId":"-"},"content":" */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" requireNonNull(phone);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Phone to be private if true."},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":92,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":93,"author":{"gitId":"-"},"content":" */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" requireNonNull(address);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Address to be private if true."},{"lineNumber":102,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" * Takes in a (@code boolean isPrivate) which will set the Remark to be private if true."},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" throws IllegalValueException {"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":134,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":135,"author":{"gitId":"-"},"content":" */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" requireNonNull(email);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Email to be private if true."},{"lineNumber":144,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" requireNonNull(email);"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();"},{"lineNumber":149,"author":{"gitId":"-"},"content":" }"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(tags);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" for (String tagName : tags) {"},{"lineNumber":158,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":" return tagSet;"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present."},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present."},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present."},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present."},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":29,"Esilocke":39,"-":104}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 0;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 1;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution."},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 2) {"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"},{"lineNumber":42,"author":{"gitId":"-"},"content":" *"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}"},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":91,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}."},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":118,"author":{"gitId":"-"},"content":" //// person-level operations"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Adds a person to the address book."},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,"},{"lineNumber":123,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}."},{"lineNumber":124,"author":{"gitId":"-"},"content":" *"},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists."},{"lineNumber":126,"author":{"gitId":"-"},"content":" */"},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":131,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":132,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":133,"author":{"gitId":"-"},"content":" persons.add(newPerson);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}."},{"lineNumber":138,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}."},{"lineNumber":139,"author":{"gitId":"-"},"content":" *"},{"lineNumber":140,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":142,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":143,"author":{"gitId":"-"},"content":" *"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)"},{"lineNumber":147,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":148,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);"},{"lineNumber":151,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":153,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":154,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":155,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}."},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);"},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}."},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);"},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":186,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:"},{"lineNumber":188,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":190,"author":{"gitId":"-"},"content":" */"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());"},{"lineNumber":193,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list"},{"lineNumber":196,"author":{"gitId":"-"},"content":" // used for checking person tag references"},{"lineNumber":197,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();"},{"lineNumber":198,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list."},{"lineNumber":201,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();"},{"lineNumber":202,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));"},{"lineNumber":203,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:"},{"lineNumber":208,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":209,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":210,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":211,"author":{"gitId":"-"},"content":" */"},{"lineNumber":212,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":218,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":219,"author":{"gitId":"-"},"content":" */"},{"lineNumber":220,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {"},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {"},{"lineNumber":222,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":223,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":225,"author":{"gitId":"-"},"content":" }"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" //// tag-level operations"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" tags.add(t);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" //// task-level operations"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book."},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists."},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}."},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" //// util methods"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" // TODO: refine later"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList();"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":296,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":297,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":298,"author":{"gitId":"-"},"content":" return tags.asObservableList();"},{"lineNumber":299,"author":{"gitId":"-"},"content":" }"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":302,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":303,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":304,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls"},{"lineNumber":305,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);"},{"lineNumber":308,"author":{"gitId":"-"},"content":" }"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":311,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":312,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);"},{"lineNumber":314,"author":{"gitId":"-"},"content":" }"},{"lineNumber":315,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":11,"Esilocke":106,"wangyiming1019":17,"-":181}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * The API of the Model component."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public interface Model {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */"},{"lineNumber":33,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Deletes the given person. */"},{"lineNumber":36,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /** Adds the given person */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}."},{"lineNumber":61,"author":{"gitId":"-"},"content":" *"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":64,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}."},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}."},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":105,"author":{"gitId":"-"},"content":" */"},{"lineNumber":106,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}."},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by field in ascending (asc) or descending (desc) order"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);"},{"lineNumber":120,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":48,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data."},{"lineNumber":41,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized."},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ModelManager() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":89,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list."},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list."},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":149,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);"},{"lineNumber":153,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();"},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes."},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag."},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" int index;"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);"},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);"},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" updateFilteredPersonList(new NameContainsFavouritePredicate());"},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToAssignTo.getTaskName();"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToAssignTo.getDescription();"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToAssignTo.getDeadline();"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToAssignTo.getPriority();"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToAssignTo.getCompleteState();"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" assignees.assign(personsToAssign);"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToAssignTo, updatedTask);"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToDismissFrom.getTaskName();"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToDismissFrom.getDescription();"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToDismissFrom.getDeadline();"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToDismissFrom.getPriority();"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToDismissFrom.getCompleteState();"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assignees.dismiss(personsToDismiss);"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToDismissFrom, updatedTask);"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":275,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":276,"author":{"gitId":"-"},"content":""},{"lineNumber":277,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":278,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of"},{"lineNumber":279,"author":{"gitId":"-"},"content":" * {@code addressBook}"},{"lineNumber":280,"author":{"gitId":"-"},"content":" */"},{"lineNumber":281,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":282,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":283,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);"},{"lineNumber":284,"author":{"gitId":"-"},"content":" }"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" requireNonNull(predicate);"},{"lineNumber":296,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":297,"author":{"gitId":"-"},"content":" }"},{"lineNumber":298,"author":{"gitId":"-"},"content":""},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":307,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":308,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {"},{"lineNumber":309,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":310,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {"},{"lineNumber":311,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":312,"author":{"gitId":"-"},"content":" }"},{"lineNumber":313,"author":{"gitId":"-"},"content":""},{"lineNumber":314,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":315,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {"},{"lineNumber":316,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":317,"author":{"gitId":"-"},"content":" }"},{"lineNumber":318,"author":{"gitId":"-"},"content":""},{"lineNumber":319,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":320,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;"},{"lineNumber":321,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":145,"wangyiming1019":59,"-":116}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list."},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Validates given address."},{"lineNumber":26,"author":{"gitId":"-"},"content":" *"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public Address(String address) throws IllegalValueException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.value \u003d address;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(address);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":50}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Validates given email."},{"lineNumber":21,"author":{"gitId":"-"},"content":" *"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public Email(String email) throws IllegalValueException {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this(email);"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":62,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls"},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":45}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String fullName;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given name."},{"lineNumber":27,"author":{"gitId":"-"},"content":" *"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Name(String name) throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.fullName \u003d trimmedName;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this(name);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls"},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.fullName.equals(((Name) other).fullName)); // state check"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return fullName.hashCode();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27,"-":55}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/not\")) {"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(4));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Every field must be present and not null."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Boolean favourite, Remark remark, Set\u003cTag\u003e tags) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" source.getRemark(), source.getTags());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public Name getName() {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return name.get();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return phone;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public Phone getPhone() {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.get();"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return email;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Email getEmail() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return email.get();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return address;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public Address getAddress() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return address.get();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return favourite;"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark.get();"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}"},{"lineNumber":138,"author":{"gitId":"-"},"content":" * if modification is attempted."},{"lineNumber":139,"author":{"gitId":"-"},"content":" */"},{"lineNumber":140,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":141,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set."},{"lineNumber":151,"author":{"gitId":"-"},"content":" */"},{"lineNumber":152,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":157,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":158,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":159,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls"},{"lineNumber":160,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags);"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":170,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":171,"author":{"gitId":"-"},"content":" return getAsText();"},{"lineNumber":172,"author":{"gitId":"-"},"content":" }"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":15,"wangyiming1019":23,"-":136}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given phone number."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) throws IllegalValueException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":64,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls"},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":28,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook."},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();"},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();"},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark());"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" default String getAsText() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" builder.append(getName())"},{"lineNumber":50,"author":{"gitId":"-"},"content":" .append(\" Phone: \")"},{"lineNumber":51,"author":{"gitId":"-"},"content":" .append(getPhone())"},{"lineNumber":52,"author":{"gitId":"-"},"content":" .append(\" Email: \")"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .append(getEmail())"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .append(\" Address: \")"},{"lineNumber":55,"author":{"gitId":"-"},"content":" .append(getAddress())"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Tags: \");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return builder.toString();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book."},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid."},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" return;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this(remark);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public String toString() {"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (isPrivate) {"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return \"\u003cPrivate Remark\u003e\";"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" return value;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean isPrivate() {"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return isPrivate;"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":79}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Iterator;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":21,"author":{"gitId":"-"},"content":" *"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" // used by asObservableList()"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the list contains an equivalent person as the given argument."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public boolean contains(ReadOnlyPerson toCheck) {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toCheck);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return internalList.contains(toCheck);"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" * Adds a person to the list."},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list."},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toAdd);"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" if (contains(toAdd)) {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" internalList.add(new Person(toAdd));"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}."},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list."},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(editedPerson);"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" internalList.set(index, new Person(editedPerson));"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Removes the equivalent person from the list."},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toRemove);"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" if (!personFoundAndDeleted) {"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" return personFoundAndDeleted;"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list."},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list."},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":126,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();"},{"lineNumber":127,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));"},{"lineNumber":129,"author":{"gitId":"-"},"content":" }"},{"lineNumber":130,"author":{"gitId":"-"},"content":" setPersons(replacement);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" }"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":135,"author":{"gitId":"-"},"content":" */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().fullName.compareTo(o2.getName().fullName);"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" switch (field) {"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" case \"name\":"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" case \"email\":"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case \"address\":"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" switch (order) {"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" public Iterator\u003cPerson\u003e iterator() {"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return internalList.iterator();"},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls"},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));"},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return internalList.hashCode();"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":171,"wangyiming1019":31,"-":42}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name."},{"lineNumber":20,"author":{"gitId":"-"},"content":" *"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing."},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Assignees {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private HashSet\u003cReadOnlyPerson\u003e assignedList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public Assignees(HashSet\u003cReadOnlyPerson\u003e assignees) {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public Assignees() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new HashSet\u003c\u003e();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void assign(ArrayList\u003cReadOnlyPerson\u003e personsToAssign) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToAssign) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assignedList.add(p);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list */"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public void dismiss(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToDismiss) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (assignedList.contains(p)) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(p);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyPerson toFind) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return assignedList.contains(toFind);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Calendar;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Deadline {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DEADLINE_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task deadlines must be in the format DD-MM-YYYY, with \u0027-\u0027, \u0027.\u0027, \u0027.\u0027 as separators\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" Deadline format: DDSMMSYYYY, in DAY-MONTH-YEAR format."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" S represents the separators, and can be any of these characters: - . /"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_VALIDATION_REGEX \u003d \"\\\\d\\\\d[-./]\\\\d\\\\d[-./]\\\\d\\\\d\\\\d\\\\d.*\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String DEADLINE_PERIOD_DELIMITER \u003d \".\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" Expected indexes for the separator characters"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_1 \u003d 2;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_2 \u003d 5;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_DAY_INDEX \u003d 0;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_MONTH_INDEX \u003d 1;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_YEAR_INDEX \u003d 2;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public final Calendar calendar;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline."},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid."},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } else if (deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String trimmedDeadline \u003d deadline.trim();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (!isValidDeadline(trimmedDeadline)) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DEADLINE_CONSTRAINTS);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDeadline;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d Calendar.getInstance();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" calendar.clear();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" char separator \u003d trimmedDeadline.charAt(DEADLINE_SEPARATOR_INDEX_1);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d trimmedDeadline.split(Character.toString(separator));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.calendar.set(year, month, day);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is in valid deadline format."},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(DEADLINE_VALIDATION_REGEX)) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } else if (test.charAt(DEADLINE_SEPARATOR_INDEX_1) !\u003d test.charAt(DEADLINE_SEPARATOR_INDEX_2)) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return isValidDate(test);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date."},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDate(String test) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" Calendar testCalendar \u003d setCalendar(test);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" testCalendar.setLenient(false);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" testCalendar.getTime();"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Returns a Calendar object that represents the given date string."},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private static Calendar setCalendar(String date) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" Calendar result \u003d Calendar.getInstance();"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" result.clear();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String separator \u003d Character.toString(date.charAt(DEADLINE_SEPARATOR_INDEX_1));"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (separator.equals(DEADLINE_PERIOD_DELIMITER)) {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" separator \u003d \"\\\\.\";"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d date.split(separator);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" result.set(year, month, day);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return result;"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":131}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description."},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Priority {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 1 to 5, inclusive, where 1 represents the lowest priority\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 1;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Validates given priority."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Integer.parseInt(trimmedPriority);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedPriority;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Priority) other).value)); // state check"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":83}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return builder.toString();"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * by default."},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return taskName.get();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return description.get();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return deadline.get();"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return priority.get();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return assignees.get();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return state.get();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return getAsText();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return description;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return deadline;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return priority;"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return assignees;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" String printableState;"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return printableState;"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":164}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c keywords.size(); i++) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String keyword \u003d keywords.get(i);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)); // state check"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskName {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public final String taskName;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Validates given name."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name."},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument."},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list."},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list."},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}."},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list."},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list."},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list."},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return taskFoundAndDeleted;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":124}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task."},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class SampleDataUtil {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" return new Person[] {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"),"},{"lineNumber":28,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),"},{"lineNumber":29,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"),"},{"lineNumber":32,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),"},{"lineNumber":33,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"),"},{"lineNumber":36,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),"},{"lineNumber":37,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"),"},{"lineNumber":40,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),"},{"lineNumber":41,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"),"},{"lineNumber":44,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),"},{"lineNumber":45,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"),"},{"lineNumber":48,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))"},{"lineNumber":49,"author":{"gitId":"-"},"content":" };"},{"lineNumber":50,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return sampleAb;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given."},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (String s : strings) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}."},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found."},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format."},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook cannot be null."},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException if there was any problem writing to the file."},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBook(ReadOnlyAddressBook addressBook, String args) throws IOException;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" void changeFilePath(String fp, UserPrefs u);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" //@author"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":20,"jeffreygohkw":1,"-":31}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * @param filePath"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath() + \"-backup.xml\");"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));"},{"lineNumber":109,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":22,"jeffreygohkw":8,"-":92}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private String name;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private String phone;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String email;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private String address;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private String remark;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson."},{"lineNumber":52,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":53,"author":{"gitId":"-"},"content":" */"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use."},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().fullName;"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().isPrivate();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().isPrivate();"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().isPrivate();"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().isPrivate();"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().isPrivate();"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object."},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, tags);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":66,"wangyiming1019":3,"-":43}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private String name;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private String description;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private String deadline;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private String priority;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private String state;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use."},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" priority \u003d source.getPriority().value;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object."},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, new Assignees(), state);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":61}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format."},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,"},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);"},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location."},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath + \"-backup.xml\");"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook."},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":17,"-":74}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private WebView browser;"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public BrowserPanel() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page."},{"lineNumber":48,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" loadDefaultPage();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().isPrivate()) {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().fullName.replaceAll(\" \", \"+\")"},{"lineNumber":64,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027saddress if their address is not private"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void loadPage(String url) {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a default HTML file with a background that matches the general theme."},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDefaultPage() {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(defaultPage.toExternalForm());"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * Frees resources allocated to the browser."},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" public void freeResources() {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" browser \u003d null;"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" loadPersonPage(event.getNewSelection().person);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":66,"-":48}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed."},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Stage primaryStage;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container"},{"lineNumber":58,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":65,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":71,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":92,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":98,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":101,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":" // Set dependencies"},{"lineNumber":108,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":110,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":111,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" // Configure the UI"},{"lineNumber":114,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());"},{"lineNumber":115,"author":{"gitId":"-"},"content":" setIcon(ICON);"},{"lineNumber":116,"author":{"gitId":"-"},"content":" setWindowMinSize();"},{"lineNumber":117,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());"},{"lineNumber":119,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" setAccelerators();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return primaryStage;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the accelerator of a MenuItem."},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param keyCombination the KeyCombination value of the accelerator"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.setAccelerator(keyCombination);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" /*"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" * TODO: the code below can be removed once the bug reported here"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" * is fixed in later version of SDK."},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * consume function-key events. Because CommandBox contains a TextField, and"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * not work when the focus is in them because the key event is consumed by"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * the TextInputControl(s)."},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * For now, we add following event filter to capture such key events and open"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * help window purposely so to support accelerators even when focus is"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * in CommandBox or ResultDisplay."},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.getOnAction().handle(new ActionEvent());"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" event.consume();"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" });"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself."},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Fills up all the placeholders of this window."},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" void fillInnerParts() {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" browserPanel \u003d new BrowserPanel();"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" CommandBox commandBox \u003d new CommandBox(logic);"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" void hide() {"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.hide();"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" private void setTitle(String appTitle) {"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setTitle(appTitle);"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the given image as the icon of the main window."},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" private void setIcon(String iconSource) {"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default size based on user preferences."},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowMinSize() {"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinWidth(MIN_WIDTH);"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the current size and the position of the main Window."},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" GuiSettings getCurrentGuiSetting() {"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command"},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {"},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" personListPanel.increaseFontSize();"},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.increaseFontSize();"},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command"},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {"},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":" personListPanel.decreaseFontSize();"},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.decreaseFontSize();"},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command"},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {"},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" personListPanel.resetFontSize();"},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.resetFontSize();"},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":294,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Opens the help window."},{"lineNumber":296,"author":{"gitId":"-"},"content":" */"},{"lineNumber":297,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":298,"author":{"gitId":"-"},"content":" public void handleHelp() {"},{"lineNumber":299,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();"},{"lineNumber":300,"author":{"gitId":"-"},"content":" helpWindow.show();"},{"lineNumber":301,"author":{"gitId":"-"},"content":" }"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" void show() {"},{"lineNumber":304,"author":{"gitId":"-"},"content":" primaryStage.show();"},{"lineNumber":305,"author":{"gitId":"-"},"content":" }"},{"lineNumber":306,"author":{"gitId":"-"},"content":""},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog"},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" raise(new OpenRequestEvent());"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" raise(new SaveAsRequestEvent());"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":361,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":362,"author":{"gitId":"-"},"content":" private void handleExit() {"},{"lineNumber":363,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());"},{"lineNumber":364,"author":{"gitId":"-"},"content":" }"},{"lineNumber":365,"author":{"gitId":"-"},"content":""},{"lineNumber":366,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {"},{"lineNumber":367,"author":{"gitId":"-"},"content":" return this.personListPanel;"},{"lineNumber":368,"author":{"gitId":"-"},"content":" }"},{"lineNumber":369,"author":{"gitId":"-"},"content":""},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":374,"author":{"gitId":"-"},"content":" void releaseResources() {"},{"lineNumber":375,"author":{"gitId":"-"},"content":" browserPanel.freeResources();"},{"lineNumber":376,"author":{"gitId":"-"},"content":" }"},{"lineNumber":377,"author":{"gitId":"-"},"content":""},{"lineNumber":378,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":379,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {"},{"lineNumber":380,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":381,"author":{"gitId":"-"},"content":" handleHelp();"},{"lineNumber":382,"author":{"gitId":"-"},"content":" }"},{"lineNumber":383,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":212,"Esilocke":8,"-":121}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later."},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":40,"author":{"gitId":"-"},"content":" *"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultipler;"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":69,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":70,"author":{"gitId":"-"},"content":" initTags(person);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));"},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" });"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" * @param tag"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @return"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * @param person"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" });"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":139,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":140,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":146,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":151,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;"},{"lineNumber":152,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":153,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" return name;"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return phone;"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return address;"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return email;"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":69,"wangyiming1019":37,"-":81}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Panel containing the list of persons."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d 0;"},{"lineNumber":39,"author":{"gitId":"-"},"content":" setConnections(personList);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));"},{"lineNumber":46,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":56,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":" });"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" });"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":103,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}."},{"lineNumber":108,"author":{"gitId":"-"},"content":" */"},{"lineNumber":109,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":112,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {"},{"lineNumber":116,"author":{"gitId":"-"},"content":" setGraphic(null);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" setText(null);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());"},{"lineNumber":120,"author":{"gitId":"-"},"content":" }"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":38,"-":86}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // short circuit if same object"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" return true;"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" // instanceof handles nulls"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" if (!(other instanceof TaskCard)) {"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return false;"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // state check"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" TaskCard card \u003d (TaskCard) other;"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 task.equals(card.task);"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" return taskName;"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return description;"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return deadline;"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return priority;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":63,"Esilocke":75}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks."},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d 0;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map("},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it."},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}."},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" setText(null);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":29,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component"},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */"},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */"},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");"},{"lineNumber":50,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" //Set the application icon."},{"lineNumber":53,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts"},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (Throwable e) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());"},{"lineNumber":69,"author":{"gitId":"-"},"content":" mainWindow.hide();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters."},{"lineNumber":92,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog."},{"lineNumber":93,"author":{"gitId":"-"},"content":" */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,"},{"lineNumber":95,"author":{"gitId":"-"},"content":" String contentText) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");"},{"lineNumber":98,"author":{"gitId":"-"},"content":" alert.initOwner(owner);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" alert.setTitle(title);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.showAndWait();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},"},{"lineNumber":108,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog."},{"lineNumber":109,"author":{"gitId":"-"},"content":" */"},{"lineNumber":110,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));"},{"lineNumber":112,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());"},{"lineNumber":113,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" System.exit(1);"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":122,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,"},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.exception);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":4,"-":120}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" });"},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));"},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data."},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully."},{"lineNumber":97,"author":{"gitId":"-"},"content":" */"},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel."},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}."},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}."},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected."},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card."},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected."},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task."},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list."},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list."},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list."},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call."},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list."},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code AddCommand}."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class AddCommandIntegrationTest {"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,"},{"lineNumber":38,"author":{"gitId":"-"},"content":" String.format(AddCommand.MESSAGE_SUCCESS, validPerson), expectedModel);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Generates a new {@code AddCommand} which upon execution, adds {@code person} into the {@code model}."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" private AddCommand prepareCommand(Person person, Model model) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":53}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddCommandTest {"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d getAddCommandForTask(validTask, modelStub).execute();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddCommand.MESSAGE_TASK_SUCCESS, validTask), commandResult.feedbackToUser);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_TASK);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" getAddCommandForTask(validTask, modelStub).execute();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommand \u003d new AddCommand(paper);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" AddCommand addPencilCommand \u003d new AddCommand(pencil);"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":104,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommandCopy \u003d new AddCommand(paper);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":110,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false"},{"lineNumber":118,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" // add person vs add task -\u003e returns false"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertFalse(addAliceCommand.equals(addPaperCommand));"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person."},{"lineNumber":127,"author":{"gitId":"-"},"content":" */"},{"lineNumber":128,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {"},{"lineNumber":129,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":131,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddCommand with the details of the given person."},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private AddCommand getAddCommandForTask(Task task, Model model) {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AddCommand command \u003d new AddCommand(task);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing."},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":150,"author":{"gitId":"-"},"content":" }"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":158,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }"},{"lineNumber":166,"author":{"gitId":"-"},"content":""},{"lineNumber":167,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":168,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":170,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":184,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":185,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {"},{"lineNumber":186,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":187,"author":{"gitId":"-"},"content":" }"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":196,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":198,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":217,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":219,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":220,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }"},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":264,"author":{"gitId":"-"},"content":" }"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateDataException when trying to add a person or task."},{"lineNumber":268,"author":{"gitId":"-"},"content":" */"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {"},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":271,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":272,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":273,"author":{"gitId":"-"},"content":" }"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":281,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":282,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":283,"author":{"gitId":"-"},"content":" }"},{"lineNumber":284,"author":{"gitId":"-"},"content":" }"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added."},{"lineNumber":288,"author":{"gitId":"-"},"content":" */"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingObjectAdded extends ModelStub {"},{"lineNumber":290,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":292,"author":{"gitId":"-"},"content":""},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));"},{"lineNumber":296,"author":{"gitId":"-"},"content":" }"},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":304,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":305,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":306,"author":{"gitId":"-"},"content":" }"},{"lineNumber":307,"author":{"gitId":"-"},"content":" }"},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":121,"wangyiming1019":24,"-":160}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}."},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_addSuccessful() throws Exception {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_addSuccessful() throws Exception {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_addSuccessful() throws Exception {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets."},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index task) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, task);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":120}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").build();"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"false\").build();"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").build();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":129}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandTest {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":33,"author":{"gitId":"-"},"content":" */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands."},{"lineNumber":35,"author":{"gitId":"-"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_FAVOURITE \u003d \"false\";"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017\";"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017\";"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_AMY;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_BOB;"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_AMY;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_BOB;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_AMY;"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_BOB;"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_AMY;"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_BOB;"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_AMY;"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_BOB;"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"20-20-20000\"; // bad date format"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_AMY;"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_BOB;"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PENCIL;"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PAPER;"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" static {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)"},{"lineNumber":110,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_AMY).withFavourite(VALID_FAVOURITE)"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":114,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_BOB).withFavourite(VALID_FAVOURITE)"},{"lineNumber":116,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":128,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}"},{"lineNumber":129,"author":{"gitId":"-"},"content":" */"},{"lineNumber":130,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,"},{"lineNumber":131,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged"},{"lineNumber":146,"author":{"gitId":"-"},"content":" */"},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {"},{"lineNumber":148,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can"},{"lineNumber":149,"author":{"gitId":"-"},"content":" // only do so by copying its components."},{"lineNumber":150,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());"},{"lineNumber":151,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" command.execute();"},{"lineNumber":155,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":156,"author":{"gitId":"-"},"content":" } catch (CommandException e) {"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());"},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book."},{"lineNumber":165,"author":{"gitId":"-"},"content":" */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" final String[] splitName \u003d person.getName().fullName.split(\"\\\\s+\");"},{"lineNumber":169,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;"},{"lineNumber":172,"author":{"gitId":"-"},"content":" }"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":175,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":176,"author":{"gitId":"-"},"content":" */"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":179,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":180,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);"},{"lineNumber":181,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {"},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);"},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":12,"Esilocke":34,"wangyiming1019":16,"-":128}},{"path":"src/test/java/seedu/address/logic/commands/DeleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeleteCommand}."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class DeleteCommandTest {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":72,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommand \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteSecondCommand \u003d new DeleteCommand(INDEX_SECOND_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommandCopy \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns a {@code DeleteCommand} with the parameter {@code index}."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" private DeleteCommand prepareCommand(Index index, int type) {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(index, type);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" deleteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return deleteCommand;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":112,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one."},{"lineNumber":113,"author":{"gitId":"-"},"content":" */"},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":12,"-":107}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}."},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_addSuccessful() throws Exception {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_addSuccessful() throws Exception {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_addSuccessful() throws Exception {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets."},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index task) {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, task);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":121}},{"path":"src/test/java/seedu/address/logic/commands/EditCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditCommand."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class EditCommandTest {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(indexLastPerson, descriptor);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));"},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book"},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":167,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex, descriptor);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book"},{"lineNumber":185,"author":{"gitId":"-"},"content":" */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex,"},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":201,"author":{"gitId":"-"},"content":" final EditCommand standardCommand \u003d new EditCommand(INDEX_FIRST_PERSON, DESC_AMY);"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);"},{"lineNumber":205,"author":{"gitId":"-"},"content":" EditCommand commandWithSameValues \u003d new EditCommand(INDEX_FIRST_PERSON, copyDescriptor);"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false"},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_SECOND_PERSON, DESC_AMY)));"},{"lineNumber":219,"author":{"gitId":"-"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false"},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_BOB)));"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":225,"author":{"gitId":"-"},"content":" * Returns an {@code EditCommand} with parameters {@code index} and {@code descriptor}"},{"lineNumber":226,"author":{"gitId":"-"},"content":" */"},{"lineNumber":227,"author":{"gitId":"-"},"content":" private EditCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {"},{"lineNumber":228,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d new EditCommand(index, descriptor);"},{"lineNumber":229,"author":{"gitId":"-"},"content":" editCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" return editCommand;"},{"lineNumber":231,"author":{"gitId":"-"},"content":" }"},{"lineNumber":232,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":2,"-":169}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent() throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public AddressBook prepareAddressBook() throws DuplicatePersonException {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":54}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code FindCommand}."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class FindCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d"},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" FindCommand findFirstCommand \u003d new FindCommand(firstPredicate);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" FindCommand findSecondCommand \u003d new FindCommand(secondPredicate);"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":47,"author":{"gitId":"-"},"content":" FindCommand findFirstCommandCopy \u003d new FindCommand(firstPredicate);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\" \");"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Parses {@code userInput} into a {@code FindCommand}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" */"},{"lineNumber":77,"author":{"gitId":"-"},"content":" private FindCommand prepareCommand(String userInput) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" FindCommand command \u003d"},{"lineNumber":79,"author":{"gitId":"-"},"content":" new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":89,"author":{"gitId":"-"},"content":" */"},{"lineNumber":90,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(FindCommand command, String expectedMessage, List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":92,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}."},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}."},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index."},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}."},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}."},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class RedoCommandTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":40,"author":{"gitId":"-"},"content":" Collections.emptyList(), Arrays.asList(deleteCommandTwo, deleteCommandOne));"},{"lineNumber":41,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in redoStack"},{"lineNumber":46,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // single command in redoStack"},{"lineNumber":50,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // no command in redoStack"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":6,"-":50}},{"path":"src/test/java/seedu/address/logic/commands/SelectCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectCommand}."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class SelectCommandTest {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":70,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommand \u003d new SelectCommand(INDEX_FIRST_PERSON);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" SelectCommand selectSecondCommand \u003d new SelectCommand(INDEX_SECOND_PERSON);"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":85,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommandCopy \u003d new SelectCommand(INDEX_FIRST_PERSON);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(1));"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(null));"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * is raised with the correct index."},{"lineNumber":101,"author":{"gitId":"-"},"content":" */"},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d selectCommand.execute();"},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertEquals(String.format(SelectCommand.MESSAGE_SELECT_PERSON_SUCCESS, index.getOneBased()),"},{"lineNumber":108,"author":{"gitId":"-"},"content":" commandResult.feedbackToUser);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" JumpToListRequestEvent lastEvent \u003d (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":119,"author":{"gitId":"-"},"content":" * is thrown with the {@code expectedMessage}."},{"lineNumber":120,"author":{"gitId":"-"},"content":" */"},{"lineNumber":121,"author":{"gitId":"-"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" selectCommand.execute();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":127,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }"},{"lineNumber":131,"author":{"gitId":"-"},"content":" }"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns a {@code SelectCommand} with parameters {@code index}."},{"lineNumber":135,"author":{"gitId":"-"},"content":" */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" private SelectCommand prepareCommand(Index index) {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d new SelectCommand(index);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" selectCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":139,"author":{"gitId":"-"},"content":" return selectCommand;"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":139}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setCompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, setCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}."},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setIncompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, setIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class UndoCommandTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":40,"author":{"gitId":"-"},"content":" Arrays.asList(deleteCommandOne, deleteCommandTwo), Collections.emptyList());"},{"lineNumber":41,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" deleteCommandOne.execute();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteCommandTwo.execute();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" // multiple commands in undoStack"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" // single command in undoStack"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no command in undoStack"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":51}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/parser/AddCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class AddCommandParserTest {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY)"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" // multiple names - last name accepted"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // multiple tags - all accepted"},{"lineNumber":95,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":97,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,"},{"lineNumber":100,"author":{"gitId":"-"},"content":" new AddCommand(expectedPersonMultipleTags));"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" // zero tags"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY, new AddCommand(expectedPerson));"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":143,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE);"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" // missing name prefix"},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB"},{"lineNumber":148,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" // missing phone prefix"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + VALID_PHONE_BOB"},{"lineNumber":152,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" // missing email prefix"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":156,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" // missing address prefix"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":160,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + VALID_ADDRESS_BOB, expectedMessage);"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" // all prefixes missing"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB"},{"lineNumber":164,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }"},{"lineNumber":166,"author":{"gitId":"-"},"content":""},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE);"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" // missing description prefix"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" // missing deadline prefix"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + VALID_DEADLINE_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" // missing priority prefix"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" // invalid phone"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" // invalid email"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" // invalid tag"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" // invalid deadline"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" // invalid priority"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Priority.MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }"},{"lineNumber":236,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":33,"Esilocke":89,"-":114}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command \u003d (AddCommand) parser.parseCommand(TaskUtil.getAddCommand(task));"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddCommand(task), command);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \""},{"lineNumber":92,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person));"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \""},{"lineNumber":97,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(task), command);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD) instanceof ClearCommand);"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS) instanceof ClearCommand);"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {"},{"lineNumber":166,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":167,"author":{"gitId":"-"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {"},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);"},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \""},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":209,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":210,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \""},{"lineNumber":211,"author":{"gitId":"-"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));"},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":222,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {"},{"lineNumber":223,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":224,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":225,"author":{"gitId":"wangyiming1019"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \""},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));"},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \""},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD + \" \""},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS + \" \""},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":255,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":256,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":257,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD) instanceof ExitCommand);"},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\") instanceof ExitCommand);"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":263,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":265,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":266,"author":{"gitId":"-"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);"},{"lineNumber":273,"author":{"gitId":"-"},"content":" }"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":276,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {"},{"lineNumber":277,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":278,"author":{"gitId":"wangyiming1019"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":279,"author":{"gitId":"wangyiming1019"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":280,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \""},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);"},{"lineNumber":286,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":287,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":288,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":289,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {"},{"lineNumber":290,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":291,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":292,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":293,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":294,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":295,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":296,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":297,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {"},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));"},{"lineNumber":302,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":303,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":304,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":305,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":306,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":307,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {"},{"lineNumber":308,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD) instanceof HelpCommand);"},{"lineNumber":309,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\") instanceof HelpCommand);"},{"lineNumber":310,"author":{"gitId":"-"},"content":" }"},{"lineNumber":311,"author":{"gitId":"-"},"content":""},{"lineNumber":312,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":313,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {"},{"lineNumber":314,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD) instanceof HistoryCommand);"},{"lineNumber":315,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\") instanceof HistoryCommand);"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":318,"author":{"gitId":"-"},"content":" parser.parseCommand(\"histories\");"},{"lineNumber":319,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":320,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {"},{"lineNumber":321,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":322,"author":{"gitId":"-"},"content":" }"},{"lineNumber":323,"author":{"gitId":"-"},"content":" }"},{"lineNumber":324,"author":{"gitId":"-"},"content":""},{"lineNumber":325,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":326,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {"},{"lineNumber":327,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS) instanceof HistoryCommand);"},{"lineNumber":328,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\") instanceof HistoryCommand);"},{"lineNumber":329,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":330,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":331,"author":{"gitId":"wangyiming1019"},"content":" parser.parseCommand(\"histories\");"},{"lineNumber":332,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":333,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {"},{"lineNumber":334,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":335,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":336,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":337,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":338,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":339,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {"},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD) instanceof ListCommand);"},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\") instanceof ListCommand);"},{"lineNumber":342,"author":{"gitId":"-"},"content":" }"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":345,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {"},{"lineNumber":346,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS) instanceof ListCommand);"},{"lineNumber":347,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\") instanceof ListCommand);"},{"lineNumber":348,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":349,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":350,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":351,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {"},{"lineNumber":352,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":353,"author":{"gitId":"-"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":354,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":355,"author":{"gitId":"-"},"content":" }"},{"lineNumber":356,"author":{"gitId":"-"},"content":""},{"lineNumber":357,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":358,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {"},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":360,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":361,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":362,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":363,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":380,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":381,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWord() throws Exception {"},{"lineNumber":382,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD) instanceof BackupCommand);"},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":386,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWordWithInput() throws Exception {"},{"lineNumber":387,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD + \" test.xml\") instanceof BackupCommand);"},{"lineNumber":388,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":389,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":390,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":391,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAlias() throws Exception {"},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS) instanceof BackupCommand);"},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":396,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAliasWithInput() throws Exception {"},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS + \" test.xml\") instanceof BackupCommand);"},{"lineNumber":398,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {"},{"lineNumber":402,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD) instanceof RedoCommand);"},{"lineNumber":403,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"redo 1\") instanceof RedoCommand);"},{"lineNumber":404,"author":{"gitId":"-"},"content":" }"},{"lineNumber":405,"author":{"gitId":"-"},"content":""},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD"},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());"},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":436,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {"},{"lineNumber":438,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD) instanceof UndoCommand);"},{"lineNumber":439,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"undo 3\") instanceof UndoCommand);"},{"lineNumber":440,"author":{"gitId":"-"},"content":" }"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {"},{"lineNumber":444,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":445,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":446,"author":{"gitId":"-"},"content":" parser.parseCommand(\"\");"},{"lineNumber":447,"author":{"gitId":"-"},"content":" }"},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {"},{"lineNumber":451,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":452,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":453,"author":{"gitId":"-"},"content":" parser.parseCommand(\"unknownCommand\");"},{"lineNumber":454,"author":{"gitId":"-"},"content":" }"},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal"},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command"},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command"},{"lineNumber":461,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal"},{"lineNumber":462,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":463,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {"},{"lineNumber":464,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());"},{"lineNumber":465,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":466,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":75,"Esilocke":147,"wangyiming1019":80,"-":148}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * outside of the DeleteCommand code. For example, inputs \"1\" and \"1 abc\" take the"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * same path through the DeleteCommand, and therefore we test only one of them."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class DeleteCommandParserTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\","},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_TASK));"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\","},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\","},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":52,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":23,"-":29}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \","},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate("},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectCommandParserTest}."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectCommandParserTest"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"asc\","},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"desc\","},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"name\","},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"phone\","},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"email\","},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"address\","},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no field or order"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\","},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArguments_success() throws ParseException {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand expectedCommand;"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand actualCommand;"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"asc\");"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name asc\");"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"desc\");"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name desc\");"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"asc\");"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone asc\");"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"desc\");"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone desc\");"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"asc\");"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email asc\");"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"desc\");"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email desc\");"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"asc\");"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address asc\");"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"desc\");"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address desc\");"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":101}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice"},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints."},{"lineNumber":190,"author":{"gitId":"-"},"content":" */"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();"},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":" }"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":106,"Esilocke":18,"-":93}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.isPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":20}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.isPrivate());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":39}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name"},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.isPrivate());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":25}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.isPrivate());"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":11,"-":24}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"-04-17\")); // missing day"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04--17\")); // missing month"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04\")); // missing year"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"day-04-17\")); // invalid day"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-month-17\")); // invalid month"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-year\")); // invalid year"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"32-04-17\")); // impossible day"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-13-17\")); // impossible month"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04--1\")); // impossible year"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"0-04-17\")); // incomplete day"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-0-17\")); // incomplete month"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-1\")); // incomplete year"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-201\")); // incomplete year"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04/17\")); // inconsistent separators"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-042017\")); // missing separator"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // valid deadlines"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04/04/2017\")); // slashes"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04.04.2017\")); // dots"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":44}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"0\")); // priority out of range"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));"},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class."},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class."},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),"},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called"},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder"},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored."},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method"},{"lineNumber":61,"author":{"gitId":"-"},"content":" */"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back"},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back"},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));"},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path"},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified"},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}."},{"lineNumber":112,"author":{"gitId":"-"},"content":" */"},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));"},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());"},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());"},{"lineNumber":36,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":53,"author":{"gitId":"-"},"content":" */"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }"},{"lineNumber":84,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}"},{"lineNumber":101,"author":{"gitId":"-"},"content":" * that we are building."},{"lineNumber":102,"author":{"gitId":"-"},"content":" */"},{"lineNumber":103,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));"},{"lineNumber":106,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" return descriptor;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":9,"-":101}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return descriptor;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonBuilder {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private Person person;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public PersonBuilder() {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" defaultRemark, defaultTags);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));"},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building."},{"lineNumber":80,"author":{"gitId":"-"},"content":" */"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));"},{"lineNumber":108,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building."},{"lineNumber":116,"author":{"gitId":"-"},"content":" */"},{"lineNumber":117,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));"},{"lineNumber":120,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building."},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" public Person build() {"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return this.person;"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":18,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects."},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().isPrivate());"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().isPrivate());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().isPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().isPrivate());"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":91}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * A utility class for Person."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class PersonUtil {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" return AddCommand.COMMAND_WORD + \" \" + getPersonDetails(person);"},{"lineNumber":23,"author":{"gitId":"-"},"content":" }"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" sb.append(PREFIX_NAME + person.getName().fullName + \" \");"},{"lineNumber":31,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");"},{"lineNumber":35,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach("},{"lineNumber":36,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")"},{"lineNumber":37,"author":{"gitId":"-"},"content":" );"},{"lineNumber":38,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"-":38}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Task task;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}."},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building."},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building."},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building."},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building."},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building."},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public Task build() {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" return this.task;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" return AddCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + task.getPriority().value + \" \");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return sb.toString();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":35}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests."},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class TypicalPersons {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":31,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")"},{"lineNumber":33,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")"},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // Manually added"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_AMY)"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_BOB)"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":71,"author":{"gitId":"-"},"content":" */"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" ab.addPerson(person);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" assert false : \"not possible\";"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return ab;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":15,"wangyiming1019":15,"-":67}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests."},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").build();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\")"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").build();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).build();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").build();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").build();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).build();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\").build();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":76}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" // default web page"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // associated web page of a person"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" postNow(selectionChangedEventStub);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedPersonUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + ALICE.getName().fullName.replaceAll(\" \", \"+\") + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPersonUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":31,"-":34}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultipler());"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier + 1);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags"},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card"},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" });"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock"},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock"},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated"},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());"},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final JumpToListRequestEvent JUMP_TO_SECOND_EVENT \u003d new"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" JumpToListRequestEvent(INDEX_SECOND_PERSON);"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void handleJumpToListRequestEvent() {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"}"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""}],"authorContributionMap":{"charlesgoh":60}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing."},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"-":94}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards."},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),"},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}."},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getPriority().value, actualCard.getPriority());"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":24,"-":72}},{"path":"src/test/java/seedu/address/ui/testutil/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.GuiUnitTest;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // no tags"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public void equals() {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}."},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * -\u003e added"},{"lineNumber":66,"author":{"gitId":"-"},"content":" */"},{"lineNumber":67,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" String command \u003d \" \" + AddCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */"},{"lineNumber":73,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */"},{"lineNumber":89,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in"},{"lineNumber":91,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)"},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */"},{"lineNumber":111,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":120,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */"},{"lineNumber":132,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()"},{"lineNumber":134,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */"},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */"},{"lineNumber":143,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;"},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */"},{"lineNumber":149,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" 1\");"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e rejected */"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e rejected */"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */"},{"lineNumber":173,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":184,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":185,"author":{"gitId":"-"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }"},{"lineNumber":196,"author":{"gitId":"-"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":198,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and verifies that the command box displays"},{"lineNumber":199,"author":{"gitId":"-"},"content":" * an empty string, the result display box displays the success message of executing {@code AddCommand} with the"},{"lineNumber":200,"author":{"gitId":"-"},"content":" * details of {@code toAdd}, and the model related components equal to the current model added with {@code toAdd}."},{"lineNumber":201,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":203,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,"},{"lineNumber":204,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged."},{"lineNumber":205,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":206,"author":{"gitId":"-"},"content":" */"},{"lineNumber":207,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":212,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * instead."},{"lineNumber":214,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)"},{"lineNumber":215,"author":{"gitId":"-"},"content":" */"},{"lineNumber":216,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {"},{"lineNumber":217,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":218,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":219,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);"},{"lineNumber":220,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":221,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result"},{"lineNumber":230,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to"},{"lineNumber":231,"author":{"gitId":"-"},"content":" * {@code expectedModel}."},{"lineNumber":232,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)"},{"lineNumber":233,"author":{"gitId":"-"},"content":" */"},{"lineNumber":234,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":235,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":236,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":245,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":247,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":248,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":249,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":250,"author":{"gitId":"-"},"content":" */"},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":252,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }"},{"lineNumber":260,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":34,"-":226}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void clear() {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared"},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS, TYPE_ALL);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */"},{"lineNumber":41,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":42,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":48,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model."},{"lineNumber":63,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes."},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":74,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)"},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":88,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":89,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":93,"author":{"gitId":"-"},"content":" */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":6,"-":97}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited"},{"lineNumber":64,"author":{"gitId":"-"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson("},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */"},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":93,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":110,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;"},{"lineNumber":111,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":112,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":117,"author":{"gitId":"-"},"content":" */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":121,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * browser url changes"},{"lineNumber":127,"author":{"gitId":"-"},"content":" */"},{"lineNumber":128,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":130,"author":{"gitId":"-"},"content":" selectPerson(index);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":133,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the"},{"lineNumber":134,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,"},{"lineNumber":141,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,"},{"lineNumber":145,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":148,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":150,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":158,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,"},{"lineNumber":162,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,"},{"lineNumber":166,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,"},{"lineNumber":170,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,"},{"lineNumber":174,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */"},{"lineNumber":177,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));"},{"lineNumber":179,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));"},{"lineNumber":181,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that"},{"lineNumber":193,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged."},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list"},{"lineNumber":195,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)"},{"lineNumber":196,"author":{"gitId":"-"},"content":" */"},{"lineNumber":197,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e"},{"lineNumber":203,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e"},{"lineNumber":204,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being"},{"lineNumber":205,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e"},{"lineNumber":206,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list."},{"lineNumber":207,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":208,"author":{"gitId":"-"},"content":" */"},{"lineNumber":209,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,"},{"lineNumber":210,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":211,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":212,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" expectedModel.updatePerson("},{"lineNumber":214,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);"},{"lineNumber":215,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":216,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {"},{"lineNumber":217,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException("},{"lineNumber":218,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,"},{"lineNumber":222,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);"},{"lineNumber":223,"author":{"gitId":"-"},"content":" }"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the"},{"lineNumber":227,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged."},{"lineNumber":228,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":229,"author":{"gitId":"-"},"content":" */"},{"lineNumber":230,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":235,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":236,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":237,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":238,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":239,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at"},{"lineNumber":240,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":247,"author":{"gitId":"-"},"content":" */"},{"lineNumber":248,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":249,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":250,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":251,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":272,"author":{"gitId":"-"},"content":" */"},{"lineNumber":273,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":274,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":275,"author":{"gitId":"-"},"content":""},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":277,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":281,"author":{"gitId":"-"},"content":" }"},{"lineNumber":282,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":13,"-":269}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,"},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" });"},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":70}}] +[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface).","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"* It is a Java application primarily targeted for students doing group projects.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"_Marco Jakob_.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":7,"-":26}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Charles Goh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://charlesgoh.me[homepage]] [https://github.com/charlesgoh[github]]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Jeffrey Goh","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Kelvin Lin","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esiloke[github]]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Wang Yi Ming","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1090[github]]","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"-":26}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started].","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"The `Storage` component,","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go.","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size. The first way is through the UI. The Class Diagram for this","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":"procedure is shown below:","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"The other method of calling changes in font size is through a CLI command. When the relevant command is entered,","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"the Command class calls MainWindow. The rest of the process flow is identical to that of the UI triggered font size","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"command.","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Image Placeholder","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of Task-related commands +","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Create new classes for all new commands +","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Simpler to implement. +","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure.","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Storage of Task objects +","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage.","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons** Any changes to the Person or Task","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" // ... list logic ...","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" // ... undo logic ...","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" executeUndoableCommand();","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" // ... delete logic ...","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct.","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the add, delete, list, select, and edit commands.","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Instead of making a new Logic object for each new command, polymorphism is used to implement the \"Task\" version of each command.","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"An example of using polymorphism to handle Person vs Task addition:","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":"public class AddCommand extends Command {","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Person(person);","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Task(task);","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_TASK;","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"The AddCommand will thus call a different constructor depending on the type of the argument supplied to it. To facilitate this, the respective Parser class must also be modified:","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(toAdd);","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The AddCommandParser checks the args to see if this is a task, then creates the object to be added, and creates a new AddCommand to handle the result. +","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"To support the addition of Task objects, the Storage component is modified to accept Task objects in a similar manner as to how Person objects are being stored.","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"[source, html]","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"Tasks objects are stored in the same level of hierarchy as Person objects, and during startup, are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book.","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Create new classes for all new commands +","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"**Pros:** Simpler to implement. +","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure.","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa.","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage.","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes.","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` method in UniquePersonList. It supports","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field.","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator.","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class.","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for this sort command implementation is shown below:","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort name desc`. The following sequence diagram","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works.","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted. The resulting list","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"charlesgoh"},"content":"is not returned, but will be reflected in the application\u0027s storage and graphical user interface.","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` class. +","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the person lists. Future changes to the implementation will be easier as a consequence. +","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList` will have to rely on the `SortCommand` class.","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for both user and developer and reduced complexity in implementation. +","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system.","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"charlesgoh"},"content":"The backup command makes use of both the model manager and the storage manager. The `LogicManager` class was","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"charlesgoh"},"content":"improved to support the accessing of storage value.","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"charlesgoh"},"content":"The backup command arguments are parsed through the `BackupCommandParser`, which passes control over to the","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class. If there is a file path specified by the user, then the `execute()` command within the","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class will save the backup file to that path. If not file path is specified, the backup file will be","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"charlesgoh"},"content":"saved to a default location.","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup`. The backup file will be saved to a default location:","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDefaultDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup testBackup.xml`. The following sequence diagram","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"charlesgoh"},"content":"demonstrates how this works:","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceCustomDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted.","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement backup command via Command Line Interface +","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Backing up data is easier and faster for users who are familiar with the commands. Less button clicks. +","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":"**Cons:** UI not as intuitive. Users who are not familiar with the application may not know about this feature +","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement backup command via GUI +","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for all users since the options are all graphical +","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hinders productivity. Excessive number of clicks to accomplish an essential task.","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Custom and/or Default file paths for backup file +","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implemented both types of commands +","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"charlesgoh"},"content":"**Pros:** User can choose either command option. Gives the user more choices +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May seem confusing to the user at first +","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement only the default option (save backup file to data directory of application) +","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Faster for the user to key in one word rather than a command with many words +","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Reduces choice for experienced users who may want to save to another location or use a different save name","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email` and `Address` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not.","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes.","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field.","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor.","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`.","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : Sequence Diagram for adding a Person with private fields_","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"jeffreygohkw"},"content":"@Override","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI.","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name.","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`.","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`.","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same.","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was.","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`.","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false.","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object.","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing.","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to.","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users.","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`.","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below.","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"_Figure 3.6.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object.","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`.","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`.","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`.","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`.","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`.","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all.","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"-"},"content":"**Alternative 2:** Enhance the functi-onality of EditCommand. +","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data.","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of `Person`s, a `CommandException` will be thrown.","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution.","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":"This code for this can be found below:","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"@Override","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"-"},"content":"_Figure 3.7.1 : Sequence Diagram for Locating a Person\u0027s Address_","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Create a seperate command `locate`. +","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users.","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`.","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once.","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`addtag 1 2 3 t/friends`) will be executed.","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"-"},"content":"The same operation will happen for `deletetag` command.","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"-"},"content":"in a similar way.","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book.","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"-"},"content":"public class AddTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"-"},"content":" // check whether the index within the range","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"-"},"content":" return new CommandResult();","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"-"},"content":"Suppose the user enter the `addtag 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"-"},"content":"_Figure 3.8.1 : Add Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"-"},"content":"The `deletetag` command works the same as `addtag` command with different name only.","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception.","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `addtag` and `deletetag` +","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list.","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle.","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `addtag` and `deletetag` +","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner.","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book.","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"-"},"content":"The `findtag` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`.","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first.","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar.","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences.","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`.","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String.","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"is for the tags to be excluded.","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"Suppose the user enter `findtag friends` command. The following sequence diagram shows how the find tag command works:","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"_Figure 3.9.1 : Find Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list.","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `findtag` +","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `findtag` +","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `findtag` command will be similar to the `find` command. +","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `findtag` in `FindCommand`. +","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things.","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":"*Logging Levels*","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation.","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":"There are three ways to run tests.","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"We have two types of tests:","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":"|`* * *` |user |add a new person |","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |first-time user |be able to see a user guide when I first start the program |be clear on how to use it","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with many social media accounts |be able to add my contacts\u0027 social media accounts to the address book |improve connectivity and learn more about my contacts","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|`*` |user with many persons in the address book |sort persons by name |locate a person easily","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |non tech-savvy user |have the option to fill out certain fields |use the address book without having to use the intimidating CLI.","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |error-prone user |have minor typos auto corrected |continue using the address book without correcting my mistakes","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"-"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"-"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found.","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found.","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person.","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person.","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid.","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail.","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made.","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone.","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands.","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands.","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3.","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands.","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands.","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message.","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid.","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1.","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed.","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure.","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse.","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0.","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing.","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"-"},"content":"[[mainstream-os]]","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"-"},"content":"Mainstream OS","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data.","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"-"},"content":"\u003d\u003d Product Survey","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"-"},"content":"*Product Name*","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"-"},"content":"Author: ...","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Pros:","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"-"},"content":"Cons:","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"-"},"content":"* ...","isFullCredit":true}],"authorContributionMap":{"charlesgoh":130,"jeffreygohkw":140,"Esilocke":169,"-":852}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT`","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"Address++ is an address book application that can store contacts, as well as maintain a list of ongoing tasks. You can use the various commands in Address++ to maintain, create, and delete your contacts, or tasks. +","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"Address++ is targeted at NUS students, such as those working on projects or assignments.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here].","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too large?","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"You can change the font sizes by clicking on the Font Size button and selecting any of the following options:","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"Keyboard shortcuts have been provided for your convenience.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"There is a limit to how much your font sizes can increase or decrease. Also, font sizes will increase for the","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"contacts entries and the todo list\u0027s entries.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"Format: `help` +","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1].","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a person/task: `add`","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book, be it a newly met project member, or your friend who is taking the same module as you. +","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"`add` can be replaced by `a` for faster input. +","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] r/[REMARK] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address` or `Remark` to be private by placing a `p` in front of the prefix. +","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears`","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"* `add n/Betsy Crowe t/friend e/betsycrowe@example.com b/29-02-1996 a/Newgate Prison p/1234567 t/criminal r/Stares at the wall`","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"* `add n/Ima Hidearu b/ a/ e/ p/ r/ t/secretive`","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"* `add n/Luke Groundswimmer p/ a/ e/ c/`","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"* `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate c/`","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"By adding the word `task`, you can use the same command to add a new task or deadline, such as a reminder of project deadlines. +","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"Format: `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"* Task deadlines should be in the format DD-MM-YYYY +","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 1 to 5 inclusive, with 5 being the highest priority +","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"* `add task n/Update documentation d/Update docs for V1.1 for CS2103T t/10-10-2017 p/4`","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"* `add task n/Buy new pencil p/2`","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a tag to persons : `addtag` (Since V1.2)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"You can use the `addtag` command to add tag for multiple persons in the address book. For example, you may wish to add tag `friends` to the first two persons in the address book. +","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"`addtag` can be replaced by `atag` for faster input. +","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"Format: `addtag INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"* You can add the tag of the person at the specific `INDEX`.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, addtag will add the tag to all contacts in the address book.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"`addtag 1 2 t/friends` +","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"Adds the friends tag of the 1st and 2nd person in the address book.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"`addtag t/acquaintance` +","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Adds the acquaintance tag to all contacts in the address book.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all persons : `list`","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts, or tasks, in the address book. +","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"Format: `list` +","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"Instead of typing out `list` every time, you can alternatively use `l` to shorten the command.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing a person : `edit`","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command.","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands.","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command.","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields.","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com` +","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/` +","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"* `edit 1 p/` +","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Removes the phone number of the 1st person.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `edit` will allow you to edit task details instead. You may wish to edit your task deadlines, for example, when your project schedule changes, or your task priorities, when a task becomes more urgent. +","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"Format: `edit task INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/5` +","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"Edits the priority of the 2nd task to be `5`.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/ t/` +","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"Removes the priority and deadline of the second task.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edittag` (Since v1.2)","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"You can use `edittag` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"`edittag` can be replaced by `et` for faster input. +","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"Format: `edittag TAGTOBERENAMED NEWTAGNAME` +","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different.","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `TAGTOBERENAMED` value.","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"* `edittag friends enemies` +","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"Changes the tag called `friends` to one called `enemies` instead. All existing contacts with a `friends` tag will now have an `enemies` tag instead.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS]`","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"Shorthand commands: `cp`","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields.","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI.","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI.","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy.","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"* `changeprivacy 1 p/false e/true` +","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Sets the phone number of the 1st person to be public and their email address to be private. The 1st person\u0027s phone number will be displayed, if available, while their email address will be hidden in the UI.","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":"* `cp 2 a/false n/true e/false` +","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":"Sets the address and email of the 2nd person to be public and their name to be private. The 2nd person\u0027s address and email will be displayed, if available, while their name will be hidden in the UI.","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite persons. For example, you may wish to set your girlfriend as your favourite contact. +","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"`favourite 2` +","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"Favourites the 2nd person in the address book.","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"`favourite 1` +","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"Favourite the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"Format: `showfavourite` +","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"`showfavourite` command: It will return an empty list if there is no favourite persons.","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"* `find John` +","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"Returns `john` and `John Doe`","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"* `find Betsy Tim John` +","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"Returns any person having names `Betsy`, `Tim`, or `John`","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `find` will allow you to sieve through your tasks, instead of your contacts. +","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"In addition to searching the name and description of tasks, you can also opt to filter your tasks by their priority. Simply include `p/PRIORITY` after all your other criteria to do so. +","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"All tasks with a priority higher than or equal to the value provided will be shown. +","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"Format: `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` (Priority search to be coming in v2.0) +","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"*Important note on `find` criteria*","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"* You can only search for names in Address++","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"Returns any task that has the word `update` in their names or descriptions","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* `find task update 4` +","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"Returns all tasks that has the word `update` in their names or descriptions","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `findtag` (Since V1.4)","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"You can use the `findtag` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/not` in front of the `friends`. +","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"`findtag` can be replaced by `ftag` for faster input. +","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"Format: `findtag KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"* `findtag friends` +","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"Returns any persons having tag `friends`","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"* `findtag friends colleagues` +","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"Returns any person having tags `friends` or `colleagues`","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"* `findtag /notfriends` +","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"Returns any persons not have tag `friends`","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"* `findtag classmates /notfriends` +","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"Returns any person have tags `classmates` but not have tag `friends`","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"*Important note on `findtag` criteria","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `friend` will not match `friends`","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"* There is no space `/not` and tag name e.g. `/not friends` will not match `/notfriends`","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts or tasks from the address book. The `delete` command will help you clean up obsolete or completed tasks, or contacts who you may not wish to associate with anymore. +","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"`delete 2` +","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"Deletes the 2nd person in the address book.","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"`delete 1` +","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"Deletes the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"In order to delete tasks, an additional `task` keyword must be specified after the `delete` command. +","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Format: `delete task INDEX`+","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"* Deletes the person or task at the specified `INDEX`.","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"`delete task 2` +","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Deletes the 2nd task in the address book.","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"`delete task 1` +","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"Deletes the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `deletetag` (Since V1.2)","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"You can use `deletetag` to delete the tag of multiple persons from the address book. +","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"`deletetag` can be replaced by `dtag` for faster input. +","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"Format: `deletetag INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`.","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"* If you do not key in any index, deletetag will delete the tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"`deletetag 1 2 t/friends` +","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag of the 1st and 2nd person in the address book.","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"`deletetag t/friends` +","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sorting your contact list : `sort`","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts by any field in ascending or descending order using the `sort` command +","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"`sort` can be replaced by `so` for faster input. +","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":"Format: `sort FIELD ORDER` +","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contact by any field in either ascending or descending order","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"jeffreygohkw"},"content":"* Field parameters are limited to the following fields: NAME, PHONE, EMAIL, ADDRESS.","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC.","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"jeffreygohkw"},"content":"* `sort name asc` +","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in ascending order by the name field.","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"jeffreygohkw"},"content":"* `sort address desc` +","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in descending order by the address field.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Backing up your data : `backup`","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"`backup` can be replaced by `bk` for faster input. +","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [RELATIVE LOCATION]` +","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"charlesgoh"},"content":"* Allows you to backup your saved data on Address++ in another file.","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"charlesgoh"},"content":"* You can backup your data in the default location or you can specify your desired save location.","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"charlesgoh"},"content":"* You can use the default save name or use your own.","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"charlesgoh"},"content":"* `backup` or `bk` +","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"charlesgoh"},"content":"This command will help you back up in the default save location --\u003e In the data directory of your application.","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":"* `backup ./test.xml` or `bk ./test.xml` +","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"charlesgoh"},"content":"This saves the backup file in the current data directory, with the name `test.xml`.","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact or task, and look at it in greater detail, such as examining a task with a very long description, or checking out the full address of one of your friends. +","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"Format (person): `select INDEX` +","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"`select 2` +","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":"Selects the 2nd person in the address book.","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":"`select 1` +","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":"Selects the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"To select a task, a `task` keyword must additionally be specified after `select` +","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Format: `select task INDEX` +","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Selecting a task will load a list of the people who are assigned to it, instead of the Google search page.","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"`select task 2` +","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Selects the 2nd task in the address book.","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"`select task 1` +","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"Selects the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"jeffreygohkw"},"content":"* `list` +","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"jeffreygohkw"},"content":"`locate 2` +","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 2nd person in the address book on Google Maps.","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"jeffreygohkw"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"jeffreygohkw"},"content":"`locate 1` +","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"jeffreygohkw"},"content":"Locates the address of the 1st person in the results of the `find` command on Google Maps.","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide a specific and valid address.","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps.","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Mark task as complete : `setcomplete` (To be coming in V2.0)","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed.","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"`setcomplete 2` +","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as completed.","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"`setcomplete 1` +","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as completed.","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Mark task as incomplete : `setincomplete` (To be coming in V2.0)","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete.","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"* `list task` +","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"`setincomplete 2` +","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as incomplete.","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"`setincomplete 1` +","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as incomplete.","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign contacts to task : `assign` (Since V1.4)","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"`list task` +","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"`assign 1 4 5 to/2` +","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"Assigns the 1st, 4th and 5th contacts to 2nd task in the address book.","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"`find task update` +","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"`assign 2 to/1` +","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Assigns the 2nd person in the address book to the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismiss contacts from task : `dismiss` (Since V1.4)","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"Examples:","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"`list task` +","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"`dismiss 1 4 5 from/2` +","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"Dismisses 1st, 4th and 5th contacts in the address book from the 2nd task.","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"* `list` +","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"`find task update` +","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"`dismiss 2 from/1` +","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"Dismisses the 2nd person in the address book from the 1st task in the results of the `find task` command.","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"Format: `history` +","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"Format: `undo` +","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"-"},"content":"Undoable commands: those commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`).","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"-"},"content":"`list` +","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":"* `select 1` +","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":"`list` +","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":"`undo` +","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"-"},"content":"The `undo` command fails as there are no undoable commands executed previously.","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":"`clear` +","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"* `list` +","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"`unfavourite 2` +","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"Unfavourites the 2nd person in the address book.","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"* `find Betsy` +","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"`unfavourite 1` +","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"Unfavourite the 1st person in the results of the `find` command.","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` wasn\u0027t necessary. `redo` reverses the most recent `undo` command. +","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"Format: `redo` +","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"`redo` +","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"The `redo` command fails as there are no `undo` commands executed previously.","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"-"},"content":"* `delete 1` +","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"-"},"content":"`clear` +","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"-"},"content":"`redo` (reapplies the `clear` command) +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"Format: `clear` +","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"Format: `exit`","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4].","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually.","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window.","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window.","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Using the browser","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"jeffreygohkw"},"content":"If you click on a box containing a contact, an internet browser on the right side of the window.","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"jeffreygohkw"},"content":"* Performing a left click will allow you to perform a search on Google for the name of the contact, and is equivalent to doing a `select` on that oerson.","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"jeffreygohkw"},"content":"* If a person\u0027s name or address is set to private, the browser will not perform a search if you click on their box.","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"* Right clicking on the browser will allow you to go to the previous or next page, as well as reload the page.","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Exporting the data","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Address book data can be exported in a number of different formats, thus allowing the data to be compatible to any device.","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"-"},"content":"To export data, click on `File -\u003e Export As...` or use the keyboard shortcut kbd:[CTRL]+kbd:[E]` and select the new location and file name for the export file in the pop-up window.","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Auto-Complete: Learning Your Typing Habits","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"The program will learn your typing habits and give autocomplete suggestions that become more accurate over time.","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location.","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665, b/29-02-1996 f/SOC c/www.enteryourcalendarurlhere.com t/friend t/colleague`","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"jeffreygohkw"},"content":"* *Add with private fields* : `add or a pn/NAME pp/PHONE_NUMBER pe/EMAIL pa/ADDRESS b/BIRTHDAY f/FACULTY c/[GOOGLE CALENDAR URL] [t/TAG]...` +","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665`","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task n/NAME d/[DESCRIPTION] by/[DEADLINE] p/[PRIORITY]` +","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"e.g. `add task n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high`","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"* *Add tag* : `addtag INDEX t/[TAG]` +","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"e.g. `addtag 1 2 t/friends`","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE]` +","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false`","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"* *Clear person* : `clear`","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"* *Clear tasks* : `cleartask`","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"e.g. `delete 3`","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task INDEX` +","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task 4`","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"* *Delete tag* : `deletetag INDEX t/[TAG]` +","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"e.g. `deletetag 1 2 t/friends`","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] c/[GOOGLE CALENDAR URL] [a/ADDRESS] [t/TAG]...` +","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"e.g. `edit task 2 p/veryhigh`","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edittag TAGTOCHANGE NEWTAGNAME` +","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"e.g. `edittag friends enemies`","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"e.g. `favourite 1`","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"e.g. `showfavourite`","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"e.g. `find James Jake`","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"* *Find tag* : `findtag Tag [MORE_TAGS]` +","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"e.g. `findtag friends`","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"e.g. `find task update p/high`","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"* *Help* : `help`","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"* *List persons* : `list`","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":"* *List tasks* : `list task`","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate`","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":"e.g.`select 2`","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task INDEX` +","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"e.g.`select task 2`","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":"* *History* : `history`","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":"* *Undo* : `undo`","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":"* *Redo* : `redo`","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[[F1]","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary.","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":70,"jeffreygohkw":88,"Esilocke":252,"-":373}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 3, 0, true);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model, storage);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model, Storage storage) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" Command command \u003d addressBookParser.parseCommand(commandText);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return result;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } finally {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" history.add(commandText);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":8,"-":63}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Adds a person or task to the address book.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"PHONE \"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"ADDRESS \"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"friends \"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"owesMoney\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Adds a task to the address book. \"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"DESCRIPTION \"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"DEADLINE \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"PRIORITY \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_SUCCESS \u003d \"New task added: \\n%1$s\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private boolean isTask \u003d false;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public AddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d null;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@Code ReadOnlyTask}","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d null;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" isTask \u003d true;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_TASK_SUCCESS, taskToAdd));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddCommand)) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } else if (taskToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).taskToAdd \u003d\u003d null) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert(personToAdd !\u003d null);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddCommand) other).personToAdd);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else if (personToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).personToAdd \u003d\u003d null) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assert(taskToAdd !\u003d null);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddCommand) other).taskToAdd);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":60,"wangyiming1019":1,"-":58}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"addtag\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"atag\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all persons in the current list.\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends Command {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" ~/Desktop\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" super();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(storage);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (args.equals(\"\")) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBookDefault(model.getAddressBook());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBook(model.getAddressBook(), args);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d person.getName();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d person.getPhone();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d person.getEmail();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d person.getAddress();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Remark r \u003d person.getRemark();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Boolean f \u003d person.getFavourite();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e t \u003d person.getTags();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" n.setPrivate(pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" p.setPrivate(pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" e.setPrivate(pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" a.setPrivate(pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" r.setPrivate(pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(n, p, e, a, f, r, t);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return index;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of nameIsPrivate","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of phoneIsPrivate","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of emailIsPrivate","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of addressIsPrivate","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of remarkIsPrivate","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of remarkIsPrivate","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getRemarkIsPrivate() {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" return remarkIsPrivate;","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remarkIsPrivate);","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":273}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Clears the address book.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"%s has been cleared!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_PERSONS \u003d \"Contact list\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_TASKS \u003d \"Task list\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_ALL \u003d \"Address book\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private boolean isClearTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private boolean isClearPerson;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private boolean isClearAll;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Prefix type;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String cleared;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public ClearCommand() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d true;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" type \u003d null;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_ALL;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public ClearCommand(Prefix type) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d true;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_TASK;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_TASKS;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d true;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_PERSON;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_PERSONS;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"An invalid type was provided!\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (isClearAll) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else if (isClearTask) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } else if (isClearPerson) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assert false : \"At least one boolean must be true.\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, cleared));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public abstract class Command {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" protected MainWindow mainWindow;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" protected CommandHistory history;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * access to the dependencies.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a person or task identified using its last displayed index from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person or task identified by the index number used in the last listing.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DELETE_TASK_SUCCESS \u003d \"Deleted Task: %1$s\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_PERSON \u003d 0;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_TASK \u003d 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private int type;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public DeleteCommand(Index targetIndex, int objectType) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.type \u003d objectType;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (targetIndex.getZeroBased() \u003e\u003d tasksList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_TASK) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (type \u003d\u003d DELETE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TASK_SUCCESS, taskToDelete));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex)","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.type \u003d\u003d ((DeleteCommand) other).type); // state check","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28,"wangyiming1019":1,"-":47}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"deletetag\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"dtag\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"This is an nonexistent tag in the given persons list.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":127}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends Command {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toDismiss)) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toDismiss);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Edits the details of an existing person or task in the address book.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" + \"by the index number used in the last person listing. \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Edits the details of the task identified \"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: \\n%1$s\";","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TASK_SUCCESS \u003d \"Edited Task: \\n%1$s\";","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @param index of the person in the filtered person list to edit","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the person with","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d null;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public EditCommand(Index index, EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d null;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //TODO see if we can use Singleton pattern to handle the Descriptors.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, editedTask));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedTags);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().isPrivate()) {","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().isPrivate()) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editTaskDescriptor}.","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" assert taskToEdit !\u003d null;","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" TaskName updatedTaskName;","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" Description updatedDescription;","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" Deadline updatedDeadline;","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" Priority updatedPriority;","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" Assignees assignees;","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updatedState;","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" // You cannot edit assignees or state using edit command","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" assignees \u003d taskToEdit.getAssignees();","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" updatedState \u003d taskToEdit.getCompleteState();","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState);","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":" if (this.isTask !\u003d ((EditCommand) other).isTask) {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" if (this.isTask) {","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":" * corresponding field value of the person.","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" private Name name;","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":" private Phone phone;","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":" private Email email;","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" private Address address;","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" private Boolean favourite;","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" private Remark remark;","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":" this.name \u003d toCopy.name;","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" this.phone \u003d toCopy.phone;","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" this.email \u003d toCopy.email;","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" this.address \u003d toCopy.address;","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d toCopy.favourite;","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d toCopy.remark;","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" this.tags \u003d toCopy.tags;","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"charlesgoh"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark, this.tags);","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"charlesgoh"},"content":" public Optional\u003cRemark\u003e getRemark() {","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"charlesgoh"},"content":" return Optional.ofNullable(remark);","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"-"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"-"},"content":" return Optional.ofNullable(tags);","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags());","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task.","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":" private Description description;","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":" private Priority priority;","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority);","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority());","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":199,"Esilocke":159,"wangyiming1019":14,"-":193}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"edittag\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"etag\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the specified tag \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(personToFavourite);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Finds and lists all persons or tasks in address book whose name contains any of the argument keywords.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Finds all tasks whose names or descriptions \"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d null;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public FindCommand(TaskContainsKeywordPredicate predicate) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d null;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof FindCommand)) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask !\u003d ((FindCommand) other).isTask) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return this.taskPredicate.equals(((FindCommand) other).taskPredicate);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return this.personPredicate.equals(((FindCommand) other).personPredicate);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36,"wangyiming1019":1,"-":30}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends Command {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"findtag\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"ftag\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose tags contain any of \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" friends colleagues\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person: %1$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":58}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as complete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the specified {@Code task} as incomplete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons by chosen \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS] and by order [ASC/DESC]. Case insensitive\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [FIELD] [ORDER]\\n\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" email desc\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All persons in address book successfully sorted\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private final String field;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" private final String order;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String field, String order) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public String getField() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return this.field;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return this.order;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":48,"jeffreygohkw":2,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" model.unfavouritePerson(personToUnfavourite);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":64}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" PREFIX_REMARK_PRIVATE, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE,","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" PREFIX_EMAIL_PRIVATE, PREFIX_ADDRESS_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_DEADLINE,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" PREFIX_DESCRIPTION, PREFIX_PRIORITY, PREFIX_TASK);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d constructTask(args);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(taskToAdd);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d constructPerson(args);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(personToAdd);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" private static ReadOnlyPerson constructPerson(String args) throws ParseException {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PHONE)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)))) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_EMAIL)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)))) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_ADDRESS)","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)))) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_REMARK)","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)))) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, tagList);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyTask constructTask(String args) throws ParseException {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION))) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DEADLINE))) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PRIORITY))) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" TaskName name;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Description description;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" Priority priority;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" description \u003d ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get();","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" deadline \u003d ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get();","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" priority \u003d ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d new Task(name, description, deadline, priority);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return task;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":83,"Esilocke":69,"-":35}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser implements Parser\u003cAddTagCommand\u003e {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":70}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses user input.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class AddressBookParser {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @param userInput full user input string","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @return the command based on the user input","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public Command parseCommand(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" case SelectCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" return new HistoryCommand();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" return new UndoCommand();","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" return new RedoCommand();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":9,"Esilocke":25,"wangyiming1019":41,"-":91}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * filepath.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_PERSON);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_TASK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person\");","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"pri/\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"Esilocke":6,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(filteredString.trim());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":12,"-":28}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":67}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d parseIndexes(target);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d parseIndexes(persons);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * the value in the String.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" int parsedInt;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return constructTaskDescriptor(args);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return constructPersonDescriptor(args);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Person object. **/","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructPersonDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" Index index;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return new EditCommand(index, editPersonDescriptor);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Task object. **/","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructTaskDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return new EditCommand(index, editTaskDescriptor);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * {@code Set\u003cTag\u003e} containing zero tags.","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assert tags !\u003d null;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" if (tags.isEmpty()) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":47,"-":78}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return tagList;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" trimmedArgs \u003d argsWithNoTaskPrefix.trim();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_TASK_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return new FindCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords)));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":14,"-":31}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new SelectCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an SelectCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class ParserUtil {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * trimmed.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer).","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Name to be private if true.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Phone to be private if true.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Address to be private if true.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" * Takes in a (@code boolean isPrivate) which will set the Remark to be private if true.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Email to be private if true.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(tags);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" for (String tagName : tags) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" return tagSet;","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present.","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present.","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":29,"Esilocke":39,"-":104}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 0;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 1;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 2) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":50}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" //// person-level operations","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" persons.add(newPerson);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" // used for checking person tag references","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" //// tag-level operations","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" tags.add(t);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" //// task-level operations","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists.","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}.","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" //// util methods","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" // TODO: refine later","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList();","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" return tags.asObservableList();","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":11,"Esilocke":106,"wangyiming1019":17,"-":181}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * The API of the Model component.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public interface Model {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /** Adds the given person */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by field in ascending (asc) or descending (desc) order","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":48,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ModelManager() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" int index;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" updateFilteredPersonList(new NameContainsFavouritePredicate());","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToAssignTo.getTaskName();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToAssignTo.getDescription();","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToAssignTo.getDeadline();","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToAssignTo.getPriority();","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToAssignTo.getCompleteState();","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" assignees.assign(personsToAssign);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToAssignTo, updatedTask);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d taskToDismissFrom.getTaskName();","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" Description description \u003d taskToDismissFrom.getDescription();","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d taskToDismissFrom.getDeadline();","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d taskToDismissFrom.getPriority();","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d taskToDismissFrom.getCompleteState();","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assignees.dismiss(personsToDismiss);","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" updateTask(taskToDismissFrom, updatedTask);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" * {@code addressBook}","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":145,"wangyiming1019":59,"-":116}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public Address(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(address);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":50}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Validates given email.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public Email(String email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this(email);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27,"Esilocke":6,"-":45}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String fullName;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Name(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.fullName \u003d trimmedName;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this(name);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.fullName.equals(((Name) other).fullName)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return fullName.hashCode();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27,"-":55}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/not\")) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(4));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Every field must be present and not null.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Boolean favourite, Remark remark, Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" source.getRemark(), source.getTags());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public Name getName() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return name.get();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return phone;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public Phone getPhone() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.get();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return email;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Email getEmail() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return email.get();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return address;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public Address getAddress() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return address.get();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return favourite;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark.get();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * if modification is attempted.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":15,"wangyiming1019":23,"-":136}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given phone number.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":28,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" builder.append(getName())","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" .append(\" Phone: \")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" .append(getPhone())","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" .append(\" Email: \")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .append(getEmail())","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .append(\" Address: \")","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" .append(getAddress())","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Tags: \");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" return;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this(remark);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return \"\u003cPrivate Remark\u003e\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" return value;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":79}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the list contains an equivalent person as the given argument.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public boolean contains(ReadOnlyPerson toCheck) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" * Adds a person to the list.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" internalList.add(new Person(toAdd));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" internalList.set(index, new Person(editedPerson));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Removes the equivalent person from the list.","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" if (!personFoundAndDeleted) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" return personFoundAndDeleted;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list.","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" setPersons(replacement);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().fullName.compareTo(o2.getName().fullName);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" public Iterator\u003cPerson\u003e iterator() {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":171,"wangyiming1019":31,"-":42}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Assignees {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private HashSet\u003cReadOnlyPerson\u003e assignedList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public Assignees(HashSet\u003cReadOnlyPerson\u003e assignees) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public Assignees() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void assign(ArrayList\u003cReadOnlyPerson\u003e personsToAssign) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToAssign) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assignedList.add(p);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public void dismiss(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : personsToDismiss) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (assignedList.contains(p)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(p);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyPerson toFind) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return assignedList.contains(toFind);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Calendar;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Deadline {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DEADLINE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task deadlines must be in the format DD-MM-YYYY, with \u0027-\u0027, \u0027.\u0027, \u0027.\u0027 as separators\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" Deadline format: DDSMMSYYYY, in DAY-MONTH-YEAR format.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" S represents the separators, and can be any of these characters: - . /","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_VALIDATION_REGEX \u003d \"\\\\d\\\\d[-./]\\\\d\\\\d[-./]\\\\d\\\\d\\\\d\\\\d.*\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String DEADLINE_PERIOD_DELIMITER \u003d \".\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" Expected indexes for the separator characters","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_1 \u003d 2;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_2 \u003d 5;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_DAY_INDEX \u003d 0;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_MONTH_INDEX \u003d 1;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_YEAR_INDEX \u003d 2;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public final Calendar calendar;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } else if (deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String trimmedDeadline \u003d deadline.trim();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (!isValidDeadline(trimmedDeadline)) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DEADLINE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDeadline;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d Calendar.getInstance();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" calendar.clear();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" char separator \u003d trimmedDeadline.charAt(DEADLINE_SEPARATOR_INDEX_1);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d trimmedDeadline.split(Character.toString(separator));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.calendar.set(year, month, day);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is in valid deadline format.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(DEADLINE_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } else if (test.charAt(DEADLINE_SEPARATOR_INDEX_1) !\u003d test.charAt(DEADLINE_SEPARATOR_INDEX_2)) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return isValidDate(test);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDate(String test) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" Calendar testCalendar \u003d setCalendar(test);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" testCalendar.setLenient(false);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" testCalendar.getTime();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Returns a Calendar object that represents the given date string.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private static Calendar setCalendar(String date) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" Calendar result \u003d Calendar.getInstance();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" result.clear();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String separator \u003d Character.toString(date.charAt(DEADLINE_SEPARATOR_INDEX_1));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (separator.equals(DEADLINE_PERIOD_DELIMITER)) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" separator \u003d \"\\\\.\";","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d date.split(separator);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" result.set(year, month, day);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return result;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":131}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Priority {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 1 to 5, inclusive, where 1 represents the lowest priority\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 1;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Validates given priority.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Integer.parseInt(trimmedPriority);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedPriority;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Priority) other).value)); // state check","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":83}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * by default.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return taskName.get();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return description.get();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return deadline.get();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return priority.get();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return assignees.get();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return state.get();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return description;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return deadline;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return priority;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return assignees;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" String printableState;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return printableState;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":164}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c keywords.size(); i++) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String keyword \u003d keywords.get(i);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)); // state check","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskName {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public final String taskName;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list.","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return taskFoundAndDeleted;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":124}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task.","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" return new Person[] {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"),","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"),","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"),","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"),","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"),","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"),","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return sampleAb;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (String s : strings) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook cannot be null.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException if there was any problem writing to the file.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBook(ReadOnlyAddressBook addressBook, String args) throws IOException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" void changeFilePath(String fp, UserPrefs u);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" //@author","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":20,"jeffreygohkw":1,"-":31}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath() + \"-backup.xml\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"jeffreygohkw":8,"-":92}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private String name;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private String phone;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String email;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private String address;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private String remark;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().fullName;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().isPrivate();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().isPrivate();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().isPrivate();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().isPrivate();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().isPrivate();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, tags);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":66,"wangyiming1019":3,"-":43}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private String name;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private String description;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private String deadline;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private String priority;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private String state;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" priority \u003d source.getPriority().value;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, new Assignees(), state);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":61}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath + \"-backup.xml\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":17,"-":74}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private WebView browser;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public BrowserPanel() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" loadDefaultPage();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().fullName.replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027saddress if their address is not private","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void loadPage(String url) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a default HTML file with a background that matches the general theme.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDefaultPage() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(defaultPage.toExternalForm());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * Frees resources allocated to the browser.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" public void freeResources() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" browser \u003d null;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" loadPersonPage(event.getNewSelection().person);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":66,"-":48}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Stage primaryStage;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" // Set dependencies","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" // Configure the UI","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" setIcon(ICON);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" setWindowMinSize();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" setAccelerators();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return primaryStage;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the accelerator of a MenuItem.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param keyCombination the KeyCombination value of the accelerator","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.setAccelerator(keyCombination);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" /*","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" * TODO: the code below can be removed once the bug reported here","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" * is fixed in later version of SDK.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * not work when the focus is in them because the key event is consumed by","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * the TextInputControl(s).","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * For now, we add following event filter to capture such key events and open","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" * help window purposely so to support accelerators even when focus is","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * in CommandBox or ResultDisplay.","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" menuItem.getOnAction().handle(new ActionEvent());","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" event.consume();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" });","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Fills up all the placeholders of this window.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" void fillInnerParts() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" browserPanel \u003d new BrowserPanel();","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" void hide() {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.hide();","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" private void setTitle(String appTitle) {","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setTitle(appTitle);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the given image as the icon of the main window.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" private void setIcon(String iconSource) {","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default size based on user preferences.","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowMinSize() {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" primaryStage.setMinWidth(MIN_WIDTH);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the current size and the position of the main Window.","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" GuiSettings getCurrentGuiSetting() {","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" personListPanel.increaseFontSize();","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.increaseFontSize();","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":" personListPanel.decreaseFontSize();","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.decreaseFontSize();","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" personListPanel.resetFontSize();","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" taskListPanel.resetFontSize();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Opens the help window.","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" public void handleHelp() {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" helpWindow.show();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" void show() {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" primaryStage.show();","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" raise(new OpenRequestEvent());","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" raise(new SaveAsRequestEvent());","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" private void handleExit() {","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":" return this.personListPanel;","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":" void releaseResources() {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" browserPanel.freeResources();","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":" handleHelp();","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":212,"Esilocke":8,"-":121}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" * @param tag","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * @return","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" * @param person","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" });","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" return name;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" return phone;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return address;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return email;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":69,"wangyiming1019":37,"-":81}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Panel containing the list of persons.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d 0;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}.","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" setText(null);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":38,"-":86}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" return true;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" if (!(other instanceof TaskCard)) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return false;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // state check","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" TaskCard card \u003d (TaskCard) other;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 task.equals(card.task);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" return taskName;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return description;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return deadline;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return priority;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":63,"Esilocke":75}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 20;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d 0;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map(","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" setText(null);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":29,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" //Set the application icon.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" mainWindow.hide();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" String contentText) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" alert.setTitle(title);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.showAndWait();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" System.exit(1);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.exception);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":4,"-":120}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code AddCommand}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class AddCommandIntegrationTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" String.format(AddCommand.MESSAGE_SUCCESS, validPerson), expectedModel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Generates a new {@code AddCommand} which upon execution, adds {@code person} into the {@code model}.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private AddCommand prepareCommand(Person person, Model model) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":53}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddCommandTest {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d getAddCommandForTask(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddCommand.MESSAGE_TASK_SUCCESS, validTask), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" getAddCommandForTask(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommand \u003d new AddCommand(paper);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" AddCommand addPencilCommand \u003d new AddCommand(pencil);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommandCopy \u003d new AddCommand(paper);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" // add person vs add task -\u003e returns false","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertFalse(addAliceCommand.equals(addPaperCommand));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person.","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddCommand with the details of the given person.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private AddCommand getAddCommandForTask(Task task, Model model) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AddCommand command \u003d new AddCommand(task);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateDataException when trying to add a person or task.","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added.","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingObjectAdded extends ModelStub {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":121,"wangyiming1019":24,"-":160}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index task) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, task);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":120}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"false\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":129}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_FAVOURITE \u003d \"false\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"20-20-20000\"; // bad date format","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_AMY;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_BOB;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PENCIL;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PAPER;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" static {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_AMY).withFavourite(VALID_FAVOURITE)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_BOB).withFavourite(VALID_FAVOURITE)","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" // only do so by copying its components.","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" command.execute();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" } catch (CommandException e) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" final String[] splitName \u003d person.getName().fullName.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":12,"Esilocke":34,"wangyiming1019":16,"-":128}},{"path":"src/test/java/seedu/address/logic/commands/DeleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeleteCommand}.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class DeleteCommandTest {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommand \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteSecondCommand \u003d new DeleteCommand(INDEX_SECOND_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommandCopy \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns a {@code DeleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" private DeleteCommand prepareCommand(Index index, int type) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(index, type);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" deleteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return deleteCommand;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":12,"-":107}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index task) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, task);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":121}},{"path":"src/test/java/seedu/address/logic/commands/EditCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditCommand.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class EditCommandTest {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(indexLastPerson, descriptor);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex,","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" final EditCommand standardCommand \u003d new EditCommand(INDEX_FIRST_PERSON, DESC_AMY);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" EditCommand commandWithSameValues \u003d new EditCommand(INDEX_FIRST_PERSON, copyDescriptor);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_SECOND_PERSON, DESC_AMY)));","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_BOB)));","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" * Returns an {@code EditCommand} with parameters {@code index} and {@code descriptor}","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" private EditCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d new EditCommand(index, descriptor);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" editCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" return editCommand;","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":2,"-":169}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent() throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public AddressBook prepareAddressBook() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":54}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code FindCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class FindCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" FindCommand findFirstCommand \u003d new FindCommand(firstPredicate);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" FindCommand findSecondCommand \u003d new FindCommand(secondPredicate);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" FindCommand findFirstCommandCopy \u003d new FindCommand(firstPredicate);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" FindCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Parses {@code userInput} into a {@code FindCommand}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private FindCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" FindCommand command \u003d","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(FindCommand command, String expectedMessage, List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class RedoCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Collections.emptyList(), Arrays.asList(deleteCommandTwo, deleteCommandOne));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in redoStack","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // single command in redoStack","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // no command in redoStack","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":50}},{"path":"src/test/java/seedu/address/logic/commands/SelectCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectCommand}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class SelectCommandTest {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommand \u003d new SelectCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" SelectCommand selectSecondCommand \u003d new SelectCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" SelectCommand selectFirstCommandCopy \u003d new SelectCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * is raised with the correct index.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d selectCommand.execute();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertEquals(String.format(SelectCommand.MESSAGE_SELECT_PERSON_SUCCESS, index.getOneBased()),","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" JumpToListRequestEvent lastEvent \u003d (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * Executes a {@code SelectCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * is thrown with the {@code expectedMessage}.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" selectCommand.execute();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * Returns a {@code SelectCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" private SelectCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" SelectCommand selectCommand \u003d new SelectCommand(index);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" selectCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" return selectCommand;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":139}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setCompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, setCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(setIncompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, setIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class UndoCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Arrays.asList(deleteCommandOne, deleteCommandTwo), Collections.emptyList());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" deleteCommandOne.execute();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteCommandTwo.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // multiple commands in undoStack","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" // single command in undoStack","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no command in undoStack","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":51}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/parser/AddCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class AddCommandParserTest {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // multiple tags - all accepted","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" new AddCommand(expectedPersonMultipleTags));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // zero tags","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY, new AddCommand(expectedPerson));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // missing name prefix","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" // missing phone prefix","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + VALID_PHONE_BOB","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // missing email prefix","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" // missing address prefix","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + VALID_ADDRESS_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" // missing description prefix","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" // missing deadline prefix","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + VALID_DEADLINE_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" // missing priority prefix","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" // invalid phone","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" // invalid email","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" // invalid tag","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" // invalid deadline","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" // invalid priority","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Priority.MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":33,"Esilocke":89,"-":114}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command \u003d (AddCommand) parser.parseCommand(TaskUtil.getAddCommand(task));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddCommand(task), command);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(task), command);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_TASK, DELETE_TYPE_TASK), command);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"wangyiming1019"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task));","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\");","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\") instanceof ExitCommand);","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"wangyiming1019"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"wangyiming1019"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" FindCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindCommand(new TaskContainsKeywordPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\") instanceof HelpCommand);","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\") instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" parser.parseCommand(\"histories\");","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\") instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"wangyiming1019"},"content":" parser.parseCommand(\"histories\");","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD) instanceof ListCommand);","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\") instanceof ListCommand);","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS) instanceof ListCommand);","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\") instanceof ListCommand);","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWord() throws Exception {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWordWithInput() throws Exception {","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD + \" test.xml\") instanceof BackupCommand);","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAlias() throws Exception {","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAliasWithInput() throws Exception {","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS + \" test.xml\") instanceof BackupCommand);","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"redo 1\") instanceof RedoCommand);","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased());","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"undo 3\") instanceof UndoCommand);","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":" parser.parseCommand(\"\");","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"-"},"content":" parser.parseCommand(\"unknownCommand\");","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":75,"Esilocke":147,"wangyiming1019":80,"-":148}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * outside of the DeleteCommand code. For example, inputs \"1\" and \"1 abc\" take the","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * same path through the DeleteCommand, and therefore we test only one of them.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class DeleteCommandParserTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\",","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_TASK));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\",","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23,"-":29}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \",","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectCommandParserTest}.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectCommandParserTest","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"asc\",","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"desc\",","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"name\",","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"phone\",","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"email\",","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"address\",","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no field or order","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\",","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArguments_success() throws ParseException {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand expectedCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand actualCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name asc\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name desc\");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone asc\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone desc\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email asc\");","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email desc\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address asc\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address desc\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":101}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":106,"Esilocke":18,"-":93}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.isPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":20}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.isPrivate());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":39}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.isPrivate());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":25}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.isPrivate());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":11,"-":24}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"-04-17\")); // missing day","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04--17\")); // missing month","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04\")); // missing year","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"day-04-17\")); // invalid day","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-month-17\")); // invalid month","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-year\")); // invalid year","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"32-04-17\")); // impossible day","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-13-17\")); // impossible month","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04--1\")); // impossible year","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"0-04-17\")); // incomplete day","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-0-17\")); // incomplete month","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-1\")); // incomplete year","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-201\")); // incomplete year","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04/17\")); // inconsistent separators","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-042017\")); // missing separator","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // valid deadlines","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04/04/2017\")); // slashes","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04.04.2017\")); // dots","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":44}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"0\")); // priority out of range","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * that we are building.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":9,"-":101}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonBuilder {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private Person person;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public PersonBuilder() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" defaultRemark, defaultTags);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" public Person build() {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" return this.person;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":18,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().isPrivate());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":91}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * A utility class for Person.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class PersonUtil {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" return AddCommand.COMMAND_WORD + \" \" + getPersonDetails(person);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" sb.append(PREFIX_NAME + person.getName().fullName + \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach(","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" );","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"-":38}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Task task;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public Task build() {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" return this.task;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" return AddCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + task.getPriority().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":35}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class TypicalPersons {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // Manually added","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return ab;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":15,"wangyiming1019":15,"-":67}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").build();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\")","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").build();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").build();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":76}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" // default web page","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // associated web page of a person","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" postNow(selectionChangedEventStub);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedPersonUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + ALICE.getName().fullName.replaceAll(\" \", \"+\") + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPersonUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":31,"-":34}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultipler());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultipler(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultipler(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultipler(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final JumpToListRequestEvent JUMP_TO_SECOND_EVENT \u003d new","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" JumpToListRequestEvent(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void handleJumpToListRequestEvent() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true}],"authorContributionMap":{"charlesgoh":60}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"-":94}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getPriority().value, actualCard.getPriority());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":24,"-":72}},{"path":"src/test/java/seedu/address/ui/testutil/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.GuiUnitTest;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // no tags","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * -\u003e added","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" String command \u003d \" \" + AddCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" 1\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e rejected */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e rejected */","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and verifies that the command box displays","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" * an empty string, the result display box displays the success message of executing {@code AddCommand} with the","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" * details of {@code toAdd}, and the model related components equal to the current model added with {@code toAdd}.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged.","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * instead.","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" * {@code expectedModel}.","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":34,"-":226}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void clear() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS, TYPE_ALL);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":97}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson(","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * browser url changes","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" selectPerson(index);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"-":269}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":70}}] diff --git a/src/systemtest/resources/ConfigSystemTest/dateRangeWithModifiedDateTimeInLines/expected/reposense_testrepo-Beta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/dateRangeWithModifiedDateTimeInLines/expected/reposense_testrepo-Beta_master/authorship.json index 1a6fb191ff..98231a8e00 100644 --- a/src/systemtest/resources/ConfigSystemTest/dateRangeWithModifiedDateTimeInLines/expected/reposense_testrepo-Beta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/dateRangeWithModifiedDateTimeInLines/expected/reposense_testrepo-Beta_master/authorship.json @@ -1 +1 @@ -[{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import java.net.URL?\u003e","lastModifiedDate":"2016-08-26"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","lastModifiedDate":"2017-03-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Menu?\u003e","lastModifiedDate":"2017-03-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e","lastModifiedDate":"2017-03-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e","lastModifiedDate":"2017-03-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","lastModifiedDate":"2017-03-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","lastModifiedDate":"2017-05-09"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","lastModifiedDate":"2017-03-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","lastModifiedDate":"2016-12-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cstylesheets\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@DarkTheme.css\" /\u003e","lastModifiedDate":"2016-08-20"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/stylesheets\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" VBox.vgrow\u003d\"NEVER\"\u003e","lastModifiedDate":"2017-06-13"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/MenuBar\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25"},{"lineNumber":26,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":27,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":29,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003c/StackPane\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":31,"author":{"gitId":"nbr"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":32,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" maxHeight\u003d\"200\" minHeight\u003d\"200\" prefHeight\u003d\"200\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-09-14"},{"lineNumber":34,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-09-14"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","lastModifiedDate":"2017-05-09"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25"},{"lineNumber":38,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" maxHeight\u003d\"80\" minHeight\u003d\"80\" prefHeight\u003d\"80\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-09-14"},{"lineNumber":40,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-09-14"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","lastModifiedDate":"2017-05-09"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4\" VBox.vgrow\u003d\"ALWAYS\"\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":45,"author":{"gitId":"nbr"},"content":" \u003cVBox fx:id\u003d\"personList\" minWidth\u003d\"335.0\" prefHeight\u003d\"143.0\" prefWidth\u003d\"335.0\" SplitPane.resizableWithParent\u003d\"false\"\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-08-15"},{"lineNumber":47,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-08-15"},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","lastModifiedDate":"2017-06-21"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","lastModifiedDate":"2016-08-15"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" prefWidth\u003d\"340\"\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-08-15"},{"lineNumber":54,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-08-15"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","lastModifiedDate":"2017-05-09"},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e","lastModifiedDate":"2017-05-09"},{"lineNumber":60,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"-":47,"nbr":13}},{"path":"src/main/resources/view/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":10,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e","lastModifiedDate":"2017-10-30"},{"lineNumber":11,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e","lastModifiedDate":"2017-10-30"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e","lastModifiedDate":"2017-10-30"},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.5\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","lastModifiedDate":"2017-10-30"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" alignment\u003d\"CENTER\" contentDisplay\u003d\"CENTER\" prefHeight\u003d\"28.0\" prefWidth\u003d\"43.2\" styleClass\u003d\"display_big_label\" text\u003d\"\\$name\" textAlignment\u003d\"CENTER\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\" /\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" /\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" /\u003e","lastModifiedDate":"2017-10-25"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" /\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","lastModifiedDate":"2017-10-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","lastModifiedDate":"2017-10-24"}],"authorContributionMap":{"-":50,"nbr":4}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","lastModifiedDate":"2016-12-18"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","lastModifiedDate":"2016-12-18"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","lastModifiedDate":"2016-12-18"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","lastModifiedDate":"2016-12-18"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","lastModifiedDate":"2016-12-18"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","lastModifiedDate":"2016-12-18"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e","lastModifiedDate":"2017-03-20"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","lastModifiedDate":"2016-12-18"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-18"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","lastModifiedDate":"2017-03-28"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","lastModifiedDate":"2017-03-28"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets top\u003d\"5\" right\u003d\"5\" bottom\u003d\"5\" left\u003d\"15\" /\u003e","lastModifiedDate":"2017-03-27"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cHBox spacing\u003d\"5\" alignment\u003d\"CENTER_LEFT\"\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e","lastModifiedDate":"2017-03-20"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e","lastModifiedDate":"2017-03-20"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e","lastModifiedDate":"2017-03-20"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e","lastModifiedDate":"2017-03-20"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e","lastModifiedDate":"2017-03-20"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","lastModifiedDate":"2017-03-20"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" text\u003d\"\\$first\" styleClass\u003d\"cell_big_label\" /\u003e","lastModifiedDate":"2016-08-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2016-09-03"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","lastModifiedDate":"2016-12-18"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$gender\" /\u003e","lastModifiedDate":"2017-10-16"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$matricNo\" /\u003e","lastModifiedDate":"2017-10-16"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e","lastModifiedDate":"2016-08-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$address\" /\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e","lastModifiedDate":"2016-08-24"},{"lineNumber":36,"author":{"gitId":"CindyTsai1"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$birthday\" /\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"timetable\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$timetable\" /\u003e","lastModifiedDate":"2017-10-12"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$remark\" /\u003e","lastModifiedDate":"2017-10-09"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","lastModifiedDate":"2016-08-08"},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"CindyTsai1":1,"April0616":3,"-":37}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":2,"author":{"gitId":"nbr"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":3,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.geometry.Insets?\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":4,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":5,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":6,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":7,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":8,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":9,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":10,"author":{"gitId":"nbr"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":11,"author":{"gitId":"nbr"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":12,"author":{"gitId":"nbr"},"content":" \u003ccolumnConstraints\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003c/columnConstraints\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":15,"author":{"gitId":"nbr"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":16,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":17,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":18,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":19,"author":{"gitId":"nbr"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":20,"author":{"gitId":"nbr"},"content":" \u003c/VBox\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":21,"author":{"gitId":"nbr"},"content":" \u003crowConstraints\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":22,"author":{"gitId":"nbr"},"content":" \u003cRowConstraints /\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":23,"author":{"gitId":"nbr"},"content":" \u003c/rowConstraints\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":24,"author":{"gitId":"nbr"},"content":" \u003c/GridPane\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":25,"author":{"gitId":"nbr"},"content":"\u003c/HBox\u003e","lastModifiedDate":"2017-10-29"}],"authorContributionMap":{"nbr":25}}] +[{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import java.net.URL?\u003e","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Menu?\u003e","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cstylesheets\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@DarkTheme.css\" /\u003e","lastModifiedDate":"2016-08-20","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003c/stylesheets\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" VBox.vgrow\u003d\"NEVER\"\u003e","lastModifiedDate":"2017-06-13","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/Menu\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c/MenuBar\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003c/StackPane\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"nbr"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" maxHeight\u003d\"200\" minHeight\u003d\"200\" prefHeight\u003d\"200\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"nbr"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" maxHeight\u003d\"80\" minHeight\u003d\"80\" prefHeight\u003d\"80\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"NEVER\"\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4\" VBox.vgrow\u003d\"ALWAYS\"\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"nbr"},"content":" \u003cVBox fx:id\u003d\"personList\" minWidth\u003d\"335.0\" prefHeight\u003d\"143.0\" prefWidth\u003d\"335.0\" SplitPane.resizableWithParent\u003d\"false\"\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-08-15","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-08-15","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","lastModifiedDate":"2016-08-15","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" prefWidth\u003d\"340\"\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-08-15","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-08-15","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"-":47,"nbr":13}},{"path":"src/main/resources/view/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003cSplitPane dividerPositions\u003d\"0.5\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" alignment\u003d\"CENTER\" contentDisplay\u003d\"CENTER\" prefHeight\u003d\"28.0\" prefWidth\u003d\"43.2\" styleClass\u003d\"display_big_label\" text\u003d\"\\$name\" textAlignment\u003d\"CENTER\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\" /\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" /\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" /\u003e","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" /\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","lastModifiedDate":"2017-10-24","isFullCredit":true}],"authorContributionMap":{"-":50,"nbr":4}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","lastModifiedDate":"2017-03-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","lastModifiedDate":"2017-03-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets top\u003d\"5\" right\u003d\"5\" bottom\u003d\"5\" left\u003d\"15\" /\u003e","lastModifiedDate":"2017-03-27","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cHBox spacing\u003d\"5\" alignment\u003d\"CENTER_LEFT\"\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" text\u003d\"\\$first\" styleClass\u003d\"cell_big_label\" /\u003e","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$gender\" /\u003e","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$matricNo\" /\u003e","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$address\" /\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"CindyTsai1"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$birthday\" /\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"timetable\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$timetable\" /\u003e","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$remark\" /\u003e","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"CindyTsai1":1,"April0616":3,"-":37}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"nbr"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.geometry.Insets?\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"nbr"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"nbr"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"nbr"},"content":" \u003ccolumnConstraints\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"nbr"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"nbr"},"content":" \u003c/columnConstraints\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"nbr"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"nbr"},"content":" \u003cpadding\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"nbr"},"content":" \u003c/padding\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"nbr"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"nbr"},"content":" \u003c/VBox\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"nbr"},"content":" \u003crowConstraints\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"nbr"},"content":" \u003cRowConstraints /\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"nbr"},"content":" \u003c/rowConstraints\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"nbr"},"content":" \u003c/GridPane\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"nbr"},"content":"\u003c/HBox\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true}],"authorContributionMap":{"nbr":25}}] diff --git a/src/systemtest/resources/ConfigSystemTest/dateRangeWithModifiedDateTimeInLines/expected/reposense_testrepo-Charlie_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/dateRangeWithModifiedDateTimeInLines/expected/reposense_testrepo-Charlie_master/authorship.json index 26ff6ad756..bd034fdcda 100644 --- a/src/systemtest/resources/ConfigSystemTest/dateRangeWithModifiedDateTimeInLines/expected/reposense_testrepo-Charlie_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/dateRangeWithModifiedDateTimeInLines/expected/reposense_testrepo-Charlie_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++","lastModifiedDate":"2017-10-30"},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","lastModifiedDate":"2017-05-30"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","lastModifiedDate":"2017-05-30"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]","lastModifiedDate":"2017-10-10"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]","lastModifiedDate":"2017-10-15"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]","lastModifiedDate":"2017-10-10"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]","lastModifiedDate":"2017-10-15"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","lastModifiedDate":"2017-05-30"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]","lastModifiedDate":"2017-10-11"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","lastModifiedDate":"2017-05-30"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]","lastModifiedDate":"2017-05-30"},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\"]","lastModifiedDate":"2017-05-30"},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]","lastModifiedDate":"2017-05-30"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":18,"author":{"gitId":"-"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface).","lastModifiedDate":"2017-05-30"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"* It is a Java application primarily targeted for students doing group projects.","lastModifiedDate":"2017-10-30"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)","lastModifiedDate":"2017-10-30"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls.","lastModifiedDate":"2017-10-30"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":23,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map","lastModifiedDate":"2017-05-30"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":25,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","lastModifiedDate":"2017-05-30"},{"lineNumber":26,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","lastModifiedDate":"2017-05-30"},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","lastModifiedDate":"2017-05-30"},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","lastModifiedDate":"2017-05-30"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements","lastModifiedDate":"2017-05-30"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","lastModifiedDate":"2017-05-30"},{"lineNumber":33,"author":{"gitId":"-"},"content":"_Marco Jakob_.","lastModifiedDate":"2017-05-30"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_.","lastModifiedDate":"2017-10-30"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":36,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","lastModifiedDate":"2017-05-30"}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":7,"-":26}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us","lastModifiedDate":"2017-05-30"},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/","lastModifiedDate":"2017-09-13"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","lastModifiedDate":"2017-05-30"},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images","lastModifiedDate":"2017-05-30"},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","lastModifiedDate":"2017-08-01"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team.","lastModifiedDate":"2017-10-09"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/.","lastModifiedDate":"2017-10-09"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team","lastModifiedDate":"2017-10-09"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Charles Goh","lastModifiedDate":"2017-10-09"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://charlesgoh.me[homepage]] [https://github.com/charlesgoh[github]]","lastModifiedDate":"2017-10-09"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert","lastModifiedDate":"2017-10-09"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component","lastModifiedDate":"2017-10-09"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Jeffrey Goh","lastModifiedDate":"2017-10-09"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]","lastModifiedDate":"2017-10-09"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing","lastModifiedDate":"2017-10-09"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-09"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component","lastModifiedDate":"2017-10-09"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Kelvin Lin","lastModifiedDate":"2017-10-09"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esiloke[github]]","lastModifiedDate":"2017-10-09"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-09"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality","lastModifiedDate":"2017-10-09"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component","lastModifiedDate":"2017-10-09"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Wang Yi Ming","lastModifiedDate":"2017-10-09"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1090[github]]","lastModifiedDate":"2017-10-09"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-09"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer","lastModifiedDate":"2017-10-09"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component","lastModifiedDate":"2017-10-09"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30"}],"authorContributionMap":{"charlesgoh":19,"-":29}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide","lastModifiedDate":"2017-10-30"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","lastModifiedDate":"2017-05-19"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","lastModifiedDate":"2017-05-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","lastModifiedDate":"2017-05-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","lastModifiedDate":"2017-05-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","lastModifiedDate":"2017-05-19"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","lastModifiedDate":"2017-08-01"},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]","lastModifiedDate":"2017-05-19"},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","lastModifiedDate":"2017-05-19"},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:","lastModifiedDate":"2017-05-19"},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]","lastModifiedDate":"2017-05-19"},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","lastModifiedDate":"2017-05-30"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4","lastModifiedDate":"2017-10-01"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`","lastModifiedDate":"2017-10-30"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","lastModifiedDate":"2017-05-19"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","lastModifiedDate":"2017-05-19"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later","lastModifiedDate":"2017-05-19"},{"lineNumber":22,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-30"},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-19"},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","lastModifiedDate":"2017-05-19"},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","lastModifiedDate":"2017-05-19"},{"lineNumber":26,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-30"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE","lastModifiedDate":"2017-05-18"},{"lineNumber":29,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-18"},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-19"},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","lastModifiedDate":"2017-05-18"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them.","lastModifiedDate":"2017-05-18"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer","lastModifiedDate":"2017-10-30"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","lastModifiedDate":"2017-05-18"},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","lastModifiedDate":"2017-05-18"},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","lastModifiedDate":"2017-05-18"},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","lastModifiedDate":"2017-05-18"},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","lastModifiedDate":"2017-05-18"},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`","lastModifiedDate":"2017-05-18"},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","lastModifiedDate":"2017-05-18"},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`","lastModifiedDate":"2017-05-18"},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","lastModifiedDate":"2017-05-18"},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +","lastModifiedDate":"2017-09-21"},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests.","lastModifiedDate":"2017-09-21"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","lastModifiedDate":"2017-09-21"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","lastModifiedDate":"2017-09-21"},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass.","lastModifiedDate":"2017-09-21"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","lastModifiedDate":"2017-09-21"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03"},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","lastModifiedDate":"2017-09-21"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03"},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","lastModifiedDate":"2017-09-21"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03"},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","lastModifiedDate":"2017-09-21"},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","lastModifiedDate":"2017-09-21"},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","lastModifiedDate":"2017-09-21"},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03"},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","lastModifiedDate":"2017-09-21"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","lastModifiedDate":"2017-09-21"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03"},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","lastModifiedDate":"2017-09-21"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","lastModifiedDate":"2017-09-21"},{"lineNumber":70,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30"},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","lastModifiedDate":"2017-10-30"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","lastModifiedDate":"2017-09-21"},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","lastModifiedDate":"2017-09-21"},{"lineNumber":76,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","lastModifiedDate":"2017-09-21"},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-09-21"},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","lastModifiedDate":"2017-09-21"},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding","lastModifiedDate":"2017-09-21"},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,","lastModifiedDate":"2017-09-21"},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section.","lastModifiedDate":"2017-09-21"},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started].","lastModifiedDate":"2017-09-21"},{"lineNumber":88,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design","lastModifiedDate":"2017-05-19"},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture","lastModifiedDate":"2017-05-19"},{"lineNumber":92,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","lastModifiedDate":"2017-05-19"},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_","lastModifiedDate":"2017-05-19"},{"lineNumber":95,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component.","lastModifiedDate":"2017-05-19"},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]","lastModifiedDate":"2017-05-19"},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","lastModifiedDate":"2017-05-30"},{"lineNumber":100,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","lastModifiedDate":"2017-05-30"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","lastModifiedDate":"2017-05-19"},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","lastModifiedDate":"2017-05-19"},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","lastModifiedDate":"2017-05-19"},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","lastModifiedDate":"2017-05-19"},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","lastModifiedDate":"2017-05-19"},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","lastModifiedDate":"2017-05-19"},{"lineNumber":112,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App.","lastModifiedDate":"2017-05-19"},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor.","lastModifiedDate":"2017-05-19"},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory.","lastModifiedDate":"2017-05-19"},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk.","lastModifiedDate":"2017-05-19"},{"lineNumber":117,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components","lastModifiedDate":"2017-05-19"},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","lastModifiedDate":"2017-05-19"},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","lastModifiedDate":"2017-05-19"},{"lineNumber":122,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","lastModifiedDate":"2017-05-19"},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19"},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_","lastModifiedDate":"2017-05-19"},{"lineNumber":127,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]","lastModifiedDate":"2017-05-19"},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","lastModifiedDate":"2017-05-19"},{"lineNumber":130,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","lastModifiedDate":"2017-05-19"},{"lineNumber":132,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19"},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_","lastModifiedDate":"2017-05-19"},{"lineNumber":135,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-19"},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","lastModifiedDate":"2017-05-19"},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","lastModifiedDate":"2017-05-19"},{"lineNumber":140,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19"},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_","lastModifiedDate":"2017-05-19"},{"lineNumber":143,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-19"},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","lastModifiedDate":"2017-05-19"},{"lineNumber":146,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","lastModifiedDate":"2017-05-19"},{"lineNumber":148,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","lastModifiedDate":"2017-05-19"},{"lineNumber":150,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19"},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_","lastModifiedDate":"2017-05-19"},{"lineNumber":153,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","lastModifiedDate":"2017-05-30"},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","lastModifiedDate":"2017-05-19"},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","lastModifiedDate":"2017-05-30"},{"lineNumber":159,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,","lastModifiedDate":"2017-05-19"},{"lineNumber":161,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","lastModifiedDate":"2017-05-19"},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","lastModifiedDate":"2017-05-19"},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","lastModifiedDate":"2017-05-19"},{"lineNumber":165,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","lastModifiedDate":"2017-05-19"},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19"},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_","lastModifiedDate":"2017-05-19"},{"lineNumber":170,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-19"},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_","lastModifiedDate":"2017-07-19"},{"lineNumber":173,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :","lastModifiedDate":"2017-05-19"},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","lastModifiedDate":"2017-05-30"},{"lineNumber":176,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","lastModifiedDate":"2017-07-07"},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","lastModifiedDate":"2017-05-19"},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","lastModifiedDate":"2017-05-19"},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","lastModifiedDate":"2017-05-19"},{"lineNumber":181,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","lastModifiedDate":"2017-05-19"},{"lineNumber":183,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19"},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_","lastModifiedDate":"2017-05-19"},{"lineNumber":186,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","lastModifiedDate":"2017-05-19"},{"lineNumber":188,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19"},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_","lastModifiedDate":"2017-05-19"},{"lineNumber":191,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","lastModifiedDate":"2017-05-30"},{"lineNumber":193,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,","lastModifiedDate":"2017-05-19"},{"lineNumber":195,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","lastModifiedDate":"2017-05-19"},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data.","lastModifiedDate":"2017-05-19"},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","lastModifiedDate":"2017-09-01"},{"lineNumber":199,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","lastModifiedDate":"2017-05-19"},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":201,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","lastModifiedDate":"2017-05-19"},{"lineNumber":202,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":203,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19"},{"lineNumber":204,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_","lastModifiedDate":"2017-05-19"},{"lineNumber":205,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":206,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","lastModifiedDate":"2017-05-30"},{"lineNumber":207,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":208,"author":{"gitId":"-"},"content":"The `Storage` component,","lastModifiedDate":"2017-05-19"},{"lineNumber":209,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":210,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","lastModifiedDate":"2017-05-19"},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","lastModifiedDate":"2017-05-19"},{"lineNumber":212,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":213,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","lastModifiedDate":"2017-05-19"},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":215,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package.","lastModifiedDate":"2017-05-19"},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":217,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","lastModifiedDate":"2017-05-19"},{"lineNumber":218,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":219,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","lastModifiedDate":"2017-09-21"},{"lineNumber":220,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":221,"author":{"gitId":"-"},"content":"// tag::undoredo[]","lastModifiedDate":"2017-07-31"},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism","lastModifiedDate":"2017-07-30"},{"lineNumber":223,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":224,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","lastModifiedDate":"2017-07-30"},{"lineNumber":225,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":226,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","lastModifiedDate":"2017-07-30"},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":228,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30"},{"lineNumber":229,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":230,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","lastModifiedDate":"2017-07-30"},{"lineNumber":231,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":232,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","lastModifiedDate":"2017-07-30"},{"lineNumber":233,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-07-30"},{"lineNumber":234,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-07-30"},{"lineNumber":235,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2017-07-30"},{"lineNumber":236,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-30"},{"lineNumber":237,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-07-30"},{"lineNumber":238,"author":{"gitId":"-"},"content":" // ... list logic ...","lastModifiedDate":"2017-07-30"},{"lineNumber":239,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-30"},{"lineNumber":240,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-30"},{"lineNumber":241,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-07-30"},{"lineNumber":242,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":243,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","lastModifiedDate":"2017-07-30"},{"lineNumber":244,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-07-30"},{"lineNumber":245,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-07-30"},{"lineNumber":246,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","lastModifiedDate":"2017-07-30"},{"lineNumber":247,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-30"},{"lineNumber":248,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-07-30"},{"lineNumber":249,"author":{"gitId":"-"},"content":" // ... undo logic ...","lastModifiedDate":"2017-07-30"},{"lineNumber":250,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":251,"author":{"gitId":"-"},"content":" executeUndoableCommand();","lastModifiedDate":"2017-07-30"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-30"},{"lineNumber":253,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-30"},{"lineNumber":254,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":255,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","lastModifiedDate":"2017-07-30"},{"lineNumber":256,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-30"},{"lineNumber":257,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","lastModifiedDate":"2017-07-30"},{"lineNumber":258,"author":{"gitId":"-"},"content":" // ... delete logic ...","lastModifiedDate":"2017-07-30"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-30"},{"lineNumber":260,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-30"},{"lineNumber":261,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-07-30"},{"lineNumber":262,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":263,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","lastModifiedDate":"2017-07-30"},{"lineNumber":264,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":265,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","lastModifiedDate":"2017-07-30"},{"lineNumber":266,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":267,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30"},{"lineNumber":268,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":269,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","lastModifiedDate":"2017-07-30"},{"lineNumber":270,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":271,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30"},{"lineNumber":272,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":273,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-07-30"},{"lineNumber":274,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","lastModifiedDate":"2017-07-30"},{"lineNumber":275,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":276,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","lastModifiedDate":"2017-07-30"},{"lineNumber":277,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":278,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","lastModifiedDate":"2017-07-30"},{"lineNumber":279,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":280,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30"},{"lineNumber":281,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":282,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-07-30"},{"lineNumber":283,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","lastModifiedDate":"2017-07-30"},{"lineNumber":284,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":285,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","lastModifiedDate":"2017-07-30"},{"lineNumber":286,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":287,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30"},{"lineNumber":288,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":289,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","lastModifiedDate":"2017-07-30"},{"lineNumber":290,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":291,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-07-30"},{"lineNumber":292,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","lastModifiedDate":"2017-07-30"},{"lineNumber":293,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":294,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","lastModifiedDate":"2017-07-30"},{"lineNumber":295,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":296,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30"},{"lineNumber":297,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":298,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","lastModifiedDate":"2017-07-30"},{"lineNumber":299,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":300,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30"},{"lineNumber":301,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":302,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","lastModifiedDate":"2017-07-30"},{"lineNumber":303,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":304,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]","lastModifiedDate":"2017-07-30"},{"lineNumber":305,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":306,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-07-30"},{"lineNumber":307,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":308,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +","lastModifiedDate":"2017-07-30"},{"lineNumber":309,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +","lastModifiedDate":"2017-07-30"},{"lineNumber":310,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +","lastModifiedDate":"2017-07-30"},{"lineNumber":311,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +","lastModifiedDate":"2017-07-30"},{"lineNumber":312,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +","lastModifiedDate":"2017-07-30"},{"lineNumber":313,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +","lastModifiedDate":"2017-07-30"},{"lineNumber":314,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","lastModifiedDate":"2017-07-30"},{"lineNumber":315,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":316,"author":{"gitId":"-"},"content":"---","lastModifiedDate":"2017-07-30"},{"lineNumber":317,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":318,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +","lastModifiedDate":"2017-07-30"},{"lineNumber":319,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +","lastModifiedDate":"2017-07-30"},{"lineNumber":320,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +","lastModifiedDate":"2017-07-30"},{"lineNumber":321,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +","lastModifiedDate":"2017-07-30"},{"lineNumber":322,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +","lastModifiedDate":"2017-07-30"},{"lineNumber":323,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +","lastModifiedDate":"2017-07-30"},{"lineNumber":324,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct.","lastModifiedDate":"2017-07-30"},{"lineNumber":325,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":326,"author":{"gitId":"-"},"content":"---","lastModifiedDate":"2017-07-30"},{"lineNumber":327,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":328,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +","lastModifiedDate":"2017-07-30"},{"lineNumber":329,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +","lastModifiedDate":"2017-07-30"},{"lineNumber":330,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +","lastModifiedDate":"2017-07-30"},{"lineNumber":331,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +","lastModifiedDate":"2017-07-30"},{"lineNumber":332,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +","lastModifiedDate":"2017-07-30"},{"lineNumber":333,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +","lastModifiedDate":"2017-07-30"},{"lineNumber":334,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +","lastModifiedDate":"2017-07-30"},{"lineNumber":335,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":336,"author":{"gitId":"-"},"content":"---","lastModifiedDate":"2017-07-30"},{"lineNumber":337,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":338,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +","lastModifiedDate":"2017-07-30"},{"lineNumber":339,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +","lastModifiedDate":"2017-07-30"},{"lineNumber":340,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +","lastModifiedDate":"2017-07-30"},{"lineNumber":341,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +","lastModifiedDate":"2017-07-30"},{"lineNumber":342,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +","lastModifiedDate":"2017-07-30"},{"lineNumber":343,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +","lastModifiedDate":"2017-07-30"},{"lineNumber":344,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +","lastModifiedDate":"2017-07-30"},{"lineNumber":345,"author":{"gitId":"-"},"content":"// end::undoredo[]","lastModifiedDate":"2017-07-31"},{"lineNumber":346,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object","lastModifiedDate":"2017-10-18"},{"lineNumber":348,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +","lastModifiedDate":"2017-10-18"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the add, delete, list, select, and edit commands.","lastModifiedDate":"2017-10-18"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Instead of making a new Logic object for each new command, polymorphism is used to implement the \"Task\" version of each command.","lastModifiedDate":"2017-10-18"},{"lineNumber":352,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"An example of using polymorphism to handle Person vs Task addition:","lastModifiedDate":"2017-10-18"},{"lineNumber":354,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"[source,java]","lastModifiedDate":"2017-10-18"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"----","lastModifiedDate":"2017-10-18"},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"public class AddCommand extends Command {","lastModifiedDate":"2017-10-18"},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-18"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Person(person);","lastModifiedDate":"2017-10-18"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_PERSON;","lastModifiedDate":"2017-10-18"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-18"},{"lineNumber":362,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","lastModifiedDate":"2017-10-18"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Task(task);","lastModifiedDate":"2017-10-18"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_TASK;","lastModifiedDate":"2017-10-18"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-18"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-18"},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"----","lastModifiedDate":"2017-10-18"},{"lineNumber":369,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"The AddCommand will thus call a different constructor depending on the type of the argument supplied to it. To facilitate this, the respective Parser class must also be modified:","lastModifiedDate":"2017-10-18"},{"lineNumber":371,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":"[source,java]","lastModifiedDate":"2017-10-18"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"----","lastModifiedDate":"2017-10-18"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-18"},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);","lastModifiedDate":"2017-10-18"},{"lineNumber":376,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {","lastModifiedDate":"2017-10-18"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);","lastModifiedDate":"2017-10-18"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {","lastModifiedDate":"2017-10-18"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);","lastModifiedDate":"2017-10-18"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-18"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(toAdd);","lastModifiedDate":"2017-10-18"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-18"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"----","lastModifiedDate":"2017-10-18"},{"lineNumber":385,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":"The AddCommandParser checks the args to see if this is a task, then creates the object to be added, and creates a new AddCommand to handle the result. +","lastModifiedDate":"2017-10-18"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:","lastModifiedDate":"2017-10-18"},{"lineNumber":388,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-18"},{"lineNumber":390,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"To support the addition of Task objects, the Storage component is modified to accept Task objects in a similar manner as to how Person objects are being stored.","lastModifiedDate":"2017-10-19"},{"lineNumber":392,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"[source, html]","lastModifiedDate":"2017-10-19"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"---","lastModifiedDate":"2017-10-19"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e","lastModifiedDate":"2017-10-19"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"---","lastModifiedDate":"2017-10-19"},{"lineNumber":408,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":"Tasks objects are stored in the same level of hierarchy as Person objects, and during startup, are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book.","lastModifiedDate":"2017-10-19"},{"lineNumber":410,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":411,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-18"},{"lineNumber":413,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +","lastModifiedDate":"2017-10-18"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +","lastModifiedDate":"2017-10-18"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +","lastModifiedDate":"2017-10-18"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +","lastModifiedDate":"2017-10-18"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Create new classes for all new commands +","lastModifiedDate":"2017-10-18"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"**Pros:** Simpler to implement. +","lastModifiedDate":"2017-10-18"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure.","lastModifiedDate":"2017-10-18"},{"lineNumber":421,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"---","lastModifiedDate":"2017-10-18"},{"lineNumber":423,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +","lastModifiedDate":"2017-10-19"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","lastModifiedDate":"2017-10-19"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa.","lastModifiedDate":"2017-10-19"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage.","lastModifiedDate":"2017-10-19"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","lastModifiedDate":"2017-10-19"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","lastModifiedDate":"2017-10-19"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes.","lastModifiedDate":"2017-10-19"},{"lineNumber":431,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":432,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","lastModifiedDate":"2017-10-22"},{"lineNumber":433,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":434,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` method in UniquePersonList. It supports","lastModifiedDate":"2017-10-22"},{"lineNumber":435,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field.","lastModifiedDate":"2017-10-15"},{"lineNumber":436,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":437,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator.","lastModifiedDate":"2017-10-15"},{"lineNumber":438,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":439,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`","lastModifiedDate":"2017-10-15"},{"lineNumber":440,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class.","lastModifiedDate":"2017-10-15"},{"lineNumber":441,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":442,"author":{"gitId":"charlesgoh"},"content":"The Logic Diagram for this sort command implementation is shown below:","lastModifiedDate":"2017-10-15"},{"lineNumber":443,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":444,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-15"},{"lineNumber":445,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":446,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort name desc`. The following sequence diagram","lastModifiedDate":"2017-10-15"},{"lineNumber":447,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works.","lastModifiedDate":"2017-10-15"},{"lineNumber":448,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":449,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]","lastModifiedDate":"2017-10-15"},{"lineNumber":450,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":451,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted.","lastModifiedDate":"2017-10-15"},{"lineNumber":452,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":453,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-15"},{"lineNumber":454,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":455,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +","lastModifiedDate":"2017-10-15"},{"lineNumber":456,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` class. +","lastModifiedDate":"2017-10-15"},{"lineNumber":457,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the person lists. Future changes to the implementation will be easier as a consequence. +","lastModifiedDate":"2017-10-15"},{"lineNumber":458,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +","lastModifiedDate":"2017-10-15"},{"lineNumber":459,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +","lastModifiedDate":"2017-10-15"},{"lineNumber":460,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +","lastModifiedDate":"2017-10-15"},{"lineNumber":461,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList` will have to rely on the `SortCommand` class.","lastModifiedDate":"2017-10-15"},{"lineNumber":462,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":463,"author":{"gitId":"charlesgoh"},"content":"---","lastModifiedDate":"2017-10-15"},{"lineNumber":464,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":465,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +","lastModifiedDate":"2017-10-15"},{"lineNumber":466,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +","lastModifiedDate":"2017-10-15"},{"lineNumber":467,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for both user and developer and reduced complexity in implementation. +","lastModifiedDate":"2017-10-15"},{"lineNumber":468,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +","lastModifiedDate":"2017-10-15"},{"lineNumber":469,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +","lastModifiedDate":"2017-10-15"},{"lineNumber":470,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +","lastModifiedDate":"2017-10-15"},{"lineNumber":471,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system.","lastModifiedDate":"2017-10-15"},{"lineNumber":472,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":473,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","lastModifiedDate":"2017-10-22"},{"lineNumber":474,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":475,"author":{"gitId":"charlesgoh"},"content":"The backup command makes use of both the model manager and the storage manager. The `LogicManager` class was","lastModifiedDate":"2017-10-22"},{"lineNumber":476,"author":{"gitId":"charlesgoh"},"content":"improved to support the accessing of storage value.","lastModifiedDate":"2017-10-22"},{"lineNumber":477,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":478,"author":{"gitId":"charlesgoh"},"content":"The backup command arguments are parsed through the `BackupCommandParser`, which passes control over to the","lastModifiedDate":"2017-10-22"},{"lineNumber":479,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class. If there is a file path specified by the user, then the `execute()` command within the","lastModifiedDate":"2017-10-22"},{"lineNumber":480,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class will save the backup file to that path. If not file path is specified, the backup file will be","lastModifiedDate":"2017-10-22"},{"lineNumber":481,"author":{"gitId":"charlesgoh"},"content":"saved to a default location.","lastModifiedDate":"2017-10-22"},{"lineNumber":482,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":483,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup`. The backup file will be saved to a default location:","lastModifiedDate":"2017-10-22"},{"lineNumber":484,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDefaultDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-22"},{"lineNumber":486,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":487,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup testBackup.xml`. The following sequence diagram","lastModifiedDate":"2017-10-22"},{"lineNumber":488,"author":{"gitId":"charlesgoh"},"content":"demonstrates how this works:","lastModifiedDate":"2017-10-22"},{"lineNumber":489,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":490,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceCustomDiagram.png[width\u003d\"800]","lastModifiedDate":"2017-10-22"},{"lineNumber":491,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":492,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted.","lastModifiedDate":"2017-10-22"},{"lineNumber":493,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":494,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-22"},{"lineNumber":495,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":496,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +","lastModifiedDate":"2017-10-22"},{"lineNumber":497,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement backup command via Command Line Interface +","lastModifiedDate":"2017-10-22"},{"lineNumber":498,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Backing up data is easier and faster for users who are familiar with the commands. Less button clicks. +","lastModifiedDate":"2017-10-22"},{"lineNumber":499,"author":{"gitId":"charlesgoh"},"content":"**Cons:** UI not as intuitive. Users who are not familiar with the application may not know about this feature +","lastModifiedDate":"2017-10-22"},{"lineNumber":500,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement backup command via GUI +","lastModifiedDate":"2017-10-22"},{"lineNumber":501,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for all users since the options are all graphical +","lastModifiedDate":"2017-10-22"},{"lineNumber":502,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hinders productivity. Excessive number of clicks to accomplish an essential task.","lastModifiedDate":"2017-10-22"},{"lineNumber":503,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":504,"author":{"gitId":"charlesgoh"},"content":"---","lastModifiedDate":"2017-10-22"},{"lineNumber":505,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":506,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Custom and/or Default file paths for backup file +","lastModifiedDate":"2017-10-22"},{"lineNumber":507,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implemented both types of commands +","lastModifiedDate":"2017-10-22"},{"lineNumber":508,"author":{"gitId":"charlesgoh"},"content":"**Pros:** User can choose either command option. Gives the user more choices +","lastModifiedDate":"2017-10-22"},{"lineNumber":509,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May seem confusing to the user at first +","lastModifiedDate":"2017-10-22"},{"lineNumber":510,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement only the default option (save backup file to data directory of application) +","lastModifiedDate":"2017-10-22"},{"lineNumber":511,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Faster for the user to key in one word rather than a command with many words +","lastModifiedDate":"2017-10-22"},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Reduces choice for experienced users who may want to save to another location or use a different save name","lastModifiedDate":"2017-10-22"},{"lineNumber":513,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":514,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields","lastModifiedDate":"2017-10-19"},{"lineNumber":515,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":516,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email` and `Address` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not.","lastModifiedDate":"2017-10-19"},{"lineNumber":517,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":518,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +","lastModifiedDate":"2017-10-19"},{"lineNumber":519,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +","lastModifiedDate":"2017-10-19"},{"lineNumber":520,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +","lastModifiedDate":"2017-10-19"},{"lineNumber":521,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":522,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes.","lastModifiedDate":"2017-10-21"},{"lineNumber":523,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field.","lastModifiedDate":"2017-10-21"},{"lineNumber":524,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor.","lastModifiedDate":"2017-10-21"},{"lineNumber":525,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`.","lastModifiedDate":"2017-10-21"},{"lineNumber":526,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":527,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-21"},{"lineNumber":528,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : Sequence Diagram for adding a Person with private fields_","lastModifiedDate":"2017-10-30"},{"lineNumber":529,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":530,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +","lastModifiedDate":"2017-10-19"},{"lineNumber":531,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:","lastModifiedDate":"2017-10-19"},{"lineNumber":532,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","lastModifiedDate":"2017-10-19"},{"lineNumber":533,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-19"},{"lineNumber":534,"author":{"gitId":"jeffreygohkw"},"content":"@Override","lastModifiedDate":"2017-10-19"},{"lineNumber":535,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {","lastModifiedDate":"2017-10-19"},{"lineNumber":536,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-19"},{"lineNumber":537,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","lastModifiedDate":"2017-10-19"},{"lineNumber":538,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":539,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","lastModifiedDate":"2017-10-19"},{"lineNumber":540,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-19"},{"lineNumber":541,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-19"},{"lineNumber":542,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":543,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI.","lastModifiedDate":"2017-10-19"},{"lineNumber":544,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":545,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name.","lastModifiedDate":"2017-10-19"},{"lineNumber":546,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":547,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`.","lastModifiedDate":"2017-10-21"},{"lineNumber":548,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":549,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`.","lastModifiedDate":"2017-10-19"},{"lineNumber":550,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following","lastModifiedDate":"2017-10-21"},{"lineNumber":551,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":552,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","lastModifiedDate":"2017-10-21"},{"lineNumber":553,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-21"},{"lineNumber":554,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","lastModifiedDate":"2017-10-21"},{"lineNumber":555,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","lastModifiedDate":"2017-10-21"},{"lineNumber":556,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","lastModifiedDate":"2017-10-21"},{"lineNumber":557,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","lastModifiedDate":"2017-10-21"},{"lineNumber":558,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","lastModifiedDate":"2017-10-21"},{"lineNumber":559,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","lastModifiedDate":"2017-10-21"},{"lineNumber":560,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","lastModifiedDate":"2017-10-21"},{"lineNumber":561,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","lastModifiedDate":"2017-10-21"},{"lineNumber":562,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-21"},{"lineNumber":563,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format","lastModifiedDate":"2017-10-21"},{"lineNumber":564,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":565,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]","lastModifiedDate":"2017-10-21"},{"lineNumber":566,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-21"},{"lineNumber":567,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":568,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":569,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":570,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":571,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":572,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":573,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":574,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":575,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":576,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":577,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e","lastModifiedDate":"2017-10-21"},{"lineNumber":578,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-21"},{"lineNumber":579,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":580,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same.","lastModifiedDate":"2017-10-19"},{"lineNumber":581,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":582,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","lastModifiedDate":"2017-10-19"},{"lineNumber":583,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +","lastModifiedDate":"2017-10-21"},{"lineNumber":584,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was.","lastModifiedDate":"2017-10-19"},{"lineNumber":585,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":586,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`.","lastModifiedDate":"2017-10-30"},{"lineNumber":587,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true.","lastModifiedDate":"2017-10-30"},{"lineNumber":588,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":589,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false.","lastModifiedDate":"2017-10-30"},{"lineNumber":590,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":591,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object.","lastModifiedDate":"2017-10-30"},{"lineNumber":592,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-10-30"},{"lineNumber":593,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":594,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-30"},{"lineNumber":595,"author":{"gitId":"-"},"content":" Name updatedName;","lastModifiedDate":"2017-10-30"},{"lineNumber":596,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {","lastModifiedDate":"2017-10-30"},{"lineNumber":597,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","lastModifiedDate":"2017-10-30"},{"lineNumber":598,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {","lastModifiedDate":"2017-10-30"},{"lineNumber":599,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-30"},{"lineNumber":600,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":601,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2017-10-30"},{"lineNumber":602,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();","lastModifiedDate":"2017-10-30"},{"lineNumber":603,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":604,"author":{"gitId":"-"},"content":" return updatedName;","lastModifiedDate":"2017-10-30"},{"lineNumber":605,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":606,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":607,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":608,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing.","lastModifiedDate":"2017-10-30"},{"lineNumber":609,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-19"},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +","lastModifiedDate":"2017-10-19"},{"lineNumber":613,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +","lastModifiedDate":"2017-10-30"},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +","lastModifiedDate":"2017-10-19"},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +","lastModifiedDate":"2017-10-19"},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +","lastModifiedDate":"2017-10-19"},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +","lastModifiedDate":"2017-10-19"},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to.","lastModifiedDate":"2017-10-19"},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":"---","lastModifiedDate":"2017-10-19"},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +","lastModifiedDate":"2017-10-19"},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +","lastModifiedDate":"2017-10-19"},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +","lastModifiedDate":"2017-10-19"},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +","lastModifiedDate":"2017-10-19"},{"lineNumber":625,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +","lastModifiedDate":"2017-10-19"},{"lineNumber":626,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +","lastModifiedDate":"2017-10-19"},{"lineNumber":627,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users.","lastModifiedDate":"2017-10-19"},{"lineNumber":628,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":629,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy","lastModifiedDate":"2017-10-24"},{"lineNumber":630,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":631,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`.","lastModifiedDate":"2017-10-24"},{"lineNumber":632,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":633,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below.","lastModifiedDate":"2017-10-24"},{"lineNumber":634,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":635,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-24"},{"lineNumber":636,"author":{"gitId":"-"},"content":"_Figure 3.6.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_","lastModifiedDate":"2017-10-30"},{"lineNumber":637,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":638,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object.","lastModifiedDate":"2017-10-24"},{"lineNumber":639,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":640,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`.","lastModifiedDate":"2017-10-24"},{"lineNumber":641,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":642,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`","lastModifiedDate":"2017-10-24"},{"lineNumber":643,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":644,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`.","lastModifiedDate":"2017-10-24"},{"lineNumber":645,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`.","lastModifiedDate":"2017-10-24"},{"lineNumber":646,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":647,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`.","lastModifiedDate":"2017-10-24"},{"lineNumber":648,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","lastModifiedDate":"2017-10-24"},{"lineNumber":650,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`.","lastModifiedDate":"2017-10-24"},{"lineNumber":651,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all.","lastModifiedDate":"2017-10-24"},{"lineNumber":652,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":653,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-24"},{"lineNumber":654,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":655,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +","lastModifiedDate":"2017-10-30"},{"lineNumber":656,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +","lastModifiedDate":"2017-10-24"},{"lineNumber":657,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +","lastModifiedDate":"2017-10-24"},{"lineNumber":658,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +","lastModifiedDate":"2017-10-24"},{"lineNumber":659,"author":{"gitId":"-"},"content":"**Alternative 2:** Enhance the functi-onality of EditCommand. +","lastModifiedDate":"2017-10-30"},{"lineNumber":660,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +","lastModifiedDate":"2017-10-24"},{"lineNumber":661,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data.","lastModifiedDate":"2017-10-24"},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":663,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps","lastModifiedDate":"2017-10-30"},{"lineNumber":664,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":665,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +","lastModifiedDate":"2017-10-30"},{"lineNumber":666,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:","lastModifiedDate":"2017-10-30"},{"lineNumber":667,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":668,"author":{"gitId":"-"},"content":"[source, java]","lastModifiedDate":"2017-10-30"},{"lineNumber":669,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":670,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-30"},{"lineNumber":671,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-10-30"},{"lineNumber":672,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-30"},{"lineNumber":673,"author":{"gitId":"-"},"content":" return new LocateCommand(index);","lastModifiedDate":"2017-10-30"},{"lineNumber":674,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-30"},{"lineNumber":675,"author":{"gitId":"-"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-30"},{"lineNumber":676,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-30"},{"lineNumber":677,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":678,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":679,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":680,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":681,"author":{"gitId":"-"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of `Person`s, a `CommandException` will be thrown.","lastModifiedDate":"2017-10-30"},{"lineNumber":682,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":683,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution.","lastModifiedDate":"2017-10-30"},{"lineNumber":684,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":685,"author":{"gitId":"-"},"content":"This code for this can be found below:","lastModifiedDate":"2017-10-30"},{"lineNumber":686,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":687,"author":{"gitId":"-"},"content":"[source, java]","lastModifiedDate":"2017-10-30"},{"lineNumber":688,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":689,"author":{"gitId":"-"},"content":"@Override","lastModifiedDate":"2017-10-30"},{"lineNumber":690,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-10-30"},{"lineNumber":691,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":692,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-30"},{"lineNumber":693,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":694,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-30"},{"lineNumber":695,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-30"},{"lineNumber":696,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":697,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":698,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","lastModifiedDate":"2017-10-30"},{"lineNumber":699,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","lastModifiedDate":"2017-10-30"},{"lineNumber":700,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","lastModifiedDate":"2017-10-30"},{"lineNumber":701,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":702,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":703,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":704,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":705,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:","lastModifiedDate":"2017-10-30"},{"lineNumber":706,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":707,"author":{"gitId":"-"},"content":"[source, java]","lastModifiedDate":"2017-10-30"},{"lineNumber":708,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":709,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-30"},{"lineNumber":710,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {","lastModifiedDate":"2017-10-30"},{"lineNumber":711,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","lastModifiedDate":"2017-10-30"},{"lineNumber":712,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2017-10-30"},{"lineNumber":713,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","lastModifiedDate":"2017-10-30"},{"lineNumber":714,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","lastModifiedDate":"2017-10-30"},{"lineNumber":715,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":716,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":717,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":718,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":719,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","lastModifiedDate":"2017-10-30"},{"lineNumber":720,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":721,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-30"},{"lineNumber":722,"author":{"gitId":"-"},"content":"_Figure 3.7.1 : Sequence Diagram for Locating a Person\u0027s Address_","lastModifiedDate":"2017-10-30"},{"lineNumber":723,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":724,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-30"},{"lineNumber":725,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":726,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +","lastModifiedDate":"2017-10-30"},{"lineNumber":727,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Create a seperate command `locate`. +","lastModifiedDate":"2017-10-30"},{"lineNumber":728,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +","lastModifiedDate":"2017-10-30"},{"lineNumber":729,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +","lastModifiedDate":"2017-10-30"},{"lineNumber":730,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +","lastModifiedDate":"2017-10-30"},{"lineNumber":731,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +","lastModifiedDate":"2017-10-30"},{"lineNumber":732,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users.","lastModifiedDate":"2017-10-30"},{"lineNumber":733,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":734,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism","lastModifiedDate":"2017-10-20"},{"lineNumber":735,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":736,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete","lastModifiedDate":"2017-10-20"},{"lineNumber":737,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`.","lastModifiedDate":"2017-10-20"},{"lineNumber":738,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":739,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`.","lastModifiedDate":"2017-10-20"},{"lineNumber":740,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once.","lastModifiedDate":"2017-10-20"},{"lineNumber":741,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`addtag 1 2 3 t/friends`) will be executed.","lastModifiedDate":"2017-10-20"},{"lineNumber":742,"author":{"gitId":"-"},"content":"The same operation will happen for `deletetag` command.","lastModifiedDate":"2017-10-20"},{"lineNumber":743,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":744,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works","lastModifiedDate":"2017-10-20"},{"lineNumber":745,"author":{"gitId":"-"},"content":"in a similar way.","lastModifiedDate":"2017-10-20"},{"lineNumber":746,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":747,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:","lastModifiedDate":"2017-10-20"},{"lineNumber":748,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-10-20"},{"lineNumber":749,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-20"},{"lineNumber":750,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-10-20"},{"lineNumber":751,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book.","lastModifiedDate":"2017-10-20"},{"lineNumber":752,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-20"},{"lineNumber":753,"author":{"gitId":"-"},"content":"public class AddTagCommand extends UndoableCommand {","lastModifiedDate":"2017-10-20"},{"lineNumber":754,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-10-20"},{"lineNumber":755,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","lastModifiedDate":"2017-10-20"},{"lineNumber":756,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","lastModifiedDate":"2017-10-20"},{"lineNumber":757,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-20"},{"lineNumber":758,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-10-20"},{"lineNumber":759,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-20"},{"lineNumber":760,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":761,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {","lastModifiedDate":"2017-10-20"},{"lineNumber":762,"author":{"gitId":"-"},"content":" // check whether the index within the range","lastModifiedDate":"2017-10-20"},{"lineNumber":763,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":764,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","lastModifiedDate":"2017-10-20"},{"lineNumber":765,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag","lastModifiedDate":"2017-10-20"},{"lineNumber":766,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":767,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag","lastModifiedDate":"2017-10-20"},{"lineNumber":768,"author":{"gitId":"-"},"content":" return new CommandResult();","lastModifiedDate":"2017-10-20"},{"lineNumber":769,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":770,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-20"},{"lineNumber":771,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":772,"author":{"gitId":"-"},"content":"Suppose the user enter the `addtag 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:","lastModifiedDate":"2017-10-20"},{"lineNumber":773,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":774,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-20"},{"lineNumber":775,"author":{"gitId":"-"},"content":"_Figure 3.8.1 : Add Tag Sequence Diagram for Logic_ +","lastModifiedDate":"2017-10-30"},{"lineNumber":776,"author":{"gitId":"-"},"content":"The `deletetag` command works the same as `addtag` command with different name only.","lastModifiedDate":"2017-10-20"},{"lineNumber":777,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":778,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-10-20"},{"lineNumber":779,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +","lastModifiedDate":"2017-10-30"},{"lineNumber":780,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +","lastModifiedDate":"2017-10-30"},{"lineNumber":781,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception.","lastModifiedDate":"2017-10-20"},{"lineNumber":782,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":783,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-20"},{"lineNumber":784,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":785,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `addtag` and `deletetag` +","lastModifiedDate":"2017-10-20"},{"lineNumber":786,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +","lastModifiedDate":"2017-10-20"},{"lineNumber":787,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +","lastModifiedDate":"2017-10-20"},{"lineNumber":788,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+","lastModifiedDate":"2017-10-20"},{"lineNumber":789,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +","lastModifiedDate":"2017-10-20"},{"lineNumber":790,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +","lastModifiedDate":"2017-10-20"},{"lineNumber":791,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list.","lastModifiedDate":"2017-10-20"},{"lineNumber":792,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle.","lastModifiedDate":"2017-10-20"},{"lineNumber":793,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":794,"author":{"gitId":"-"},"content":"---","lastModifiedDate":"2017-10-30"},{"lineNumber":795,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +","lastModifiedDate":"2017-10-30"},{"lineNumber":796,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `addtag` and `deletetag` +","lastModifiedDate":"2017-10-30"},{"lineNumber":797,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +","lastModifiedDate":"2017-10-30"},{"lineNumber":798,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +","lastModifiedDate":"2017-10-30"},{"lineNumber":799,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +","lastModifiedDate":"2017-10-30"},{"lineNumber":800,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +","lastModifiedDate":"2017-10-30"},{"lineNumber":801,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner.","lastModifiedDate":"2017-10-30"},{"lineNumber":802,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":803,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism","lastModifiedDate":"2017-10-30"},{"lineNumber":804,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":805,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book.","lastModifiedDate":"2017-10-30"},{"lineNumber":806,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`.","lastModifiedDate":"2017-10-30"},{"lineNumber":807,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":808,"author":{"gitId":"-"},"content":"The `findtag` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`.","lastModifiedDate":"2017-10-30"},{"lineNumber":809,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first.","lastModifiedDate":"2017-10-30"},{"lineNumber":810,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar.","lastModifiedDate":"2017-10-30"},{"lineNumber":811,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":812,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences.","lastModifiedDate":"2017-10-30"},{"lineNumber":813,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`.","lastModifiedDate":"2017-10-30"},{"lineNumber":814,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":815,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:","lastModifiedDate":"2017-10-30"},{"lineNumber":816,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String.","lastModifiedDate":"2017-10-30"},{"lineNumber":817,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":818,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-10-30"},{"lineNumber":819,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":820,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-30"},{"lineNumber":821,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","lastModifiedDate":"2017-10-30"},{"lineNumber":822,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","lastModifiedDate":"2017-10-30"},{"lineNumber":823,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {","lastModifiedDate":"2017-10-30"},{"lineNumber":824,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());","lastModifiedDate":"2017-10-30"},{"lineNumber":825,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");","lastModifiedDate":"2017-10-30"},{"lineNumber":826,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":827,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();","lastModifiedDate":"2017-10-30"},{"lineNumber":828,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":829,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":830,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one","lastModifiedDate":"2017-10-30"},{"lineNumber":831,"author":{"gitId":"-"},"content":"is for the tags to be excluded.","lastModifiedDate":"2017-10-30"},{"lineNumber":832,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":833,"author":{"gitId":"-"},"content":"[sourcce,java]","lastModifiedDate":"2017-10-30"},{"lineNumber":834,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":835,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-10-30"},{"lineNumber":836,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list","lastModifiedDate":"2017-10-30"},{"lineNumber":837,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched","lastModifiedDate":"2017-10-30"},{"lineNumber":838,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched","lastModifiedDate":"2017-10-30"},{"lineNumber":839,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-30"},{"lineNumber":840,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","lastModifiedDate":"2017-10-30"},{"lineNumber":841,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {","lastModifiedDate":"2017-10-30"},{"lineNumber":842,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {","lastModifiedDate":"2017-10-30"},{"lineNumber":843,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);","lastModifiedDate":"2017-10-30"},{"lineNumber":844,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2017-10-30"},{"lineNumber":845,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));","lastModifiedDate":"2017-10-30"},{"lineNumber":846,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":847,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":848,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":849,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30"},{"lineNumber":850,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":851,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +","lastModifiedDate":"2017-10-30"},{"lineNumber":852,"author":{"gitId":"-"},"content":"Suppose the user enter `findtag friends` command. The following sequence diagram shows how the find tag command works:","lastModifiedDate":"2017-10-30"},{"lineNumber":853,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":854,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-30"},{"lineNumber":855,"author":{"gitId":"-"},"content":"_Figure 3.9.1 : Find Tag Sequence Diagram for Logic_ +","lastModifiedDate":"2017-10-30"},{"lineNumber":856,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":857,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-10-30"},{"lineNumber":858,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list.","lastModifiedDate":"2017-10-30"},{"lineNumber":859,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":860,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-30"},{"lineNumber":861,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":862,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `findtag` +","lastModifiedDate":"2017-10-30"},{"lineNumber":863,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `findtag` +","lastModifiedDate":"2017-10-30"},{"lineNumber":864,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `findtag` command will be similar to the `find` command. +","lastModifiedDate":"2017-10-30"},{"lineNumber":865,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +","lastModifiedDate":"2017-10-30"},{"lineNumber":866,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `findtag` in `FindCommand`. +","lastModifiedDate":"2017-10-30"},{"lineNumber":867,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","lastModifiedDate":"2017-10-30"},{"lineNumber":868,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle","lastModifiedDate":"2017-10-30"},{"lineNumber":869,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things.","lastModifiedDate":"2017-10-30"},{"lineNumber":870,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":871,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","lastModifiedDate":"2017-05-19"},{"lineNumber":872,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":873,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","lastModifiedDate":"2017-05-19"},{"lineNumber":874,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":875,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])","lastModifiedDate":"2017-05-19"},{"lineNumber":876,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","lastModifiedDate":"2017-05-19"},{"lineNumber":877,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","lastModifiedDate":"2017-05-19"},{"lineNumber":878,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":879,"author":{"gitId":"-"},"content":"*Logging Levels*","lastModifiedDate":"2017-05-19"},{"lineNumber":880,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":881,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","lastModifiedDate":"2017-05-19"},{"lineNumber":882,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","lastModifiedDate":"2017-05-19"},{"lineNumber":883,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","lastModifiedDate":"2017-05-19"},{"lineNumber":884,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","lastModifiedDate":"2017-05-19"},{"lineNumber":885,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":886,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":887,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","lastModifiedDate":"2017-05-19"},{"lineNumber":888,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":889,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","lastModifiedDate":"2017-05-19"},{"lineNumber":890,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":891,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","lastModifiedDate":"2017-09-21"},{"lineNumber":892,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":893,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation.","lastModifiedDate":"2017-09-21"},{"lineNumber":894,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":895,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-09-21"},{"lineNumber":896,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","lastModifiedDate":"2017-09-21"},{"lineNumber":897,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":898,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","lastModifiedDate":"2017-09-21"},{"lineNumber":899,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":900,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","lastModifiedDate":"2017-09-21"},{"lineNumber":901,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","lastModifiedDate":"2017-09-21"},{"lineNumber":902,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":903,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","lastModifiedDate":"2017-09-21"},{"lineNumber":904,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":905,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","lastModifiedDate":"2017-09-21"},{"lineNumber":906,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":907,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","lastModifiedDate":"2017-09-21"},{"lineNumber":908,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":909,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","lastModifiedDate":"2017-09-21"},{"lineNumber":910,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":911,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","lastModifiedDate":"2017-09-21"},{"lineNumber":912,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":913,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","lastModifiedDate":"2017-09-21"},{"lineNumber":914,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","lastModifiedDate":"2017-09-21"},{"lineNumber":915,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","lastModifiedDate":"2017-09-21"},{"lineNumber":916,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","lastModifiedDate":"2017-09-21"},{"lineNumber":917,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":918,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","lastModifiedDate":"2017-09-21"},{"lineNumber":919,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_","lastModifiedDate":"2017-09-21"},{"lineNumber":920,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":921,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","lastModifiedDate":"2017-05-19"},{"lineNumber":922,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":923,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","lastModifiedDate":"2017-09-21"},{"lineNumber":924,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":925,"author":{"gitId":"-"},"content":"There are three ways to run tests.","lastModifiedDate":"2017-09-21"},{"lineNumber":926,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":927,"author":{"gitId":"-"},"content":"[TIP]","lastModifiedDate":"2017-09-21"},{"lineNumber":928,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","lastModifiedDate":"2017-09-21"},{"lineNumber":929,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":930,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","lastModifiedDate":"2017-09-21"},{"lineNumber":931,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":932,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","lastModifiedDate":"2017-05-18"},{"lineNumber":933,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","lastModifiedDate":"2017-05-18"},{"lineNumber":934,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":935,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","lastModifiedDate":"2017-09-21"},{"lineNumber":936,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":937,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","lastModifiedDate":"2017-09-21"},{"lineNumber":938,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":939,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-09-21"},{"lineNumber":940,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","lastModifiedDate":"2017-09-21"},{"lineNumber":941,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":942,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","lastModifiedDate":"2017-09-21"},{"lineNumber":943,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":944,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","lastModifiedDate":"2017-09-21"},{"lineNumber":945,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":946,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","lastModifiedDate":"2017-09-21"},{"lineNumber":947,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":948,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","lastModifiedDate":"2017-09-21"},{"lineNumber":949,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":950,"author":{"gitId":"-"},"content":"We have two types of tests:","lastModifiedDate":"2017-05-19"},{"lineNumber":951,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":952,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","lastModifiedDate":"2017-09-21"},{"lineNumber":953,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","lastModifiedDate":"2017-09-21"},{"lineNumber":954,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","lastModifiedDate":"2017-09-21"},{"lineNumber":955,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","lastModifiedDate":"2017-05-19"},{"lineNumber":956,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","lastModifiedDate":"2017-05-19"},{"lineNumber":957,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","lastModifiedDate":"2017-05-19"},{"lineNumber":958,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","lastModifiedDate":"2017-05-19"},{"lineNumber":959,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","lastModifiedDate":"2017-05-19"},{"lineNumber":960,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","lastModifiedDate":"2017-05-19"},{"lineNumber":961,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","lastModifiedDate":"2017-05-19"},{"lineNumber":962,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":963,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":964,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","lastModifiedDate":"2017-09-21"},{"lineNumber":965,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","lastModifiedDate":"2017-09-21"},{"lineNumber":966,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":967,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","lastModifiedDate":"2017-09-21"},{"lineNumber":968,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","lastModifiedDate":"2017-09-21"},{"lineNumber":969,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":970,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","lastModifiedDate":"2017-05-19"},{"lineNumber":971,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":972,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","lastModifiedDate":"2017-05-19"},{"lineNumber":973,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":974,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","lastModifiedDate":"2017-05-30"},{"lineNumber":975,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":976,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","lastModifiedDate":"2017-05-19"},{"lineNumber":977,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":978,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","lastModifiedDate":"2017-05-30"},{"lineNumber":979,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":980,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","lastModifiedDate":"2017-05-19"},{"lineNumber":981,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":982,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","lastModifiedDate":"2017-05-19"},{"lineNumber":983,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":984,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","lastModifiedDate":"2017-07-07"},{"lineNumber":985,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","lastModifiedDate":"2017-05-30"},{"lineNumber":986,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","lastModifiedDate":"2017-05-19"},{"lineNumber":987,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","lastModifiedDate":"2017-05-19"},{"lineNumber":988,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":989,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","lastModifiedDate":"2017-05-19"},{"lineNumber":990,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":991,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","lastModifiedDate":"2017-05-19"},{"lineNumber":992,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","lastModifiedDate":"2017-05-19"},{"lineNumber":993,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","lastModifiedDate":"2017-05-19"},{"lineNumber":994,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":995,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30"},{"lineNumber":996,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","lastModifiedDate":"2017-05-30"},{"lineNumber":997,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":998,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","lastModifiedDate":"2017-05-19"},{"lineNumber":999,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","lastModifiedDate":"2017-05-19"},{"lineNumber":1001,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-05-19"},{"lineNumber":1002,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","lastModifiedDate":"2017-05-19"},{"lineNumber":1003,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","lastModifiedDate":"2017-05-19"},{"lineNumber":1004,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1005,"author":{"gitId":"-"},"content":"|`* * *` |user |add a new person |","lastModifiedDate":"2017-05-19"},{"lineNumber":1006,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1007,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","lastModifiedDate":"2017-05-19"},{"lineNumber":1008,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1009,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts","lastModifiedDate":"2017-10-02"},{"lineNumber":1010,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1011,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added","lastModifiedDate":"2017-10-02"},{"lineNumber":1012,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1013,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made","lastModifiedDate":"2017-10-02"},{"lineNumber":1014,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1015,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values","lastModifiedDate":"2017-10-02"},{"lineNumber":1016,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1017,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident","lastModifiedDate":"2017-05-19"},{"lineNumber":1018,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1019,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location","lastModifiedDate":"2017-10-07"},{"lineNumber":1020,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1021,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs","lastModifiedDate":"2017-10-07"},{"lineNumber":1022,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1023,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity","lastModifiedDate":"2017-10-07"},{"lineNumber":1024,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1025,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |first-time user |be able to see a user guide when I first start the program |be clear on how to use it","lastModifiedDate":"2017-10-02"},{"lineNumber":1026,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1027,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better","lastModifiedDate":"2017-10-02"},{"lineNumber":1028,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1029,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me","lastModifiedDate":"2017-10-02"},{"lineNumber":1030,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1031,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts","lastModifiedDate":"2017-10-02"},{"lineNumber":1032,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1033,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms","lastModifiedDate":"2017-10-02"},{"lineNumber":1034,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1035,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with many social media accounts |be able to add my contacts\u0027 social media accounts to the address book |improve connectivity and learn more about my contacts","lastModifiedDate":"2017-10-02"},{"lineNumber":1036,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1037,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others","lastModifiedDate":"2017-10-02"},{"lineNumber":1038,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1039,"author":{"gitId":"-"},"content":"|`*` |user with many persons in the address book |sort persons by name |locate a person easily","lastModifiedDate":"2017-05-19"},{"lineNumber":1040,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1041,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly","lastModifiedDate":"2017-10-02"},{"lineNumber":1042,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1043,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like","lastModifiedDate":"2017-10-02"},{"lineNumber":1044,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1045,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts","lastModifiedDate":"2017-10-02"},{"lineNumber":1046,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1047,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently","lastModifiedDate":"2017-10-02"},{"lineNumber":1048,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1049,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |non tech-savvy user |have the option to fill out certain fields |use the address book without having to use the intimidating CLI.","lastModifiedDate":"2017-10-02"},{"lineNumber":1050,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1051,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |error-prone user |have minor typos auto corrected |continue using the address book without correcting my mistakes","lastModifiedDate":"2017-10-02"},{"lineNumber":1052,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1053,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features","lastModifiedDate":"2017-10-02"},{"lineNumber":1054,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1055,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02"},{"lineNumber":1056,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-05-19"},{"lineNumber":1057,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1058,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30"},{"lineNumber":1059,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","lastModifiedDate":"2017-05-30"},{"lineNumber":1060,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1061,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)","lastModifiedDate":"2017-05-19"},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1063,"author":{"gitId":"-"},"content":"[discrete]","lastModifiedDate":"2017-05-19"},{"lineNumber":1064,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person","lastModifiedDate":"2017-05-19"},{"lineNumber":1065,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1066,"author":{"gitId":"-"},"content":"*MSS*","lastModifiedDate":"2017-05-19"},{"lineNumber":1067,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1068,"author":{"gitId":"-"},"content":"1. User requests to list persons","lastModifiedDate":"2017-05-19"},{"lineNumber":1069,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons","lastModifiedDate":"2017-05-19"},{"lineNumber":1070,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list","lastModifiedDate":"2017-05-19"},{"lineNumber":1071,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person","lastModifiedDate":"2017-09-02"},{"lineNumber":1072,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-09-02"},{"lineNumber":1073,"author":{"gitId":"-"},"content":"Use case ends.","lastModifiedDate":"2017-09-02"},{"lineNumber":1074,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1075,"author":{"gitId":"-"},"content":"*Extensions*","lastModifiedDate":"2017-05-19"},{"lineNumber":1076,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1077,"author":{"gitId":"-"},"content":"[none]","lastModifiedDate":"2017-09-04"},{"lineNumber":1078,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","lastModifiedDate":"2017-09-04"},{"lineNumber":1079,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-09-04"},{"lineNumber":1080,"author":{"gitId":"-"},"content":"Use case ends.","lastModifiedDate":"2017-09-02"},{"lineNumber":1081,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1082,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid.","lastModifiedDate":"2017-09-04"},{"lineNumber":1083,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-09-04"},{"lineNumber":1084,"author":{"gitId":"-"},"content":"[none]","lastModifiedDate":"2017-09-04"},{"lineNumber":1085,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message.","lastModifiedDate":"2017-09-04"},{"lineNumber":1086,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-09-02"},{"lineNumber":1087,"author":{"gitId":"-"},"content":"Use case resumes at step 2.","lastModifiedDate":"2017-09-02"},{"lineNumber":1088,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1089,"author":{"gitId":"Esilocke"},"content":"[discrete]","lastModifiedDate":"2017-10-01"},{"lineNumber":1090,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person","lastModifiedDate":"2017-10-01"},{"lineNumber":1091,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"*MSS*","lastModifiedDate":"2017-10-01"},{"lineNumber":1093,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria","lastModifiedDate":"2017-10-01"},{"lineNumber":1095,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria","lastModifiedDate":"2017-10-01"},{"lineNumber":1096,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01"},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"*Extensions*","lastModifiedDate":"2017-10-01"},{"lineNumber":1100,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1102,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","lastModifiedDate":"2017-10-01"},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1104,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01"},{"lineNumber":1105,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found.","lastModifiedDate":"2017-10-07"},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found.","lastModifiedDate":"2017-10-07"},{"lineNumber":1110,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1111,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01"},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"[discrete]","lastModifiedDate":"2017-10-01"},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person","lastModifiedDate":"2017-10-01"},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"*MSS*","lastModifiedDate":"2017-10-01"},{"lineNumber":1117,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons","lastModifiedDate":"2017-10-01"},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons","lastModifiedDate":"2017-10-01"},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list","lastModifiedDate":"2017-10-01"},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person.","lastModifiedDate":"2017-10-01"},{"lineNumber":1122,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person.","lastModifiedDate":"2017-10-01"},{"lineNumber":1123,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1124,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01"},{"lineNumber":1125,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1126,"author":{"gitId":"Esilocke"},"content":"*Extensions*","lastModifiedDate":"2017-10-01"},{"lineNumber":1127,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","lastModifiedDate":"2017-10-01"},{"lineNumber":1130,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01"},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid.","lastModifiedDate":"2017-10-01"},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1136,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message.","lastModifiedDate":"2017-10-01"},{"lineNumber":1137,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1138,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","lastModifiedDate":"2017-10-01"},{"lineNumber":1139,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid.","lastModifiedDate":"2017-10-07"},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message.","lastModifiedDate":"2017-10-07"},{"lineNumber":1144,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","lastModifiedDate":"2017-10-01"},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1147,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail.","lastModifiedDate":"2017-10-01"},{"lineNumber":1148,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1149,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1150,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made.","lastModifiedDate":"2017-10-01"},{"lineNumber":1151,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1152,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01"},{"lineNumber":1153,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1154,"author":{"gitId":"Esilocke"},"content":"[discrete]","lastModifiedDate":"2017-10-01"},{"lineNumber":1155,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps","lastModifiedDate":"2017-10-07"},{"lineNumber":1156,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"*MSS*","lastModifiedDate":"2017-10-01"},{"lineNumber":1158,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1159,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps","lastModifiedDate":"2017-10-01"},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo","lastModifiedDate":"2017-10-01"},{"lineNumber":1161,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message","lastModifiedDate":"2017-10-01"},{"lineNumber":1162,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone.","lastModifiedDate":"2017-10-01"},{"lineNumber":1163,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1164,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01"},{"lineNumber":1165,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1166,"author":{"gitId":"-"},"content":"*Extensions*","lastModifiedDate":"2017-10-01"},{"lineNumber":1167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands.","lastModifiedDate":"2017-10-01"},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1171,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1172,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands.","lastModifiedDate":"2017-10-01"},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1174,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3.","lastModifiedDate":"2017-10-01"},{"lineNumber":1175,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands.","lastModifiedDate":"2017-10-07"},{"lineNumber":1178,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01"},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands.","lastModifiedDate":"2017-10-07"},{"lineNumber":1181,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01"},{"lineNumber":1182,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3","lastModifiedDate":"2017-10-01"},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1184,"author":{"gitId":"Esilocke"},"content":"[discrete]","lastModifiedDate":"2017-10-03"},{"lineNumber":1185,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort","lastModifiedDate":"2017-10-03"},{"lineNumber":1186,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"*MSS*","lastModifiedDate":"2017-10-03"},{"lineNumber":1188,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria","lastModifiedDate":"2017-10-03"},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria","lastModifiedDate":"2017-10-03"},{"lineNumber":1191,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message.","lastModifiedDate":"2017-10-03"},{"lineNumber":1192,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-03"},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-03"},{"lineNumber":1194,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":1195,"author":{"gitId":"Esilocke"},"content":"*Extensions*","lastModifiedDate":"2017-10-03"},{"lineNumber":1196,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":1197,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-03"},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","lastModifiedDate":"2017-10-03"},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-03"},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-03"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid.","lastModifiedDate":"2017-10-03"},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-03"},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-03"},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message.","lastModifiedDate":"2017-10-03"},{"lineNumber":1206,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-03"},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1.","lastModifiedDate":"2017-10-03"},{"lineNumber":1208,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1209,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30"},{"lineNumber":1210,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","lastModifiedDate":"2017-05-30"},{"lineNumber":1211,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1212,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed.","lastModifiedDate":"2017-05-19"},{"lineNumber":1213,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.","lastModifiedDate":"2017-05-19"},{"lineNumber":1214,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","lastModifiedDate":"2017-05-19"},{"lineNumber":1215,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure.","lastModifiedDate":"2017-10-01"},{"lineNumber":1216,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse.","lastModifiedDate":"2017-10-07"},{"lineNumber":1217,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0.","lastModifiedDate":"2017-10-07"},{"lineNumber":1218,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing.","lastModifiedDate":"2017-10-07"},{"lineNumber":1219,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1220,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30"},{"lineNumber":1221,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","lastModifiedDate":"2017-05-30"},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1223,"author":{"gitId":"-"},"content":"[[mainstream-os]]","lastModifiedDate":"2017-05-19"},{"lineNumber":1224,"author":{"gitId":"-"},"content":"Mainstream OS","lastModifiedDate":"2017-05-19"},{"lineNumber":1225,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1226,"author":{"gitId":"-"},"content":"....","lastModifiedDate":"2017-09-04"},{"lineNumber":1227,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","lastModifiedDate":"2017-05-19"},{"lineNumber":1228,"author":{"gitId":"-"},"content":"....","lastModifiedDate":"2017-09-04"},{"lineNumber":1229,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1230,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]","lastModifiedDate":"2017-10-01"},{"lineNumber":1231,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible","lastModifiedDate":"2017-10-01"},{"lineNumber":1232,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1233,"author":{"gitId":"charlesgoh"},"content":"....","lastModifiedDate":"2017-10-01"},{"lineNumber":1234,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data.","lastModifiedDate":"2017-10-01"},{"lineNumber":1235,"author":{"gitId":"charlesgoh"},"content":"....","lastModifiedDate":"2017-10-01"},{"lineNumber":1236,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":1237,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30"},{"lineNumber":1238,"author":{"gitId":"-"},"content":"\u003d\u003d Product Survey","lastModifiedDate":"2017-05-30"},{"lineNumber":1239,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1240,"author":{"gitId":"-"},"content":"*Product Name*","lastModifiedDate":"2017-05-19"},{"lineNumber":1241,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1242,"author":{"gitId":"-"},"content":"Author: ...","lastModifiedDate":"2017-05-19"},{"lineNumber":1243,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1244,"author":{"gitId":"-"},"content":"Pros:","lastModifiedDate":"2017-05-19"},{"lineNumber":1245,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1246,"author":{"gitId":"-"},"content":"* ...","lastModifiedDate":"2017-05-19"},{"lineNumber":1247,"author":{"gitId":"-"},"content":"* ...","lastModifiedDate":"2017-05-19"},{"lineNumber":1248,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1249,"author":{"gitId":"-"},"content":"Cons:","lastModifiedDate":"2017-05-19"},{"lineNumber":1250,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19"},{"lineNumber":1251,"author":{"gitId":"-"},"content":"* ...","lastModifiedDate":"2017-05-19"},{"lineNumber":1252,"author":{"gitId":"-"},"content":"* ...","lastModifiedDate":"2017-05-19"}],"authorContributionMap":{"charlesgoh":70,"jeffreygohkw":157,"Esilocke":178,"-":847}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - User Guide","lastModifiedDate":"2017-10-30"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","lastModifiedDate":"2017-05-26"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","lastModifiedDate":"2017-05-26"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","lastModifiedDate":"2017-05-26"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","lastModifiedDate":"2017-05-26"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","lastModifiedDate":"2017-05-26"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","lastModifiedDate":"2017-08-01"},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:","lastModifiedDate":"2017-05-26"},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]","lastModifiedDate":"2017-05-26"},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","lastModifiedDate":"2017-05-26"},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:","lastModifiedDate":"2017-05-26"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","lastModifiedDate":"2017-05-26"},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","lastModifiedDate":"2017-10-10"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team SE-EDU` Since: `Jun 2016` Licence: `MIT`","lastModifiedDate":"2017-05-26"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Overview","lastModifiedDate":"2017-10-23"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"Address++ is an address book application that can store contacts, as well as maintain a list of ongoing tasks. You can use the various commands in Address++ to maintain, create, and delete your contacts, or tasks. +","lastModifiedDate":"2017-10-23"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"Address++ is targeted at NUS students, such as those working on projects or assignments.","lastModifiedDate":"2017-10-23"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About","lastModifiedDate":"2017-10-23"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +","lastModifiedDate":"2017-10-23"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +","lastModifiedDate":"2017-10-23"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started","lastModifiedDate":"2017-10-22"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","lastModifiedDate":"2017-05-26"},{"lineNumber":30,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-26"},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-26"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","lastModifiedDate":"2017-05-26"},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","lastModifiedDate":"2017-05-26"},{"lineNumber":34,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-26"},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here].","lastModifiedDate":"2017-09-21"},{"lineNumber":36,"author":{"gitId":"-"},"content":". Copy the file to the folder you want to use as the home folder for your Address++.","lastModifiedDate":"2017-10-30"},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds.","lastModifiedDate":"2017-05-26"},{"lineNumber":38,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-26"},{"lineNumber":39,"author":{"gitId":"-"},"content":"image::Ui.png[width\u003d\"790\"]","lastModifiedDate":"2017-05-26"},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-26"},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +","lastModifiedDate":"2017-05-26"},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window.","lastModifiedDate":"2017-05-26"},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:","lastModifiedDate":"2017-05-26"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window","lastModifiedDate":"2017-10-22"},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts","lastModifiedDate":"2017-05-26"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :","lastModifiedDate":"2017-10-23"},{"lineNumber":48,"author":{"gitId":"-"},"content":"adds a contact named `John Doe` to Address++.","lastModifiedDate":"2017-10-30"},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list","lastModifiedDate":"2017-05-26"},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app","lastModifiedDate":"2017-05-26"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command.","lastModifiedDate":"2017-05-26"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features","lastModifiedDate":"2017-05-26"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-05-26"},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*","lastModifiedDate":"2017-05-26"},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","lastModifiedDate":"2017-09-21"},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.","lastModifiedDate":"2017-09-21"},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.","lastModifiedDate":"2017-09-21"},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","lastModifiedDate":"2017-09-21"},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-05-26"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`","lastModifiedDate":"2017-05-26"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":67,"author":{"gitId":"-"},"content":"Format: `help` +","lastModifiedDate":"2017-10-10"},{"lineNumber":68,"author":{"gitId":"-"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1].","lastModifiedDate":"2017-10-30"},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a person/task: `add`","lastModifiedDate":"2017-10-20"},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book, be it a newly met project member, or your friend who is taking the same module as you. +","lastModifiedDate":"2017-10-22"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"`add` can be replaced by `a` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] r/[REMARK] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","lastModifiedDate":"2017-10-23"},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +","lastModifiedDate":"2017-10-22"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +","lastModifiedDate":"2017-10-22"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address` or `Remark` to be private by placing a `p` in front of the prefix. +","lastModifiedDate":"2017-10-23"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":82,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26"},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears`","lastModifiedDate":"2017-10-23"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"* `add n/Betsy Crowe t/friend e/betsycrowe@example.com b/29-02-1996 a/Newgate Prison p/1234567 t/criminal r/Stares at the wall`","lastModifiedDate":"2017-10-23"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"* `add n/Ima Hidearu b/ a/ e/ p/ r/ t/secretive`","lastModifiedDate":"2017-10-23"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"* `add n/Luke Groundswimmer p/ a/ e/ c/`","lastModifiedDate":"2017-10-10"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"* `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate c/`","lastModifiedDate":"2017-10-19"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"By adding the word `task`, you can use the same command to add a new task or deadline, such as a reminder of project deadlines. +","lastModifiedDate":"2017-10-22"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"Format: `add task n/NAME d/DESCRIPTION [t/DEADLINE] [p/PRIORITY]` +","lastModifiedDate":"2017-10-22"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"* Task deadlines should be in the format DD/MM/YYYY +","lastModifiedDate":"2017-10-22"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 1 to 5 inclusive, with 5 being the highest priority +","lastModifiedDate":"2017-10-22"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default.","lastModifiedDate":"2017-10-22"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"* `add task n/Update documentation d/Update docs for V1.1 for CS2103T t/10-10-2017 p/4`","lastModifiedDate":"2017-10-22"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"* `add task n/Buy new pencil p/2`","lastModifiedDate":"2017-10-20"},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":104,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":105,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a tag to persons : `addtag` (Since V1.2)","lastModifiedDate":"2017-10-30"},{"lineNumber":106,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":107,"author":{"gitId":"-"},"content":"You can use the `addtag` command to add tag for multiple persons in the address book. For example, you may wish to add tag `friends` to the first two persons in the address book. +","lastModifiedDate":"2017-10-22"},{"lineNumber":108,"author":{"gitId":"-"},"content":"`addtag` can be replaced by `atag` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"Format: `addtag INDEX... t/[TAG]` +","lastModifiedDate":"2017-10-20"},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":111,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":112,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-15"},{"lineNumber":113,"author":{"gitId":"-"},"content":"* You can add the tag of the person at the specific `INDEX`.","lastModifiedDate":"2017-10-30"},{"lineNumber":114,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-15"},{"lineNumber":115,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-30"},{"lineNumber":116,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, addtag will add the tag to all contacts in the address book.","lastModifiedDate":"2017-10-30"},{"lineNumber":117,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-15"},{"lineNumber":118,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":119,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-15"},{"lineNumber":120,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":121,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-15"},{"lineNumber":122,"author":{"gitId":"-"},"content":"`addtag 1 2 t/friends` +","lastModifiedDate":"2017-10-20"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"Adds the friends tag of the 1st and 2nd person in the address book.","lastModifiedDate":"2017-10-20"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-20"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"`addtag t/acquaintance` +","lastModifiedDate":"2017-10-20"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"Adds the acquaintance tag to all contacts in the address book.","lastModifiedDate":"2017-10-20"},{"lineNumber":127,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":128,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all persons : `list`","lastModifiedDate":"2017-10-20"},{"lineNumber":130,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts, or tasks, in the address book. To list out only the tasks present, use `list task` instead. +","lastModifiedDate":"2017-10-22"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"Format: `list` `list task` +","lastModifiedDate":"2017-10-22"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"If you want to see all your contacts, as well as all your tasks at the same time, type `list all` instead. +","lastModifiedDate":"2017-10-22"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"Format: `list all`","lastModifiedDate":"2017-10-22"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"Instead of typing out `add` every time, you can alternatively use `l` to shorten the command.","lastModifiedDate":"2017-10-22"},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":139,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing a person : `edit`","lastModifiedDate":"2017-10-20"},{"lineNumber":140,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +","lastModifiedDate":"2017-10-22"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","lastModifiedDate":"2017-10-22"},{"lineNumber":144,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":145,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-22"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command.","lastModifiedDate":"2017-10-22"},{"lineNumber":148,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","lastModifiedDate":"2017-05-26"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands.","lastModifiedDate":"2017-10-22"},{"lineNumber":150,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it.","lastModifiedDate":"2017-05-26"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command.","lastModifiedDate":"2017-10-19"},{"lineNumber":152,"author":{"gitId":"-"},"content":"* An Edit command containing only private fields will result in a error message.","lastModifiedDate":"2017-10-30"},{"lineNumber":153,"author":{"gitId":"-"},"content":"* An Edit command with both private and public fields will only modify the public fields.","lastModifiedDate":"2017-10-30"},{"lineNumber":154,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26"},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":156,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26"},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":158,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com` +","lastModifiedDate":"2017-05-26"},{"lineNumber":159,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.","lastModifiedDate":"2017-05-26"},{"lineNumber":160,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/` +","lastModifiedDate":"2017-06-06"},{"lineNumber":161,"author":{"gitId":"-"},"content":"Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.","lastModifiedDate":"2017-05-26"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"* `edit 1 p/` +","lastModifiedDate":"2017-10-10"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"Removes the phone number of the 1st person.","lastModifiedDate":"2017-10-10"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `edit` will allow you to edit task details instead. You may wish to edit your task deadlines, for example, when your project schedule changes, or your task priorities, when a task becomes more urgent. +","lastModifiedDate":"2017-10-22"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"Format: `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +","lastModifiedDate":"2017-10-22"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-22"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided.","lastModifiedDate":"2017-10-22"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values.","lastModifiedDate":"2017-10-22"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/5` +","lastModifiedDate":"2017-10-20"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"Edits the priority of the 2nd task to be `5`.","lastModifiedDate":"2017-10-20"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/ t/` +","lastModifiedDate":"2017-10-22"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"Removes the priority and deadline of the second task.","lastModifiedDate":"2017-10-22"},{"lineNumber":180,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edittag` (Since v1.2)","lastModifiedDate":"2017-10-22"},{"lineNumber":182,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"You can use `edittag` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +","lastModifiedDate":"2017-10-22"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"`edittag` can be replaced by `et` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":185,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"Format: `edittag TAGTOBERENAMED NEWTAGNAME` +","lastModifiedDate":"2017-10-22"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different.","lastModifiedDate":"2017-10-22"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `TAGTOBERENAMED` value.","lastModifiedDate":"2017-10-22"},{"lineNumber":191,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"* `edittag friends enemies` +","lastModifiedDate":"2017-10-22"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"Changes the tag called `friends` to one called `enemies` instead. All existing contacts with a `friends` tag will now have an `enemies` tag instead.","lastModifiedDate":"2017-10-22"},{"lineNumber":197,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":198,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)","lastModifiedDate":"2017-10-30"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +","lastModifiedDate":"2017-10-24"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS]`","lastModifiedDate":"2017-10-24"},{"lineNumber":202,"author":{"gitId":"-"},"content":"Shorthand commands: `cp`","lastModifiedDate":"2017-10-15"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-22"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields.","lastModifiedDate":"2017-10-22"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix.","lastModifiedDate":"2017-10-22"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI.","lastModifiedDate":"2017-10-22"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI.","lastModifiedDate":"2017-10-22"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy.","lastModifiedDate":"2017-10-23"},{"lineNumber":211,"author":{"gitId":"-"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting.","lastModifiedDate":"2017-10-30"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","lastModifiedDate":"2017-10-10"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"* `changeprivacy 1 p/false e/true` +","lastModifiedDate":"2017-10-22"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":"Sets the phone number of the 1st person to be public and their email address to be private. The 1st person\u0027s phone number will be displayed, if available, while their email address will be hidden in the UI.","lastModifiedDate":"2017-10-10"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"* `cp 2 a/false n/true e/false` +","lastModifiedDate":"2017-10-24"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"Sets the address and email of the 2nd person to be public and their name to be private. The 2nd person\u0027s address and email will be displayed, if available, while their name will be hidden in the UI.","lastModifiedDate":"2017-10-24"},{"lineNumber":220,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)","lastModifiedDate":"2017-10-30"},{"lineNumber":223,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":224,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite persons. For example, you may wish to set your girlfriend as your favourite contact. +","lastModifiedDate":"2017-10-30"},{"lineNumber":225,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +","lastModifiedDate":"2017-10-30"},{"lineNumber":226,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +","lastModifiedDate":"2017-10-30"},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":228,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-30"},{"lineNumber":229,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":230,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-30"},{"lineNumber":231,"author":{"gitId":"-"},"content":"`favourite 1 2` +","lastModifiedDate":"2017-10-30"},{"lineNumber":232,"author":{"gitId":"-"},"content":"Favourites the 1st and 2nd person in the address book.","lastModifiedDate":"2017-10-30"},{"lineNumber":233,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-10-30"},{"lineNumber":234,"author":{"gitId":"-"},"content":"`favourite 1` +","lastModifiedDate":"2017-10-30"},{"lineNumber":235,"author":{"gitId":"-"},"content":"Favourite the 1st person in the results of the `find` command.","lastModifiedDate":"2017-10-30"},{"lineNumber":236,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":237,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30"},{"lineNumber":238,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`.","lastModifiedDate":"2017-10-30"},{"lineNumber":239,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-30"},{"lineNumber":240,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-30"},{"lineNumber":241,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30"},{"lineNumber":242,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":243,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)","lastModifiedDate":"2017-10-30"},{"lineNumber":244,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":245,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +","lastModifiedDate":"2017-10-30"},{"lineNumber":246,"author":{"gitId":"-"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +","lastModifiedDate":"2017-10-30"},{"lineNumber":247,"author":{"gitId":"-"},"content":"Format: `showfavourite` +","lastModifiedDate":"2017-10-30"},{"lineNumber":248,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":249,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-10-30"},{"lineNumber":250,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-10-30"},{"lineNumber":251,"author":{"gitId":"-"},"content":"`showfavourite` command: It will return an empty list if there is no favourite persons.","lastModifiedDate":"2017-10-30"},{"lineNumber":252,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-10-30"},{"lineNumber":253,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`","lastModifiedDate":"2017-10-20"},{"lineNumber":255,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +","lastModifiedDate":"2017-10-22"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +","lastModifiedDate":"2017-10-22"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"* `find John` +","lastModifiedDate":"2017-10-22"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"Returns `john` and `John Doe`","lastModifiedDate":"2017-10-22"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"* `find Betsy Tim John` +","lastModifiedDate":"2017-10-22"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"Returns any person having names `Betsy`, `Tim`, or `John`","lastModifiedDate":"2017-10-22"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `find` will allow you to sieve through your tasks, instead of your contacts. +","lastModifiedDate":"2017-10-22"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"In addition to searching the name and description of tasks, you can also opt to filter your tasks by their priority. Simply include `p/PRIORITY` after all your other criteria to do so. +","lastModifiedDate":"2017-10-22"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"All tasks with a priority higher than or equal to the value provided will be shown. +","lastModifiedDate":"2017-10-22"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"Format: `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY] +","lastModifiedDate":"2017-10-22"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":272,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"*Important note on `find` criteria*","lastModifiedDate":"2017-10-22"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":275,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","lastModifiedDate":"2017-05-26"},{"lineNumber":276,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","lastModifiedDate":"2017-05-26"},{"lineNumber":277,"author":{"gitId":"-"},"content":"* You can only search for names in Address++","lastModifiedDate":"2017-10-30"},{"lineNumber":278,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","lastModifiedDate":"2017-05-26"},{"lineNumber":279,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","lastModifiedDate":"2017-09-21"},{"lineNumber":280,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26"},{"lineNumber":281,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":282,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26"},{"lineNumber":283,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":"Returns any task that has the word `update` in their names or descriptions","lastModifiedDate":"2017-10-10"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"* `find task update 4` +","lastModifiedDate":"2017-10-22"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"Returns all tasks that has the word `update` in their names or descriptions, and are of priority `4` or higher.","lastModifiedDate":"2017-10-22"},{"lineNumber":288,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":289,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `findtag` (Since V1.4)","lastModifiedDate":"2017-10-30"},{"lineNumber":290,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":291,"author":{"gitId":"-"},"content":"You can use the `findtag` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +","lastModifiedDate":"2017-10-30"},{"lineNumber":292,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/not` in front of the `friends`. +","lastModifiedDate":"2017-10-30"},{"lineNumber":293,"author":{"gitId":"-"},"content":"`findtag` can be replaced by `ftag` for faster input. +","lastModifiedDate":"2017-10-30"},{"lineNumber":294,"author":{"gitId":"-"},"content":"Format: `findtag KEYWORD [MORE_KEYWORDS]` +","lastModifiedDate":"2017-10-30"},{"lineNumber":295,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":296,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-30"},{"lineNumber":297,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":298,"author":{"gitId":"-"},"content":"* `findtag friends` +","lastModifiedDate":"2017-10-30"},{"lineNumber":299,"author":{"gitId":"-"},"content":"Returns any persons having tag `friends`","lastModifiedDate":"2017-10-30"},{"lineNumber":300,"author":{"gitId":"-"},"content":"* `findtag friends colleagues` +","lastModifiedDate":"2017-10-30"},{"lineNumber":301,"author":{"gitId":"-"},"content":"Returns any person having tags `friends` or `colleagues`","lastModifiedDate":"2017-10-30"},{"lineNumber":302,"author":{"gitId":"-"},"content":"* `findtag /notfriends` +","lastModifiedDate":"2017-10-30"},{"lineNumber":303,"author":{"gitId":"-"},"content":"Returns any persons not have tag `friends`","lastModifiedDate":"2017-10-30"},{"lineNumber":304,"author":{"gitId":"-"},"content":"* `findtag classmates /notfriends` +","lastModifiedDate":"2017-10-30"},{"lineNumber":305,"author":{"gitId":"-"},"content":"Returns any person have tags `classmates` but not have tag `friends`","lastModifiedDate":"2017-10-30"},{"lineNumber":306,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":307,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30"},{"lineNumber":308,"author":{"gitId":"-"},"content":"*Important note on `findtag` criteria","lastModifiedDate":"2017-10-30"},{"lineNumber":309,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`","lastModifiedDate":"2017-10-30"},{"lineNumber":310,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`","lastModifiedDate":"2017-10-30"},{"lineNumber":311,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons.","lastModifiedDate":"2017-10-30"},{"lineNumber":312,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `friend` will not match `friends`","lastModifiedDate":"2017-10-30"},{"lineNumber":313,"author":{"gitId":"-"},"content":"* There is no space `/not` and tag name e.g. `/not friends` will not match `/notfriends`","lastModifiedDate":"2017-10-30"},{"lineNumber":314,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30"},{"lineNumber":315,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`","lastModifiedDate":"2017-10-20"},{"lineNumber":317,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts or tasks from the address book. The `delete` command will help you clean up obsolete or completed tasks, or contacts who you may not wish to associate with anymore. +","lastModifiedDate":"2017-10-22"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +","lastModifiedDate":"2017-10-22"},{"lineNumber":321,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":322,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26"},{"lineNumber":323,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":324,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-05-26"},{"lineNumber":325,"author":{"gitId":"-"},"content":"`delete 2` +","lastModifiedDate":"2017-05-26"},{"lineNumber":326,"author":{"gitId":"-"},"content":"Deletes the 2nd person in the address book.","lastModifiedDate":"2017-05-26"},{"lineNumber":327,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-05-26"},{"lineNumber":328,"author":{"gitId":"-"},"content":"`delete 1` +","lastModifiedDate":"2017-05-26"},{"lineNumber":329,"author":{"gitId":"-"},"content":"Deletes the 1st person in the results of the `find` command.","lastModifiedDate":"2017-05-26"},{"lineNumber":330,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":"In order to delete tasks, an additional `task` keyword must be specified after the `delete` command. +","lastModifiedDate":"2017-10-22"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"Format: `delete task INDEX`+","lastModifiedDate":"2017-10-22"},{"lineNumber":333,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":334,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"* Deletes the person or task at the specified `INDEX`.","lastModifiedDate":"2017-10-22"},{"lineNumber":336,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-22"},{"lineNumber":337,"author":{"gitId":"-"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-22"},{"lineNumber":338,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":339,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":340,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-22"},{"lineNumber":341,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":"* `list task` +","lastModifiedDate":"2017-10-10"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"`delete task 2` +","lastModifiedDate":"2017-10-10"},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"Deletes the 2nd task in the address book.","lastModifiedDate":"2017-10-10"},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":"`delete task 1` +","lastModifiedDate":"2017-10-10"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"Deletes the 1st task in the results of the `find task` command.","lastModifiedDate":"2017-10-10"},{"lineNumber":348,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":349,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":350,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `deletetag` (Since V1.2)","lastModifiedDate":"2017-10-30"},{"lineNumber":351,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":352,"author":{"gitId":"-"},"content":"You can use `deletetag` to delete the tag of multiple persons from the address book. +","lastModifiedDate":"2017-10-22"},{"lineNumber":353,"author":{"gitId":"-"},"content":"`deletetag` can be replaced by `dtag` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"Format: `deletetag INDEX... t/[TAG]` +","lastModifiedDate":"2017-10-20"},{"lineNumber":355,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":356,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":357,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-15"},{"lineNumber":358,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`.","lastModifiedDate":"2017-10-30"},{"lineNumber":359,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-15"},{"lineNumber":360,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-30"},{"lineNumber":361,"author":{"gitId":"-"},"content":"* If you do not key in any index, deletetag will delete the tag from all contacts in the address book.","lastModifiedDate":"2017-10-30"},{"lineNumber":362,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-15"},{"lineNumber":363,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":364,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-15"},{"lineNumber":365,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":366,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-15"},{"lineNumber":367,"author":{"gitId":"-"},"content":"`deletetag 1 2 t/friends` +","lastModifiedDate":"2017-10-20"},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag of the 1st and 2nd person in the address book.","lastModifiedDate":"2017-10-20"},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-20"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"`deletetag t/friends` +","lastModifiedDate":"2017-10-20"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag from all contacts in the address book.","lastModifiedDate":"2017-10-20"},{"lineNumber":372,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":373,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sorting your contact list : `sort`","lastModifiedDate":"2017-10-22"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":375,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts by any field in ascending or descending order using the `sort` command +","lastModifiedDate":"2017-10-22"},{"lineNumber":376,"author":{"gitId":"-"},"content":"`sort` can be replaced by `so` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":"Format: `sort FIELD ORDER` +","lastModifiedDate":"2017-10-11"},{"lineNumber":378,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":380,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-08"},{"lineNumber":382,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contact by any field in either ascending or descending order","lastModifiedDate":"2017-10-22"},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":"* Field parameters are limited to the following fields: NAME, PHONE, EMAIL, ADDRESS.","lastModifiedDate":"2017-10-08"},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC.","lastModifiedDate":"2017-10-08"},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts","lastModifiedDate":"2017-10-22"},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-08"},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","lastModifiedDate":"2017-10-08"},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":"* `sort name asc` +","lastModifiedDate":"2017-10-08"},{"lineNumber":391,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in ascending order by the name field.","lastModifiedDate":"2017-10-22"},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":"* `sort address desc` +","lastModifiedDate":"2017-10-08"},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in descending order by the address field.","lastModifiedDate":"2017-10-22"},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":395,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Backing up your data : `backup`","lastModifiedDate":"2017-10-30"},{"lineNumber":396,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":397,"author":{"gitId":"-"},"content":"You can backup your saved data on Address++ by using the `backup` command. +","lastModifiedDate":"2017-10-30"},{"lineNumber":398,"author":{"gitId":"-"},"content":"`backup` can be replaced by `bk` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [RELATIVE LOCATION]` +","lastModifiedDate":"2017-10-22"},{"lineNumber":400,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":401,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":402,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26"},{"lineNumber":403,"author":{"gitId":"-"},"content":"* Allows you to backup your saved data on Address++ in another file.","lastModifiedDate":"2017-10-30"},{"lineNumber":404,"author":{"gitId":"charlesgoh"},"content":"* You can backup your data in the default location or you can specify your desired save location.","lastModifiedDate":"2017-10-22"},{"lineNumber":405,"author":{"gitId":"charlesgoh"},"content":"* You can use the default save name or use your own.","lastModifiedDate":"2017-10-22"},{"lineNumber":406,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26"},{"lineNumber":407,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":408,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26"},{"lineNumber":409,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":410,"author":{"gitId":"charlesgoh"},"content":"* `backup` or `bk` +","lastModifiedDate":"2017-10-22"},{"lineNumber":411,"author":{"gitId":"charlesgoh"},"content":"This command will help you back up in the default save location --\u003e In the data directory of your application.","lastModifiedDate":"2017-10-22"},{"lineNumber":412,"author":{"gitId":"charlesgoh"},"content":"* `backup ./test.xml` or `bk ./test.xml` +","lastModifiedDate":"2017-10-22"},{"lineNumber":413,"author":{"gitId":"charlesgoh"},"content":"This saves the backup file in the current data directory, with the name `test.xml`.","lastModifiedDate":"2017-10-22"},{"lineNumber":414,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`","lastModifiedDate":"2017-10-20"},{"lineNumber":416,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact or task, and look at it in greater detail, such as examining a task with a very long description, or checking out the full address of one of your friends. +","lastModifiedDate":"2017-10-22"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"Format (person): `select INDEX` +","lastModifiedDate":"2017-10-10"},{"lineNumber":420,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":421,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26"},{"lineNumber":422,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":423,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-05-26"},{"lineNumber":424,"author":{"gitId":"-"},"content":"`select 2` +","lastModifiedDate":"2017-05-26"},{"lineNumber":425,"author":{"gitId":"-"},"content":"Selects the 2nd person in the address book.","lastModifiedDate":"2017-05-26"},{"lineNumber":426,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-05-26"},{"lineNumber":427,"author":{"gitId":"-"},"content":"`select 1` +","lastModifiedDate":"2017-05-26"},{"lineNumber":428,"author":{"gitId":"-"},"content":"Selects the 1st person in the results of the `find` command.","lastModifiedDate":"2017-05-26"},{"lineNumber":429,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"To select a task, a `task` keyword must additionally be specified after `select` +","lastModifiedDate":"2017-10-22"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"Format: `select task INDEX` +","lastModifiedDate":"2017-10-22"},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"* Selecting a task will load a list of the people who are assigned to it, instead of the Google search page.","lastModifiedDate":"2017-10-22"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-22"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","lastModifiedDate":"2017-10-22"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22"},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"* `list task` +","lastModifiedDate":"2017-10-10"},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"`select task 2` +","lastModifiedDate":"2017-10-10"},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"Selects the 2nd task in the address book.","lastModifiedDate":"2017-10-10"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"`select task 1` +","lastModifiedDate":"2017-10-10"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"Selects the 1st task in the results of the `find task` command.","lastModifiedDate":"2017-10-10"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":448,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)","lastModifiedDate":"2017-10-30"},{"lineNumber":449,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":450,"author":{"gitId":"-"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +","lastModifiedDate":"2017-10-30"},{"lineNumber":451,"author":{"gitId":"-"},"content":"`locate` can be replaced by `loc` for faster input. +","lastModifiedDate":"2017-10-30"},{"lineNumber":452,"author":{"gitId":"-"},"content":"Format (person): `locate INDEX` +","lastModifiedDate":"2017-10-30"},{"lineNumber":453,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":454,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-30"},{"lineNumber":455,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":456,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-30"},{"lineNumber":457,"author":{"gitId":"-"},"content":"`locate 2` +","lastModifiedDate":"2017-10-30"},{"lineNumber":458,"author":{"gitId":"-"},"content":"Locates the address of the 2nd person in the address book on Google Maps.","lastModifiedDate":"2017-10-30"},{"lineNumber":459,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-10-30"},{"lineNumber":460,"author":{"gitId":"-"},"content":"`locate 1` +","lastModifiedDate":"2017-10-30"},{"lineNumber":461,"author":{"gitId":"-"},"content":"Locates the address of the 1st person in the results of the `find` command on Google Maps.","lastModifiedDate":"2017-10-30"},{"lineNumber":462,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":463,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30"},{"lineNumber":464,"author":{"gitId":"-"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","lastModifiedDate":"2017-10-30"},{"lineNumber":465,"author":{"gitId":"-"},"content":"** It is up to you to provide a specific and valid address.","lastModifiedDate":"2017-10-30"},{"lineNumber":466,"author":{"gitId":"-"},"content":"* A person with a private address cannot be searched on Google Maps.","lastModifiedDate":"2017-10-30"},{"lineNumber":467,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-30"},{"lineNumber":468,"author":{"gitId":"-"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","lastModifiedDate":"2017-10-30"},{"lineNumber":469,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30"},{"lineNumber":470,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Mark task as complete : `setcomplete` (To be coming in V2.0)","lastModifiedDate":"2017-10-10"},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +","lastModifiedDate":"2017-10-22"},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":475,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +","lastModifiedDate":"2017-10-10"},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed.","lastModifiedDate":"2017-10-10"},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-10"},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-10"},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-10"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"* `list task` +","lastModifiedDate":"2017-10-10"},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"`setcomplete 2` +","lastModifiedDate":"2017-10-10"},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as completed.","lastModifiedDate":"2017-10-10"},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10"},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"`setcomplete 1` +","lastModifiedDate":"2017-10-10"},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as completed.","lastModifiedDate":"2017-10-10"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":492,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Mark task as incomplete : `setincomplete` (To be coming in V2.0)","lastModifiedDate":"2017-10-10"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +","lastModifiedDate":"2017-10-22"},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":496,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +","lastModifiedDate":"2017-10-10"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete.","lastModifiedDate":"2017-10-10"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-10"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-10"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-10"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"* `list task` +","lastModifiedDate":"2017-10-10"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"`setincomplete 2` +","lastModifiedDate":"2017-10-10"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as incomplete.","lastModifiedDate":"2017-10-10"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"`setincomplete 1` +","lastModifiedDate":"2017-10-10"},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as incomplete.","lastModifiedDate":"2017-10-10"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign contacts to task : `assign` (To be coming in V2.0)","lastModifiedDate":"2017-10-10"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +","lastModifiedDate":"2017-10-22"},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":517,"author":{"gitId":"-"},"content":"Format: `assign TASKINDEX PEOPLEINDEX...` +","lastModifiedDate":"2017-10-10"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","lastModifiedDate":"2017-10-10"},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","lastModifiedDate":"2017-10-10"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","lastModifiedDate":"2017-10-10"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","lastModifiedDate":"2017-10-10"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-10"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-10"},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"`list task` +","lastModifiedDate":"2017-10-10"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"`assign 2 1 4 5` +","lastModifiedDate":"2017-10-10"},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"Assigns the 2nd task in the address book to the 1st, 4th and 5th contacts.","lastModifiedDate":"2017-10-10"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-10"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"`find task update` +","lastModifiedDate":"2017-10-10"},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"`assign 1 2` +","lastModifiedDate":"2017-10-10"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"Assigns the 1st task in the results of the `find task` command to the 2nd person in the address book.","lastModifiedDate":"2017-10-10"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismiss contacts from task : `dismiss` (To be coming in V2.0)","lastModifiedDate":"2017-10-10"},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":539,"author":{"gitId":"-"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +","lastModifiedDate":"2017-10-30"},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":541,"author":{"gitId":"-"},"content":"Format: `dismiss TASKINDEX PEOPLEINDEX...` +","lastModifiedDate":"2017-10-10"},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","lastModifiedDate":"2017-10-10"},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","lastModifiedDate":"2017-10-10"},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","lastModifiedDate":"2017-10-10"},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","lastModifiedDate":"2017-10-10"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-10"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-10"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"`list task` +","lastModifiedDate":"2017-10-10"},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"`dismiss 2 1 4 5` +","lastModifiedDate":"2017-10-10"},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"Dismisses 1st, 4th and 5th contacts in the address book from the 2nd task.","lastModifiedDate":"2017-10-10"},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-10"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"`find task update` +","lastModifiedDate":"2017-10-10"},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"`dismiss 1 2` +","lastModifiedDate":"2017-10-10"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"Dismisses the 2nd person in the address book from the 1st task in the results of the `find task` command.","lastModifiedDate":"2017-10-10"},{"lineNumber":560,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":561,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`","lastModifiedDate":"2017-05-24"},{"lineNumber":562,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":563,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +","lastModifiedDate":"2017-07-05"},{"lineNumber":564,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":565,"author":{"gitId":"-"},"content":"Format: `history` +","lastModifiedDate":"2017-10-10"},{"lineNumber":566,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":567,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-06-29"},{"lineNumber":568,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-06-29"},{"lineNumber":569,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","lastModifiedDate":"2017-06-29"},{"lineNumber":570,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-06-29"},{"lineNumber":571,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-29"},{"lineNumber":572,"author":{"gitId":"-"},"content":"// tag::undoredo[]","lastModifiedDate":"2017-07-31"},{"lineNumber":573,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`","lastModifiedDate":"2017-09-21"},{"lineNumber":574,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +","lastModifiedDate":"2017-10-22"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":577,"author":{"gitId":"-"},"content":"Format: `undo` +","lastModifiedDate":"2017-10-10"},{"lineNumber":578,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":579,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-07-19"},{"lineNumber":580,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-07-19"},{"lineNumber":581,"author":{"gitId":"-"},"content":"Undoable commands: those commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`).","lastModifiedDate":"2017-07-19"},{"lineNumber":582,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-07-19"},{"lineNumber":583,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":584,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-07-19"},{"lineNumber":585,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":586,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19"},{"lineNumber":587,"author":{"gitId":"-"},"content":"`list` +","lastModifiedDate":"2017-07-19"},{"lineNumber":588,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","lastModifiedDate":"2017-07-19"},{"lineNumber":589,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":590,"author":{"gitId":"-"},"content":"* `select 1` +","lastModifiedDate":"2017-07-19"},{"lineNumber":591,"author":{"gitId":"-"},"content":"`list` +","lastModifiedDate":"2017-07-19"},{"lineNumber":592,"author":{"gitId":"-"},"content":"`undo` +","lastModifiedDate":"2017-07-19"},{"lineNumber":593,"author":{"gitId":"-"},"content":"The `undo` command fails as there are no undoable commands executed previously.","lastModifiedDate":"2017-07-19"},{"lineNumber":594,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":595,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19"},{"lineNumber":596,"author":{"gitId":"-"},"content":"`clear` +","lastModifiedDate":"2017-07-19"},{"lineNumber":597,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","lastModifiedDate":"2017-07-19"},{"lineNumber":598,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","lastModifiedDate":"2017-07-19"},{"lineNumber":599,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":600,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":601,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)","lastModifiedDate":"2017-10-30"},{"lineNumber":602,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":603,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +","lastModifiedDate":"2017-10-30"},{"lineNumber":604,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +","lastModifiedDate":"2017-10-30"},{"lineNumber":605,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +","lastModifiedDate":"2017-10-30"},{"lineNumber":606,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +","lastModifiedDate":"2017-10-30"},{"lineNumber":607,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":608,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-30"},{"lineNumber":609,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":610,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-30"},{"lineNumber":611,"author":{"gitId":"-"},"content":"`unfavourite 1 2` +","lastModifiedDate":"2017-10-30"},{"lineNumber":612,"author":{"gitId":"-"},"content":"Unfavourites the 1st and 2nd person in the address book.","lastModifiedDate":"2017-10-30"},{"lineNumber":613,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-10-30"},{"lineNumber":614,"author":{"gitId":"-"},"content":"`unfavourite 1` +","lastModifiedDate":"2017-10-30"},{"lineNumber":615,"author":{"gitId":"-"},"content":"Unfavourite the 1st person in the results of the `find` command.","lastModifiedDate":"2017-10-30"},{"lineNumber":616,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":617,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30"},{"lineNumber":618,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`.","lastModifiedDate":"2017-10-30"},{"lineNumber":619,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-30"},{"lineNumber":620,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-30"},{"lineNumber":621,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30"},{"lineNumber":622,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":623,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`","lastModifiedDate":"2017-09-21"},{"lineNumber":624,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` wasn\u0027t necessary. `redo` reverses the most recent `undo` command. +","lastModifiedDate":"2017-10-22"},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":627,"author":{"gitId":"-"},"content":"Format: `redo` +","lastModifiedDate":"2017-10-10"},{"lineNumber":628,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":629,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-07-19"},{"lineNumber":630,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":631,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19"},{"lineNumber":632,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","lastModifiedDate":"2017-07-19"},{"lineNumber":633,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","lastModifiedDate":"2017-07-19"},{"lineNumber":634,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":635,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19"},{"lineNumber":636,"author":{"gitId":"-"},"content":"`redo` +","lastModifiedDate":"2017-07-19"},{"lineNumber":637,"author":{"gitId":"-"},"content":"The `redo` command fails as there are no `undo` commands executed previously.","lastModifiedDate":"2017-07-19"},{"lineNumber":638,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":639,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19"},{"lineNumber":640,"author":{"gitId":"-"},"content":"`clear` +","lastModifiedDate":"2017-07-19"},{"lineNumber":641,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","lastModifiedDate":"2017-07-19"},{"lineNumber":642,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","lastModifiedDate":"2017-07-19"},{"lineNumber":643,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","lastModifiedDate":"2017-07-19"},{"lineNumber":644,"author":{"gitId":"-"},"content":"`redo` (reapplies the `clear` command) +","lastModifiedDate":"2017-07-19"},{"lineNumber":645,"author":{"gitId":"-"},"content":"// end::undoredo[]","lastModifiedDate":"2017-07-31"},{"lineNumber":646,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19"},{"lineNumber":647,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`","lastModifiedDate":"2017-10-22"},{"lineNumber":648,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +","lastModifiedDate":"2017-10-22"},{"lineNumber":650,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +","lastModifiedDate":"2017-10-22"},{"lineNumber":651,"author":{"gitId":"-"},"content":"Format: `clear` +","lastModifiedDate":"2017-10-20"},{"lineNumber":652,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":653,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`","lastModifiedDate":"2017-05-26"},{"lineNumber":654,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":655,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +","lastModifiedDate":"2017-10-22"},{"lineNumber":656,"author":{"gitId":"-"},"content":"Format: `exit`","lastModifiedDate":"2017-05-26"},{"lineNumber":657,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":658,"author":{"gitId":"-"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4].","lastModifiedDate":"2017-10-30"},{"lineNumber":659,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":660,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data","lastModifiedDate":"2017-05-26"},{"lineNumber":661,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +","lastModifiedDate":"2017-10-22"},{"lineNumber":663,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually.","lastModifiedDate":"2017-10-22"},{"lineNumber":664,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":665,"author":{"gitId":"-"},"content":"If you want to change the location of the save file, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window.","lastModifiedDate":"2017-10-30"},{"lineNumber":666,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":667,"author":{"gitId":"-"},"content":"If you want to open a different save file, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window.","lastModifiedDate":"2017-10-30"},{"lineNumber":668,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":669,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Using the browser","lastModifiedDate":"2017-10-30"},{"lineNumber":670,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":671,"author":{"gitId":"jeffreygohkw"},"content":"If you click on a box containing a contact, an internet browser on the right side of the window.","lastModifiedDate":"2017-10-22"},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":673,"author":{"gitId":"-"},"content":"* Performing a left click will allow you to perform a search on Google for the name of the contact, and is equivalent to doing a `select` on that oerson.","lastModifiedDate":"2017-10-30"},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"* If a person\u0027s name or address is set to private, the browser will not perform a search if you click on their box.","lastModifiedDate":"2017-10-22"},{"lineNumber":675,"author":{"gitId":"-"},"content":"* Right clicking on the browser will allow you to go to the previous or next page, as well as reload the page.","lastModifiedDate":"2017-10-30"},{"lineNumber":676,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-10"},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Exporting the data","lastModifiedDate":"2017-10-10"},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":"Address book data can be exported in a number of different formats, thus allowing the data to be compatible to any device.","lastModifiedDate":"2017-10-10"},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":682,"author":{"gitId":"-"},"content":"To export data, click on `File -\u003e Export As...` or use the keyboard shortcut kbd:[CTRL]+kbd:[E]` and select the new location and file name for the export file in the pop-up window.","lastModifiedDate":"2017-10-30"},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Auto-Complete: Learning Your Typing Habits","lastModifiedDate":"2017-10-10"},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":686,"author":{"gitId":"charlesgoh"},"content":"The program will learn your typing habits and give autocomplete suggestions that become more accurate over time.","lastModifiedDate":"2017-10-10"},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":688,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","lastModifiedDate":"2017-05-26"},{"lineNumber":689,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":690,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","lastModifiedDate":"2017-05-26"},{"lineNumber":691,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location.","lastModifiedDate":"2017-10-30"},{"lineNumber":692,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":693,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet","lastModifiedDate":"2017-10-22"},{"lineNumber":694,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26"},{"lineNumber":695,"author":{"gitId":"-"},"content":"* *Add* : `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] [f/FACULTY] [c/GOOGLE CALENDAR URL] [t/TAG]...` +","lastModifiedDate":"2017-10-30"},{"lineNumber":696,"author":{"gitId":"-"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665, b/29-02-1996 f/SOC c/www.enteryourcalendarurlhere.com t/friend t/colleague`","lastModifiedDate":"2017-10-15"},{"lineNumber":697,"author":{"gitId":"jeffreygohkw"},"content":"* *Add with private fields* : `add or a pn/NAME pp/PHONE_NUMBER pe/EMAIL pa/ADDRESS b/BIRTHDAY f/FACULTY c/[GOOGLE CALENDAR URL] [t/TAG]...` +","lastModifiedDate":"2017-10-24"},{"lineNumber":698,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665`","lastModifiedDate":"2017-10-24"},{"lineNumber":699,"author":{"gitId":"-"},"content":"* *Add task* : `add task n/NAME [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +","lastModifiedDate":"2017-10-30"},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"e.g. `add task n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high`","lastModifiedDate":"2017-10-10"},{"lineNumber":701,"author":{"gitId":"-"},"content":"* *Add tag* : `addtag INDEX t/[TAG]` +","lastModifiedDate":"2017-10-20"},{"lineNumber":702,"author":{"gitId":"-"},"content":"e.g. `addtag 1 2 t/friends`","lastModifiedDate":"2017-10-20"},{"lineNumber":703,"author":{"gitId":"-"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE]` +","lastModifiedDate":"2017-10-30"},{"lineNumber":704,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false`","lastModifiedDate":"2017-10-24"},{"lineNumber":705,"author":{"gitId":"Esilocke"},"content":"* *Clear person* : `clear`","lastModifiedDate":"2017-10-10"},{"lineNumber":706,"author":{"gitId":"-"},"content":"* *Clear tasks* : `cleartask`","lastModifiedDate":"2017-10-20"},{"lineNumber":707,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +","lastModifiedDate":"2017-10-10"},{"lineNumber":708,"author":{"gitId":"-"},"content":"e.g. `delete 3`","lastModifiedDate":"2017-05-26"},{"lineNumber":709,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task INDEX` +","lastModifiedDate":"2017-10-10"},{"lineNumber":710,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task 4`","lastModifiedDate":"2017-10-10"},{"lineNumber":711,"author":{"gitId":"-"},"content":"* *Delete tag* : `deletetag INDEX t/[TAG]` +","lastModifiedDate":"2017-10-20"},{"lineNumber":712,"author":{"gitId":"-"},"content":"e.g. `deletetag 1 2 t/friends`","lastModifiedDate":"2017-10-20"},{"lineNumber":713,"author":{"gitId":"-"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] c/[GOOGLE CALENDAR URL] [a/ADDRESS] [t/TAG]...` +","lastModifiedDate":"2017-10-30"},{"lineNumber":714,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`","lastModifiedDate":"2017-09-21"},{"lineNumber":715,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +","lastModifiedDate":"2017-10-10"},{"lineNumber":716,"author":{"gitId":"-"},"content":"e.g. `edit task 2 p/veryhigh`","lastModifiedDate":"2017-10-20"},{"lineNumber":717,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edittag TAGTOCHANGE NEWTAGNAME` +","lastModifiedDate":"2017-10-22"},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"e.g. `edittag friends enemies`","lastModifiedDate":"2017-10-22"},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +","lastModifiedDate":"2017-10-10"},{"lineNumber":720,"author":{"gitId":"-"},"content":"e.g. `find James Jake`","lastModifiedDate":"2017-05-26"},{"lineNumber":721,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +","lastModifiedDate":"2017-10-10"},{"lineNumber":722,"author":{"gitId":"Esilocke"},"content":"e.g. `find task update p/high`","lastModifiedDate":"2017-10-10"},{"lineNumber":723,"author":{"gitId":"-"},"content":"* *Help* : `help`","lastModifiedDate":"2017-10-30"},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"* *List persons* : `list`","lastModifiedDate":"2017-10-10"},{"lineNumber":725,"author":{"gitId":"Esilocke"},"content":"* *List tasks* : `list task`","lastModifiedDate":"2017-10-10"},{"lineNumber":726,"author":{"gitId":"-"},"content":"* *Locate a person\u0027s address* : `locate`","lastModifiedDate":"2017-10-30"},{"lineNumber":727,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +","lastModifiedDate":"2017-10-10"},{"lineNumber":728,"author":{"gitId":"-"},"content":"e.g.`select 2`","lastModifiedDate":"2017-05-26"},{"lineNumber":729,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task INDEX` +","lastModifiedDate":"2017-10-10"},{"lineNumber":730,"author":{"gitId":"Esilocke"},"content":"e.g.`select task 2`","lastModifiedDate":"2017-10-10"},{"lineNumber":731,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +","lastModifiedDate":"2017-10-15"},{"lineNumber":732,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`","lastModifiedDate":"2017-10-15"},{"lineNumber":733,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +","lastModifiedDate":"2017-10-15"},{"lineNumber":734,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`","lastModifiedDate":"2017-10-15"},{"lineNumber":735,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign TASKINDEX PERSONINDEX...` +","lastModifiedDate":"2017-10-10"},{"lineNumber":736,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 21`","lastModifiedDate":"2017-10-10"},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss TASKINDEX PERSONINDEX...` +","lastModifiedDate":"2017-10-10"},{"lineNumber":738,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 17`","lastModifiedDate":"2017-10-10"},{"lineNumber":739,"author":{"gitId":"-"},"content":"* *History* : `history`","lastModifiedDate":"2017-10-10"},{"lineNumber":740,"author":{"gitId":"-"},"content":"* *Undo* : `undo`","lastModifiedDate":"2017-10-10"},{"lineNumber":741,"author":{"gitId":"-"},"content":"* *Redo* : `redo`","lastModifiedDate":"2017-10-10"},{"lineNumber":742,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":743,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts","lastModifiedDate":"2017-10-08"},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10"},{"lineNumber":745,"author":{"gitId":"-"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]","lastModifiedDate":"2017-10-30"},{"lineNumber":746,"author":{"gitId":"-"},"content":"* *Help* : kbd:[[F1]","lastModifiedDate":"2017-10-30"},{"lineNumber":747,"author":{"gitId":"-"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]","lastModifiedDate":"2017-10-30"},{"lineNumber":748,"author":{"gitId":"-"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]","lastModifiedDate":"2017-10-30"}],"authorContributionMap":{"charlesgoh":32,"jeffreygohkw":47,"Esilocke":255,"-":414}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","lastModifiedDate":"2016-08-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","lastModifiedDate":"2017-01-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","lastModifiedDate":"2017-01-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-01-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2016-08-26"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","lastModifiedDate":"2016-08-26"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","lastModifiedDate":"2016-08-26"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","lastModifiedDate":"2016-08-26"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","lastModifiedDate":"2016-09-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","lastModifiedDate":"2016-09-23"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","lastModifiedDate":"2016-09-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","lastModifiedDate":"2016-09-28"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2016-09-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","lastModifiedDate":"2016-10-07"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2016-09-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","lastModifiedDate":"2016-09-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","lastModifiedDate":"2016-09-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-01-18"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-01-18"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-01-18"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-01-18"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-01-18"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","lastModifiedDate":"2016-12-20"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","lastModifiedDate":"2017-02-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","lastModifiedDate":"2017-02-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","lastModifiedDate":"2016-09-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","lastModifiedDate":"2016-08-08"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","lastModifiedDate":"2017-02-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","lastModifiedDate":"2017-02-25"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;","lastModifiedDate":"2017-10-04"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","lastModifiedDate":"2016-09-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","lastModifiedDate":"2016-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application.","lastModifiedDate":"2016-08-08"},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","lastModifiedDate":"2016-08-08"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 3, 0, true);","lastModifiedDate":"2017-10-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","lastModifiedDate":"2017-04-01"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01"},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;","lastModifiedDate":"2016-09-25"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;","lastModifiedDate":"2016-09-25"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;","lastModifiedDate":"2016-09-25"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;","lastModifiedDate":"2016-09-25"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;","lastModifiedDate":"2016-08-08"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","lastModifiedDate":"2016-08-08"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {","lastModifiedDate":"2016-08-08"},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","lastModifiedDate":"2016-09-29"},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();","lastModifiedDate":"2016-08-08"},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","lastModifiedDate":"2016-09-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-25"},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","lastModifiedDate":"2017-02-25"},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","lastModifiedDate":"2017-02-25"},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","lastModifiedDate":"2017-02-25"},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","lastModifiedDate":"2017-02-25"},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);","lastModifiedDate":"2016-09-24"},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","lastModifiedDate":"2016-09-25"},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model, storage);","lastModifiedDate":"2017-10-19"},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","lastModifiedDate":"2016-09-25"},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();","lastModifiedDate":"2016-09-24"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","lastModifiedDate":"2016-09-24"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","lastModifiedDate":"2016-09-24"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","lastModifiedDate":"2016-09-24"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","lastModifiedDate":"2017-08-16"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","lastModifiedDate":"2017-08-16"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","lastModifiedDate":"2017-08-16"},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","lastModifiedDate":"2016-09-25"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","lastModifiedDate":"2016-09-24"},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","lastModifiedDate":"2016-09-24"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24"},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","lastModifiedDate":"2016-09-25"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","lastModifiedDate":"2016-09-24"},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","lastModifiedDate":"2016-12-20"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","lastModifiedDate":"2016-12-20"},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","lastModifiedDate":"2016-09-24"},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","lastModifiedDate":"2016-09-24"},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","lastModifiedDate":"2016-09-24"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-10-01"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","lastModifiedDate":"2016-10-12"},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","lastModifiedDate":"2016-09-24"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","lastModifiedDate":"2016-09-25"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":108,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","lastModifiedDate":"2016-09-24"},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","lastModifiedDate":"2016-09-23"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":112,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","lastModifiedDate":"2017-08-16"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","lastModifiedDate":"2017-08-16"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","lastModifiedDate":"2017-08-16"},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","lastModifiedDate":"2016-09-24"},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;","lastModifiedDate":"2016-09-24"},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;","lastModifiedDate":"2016-09-24"},{"lineNumber":121,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","lastModifiedDate":"2016-09-24"},{"lineNumber":123,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","lastModifiedDate":"2016-09-24"},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","lastModifiedDate":"2016-09-24"},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","lastModifiedDate":"2016-09-24"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":128,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","lastModifiedDate":"2016-09-24"},{"lineNumber":130,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","lastModifiedDate":"2016-09-24"},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","lastModifiedDate":"2016-09-24"},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","lastModifiedDate":"2016-09-24"},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","lastModifiedDate":"2017-05-22"},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","lastModifiedDate":"2017-05-22"},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","lastModifiedDate":"2016-09-24"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":139,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","lastModifiedDate":"2016-09-24"},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24"},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","lastModifiedDate":"2016-09-24"},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-24"},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","lastModifiedDate":"2016-09-24"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;","lastModifiedDate":"2016-09-24"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":148,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","lastModifiedDate":"2017-08-16"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","lastModifiedDate":"2017-08-16"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file.","lastModifiedDate":"2017-08-16"},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","lastModifiedDate":"2017-02-25"},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","lastModifiedDate":"2017-02-25"},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","lastModifiedDate":"2016-09-24"},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","lastModifiedDate":"2016-09-24"},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24"},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","lastModifiedDate":"2016-09-25"},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","lastModifiedDate":"2016-09-24"},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","lastModifiedDate":"2016-09-24"},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","lastModifiedDate":"2017-05-22"},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","lastModifiedDate":"2017-05-22"},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","lastModifiedDate":"2016-09-24"},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-24"},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","lastModifiedDate":"2016-10-12"},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","lastModifiedDate":"2016-09-24"},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":170,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","lastModifiedDate":"2016-09-24"},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24"},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","lastModifiedDate":"2016-09-25"},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-24"},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","lastModifiedDate":"2016-09-24"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":177,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;","lastModifiedDate":"2016-09-24"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":180,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","lastModifiedDate":"2016-09-24"},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","lastModifiedDate":"2016-09-24"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":184,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":185,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08"},{"lineNumber":186,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","lastModifiedDate":"2016-08-08"},{"lineNumber":187,"author":{"gitId":"-"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","lastModifiedDate":"2016-09-29"},{"lineNumber":188,"author":{"gitId":"-"},"content":" ui.start(primaryStage);","lastModifiedDate":"2016-09-25"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();","lastModifiedDate":"2017-10-04"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);","lastModifiedDate":"2017-10-04"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);","lastModifiedDate":"2017-10-08"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);","lastModifiedDate":"2017-10-08"},{"lineNumber":193,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":194,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08"},{"lineNumber":196,"author":{"gitId":"-"},"content":" public void stop() {","lastModifiedDate":"2016-08-08"},{"lineNumber":197,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","lastModifiedDate":"2016-09-29"},{"lineNumber":198,"author":{"gitId":"-"},"content":" ui.stop();","lastModifiedDate":"2016-09-25"},{"lineNumber":199,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24"},{"lineNumber":200,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(userPrefs);","lastModifiedDate":"2016-09-25"},{"lineNumber":201,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-24"},{"lineNumber":202,"author":{"gitId":"-"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","lastModifiedDate":"2016-09-24"},{"lineNumber":203,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":204,"author":{"gitId":"-"},"content":" Platform.exit();","lastModifiedDate":"2016-08-08"},{"lineNumber":205,"author":{"gitId":"-"},"content":" System.exit(0);","lastModifiedDate":"2016-08-08"},{"lineNumber":206,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":207,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":208,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2016-08-26"},{"lineNumber":209,"author":{"gitId":"-"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","lastModifiedDate":"2016-08-26"},{"lineNumber":210,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2016-09-29"},{"lineNumber":211,"author":{"gitId":"-"},"content":" this.stop();","lastModifiedDate":"2016-08-26"},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-26"},{"lineNumber":213,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-26"},{"lineNumber":214,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2016-08-08"},{"lineNumber":215,"author":{"gitId":"-"},"content":" launch(args);","lastModifiedDate":"2016-08-08"},{"lineNumber":216,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":5,"-":210}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","lastModifiedDate":"2016-09-23"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","lastModifiedDate":"2016-08-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","lastModifiedDate":"2016-08-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","lastModifiedDate":"2016-09-21"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","lastModifiedDate":"2016-08-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";","lastModifiedDate":"2017-10-23"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","lastModifiedDate":"2016-08-24"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";","lastModifiedDate":"2017-10-26"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28"},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;","lastModifiedDate":"2016-09-23"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2016-09-23"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2016-09-21"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/","lastModifiedDate":"2016-09-26"},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {","lastModifiedDate":"2016-09-26"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;","lastModifiedDate":"2016-08-08"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {","lastModifiedDate":"2016-09-26"},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;","lastModifiedDate":"2016-08-08"},{"lineNumber":13,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-08"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()","lastModifiedDate":"2017-10-30"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();","lastModifiedDate":"2017-10-30"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":20,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","lastModifiedDate":"2017-10-28"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;","lastModifiedDate":"2017-10-28"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-28"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;","lastModifiedDate":"2017-10-28"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","lastModifiedDate":"2017-10-28"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","lastModifiedDate":"2017-10-28"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return person;","lastModifiedDate":"2017-10-28"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","lastModifiedDate":"2017-10-03"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2017-10-03"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-03"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location.","lastModifiedDate":"2017-10-03"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-03"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {","lastModifiedDate":"2017-10-03"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-03"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","lastModifiedDate":"2017-10-03"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","lastModifiedDate":"2017-10-03"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-03"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-03"}],"authorContributionMap":{"jeffreygohkw":14}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","lastModifiedDate":"2017-10-03"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2017-10-03"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-03"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location.","lastModifiedDate":"2017-10-03"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-03"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {","lastModifiedDate":"2017-10-03"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-03"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","lastModifiedDate":"2017-10-03"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","lastModifiedDate":"2017-10-03"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-03"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-03"}],"authorContributionMap":{"jeffreygohkw":14}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","lastModifiedDate":"2017-10-28"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-28"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;","lastModifiedDate":"2017-10-28"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {","lastModifiedDate":"2017-10-28"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-28"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {","lastModifiedDate":"2017-10-28"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-28"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","lastModifiedDate":"2016-09-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-09-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","lastModifiedDate":"2016-09-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-25"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-28"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component","lastModifiedDate":"2016-09-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {","lastModifiedDate":"2016-09-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-25"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","lastModifiedDate":"2016-09-25"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","lastModifiedDate":"2016-09-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","lastModifiedDate":"2016-09-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","lastModifiedDate":"2017-02-05"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","lastModifiedDate":"2017-03-11"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","lastModifiedDate":"2017-03-11"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","lastModifiedDate":"2017-09-01"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","lastModifiedDate":"2016-09-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-26"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */","lastModifiedDate":"2017-10-28"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","lastModifiedDate":"2017-06-29"},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","lastModifiedDate":"2017-06-29"},{"lineNumber":31,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-25"}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","lastModifiedDate":"2016-09-21"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-09-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","lastModifiedDate":"2016-09-23"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-29"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","lastModifiedDate":"2016-09-22"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","lastModifiedDate":"2016-09-22"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","lastModifiedDate":"2017-07-07"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2016-09-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-24"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","lastModifiedDate":"2017-10-19"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-21"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","lastModifiedDate":"2016-09-22"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","lastModifiedDate":"2016-09-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","lastModifiedDate":"2016-09-29"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","lastModifiedDate":"2016-09-25"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;","lastModifiedDate":"2017-10-19"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;","lastModifiedDate":"2017-05-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","lastModifiedDate":"2017-07-07"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","lastModifiedDate":"2017-07-07"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model, Storage storage) {","lastModifiedDate":"2017-10-19"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2016-09-25"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","lastModifiedDate":"2017-10-19"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","lastModifiedDate":"2017-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","lastModifiedDate":"2017-07-07"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","lastModifiedDate":"2017-07-07"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {","lastModifiedDate":"2017-10-19"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2017-10-19"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;","lastModifiedDate":"2017-10-19"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","lastModifiedDate":"2017-10-19"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","lastModifiedDate":"2017-10-19"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","lastModifiedDate":"2017-10-19"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","lastModifiedDate":"2017-03-11"},{"lineNumber":48,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","lastModifiedDate":"2016-09-29"},{"lineNumber":49,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" Command command \u003d addressBookParser.parseCommand(commandText);","lastModifiedDate":"2017-07-07"},{"lineNumber":51,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","lastModifiedDate":"2017-07-07"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);","lastModifiedDate":"2017-10-19"},{"lineNumber":53,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","lastModifiedDate":"2017-07-07"},{"lineNumber":54,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","lastModifiedDate":"2017-07-07"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return result;","lastModifiedDate":"2017-07-07"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } finally {","lastModifiedDate":"2017-05-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" history.add(commandText);","lastModifiedDate":"2017-05-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","lastModifiedDate":"2016-09-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","lastModifiedDate":"2016-09-25"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-29"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","lastModifiedDate":"2017-10-28"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();","lastModifiedDate":"2017-10-28"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-29"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","lastModifiedDate":"2017-06-29"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","lastModifiedDate":"2017-06-29"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-29"},{"lineNumber":77,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-21"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":8,"-":63}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-05-09"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-24"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-05-09"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-05-09"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-24"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-22"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-05-09"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-09"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-01-18"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-03-17"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-23"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Adds a person or task to the address book.","lastModifiedDate":"2017-10-26"},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {","lastModifiedDate":"2017-05-04"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","lastModifiedDate":"2016-08-24"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","lastModifiedDate":"2017-10-03"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \"","lastModifiedDate":"2016-08-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-06-06"},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \"","lastModifiedDate":"2017-06-06"},{"lineNumber":34,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"PHONE \"","lastModifiedDate":"2017-05-09"},{"lineNumber":35,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","lastModifiedDate":"2017-05-09"},{"lineNumber":36,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"ADDRESS \"","lastModifiedDate":"2017-05-09"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","lastModifiedDate":"2017-10-22"},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","lastModifiedDate":"2017-05-09"},{"lineNumber":39,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","lastModifiedDate":"2017-06-06"},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \"","lastModifiedDate":"2017-06-06"},{"lineNumber":41,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \"","lastModifiedDate":"2017-05-09"},{"lineNumber":42,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","lastModifiedDate":"2017-05-09"},{"lineNumber":43,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","lastModifiedDate":"2017-05-09"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","lastModifiedDate":"2017-10-22"},{"lineNumber":45,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"friends \"","lastModifiedDate":"2017-05-09"},{"lineNumber":46,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"owesMoney\";","lastModifiedDate":"2017-05-09"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Adds a task to the address book. \"","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","lastModifiedDate":"2017-10-24"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"DESCRIPTION \"","lastModifiedDate":"2017-10-24"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"DEADLINE \"","lastModifiedDate":"2017-10-24"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"PRIORITY \"","lastModifiedDate":"2017-10-24"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \"","lastModifiedDate":"2017-10-24"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \"","lastModifiedDate":"2017-10-24"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \"","lastModifiedDate":"2017-10-24"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \";","lastModifiedDate":"2017-10-24"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_SUCCESS \u003d \"New task added: \\n%1$s\";","lastModifiedDate":"2017-10-26"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";","lastModifiedDate":"2017-10-23"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";","lastModifiedDate":"2016-08-24"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";","lastModifiedDate":"2017-10-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;","lastModifiedDate":"2017-10-23"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;","lastModifiedDate":"2017-10-23"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private boolean isTask \u003d false;","lastModifiedDate":"2017-10-23"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}","lastModifiedDate":"2017-03-17"},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public AddCommand(ReadOnlyPerson person) {","lastModifiedDate":"2017-03-17"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);","lastModifiedDate":"2017-10-23"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d null;","lastModifiedDate":"2017-10-23"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@Code ReadOnlyTask}","lastModifiedDate":"2017-10-26"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","lastModifiedDate":"2017-10-23"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);","lastModifiedDate":"2017-10-23"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d null;","lastModifiedDate":"2017-10-23"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" isTask \u003d true;","lastModifiedDate":"2017-10-23"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-05-04"},{"lineNumber":88,"author":{"gitId":"-"},"content":" requireNonNull(model);","lastModifiedDate":"2017-05-15"},{"lineNumber":89,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-08-26"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","lastModifiedDate":"2017-10-23"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);","lastModifiedDate":"2017-10-23"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_TASK_SUCCESS, taskToAdd));","lastModifiedDate":"2017-10-24"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-23"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);","lastModifiedDate":"2017-10-23"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));","lastModifiedDate":"2017-10-23"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-06-09"},{"lineNumber":98,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-02-05"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","lastModifiedDate":"2017-10-24"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","lastModifiedDate":"2017-10-24"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-26"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-26"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":104,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-22"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-06-22"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-23"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-23"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddCommand)) {","lastModifiedDate":"2017-10-23"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-23"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } else if (taskToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).taskToAdd \u003d\u003d null) {","lastModifiedDate":"2017-10-23"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert(personToAdd !\u003d null);","lastModifiedDate":"2017-10-23"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null","lastModifiedDate":"2017-10-23"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddCommand) other).personToAdd);","lastModifiedDate":"2017-10-23"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else if (personToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).personToAdd \u003d\u003d null) {","lastModifiedDate":"2017-10-23"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assert(taskToAdd !\u003d null);","lastModifiedDate":"2017-10-23"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null","lastModifiedDate":"2017-10-23"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddCommand) other).taskToAdd);","lastModifiedDate":"2017-10-23"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-23"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-23"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-22"},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":60,"wangyiming1019":1,"-":58}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-16"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-16"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-16"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-16"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-16"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-16"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-16"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-16"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-16"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book.","lastModifiedDate":"2017-10-16"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends UndoableCommand {","lastModifiedDate":"2017-10-16"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"addtag\";","lastModifiedDate":"2017-10-16"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"atag\";","lastModifiedDate":"2017-10-16"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-16"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\"","lastModifiedDate":"2017-10-16"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","lastModifiedDate":"2017-10-16"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-10-16"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\"","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","lastModifiedDate":"2017-10-16"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","lastModifiedDate":"2017-10-16"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";","lastModifiedDate":"2017-10-16"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","lastModifiedDate":"2017-10-16"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all persons in the current list.\";","lastModifiedDate":"2017-10-16"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","lastModifiedDate":"2017-10-16"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;","lastModifiedDate":"2017-10-16"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","lastModifiedDate":"2017-10-16"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes","lastModifiedDate":"2017-10-16"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-16"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","lastModifiedDate":"2017-10-16"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","lastModifiedDate":"2017-10-16"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","lastModifiedDate":"2017-10-16"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","lastModifiedDate":"2017-10-16"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-19"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * @param addTag tag to add to all entries in the address book","lastModifiedDate":"2017-10-19"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public AddTagCommand(Tag addTag) {","lastModifiedDate":"2017-10-19"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" requireNonNull(addTag);","lastModifiedDate":"2017-10-19"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-19"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" this.addTag \u003d addTag;","lastModifiedDate":"2017-10-19"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","lastModifiedDate":"2017-10-16"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","lastModifiedDate":"2017-10-16"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-16"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-16"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;","lastModifiedDate":"2017-10-16"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","lastModifiedDate":"2017-10-19"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" reinitlializeArray(lastShownList.size());","lastModifiedDate":"2017-10-20"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","lastModifiedDate":"2017-10-16"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-16"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-16"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag","lastModifiedDate":"2017-10-16"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","lastModifiedDate":"2017-10-16"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();","lastModifiedDate":"2017-10-16"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);","lastModifiedDate":"2017-10-16"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {","lastModifiedDate":"2017-10-16"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;","lastModifiedDate":"2017-10-16"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {","lastModifiedDate":"2017-10-16"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);","lastModifiedDate":"2017-10-16"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);","lastModifiedDate":"2017-10-16"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-10-16"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-10-16"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-16"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-16"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));","lastModifiedDate":"2017-10-16"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private void reinitlializeArray(int size) {","lastModifiedDate":"2017-10-20"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2017-10-20"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" targetIndexes.add(Index.fromZeroBased(i));","lastModifiedDate":"2017-10-20"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-16"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-16"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-16"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;","lastModifiedDate":"2017-10-16"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-16"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {","lastModifiedDate":"2017-10-16"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;","lastModifiedDate":"2017-10-16"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check","lastModifiedDate":"2017-10-16"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;","lastModifiedDate":"2017-10-16"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","lastModifiedDate":"2017-10-16"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);","lastModifiedDate":"2017-10-16"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-16"}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":108}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-18"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-19"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.io.IOException;","lastModifiedDate":"2017-10-18"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-18"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-10-18"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location.","lastModifiedDate":"2017-10-18"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-18"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {","lastModifiedDate":"2017-10-18"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";","lastModifiedDate":"2017-10-18"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";","lastModifiedDate":"2017-10-18"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \"","lastModifiedDate":"2017-10-18"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\"","lastModifiedDate":"2017-10-18"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\"","lastModifiedDate":"2017-10-18"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" ~/Desktop\";","lastModifiedDate":"2017-10-18"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","lastModifiedDate":"2017-10-18"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";","lastModifiedDate":"2017-10-18"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private String args;","lastModifiedDate":"2017-10-20"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {","lastModifiedDate":"2017-10-20"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" super();","lastModifiedDate":"2017-10-20"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;","lastModifiedDate":"2017-10-20"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-18"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-10-18"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","lastModifiedDate":"2017-10-19"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());","lastModifiedDate":"2017-10-19"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(storage);","lastModifiedDate":"2017-10-19"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-18"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" if (args.equals(\"\")) {","lastModifiedDate":"2017-10-20"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBookDefault(model.getAddressBook());","lastModifiedDate":"2017-10-20"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" } else {","lastModifiedDate":"2017-10-20"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBook(model.getAddressBook(), args);","lastModifiedDate":"2017-10-20"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" } catch (IOException e) {","lastModifiedDate":"2017-10-18"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","lastModifiedDate":"2017-10-18"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-18"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-18"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-18"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-10-18"}],"authorContributionMap":{"charlesgoh":48}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-15"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-15"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-10-15"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-10-15"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-10-15"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-10-15"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-10-22"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","lastModifiedDate":"2017-10-15"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","lastModifiedDate":"2017-10-22"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-15"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-15"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;","lastModifiedDate":"2017-10-15"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-15"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-10-22"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-10-22"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-10-22"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-10-22"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-10-22"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-15"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-24"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-22"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-22"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-22"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-15"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book","lastModifiedDate":"2017-10-15"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {","lastModifiedDate":"2017-10-15"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";","lastModifiedDate":"2017-10-15"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";","lastModifiedDate":"2017-10-15"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";","lastModifiedDate":"2017-10-15"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";","lastModifiedDate":"2017-10-15"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\"","lastModifiedDate":"2017-10-15"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2017-10-15"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","lastModifiedDate":"2017-10-15"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","lastModifiedDate":"2017-10-15"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","lastModifiedDate":"2017-10-15"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","lastModifiedDate":"2017-10-15"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","lastModifiedDate":"2017-10-22"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","lastModifiedDate":"2017-10-15"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \"","lastModifiedDate":"2017-10-22"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \"","lastModifiedDate":"2017-10-22"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \"","lastModifiedDate":"2017-10-22"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD;","lastModifiedDate":"2017-10-22"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","lastModifiedDate":"2017-10-15"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";","lastModifiedDate":"2017-10-15"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","lastModifiedDate":"2017-10-22"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;","lastModifiedDate":"2017-10-15"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;","lastModifiedDate":"2017-10-15"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-15"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of","lastModifiedDate":"2017-10-15"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {","lastModifiedDate":"2017-10-15"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);","lastModifiedDate":"2017-10-15"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);","lastModifiedDate":"2017-10-15"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;","lastModifiedDate":"2017-10-15"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;","lastModifiedDate":"2017-10-15"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-15"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-15"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-15"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-15"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-15"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());","lastModifiedDate":"2017-10-15"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);","lastModifiedDate":"2017-10-22"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-22"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);","lastModifiedDate":"2017-10-22"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-10-22"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-10-22"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-22"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-22"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-10-22"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));","lastModifiedDate":"2017-10-22"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-15"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy","lastModifiedDate":"2017-10-15"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change","lastModifiedDate":"2017-10-15"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field","lastModifiedDate":"2017-10-15"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","lastModifiedDate":"2017-10-22"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;","lastModifiedDate":"2017-10-22"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d person.getName();","lastModifiedDate":"2017-10-22"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d person.getPhone();","lastModifiedDate":"2017-10-22"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d person.getEmail();","lastModifiedDate":"2017-10-22"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d person.getAddress();","lastModifiedDate":"2017-10-22"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Remark r \u003d person.getRemark();","lastModifiedDate":"2017-10-24"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" Boolean f \u003d person.getFavourite();","lastModifiedDate":"2017-10-25"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e t \u003d person.getTags();","lastModifiedDate":"2017-10-22"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-23"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" n.setPrivate(pps.getNameIsPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-23"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" p.setPrivate(pps.getPhoneIsPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-23"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" e.setPrivate(pps.getEmailIsPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-23"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" a.setPrivate(pps.getAddressIsPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-28"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" r.setPrivate(pps.getRemarkIsPrivate());","lastModifiedDate":"2017-10-28"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" return new Person(n, p, e, a, f, r, t);","lastModifiedDate":"2017-10-25"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {","lastModifiedDate":"2017-10-23"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" return index;","lastModifiedDate":"2017-10-23"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {","lastModifiedDate":"2017-10-23"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","lastModifiedDate":"2017-10-23"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-28"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-28"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-28"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" return true;","lastModifiedDate":"2017-10-28"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-28"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {","lastModifiedDate":"2017-10-28"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return false;","lastModifiedDate":"2017-10-28"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" // state check","lastModifiedDate":"2017-10-28"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;","lastModifiedDate":"2017-10-28"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)","lastModifiedDate":"2017-10-28"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);","lastModifiedDate":"2017-10-28"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-15"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person.","lastModifiedDate":"2017-10-15"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {","lastModifiedDate":"2017-10-15"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","lastModifiedDate":"2017-10-23"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","lastModifiedDate":"2017-10-23"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","lastModifiedDate":"2017-10-23"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","lastModifiedDate":"2017-10-23"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","lastModifiedDate":"2017-10-28"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}","lastModifiedDate":"2017-10-23"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {","lastModifiedDate":"2017-10-23"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;","lastModifiedDate":"2017-10-23"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;","lastModifiedDate":"2017-10-23"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;","lastModifiedDate":"2017-10-23"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;","lastModifiedDate":"2017-10-23"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;","lastModifiedDate":"2017-10-28"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-15"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null.","lastModifiedDate":"2017-10-15"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {","lastModifiedDate":"2017-10-15"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,","lastModifiedDate":"2017-10-15"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);","lastModifiedDate":"2017-10-28"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate","lastModifiedDate":"2017-10-28"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of nameIsPrivate","lastModifiedDate":"2017-10-23"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {","lastModifiedDate":"2017-10-23"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;","lastModifiedDate":"2017-10-15"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {","lastModifiedDate":"2017-10-15"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);","lastModifiedDate":"2017-10-15"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;","lastModifiedDate":"2017-10-15"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate","lastModifiedDate":"2017-10-28"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of phoneIsPrivate","lastModifiedDate":"2017-10-23"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {","lastModifiedDate":"2017-10-23"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;","lastModifiedDate":"2017-10-15"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {","lastModifiedDate":"2017-10-15"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);","lastModifiedDate":"2017-10-15"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;","lastModifiedDate":"2017-10-15"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate","lastModifiedDate":"2017-10-28"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of emailIsPrivate","lastModifiedDate":"2017-10-23"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {","lastModifiedDate":"2017-10-23"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;","lastModifiedDate":"2017-10-15"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {","lastModifiedDate":"2017-10-15"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);","lastModifiedDate":"2017-10-15"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;","lastModifiedDate":"2017-10-15"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate","lastModifiedDate":"2017-10-28"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of addressIsPrivate","lastModifiedDate":"2017-10-23"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {","lastModifiedDate":"2017-10-23"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;","lastModifiedDate":"2017-10-15"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {","lastModifiedDate":"2017-10-15"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);","lastModifiedDate":"2017-10-15"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;","lastModifiedDate":"2017-10-15"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of remarkIsPrivate","lastModifiedDate":"2017-10-28"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of remarkIsPrivate","lastModifiedDate":"2017-10-28"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getRemarkIsPrivate() {","lastModifiedDate":"2017-10-28"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" return remarkIsPrivate;","lastModifiedDate":"2017-10-28"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {","lastModifiedDate":"2017-10-28"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remarkIsPrivate);","lastModifiedDate":"2017-10-28"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;","lastModifiedDate":"2017-10-28"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-28"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-28"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-28"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" return true;","lastModifiedDate":"2017-10-28"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-28"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {","lastModifiedDate":"2017-10-28"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return false;","lastModifiedDate":"2017-10-28"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" // state check","lastModifiedDate":"2017-10-28"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;","lastModifiedDate":"2017-10-28"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());","lastModifiedDate":"2017-10-28"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-15"}],"authorContributionMap":{"jeffreygohkw":270,"wangyiming1019":2}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","lastModifiedDate":"2017-10-26"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-26"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2016-09-22"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Clears the address book.","lastModifiedDate":"2016-08-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","lastModifiedDate":"2017-05-04"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","lastModifiedDate":"2016-08-24"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","lastModifiedDate":"2017-10-03"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"%s has been cleared!\";","lastModifiedDate":"2017-10-26"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \"","lastModifiedDate":"2017-10-26"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-10-26"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \"","lastModifiedDate":"2017-10-26"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";","lastModifiedDate":"2017-10-26"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_PERSONS \u003d \"Contact list\";","lastModifiedDate":"2017-10-28"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_TASKS \u003d \"Task list\";","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_ALL \u003d \"Address book\";","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private boolean isClearTask;","lastModifiedDate":"2017-10-26"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private boolean isClearPerson;","lastModifiedDate":"2017-10-26"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private boolean isClearAll;","lastModifiedDate":"2017-10-26"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Prefix type;","lastModifiedDate":"2017-10-26"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String cleared;","lastModifiedDate":"2017-10-26"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public ClearCommand() {","lastModifiedDate":"2017-10-26"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d true;","lastModifiedDate":"2017-10-26"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","lastModifiedDate":"2017-10-26"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","lastModifiedDate":"2017-10-26"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" type \u003d null;","lastModifiedDate":"2017-10-26"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_ALL;","lastModifiedDate":"2017-10-26"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public ClearCommand(Prefix type) {","lastModifiedDate":"2017-10-26"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","lastModifiedDate":"2017-10-26"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d true;","lastModifiedDate":"2017-10-26"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","lastModifiedDate":"2017-10-26"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","lastModifiedDate":"2017-10-26"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_TASK;","lastModifiedDate":"2017-10-26"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_TASKS;","lastModifiedDate":"2017-10-26"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","lastModifiedDate":"2017-10-26"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d true;","lastModifiedDate":"2017-10-26"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","lastModifiedDate":"2017-10-26"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","lastModifiedDate":"2017-10-26"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_PERSON;","lastModifiedDate":"2017-10-26"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_PERSONS;","lastModifiedDate":"2017-10-26"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"An invalid type was provided!\");","lastModifiedDate":"2017-10-26"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","lastModifiedDate":"2017-05-04"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","lastModifiedDate":"2017-05-15"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (isClearAll) {","lastModifiedDate":"2017-10-26"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());","lastModifiedDate":"2016-12-24"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else if (isClearTask) {","lastModifiedDate":"2017-10-26"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","lastModifiedDate":"2017-10-26"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } else if (isClearPerson) {","lastModifiedDate":"2017-10-26"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","lastModifiedDate":"2017-10-26"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assert false : \"At least one boolean must be true.\";","lastModifiedDate":"2017-10-26"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, cleared));","lastModifiedDate":"2017-10-26"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"Esilocke":60,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2016-09-23"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2016-09-25"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","lastModifiedDate":"2017-10-18"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.MainWindow;","lastModifiedDate":"2017-10-18"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed.","lastModifiedDate":"2016-08-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public abstract class Command {","lastModifiedDate":"2016-08-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" protected Model model;","lastModifiedDate":"2016-09-25"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;","lastModifiedDate":"2017-10-18"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" protected MainWindow mainWindow;","lastModifiedDate":"2017-10-18"},{"lineNumber":18,"author":{"gitId":"-"},"content":" protected CommandHistory history;","lastModifiedDate":"2017-05-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;","lastModifiedDate":"2017-07-07"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons.","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary","lastModifiedDate":"2016-09-19"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed","lastModifiedDate":"2016-08-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {","lastModifiedDate":"2016-09-19"},{"lineNumber":28,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);","lastModifiedDate":"2016-09-19"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks.","lastModifiedDate":"2017-10-26"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary","lastModifiedDate":"2017-10-26"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed","lastModifiedDate":"2017-10-26"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {","lastModifiedDate":"2017-10-26"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);","lastModifiedDate":"2017-10-26"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message.","lastModifiedDate":"2016-08-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","lastModifiedDate":"2017-02-05"},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;","lastModifiedDate":"2017-02-05"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command.","lastModifiedDate":"2016-08-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain","lastModifiedDate":"2016-08-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * access to the dependencies.","lastModifiedDate":"2016-08-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","lastModifiedDate":"2017-07-07"},{"lineNumber":55,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2016-09-25"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {","lastModifiedDate":"2017-10-19"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","lastModifiedDate":"2017-10-18"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-18"},{"lineNumber":61,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"charlesgoh":8,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-09-01"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2016-09-23"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-08-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-23"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a person or task identified using its last displayed index from the address book.","lastModifiedDate":"2017-10-26"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","lastModifiedDate":"2017-05-04"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","lastModifiedDate":"2016-08-24"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","lastModifiedDate":"2017-10-03"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2016-08-24"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person or task identified by the index number used in the last listing.\\n\"","lastModifiedDate":"2017-10-26"},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2016-09-29"},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2016-08-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";","lastModifiedDate":"2016-08-24"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DELETE_TASK_SUCCESS \u003d \"Deleted Task: %1$s\";","lastModifiedDate":"2017-10-23"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_PERSON \u003d 0;","lastModifiedDate":"2017-10-23"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_TASK \u003d 1;","lastModifiedDate":"2017-10-23"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-06-27"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private int type;","lastModifiedDate":"2017-10-23"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public DeleteCommand(Index targetIndex, int objectType) {","lastModifiedDate":"2017-10-23"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2016-09-22"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.type \u003d objectType;","lastModifiedDate":"2017-10-23"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-05-04"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-23"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","lastModifiedDate":"2017-10-23"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_PERSON) {","lastModifiedDate":"2017-10-23"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-02-05"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (targetIndex.getZeroBased() \u003e\u003d tasksList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_TASK) {","lastModifiedDate":"2017-10-23"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-23"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":52,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-08-24"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (type \u003d\u003d DELETE_TYPE_PERSON) {","lastModifiedDate":"2017-10-23"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());","lastModifiedDate":"2017-10-23"},{"lineNumber":55,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","lastModifiedDate":"2016-09-25"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));","lastModifiedDate":"2017-10-23"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-23"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());","lastModifiedDate":"2017-10-23"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);","lastModifiedDate":"2017-10-23"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TASK_SUCCESS, taskToDelete));","lastModifiedDate":"2017-10-23"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2016-08-24"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-26"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","lastModifiedDate":"2017-10-23"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","lastModifiedDate":"2017-10-26"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28"},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-27"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-06-27"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-06-27"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls","lastModifiedDate":"2017-06-27"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex)","lastModifiedDate":"2017-10-23"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.type \u003d\u003d ((DeleteCommand) other).type); // state check","lastModifiedDate":"2017-10-23"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"Esilocke":28,"wangyiming1019":1,"-":47}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-16"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-16"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-16"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-16"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-16"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-16"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-16"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-16"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-16"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book.","lastModifiedDate":"2017-10-16"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends UndoableCommand {","lastModifiedDate":"2017-10-16"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"deletetag\";","lastModifiedDate":"2017-10-16"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"dtag\";","lastModifiedDate":"2017-10-16"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-16"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\"","lastModifiedDate":"2017-10-16"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","lastModifiedDate":"2017-10-16"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-10-16"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \"","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","lastModifiedDate":"2017-10-16"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","lastModifiedDate":"2017-10-16"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";","lastModifiedDate":"2017-10-16"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","lastModifiedDate":"2017-10-16"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"This is an nonexistent tag in the given persons list.\";","lastModifiedDate":"2017-10-16"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","lastModifiedDate":"2017-10-16"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;","lastModifiedDate":"2017-10-16"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","lastModifiedDate":"2017-10-16"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","lastModifiedDate":"2017-10-16"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-16"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","lastModifiedDate":"2017-10-16"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","lastModifiedDate":"2017-10-16"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","lastModifiedDate":"2017-10-16"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","lastModifiedDate":"2017-10-16"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-19"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * @param toDelete tag to delete from given target indexes","lastModifiedDate":"2017-10-19"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public DeleteTagCommand(Tag toDelete) {","lastModifiedDate":"2017-10-19"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toDelete);","lastModifiedDate":"2017-10-19"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-19"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.toDelete \u003d toDelete;","lastModifiedDate":"2017-10-19"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons.","lastModifiedDate":"2017-10-16"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list.","lastModifiedDate":"2017-10-16"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-16"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-16"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;","lastModifiedDate":"2017-10-16"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","lastModifiedDate":"2017-10-19"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" reinitlializeArray(lastShownList.size());","lastModifiedDate":"2017-10-20"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","lastModifiedDate":"2017-10-16"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-16"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-16"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag","lastModifiedDate":"2017-10-16"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","lastModifiedDate":"2017-10-16"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();","lastModifiedDate":"2017-10-16"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);","lastModifiedDate":"2017-10-16"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {","lastModifiedDate":"2017-10-16"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;","lastModifiedDate":"2017-10-16"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {","lastModifiedDate":"2017-10-16"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);","lastModifiedDate":"2017-10-16"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);","lastModifiedDate":"2017-10-16"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-10-16"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-10-16"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-16"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-16"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));","lastModifiedDate":"2017-10-16"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private void reinitlializeArray(int size) {","lastModifiedDate":"2017-10-20"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2017-10-20"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" targetIndexes.add(Index.fromZeroBased(i));","lastModifiedDate":"2017-10-20"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-16"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-16"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-16"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;","lastModifiedDate":"2017-10-16"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-16"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {","lastModifiedDate":"2017-10-16"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;","lastModifiedDate":"2017-10-16"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check","lastModifiedDate":"2017-10-16"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;","lastModifiedDate":"2017-10-16"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","lastModifiedDate":"2017-10-16"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);","lastModifiedDate":"2017-10-16"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-16"}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":108}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-12-26"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-05-09"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-26"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-26"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-05-09"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-05-09"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-26"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-22"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-05-09"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-08-05"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","lastModifiedDate":"2017-10-26"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-09"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2016-12-26"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2016-12-26"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-07"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2016-12-26"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","lastModifiedDate":"2016-12-26"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2016-12-26"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2016-12-26"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2016-12-26"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2016-12-26"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2016-12-26"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-12-26"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-07"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-26"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-26"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-26"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-26"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-26"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-26"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-26"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-26"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":43,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-12-26"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Edits the details of an existing person or task in the address book.","lastModifiedDate":"2017-10-26"},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26"},{"lineNumber":46,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {","lastModifiedDate":"2017-05-04"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","lastModifiedDate":"2016-12-26"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","lastModifiedDate":"2017-10-03"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \"","lastModifiedDate":"2016-12-26"},{"lineNumber":52,"author":{"gitId":"-"},"content":" + \"by the index number used in the last person listing. \"","lastModifiedDate":"2016-12-26"},{"lineNumber":53,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","lastModifiedDate":"2016-12-26"},{"lineNumber":54,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","lastModifiedDate":"2017-06-06"},{"lineNumber":55,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","lastModifiedDate":"2017-06-06"},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","lastModifiedDate":"2017-05-09"},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","lastModifiedDate":"2017-05-09"},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","lastModifiedDate":"2017-05-09"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","lastModifiedDate":"2017-10-22"},{"lineNumber":60,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","lastModifiedDate":"2017-05-09"},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","lastModifiedDate":"2017-05-09"},{"lineNumber":62,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \"","lastModifiedDate":"2017-05-09"},{"lineNumber":63,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","lastModifiedDate":"2017-05-09"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Edits the details of the task identified \"","lastModifiedDate":"2017-10-26"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \"","lastModifiedDate":"2017-10-26"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","lastModifiedDate":"2017-10-26"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","lastModifiedDate":"2017-10-26"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","lastModifiedDate":"2017-10-26"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","lastModifiedDate":"2017-10-26"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","lastModifiedDate":"2017-10-26"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","lastModifiedDate":"2017-10-26"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","lastModifiedDate":"2017-10-26"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \"","lastModifiedDate":"2017-10-26"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";","lastModifiedDate":"2017-10-26"},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: \\n%1$s\";","lastModifiedDate":"2017-10-23"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TASK_SUCCESS \u003d \"Edited Task: \\n%1$s\";","lastModifiedDate":"2017-10-26"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","lastModifiedDate":"2016-12-26"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","lastModifiedDate":"2016-12-26"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";","lastModifiedDate":"2017-10-26"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";","lastModifiedDate":"2017-10-28"},{"lineNumber":82,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean areFieldsAllPrivate \u003d true;","lastModifiedDate":"2017-10-29"},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private final Index index;","lastModifiedDate":"2017-05-25"},{"lineNumber":86,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;","lastModifiedDate":"2016-12-26"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;","lastModifiedDate":"2017-10-26"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","lastModifiedDate":"2017-10-26"},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-26"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @param index of the person in the filtered person list to edit","lastModifiedDate":"2017-05-25"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the person with","lastModifiedDate":"2016-12-26"},{"lineNumber":94,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-05-25"},{"lineNumber":96,"author":{"gitId":"-"},"content":" requireNonNull(index);","lastModifiedDate":"2017-05-25"},{"lineNumber":97,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);","lastModifiedDate":"2017-05-15"},{"lineNumber":98,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":99,"author":{"gitId":"-"},"content":" this.index \u003d index;","lastModifiedDate":"2017-05-25"},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","lastModifiedDate":"2016-12-26"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d null;","lastModifiedDate":"2017-10-26"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","lastModifiedDate":"2017-10-26"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit","lastModifiedDate":"2017-10-26"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with","lastModifiedDate":"2017-10-26"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public EditCommand(Index index, EditTaskDescriptor editTaskDescriptor) {","lastModifiedDate":"2017-10-26"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","lastModifiedDate":"2017-10-26"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);","lastModifiedDate":"2017-10-26"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","lastModifiedDate":"2017-10-26"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);","lastModifiedDate":"2017-10-26"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d null;","lastModifiedDate":"2017-10-26"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","lastModifiedDate":"2017-10-26"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //TODO see if we can use Singleton pattern to handle the Descriptors.","lastModifiedDate":"2017-10-26"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-12-26"},{"lineNumber":121,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-05-04"},{"lineNumber":122,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2016-12-26"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","lastModifiedDate":"2017-10-26"},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":125,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-05-25"},{"lineNumber":126,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-02-05"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":128,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":129,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-10-26"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","lastModifiedDate":"2017-10-26"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-26"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-26"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());","lastModifiedDate":"2017-10-26"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);","lastModifiedDate":"2017-10-26"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);","lastModifiedDate":"2017-10-26"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","lastModifiedDate":"2017-10-26"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, editedTask));","lastModifiedDate":"2017-10-26"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26"},{"lineNumber":140,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-05-25"},{"lineNumber":141,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-02-05"},{"lineNumber":142,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":143,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());","lastModifiedDate":"2017-05-25"},{"lineNumber":144,"author":{"gitId":"-"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","lastModifiedDate":"2016-12-26"},{"lineNumber":145,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","lastModifiedDate":"2017-06-07"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-10-26"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));","lastModifiedDate":"2017-10-26"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":149,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-06-09"},{"lineNumber":150,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-02-05"},{"lineNumber":151,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-06-09"},{"lineNumber":152,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-06-07"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {","lastModifiedDate":"2017-10-26"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","lastModifiedDate":"2017-10-26"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","lastModifiedDate":"2017-10-26"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","lastModifiedDate":"2017-10-26"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2017-10-30"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);","lastModifiedDate":"2017-10-30"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-26"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","lastModifiedDate":"2016-12-26"},{"lineNumber":165,"author":{"gitId":"-"},"content":" * edited with {@code editPersonDescriptor}.","lastModifiedDate":"2016-12-26"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited","lastModifiedDate":"2017-10-15"},{"lineNumber":167,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26"},{"lineNumber":168,"author":{"gitId":"-"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,","lastModifiedDate":"2016-12-26"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)","lastModifiedDate":"2017-10-28"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {","lastModifiedDate":"2017-10-28"},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert personToEdit !\u003d null;","lastModifiedDate":"2016-12-26"},{"lineNumber":172,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","lastModifiedDate":"2017-10-15"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","lastModifiedDate":"2017-10-15"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","lastModifiedDate":"2017-10-15"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","lastModifiedDate":"2017-10-15"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" Remark updatedRemark;","lastModifiedDate":"2017-10-22"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;","lastModifiedDate":"2017-10-29"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;","lastModifiedDate":"2017-10-29"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;","lastModifiedDate":"2017-10-28"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {","lastModifiedDate":"2017-10-29"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();","lastModifiedDate":"2017-10-29"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,","lastModifiedDate":"2017-10-29"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedTags);","lastModifiedDate":"2017-10-29"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson","lastModifiedDate":"2017-10-29"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy","lastModifiedDate":"2017-10-29"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","lastModifiedDate":"2017-10-29"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().isPrivate()) {","lastModifiedDate":"2017-10-15"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","lastModifiedDate":"2017-10-15"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-15"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();","lastModifiedDate":"2017-10-15"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;","lastModifiedDate":"2017-10-29"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson","lastModifiedDate":"2017-10-29"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","lastModifiedDate":"2017-10-29"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","lastModifiedDate":"2017-10-29"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().isPrivate()) {","lastModifiedDate":"2017-10-15"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","lastModifiedDate":"2017-10-15"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-15"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();","lastModifiedDate":"2017-10-15"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;","lastModifiedDate":"2017-10-29"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson","lastModifiedDate":"2017-10-29"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","lastModifiedDate":"2017-10-29"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","lastModifiedDate":"2017-10-29"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().isPrivate()) {","lastModifiedDate":"2017-10-15"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","lastModifiedDate":"2017-10-15"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-15"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();","lastModifiedDate":"2017-10-15"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;","lastModifiedDate":"2017-10-29"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson","lastModifiedDate":"2017-10-29"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","lastModifiedDate":"2017-10-29"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,","lastModifiedDate":"2017-10-29"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","lastModifiedDate":"2017-10-29"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().isPrivate()) {","lastModifiedDate":"2017-10-15"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","lastModifiedDate":"2017-10-15"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-15"},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();","lastModifiedDate":"2017-10-15"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;","lastModifiedDate":"2017-10-29"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson","lastModifiedDate":"2017-10-29"},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29"},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","lastModifiedDate":"2017-10-29"},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29"},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","lastModifiedDate":"2017-10-29"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" if (!personToEdit.getRemark().isPrivate()) {","lastModifiedDate":"2017-10-22"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());","lastModifiedDate":"2017-10-22"},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28"},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":" } else {","lastModifiedDate":"2017-10-22"},{"lineNumber":298,"author":{"gitId":"charlesgoh"},"content":" updatedRemark \u003d personToEdit.getRemark();","lastModifiedDate":"2017-10-22"},{"lineNumber":299,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;","lastModifiedDate":"2017-10-29"},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":302,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson","lastModifiedDate":"2017-10-29"},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29"},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input","lastModifiedDate":"2017-10-29"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29"},{"lineNumber":310,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","lastModifiedDate":"2017-06-21"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {","lastModifiedDate":"2017-10-29"},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-29"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;","lastModifiedDate":"2017-10-29"},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson","lastModifiedDate":"2017-10-29"},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input","lastModifiedDate":"2017-10-29"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,","lastModifiedDate":"2017-10-29"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29"},{"lineNumber":325,"author":{"gitId":"wangyiming1019"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());","lastModifiedDate":"2017-10-25"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {","lastModifiedDate":"2017-10-29"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-29"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;","lastModifiedDate":"2017-10-29"},{"lineNumber":330,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":331,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}","lastModifiedDate":"2017-10-26"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" * edited with {@code editTaskDescriptor}.","lastModifiedDate":"2017-10-26"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,","lastModifiedDate":"2017-10-26"},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor) {","lastModifiedDate":"2017-10-26"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":" assert taskToEdit !\u003d null;","lastModifiedDate":"2017-10-26"},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":" TaskName updatedTaskName;","lastModifiedDate":"2017-10-26"},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" Description updatedDescription;","lastModifiedDate":"2017-10-26"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" Deadline updatedDeadline;","lastModifiedDate":"2017-10-26"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":" Priority updatedPriority;","lastModifiedDate":"2017-10-26"},{"lineNumber":344,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());","lastModifiedDate":"2017-10-26"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());","lastModifiedDate":"2017-10-26"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());","lastModifiedDate":"2017-10-26"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());","lastModifiedDate":"2017-10-26"},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority);","lastModifiedDate":"2017-10-26"},{"lineNumber":351,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":352,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":353,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-08"},{"lineNumber":354,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-05-08"},{"lineNumber":355,"author":{"gitId":"-"},"content":" // short circuit if same object","lastModifiedDate":"2017-05-08"},{"lineNumber":356,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-05-08"},{"lineNumber":357,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2017-05-08"},{"lineNumber":358,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-08"},{"lineNumber":359,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":360,"author":{"gitId":"-"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-05-08"},{"lineNumber":361,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {","lastModifiedDate":"2017-05-08"},{"lineNumber":362,"author":{"gitId":"-"},"content":" return false;","lastModifiedDate":"2017-05-08"},{"lineNumber":363,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-08"},{"lineNumber":364,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" if (this.isTask !\u003d ((EditCommand) other).isTask) {","lastModifiedDate":"2017-10-26"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-26"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":369,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;","lastModifiedDate":"2017-05-08"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" if (this.isTask) {","lastModifiedDate":"2017-10-26"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);","lastModifiedDate":"2017-10-26"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);","lastModifiedDate":"2017-10-26"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":375,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-08"},{"lineNumber":376,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":377,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-26"},{"lineNumber":378,"author":{"gitId":"-"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","lastModifiedDate":"2016-12-26"},{"lineNumber":379,"author":{"gitId":"-"},"content":" * corresponding field value of the person.","lastModifiedDate":"2016-12-26"},{"lineNumber":380,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26"},{"lineNumber":381,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {","lastModifiedDate":"2016-12-26"},{"lineNumber":382,"author":{"gitId":"-"},"content":" private Name name;","lastModifiedDate":"2017-06-21"},{"lineNumber":383,"author":{"gitId":"-"},"content":" private Phone phone;","lastModifiedDate":"2017-06-21"},{"lineNumber":384,"author":{"gitId":"-"},"content":" private Email email;","lastModifiedDate":"2017-06-21"},{"lineNumber":385,"author":{"gitId":"-"},"content":" private Address address;","lastModifiedDate":"2017-06-21"},{"lineNumber":386,"author":{"gitId":"wangyiming1019"},"content":" private Boolean favourite;","lastModifiedDate":"2017-10-25"},{"lineNumber":387,"author":{"gitId":"charlesgoh"},"content":" private Remark remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":388,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;","lastModifiedDate":"2017-06-21"},{"lineNumber":389,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":390,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}","lastModifiedDate":"2016-12-26"},{"lineNumber":391,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":392,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","lastModifiedDate":"2016-12-26"},{"lineNumber":393,"author":{"gitId":"-"},"content":" this.name \u003d toCopy.name;","lastModifiedDate":"2017-06-21"},{"lineNumber":394,"author":{"gitId":"-"},"content":" this.phone \u003d toCopy.phone;","lastModifiedDate":"2017-06-21"},{"lineNumber":395,"author":{"gitId":"-"},"content":" this.email \u003d toCopy.email;","lastModifiedDate":"2017-06-21"},{"lineNumber":396,"author":{"gitId":"-"},"content":" this.address \u003d toCopy.address;","lastModifiedDate":"2017-06-21"},{"lineNumber":397,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d toCopy.favourite;","lastModifiedDate":"2017-10-25"},{"lineNumber":398,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d toCopy.remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":399,"author":{"gitId":"-"},"content":" this.tags \u003d toCopy.tags;","lastModifiedDate":"2017-06-21"},{"lineNumber":400,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":401,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":402,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-26"},{"lineNumber":403,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited.","lastModifiedDate":"2016-12-26"},{"lineNumber":404,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26"},{"lineNumber":405,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {","lastModifiedDate":"2016-12-26"},{"lineNumber":406,"author":{"gitId":"charlesgoh"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark, this.tags);","lastModifiedDate":"2017-10-22"},{"lineNumber":407,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":408,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":409,"author":{"gitId":"-"},"content":" public void setName(Name name) {","lastModifiedDate":"2017-06-21"},{"lineNumber":410,"author":{"gitId":"-"},"content":" this.name \u003d name;","lastModifiedDate":"2017-06-21"},{"lineNumber":411,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":412,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":413,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {","lastModifiedDate":"2016-12-26"},{"lineNumber":414,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);","lastModifiedDate":"2017-06-21"},{"lineNumber":415,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":416,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":417,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","lastModifiedDate":"2017-06-21"},{"lineNumber":418,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","lastModifiedDate":"2017-06-21"},{"lineNumber":419,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":420,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":421,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {","lastModifiedDate":"2016-12-26"},{"lineNumber":422,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);","lastModifiedDate":"2017-06-21"},{"lineNumber":423,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":424,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":425,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","lastModifiedDate":"2017-06-21"},{"lineNumber":426,"author":{"gitId":"-"},"content":" this.email \u003d email;","lastModifiedDate":"2017-06-21"},{"lineNumber":427,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":428,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":429,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {","lastModifiedDate":"2016-12-26"},{"lineNumber":430,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);","lastModifiedDate":"2017-06-21"},{"lineNumber":431,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":432,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":433,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","lastModifiedDate":"2017-06-21"},{"lineNumber":434,"author":{"gitId":"-"},"content":" this.address \u003d address;","lastModifiedDate":"2017-06-21"},{"lineNumber":435,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":436,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":437,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {","lastModifiedDate":"2016-12-26"},{"lineNumber":438,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);","lastModifiedDate":"2017-06-21"},{"lineNumber":439,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":440,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":441,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","lastModifiedDate":"2017-10-25"},{"lineNumber":442,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;","lastModifiedDate":"2017-10-25"},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":444,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":445,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {","lastModifiedDate":"2017-10-25"},{"lineNumber":446,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":447,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":448,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":449,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","lastModifiedDate":"2017-10-22"},{"lineNumber":450,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":451,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":452,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":453,"author":{"gitId":"charlesgoh"},"content":" public Optional\u003cRemark\u003e getRemark() {","lastModifiedDate":"2017-10-22"},{"lineNumber":454,"author":{"gitId":"charlesgoh"},"content":" return Optional.ofNullable(remark);","lastModifiedDate":"2017-10-22"},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":457,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","lastModifiedDate":"2017-06-21"},{"lineNumber":458,"author":{"gitId":"-"},"content":" this.tags \u003d tags;","lastModifiedDate":"2017-06-21"},{"lineNumber":459,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":460,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26"},{"lineNumber":461,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","lastModifiedDate":"2017-03-07"},{"lineNumber":462,"author":{"gitId":"-"},"content":" return Optional.ofNullable(tags);","lastModifiedDate":"2017-06-21"},{"lineNumber":463,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":464,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":465,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-05"},{"lineNumber":466,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-05-05"},{"lineNumber":467,"author":{"gitId":"-"},"content":" // short circuit if same object","lastModifiedDate":"2017-05-05"},{"lineNumber":468,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-05-05"},{"lineNumber":469,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2017-05-05"},{"lineNumber":470,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":471,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":472,"author":{"gitId":"-"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-05-05"},{"lineNumber":473,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {","lastModifiedDate":"2017-05-05"},{"lineNumber":474,"author":{"gitId":"-"},"content":" return false;","lastModifiedDate":"2017-05-05"},{"lineNumber":475,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":476,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":477,"author":{"gitId":"-"},"content":" // state check","lastModifiedDate":"2017-05-05"},{"lineNumber":478,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","lastModifiedDate":"2017-05-05"},{"lineNumber":479,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-21"},{"lineNumber":480,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())","lastModifiedDate":"2017-06-21"},{"lineNumber":481,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","lastModifiedDate":"2017-06-21"},{"lineNumber":482,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","lastModifiedDate":"2017-06-21"},{"lineNumber":483,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","lastModifiedDate":"2017-06-21"},{"lineNumber":484,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())","lastModifiedDate":"2017-10-25"},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())","lastModifiedDate":"2017-10-22"},{"lineNumber":486,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags());","lastModifiedDate":"2017-06-21"},{"lineNumber":487,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":488,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26"},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the","lastModifiedDate":"2017-10-26"},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task.","lastModifiedDate":"2017-10-26"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {","lastModifiedDate":"2017-10-26"},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;","lastModifiedDate":"2017-10-26"},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":" private Description description;","lastModifiedDate":"2017-10-26"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;","lastModifiedDate":"2017-10-26"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" private Priority priority;","lastModifiedDate":"2017-10-26"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}","lastModifiedDate":"2017-10-26"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {","lastModifiedDate":"2017-10-26"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;","lastModifiedDate":"2017-10-26"},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;","lastModifiedDate":"2017-10-26"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;","lastModifiedDate":"2017-10-26"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;","lastModifiedDate":"2017-10-26"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","lastModifiedDate":"2017-10-26"},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","lastModifiedDate":"2017-10-26"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority);","lastModifiedDate":"2017-10-26"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","lastModifiedDate":"2017-10-26"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;","lastModifiedDate":"2017-10-26"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {","lastModifiedDate":"2017-10-26"},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);","lastModifiedDate":"2017-10-26"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","lastModifiedDate":"2017-10-26"},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;","lastModifiedDate":"2017-10-26"},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {","lastModifiedDate":"2017-10-26"},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);","lastModifiedDate":"2017-10-26"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","lastModifiedDate":"2017-10-26"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;","lastModifiedDate":"2017-10-26"},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {","lastModifiedDate":"2017-10-26"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);","lastModifiedDate":"2017-10-26"},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","lastModifiedDate":"2017-10-26"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;","lastModifiedDate":"2017-10-26"},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {","lastModifiedDate":"2017-10-26"},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);","lastModifiedDate":"2017-10-26"},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-26"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-26"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-26"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-26"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-26"},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {","lastModifiedDate":"2017-10-26"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-26"},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":" // state check","lastModifiedDate":"2017-10-26"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;","lastModifiedDate":"2017-10-26"},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())","lastModifiedDate":"2017-10-26"},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())","lastModifiedDate":"2017-10-26"},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())","lastModifiedDate":"2017-10-26"},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority());","lastModifiedDate":"2017-10-26"},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2016-12-26"}],"authorContributionMap":{"charlesgoh":22,"jeffreygohkw":152,"Esilocke":174,"wangyiming1019":15,"-":206}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-19"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-19"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-10-19"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-19"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-19"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","lastModifiedDate":"2017-10-19"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-19"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-19"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-19"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-19"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-19"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-19"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-19"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book.","lastModifiedDate":"2017-10-19"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends UndoableCommand {","lastModifiedDate":"2017-10-19"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"edittag\";","lastModifiedDate":"2017-10-19"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"etag\";","lastModifiedDate":"2017-10-20"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the specified tag \"","lastModifiedDate":"2017-10-19"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\"","lastModifiedDate":"2017-10-20"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \"","lastModifiedDate":"2017-10-20"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\"","lastModifiedDate":"2017-10-20"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";","lastModifiedDate":"2017-10-20"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";","lastModifiedDate":"2017-10-19"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";","lastModifiedDate":"2017-10-19"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";","lastModifiedDate":"2017-10-20"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";","lastModifiedDate":"2017-10-20"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";","lastModifiedDate":"2017-10-20"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;","lastModifiedDate":"2017-10-19"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;","lastModifiedDate":"2017-10-19"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;","lastModifiedDate":"2017-10-19"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-19"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed","lastModifiedDate":"2017-10-19"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag","lastModifiedDate":"2017-10-19"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {","lastModifiedDate":"2017-10-19"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);","lastModifiedDate":"2017-10-19"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);","lastModifiedDate":"2017-10-19"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;","lastModifiedDate":"2017-10-19"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;","lastModifiedDate":"2017-10-19"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-19"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-19"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-19"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-19"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;","lastModifiedDate":"2017-10-19"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;","lastModifiedDate":"2017-10-19"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;","lastModifiedDate":"2017-10-19"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {","lastModifiedDate":"2017-10-19"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);","lastModifiedDate":"2017-10-19"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();","lastModifiedDate":"2017-10-19"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {","lastModifiedDate":"2017-10-19"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;","lastModifiedDate":"2017-10-19"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));","lastModifiedDate":"2017-10-19"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {","lastModifiedDate":"2017-10-19"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);","lastModifiedDate":"2017-10-19"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-19"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);","lastModifiedDate":"2017-10-19"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-10-19"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);","lastModifiedDate":"2017-10-20"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-19"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-19"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-10-19"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));","lastModifiedDate":"2017-10-19"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-19"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-19"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-19"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-19"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-19"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-19"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {","lastModifiedDate":"2017-10-19"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-19"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check","lastModifiedDate":"2017-10-19"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;","lastModifiedDate":"2017-10-19"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)","lastModifiedDate":"2017-10-19"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);","lastModifiedDate":"2017-10-19"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-19"}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book.","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-10-25"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {","lastModifiedDate":"2017-10-25"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2017-10-25"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-25"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-25"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-25"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-25"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","lastModifiedDate":"2017-10-25"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {","lastModifiedDate":"2017-10-25"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","lastModifiedDate":"2017-10-25"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(personToFavourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-25"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","lastModifiedDate":"2017-10-25"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","lastModifiedDate":"2017-10-25"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-25"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-25"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls","lastModifiedDate":"2017-10-25"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check","lastModifiedDate":"2017-10-25"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user.","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":22}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","lastModifiedDate":"2017-06-12"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-22"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Finds and lists all persons or tasks in address book whose name contains any of the argument keywords.","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive.","lastModifiedDate":"2016-09-22"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-22"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2016-09-22"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","lastModifiedDate":"2016-09-22"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","lastModifiedDate":"2017-10-03"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","lastModifiedDate":"2016-09-22"},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","lastModifiedDate":"2016-09-22"},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","lastModifiedDate":"2016-09-22"},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","lastModifiedDate":"2016-09-22"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Finds all tasks whose names or descriptions \"","lastModifiedDate":"2017-10-28"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","lastModifiedDate":"2017-10-28"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {","lastModifiedDate":"2017-06-12"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;","lastModifiedDate":"2017-10-28"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d null;","lastModifiedDate":"2017-10-28"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","lastModifiedDate":"2017-10-28"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public FindCommand(TaskContainsKeywordPredicate predicate) {","lastModifiedDate":"2017-10-28"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d null;","lastModifiedDate":"2017-10-28"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;","lastModifiedDate":"2017-10-28"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","lastModifiedDate":"2017-10-28"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-22"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2016-09-22"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","lastModifiedDate":"2017-10-28"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);","lastModifiedDate":"2017-10-28"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);","lastModifiedDate":"2017-10-28"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));","lastModifiedDate":"2017-10-28"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-28"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);","lastModifiedDate":"2017-10-28"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);","lastModifiedDate":"2017-10-28"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","lastModifiedDate":"2016-09-25"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-27"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-06-27"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-28"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-28"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof FindCommand)) {","lastModifiedDate":"2017-10-28"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-28"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask !\u003d ((FindCommand) other).isTask) {","lastModifiedDate":"2017-10-28"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-28"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask) {","lastModifiedDate":"2017-10-28"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return this.taskPredicate.equals(((FindCommand) other).taskPredicate);","lastModifiedDate":"2017-10-28"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-28"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return this.personPredicate.equals(((FindCommand) other).personPredicate);","lastModifiedDate":"2017-10-28"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-22"}],"authorContributionMap":{"Esilocke":36,"wangyiming1019":1,"-":30}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-29"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-29"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords.","lastModifiedDate":"2017-10-29"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive.","lastModifiedDate":"2017-10-29"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends Command {","lastModifiedDate":"2017-10-29"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"findtag\";","lastModifiedDate":"2017-10-29"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"ftag\";","lastModifiedDate":"2017-10-29"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose tags contain any of \"","lastModifiedDate":"2017-10-29"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\"","lastModifiedDate":"2017-10-29"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","lastModifiedDate":"2017-10-29"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" friends colleagues\";","lastModifiedDate":"2017-10-29"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;","lastModifiedDate":"2017-10-29"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {","lastModifiedDate":"2017-10-29"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;","lastModifiedDate":"2017-10-29"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-29"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-10-29"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","lastModifiedDate":"2017-10-29"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","lastModifiedDate":"2017-10-29"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-29"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-29"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-29"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls","lastModifiedDate":"2017-10-29"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check","lastModifiedDate":"2017-10-29"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29"}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-07-05"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-05-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-05-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-05-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-05-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","lastModifiedDate":"2017-05-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","lastModifiedDate":"2017-05-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","lastModifiedDate":"2017-05-24"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","lastModifiedDate":"2017-10-03"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","lastModifiedDate":"2017-07-05"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","lastModifiedDate":"2017-05-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-05-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","lastModifiedDate":"2017-05-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","lastModifiedDate":"2017-05-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","lastModifiedDate":"2017-05-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","lastModifiedDate":"2017-07-05"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","lastModifiedDate":"2017-05-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","lastModifiedDate":"2017-07-07"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","lastModifiedDate":"2017-05-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","lastModifiedDate":"2017-05-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-24"}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-08-05"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","lastModifiedDate":"2016-08-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2016-09-21"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","lastModifiedDate":"2016-08-24"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","lastModifiedDate":"2017-10-03"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";","lastModifiedDate":"2017-10-28"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2016-08-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-08-05"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2016-09-22"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-28"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","lastModifiedDate":"2017-10-28"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-28"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","lastModifiedDate":"2017-10-28"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-28"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book.","lastModifiedDate":"2017-10-28"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";","lastModifiedDate":"2017-10-28"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";","lastModifiedDate":"2017-10-28"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2017-10-28"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person: %1$s\";","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {","lastModifiedDate":"2017-10-28"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2017-10-28"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-10-28"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-28"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-28"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","lastModifiedDate":"2017-10-28"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","lastModifiedDate":"2017-10-28"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","lastModifiedDate":"2017-10-28"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-28"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-28"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls","lastModifiedDate":"2017-10-28"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check","lastModifiedDate":"2017-10-28"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28"}],"authorContributionMap":{"jeffreygohkw":54}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-07-13"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","lastModifiedDate":"2017-07-13"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-07-13"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-13"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-07-13"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-07-13"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-07-13"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","lastModifiedDate":"2017-07-13"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-13"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","lastModifiedDate":"2017-07-13"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","lastModifiedDate":"2017-07-13"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","lastModifiedDate":"2017-10-03"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","lastModifiedDate":"2017-07-13"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","lastModifiedDate":"2017-07-13"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-13"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-07-13"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","lastModifiedDate":"2017-07-13"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","lastModifiedDate":"2017-07-13"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","lastModifiedDate":"2017-07-13"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","lastModifiedDate":"2017-07-13"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-07-13"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-13"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","lastModifiedDate":"2017-07-13"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2017-07-13"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","lastModifiedDate":"2017-07-13"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-13"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-09-01"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","lastModifiedDate":"2016-09-23"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2016-09-23"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","lastModifiedDate":"2017-01-19"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-22"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-14"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book.","lastModifiedDate":"2016-09-14"},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-14"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {","lastModifiedDate":"2016-09-21"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","lastModifiedDate":"2016-09-14"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","lastModifiedDate":"2017-10-03"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2016-09-14"},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2016-09-14"},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2016-09-29"},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2016-09-14"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";","lastModifiedDate":"2016-09-14"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-06-27"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {","lastModifiedDate":"2017-05-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2016-09-14"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-14"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-14"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-02-05"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":36,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-09-01"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-05-25"},{"lineNumber":39,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-02-05"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":42,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","lastModifiedDate":"2017-05-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));","lastModifiedDate":"2017-05-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-14"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-27"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-06-27"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-06-27"},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls","lastModifiedDate":"2017-06-27"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check","lastModifiedDate":"2017-06-27"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":53,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-14"}],"authorContributionMap":{"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-09-30"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-11"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-11"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-09-30"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-09-30"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-09-30"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","lastModifiedDate":"2017-09-30"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-09-30"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommand extends UndoableCommand {","lastModifiedDate":"2017-10-11"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","lastModifiedDate":"2017-09-30"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","lastModifiedDate":"2017-10-11"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","lastModifiedDate":"2017-09-30"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\"));","lastModifiedDate":"2017-09-30"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","lastModifiedDate":"2017-09-30"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));","lastModifiedDate":"2017-09-30"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons by chosen \"","lastModifiedDate":"2017-09-30"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS] and by order [ASC/DESC]. Case insensitive\\n\"","lastModifiedDate":"2017-09-30"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [FIELD] [ORDER]\\n\"","lastModifiedDate":"2017-09-30"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" email desc\";","lastModifiedDate":"2017-09-30"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\"","lastModifiedDate":"2017-09-30"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\"","lastModifiedDate":"2017-09-30"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";","lastModifiedDate":"2017-09-30"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All persons in address book successfully sorted\";","lastModifiedDate":"2017-09-30"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private final String field;","lastModifiedDate":"2017-10-01"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private final String order;","lastModifiedDate":"2017-10-01"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String field, String order) {","lastModifiedDate":"2017-10-01"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;","lastModifiedDate":"2017-10-01"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;","lastModifiedDate":"2017-10-01"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public String getField() {","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return this.field;","lastModifiedDate":"2017-10-01"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public String getOrder() {","lastModifiedDate":"2017-10-24"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return this.order;","lastModifiedDate":"2017-10-01"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-01"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() {","lastModifiedDate":"2017-10-11"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","lastModifiedDate":"2017-10-11"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());","lastModifiedDate":"2017-10-01"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-01"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-09-30"}],"authorContributionMap":{"charlesgoh":48,"jeffreygohkw":8}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-07-13"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","lastModifiedDate":"2017-07-13"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-07-13"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-13"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-07-13"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-07-13"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-07-13"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","lastModifiedDate":"2017-07-13"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-13"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","lastModifiedDate":"2017-07-13"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","lastModifiedDate":"2017-07-13"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","lastModifiedDate":"2017-10-03"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","lastModifiedDate":"2017-07-13"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","lastModifiedDate":"2017-07-13"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-13"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-07-13"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","lastModifiedDate":"2017-07-13"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","lastModifiedDate":"2017-07-13"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","lastModifiedDate":"2017-07-13"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","lastModifiedDate":"2017-07-13"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-07-13"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-13"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","lastModifiedDate":"2017-07-13"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2017-07-13"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","lastModifiedDate":"2017-07-13"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-13"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book.","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-10-25"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {","lastModifiedDate":"2017-10-25"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2017-10-25"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-25"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-25"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-25"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-25"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());","lastModifiedDate":"2017-10-25"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {","lastModifiedDate":"2017-10-25"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","lastModifiedDate":"2017-10-25"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" model.unfavouritePerson(personToUnfavourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-25"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","lastModifiedDate":"2017-10-25"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));","lastModifiedDate":"2017-10-25"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-25"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-25"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls","lastModifiedDate":"2017-10-25"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check","lastModifiedDate":"2017-10-25"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-02-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-02-05"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-02-05"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","lastModifiedDate":"2017-10-13"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-02-05"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","lastModifiedDate":"2017-10-13"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","lastModifiedDate":"2017-10-13"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-02-05"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","lastModifiedDate":"2017-10-13"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-24"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-22"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;","lastModifiedDate":"2017-10-22"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-02-05"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;","lastModifiedDate":"2017-10-13"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-17"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2017-03-17"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-02-05"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-02-05"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-03-17"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-03-17"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-03-17"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-03-17"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-03-17"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-03-17"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-17"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-24"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05"},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-02-05"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object","lastModifiedDate":"2017-02-05"},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-05"},{"lineNumber":45,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {","lastModifiedDate":"2017-07-06"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05"},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-05"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand","lastModifiedDate":"2017-02-05"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution.","lastModifiedDate":"2017-02-05"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11"},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-05"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-03-11"},{"lineNumber":53,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-03-20"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" PREFIX_REMARK_PRIVATE, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE,","lastModifiedDate":"2017-10-24"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" PREFIX_EMAIL_PRIVATE, PREFIX_ADDRESS_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_DEADLINE,","lastModifiedDate":"2017-10-24"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" PREFIX_DESCRIPTION, PREFIX_PRIORITY, PREFIX_TASK);","lastModifiedDate":"2017-10-24"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {","lastModifiedDate":"2017-10-24"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d constructTask(args);","lastModifiedDate":"2017-10-24"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(taskToAdd);","lastModifiedDate":"2017-10-24"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d constructPerson(args);","lastModifiedDate":"2017-10-24"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(personToAdd);","lastModifiedDate":"2017-10-24"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","lastModifiedDate":"2017-10-24"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}.","lastModifiedDate":"2017-10-24"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","lastModifiedDate":"2017-10-24"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","lastModifiedDate":"2017-10-24"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","lastModifiedDate":"2017-10-24"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyPerson constructPerson(String args) throws ParseException {","lastModifiedDate":"2017-10-24"},{"lineNumber":78,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-03-20"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","lastModifiedDate":"2017-10-22"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,","lastModifiedDate":"2017-10-22"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE);","lastModifiedDate":"2017-10-22"},{"lineNumber":82,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-17"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)","lastModifiedDate":"2017-10-13"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {","lastModifiedDate":"2017-10-13"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-13"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PHONE)","lastModifiedDate":"2017-10-13"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)))) {","lastModifiedDate":"2017-10-13"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-13"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_EMAIL)","lastModifiedDate":"2017-10-13"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)))) {","lastModifiedDate":"2017-10-13"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-13"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_ADDRESS)","lastModifiedDate":"2017-10-13"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)))) {","lastModifiedDate":"2017-10-13"},{"lineNumber":100,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-03-11"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-03-17"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-17"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_REMARK)","lastModifiedDate":"2017-10-22"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)))) {","lastModifiedDate":"2017-10-22"},{"lineNumber":105,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":108,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-02-05"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","lastModifiedDate":"2017-10-13"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","lastModifiedDate":"2017-10-13"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","lastModifiedDate":"2017-10-13"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","lastModifiedDate":"2017-10-13"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" Remark remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {","lastModifiedDate":"2017-10-13"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();","lastModifiedDate":"2017-10-21"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-13"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();","lastModifiedDate":"2017-10-13"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":120,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {","lastModifiedDate":"2017-10-13"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();","lastModifiedDate":"2017-10-21"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-13"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();","lastModifiedDate":"2017-10-13"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {","lastModifiedDate":"2017-10-13"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();","lastModifiedDate":"2017-10-21"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-13"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();","lastModifiedDate":"2017-10-13"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {","lastModifiedDate":"2017-10-13"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();","lastModifiedDate":"2017-10-21"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-13"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();","lastModifiedDate":"2017-10-13"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-17"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {","lastModifiedDate":"2017-10-22"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();","lastModifiedDate":"2017-10-22"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" } else {","lastModifiedDate":"2017-10-22"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();","lastModifiedDate":"2017-10-22"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":144,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));","lastModifiedDate":"2017-03-17"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, tagList);","lastModifiedDate":"2017-10-25"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" return person;","lastModifiedDate":"2017-10-24"},{"lineNumber":147,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-02-05"},{"lineNumber":148,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-03-11"},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-05"},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-05"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-03-17"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","lastModifiedDate":"2017-10-24"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-03-17"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyTask constructTask(String args) throws ParseException {","lastModifiedDate":"2017-10-24"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-24"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY);","lastModifiedDate":"2017-10-24"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {","lastModifiedDate":"2017-10-24"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION))) {","lastModifiedDate":"2017-10-24"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-03-17"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-03-17"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DEADLINE))) {","lastModifiedDate":"2017-10-24"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PRIORITY))) {","lastModifiedDate":"2017-10-24"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" TaskName name;","lastModifiedDate":"2017-10-24"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" Description description;","lastModifiedDate":"2017-10-24"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;","lastModifiedDate":"2017-10-24"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Priority priority;","lastModifiedDate":"2017-10-24"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();","lastModifiedDate":"2017-10-24"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" description \u003d ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get();","lastModifiedDate":"2017-10-24"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" deadline \u003d ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get();","lastModifiedDate":"2017-10-24"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" priority \u003d ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get();","lastModifiedDate":"2017-10-24"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d new Task(name, description, deadline, priority);","lastModifiedDate":"2017-10-24"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" return task;","lastModifiedDate":"2017-10-24"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-10-24"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-02-05"}],"authorContributionMap":{"charlesgoh":18,"jeffreygohkw":48,"Esilocke":73,"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-16"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-16"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-16"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2017-10-16"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","lastModifiedDate":"2017-10-16"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-16"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-16"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object","lastModifiedDate":"2017-10-16"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser implements Parser\u003cAddTagCommand\u003e {","lastModifiedDate":"2017-10-16"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand","lastModifiedDate":"2017-10-16"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution.","lastModifiedDate":"2017-10-16"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-16"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-16"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","lastModifiedDate":"2017-10-16"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-16"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","lastModifiedDate":"2017-10-16"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","lastModifiedDate":"2017-10-16"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-16"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","lastModifiedDate":"2017-10-16"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","lastModifiedDate":"2017-10-16"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","lastModifiedDate":"2017-10-16"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (indexes.trim().isEmpty()) {","lastModifiedDate":"2017-10-19"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new AddTagCommand(toAdd);","lastModifiedDate":"2017-10-19"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);","lastModifiedDate":"2017-10-16"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);","lastModifiedDate":"2017-10-16"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-16"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-10-16"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","lastModifiedDate":"2017-10-16"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {","lastModifiedDate":"2017-10-16"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-16"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","lastModifiedDate":"2017-10-16"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","lastModifiedDate":"2017-10-16"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","lastModifiedDate":"2017-10-16"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","lastModifiedDate":"2017-10-16"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","lastModifiedDate":"2017-10-16"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","lastModifiedDate":"2017-10-16"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","lastModifiedDate":"2017-10-16"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","lastModifiedDate":"2017-10-16"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-16"}],"authorContributionMap":{"Esilocke":4,"wangyiming1019":65}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-01-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","lastModifiedDate":"2017-01-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2017-01-19"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2017-01-19"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-01-18"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","lastModifiedDate":"2017-10-16"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","lastModifiedDate":"2017-10-18"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","lastModifiedDate":"2017-10-22"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-01-18"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","lastModifiedDate":"2017-01-18"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","lastModifiedDate":"2017-01-18"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","lastModifiedDate":"2017-10-16"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","lastModifiedDate":"2017-01-18"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","lastModifiedDate":"2017-10-20"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","lastModifiedDate":"2017-01-18"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","lastModifiedDate":"2017-01-18"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","lastModifiedDate":"2017-10-29"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","lastModifiedDate":"2017-01-18"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","lastModifiedDate":"2017-05-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","lastModifiedDate":"2017-01-18"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-07-17"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","lastModifiedDate":"2017-01-18"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","lastModifiedDate":"2017-10-04"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-07-17"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":35,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Parses user input.","lastModifiedDate":"2016-08-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddressBookParser {","lastModifiedDate":"2017-07-07"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","lastModifiedDate":"2016-08-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","lastModifiedDate":"2016-09-22"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","lastModifiedDate":"2016-08-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * @param userInput full user input string","lastModifiedDate":"2016-08-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * @return the command based on the user input","lastModifiedDate":"2016-08-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11"},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public Command parseCommand(String userInput) throws ParseException {","lastModifiedDate":"2017-03-11"},{"lineNumber":53,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","lastModifiedDate":"2016-08-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","lastModifiedDate":"2016-08-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-03-11"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" switch (commandWord) {","lastModifiedDate":"2016-08-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","lastModifiedDate":"2017-02-05"},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-16"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-16"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommandParser().parse(arguments);","lastModifiedDate":"2017-10-16"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-22"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-22"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);","lastModifiedDate":"2017-10-22"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":74,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","lastModifiedDate":"2016-12-21"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","lastModifiedDate":"2017-01-26"},{"lineNumber":77,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-20"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-20"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(arguments);","lastModifiedDate":"2017-10-20"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":82,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" case SelectCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":84,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);","lastModifiedDate":"2017-01-26"},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-28"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-28"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommandParser().parse(arguments);","lastModifiedDate":"2017-10-28"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":90,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":92,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","lastModifiedDate":"2017-01-26"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-16"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-16"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommandParser().parse(arguments);","lastModifiedDate":"2017-10-16"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":98,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);","lastModifiedDate":"2017-10-26"},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":102,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" case FindCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":104,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);","lastModifiedDate":"2017-01-26"},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-29"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-29"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommandParser().parse(arguments);","lastModifiedDate":"2017-10-29"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-25"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-25"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);","lastModifiedDate":"2017-10-25"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-25"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-25"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();","lastModifiedDate":"2017-10-25"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-25"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-25"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);","lastModifiedDate":"2017-10-25"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":122,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" case ListCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":124,"author":{"gitId":"-"},"content":" return new ListCommand();","lastModifiedDate":"2016-09-21"},{"lineNumber":125,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":126,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","lastModifiedDate":"2017-05-24"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":128,"author":{"gitId":"-"},"content":" return new HistoryCommand();","lastModifiedDate":"2017-05-24"},{"lineNumber":129,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":130,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:","lastModifiedDate":"2016-08-24"},{"lineNumber":131,"author":{"gitId":"-"},"content":" return new ExitCommand();","lastModifiedDate":"2016-08-24"},{"lineNumber":132,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":133,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:","lastModifiedDate":"2016-08-26"},{"lineNumber":134,"author":{"gitId":"-"},"content":" return new HelpCommand();","lastModifiedDate":"2016-08-24"},{"lineNumber":135,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14"},{"lineNumber":136,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","lastModifiedDate":"2017-07-17"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":138,"author":{"gitId":"-"},"content":" return new UndoCommand();","lastModifiedDate":"2017-07-17"},{"lineNumber":139,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-17"},{"lineNumber":140,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","lastModifiedDate":"2017-07-17"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03"},{"lineNumber":142,"author":{"gitId":"-"},"content":" return new RedoCommand();","lastModifiedDate":"2017-07-17"},{"lineNumber":143,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-17"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-01"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-18"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);","lastModifiedDate":"2017-10-01"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-18"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-18"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);","lastModifiedDate":"2017-10-20"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":152,"author":{"gitId":"-"},"content":" default:","lastModifiedDate":"2016-08-26"},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2017-03-11"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":156,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":157,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":9,"Esilocke":6,"wangyiming1019":41,"-":91}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-20"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","lastModifiedDate":"2017-10-20"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-20"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-10-20"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one","lastModifiedDate":"2017-10-20"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * filepath.","lastModifiedDate":"2017-10-20"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {","lastModifiedDate":"2017-10-20"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-20"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {","lastModifiedDate":"2017-10-20"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();","lastModifiedDate":"2017-10-20"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);","lastModifiedDate":"2017-10-20"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-10-20"}],"authorContributionMap":{"charlesgoh":17}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-22"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-22"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-22"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-10-22"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-10-22"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-10-22"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-10-22"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-22"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-22"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","lastModifiedDate":"2017-10-22"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-22"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-22"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-22"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object","lastModifiedDate":"2017-10-22"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-22"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {","lastModifiedDate":"2017-10-22"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-22"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","lastModifiedDate":"2017-10-22"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an EditCommand object for execution.","lastModifiedDate":"2017-10-22"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-22"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-22"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-22"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);","lastModifiedDate":"2017-10-22"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-22"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","lastModifiedDate":"2017-10-28"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);","lastModifiedDate":"2017-10-28"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Index index;","lastModifiedDate":"2017-10-22"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-22"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","lastModifiedDate":"2017-10-22"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-22"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","lastModifiedDate":"2017-10-22"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);","lastModifiedDate":"2017-10-28"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);","lastModifiedDate":"2017-10-28"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);","lastModifiedDate":"2017-10-28"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);","lastModifiedDate":"2017-10-28"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);","lastModifiedDate":"2017-10-28"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);","lastModifiedDate":"2017-10-28"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);","lastModifiedDate":"2017-10-28"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","lastModifiedDate":"2017-10-22"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-22"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","lastModifiedDate":"2017-10-22"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-22"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","lastModifiedDate":"2017-10-22"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-22"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-22"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","lastModifiedDate":"2017-10-22"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-22"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","lastModifiedDate":"2017-10-22"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-22"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","lastModifiedDate":"2017-10-22"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-22"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-22"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","lastModifiedDate":"2017-10-22"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-22"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","lastModifiedDate":"2017-10-22"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-22"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","lastModifiedDate":"2017-10-22"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-22"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-22"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","lastModifiedDate":"2017-10-22"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-22"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","lastModifiedDate":"2017-10-22"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-22"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","lastModifiedDate":"2017-10-22"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-22"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-22"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-28"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","lastModifiedDate":"2017-10-28"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-28"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","lastModifiedDate":"2017-10-28"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-28"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-28"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-28"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-22"}],"authorContributionMap":{"jeffreygohkw":151}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-26"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-26"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","lastModifiedDate":"2017-10-26"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-10-26"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-26"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-26"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditCommand object","lastModifiedDate":"2017-10-26"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser {","lastModifiedDate":"2017-10-26"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}","lastModifiedDate":"2017-10-26"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both.","lastModifiedDate":"2017-10-26"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-26"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-26"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {","lastModifiedDate":"2017-10-26"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","lastModifiedDate":"2017-10-26"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);","lastModifiedDate":"2017-10-26"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-26"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","lastModifiedDate":"2017-10-26"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {","lastModifiedDate":"2017-10-26"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_PERSON);","lastModifiedDate":"2017-10-26"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-26"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_TASK);","lastModifiedDate":"2017-10-26"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-26"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26"}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-02-11"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-02-11"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","lastModifiedDate":"2017-02-11"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","lastModifiedDate":"2017-02-11"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","lastModifiedDate":"2017-02-11"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person\");","lastModifiedDate":"2017-10-26"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","lastModifiedDate":"2017-06-06"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","lastModifiedDate":"2017-02-11"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","lastModifiedDate":"2017-02-11"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","lastModifiedDate":"2017-02-11"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","lastModifiedDate":"2017-10-22"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","lastModifiedDate":"2017-02-11"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");","lastModifiedDate":"2017-10-13"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");","lastModifiedDate":"2017-10-13"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");","lastModifiedDate":"2017-10-13"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");","lastModifiedDate":"2017-10-13"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"ra/\");","lastModifiedDate":"2017-10-22"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");","lastModifiedDate":"2017-10-13"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task\");","lastModifiedDate":"2017-10-24"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");","lastModifiedDate":"2017-10-24"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");","lastModifiedDate":"2017-10-24"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"pr/\");","lastModifiedDate":"2017-10-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-02-11"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":6,"Esilocke":5,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-01-26"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-01-26"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-05-15"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","lastModifiedDate":"2017-01-26"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-01-26"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object","lastModifiedDate":"2017-01-26"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {","lastModifiedDate":"2017-07-06"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-01-26"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand","lastModifiedDate":"2017-01-26"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution.","lastModifiedDate":"2017-01-26"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-03-11"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-05-15"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","lastModifiedDate":"2017-10-24"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Index index;","lastModifiedDate":"2017-10-24"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-24"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","lastModifiedDate":"2017-10-24"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(filteredString.trim());","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_TASK);","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-05-15"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new ParseException(","lastModifiedDate":"2017-03-11"},{"lineNumber":36,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-01-26"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-26"}],"authorContributionMap":{"Esilocke":12,"-":28}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-16"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-16"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-16"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2017-10-16"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","lastModifiedDate":"2017-10-16"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-16"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-16"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object","lastModifiedDate":"2017-10-16"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {","lastModifiedDate":"2017-10-16"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand","lastModifiedDate":"2017-10-16"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution.","lastModifiedDate":"2017-10-16"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-16"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-16"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","lastModifiedDate":"2017-10-16"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-16"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","lastModifiedDate":"2017-10-16"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","lastModifiedDate":"2017-10-16"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-16"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","lastModifiedDate":"2017-10-16"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","lastModifiedDate":"2017-10-16"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","lastModifiedDate":"2017-10-16"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (indexes.trim().isEmpty()) {","lastModifiedDate":"2017-10-19"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return new DeleteTagCommand(toDelete);","lastModifiedDate":"2017-10-19"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);","lastModifiedDate":"2017-10-19"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);","lastModifiedDate":"2017-10-16"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-16"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-10-16"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","lastModifiedDate":"2017-10-16"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {","lastModifiedDate":"2017-10-16"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-16"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","lastModifiedDate":"2017-10-16"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","lastModifiedDate":"2017-10-16"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","lastModifiedDate":"2017-10-16"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","lastModifiedDate":"2017-10-16"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","lastModifiedDate":"2017-10-16"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","lastModifiedDate":"2017-10-16"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","lastModifiedDate":"2017-10-16"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","lastModifiedDate":"2017-10-16"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-16"}],"authorContributionMap":{"Esilocke":4,"wangyiming1019":62}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-01-26"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-01-26"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-01-26"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-26"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-26"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-01-26"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-01-26"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-26"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-23"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-01-26"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Collection;","lastModifiedDate":"2017-01-26"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-01-26"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-01-26"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-07"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-01-26"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","lastModifiedDate":"2017-01-26"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","lastModifiedDate":"2017-01-26"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","lastModifiedDate":"2017-10-26"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-07"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-01-26"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object","lastModifiedDate":"2017-01-26"},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {","lastModifiedDate":"2017-07-06"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-01-26"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","lastModifiedDate":"2017-01-26"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution.","lastModifiedDate":"2017-01-26"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11"},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-03-11"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(args);","lastModifiedDate":"2017-05-15"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","lastModifiedDate":"2017-10-26"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-26"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return constructTaskDescriptor(args);","lastModifiedDate":"2017-10-26"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return constructPersonDescriptor(args);","lastModifiedDate":"2017-10-26"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Person object. **/","lastModifiedDate":"2017-10-26"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructPersonDescriptor(String args) throws ParseException {","lastModifiedDate":"2017-10-26"},{"lineNumber":52,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-03-20"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","lastModifiedDate":"2017-10-23"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG);","lastModifiedDate":"2017-10-23"},{"lineNumber":55,"author":{"gitId":"-"},"content":" Index index;","lastModifiedDate":"2017-05-25"},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-05-15"},{"lineNumber":58,"author":{"gitId":"-"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","lastModifiedDate":"2017-06-06"},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-05-15"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-03-11"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":63,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor \u003d new EditPersonDescriptor();","lastModifiedDate":"2017-01-26"},{"lineNumber":64,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-01-26"},{"lineNumber":65,"author":{"gitId":"-"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);","lastModifiedDate":"2017-06-21"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);","lastModifiedDate":"2017-06-21"},{"lineNumber":67,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);","lastModifiedDate":"2017-06-21"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);","lastModifiedDate":"2017-06-21"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);","lastModifiedDate":"2017-10-23"},{"lineNumber":70,"author":{"gitId":"-"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);","lastModifiedDate":"2017-06-21"},{"lineNumber":71,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-01-26"},{"lineNumber":72,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-03-11"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {","lastModifiedDate":"2017-01-26"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","lastModifiedDate":"2017-03-11"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return new EditCommand(index, editPersonDescriptor);","lastModifiedDate":"2017-05-15"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Task object. **/","lastModifiedDate":"2017-10-26"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructTaskDescriptor(String args) throws ParseException {","lastModifiedDate":"2017-10-26"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-26"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,","lastModifiedDate":"2017-10-26"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY);","lastModifiedDate":"2017-10-26"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index index;","lastModifiedDate":"2017-10-26"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","lastModifiedDate":"2017-10-26"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-26"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor \u003d new EditTaskDescriptor();","lastModifiedDate":"2017-10-26"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);","lastModifiedDate":"2017-10-26"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))","lastModifiedDate":"2017-10-26"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);","lastModifiedDate":"2017-10-26"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);","lastModifiedDate":"2017-10-26"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);","lastModifiedDate":"2017-10-26"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-10-26"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {","lastModifiedDate":"2017-10-26"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","lastModifiedDate":"2017-10-26"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return new EditCommand(index, editTaskDescriptor);","lastModifiedDate":"2017-10-26"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-01-26"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty.","lastModifiedDate":"2017-03-07"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a","lastModifiedDate":"2017-01-26"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * {@code Set\u003cTag\u003e} containing zero tags.","lastModifiedDate":"2017-03-07"},{"lineNumber":118,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26"},{"lineNumber":119,"author":{"gitId":"-"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {","lastModifiedDate":"2017-03-07"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assert tags !\u003d null;","lastModifiedDate":"2017-01-26"},{"lineNumber":121,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":122,"author":{"gitId":"-"},"content":" if (tags.isEmpty()) {","lastModifiedDate":"2017-01-26"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return Optional.empty();","lastModifiedDate":"2017-01-26"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":125,"author":{"gitId":"-"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;","lastModifiedDate":"2017-01-26"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));","lastModifiedDate":"2017-01-26"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":128,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":129,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-26"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":47,"-":78}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-20"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-20"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-20"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","lastModifiedDate":"2017-10-20"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","lastModifiedDate":"2017-10-20"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;","lastModifiedDate":"2017-10-20"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-20"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-20"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","lastModifiedDate":"2017-10-20"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-20"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-20"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */","lastModifiedDate":"2017-10-20"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {","lastModifiedDate":"2017-10-20"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";","lastModifiedDate":"2017-10-20"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;","lastModifiedDate":"2017-10-20"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-20"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","lastModifiedDate":"2017-10-20"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * and returns an EditCommand object for execution.","lastModifiedDate":"2017-10-20"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-20"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-20"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-20"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);","lastModifiedDate":"2017-10-20"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;","lastModifiedDate":"2017-10-20"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","lastModifiedDate":"2017-10-20"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {","lastModifiedDate":"2017-10-20"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-20"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-20"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);","lastModifiedDate":"2017-10-20"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-20"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);","lastModifiedDate":"2017-10-20"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {","lastModifiedDate":"2017-10-20"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);","lastModifiedDate":"2017-10-20"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);","lastModifiedDate":"2017-10-20"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);","lastModifiedDate":"2017-10-20"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {","lastModifiedDate":"2017-10-20"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);","lastModifiedDate":"2017-10-20"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);","lastModifiedDate":"2017-10-20"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/","lastModifiedDate":"2017-10-20"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {","lastModifiedDate":"2017-10-20"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");","lastModifiedDate":"2017-10-20"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-20"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {","lastModifiedDate":"2017-10-20"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);","lastModifiedDate":"2017-10-20"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);","lastModifiedDate":"2017-10-20"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return tagList;","lastModifiedDate":"2017-10-20"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-20"}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution.","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-25"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":29}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-01-26"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-01-26"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-01-26"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","lastModifiedDate":"2017-01-26"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","lastModifiedDate":"2017-06-12"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","lastModifiedDate":"2017-10-28"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-01-26"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object","lastModifiedDate":"2017-01-26"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {","lastModifiedDate":"2017-07-06"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26"},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-01-26"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand","lastModifiedDate":"2017-01-26"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution.","lastModifiedDate":"2017-01-26"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-03-11"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedArgs \u003d args.trim();","lastModifiedDate":"2017-02-12"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"-"},"content":" if (trimmedArgs.isEmpty()) {","lastModifiedDate":"2017-02-12"},{"lineNumber":29,"author":{"gitId":"-"},"content":" throw new ParseException(","lastModifiedDate":"2017-03-11"},{"lineNumber":30,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-01-26"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":32,"author":{"gitId":"-"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","lastModifiedDate":"2017-06-12"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));","lastModifiedDate":"2017-06-12"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-28"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");","lastModifiedDate":"2017-10-30"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" trimmedArgs \u003d argsWithNoTaskPrefix.trim();","lastModifiedDate":"2017-10-30"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","lastModifiedDate":"2017-10-30"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-28"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-28"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","lastModifiedDate":"2017-10-30"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return new FindCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords)));","lastModifiedDate":"2017-10-28"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26"},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-26"}],"authorContributionMap":{"Esilocke":14,"-":31}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-29"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-29"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-29"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","lastModifiedDate":"2017-10-29"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-29"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-29"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object","lastModifiedDate":"2017-10-29"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {","lastModifiedDate":"2017-10-29"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand","lastModifiedDate":"2017-10-29"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution.","lastModifiedDate":"2017-10-29"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-29"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-29"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();","lastModifiedDate":"2017-10-29"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {","lastModifiedDate":"2017-10-29"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-29"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-29"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");","lastModifiedDate":"2017-10-29"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();","lastModifiedDate":"2017-10-29"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {","lastModifiedDate":"2017-10-29"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);","lastModifiedDate":"2017-10-29"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));","lastModifiedDate":"2017-10-29"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29"}],"authorContributionMap":{"wangyiming1019":36}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-28"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-28"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-28"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-28"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new SelectCommand object","lastModifiedDate":"2017-10-28"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {","lastModifiedDate":"2017-10-28"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand","lastModifiedDate":"2017-10-28"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an SelectCommand object for execution.","lastModifiedDate":"2017-10-28"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-28"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);","lastModifiedDate":"2017-10-28"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-28"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28"}],"authorContributionMap":{"jeffreygohkw":29}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-02-11"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collection;","lastModifiedDate":"2017-02-11"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-02-11"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-02-11"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-02-11"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-02-11"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2017-02-11"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-02-11"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-02-11"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-02-11"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-02-11"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-02-11"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-24"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-02-11"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes.","lastModifiedDate":"2017-07-18"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s","lastModifiedDate":"2017-07-18"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type.","lastModifiedDate":"2017-07-18"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and","lastModifiedDate":"2017-07-18"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the","lastModifiedDate":"2017-07-18"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an","lastModifiedDate":"2017-07-18"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods.","lastModifiedDate":"2017-07-18"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class ParserUtil {","lastModifiedDate":"2017-02-11"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";","lastModifiedDate":"2017-06-02"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";","lastModifiedDate":"2017-05-25"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-02"},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be","lastModifiedDate":"2017-05-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * trimmed.","lastModifiedDate":"2017-05-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer).","lastModifiedDate":"2017-05-26"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {","lastModifiedDate":"2017-05-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();","lastModifiedDate":"2017-05-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {","lastModifiedDate":"2017-06-02"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);","lastModifiedDate":"2017-06-02"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));","lastModifiedDate":"2017-05-25"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-10-14"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","lastModifiedDate":"2017-10-14"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-14"},{"lineNumber":55,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-14"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {","lastModifiedDate":"2017-10-14"},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(name);","lastModifiedDate":"2017-10-14"},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();","lastModifiedDate":"2017-10-14"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-14"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","lastModifiedDate":"2017-10-15"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Name to be private if true.","lastModifiedDate":"2017-10-15"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-14"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-14"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-15"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","lastModifiedDate":"2017-10-15"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-15"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-14"},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-10-14"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","lastModifiedDate":"2017-10-15"},{"lineNumber":73,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-14"},{"lineNumber":74,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-14"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {","lastModifiedDate":"2017-10-15"},{"lineNumber":76,"author":{"gitId":"-"},"content":" requireNonNull(phone);","lastModifiedDate":"2017-10-15"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();","lastModifiedDate":"2017-10-15"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-14"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","lastModifiedDate":"2017-10-15"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Phone to be private if true.","lastModifiedDate":"2017-10-15"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-14"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-14"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-15"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","lastModifiedDate":"2017-10-15"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-15"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-14"},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","lastModifiedDate":"2017-10-15"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-07-18"},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11"},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {","lastModifiedDate":"2017-10-15"},{"lineNumber":95,"author":{"gitId":"-"},"content":" requireNonNull(address);","lastModifiedDate":"2017-10-15"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();","lastModifiedDate":"2017-10-15"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11"},{"lineNumber":98,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","lastModifiedDate":"2017-10-15"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Address to be private if true.","lastModifiedDate":"2017-10-15"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-07-18"},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)","lastModifiedDate":"2017-10-15"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","lastModifiedDate":"2017-10-15"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","lastModifiedDate":"2017-10-15"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-15"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11"},{"lineNumber":109,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","lastModifiedDate":"2017-10-22"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-22"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {","lastModifiedDate":"2017-10-22"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","lastModifiedDate":"2017-10-22"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();","lastModifiedDate":"2017-10-22"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","lastModifiedDate":"2017-10-22"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" * Takes in a (@code boolean isPrivate) which will set the Remark to be private if true.","lastModifiedDate":"2017-10-22"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-22"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)","lastModifiedDate":"2017-10-22"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" throws IllegalValueException {","lastModifiedDate":"2017-10-22"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","lastModifiedDate":"2017-10-22"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-22"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11"},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","lastModifiedDate":"2017-10-15"},{"lineNumber":134,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-07-18"},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11"},{"lineNumber":136,"author":{"gitId":"-"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {","lastModifiedDate":"2017-10-15"},{"lineNumber":137,"author":{"gitId":"-"},"content":" requireNonNull(email);","lastModifiedDate":"2017-10-15"},{"lineNumber":138,"author":{"gitId":"-"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();","lastModifiedDate":"2017-10-15"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11"},{"lineNumber":140,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","lastModifiedDate":"2017-02-11"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Email to be private if true.","lastModifiedDate":"2017-10-15"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-07-18"},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-13"},{"lineNumber":147,"author":{"gitId":"-"},"content":" requireNonNull(email);","lastModifiedDate":"2017-05-15"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-13"},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11"},{"lineNumber":150,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11"},{"lineNumber":151,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}.","lastModifiedDate":"2017-03-07"},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11"},{"lineNumber":154,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {","lastModifiedDate":"2017-03-07"},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(tags);","lastModifiedDate":"2017-05-15"},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2017-02-11"},{"lineNumber":157,"author":{"gitId":"-"},"content":" for (String tagName : tags) {","lastModifiedDate":"2017-02-11"},{"lineNumber":158,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));","lastModifiedDate":"2017-02-11"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11"},{"lineNumber":160,"author":{"gitId":"-"},"content":" return tagSet;","lastModifiedDate":"2017-03-07"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present.","lastModifiedDate":"2017-10-24"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {","lastModifiedDate":"2017-10-24"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","lastModifiedDate":"2017-10-24"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();","lastModifiedDate":"2017-10-24"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present.","lastModifiedDate":"2017-10-24"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {","lastModifiedDate":"2017-10-24"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);","lastModifiedDate":"2017-10-24"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();","lastModifiedDate":"2017-10-24"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present.","lastModifiedDate":"2017-10-24"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {","lastModifiedDate":"2017-10-24"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);","lastModifiedDate":"2017-10-24"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();","lastModifiedDate":"2017-10-24"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present.","lastModifiedDate":"2017-10-24"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {","lastModifiedDate":"2017-10-24"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);","lastModifiedDate":"2017-10-24"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();","lastModifiedDate":"2017-10-24"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-02-11"}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":29,"Esilocke":39,"-":104}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-01"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-01"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","lastModifiedDate":"2017-10-01"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","lastModifiedDate":"2017-10-04"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-04"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-10-04"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","lastModifiedDate":"2017-10-04"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-04"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","lastModifiedDate":"2017-10-01"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 0;","lastModifiedDate":"2017-10-01"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 1;","lastModifiedDate":"2017-10-01"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-01"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand","lastModifiedDate":"2017-10-01"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution.","lastModifiedDate":"2017-10-01"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-01"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-01"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-01"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","lastModifiedDate":"2017-10-01"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","lastModifiedDate":"2017-10-01"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-01"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","lastModifiedDate":"2017-10-01"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","lastModifiedDate":"2017-10-01"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","lastModifiedDate":"2017-10-01"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","lastModifiedDate":"2017-10-01"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" if (argKeywords.length !\u003d 2) {","lastModifiedDate":"2017-10-12"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-12"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])","lastModifiedDate":"2017-10-01"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])) {","lastModifiedDate":"2017-10-01"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-01"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","lastModifiedDate":"2017-10-01"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);","lastModifiedDate":"2017-10-01"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-10-01"}],"authorContributionMap":{"charlesgoh":44,"jeffreygohkw":4}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution.","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-25"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":29}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-09-21"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","lastModifiedDate":"2017-10-26"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;","lastModifiedDate":"2017-01-19"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-01-19"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-01-19"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;","lastModifiedDate":"2017-01-19"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;","lastModifiedDate":"2017-01-19"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-01-19"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-01-19"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-26"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2016-08-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-08-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","lastModifiedDate":"2016-08-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2016-09-21"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","lastModifiedDate":"2016-09-21"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;","lastModifiedDate":"2017-10-26"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","lastModifiedDate":"2016-08-08"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","lastModifiedDate":"2016-08-08"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","lastModifiedDate":"2016-08-08"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","lastModifiedDate":"2016-08-26"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","lastModifiedDate":"2016-08-26"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;","lastModifiedDate":"2017-10-26"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*","lastModifiedDate":"2016-10-19"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","lastModifiedDate":"2016-10-19"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","lastModifiedDate":"2016-10-19"},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-10-19"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","lastModifiedDate":"2016-10-19"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors.","lastModifiedDate":"2016-10-19"},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-10-19"},{"lineNumber":46,"author":{"gitId":"-"},"content":" {","lastModifiedDate":"2016-08-08"},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","lastModifiedDate":"2016-08-26"},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","lastModifiedDate":"2016-08-26"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();","lastModifiedDate":"2017-10-26"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}","lastModifiedDate":"2016-08-08"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","lastModifiedDate":"2016-12-22"},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","lastModifiedDate":"2016-08-08"},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();","lastModifiedDate":"2016-12-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","lastModifiedDate":"2016-12-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations","lastModifiedDate":"2016-08-08"},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","lastModifiedDate":"2017-06-09"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","lastModifiedDate":"2016-10-19"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","lastModifiedDate":"2017-07-05"},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","lastModifiedDate":"2016-10-19"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","lastModifiedDate":"2017-10-26"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);","lastModifiedDate":"2017-10-26"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","lastModifiedDate":"2017-08-16"},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","lastModifiedDate":"2016-08-08"},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);","lastModifiedDate":"2017-05-15"},{"lineNumber":81,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-12-24"},{"lineNumber":82,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());","lastModifiedDate":"2016-12-24"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","lastModifiedDate":"2017-10-28"},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-06-09"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";","lastModifiedDate":"2016-12-24"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","lastModifiedDate":"2017-10-28"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";","lastModifiedDate":"2017-10-26"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05"},{"lineNumber":90,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","lastModifiedDate":"2017-07-05"},{"lineNumber":91,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);","lastModifiedDate":"2016-12-24"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}.","lastModifiedDate":"2017-10-26"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","lastModifiedDate":"2017-10-26"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);","lastModifiedDate":"2017-10-26"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);","lastModifiedDate":"2017-10-26"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","lastModifiedDate":"2017-10-26"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","lastModifiedDate":"2017-10-26"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","lastModifiedDate":"2017-10-26"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());","lastModifiedDate":"2017-10-26"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","lastModifiedDate":"2017-10-26"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);","lastModifiedDate":"2017-10-26"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");","lastModifiedDate":"2017-10-26"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-10-26"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";","lastModifiedDate":"2017-10-26"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","lastModifiedDate":"2017-10-26"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";","lastModifiedDate":"2017-10-26"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":118,"author":{"gitId":"-"},"content":" //// person-level operations","lastModifiedDate":"2016-08-08"},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":120,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","lastModifiedDate":"2016-09-21"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","lastModifiedDate":"2016-09-21"},{"lineNumber":123,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","lastModifiedDate":"2016-09-21"},{"lineNumber":124,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-09-21"},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","lastModifiedDate":"2017-06-09"},{"lineNumber":126,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21"},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {","lastModifiedDate":"2017-06-09"},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);","lastModifiedDate":"2017-03-02"},{"lineNumber":129,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);","lastModifiedDate":"2017-03-02"},{"lineNumber":130,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","lastModifiedDate":"2017-09-02"},{"lineNumber":131,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","lastModifiedDate":"2017-09-02"},{"lineNumber":132,"author":{"gitId":"-"},"content":" // in the person list.","lastModifiedDate":"2017-09-02"},{"lineNumber":133,"author":{"gitId":"-"},"content":" persons.add(newPerson);","lastModifiedDate":"2017-03-02"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":135,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-13"},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}.","lastModifiedDate":"2017-06-07"},{"lineNumber":138,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}.","lastModifiedDate":"2016-12-13"},{"lineNumber":139,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-13"},{"lineNumber":140,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","lastModifiedDate":"2016-12-13"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * another existing person in the list.","lastModifiedDate":"2016-12-13"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-06-07"},{"lineNumber":143,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2017-04-07"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","lastModifiedDate":"2017-04-07"},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-13"},{"lineNumber":146,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)","lastModifiedDate":"2017-06-07"},{"lineNumber":147,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","lastModifiedDate":"2017-06-09"},{"lineNumber":148,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);","lastModifiedDate":"2017-05-15"},{"lineNumber":149,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":150,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);","lastModifiedDate":"2016-12-13"},{"lineNumber":151,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);","lastModifiedDate":"2016-12-13"},{"lineNumber":152,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","lastModifiedDate":"2016-12-13"},{"lineNumber":153,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","lastModifiedDate":"2016-12-13"},{"lineNumber":154,"author":{"gitId":"-"},"content":" // in the person list.","lastModifiedDate":"2016-12-13"},{"lineNumber":155,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);","lastModifiedDate":"2017-08-07"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13"},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-01"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","lastModifiedDate":"2017-10-01"},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" *","lastModifiedDate":"2017-10-01"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" * @param field","lastModifiedDate":"2017-10-01"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" * @param order","lastModifiedDate":"2017-10-01"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-01"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {","lastModifiedDate":"2017-10-01"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);","lastModifiedDate":"2017-10-01"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":168,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}.","lastModifiedDate":"2017-10-25"},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","lastModifiedDate":"2017-10-25"},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25"},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);","lastModifiedDate":"2017-10-25"},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}.","lastModifiedDate":"2017-10-25"},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","lastModifiedDate":"2017-10-25"},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25"},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);","lastModifiedDate":"2017-10-25"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:","lastModifiedDate":"2016-09-21"},{"lineNumber":186,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","lastModifiedDate":"2016-09-21"},{"lineNumber":187,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","lastModifiedDate":"2016-09-21"},{"lineNumber":188,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21"},{"lineNumber":189,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {","lastModifiedDate":"2016-10-19"},{"lineNumber":190,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","lastModifiedDate":"2017-03-07"},{"lineNumber":191,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","lastModifiedDate":"2016-09-21"},{"lineNumber":192,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":193,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","lastModifiedDate":"2016-09-21"},{"lineNumber":194,"author":{"gitId":"-"},"content":" // used for checking person tag references","lastModifiedDate":"2016-10-19"},{"lineNumber":195,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2016-09-21"},{"lineNumber":196,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","lastModifiedDate":"2016-10-19"},{"lineNumber":197,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":198,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","lastModifiedDate":"2016-10-19"},{"lineNumber":199,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2016-10-19"},{"lineNumber":200,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","lastModifiedDate":"2016-10-19"},{"lineNumber":201,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);","lastModifiedDate":"2017-03-11"},{"lineNumber":202,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-19"},{"lineNumber":204,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-10-19"},{"lineNumber":205,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:","lastModifiedDate":"2016-10-19"},{"lineNumber":206,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","lastModifiedDate":"2016-10-19"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","lastModifiedDate":"2016-10-19"},{"lineNumber":208,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","lastModifiedDate":"2016-10-19"},{"lineNumber":209,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-10-19"},{"lineNumber":210,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {","lastModifiedDate":"2016-10-19"},{"lineNumber":211,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);","lastModifiedDate":"2016-10-19"},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":213,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":214,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","lastModifiedDate":"2017-08-16"},{"lineNumber":216,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","lastModifiedDate":"2017-08-16"},{"lineNumber":217,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":218,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {","lastModifiedDate":"2017-06-09"},{"lineNumber":219,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","lastModifiedDate":"2016-08-24"},{"lineNumber":220,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2016-08-24"},{"lineNumber":221,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2016-08-24"},{"lineNumber":222,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2017-06-09"},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":225,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":226,"author":{"gitId":"-"},"content":" //// tag-level operations","lastModifiedDate":"2016-08-08"},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":228,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","lastModifiedDate":"2016-08-26"},{"lineNumber":229,"author":{"gitId":"-"},"content":" tags.add(t);","lastModifiedDate":"2016-08-08"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":231,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" //// task-level operations","lastModifiedDate":"2017-10-24"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","lastModifiedDate":"2017-10-24"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-24"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists.","lastModifiedDate":"2017-10-24"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);","lastModifiedDate":"2017-10-24"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);","lastModifiedDate":"2017-10-24"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}.","lastModifiedDate":"2017-10-24"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}.","lastModifiedDate":"2017-10-24"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {","lastModifiedDate":"2017-10-24"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {","lastModifiedDate":"2017-10-24"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-24"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-24"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","lastModifiedDate":"2017-10-24"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}.","lastModifiedDate":"2017-10-26"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","lastModifiedDate":"2017-10-26"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","lastModifiedDate":"2017-10-26"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-10-26"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)","lastModifiedDate":"2017-10-26"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","lastModifiedDate":"2017-10-26"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);","lastModifiedDate":"2017-10-26"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);","lastModifiedDate":"2017-10-26"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);","lastModifiedDate":"2017-10-26"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" //// util methods","lastModifiedDate":"2016-08-08"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2016-08-08"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2016-08-08"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\"","lastModifiedDate":"2017-10-30"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";","lastModifiedDate":"2017-10-30"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" // TODO: refine later","lastModifiedDate":"2016-08-08"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2016-08-08"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","lastModifiedDate":"2016-12-24"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList();","lastModifiedDate":"2017-09-01"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2016-09-01"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2016-09-01"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","lastModifiedDate":"2017-10-23"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();","lastModifiedDate":"2017-10-23"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":293,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":294,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-01"},{"lineNumber":295,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","lastModifiedDate":"2016-12-24"},{"lineNumber":296,"author":{"gitId":"-"},"content":" return tags.asObservableList();","lastModifiedDate":"2017-09-01"},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-01"},{"lineNumber":298,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-01"},{"lineNumber":299,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-21"},{"lineNumber":300,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-09-21"},{"lineNumber":301,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-09-21"},{"lineNumber":302,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","lastModifiedDate":"2016-09-21"},{"lineNumber":303,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","lastModifiedDate":"2016-09-21"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))","lastModifiedDate":"2017-10-30"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);","lastModifiedDate":"2017-10-30"},{"lineNumber":306,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":307,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":308,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-21"},{"lineNumber":309,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-09-21"},{"lineNumber":310,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","lastModifiedDate":"2016-09-21"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);","lastModifiedDate":"2017-10-30"},{"lineNumber":312,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":313,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"charlesgoh":10,"Esilocke":105,"wangyiming1019":16,"-":182}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-09-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-06-12"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-09-01"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-26"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-23"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * The API of the Model component.","lastModifiedDate":"2016-09-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public interface Model {","lastModifiedDate":"2016-09-25"},{"lineNumber":21,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","lastModifiedDate":"2017-08-05"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","lastModifiedDate":"2017-08-05"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */","lastModifiedDate":"2017-10-26"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;","lastModifiedDate":"2017-10-26"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-05"},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","lastModifiedDate":"2016-09-25"},{"lineNumber":27,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","lastModifiedDate":"2016-09-25"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */","lastModifiedDate":"2017-10-26"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);","lastModifiedDate":"2017-10-26"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","lastModifiedDate":"2016-09-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","lastModifiedDate":"2016-09-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","lastModifiedDate":"2016-09-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;","lastModifiedDate":"2017-06-09"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */","lastModifiedDate":"2017-10-16"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-16"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","lastModifiedDate":"2017-10-16"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /** Adds the given person */","lastModifiedDate":"2016-09-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */","lastModifiedDate":"2017-10-16"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-16"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","lastModifiedDate":"2017-10-16"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */","lastModifiedDate":"2017-10-19"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-19"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;","lastModifiedDate":"2017-10-19"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */","lastModifiedDate":"2017-10-25"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","lastModifiedDate":"2017-10-25"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */","lastModifiedDate":"2017-10-25"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","lastModifiedDate":"2017-10-25"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-13"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","lastModifiedDate":"2017-06-07"},{"lineNumber":61,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-13"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","lastModifiedDate":"2016-12-13"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * another existing person in the list.","lastModifiedDate":"2016-12-13"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-06-07"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-13"},{"lineNumber":66,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","lastModifiedDate":"2017-06-07"},{"lineNumber":67,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","lastModifiedDate":"2017-06-09"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */","lastModifiedDate":"2017-10-23"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;","lastModifiedDate":"2017-10-24"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */","lastModifiedDate":"2017-10-23"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;","lastModifiedDate":"2017-10-23"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}.","lastModifiedDate":"2017-10-26"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","lastModifiedDate":"2017-10-26"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","lastModifiedDate":"2017-10-26"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-10-26"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","lastModifiedDate":"2017-10-26"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;","lastModifiedDate":"2017-10-26"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":85,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","lastModifiedDate":"2017-09-01"},{"lineNumber":86,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","lastModifiedDate":"2017-09-01"},{"lineNumber":87,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */","lastModifiedDate":"2017-10-23"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","lastModifiedDate":"2017-10-23"},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-05"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","lastModifiedDate":"2017-08-05"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","lastModifiedDate":"2017-08-05"},{"lineNumber":94,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-05"},{"lineNumber":95,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);","lastModifiedDate":"2017-06-12"},{"lineNumber":96,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}.","lastModifiedDate":"2017-10-26"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null.","lastModifiedDate":"2017-10-26"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);","lastModifiedDate":"2017-10-26"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-01"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by field in ascending (asc) or descending (desc) order","lastModifiedDate":"2017-10-01"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" * @param field","lastModifiedDate":"2017-10-01"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" * @param order","lastModifiedDate":"2017-10-01"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-01"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);","lastModifiedDate":"2017-10-01"},{"lineNumber":109,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-25"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":36,"wangyiming1019":18,"-":49}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-08-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-08-05"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","lastModifiedDate":"2017-05-19"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","lastModifiedDate":"2017-10-26"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-10-16"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-19"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","lastModifiedDate":"2017-10-16"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-06-12"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2017-09-01"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-09-01"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","lastModifiedDate":"2016-08-26"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","lastModifiedDate":"2017-01-19"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-23"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","lastModifiedDate":"2017-01-19"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-26"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-10-16"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-08-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-23"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","lastModifiedDate":"2016-08-08"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","lastModifiedDate":"2016-08-08"},{"lineNumber":36,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":37,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","lastModifiedDate":"2016-09-25"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","lastModifiedDate":"2016-09-23"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":40,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","lastModifiedDate":"2016-09-21"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;","lastModifiedDate":"2016-12-24"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;","lastModifiedDate":"2017-10-23"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","lastModifiedDate":"2016-12-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","lastModifiedDate":"2016-12-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" super();","lastModifiedDate":"2016-08-08"},{"lineNumber":49,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","lastModifiedDate":"2017-05-19"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","lastModifiedDate":"2016-12-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","lastModifiedDate":"2016-12-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","lastModifiedDate":"2016-12-24"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());","lastModifiedDate":"2017-10-23"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public ModelManager() {","lastModifiedDate":"2016-09-22"},{"lineNumber":59,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","lastModifiedDate":"2016-09-25"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","lastModifiedDate":"2016-08-08"},{"lineNumber":64,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","lastModifiedDate":"2016-09-21"},{"lineNumber":65,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2016-09-27"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","lastModifiedDate":"2017-10-26"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));","lastModifiedDate":"2017-10-26"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","lastModifiedDate":"2017-10-26"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);","lastModifiedDate":"2017-10-26"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-26"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);","lastModifiedDate":"2017-10-26"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-26"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":83,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","lastModifiedDate":"2016-09-21"},{"lineNumber":84,"author":{"gitId":"-"},"content":" return addressBook;","lastModifiedDate":"2016-09-21"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":86,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":87,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","lastModifiedDate":"2016-09-22"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","lastModifiedDate":"2016-09-27"},{"lineNumber":89,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","lastModifiedDate":"2016-09-26"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":91,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2016-08-26"},{"lineNumber":94,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","lastModifiedDate":"2016-09-21"},{"lineNumber":95,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2016-09-27"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list.","lastModifiedDate":"2017-10-16"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-16"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","lastModifiedDate":"2017-10-16"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","lastModifiedDate":"2017-10-16"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","lastModifiedDate":"2017-10-16"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);","lastModifiedDate":"2017-10-16"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);","lastModifiedDate":"2017-10-16"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());","lastModifiedDate":"2017-10-16"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);","lastModifiedDate":"2017-10-16"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);","lastModifiedDate":"2017-10-16"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);","lastModifiedDate":"2017-10-16"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-16"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":116,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":117,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","lastModifiedDate":"2017-06-09"},{"lineNumber":118,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","lastModifiedDate":"2016-09-21"},{"lineNumber":119,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-08-05"},{"lineNumber":120,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2016-09-27"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-26"},{"lineNumber":122,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-26"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list.","lastModifiedDate":"2017-10-16"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-16"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","lastModifiedDate":"2017-10-16"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","lastModifiedDate":"2017-10-16"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","lastModifiedDate":"2017-10-16"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);","lastModifiedDate":"2017-10-16"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);","lastModifiedDate":"2017-10-16"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());","lastModifiedDate":"2017-10-16"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);","lastModifiedDate":"2017-10-16"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);","lastModifiedDate":"2017-10-16"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);","lastModifiedDate":"2017-10-16"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-16"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-12-13"},{"lineNumber":142,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","lastModifiedDate":"2017-06-07"},{"lineNumber":143,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","lastModifiedDate":"2017-06-09"},{"lineNumber":144,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","lastModifiedDate":"2017-06-07"},{"lineNumber":145,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":146,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","lastModifiedDate":"2017-06-07"},{"lineNumber":147,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2016-12-13"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13"},{"lineNumber":149,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-01"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","lastModifiedDate":"2017-10-01"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);","lastModifiedDate":"2017-10-01"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-01"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-19"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes.","lastModifiedDate":"2017-10-19"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag.","lastModifiedDate":"2017-10-19"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)","lastModifiedDate":"2017-10-19"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {","lastModifiedDate":"2017-10-19"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();","lastModifiedDate":"2017-10-19"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;","lastModifiedDate":"2017-10-19"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;","lastModifiedDate":"2017-10-19"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;","lastModifiedDate":"2017-10-19"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" int index;","lastModifiedDate":"2017-10-19"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","lastModifiedDate":"2017-10-19"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();","lastModifiedDate":"2017-10-19"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);","lastModifiedDate":"2017-10-19"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);","lastModifiedDate":"2017-10-19"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());","lastModifiedDate":"2017-10-20"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);","lastModifiedDate":"2017-10-19"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);","lastModifiedDate":"2017-10-19"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);","lastModifiedDate":"2017-10-19"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);","lastModifiedDate":"2017-10-19"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-19"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25"},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);","lastModifiedDate":"2017-10-25"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-25"},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-30"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" addressBook.unfavouritePerson(target);","lastModifiedDate":"2017-10-30"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" updateFilteredPersonList(new NameContainsFavouritePredicate());","lastModifiedDate":"2017-10-30"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-23"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","lastModifiedDate":"2017-10-30"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);","lastModifiedDate":"2017-10-30"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","lastModifiedDate":"2017-10-30"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-25"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","lastModifiedDate":"2017-10-23"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);","lastModifiedDate":"2017-10-24"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-23"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","lastModifiedDate":"2017-10-26"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","lastModifiedDate":"2017-10-26"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);","lastModifiedDate":"2017-10-26"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);","lastModifiedDate":"2017-10-26"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-26"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":220,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2016-10-12"},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-19"},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of","lastModifiedDate":"2017-09-01"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * {@code addressBook}","lastModifiedDate":"2017-09-01"},{"lineNumber":225,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-19"},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":227,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","lastModifiedDate":"2017-09-01"},{"lineNumber":228,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","lastModifiedDate":"2017-09-01"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22"},{"lineNumber":230,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","lastModifiedDate":"2017-10-23"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);","lastModifiedDate":"2017-10-23"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":238,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":239,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","lastModifiedDate":"2017-06-12"},{"lineNumber":240,"author":{"gitId":"-"},"content":" requireNonNull(predicate);","lastModifiedDate":"2017-08-05"},{"lineNumber":241,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);","lastModifiedDate":"2017-06-12"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22"},{"lineNumber":243,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","lastModifiedDate":"2017-10-26"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);","lastModifiedDate":"2017-10-26"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);","lastModifiedDate":"2017-10-26"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":252,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-31"},{"lineNumber":253,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","lastModifiedDate":"2017-05-31"},{"lineNumber":254,"author":{"gitId":"-"},"content":" // short circuit if same object","lastModifiedDate":"2017-05-31"},{"lineNumber":255,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","lastModifiedDate":"2017-05-31"},{"lineNumber":256,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2017-05-31"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-31"},{"lineNumber":258,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-31"},{"lineNumber":259,"author":{"gitId":"-"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-05-31"},{"lineNumber":260,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","lastModifiedDate":"2017-05-31"},{"lineNumber":261,"author":{"gitId":"-"},"content":" return false;","lastModifiedDate":"2017-05-31"},{"lineNumber":262,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-31"},{"lineNumber":263,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-31"},{"lineNumber":264,"author":{"gitId":"-"},"content":" // state check","lastModifiedDate":"2017-05-31"},{"lineNumber":265,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","lastModifiedDate":"2017-05-31"},{"lineNumber":266,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","lastModifiedDate":"2017-05-31"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)","lastModifiedDate":"2017-10-30"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);","lastModifiedDate":"2017-10-30"},{"lineNumber":269,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-31"},{"lineNumber":270,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-31"},{"lineNumber":271,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":98,"wangyiming1019":49,"-":118}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-09-21"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-01-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-08-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2016-09-28"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book","lastModifiedDate":"2016-08-08"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {","lastModifiedDate":"2016-08-08"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list.","lastModifiedDate":"2016-12-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons.","lastModifiedDate":"2016-12-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();","lastModifiedDate":"2016-12-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list.","lastModifiedDate":"2016-12-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags.","lastModifiedDate":"2016-12-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();","lastModifiedDate":"2016-12-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list.","lastModifiedDate":"2017-10-23"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();","lastModifiedDate":"2017-10-23"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","lastModifiedDate":"2016-08-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","lastModifiedDate":"2016-08-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {","lastModifiedDate":"2016-09-21"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","lastModifiedDate":"2017-01-16"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","lastModifiedDate":"2017-01-16"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*","lastModifiedDate":"2017-01-16"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","lastModifiedDate":"2017-01-16"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-01-16"},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-16"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","lastModifiedDate":"2017-01-16"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-03"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;","lastModifiedDate":"2016-08-24"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-14"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Validates given address.","lastModifiedDate":"2016-08-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid.","lastModifiedDate":"2016-08-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public Address(String address) throws IllegalValueException {","lastModifiedDate":"2017-10-14"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {","lastModifiedDate":"2017-10-03"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-03"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-03"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-03"},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {","lastModifiedDate":"2016-08-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","lastModifiedDate":"2016-08-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.value \u003d address;","lastModifiedDate":"2016-08-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-14"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this(address);","lastModifiedDate":"2017-10-14"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-14"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email.","lastModifiedDate":"2016-09-22"},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","lastModifiedDate":"2016-08-24"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","lastModifiedDate":"2017-10-03"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-15"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";","lastModifiedDate":"2017-10-16"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return value;","lastModifiedDate":"2016-08-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","lastModifiedDate":"2016-08-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","lastModifiedDate":"2016-08-24"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return value.hashCode();","lastModifiedDate":"2016-08-24"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-13"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-13"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":79,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"jeffreygohkw":14,"Esilocke":6,"-":59}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","lastModifiedDate":"2016-08-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","lastModifiedDate":"2016-08-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {","lastModifiedDate":"2016-09-21"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d","lastModifiedDate":"2016-08-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";","lastModifiedDate":"2016-08-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";","lastModifiedDate":"2016-08-24"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-03"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","lastModifiedDate":"2016-08-24"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-14"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Validates given email.","lastModifiedDate":"2016-08-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid.","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public Email(String email) throws IllegalValueException {","lastModifiedDate":"2017-10-14"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {","lastModifiedDate":"2017-10-03"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-03"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-03"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-03"},{"lineNumber":29,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();","lastModifiedDate":"2016-10-16"},{"lineNumber":30,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {","lastModifiedDate":"2016-10-16"},{"lineNumber":31,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);","lastModifiedDate":"2016-08-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;","lastModifiedDate":"2016-10-16"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-14"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this(email);","lastModifiedDate":"2017-10-14"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-14"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","lastModifiedDate":"2016-09-22"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);","lastModifiedDate":"2017-10-03"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-15"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";","lastModifiedDate":"2017-10-16"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return value;","lastModifiedDate":"2016-08-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","lastModifiedDate":"2016-08-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return value.hashCode();","lastModifiedDate":"2016-08-24"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-13"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-13"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"jeffreygohkw":14,"Esilocke":6,"-":55}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book.","lastModifiedDate":"2016-08-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}","lastModifiedDate":"2016-08-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {","lastModifiedDate":"2016-08-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","lastModifiedDate":"2017-01-16"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";","lastModifiedDate":"2017-01-16"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","lastModifiedDate":"2017-01-16"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","lastModifiedDate":"2017-01-16"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-01-16"},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-16"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";","lastModifiedDate":"2017-01-16"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String fullName;","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-14"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given name.","lastModifiedDate":"2016-08-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid.","lastModifiedDate":"2016-08-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Name(String name) throws IllegalValueException {","lastModifiedDate":"2017-10-14"},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(name);","lastModifiedDate":"2017-05-15"},{"lineNumber":32,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","lastModifiedDate":"2016-10-16"},{"lineNumber":33,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {","lastModifiedDate":"2016-10-16"},{"lineNumber":34,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2016-08-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.fullName \u003d trimmedName;","lastModifiedDate":"2016-10-16"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-14"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this(name);","lastModifiedDate":"2017-10-14"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-14"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name.","lastModifiedDate":"2016-09-22"},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {","lastModifiedDate":"2016-08-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);","lastModifiedDate":"2016-08-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-15"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","lastModifiedDate":"2017-10-16"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return fullName;","lastModifiedDate":"2016-08-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls","lastModifiedDate":"2016-08-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.fullName.equals(((Name) other).fullName)); // state check","lastModifiedDate":"2016-08-24"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return fullName.hashCode();","lastModifiedDate":"2016-08-24"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-13"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-13"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":79,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"jeffreygohkw":14,"-":65}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured.","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-10-29"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-29"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-29"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","lastModifiedDate":"2017-10-29"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-10-29"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2017-10-29"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-29"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-29"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given.","lastModifiedDate":"2017-10-29"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","lastModifiedDate":"2017-10-29"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;","lastModifiedDate":"2017-10-29"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {","lastModifiedDate":"2017-10-29"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;","lastModifiedDate":"2017-10-29"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-29"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-29"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);","lastModifiedDate":"2017-10-30"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-29"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-29"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","lastModifiedDate":"2017-10-29"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","lastModifiedDate":"2017-10-29"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {","lastModifiedDate":"2017-10-29"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()","lastModifiedDate":"2017-10-29"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));","lastModifiedDate":"2017-10-29"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()","lastModifiedDate":"2017-10-29"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","lastModifiedDate":"2017-10-29"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()","lastModifiedDate":"2017-10-29"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));","lastModifiedDate":"2017-10-29"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-30"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements","lastModifiedDate":"2017-10-30"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value","lastModifiedDate":"2017-10-30"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-30"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","lastModifiedDate":"2017-10-29"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {","lastModifiedDate":"2017-10-29"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","lastModifiedDate":"2017-10-29"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" return true;","lastModifiedDate":"2017-10-29"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" } else {","lastModifiedDate":"2017-10-29"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" return false;","lastModifiedDate":"2017-10-29"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-30"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list","lastModifiedDate":"2017-10-30"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched","lastModifiedDate":"2017-10-30"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched","lastModifiedDate":"2017-10-30"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-30"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","lastModifiedDate":"2017-10-29"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {","lastModifiedDate":"2017-10-29"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/not\")) {","lastModifiedDate":"2017-10-29"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);","lastModifiedDate":"2017-10-29"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" } else {","lastModifiedDate":"2017-10-29"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(4));","lastModifiedDate":"2017-10-29"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-30"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings","lastModifiedDate":"2017-10-30"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-30"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-30"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","lastModifiedDate":"2017-10-29"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","lastModifiedDate":"2017-10-29"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {","lastModifiedDate":"2017-10-29"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());","lastModifiedDate":"2017-10-29"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");","lastModifiedDate":"2017-10-29"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();","lastModifiedDate":"2017-10-29"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-29"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-29"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-29"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls","lastModifiedDate":"2017-10-29"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check","lastModifiedDate":"2017-10-29"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29"}],"authorContributionMap":{"wangyiming1019":92}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-03-07"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","lastModifiedDate":"2017-01-19"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-07"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","lastModifiedDate":"2017-07-12"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;","lastModifiedDate":"2017-07-12"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-07"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","lastModifiedDate":"2016-09-21"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book.","lastModifiedDate":"2016-08-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated.","lastModifiedDate":"2016-08-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {","lastModifiedDate":"2016-08-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;","lastModifiedDate":"2017-07-12"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;","lastModifiedDate":"2017-07-12"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;","lastModifiedDate":"2017-07-12"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;","lastModifiedDate":"2017-07-12"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;","lastModifiedDate":"2017-07-12"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Every field must be present and not null.","lastModifiedDate":"2016-08-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,","lastModifiedDate":"2017-10-25"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Boolean favourite, Remark remark, Set\u003cTag\u003e tags) {","lastModifiedDate":"2017-10-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);","lastModifiedDate":"2017-07-12"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);","lastModifiedDate":"2017-07-12"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);","lastModifiedDate":"2017-07-12"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);","lastModifiedDate":"2017-07-12"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);","lastModifiedDate":"2017-10-22"},{"lineNumber":40,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list","lastModifiedDate":"2017-07-12"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));","lastModifiedDate":"2017-07-12"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson.","lastModifiedDate":"2016-12-22"},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {","lastModifiedDate":"2016-08-24"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),","lastModifiedDate":"2017-10-25"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" source.getRemark(), source.getTags());","lastModifiedDate":"2017-10-25"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setName(Name name) {","lastModifiedDate":"2016-12-13"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));","lastModifiedDate":"2017-07-12"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {","lastModifiedDate":"2017-07-12"},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name;","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-12"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public Name getName() {","lastModifiedDate":"2017-07-12"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return name.get();","lastModifiedDate":"2017-07-12"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12"},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","lastModifiedDate":"2016-12-13"},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));","lastModifiedDate":"2017-07-12"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13"},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {","lastModifiedDate":"2017-07-12"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return phone;","lastModifiedDate":"2016-08-24"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-12"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public Phone getPhone() {","lastModifiedDate":"2017-07-12"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.get();","lastModifiedDate":"2017-07-12"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12"},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","lastModifiedDate":"2016-12-13"},{"lineNumber":81,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));","lastModifiedDate":"2017-07-12"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13"},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {","lastModifiedDate":"2017-07-12"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return email;","lastModifiedDate":"2016-08-24"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":88,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":89,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-12"},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Email getEmail() {","lastModifiedDate":"2017-07-12"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return email.get();","lastModifiedDate":"2017-07-12"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12"},{"lineNumber":94,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","lastModifiedDate":"2016-12-13"},{"lineNumber":95,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));","lastModifiedDate":"2017-07-12"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13"},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {","lastModifiedDate":"2017-07-12"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return address;","lastModifiedDate":"2016-08-24"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-12"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public Address getAddress() {","lastModifiedDate":"2017-07-12"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return address.get();","lastModifiedDate":"2017-07-12"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12"},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","lastModifiedDate":"2017-10-25"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));","lastModifiedDate":"2017-10-25"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {","lastModifiedDate":"2017-10-25"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return favourite;","lastModifiedDate":"2017-10-25"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {","lastModifiedDate":"2017-10-25"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();","lastModifiedDate":"2017-10-25"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","lastModifiedDate":"2017-10-22"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));","lastModifiedDate":"2017-10-22"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {","lastModifiedDate":"2017-10-22"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {","lastModifiedDate":"2017-10-22"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark.get();","lastModifiedDate":"2017-10-22"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-03-07"},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}","lastModifiedDate":"2017-03-07"},{"lineNumber":138,"author":{"gitId":"-"},"content":" * if modification is attempted.","lastModifiedDate":"2017-03-07"},{"lineNumber":139,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-03-07"},{"lineNumber":140,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":141,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {","lastModifiedDate":"2017-03-07"},{"lineNumber":142,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());","lastModifiedDate":"2017-07-12"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12"},{"lineNumber":144,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12"},{"lineNumber":145,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {","lastModifiedDate":"2017-07-12"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return tags;","lastModifiedDate":"2017-07-12"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":148,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set.","lastModifiedDate":"2017-03-11"},{"lineNumber":151,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21"},{"lineNumber":152,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {","lastModifiedDate":"2017-03-11"},{"lineNumber":153,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));","lastModifiedDate":"2017-07-12"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":157,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24"},{"lineNumber":158,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24"},{"lineNumber":159,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls","lastModifiedDate":"2016-08-24"},{"lineNumber":160,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));","lastModifiedDate":"2016-08-24"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24"},{"lineNumber":165,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","lastModifiedDate":"2016-08-24"},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags);","lastModifiedDate":"2017-10-25"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":168,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":169,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":170,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24"},{"lineNumber":171,"author":{"gitId":"-"},"content":" return getAsText();","lastModifiedDate":"2016-09-21"},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":173,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":174,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"charlesgoh":16,"wangyiming1019":22,"-":136}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","lastModifiedDate":"2016-08-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","lastModifiedDate":"2016-08-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {","lastModifiedDate":"2016-09-21"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","lastModifiedDate":"2017-05-04"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","lastModifiedDate":"2017-05-04"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","lastModifiedDate":"2017-05-04"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-03"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","lastModifiedDate":"2016-08-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-14"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given phone number.","lastModifiedDate":"2016-08-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid.","lastModifiedDate":"2016-08-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) throws IllegalValueException {","lastModifiedDate":"2017-10-14"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {","lastModifiedDate":"2017-10-03"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-03"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-03"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-03"},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();","lastModifiedDate":"2016-10-16"},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {","lastModifiedDate":"2016-10-16"},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);","lastModifiedDate":"2016-08-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;","lastModifiedDate":"2016-10-16"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-14"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);","lastModifiedDate":"2017-10-14"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-14"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","lastModifiedDate":"2016-09-22"},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","lastModifiedDate":"2016-08-24"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);","lastModifiedDate":"2017-10-03"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-15"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";","lastModifiedDate":"2017-10-16"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return value;","lastModifiedDate":"2016-08-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","lastModifiedDate":"2016-08-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","lastModifiedDate":"2016-08-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return value.hashCode();","lastModifiedDate":"2016-08-24"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-13"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-13"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13"},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"jeffreygohkw":15,"Esilocke":6,"-":55}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-07"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-07"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","lastModifiedDate":"2017-07-12"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-07"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","lastModifiedDate":"2017-07-12"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook.","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated.","lastModifiedDate":"2016-08-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {","lastModifiedDate":"2016-08-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();","lastModifiedDate":"2017-07-12"},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();","lastModifiedDate":"2016-08-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();","lastModifiedDate":"2017-07-12"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();","lastModifiedDate":"2016-08-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();","lastModifiedDate":"2017-07-12"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();","lastModifiedDate":"2016-08-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();","lastModifiedDate":"2017-07-12"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();","lastModifiedDate":"2017-10-22"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();","lastModifiedDate":"2017-10-22"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();","lastModifiedDate":"2017-07-12"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();","lastModifiedDate":"2017-03-07"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();","lastModifiedDate":"2017-10-25"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();","lastModifiedDate":"2017-10-25"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","lastModifiedDate":"2016-09-22"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {","lastModifiedDate":"2016-08-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below","lastModifiedDate":"2016-08-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards","lastModifiedDate":"2016-08-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())","lastModifiedDate":"2016-08-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())","lastModifiedDate":"2016-08-24"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))","lastModifiedDate":"2017-10-25"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())","lastModifiedDate":"2017-10-25"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark());","lastModifiedDate":"2017-10-22"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details.","lastModifiedDate":"2016-08-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":" default String getAsText() {","lastModifiedDate":"2016-09-21"},{"lineNumber":48,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();","lastModifiedDate":"2016-08-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":" builder.append(getName())","lastModifiedDate":"2016-08-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" .append(\" Phone: \")","lastModifiedDate":"2016-09-21"},{"lineNumber":51,"author":{"gitId":"-"},"content":" .append(getPhone())","lastModifiedDate":"2016-09-21"},{"lineNumber":52,"author":{"gitId":"-"},"content":" .append(\" Email: \")","lastModifiedDate":"2016-09-21"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .append(getEmail())","lastModifiedDate":"2016-09-21"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .append(\" Address: \")","lastModifiedDate":"2016-09-21"},{"lineNumber":55,"author":{"gitId":"-"},"content":" .append(getAddress())","lastModifiedDate":"2016-09-21"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")","lastModifiedDate":"2017-10-22"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())","lastModifiedDate":"2017-10-22"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Tags: \");","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);","lastModifiedDate":"2016-09-21"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return builder.toString();","lastModifiedDate":"2016-08-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"charlesgoh":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-10-22"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-22"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-10-22"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book.","lastModifiedDate":"2017-10-22"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}","lastModifiedDate":"2017-10-22"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"public class Remark {","lastModifiedDate":"2017-10-22"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-22"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";","lastModifiedDate":"2017-10-22"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" /*","lastModifiedDate":"2017-10-22"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,","lastModifiedDate":"2017-10-22"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-10-22"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","lastModifiedDate":"2017-10-22"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-22"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public final String value;","lastModifiedDate":"2017-10-22"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-22"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark.","lastModifiedDate":"2017-10-22"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" *","lastModifiedDate":"2017-10-22"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid.","lastModifiedDate":"2017-10-22"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {","lastModifiedDate":"2017-10-22"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {","lastModifiedDate":"2017-10-22"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-22"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return;","lastModifiedDate":"2017-10-22"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {","lastModifiedDate":"2017-10-22"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","lastModifiedDate":"2017-10-22"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-22"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this(remark);","lastModifiedDate":"2017-10-22"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-22"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","lastModifiedDate":"2017-10-22"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {","lastModifiedDate":"2017-10-22"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);","lastModifiedDate":"2017-10-22"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","lastModifiedDate":"2017-10-22"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-22"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" return \"\u003cPrivate Remark\u003e\";","lastModifiedDate":"2017-10-22"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" return value;","lastModifiedDate":"2017-10-22"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-22"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-22"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls","lastModifiedDate":"2017-10-22"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","lastModifiedDate":"2017-10-22"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-22"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","lastModifiedDate":"2017-10-22"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-22"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" return isPrivate;","lastModifiedDate":"2017-10-22"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-22"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-22"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-10-22"}],"authorContributionMap":{"charlesgoh":78}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","lastModifiedDate":"2017-10-04"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","lastModifiedDate":"2017-10-04"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","lastModifiedDate":"2017-10-04"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Iterator;","lastModifiedDate":"2017-10-04"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-10-04"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","lastModifiedDate":"2017-09-01"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2016-08-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-08-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","lastModifiedDate":"2017-01-19"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","lastModifiedDate":"2016-09-22"},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","lastModifiedDate":"2016-09-22"},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","lastModifiedDate":"2016-08-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","lastModifiedDate":"2016-09-21"},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","lastModifiedDate":"2016-08-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","lastModifiedDate":"2016-10-19"},{"lineNumber":30,"author":{"gitId":"-"},"content":" // used by asObservableList()","lastModifiedDate":"2017-09-01"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);","lastModifiedDate":"2017-09-01"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-19"},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument.","lastModifiedDate":"2016-09-22"},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public boolean contains(ReadOnlyPerson toCheck) {","lastModifiedDate":"2016-08-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);","lastModifiedDate":"2017-05-15"},{"lineNumber":38,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);","lastModifiedDate":"2016-08-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Adds a person to the list.","lastModifiedDate":"2016-08-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {","lastModifiedDate":"2017-03-02"},{"lineNumber":47,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);","lastModifiedDate":"2017-05-15"},{"lineNumber":48,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {","lastModifiedDate":"2016-08-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","lastModifiedDate":"2016-08-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":" internalList.add(new Person(toAdd));","lastModifiedDate":"2017-03-02"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-13"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","lastModifiedDate":"2017-06-07"},{"lineNumber":56,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-13"},{"lineNumber":57,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","lastModifiedDate":"2017-08-07"},{"lineNumber":58,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-06-07"},{"lineNumber":59,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-13"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","lastModifiedDate":"2017-08-07"},{"lineNumber":61,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","lastModifiedDate":"2017-06-07"},{"lineNumber":62,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","lastModifiedDate":"2017-05-15"},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":64,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);","lastModifiedDate":"2017-06-07"},{"lineNumber":65,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2017-06-07"},{"lineNumber":66,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2017-06-07"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-07"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-07"},{"lineNumber":69,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","lastModifiedDate":"2017-08-05"},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","lastModifiedDate":"2016-12-13"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":73,"author":{"gitId":"-"},"content":" internalList.set(index, new Person(editedPerson));","lastModifiedDate":"2017-08-05"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13"},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13"},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list.","lastModifiedDate":"2016-08-24"},{"lineNumber":78,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":79,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","lastModifiedDate":"2016-08-24"},{"lineNumber":80,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {","lastModifiedDate":"2016-08-26"},{"lineNumber":82,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);","lastModifiedDate":"2017-05-15"},{"lineNumber":83,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","lastModifiedDate":"2016-08-24"},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {","lastModifiedDate":"2016-08-24"},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2016-08-24"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;","lastModifiedDate":"2016-08-26"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list.","lastModifiedDate":"2017-10-25"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" *","lastModifiedDate":"2017-10-25"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","lastModifiedDate":"2017-10-25"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2017-10-25"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2017-10-25"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);","lastModifiedDate":"2017-10-25"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list.","lastModifiedDate":"2017-10-25"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" *","lastModifiedDate":"2017-10-25"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","lastModifiedDate":"2017-10-25"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2017-10-25"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2017-10-25"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);","lastModifiedDate":"2017-10-25"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","lastModifiedDate":"2016-10-19"},{"lineNumber":121,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","lastModifiedDate":"2016-10-19"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-19"},{"lineNumber":123,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-19"},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","lastModifiedDate":"2016-12-24"},{"lineNumber":125,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","lastModifiedDate":"2016-12-24"},{"lineNumber":126,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {","lastModifiedDate":"2016-12-24"},{"lineNumber":127,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));","lastModifiedDate":"2016-12-24"},{"lineNumber":128,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":129,"author":{"gitId":"-"},"content":" setPersons(replacement);","lastModifiedDate":"2016-12-24"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":131,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-01"},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","lastModifiedDate":"2017-09-01"},{"lineNumber":134,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-01"},{"lineNumber":135,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {","lastModifiedDate":"2017-09-01"},{"lineNumber":136,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","lastModifiedDate":"2017-09-01"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22"},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-04"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order","lastModifiedDate":"2017-10-04"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * @param field","lastModifiedDate":"2017-10-04"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" * @param order","lastModifiedDate":"2017-10-04"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-04"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","lastModifiedDate":"2017-10-01"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","lastModifiedDate":"2017-10-01"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","lastModifiedDate":"2017-10-01"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-04"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","lastModifiedDate":"2017-10-04"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-04"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {","lastModifiedDate":"2017-10-04"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-04"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","lastModifiedDate":"2017-10-04"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().fullName.compareTo(o2.getName().fullName);","lastModifiedDate":"2017-10-04"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" };","lastModifiedDate":"2017-10-04"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {","lastModifiedDate":"2017-10-04"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-04"},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","lastModifiedDate":"2017-10-04"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","lastModifiedDate":"2017-10-04"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" };","lastModifiedDate":"2017-10-04"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {","lastModifiedDate":"2017-10-04"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-04"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","lastModifiedDate":"2017-10-04"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","lastModifiedDate":"2017-10-04"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" };","lastModifiedDate":"2017-10-04"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {","lastModifiedDate":"2017-10-04"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-04"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","lastModifiedDate":"2017-10-04"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","lastModifiedDate":"2017-10-04"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" };","lastModifiedDate":"2017-10-04"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","lastModifiedDate":"2017-10-01"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" case \"name\":","lastModifiedDate":"2017-10-01"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;","lastModifiedDate":"2017-10-01"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":","lastModifiedDate":"2017-10-01"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;","lastModifiedDate":"2017-10-01"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" case \"email\":","lastModifiedDate":"2017-10-01"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;","lastModifiedDate":"2017-10-01"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" case \"address\":","lastModifiedDate":"2017-10-01"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;","lastModifiedDate":"2017-10-01"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" default:","lastModifiedDate":"2017-10-01"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-01"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","lastModifiedDate":"2017-10-01"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","lastModifiedDate":"2017-10-01"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","lastModifiedDate":"2017-10-01"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","lastModifiedDate":"2017-10-01"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","lastModifiedDate":"2017-10-01"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","lastModifiedDate":"2017-10-01"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","lastModifiedDate":"2017-10-01"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","lastModifiedDate":"2017-10-01"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","lastModifiedDate":"2017-10-01"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","lastModifiedDate":"2017-10-01"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" default:","lastModifiedDate":"2017-10-01"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-01"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","lastModifiedDate":"2017-10-01"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","lastModifiedDate":"2017-10-01"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","lastModifiedDate":"2017-10-01"},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","lastModifiedDate":"2017-10-01"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":225,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":227,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {","lastModifiedDate":"2016-08-24"},{"lineNumber":228,"author":{"gitId":"-"},"content":" return internalList.iterator();","lastModifiedDate":"2016-08-24"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":230,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":231,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-21"},{"lineNumber":232,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-09-21"},{"lineNumber":233,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-09-21"},{"lineNumber":234,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","lastModifiedDate":"2016-09-21"},{"lineNumber":235,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","lastModifiedDate":"2017-04-14"},{"lineNumber":236,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":237,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":238,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-21"},{"lineNumber":239,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-09-21"},{"lineNumber":240,"author":{"gitId":"-"},"content":" return internalList.hashCode();","lastModifiedDate":"2016-09-21"},{"lineNumber":241,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":242,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"charlesgoh":88,"wangyiming1019":30,"-":124}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","lastModifiedDate":"2016-09-21"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","lastModifiedDate":"2016-08-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","lastModifiedDate":"2016-08-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {","lastModifiedDate":"2016-08-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";","lastModifiedDate":"2016-08-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","lastModifiedDate":"2016-08-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;","lastModifiedDate":"2016-10-19"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name.","lastModifiedDate":"2016-08-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid.","lastModifiedDate":"2016-08-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {","lastModifiedDate":"2016-08-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);","lastModifiedDate":"2017-05-15"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","lastModifiedDate":"2016-10-16"},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {","lastModifiedDate":"2016-10-16"},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2016-08-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;","lastModifiedDate":"2016-10-16"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {","lastModifiedDate":"2017-10-15"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;","lastModifiedDate":"2017-10-15"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name.","lastModifiedDate":"2016-09-22"},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {","lastModifiedDate":"2016-08-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);","lastModifiedDate":"2016-08-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","lastModifiedDate":"2016-08-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","lastModifiedDate":"2016-08-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();","lastModifiedDate":"2016-08-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","lastModifiedDate":"2016-08-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Calendar;","lastModifiedDate":"2017-10-12"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-12"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-12"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book.","lastModifiedDate":"2017-10-12"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Deadline {","lastModifiedDate":"2017-10-12"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DEADLINE_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-12"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task deadlines must be in the format DD-MM-YYYY, with \u0027-\u0027, \u0027.\u0027, \u0027.\u0027 as separators\";","lastModifiedDate":"2017-10-12"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-12"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*","lastModifiedDate":"2017-10-12"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" Deadline format: DDSMMSYYYY, in DAY-MONTH-YEAR format.","lastModifiedDate":"2017-10-12"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" S represents the separators, and can be any of these characters: - . /","lastModifiedDate":"2017-10-12"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_VALIDATION_REGEX \u003d \"\\\\d\\\\d[-./]\\\\d\\\\d[-./]\\\\d\\\\d\\\\d\\\\d.*\";","lastModifiedDate":"2017-10-12"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String DEADLINE_PERIOD_DELIMITER \u003d \".\";","lastModifiedDate":"2017-10-12"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /*","lastModifiedDate":"2017-10-12"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" Expected indexes for the separator characters","lastModifiedDate":"2017-10-12"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_1 \u003d 2;","lastModifiedDate":"2017-10-12"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_2 \u003d 5;","lastModifiedDate":"2017-10-12"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_DAY_INDEX \u003d 0;","lastModifiedDate":"2017-10-12"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_MONTH_INDEX \u003d 1;","lastModifiedDate":"2017-10-12"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_YEAR_INDEX \u003d 2;","lastModifiedDate":"2017-10-12"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public final Calendar calendar;","lastModifiedDate":"2017-10-12"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public final String value;","lastModifiedDate":"2017-10-12"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline.","lastModifiedDate":"2017-10-12"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-12"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid.","lastModifiedDate":"2017-10-12"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {","lastModifiedDate":"2017-10-12"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null) {","lastModifiedDate":"2017-10-12"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-12"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","lastModifiedDate":"2017-10-12"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-12"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } else if (deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {","lastModifiedDate":"2017-10-24"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-24"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String trimmedDeadline \u003d deadline.trim();","lastModifiedDate":"2017-10-12"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (!isValidDeadline(trimmedDeadline)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DEADLINE_CONSTRAINTS);","lastModifiedDate":"2017-10-12"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDeadline;","lastModifiedDate":"2017-10-12"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d Calendar.getInstance();","lastModifiedDate":"2017-10-12"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" calendar.clear();","lastModifiedDate":"2017-10-12"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" char separator \u003d trimmedDeadline.charAt(DEADLINE_SEPARATOR_INDEX_1);","lastModifiedDate":"2017-10-12"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d trimmedDeadline.split(Character.toString(separator));","lastModifiedDate":"2017-10-12"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","lastModifiedDate":"2017-10-12"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","lastModifiedDate":"2017-10-12"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","lastModifiedDate":"2017-10-12"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.calendar.set(year, month, day);","lastModifiedDate":"2017-10-12"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is in valid deadline format.","lastModifiedDate":"2017-10-12"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {","lastModifiedDate":"2017-10-12"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-12"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(DEADLINE_VALIDATION_REGEX)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-12"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } else if (test.charAt(DEADLINE_SEPARATOR_INDEX_1) !\u003d test.charAt(DEADLINE_SEPARATOR_INDEX_2)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-12"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-12"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return isValidDate(test);","lastModifiedDate":"2017-10-12"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date.","lastModifiedDate":"2017-10-12"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid","lastModifiedDate":"2017-10-12"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDate(String test) {","lastModifiedDate":"2017-10-12"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" Calendar testCalendar \u003d setCalendar(test);","lastModifiedDate":"2017-10-12"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-12"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" testCalendar.setLenient(false);","lastModifiedDate":"2017-10-12"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" testCalendar.getTime();","lastModifiedDate":"2017-10-12"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-12"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2017-10-12"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-12"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Returns a Calendar object that represents the given date string.","lastModifiedDate":"2017-10-12"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private static Calendar setCalendar(String date) {","lastModifiedDate":"2017-10-12"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" Calendar result \u003d Calendar.getInstance();","lastModifiedDate":"2017-10-12"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" result.clear();","lastModifiedDate":"2017-10-12"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String separator \u003d Character.toString(date.charAt(DEADLINE_SEPARATOR_INDEX_1));","lastModifiedDate":"2017-10-12"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (separator.equals(DEADLINE_PERIOD_DELIMITER)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" separator \u003d \"\\\\.\";","lastModifiedDate":"2017-10-12"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d date.split(separator);","lastModifiedDate":"2017-10-12"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","lastModifiedDate":"2017-10-12"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","lastModifiedDate":"2017-10-12"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","lastModifiedDate":"2017-10-12"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" result.set(year, month, day);","lastModifiedDate":"2017-10-12"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return result;","lastModifiedDate":"2017-10-12"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-12"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return value;","lastModifiedDate":"2017-10-12"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-12"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-12"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls","lastModifiedDate":"2017-10-12"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check","lastModifiedDate":"2017-10-12"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-12"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","lastModifiedDate":"2017-10-12"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12"}],"authorContributionMap":{"Esilocke":131}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-12"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-12"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book.","lastModifiedDate":"2017-10-12"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {","lastModifiedDate":"2017-10-12"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-12"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";","lastModifiedDate":"2017-10-12"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*","lastModifiedDate":"2017-10-12"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","lastModifiedDate":"2017-10-12"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-10-12"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","lastModifiedDate":"2017-10-12"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-12"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","lastModifiedDate":"2017-10-12"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description.","lastModifiedDate":"2017-10-12"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-12"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid.","lastModifiedDate":"2017-10-12"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {","lastModifiedDate":"2017-10-12"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {","lastModifiedDate":"2017-10-12"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-12"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-12"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();","lastModifiedDate":"2017-10-12"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);","lastModifiedDate":"2017-10-12"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;","lastModifiedDate":"2017-10-12"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description.","lastModifiedDate":"2017-10-12"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {","lastModifiedDate":"2017-10-12"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);","lastModifiedDate":"2017-10-12"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-12"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;","lastModifiedDate":"2017-10-12"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-12"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-12"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls","lastModifiedDate":"2017-10-12"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check","lastModifiedDate":"2017-10-12"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-12"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","lastModifiedDate":"2017-10-12"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12"}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-12"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-12"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book.","lastModifiedDate":"2017-10-12"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Priority {","lastModifiedDate":"2017-10-12"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-12"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 1 to 5, inclusive, where 1 represents the lowest priority\";","lastModifiedDate":"2017-10-12"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 1;","lastModifiedDate":"2017-10-12"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;","lastModifiedDate":"2017-10-12"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";","lastModifiedDate":"2017-10-12"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-12"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public final String value;","lastModifiedDate":"2017-10-12"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Validates given priority.","lastModifiedDate":"2017-10-12"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-12"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid.","lastModifiedDate":"2017-10-12"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {","lastModifiedDate":"2017-10-12"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null) {","lastModifiedDate":"2017-10-12"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-12"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-12"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();","lastModifiedDate":"2017-10-12"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-12"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Integer.parseInt(trimmedPriority);","lastModifiedDate":"2017-10-17"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2017-10-12"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","lastModifiedDate":"2017-10-12"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","lastModifiedDate":"2017-10-12"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedPriority;","lastModifiedDate":"2017-10-12"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority.","lastModifiedDate":"2017-10-12"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {","lastModifiedDate":"2017-10-12"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-12"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-12"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-12"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);","lastModifiedDate":"2017-10-12"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);","lastModifiedDate":"2017-10-12"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority","lastModifiedDate":"2017-10-12"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {","lastModifiedDate":"2017-10-12"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;","lastModifiedDate":"2017-10-12"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-12"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return value;","lastModifiedDate":"2017-10-12"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-12"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-12"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls","lastModifiedDate":"2017-10-12"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Priority) other).value)); // state check","lastModifiedDate":"2017-10-12"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-12"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","lastModifiedDate":"2017-10-12"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12"}],"authorContributionMap":{"Esilocke":83}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-23"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-23"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book.","lastModifiedDate":"2017-10-23"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {","lastModifiedDate":"2017-10-23"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();","lastModifiedDate":"2017-10-24"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();","lastModifiedDate":"2017-10-23"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();","lastModifiedDate":"2017-10-23"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();","lastModifiedDate":"2017-10-23"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();","lastModifiedDate":"2017-10-28"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();","lastModifiedDate":"2017-10-28"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();","lastModifiedDate":"2017-10-28"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {","lastModifiedDate":"2017-10-24"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();","lastModifiedDate":"2017-10-24"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())","lastModifiedDate":"2017-10-24"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")","lastModifiedDate":"2017-10-24"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())","lastModifiedDate":"2017-10-24"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")","lastModifiedDate":"2017-10-24"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())","lastModifiedDate":"2017-10-24"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")","lastModifiedDate":"2017-10-24"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .append(getPriority());","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return builder.toString();","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-24"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards","lastModifiedDate":"2017-10-24"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())","lastModifiedDate":"2017-10-24"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())","lastModifiedDate":"2017-10-24"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()));","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-23"}],"authorContributionMap":{"Esilocke":43}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","lastModifiedDate":"2017-10-24"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-17"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book.","lastModifiedDate":"2017-10-17"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-17"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {","lastModifiedDate":"2017-10-23"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;","lastModifiedDate":"2017-10-24"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;","lastModifiedDate":"2017-10-24"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;","lastModifiedDate":"2017-10-24"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;","lastModifiedDate":"2017-10-24"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority) {","lastModifiedDate":"2017-10-24"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","lastModifiedDate":"2017-10-24"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","lastModifiedDate":"2017-10-24"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","lastModifiedDate":"2017-10-24"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","lastModifiedDate":"2017-10-24"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {","lastModifiedDate":"2017-10-23"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority());","lastModifiedDate":"2017-10-24"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return taskName.get();","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {","lastModifiedDate":"2017-10-23"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return description.get();","lastModifiedDate":"2017-10-24"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {","lastModifiedDate":"2017-10-23"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return deadline.get();","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {","lastModifiedDate":"2017-10-23"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return priority.get();","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-24"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return getAsText();","lastModifiedDate":"2017-10-24"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions","lastModifiedDate":"2017-10-28"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {","lastModifiedDate":"2017-10-28"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return taskName;","lastModifiedDate":"2017-10-28"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {","lastModifiedDate":"2017-10-28"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return description;","lastModifiedDate":"2017-10-28"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {","lastModifiedDate":"2017-10-28"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return deadline;","lastModifiedDate":"2017-10-28"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {","lastModifiedDate":"2017-10-28"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return priority;","lastModifiedDate":"2017-10-28"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing","lastModifiedDate":"2017-10-24"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","lastModifiedDate":"2017-10-24"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);","lastModifiedDate":"2017-10-24"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","lastModifiedDate":"2017-10-24"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);","lastModifiedDate":"2017-10-24"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","lastModifiedDate":"2017-10-24"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);","lastModifiedDate":"2017-10-24"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","lastModifiedDate":"2017-10-24"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);","lastModifiedDate":"2017-10-24"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-24"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-24"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls","lastModifiedDate":"2017-10-24"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));","lastModifiedDate":"2017-10-24"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-28"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own","lastModifiedDate":"2017-10-28"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority);","lastModifiedDate":"2017-10-28"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12"}],"authorContributionMap":{"Esilocke":105}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-26"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-26"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-10-26"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2017-10-26"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-26"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given.","lastModifiedDate":"2017-10-26"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {","lastModifiedDate":"2017-10-26"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;","lastModifiedDate":"2017-10-26"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {","lastModifiedDate":"2017-10-26"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","lastModifiedDate":"2017-10-26"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {","lastModifiedDate":"2017-10-26"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c keywords.size(); i++) {","lastModifiedDate":"2017-10-30"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String keyword \u003d keywords.get(i);","lastModifiedDate":"2017-10-30"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)","lastModifiedDate":"2017-10-30"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {","lastModifiedDate":"2017-10-30"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-30"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-30"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-26"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-26"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls","lastModifiedDate":"2017-10-26"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)); // state check","lastModifiedDate":"2017-10-26"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-12"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-12"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-12"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book.","lastModifiedDate":"2017-10-12"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskName {","lastModifiedDate":"2017-10-24"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-12"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";","lastModifiedDate":"2017-10-12"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /*","lastModifiedDate":"2017-10-12"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","lastModifiedDate":"2017-10-12"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-10-12"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","lastModifiedDate":"2017-10-12"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public final String taskName;","lastModifiedDate":"2017-10-12"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Validates given name.","lastModifiedDate":"2017-10-12"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-12"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid.","lastModifiedDate":"2017-10-12"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","lastModifiedDate":"2017-10-12"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();","lastModifiedDate":"2017-10-12"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {","lastModifiedDate":"2017-10-12"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-10-12"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;","lastModifiedDate":"2017-10-12"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name.","lastModifiedDate":"2017-10-12"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {","lastModifiedDate":"2017-10-12"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);","lastModifiedDate":"2017-10-12"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-12"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return taskName;","lastModifiedDate":"2017-10-12"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-12"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-12"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check","lastModifiedDate":"2017-10-24"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-12"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();","lastModifiedDate":"2017-10-12"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-23"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-24"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","lastModifiedDate":"2017-10-30"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-26"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","lastModifiedDate":"2017-10-24"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2017-10-24"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-10-24"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","lastModifiedDate":"2017-10-30"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-24"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-24"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls.","lastModifiedDate":"2017-10-30"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-30"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations.","lastModifiedDate":"2017-10-30"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-30"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)","lastModifiedDate":"2017-10-30"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","lastModifiedDate":"2017-10-30"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {","lastModifiedDate":"2017-10-26"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument.","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);","lastModifiedDate":"2017-10-24"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list.","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-24"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list.","lastModifiedDate":"2017-10-24"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));","lastModifiedDate":"2017-10-24"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}.","lastModifiedDate":"2017-10-26"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list.","lastModifiedDate":"2017-10-26"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-10-26"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)","lastModifiedDate":"2017-10-26"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","lastModifiedDate":"2017-10-26"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);","lastModifiedDate":"2017-10-26"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);","lastModifiedDate":"2017-10-26"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2017-10-26"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","lastModifiedDate":"2017-10-26"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {","lastModifiedDate":"2017-10-26"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","lastModifiedDate":"2017-10-26"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));","lastModifiedDate":"2017-10-26"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-30"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list.","lastModifiedDate":"2017-10-30"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-30"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list.","lastModifiedDate":"2017-10-30"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-30"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {","lastModifiedDate":"2017-10-30"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);","lastModifiedDate":"2017-10-30"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);","lastModifiedDate":"2017-10-30"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {","lastModifiedDate":"2017-10-30"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","lastModifiedDate":"2017-10-30"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return taskFoundAndDeleted;","lastModifiedDate":"2017-10-30"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {","lastModifiedDate":"2017-10-26"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);","lastModifiedDate":"2017-10-26"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","lastModifiedDate":"2017-10-26"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();","lastModifiedDate":"2017-10-26"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {","lastModifiedDate":"2017-10-26"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));","lastModifiedDate":"2017-10-26"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);","lastModifiedDate":"2017-10-26"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-30"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","lastModifiedDate":"2017-10-30"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-30"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {","lastModifiedDate":"2017-10-30"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","lastModifiedDate":"2017-10-30"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {","lastModifiedDate":"2017-10-24"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();","lastModifiedDate":"2017-10-24"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-30"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-30"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-30"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls","lastModifiedDate":"2017-10-30"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));","lastModifiedDate":"2017-10-30"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-30"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-30"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();","lastModifiedDate":"2017-10-30"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-23"}],"authorContributionMap":{"Esilocke":124}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","lastModifiedDate":"2017-10-24"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;","lastModifiedDate":"2017-10-24"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects.","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {","lastModifiedDate":"2017-10-24"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {","lastModifiedDate":"2017-10-24"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");","lastModifiedDate":"2017-10-24"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-24"}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","lastModifiedDate":"2017-10-23"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-23"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task.","lastModifiedDate":"2017-10-23"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {","lastModifiedDate":"2017-10-23"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-23"}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","lastModifiedDate":"2016-12-20"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-20"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-03-14"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-14"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-14"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-12-20"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2016-12-20"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2016-12-20"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2016-12-20"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2016-12-20"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2016-12-20"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2016-12-20"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2016-12-20"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-22"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-14"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-20"},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-08-16"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","lastModifiedDate":"2017-08-16"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","lastModifiedDate":"2016-12-20"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","lastModifiedDate":"2016-12-20"},{"lineNumber":23,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-12-20"},{"lineNumber":24,"author":{"gitId":"-"},"content":" return new Person[] {","lastModifiedDate":"2016-12-20"},{"lineNumber":25,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),","lastModifiedDate":"2017-04-05"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,","lastModifiedDate":"2017-10-25"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"),","lastModifiedDate":"2017-10-22"},{"lineNumber":28,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),","lastModifiedDate":"2017-03-14"},{"lineNumber":29,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),","lastModifiedDate":"2017-04-05"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,","lastModifiedDate":"2017-10-25"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"),","lastModifiedDate":"2017-10-22"},{"lineNumber":32,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),","lastModifiedDate":"2017-03-14"},{"lineNumber":33,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),","lastModifiedDate":"2017-04-05"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,","lastModifiedDate":"2017-10-25"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"),","lastModifiedDate":"2017-10-22"},{"lineNumber":36,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),","lastModifiedDate":"2017-03-14"},{"lineNumber":37,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","lastModifiedDate":"2017-04-05"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,","lastModifiedDate":"2017-10-25"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"),","lastModifiedDate":"2017-10-22"},{"lineNumber":40,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),","lastModifiedDate":"2017-03-14"},{"lineNumber":41,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","lastModifiedDate":"2017-04-05"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,","lastModifiedDate":"2017-10-25"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"),","lastModifiedDate":"2017-10-22"},{"lineNumber":44,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),","lastModifiedDate":"2017-03-14"},{"lineNumber":45,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","lastModifiedDate":"2017-04-05"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,","lastModifiedDate":"2017-10-25"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"),","lastModifiedDate":"2017-10-22"},{"lineNumber":48,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))","lastModifiedDate":"2017-03-14"},{"lineNumber":49,"author":{"gitId":"-"},"content":" };","lastModifiedDate":"2016-12-20"},{"lineNumber":50,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","lastModifiedDate":"2016-12-20"},{"lineNumber":51,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);","lastModifiedDate":"2016-12-20"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-20"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","lastModifiedDate":"2016-12-20"},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-12-20"},{"lineNumber":57,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","lastModifiedDate":"2017-04-07"},{"lineNumber":58,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","lastModifiedDate":"2016-12-20"},{"lineNumber":59,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","lastModifiedDate":"2017-04-07"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return sampleAb;","lastModifiedDate":"2017-04-07"},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2016-12-20"},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","lastModifiedDate":"2016-12-20"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-14"},{"lineNumber":67,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-03-14"},{"lineNumber":68,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","lastModifiedDate":"2017-03-14"},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-03-14"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {","lastModifiedDate":"2017-03-14"},{"lineNumber":71,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2017-03-14"},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (String s : strings) {","lastModifiedDate":"2017-03-14"},{"lineNumber":73,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","lastModifiedDate":"2017-03-14"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-03-14"},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-14"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return tags;","lastModifiedDate":"2017-03-14"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-03-14"},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-14"},{"lineNumber":79,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-12-20"}],"authorContributionMap":{"charlesgoh":7,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-09-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","lastModifiedDate":"2016-09-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2016-09-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2017-01-19"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-01-19"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-04"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}.","lastModifiedDate":"2016-09-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {","lastModifiedDate":"2016-09-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file.","lastModifiedDate":"2016-09-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","lastModifiedDate":"2016-09-28"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}.","lastModifiedDate":"2016-09-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found.","lastModifiedDate":"2016-09-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format.","lastModifiedDate":"2016-09-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage.","lastModifiedDate":"2016-09-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","lastModifiedDate":"2016-09-28"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-10-01"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()","lastModifiedDate":"2016-10-01"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-10-01"},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;","lastModifiedDate":"2016-10-01"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-01"},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage.","lastModifiedDate":"2016-09-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * @param addressBook cannot be null.","lastModifiedDate":"2016-09-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem writing to the file.","lastModifiedDate":"2016-09-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","lastModifiedDate":"2016-09-28"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28"},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-10-01"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)","lastModifiedDate":"2016-10-01"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-10-01"},{"lineNumber":43,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;","lastModifiedDate":"2016-10-01"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-01"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBook(ReadOnlyAddressBook addressBook, String args) throws IOException;","lastModifiedDate":"2017-10-20"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException;","lastModifiedDate":"2017-10-20"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" void changeFilePath(String fp, UserPrefs u);","lastModifiedDate":"2017-10-04"},{"lineNumber":50,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-24"}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":3,"-":44}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-08-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-04"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;","lastModifiedDate":"2017-01-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-01-19"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2016-09-26"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","lastModifiedDate":"2016-09-23"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-23"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","lastModifiedDate":"2016-09-26"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","lastModifiedDate":"2016-09-26"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2016-09-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2016-09-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2016-09-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage.","lastModifiedDate":"2016-09-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {","lastModifiedDate":"2016-09-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);","lastModifiedDate":"2016-09-23"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;","lastModifiedDate":"2016-10-01"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;","lastModifiedDate":"2016-10-01"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {","lastModifiedDate":"2016-10-01"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();","lastModifiedDate":"2016-08-08"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;","lastModifiedDate":"2016-10-01"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;","lastModifiedDate":"2016-10-01"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-01"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-01"},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2016-09-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-02-15"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","lastModifiedDate":"2017-02-15"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();","lastModifiedDate":"2017-02-15"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-15"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-15"},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {","lastModifiedDate":"2016-09-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();","lastModifiedDate":"2016-10-01"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {","lastModifiedDate":"2016-09-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);","lastModifiedDate":"2016-10-01"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2016-09-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","lastModifiedDate":"2016-09-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();","lastModifiedDate":"2016-09-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","lastModifiedDate":"2016-10-01"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());","lastModifiedDate":"2016-10-01"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-01"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-10-01"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {","lastModifiedDate":"2016-10-01"},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);","lastModifiedDate":"2016-10-01"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);","lastModifiedDate":"2016-10-01"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":70,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","lastModifiedDate":"2016-09-24"},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());","lastModifiedDate":"2016-10-01"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-01"},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-01"},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-10-01"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","lastModifiedDate":"2016-10-01"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);","lastModifiedDate":"2016-10-01"},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);","lastModifiedDate":"2016-10-01"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-20"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","lastModifiedDate":"2017-10-20"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","lastModifiedDate":"2017-10-20"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","lastModifiedDate":"2017-10-20"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","lastModifiedDate":"2017-10-20"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","lastModifiedDate":"2017-10-20"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","lastModifiedDate":"2017-10-20"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","lastModifiedDate":"2017-10-20"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-20"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","lastModifiedDate":"2017-10-20"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","lastModifiedDate":"2017-10-20"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","lastModifiedDate":"2017-10-20"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","lastModifiedDate":"2017-10-20"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","lastModifiedDate":"2017-10-18"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath() + \"-backup.xml\");","lastModifiedDate":"2017-10-18"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-17"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-26"},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-26"},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2016-09-26"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {","lastModifiedDate":"2016-09-29"},{"lineNumber":106,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));","lastModifiedDate":"2016-09-29"},{"lineNumber":107,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-26"},{"lineNumber":108,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);","lastModifiedDate":"2016-09-29"},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-26"},{"lineNumber":110,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));","lastModifiedDate":"2016-09-26"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-26"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-26"},{"lineNumber":113,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-26"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-04"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {","lastModifiedDate":"2017-10-04"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);","lastModifiedDate":"2017-10-04"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);","lastModifiedDate":"2017-10-04"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);","lastModifiedDate":"2017-10-04"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":120,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"charlesgoh":20,"jeffreygohkw":8,"-":92}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-08-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-01-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-03-14"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-01-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-14"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","lastModifiedDate":"2017-01-19"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-01-18"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-01-18"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-01-18"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-01-18"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-01-18"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-01-19"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-23"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2016-09-21"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","lastModifiedDate":"2016-09-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","lastModifiedDate":"2016-09-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2016-08-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private String name;","lastModifiedDate":"2016-08-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-15"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":28,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2016-08-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private String phone;","lastModifiedDate":"2016-09-21"},{"lineNumber":30,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-15"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2016-08-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String email;","lastModifiedDate":"2016-09-21"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-15"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2016-08-24"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private String address;","lastModifiedDate":"2016-09-21"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-15"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","lastModifiedDate":"2017-10-13"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)","lastModifiedDate":"2017-10-25"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;","lastModifiedDate":"2017-10-25"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-25"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private String remark;","lastModifiedDate":"2017-10-23"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-23"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;","lastModifiedDate":"2017-10-23"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @XmlElement","lastModifiedDate":"2016-08-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-09-25"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","lastModifiedDate":"2016-12-22"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","lastModifiedDate":"2016-12-22"},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","lastModifiedDate":"2016-09-25"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Converts a given Person into this class for JAXB use.","lastModifiedDate":"2016-08-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","lastModifiedDate":"2016-09-25"},{"lineNumber":61,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {","lastModifiedDate":"2016-09-25"},{"lineNumber":63,"author":{"gitId":"-"},"content":" name \u003d source.getName().fullName;","lastModifiedDate":"2016-08-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":" phone \u003d source.getPhone().value;","lastModifiedDate":"2016-09-21"},{"lineNumber":65,"author":{"gitId":"-"},"content":" email \u003d source.getEmail().value;","lastModifiedDate":"2016-09-21"},{"lineNumber":66,"author":{"gitId":"-"},"content":" address \u003d source.getAddress().value;","lastModifiedDate":"2016-09-21"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" favourite \u003d source.getFavourite().toString();","lastModifiedDate":"2017-10-25"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" remark \u003d source.getRemark().value;","lastModifiedDate":"2017-10-23"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().isPrivate();","lastModifiedDate":"2017-10-13"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().isPrivate();","lastModifiedDate":"2017-10-13"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().isPrivate();","lastModifiedDate":"2017-10-13"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().isPrivate();","lastModifiedDate":"2017-10-13"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" remarkIsPrivate \u003d source.getRemark().isPrivate();","lastModifiedDate":"2017-10-23"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":76,"author":{"gitId":"-"},"content":" tagged \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-08-24"},{"lineNumber":77,"author":{"gitId":"-"},"content":" for (Tag tag : source.getTags()) {","lastModifiedDate":"2016-08-24"},{"lineNumber":78,"author":{"gitId":"-"},"content":" tagged.add(new XmlAdaptedTag(tag));","lastModifiedDate":"2016-09-25"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24"},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","lastModifiedDate":"2016-08-24"},{"lineNumber":84,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","lastModifiedDate":"2016-08-24"},{"lineNumber":86,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public Person toModelType() throws IllegalValueException {","lastModifiedDate":"2016-08-24"},{"lineNumber":88,"author":{"gitId":"-"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-08-24"},{"lineNumber":89,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag tag : tagged) {","lastModifiedDate":"2016-09-25"},{"lineNumber":90,"author":{"gitId":"-"},"content":" personTags.add(tag.toModelType());","lastModifiedDate":"2016-08-24"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-14"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;","lastModifiedDate":"2017-10-14"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-14"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;","lastModifiedDate":"2017-10-14"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-14"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;","lastModifiedDate":"2017-10-14"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-14"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;","lastModifiedDate":"2017-10-14"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" if (remarkIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-23"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" remarkIsPrivate \u003d false;","lastModifiedDate":"2017-10-23"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);","lastModifiedDate":"2017-10-13"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);","lastModifiedDate":"2017-10-13"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);","lastModifiedDate":"2017-10-13"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);","lastModifiedDate":"2017-10-13"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);","lastModifiedDate":"2017-10-23"},{"lineNumber":113,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","lastModifiedDate":"2017-03-14"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return new Person(name, phone, email, address, favourite, remark, tags);","lastModifiedDate":"2017-10-25"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":116,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24"}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":27,"wangyiming1019":6,"-":73}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","lastModifiedDate":"2017-10-24"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;","lastModifiedDate":"2017-10-24"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-24"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-24"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */","lastModifiedDate":"2017-10-24"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {","lastModifiedDate":"2017-10-24"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-24"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private String name;","lastModifiedDate":"2017-10-24"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-24"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private String description;","lastModifiedDate":"2017-10-24"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-24"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private String deadline;","lastModifiedDate":"2017-10-24"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-24"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private String priority;","lastModifiedDate":"2017-10-24"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask.","lastModifiedDate":"2017-10-24"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","lastModifiedDate":"2017-10-24"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use.","lastModifiedDate":"2017-10-24"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask","lastModifiedDate":"2017-10-24"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {","lastModifiedDate":"2017-10-24"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;","lastModifiedDate":"2017-10-24"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;","lastModifiedDate":"2017-10-24"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" priority \u003d source.getPriority().value;","lastModifiedDate":"2017-10-24"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object.","lastModifiedDate":"2017-10-24"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-24"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);","lastModifiedDate":"2017-10-24"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);","lastModifiedDate":"2017-10-24"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);","lastModifiedDate":"2017-10-24"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority);","lastModifiedDate":"2017-10-24"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-24"}],"authorContributionMap":{"Esilocke":55}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-09-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","lastModifiedDate":"2016-09-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2016-09-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","lastModifiedDate":"2016-09-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2016-09-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2016-09-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2017-01-19"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2017-01-19"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","lastModifiedDate":"2017-01-19"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-01-19"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-04"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk.","lastModifiedDate":"2016-09-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {","lastModifiedDate":"2016-09-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);","lastModifiedDate":"2016-09-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;","lastModifiedDate":"2016-09-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {","lastModifiedDate":"2016-09-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;","lastModifiedDate":"2016-09-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","lastModifiedDate":"2016-09-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;","lastModifiedDate":"2016-09-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-01-16"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","lastModifiedDate":"2017-01-16"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);","lastModifiedDate":"2017-01-16"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}","lastModifiedDate":"2016-09-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","lastModifiedDate":"2016-09-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format.","lastModifiedDate":"2016-09-24"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,","lastModifiedDate":"2016-10-12"},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {","lastModifiedDate":"2016-10-12"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","lastModifiedDate":"2017-05-15"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);","lastModifiedDate":"2016-09-24"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {","lastModifiedDate":"2016-09-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");","lastModifiedDate":"2016-09-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();","lastModifiedDate":"2016-09-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));","lastModifiedDate":"2016-09-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);","lastModifiedDate":"2016-09-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-01-16"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","lastModifiedDate":"2017-01-16"},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);","lastModifiedDate":"2017-01-16"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}","lastModifiedDate":"2016-09-24"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","lastModifiedDate":"2016-09-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","lastModifiedDate":"2016-09-24"},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);","lastModifiedDate":"2017-05-15"},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","lastModifiedDate":"2017-05-15"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);","lastModifiedDate":"2016-09-24"},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);","lastModifiedDate":"2016-09-24"},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));","lastModifiedDate":"2016-09-25"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":77,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-20"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","lastModifiedDate":"2017-10-20"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","lastModifiedDate":"2017-10-20"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","lastModifiedDate":"2017-10-20"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","lastModifiedDate":"2017-10-20"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","lastModifiedDate":"2017-10-20"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","lastModifiedDate":"2017-10-20"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","lastModifiedDate":"2017-10-20"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-20"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","lastModifiedDate":"2017-10-20"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","lastModifiedDate":"2017-10-20"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","lastModifiedDate":"2017-10-20"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","lastModifiedDate":"2017-10-20"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","lastModifiedDate":"2017-10-18"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath + \"-backup.xml\");","lastModifiedDate":"2017-10-18"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-17"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-17"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-04"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file","lastModifiedDate":"2017-10-04"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null","lastModifiedDate":"2017-10-04"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-04"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {","lastModifiedDate":"2017-10-04"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);","lastModifiedDate":"2017-10-04"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;","lastModifiedDate":"2017-10-04"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":107,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-24"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-08-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-01-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-01-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","lastModifiedDate":"2017-01-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","lastModifiedDate":"2016-08-08"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","lastModifiedDate":"2016-08-08"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2016-12-24"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-12-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-01-19"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-01-19"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-01-19"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-01-19"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","lastModifiedDate":"2016-09-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","lastModifiedDate":"2016-08-08"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {","lastModifiedDate":"2016-09-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","lastModifiedDate":"2016-08-08"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","lastModifiedDate":"2016-09-25"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement","lastModifiedDate":"2016-08-08"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","lastModifiedDate":"2016-10-19"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","lastModifiedDate":"2016-12-22"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","lastModifiedDate":"2016-12-22"},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","lastModifiedDate":"2016-10-19"},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-10-19"},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-10-19"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-28"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-19"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion","lastModifiedDate":"2016-08-08"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","lastModifiedDate":"2016-09-25"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","lastModifiedDate":"2016-10-19"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","lastModifiedDate":"2016-09-25"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","lastModifiedDate":"2016-10-19"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));","lastModifiedDate":"2017-10-28"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-01"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","lastModifiedDate":"2016-12-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {","lastModifiedDate":"2017-09-01"},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-08-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();","lastModifiedDate":"2016-08-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","lastModifiedDate":"2016-08-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();","lastModifiedDate":"2016-08-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling","lastModifiedDate":"2016-10-01"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;","lastModifiedDate":"2016-08-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","lastModifiedDate":"2016-12-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);","lastModifiedDate":"2017-09-01"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","lastModifiedDate":"2016-12-24"},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {","lastModifiedDate":"2016-12-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-10-19"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();","lastModifiedDate":"2016-10-19"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","lastModifiedDate":"2016-10-19"},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();","lastModifiedDate":"2016-10-19"},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling","lastModifiedDate":"2016-10-19"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;","lastModifiedDate":"2016-10-19"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-19"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","lastModifiedDate":"2016-12-24"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);","lastModifiedDate":"2017-09-01"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08"},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","lastModifiedDate":"2017-10-24"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {","lastModifiedDate":"2017-10-24"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();","lastModifiedDate":"2017-10-24"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","lastModifiedDate":"2017-10-24"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();","lastModifiedDate":"2017-10-24"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return null;","lastModifiedDate":"2017-10-24"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","lastModifiedDate":"2017-10-24"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);","lastModifiedDate":"2017-10-24"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":91,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"Esilocke":17,"-":74}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;","lastModifiedDate":"2017-03-02"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-06-16"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2017-06-16"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-02"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","lastModifiedDate":"2017-08-10"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;","lastModifiedDate":"2016-09-21"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-12-13"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2016-12-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;","lastModifiedDate":"2016-09-21"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2017-03-02"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2017-06-16"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;","lastModifiedDate":"2017-10-16"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","lastModifiedDate":"2017-06-16"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-21"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-21"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App.","lastModifiedDate":"2016-09-21"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2016-12-24"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";","lastModifiedDate":"2017-07-06"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";","lastModifiedDate":"2017-08-04"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";","lastModifiedDate":"2017-08-04"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \"","lastModifiedDate":"2017-10-16"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://maps.google.com/search/\";","lastModifiedDate":"2017-10-29"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";","lastModifiedDate":"2017-10-28"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \"","lastModifiedDate":"2017-10-28"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";","lastModifiedDate":"2017-10-28"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";","lastModifiedDate":"2016-12-13"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","lastModifiedDate":"2017-06-16"},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16"},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-12-13"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private WebView browser;","lastModifiedDate":"2016-12-13"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public BrowserPanel() {","lastModifiedDate":"2017-06-14"},{"lineNumber":45,"author":{"gitId":"-"},"content":" super(FXML);","lastModifiedDate":"2016-12-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-03"},{"lineNumber":47,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page.","lastModifiedDate":"2017-04-03"},{"lineNumber":48,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);","lastModifiedDate":"2017-06-14"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-02"},{"lineNumber":50,"author":{"gitId":"-"},"content":" loadDefaultPage();","lastModifiedDate":"2017-03-02"},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","lastModifiedDate":"2017-06-16"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-16"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private","lastModifiedDate":"2017-10-16"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","lastModifiedDate":"2017-10-16"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for","lastModifiedDate":"2017-10-16"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-16"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {","lastModifiedDate":"2017-06-19"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().isPrivate()) {","lastModifiedDate":"2017-10-16"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));","lastModifiedDate":"2017-10-16"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-16"},{"lineNumber":63,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().fullName.replaceAll(\" \", \"+\")","lastModifiedDate":"2017-08-04"},{"lineNumber":64,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","lastModifiedDate":"2017-08-04"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027saddress if their address is not private","lastModifiedDate":"2017-10-28"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","lastModifiedDate":"2017-10-28"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for","lastModifiedDate":"2017-10-28"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-28"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().isPrivate()) {","lastModifiedDate":"2017-10-28"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","lastModifiedDate":"2017-10-28"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-28"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","lastModifiedDate":"2017-10-28"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","lastModifiedDate":"2017-10-28"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void loadPage(String url) {","lastModifiedDate":"2016-09-21"},{"lineNumber":83,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));","lastModifiedDate":"2017-08-10"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":86,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-03-02"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * Loads a default HTML file with a background that matches the general theme.","lastModifiedDate":"2017-03-02"},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-03-02"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private void loadDefaultPage() {","lastModifiedDate":"2017-03-02"},{"lineNumber":90,"author":{"gitId":"-"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","lastModifiedDate":"2017-03-02"},{"lineNumber":91,"author":{"gitId":"-"},"content":" loadPage(defaultPage.toExternalForm());","lastModifiedDate":"2017-03-02"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-03-02"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-02"},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Frees resources allocated to the browser.","lastModifiedDate":"2016-09-21"},{"lineNumber":96,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void freeResources() {","lastModifiedDate":"2016-09-21"},{"lineNumber":98,"author":{"gitId":"-"},"content":" browser \u003d null;","lastModifiedDate":"2016-09-21"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":100,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2017-06-16"},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","lastModifiedDate":"2017-06-16"},{"lineNumber":103,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2017-06-16"},{"lineNumber":104,"author":{"gitId":"-"},"content":" loadPersonPage(event.getNewSelection().person);","lastModifiedDate":"2017-07-12"},{"lineNumber":105,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-16"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","lastModifiedDate":"2017-10-28"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","lastModifiedDate":"2017-10-28"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2017-10-28"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());","lastModifiedDate":"2017-10-28"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":112,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-21"}],"authorContributionMap":{"jeffreygohkw":37,"-":75}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;","lastModifiedDate":"2017-10-04"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;","lastModifiedDate":"2017-10-08"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-06-16"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2017-06-16"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","lastModifiedDate":"2016-12-18"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-08-26"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;","lastModifiedDate":"2016-08-18"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","lastModifiedDate":"2016-08-26"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","lastModifiedDate":"2016-12-18"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","lastModifiedDate":"2016-08-26"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","lastModifiedDate":"2016-12-18"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2016-12-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","lastModifiedDate":"2017-05-09"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;","lastModifiedDate":"2017-10-04"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","lastModifiedDate":"2016-08-18"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2017-10-04"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","lastModifiedDate":"2016-09-28"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","lastModifiedDate":"2016-09-28"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2017-06-16"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","lastModifiedDate":"2016-09-28"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","lastModifiedDate":"2017-10-03"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","lastModifiedDate":"2017-10-03"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","lastModifiedDate":"2017-06-16"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2017-10-08"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;","lastModifiedDate":"2016-12-02"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","lastModifiedDate":"2016-09-25"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-08"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2016-08-18"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;","lastModifiedDate":"2017-10-08"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;","lastModifiedDate":"2017-10-08"},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-09"},{"lineNumber":36,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-18"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","lastModifiedDate":"2016-08-18"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","lastModifiedDate":"2016-08-18"},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18"},{"lineNumber":40,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2016-12-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";","lastModifiedDate":"2017-10-02"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","lastModifiedDate":"2016-08-18"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;","lastModifiedDate":"2016-10-15"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;","lastModifiedDate":"2016-10-15"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","lastModifiedDate":"2017-06-16"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();","lastModifiedDate":"2017-10-04"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;","lastModifiedDate":"2017-10-04"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;","lastModifiedDate":"2017-10-08"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","lastModifiedDate":"2017-10-08"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Stage primaryStage;","lastModifiedDate":"2016-12-02"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Logic logic;","lastModifiedDate":"2016-09-25"},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":57,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","lastModifiedDate":"2016-08-18"},{"lineNumber":58,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","lastModifiedDate":"2016-09-21"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","lastModifiedDate":"2016-08-18"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;","lastModifiedDate":"2017-10-28"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Config config;","lastModifiedDate":"2016-09-21"},{"lineNumber":62,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","lastModifiedDate":"2017-02-25"},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":64,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-08-18"},{"lineNumber":65,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;","lastModifiedDate":"2017-05-09"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","lastModifiedDate":"2017-05-09"},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":70,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-08-18"},{"lineNumber":71,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","lastModifiedDate":"2016-08-18"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-08"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;","lastModifiedDate":"2017-10-08"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-08"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;","lastModifiedDate":"2017-10-08"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-08"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;","lastModifiedDate":"2017-10-08"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":82,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":83,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","lastModifiedDate":"2017-05-09"},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;","lastModifiedDate":"2017-10-28"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":88,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","lastModifiedDate":"2017-05-09"},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":91,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":92,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","lastModifiedDate":"2017-05-09"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","lastModifiedDate":"2016-12-24"},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(FXML);","lastModifiedDate":"2016-12-24"},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":98,"author":{"gitId":"-"},"content":" // Set dependencies","lastModifiedDate":"2016-09-21"},{"lineNumber":99,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","lastModifiedDate":"2016-12-02"},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","lastModifiedDate":"2016-09-25"},{"lineNumber":101,"author":{"gitId":"-"},"content":" this.config \u003d config;","lastModifiedDate":"2016-09-21"},{"lineNumber":102,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","lastModifiedDate":"2017-02-25"},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":104,"author":{"gitId":"-"},"content":" // Configure the UI","lastModifiedDate":"2016-09-21"},{"lineNumber":105,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","lastModifiedDate":"2016-12-24"},{"lineNumber":106,"author":{"gitId":"-"},"content":" setIcon(ICON);","lastModifiedDate":"2016-08-18"},{"lineNumber":107,"author":{"gitId":"-"},"content":" setWindowMinSize();","lastModifiedDate":"2016-08-18"},{"lineNumber":108,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","lastModifiedDate":"2016-08-18"},{"lineNumber":109,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());","lastModifiedDate":"2016-12-24"},{"lineNumber":110,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);","lastModifiedDate":"2016-08-18"},{"lineNumber":111,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":112,"author":{"gitId":"-"},"content":" setAccelerators();","lastModifiedDate":"2016-09-21"},{"lineNumber":113,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","lastModifiedDate":"2017-06-16"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":115,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":116,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","lastModifiedDate":"2016-12-24"},{"lineNumber":117,"author":{"gitId":"-"},"content":" return primaryStage;","lastModifiedDate":"2016-12-24"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void setAccelerators() {","lastModifiedDate":"2016-09-21"},{"lineNumber":121,"author":{"gitId":"-"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","lastModifiedDate":"2016-12-18"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"CTRL+O\"));","lastModifiedDate":"2017-10-08"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"CTRL+S\"));","lastModifiedDate":"2017-10-08"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));","lastModifiedDate":"2017-10-08"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-18"},{"lineNumber":126,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-18"},{"lineNumber":127,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-18"},{"lineNumber":128,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem.","lastModifiedDate":"2016-12-18"},{"lineNumber":129,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator","lastModifiedDate":"2016-12-18"},{"lineNumber":130,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-18"},{"lineNumber":131,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","lastModifiedDate":"2016-12-18"},{"lineNumber":132,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);","lastModifiedDate":"2016-12-18"},{"lineNumber":133,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-18"},{"lineNumber":134,"author":{"gitId":"-"},"content":" /*","lastModifiedDate":"2016-12-18"},{"lineNumber":135,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here","lastModifiedDate":"2016-12-18"},{"lineNumber":136,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","lastModifiedDate":"2016-12-18"},{"lineNumber":137,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK.","lastModifiedDate":"2016-12-18"},{"lineNumber":138,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-18"},{"lineNumber":139,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","lastModifiedDate":"2016-12-18"},{"lineNumber":140,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","lastModifiedDate":"2016-12-18"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","lastModifiedDate":"2016-12-18"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by","lastModifiedDate":"2016-12-18"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * the TextInputControl(s).","lastModifiedDate":"2016-12-18"},{"lineNumber":144,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-18"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open","lastModifiedDate":"2016-12-18"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is","lastModifiedDate":"2016-12-18"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay.","lastModifiedDate":"2016-12-18"},{"lineNumber":148,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-18"},{"lineNumber":149,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","lastModifiedDate":"2016-12-24"},{"lineNumber":150,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","lastModifiedDate":"2016-12-18"},{"lineNumber":151,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());","lastModifiedDate":"2016-12-18"},{"lineNumber":152,"author":{"gitId":"-"},"content":" event.consume();","lastModifiedDate":"2016-12-18"},{"lineNumber":153,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-18"},{"lineNumber":154,"author":{"gitId":"-"},"content":" });","lastModifiedDate":"2016-12-18"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":156,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-04"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself.","lastModifiedDate":"2017-10-04"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" *","lastModifiedDate":"2017-10-04"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself","lastModifiedDate":"2017-10-08"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-04"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {","lastModifiedDate":"2017-10-04"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;","lastModifiedDate":"2017-10-04"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-08"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage","lastModifiedDate":"2017-10-08"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" *","lastModifiedDate":"2017-10-08"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp","lastModifiedDate":"2017-10-08"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-08"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {","lastModifiedDate":"2017-10-08"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;","lastModifiedDate":"2017-10-08"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-08"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-08"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model","lastModifiedDate":"2017-10-08"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" *","lastModifiedDate":"2017-10-08"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp","lastModifiedDate":"2017-10-08"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-08"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {","lastModifiedDate":"2017-10-08"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;","lastModifiedDate":"2017-10-08"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-08"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window.","lastModifiedDate":"2017-08-16"},{"lineNumber":186,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":187,"author":{"gitId":"-"},"content":" void fillInnerParts() {","lastModifiedDate":"2016-09-21"},{"lineNumber":188,"author":{"gitId":"-"},"content":" browserPanel \u003d new BrowserPanel();","lastModifiedDate":"2017-06-14"},{"lineNumber":189,"author":{"gitId":"-"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","lastModifiedDate":"2017-06-14"},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-14"},{"lineNumber":191,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","lastModifiedDate":"2017-06-14"},{"lineNumber":192,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","lastModifiedDate":"2017-06-14"},{"lineNumber":193,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-14"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());","lastModifiedDate":"2017-10-28"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());","lastModifiedDate":"2017-10-28"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":197,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","lastModifiedDate":"2017-06-14"},{"lineNumber":198,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","lastModifiedDate":"2017-06-14"},{"lineNumber":199,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-14"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();","lastModifiedDate":"2017-10-19"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());","lastModifiedDate":"2017-10-19"},{"lineNumber":202,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","lastModifiedDate":"2017-06-14"},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-14"},{"lineNumber":204,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","lastModifiedDate":"2017-06-14"},{"lineNumber":205,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","lastModifiedDate":"2017-06-14"},{"lineNumber":206,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":207,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":208,"author":{"gitId":"-"},"content":" void hide() {","lastModifiedDate":"2016-10-15"},{"lineNumber":209,"author":{"gitId":"-"},"content":" primaryStage.hide();","lastModifiedDate":"2016-08-18"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":211,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":212,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {","lastModifiedDate":"2016-08-18"},{"lineNumber":213,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);","lastModifiedDate":"2016-08-18"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":215,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-02"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Sets the given image as the icon of the main window.","lastModifiedDate":"2016-12-02"},{"lineNumber":218,"author":{"gitId":"-"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}","lastModifiedDate":"2016-12-02"},{"lineNumber":219,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-02"},{"lineNumber":220,"author":{"gitId":"-"},"content":" private void setIcon(String iconSource) {","lastModifiedDate":"2016-12-02"},{"lineNumber":221,"author":{"gitId":"-"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);","lastModifiedDate":"2016-12-02"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-02"},{"lineNumber":223,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-02"},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-18"},{"lineNumber":225,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences.","lastModifiedDate":"2016-08-18"},{"lineNumber":226,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18"},{"lineNumber":227,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","lastModifiedDate":"2016-10-15"},{"lineNumber":228,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","lastModifiedDate":"2016-08-18"},{"lineNumber":229,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","lastModifiedDate":"2016-08-18"},{"lineNumber":230,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","lastModifiedDate":"2016-08-18"},{"lineNumber":231,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","lastModifiedDate":"2016-08-18"},{"lineNumber":232,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","lastModifiedDate":"2016-08-18"},{"lineNumber":233,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":235,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void setWindowMinSize() {","lastModifiedDate":"2016-08-18"},{"lineNumber":237,"author":{"gitId":"-"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);","lastModifiedDate":"2016-08-18"},{"lineNumber":238,"author":{"gitId":"-"},"content":" primaryStage.setMinWidth(MIN_WIDTH);","lastModifiedDate":"2016-08-18"},{"lineNumber":239,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":240,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":241,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-18"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window.","lastModifiedDate":"2016-08-18"},{"lineNumber":243,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18"},{"lineNumber":244,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {","lastModifiedDate":"2016-10-15"},{"lineNumber":245,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","lastModifiedDate":"2016-08-18"},{"lineNumber":246,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","lastModifiedDate":"2016-08-18"},{"lineNumber":247,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":248,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":249,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16"},{"lineNumber":250,"author":{"gitId":"-"},"content":" * Opens the help window.","lastModifiedDate":"2017-08-16"},{"lineNumber":251,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":252,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-08-18"},{"lineNumber":253,"author":{"gitId":"-"},"content":" public void handleHelp() {","lastModifiedDate":"2016-08-31"},{"lineNumber":254,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();","lastModifiedDate":"2016-12-24"},{"lineNumber":255,"author":{"gitId":"-"},"content":" helpWindow.show();","lastModifiedDate":"2016-08-18"},{"lineNumber":256,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":257,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":258,"author":{"gitId":"-"},"content":" void show() {","lastModifiedDate":"2016-10-15"},{"lineNumber":259,"author":{"gitId":"-"},"content":" primaryStage.show();","lastModifiedDate":"2016-08-18"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":261,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-03"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","lastModifiedDate":"2017-10-03"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-03"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-03"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {","lastModifiedDate":"2017-10-08"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","lastModifiedDate":"2017-10-08"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","lastModifiedDate":"2017-10-08"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","lastModifiedDate":"2017-10-08"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","lastModifiedDate":"2017-10-08"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","lastModifiedDate":"2017-10-08"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","lastModifiedDate":"2017-10-04"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","lastModifiedDate":"2017-10-04"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","lastModifiedDate":"2017-10-08"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","lastModifiedDate":"2017-10-08"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","lastModifiedDate":"2017-10-08"},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","lastModifiedDate":"2017-10-08"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","lastModifiedDate":"2017-10-08"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","lastModifiedDate":"2017-10-08"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" raise(new OpenRequestEvent());","lastModifiedDate":"2017-10-03"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-03"},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-03"},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location","lastModifiedDate":"2017-10-03"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-03"},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-03"},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {","lastModifiedDate":"2017-10-08"},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","lastModifiedDate":"2017-10-08"},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","lastModifiedDate":"2017-10-08"},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","lastModifiedDate":"2017-10-08"},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","lastModifiedDate":"2017-10-08"},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08"},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","lastModifiedDate":"2017-10-08"},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","lastModifiedDate":"2017-10-04"},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","lastModifiedDate":"2017-10-08"},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","lastModifiedDate":"2017-10-08"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","lastModifiedDate":"2017-10-08"},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","lastModifiedDate":"2017-10-08"},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-08"},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","lastModifiedDate":"2017-10-08"},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","lastModifiedDate":"2017-10-08"},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","lastModifiedDate":"2017-10-08"},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","lastModifiedDate":"2017-10-08"},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","lastModifiedDate":"2017-10-08"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","lastModifiedDate":"2017-10-08"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","lastModifiedDate":"2017-10-08"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" raise(new SaveAsRequestEvent());","lastModifiedDate":"2017-10-03"},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-03"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03"},{"lineNumber":314,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-18"},{"lineNumber":315,"author":{"gitId":"-"},"content":" * Closes the application.","lastModifiedDate":"2016-08-18"},{"lineNumber":316,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18"},{"lineNumber":317,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-08-18"},{"lineNumber":318,"author":{"gitId":"-"},"content":" private void handleExit() {","lastModifiedDate":"2016-08-18"},{"lineNumber":319,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","lastModifiedDate":"2016-08-26"},{"lineNumber":320,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":321,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-25"},{"lineNumber":322,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","lastModifiedDate":"2016-08-25"},{"lineNumber":323,"author":{"gitId":"-"},"content":" return this.personListPanel;","lastModifiedDate":"2016-08-25"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-25"},{"lineNumber":325,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {","lastModifiedDate":"2017-10-30"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;","lastModifiedDate":"2017-10-30"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30"},{"lineNumber":330,"author":{"gitId":"-"},"content":" void releaseResources() {","lastModifiedDate":"2016-10-15"},{"lineNumber":331,"author":{"gitId":"-"},"content":" browserPanel.freeResources();","lastModifiedDate":"2016-09-21"},{"lineNumber":332,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":333,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-15"},{"lineNumber":334,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2017-06-16"},{"lineNumber":335,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","lastModifiedDate":"2017-06-16"},{"lineNumber":336,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2017-06-16"},{"lineNumber":337,"author":{"gitId":"-"},"content":" handleHelp();","lastModifiedDate":"2017-06-16"},{"lineNumber":338,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-16"},{"lineNumber":339,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-18"}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":107,"Esilocke":11,"-":218}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;","lastModifiedDate":"2017-10-19"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;","lastModifiedDate":"2017-10-19"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;","lastModifiedDate":"2017-07-12"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-09-21"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","lastModifiedDate":"2016-09-21"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","lastModifiedDate":"2016-12-18"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","lastModifiedDate":"2016-09-21"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2016-12-24"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-21"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-08-16"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","lastModifiedDate":"2017-08-16"},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2016-12-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","lastModifiedDate":"2016-09-21"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later.","lastModifiedDate":"2017-10-23"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {","lastModifiedDate":"2017-10-23"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red","lastModifiedDate":"2017-10-23"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","lastModifiedDate":"2017-10-23"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();","lastModifiedDate":"2017-10-23"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":29,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-03-25"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","lastModifiedDate":"2017-03-25"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","lastModifiedDate":"2017-03-25"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","lastModifiedDate":"2017-03-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2017-03-25"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","lastModifiedDate":"2017-03-25"},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-03-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;","lastModifiedDate":"2017-07-12"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12"},{"lineNumber":39,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":40,"author":{"gitId":"-"},"content":" private HBox cardPane;","lastModifiedDate":"2016-09-21"},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private Label name;","lastModifiedDate":"2016-09-21"},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Label id;","lastModifiedDate":"2016-09-21"},{"lineNumber":45,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private Label phone;","lastModifiedDate":"2016-09-21"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private Label address;","lastModifiedDate":"2016-09-21"},{"lineNumber":49,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" private Label remark;","lastModifiedDate":"2017-10-23"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @FXML","lastModifiedDate":"2017-10-23"},{"lineNumber":52,"author":{"gitId":"-"},"content":" private Label email;","lastModifiedDate":"2016-09-21"},{"lineNumber":53,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private FlowPane tags;","lastModifiedDate":"2016-12-18"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex) {","lastModifiedDate":"2016-12-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" super(FXML);","lastModifiedDate":"2016-12-24"},{"lineNumber":58,"author":{"gitId":"-"},"content":" this.person \u003d person;","lastModifiedDate":"2017-07-12"},{"lineNumber":59,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","lastModifiedDate":"2016-09-21"},{"lineNumber":60,"author":{"gitId":"-"},"content":" initTags(person);","lastModifiedDate":"2016-12-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" bindListeners(person);","lastModifiedDate":"2017-07-12"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12"},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12"},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-12"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","lastModifiedDate":"2017-07-12"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes.","lastModifiedDate":"2017-07-12"},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-12"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {","lastModifiedDate":"2017-07-12"},{"lineNumber":69,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","lastModifiedDate":"2017-07-12"},{"lineNumber":70,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","lastModifiedDate":"2017-07-12"},{"lineNumber":71,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","lastModifiedDate":"2017-07-12"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","lastModifiedDate":"2017-10-23"},{"lineNumber":73,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","lastModifiedDate":"2017-07-12"},{"lineNumber":74,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {","lastModifiedDate":"2017-07-12"},{"lineNumber":75,"author":{"gitId":"-"},"content":" tags.getChildren().clear();","lastModifiedDate":"2017-07-12"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);","lastModifiedDate":"2017-10-23"},{"lineNumber":77,"author":{"gitId":"-"},"content":" });","lastModifiedDate":"2017-07-12"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-18"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-15"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag","lastModifiedDate":"2017-10-15"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @param tag","lastModifiedDate":"2017-10-15"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" * @return","lastModifiedDate":"2017-10-15"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-15"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" private String getTagColour(String tag) {","lastModifiedDate":"2017-10-15"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" if (!colourHash.containsKey(tag)) {","lastModifiedDate":"2017-10-15"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);","lastModifiedDate":"2017-10-23"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" String colour \u003d Colours.values()[randomiser].toString();","lastModifiedDate":"2017-10-15"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" colourHash.put(tag, colour);","lastModifiedDate":"2017-10-15"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return colourHash.get(tag);","lastModifiedDate":"2017-10-15"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-15"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-15"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Assigns each tag a colour","lastModifiedDate":"2017-10-15"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @param person","lastModifiedDate":"2017-10-15"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-15"},{"lineNumber":98,"author":{"gitId":"-"},"content":" private void initTags(ReadOnlyPerson person) {","lastModifiedDate":"2016-12-24"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" person.getTags().forEach(tag -\u003e {","lastModifiedDate":"2017-10-15"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());","lastModifiedDate":"2017-10-15"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));","lastModifiedDate":"2017-10-15"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-15"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" tags.getChildren().add(newTagLabel);","lastModifiedDate":"2017-10-15"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" });","lastModifiedDate":"2017-10-15"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-18"},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-14"},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-14"},{"lineNumber":109,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-07-14"},{"lineNumber":110,"author":{"gitId":"-"},"content":" // short circuit if same object","lastModifiedDate":"2017-07-14"},{"lineNumber":111,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-07-14"},{"lineNumber":112,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2017-07-14"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-14"},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-14"},{"lineNumber":115,"author":{"gitId":"-"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-07-14"},{"lineNumber":116,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","lastModifiedDate":"2017-07-14"},{"lineNumber":117,"author":{"gitId":"-"},"content":" return false;","lastModifiedDate":"2017-07-14"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-14"},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-14"},{"lineNumber":120,"author":{"gitId":"-"},"content":" // state check","lastModifiedDate":"2017-07-14"},{"lineNumber":121,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","lastModifiedDate":"2017-07-14"},{"lineNumber":122,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","lastModifiedDate":"2017-07-14"},{"lineNumber":123,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","lastModifiedDate":"2017-07-14"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-14"},{"lineNumber":125,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-21"}],"authorContributionMap":{"charlesgoh":31,"wangyiming1019":9,"-":85}},{"path":"src/main/java/seedu/address/ui/StatusBarFooter.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.time.Clock;","lastModifiedDate":"2017-02-14"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Date;","lastModifiedDate":"2017-01-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.controlsfx.control.StatusBar;","lastModifiedDate":"2017-01-19"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2016-09-28"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","lastModifiedDate":"2017-08-10"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-08-08"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2016-12-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-27"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","lastModifiedDate":"2016-09-27"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A ui for the status bar that is displayed at the footer of the application.","lastModifiedDate":"2016-09-28"},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class StatusBarFooter extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2016-12-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-14"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_INITIAL \u003d \"Not updated yet in this session\";","lastModifiedDate":"2017-02-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_UPDATED \u003d \"Last Updated: %s\";","lastModifiedDate":"2017-02-25"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-14"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Used to generate time stamps.","lastModifiedDate":"2017-02-14"},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2017-02-14"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * TODO: change clock to an instance variable.","lastModifiedDate":"2017-02-14"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * We leave it as a static variable because manual dependency injection","lastModifiedDate":"2017-02-14"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * will require passing down the clock reference all the way from MainApp,","lastModifiedDate":"2017-02-14"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * but it should be easier once we have factories/DI frameworks.","lastModifiedDate":"2017-02-14"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-14"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private static Clock clock \u003d Clock.systemDefaultZone();","lastModifiedDate":"2017-02-14"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-14"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StatusBarFooter.class);","lastModifiedDate":"2016-09-27"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-10"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"StatusBarFooter.fxml\";","lastModifiedDate":"2017-04-01"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01"},{"lineNumber":39,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-12-10"},{"lineNumber":40,"author":{"gitId":"-"},"content":" private StatusBar syncStatus;","lastModifiedDate":"2016-09-21"},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-12-10"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private StatusBar totalPersons;","lastModifiedDate":"2017-10-17"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" @FXML","lastModifiedDate":"2017-10-17"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private StatusBar saveLocationStatus;","lastModifiedDate":"2016-09-21"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public StatusBarFooter(String saveLocation, int initialTotalPersons) {","lastModifiedDate":"2017-10-17"},{"lineNumber":48,"author":{"gitId":"-"},"content":" super(FXML);","lastModifiedDate":"2017-04-01"},{"lineNumber":49,"author":{"gitId":"-"},"content":" setSyncStatus(SYNC_STATUS_INITIAL);","lastModifiedDate":"2017-04-01"},{"lineNumber":50,"author":{"gitId":"-"},"content":" setSaveLocation(\"./\" + saveLocation);","lastModifiedDate":"2017-04-01"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" setTotalPersons(initialTotalPersons);","lastModifiedDate":"2017-10-17"},{"lineNumber":52,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","lastModifiedDate":"2017-04-01"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-04-01"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-14"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Sets the clock used to determine the current time.","lastModifiedDate":"2017-02-14"},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-14"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public static void setClock(Clock clock) {","lastModifiedDate":"2017-02-14"},{"lineNumber":59,"author":{"gitId":"-"},"content":" StatusBarFooter.clock \u003d clock;","lastModifiedDate":"2017-02-14"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-14"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-14"},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-14"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Returns the clock currently in use.","lastModifiedDate":"2017-02-14"},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-14"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static Clock getClock() {","lastModifiedDate":"2017-02-14"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return clock;","lastModifiedDate":"2017-02-14"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-14"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-14"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void setSaveLocation(String location) {","lastModifiedDate":"2016-09-21"},{"lineNumber":70,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.saveLocationStatus.setText(location));","lastModifiedDate":"2017-08-10"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":73,"author":{"gitId":"-"},"content":" private void setSyncStatus(String status) {","lastModifiedDate":"2016-09-21"},{"lineNumber":74,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.syncStatus.setText(status));","lastModifiedDate":"2017-08-10"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":76,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":77,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2016-09-27"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent abce) {","lastModifiedDate":"2016-09-27"},{"lineNumber":79,"author":{"gitId":"-"},"content":" long now \u003d clock.millis();","lastModifiedDate":"2017-02-14"},{"lineNumber":80,"author":{"gitId":"-"},"content":" String lastUpdated \u003d new Date(now).toString();","lastModifiedDate":"2017-02-14"},{"lineNumber":81,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(abce, \"Setting last updated status to \" + lastUpdated));","lastModifiedDate":"2016-09-29"},{"lineNumber":82,"author":{"gitId":"-"},"content":" setSyncStatus(String.format(SYNC_STATUS_UPDATED, lastUpdated));","lastModifiedDate":"2017-02-25"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" this.setTotalPersons(abce.data.getPersonList().size());","lastModifiedDate":"2017-10-17"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-17"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-17"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" private void setTotalPersons(int totalPersons) {","lastModifiedDate":"2017-10-17"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" this.totalPersons.setText(totalPersons + \" person(s) listed\");","lastModifiedDate":"2017-10-17"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-27"},{"lineNumber":89,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08"}],"authorContributionMap":{"charlesgoh":9,"-":80}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","lastModifiedDate":"2017-10-28"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","lastModifiedDate":"2017-10-28"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;","lastModifiedDate":"2017-10-28"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-28"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-28"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}","lastModifiedDate":"2017-10-28"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */","lastModifiedDate":"2017-10-28"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2017-10-28"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";","lastModifiedDate":"2017-10-28"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","lastModifiedDate":"2017-10-28"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","lastModifiedDate":"2017-10-28"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;","lastModifiedDate":"2017-10-28"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;","lastModifiedDate":"2017-10-28"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","lastModifiedDate":"2017-10-28"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private Label id;","lastModifiedDate":"2017-10-28"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Label description;","lastModifiedDate":"2017-10-28"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","lastModifiedDate":"2017-10-28"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private Label priority;","lastModifiedDate":"2017-10-28"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex) {","lastModifiedDate":"2017-10-28"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" super(FXML);","lastModifiedDate":"2017-10-28"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","lastModifiedDate":"2017-10-28"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");","lastModifiedDate":"2017-10-28"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);","lastModifiedDate":"2017-10-28"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","lastModifiedDate":"2017-10-28"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","lastModifiedDate":"2017-10-28"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {","lastModifiedDate":"2017-10-28"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","lastModifiedDate":"2017-10-28"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","lastModifiedDate":"2017-10-28"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","lastModifiedDate":"2017-10-28"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","lastModifiedDate":"2017-10-28"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-28"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-28"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-28"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-28"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-28"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof TaskCard)) {","lastModifiedDate":"2017-10-28"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-28"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // state check","lastModifiedDate":"2017-10-28"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" TaskCard card \u003d (TaskCard) other;","lastModifiedDate":"2017-10-28"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return id.getText().equals(card.id.getText())","lastModifiedDate":"2017-10-28"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 task.equals(card.task);","lastModifiedDate":"2017-10-28"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-28"}],"authorContributionMap":{"Esilocke":76}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","lastModifiedDate":"2017-10-28"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","lastModifiedDate":"2017-10-28"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-10-28"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2017-10-28"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;","lastModifiedDate":"2017-10-28"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;","lastModifiedDate":"2017-10-28"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2017-10-28"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","lastModifiedDate":"2017-10-28"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","lastModifiedDate":"2017-10-28"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-28"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks.","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);","lastModifiedDate":"2017-10-28"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;","lastModifiedDate":"2017-10-28"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {","lastModifiedDate":"2017-10-28"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" super(FXML);","lastModifiedDate":"2017-10-28"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);","lastModifiedDate":"2017-10-28"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","lastModifiedDate":"2017-10-28"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {","lastModifiedDate":"2017-10-28"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map(","lastModifiedDate":"2017-10-28"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1));","lastModifiedDate":"2017-10-28"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);","lastModifiedDate":"2017-10-28"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());","lastModifiedDate":"2017-10-28"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();","lastModifiedDate":"2017-10-28"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {","lastModifiedDate":"2017-10-28"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()","lastModifiedDate":"2017-10-28"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","lastModifiedDate":"2017-10-28"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {","lastModifiedDate":"2017-10-28"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");","lastModifiedDate":"2017-10-28"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));","lastModifiedDate":"2017-10-28"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" });","lastModifiedDate":"2017-10-28"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it.","lastModifiedDate":"2017-10-28"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {","lastModifiedDate":"2017-10-28"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {","lastModifiedDate":"2017-10-28"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);","lastModifiedDate":"2017-10-28"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);","lastModifiedDate":"2017-10-28"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" });","lastModifiedDate":"2017-10-28"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Subscribe","lastModifiedDate":"2017-10-28"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","lastModifiedDate":"2017-10-28"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2017-10-28"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);","lastModifiedDate":"2017-10-28"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}.","lastModifiedDate":"2017-10-28"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {","lastModifiedDate":"2017-10-28"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {","lastModifiedDate":"2017-10-28"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);","lastModifiedDate":"2017-10-28"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {","lastModifiedDate":"2017-10-28"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);","lastModifiedDate":"2017-10-28"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" setText(null);","lastModifiedDate":"2017-10-28"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-28"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());","lastModifiedDate":"2017-10-28"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-28"}],"authorContributionMap":{"Esilocke":88}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-25"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","lastModifiedDate":"2016-09-25"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-25"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component","lastModifiedDate":"2016-09-25"},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {","lastModifiedDate":"2016-09-25"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */","lastModifiedDate":"2016-09-25"},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);","lastModifiedDate":"2016-09-25"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */","lastModifiedDate":"2016-09-25"},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();","lastModifiedDate":"2016-09-25"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */","lastModifiedDate":"2017-10-04"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();","lastModifiedDate":"2017-10-04"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-25"}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2016-08-18"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","lastModifiedDate":"2016-08-18"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","lastModifiedDate":"2016-08-18"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","lastModifiedDate":"2016-08-18"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","lastModifiedDate":"2016-08-18"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","lastModifiedDate":"2016-08-18"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2016-08-25"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","lastModifiedDate":"2016-09-23"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","lastModifiedDate":"2016-09-23"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-23"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","lastModifiedDate":"2016-09-28"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2016-09-25"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","lastModifiedDate":"2016-09-25"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2016-08-25"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-18"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","lastModifiedDate":"2016-09-25"},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","lastModifiedDate":"2016-09-25"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","lastModifiedDate":"2017-04-01"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","lastModifiedDate":"2017-06-29"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","lastModifiedDate":"2017-06-29"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","lastModifiedDate":"2017-06-29"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-29"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","lastModifiedDate":"2016-09-23"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";","lastModifiedDate":"2017-10-02"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;","lastModifiedDate":"2016-09-25"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;","lastModifiedDate":"2016-08-18"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","lastModifiedDate":"2016-08-18"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","lastModifiedDate":"2016-08-18"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","lastModifiedDate":"2016-09-25"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();","lastModifiedDate":"2016-08-18"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","lastModifiedDate":"2016-09-25"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;","lastModifiedDate":"2016-08-18"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","lastModifiedDate":"2016-08-18"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","lastModifiedDate":"2016-09-25"},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","lastModifiedDate":"2016-09-21"},{"lineNumber":50,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());","lastModifiedDate":"2016-08-18"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":52,"author":{"gitId":"-"},"content":" //Set the application icon.","lastModifiedDate":"2016-08-18"},{"lineNumber":53,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","lastModifiedDate":"2016-08-18"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-08-18"},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","lastModifiedDate":"2016-12-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","lastModifiedDate":"2016-08-18"},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","lastModifiedDate":"2016-08-18"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","lastModifiedDate":"2016-08-18"},{"lineNumber":61,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","lastModifiedDate":"2016-09-21"},{"lineNumber":62,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","lastModifiedDate":"2016-08-18"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void stop() {","lastModifiedDate":"2016-08-18"},{"lineNumber":68,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","lastModifiedDate":"2016-08-18"},{"lineNumber":69,"author":{"gitId":"-"},"content":" mainWindow.hide();","lastModifiedDate":"2016-08-18"},{"lineNumber":70,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();","lastModifiedDate":"2016-09-21"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {","lastModifiedDate":"2017-10-04"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;","lastModifiedDate":"2017-10-04"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04"},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","lastModifiedDate":"2016-09-24"},{"lineNumber":78,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","lastModifiedDate":"2016-09-24"},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","lastModifiedDate":"2017-06-29"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":82,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","lastModifiedDate":"2016-08-18"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","lastModifiedDate":"2016-08-18"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":86,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","lastModifiedDate":"2016-09-21"},{"lineNumber":87,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","lastModifiedDate":"2016-08-18"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","lastModifiedDate":"2017-08-16"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","lastModifiedDate":"2017-08-16"},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","lastModifiedDate":"2016-09-21"},{"lineNumber":95,"author":{"gitId":"-"},"content":" String contentText) {","lastModifiedDate":"2016-08-18"},{"lineNumber":96,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","lastModifiedDate":"2016-08-18"},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");","lastModifiedDate":"2016-08-20"},{"lineNumber":98,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","lastModifiedDate":"2016-08-18"},{"lineNumber":99,"author":{"gitId":"-"},"content":" alert.setTitle(title);","lastModifiedDate":"2016-08-18"},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","lastModifiedDate":"2016-08-18"},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","lastModifiedDate":"2016-08-18"},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","lastModifiedDate":"2016-10-12"},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.showAndWait();","lastModifiedDate":"2016-08-18"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18"},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","lastModifiedDate":"2017-08-16"},{"lineNumber":108,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","lastModifiedDate":"2017-08-16"},{"lineNumber":109,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16"},{"lineNumber":110,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","lastModifiedDate":"2016-09-21"},{"lineNumber":111,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","lastModifiedDate":"2016-09-21"},{"lineNumber":112,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","lastModifiedDate":"2016-08-18"},{"lineNumber":113,"author":{"gitId":"-"},"content":" Platform.exit();","lastModifiedDate":"2016-08-18"},{"lineNumber":114,"author":{"gitId":"-"},"content":" System.exit(1);","lastModifiedDate":"2016-08-18"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18"},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-25"},{"lineNumber":117,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2016-10-12"},{"lineNumber":118,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21"},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2016-09-21"},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","lastModifiedDate":"2016-09-29"},{"lineNumber":121,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2016-09-29"},{"lineNumber":122,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","lastModifiedDate":"2017-06-29"},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.exception);","lastModifiedDate":"2017-06-29"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21"},{"lineNumber":125,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-18"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":4,"-":120}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","lastModifiedDate":"2016-09-30"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","lastModifiedDate":"2017-01-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2016-09-30"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2016-09-30"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2016-09-30"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {","lastModifiedDate":"2016-09-30"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2016-09-30"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2016-09-30"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-09-30"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {","lastModifiedDate":"2016-09-30"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));","lastModifiedDate":"2017-10-02"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-30"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-09-30"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {","lastModifiedDate":"2017-05-15"},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15"},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);","lastModifiedDate":"2016-09-30"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-30"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-15"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {","lastModifiedDate":"2017-05-15"},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);","lastModifiedDate":"2017-05-15"},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");","lastModifiedDate":"2017-05-15"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-15"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-15"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {","lastModifiedDate":"2017-05-15"},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","lastModifiedDate":"2017-05-15"},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);","lastModifiedDate":"2017-05-15"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-15"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-15"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {","lastModifiedDate":"2017-05-15"},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";","lastModifiedDate":"2017-05-15"},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","lastModifiedDate":"2017-05-15"},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);","lastModifiedDate":"2017-05-15"},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);","lastModifiedDate":"2017-05-15"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-15"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-30"}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-05-12"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-05-12"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-06-22"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-06-22"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","lastModifiedDate":"2017-05-12"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-05-12"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-05-12"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-06-12"},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2017-05-12"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-05-12"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2017-05-12"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-09-01"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-17"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-05-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-05-12"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-05-04"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-05-12"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-05-12"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-05-12"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-05-12"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-10-17"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-17"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddCommandTest {","lastModifiedDate":"2017-05-12"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2017-05-12"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2017-05-12"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-12"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","lastModifiedDate":"2017-05-12"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","lastModifiedDate":"2017-10-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","lastModifiedDate":"2017-05-12"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":48,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","lastModifiedDate":"2017-05-12"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","lastModifiedDate":"2017-05-12"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","lastModifiedDate":"2017-05-12"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {","lastModifiedDate":"2017-10-24"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","lastModifiedDate":"2017-10-24"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","lastModifiedDate":"2017-10-24"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d getAddCommandForTask(validTask, modelStub).execute();","lastModifiedDate":"2017-10-24"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddCommand.MESSAGE_TASK_SUCCESS, validTask), commandResult.feedbackToUser);","lastModifiedDate":"2017-10-24"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);","lastModifiedDate":"2017-10-24"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-12"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","lastModifiedDate":"2017-05-12"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","lastModifiedDate":"2017-10-24"},{"lineNumber":68,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","lastModifiedDate":"2017-05-12"},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","lastModifiedDate":"2017-05-12"},{"lineNumber":71,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-05-12"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":73,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","lastModifiedDate":"2017-05-12"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {","lastModifiedDate":"2017-10-24"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","lastModifiedDate":"2017-10-24"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","lastModifiedDate":"2017-10-24"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);","lastModifiedDate":"2017-10-24"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_TASK);","lastModifiedDate":"2017-10-24"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" getAddCommandForTask(validTask, modelStub).execute();","lastModifiedDate":"2017-10-24"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-22"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void equals() {","lastModifiedDate":"2017-08-15"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","lastModifiedDate":"2017-06-22"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","lastModifiedDate":"2017-06-22"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();","lastModifiedDate":"2017-10-24"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();","lastModifiedDate":"2017-10-24"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":94,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);","lastModifiedDate":"2017-06-22"},{"lineNumber":95,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);","lastModifiedDate":"2017-06-22"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommand \u003d new AddCommand(paper);","lastModifiedDate":"2017-10-24"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" AddCommand addPencilCommand \u003d new AddCommand(pencil);","lastModifiedDate":"2017-10-24"},{"lineNumber":98,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22"},{"lineNumber":99,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-06-22"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","lastModifiedDate":"2017-06-22"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));","lastModifiedDate":"2017-10-24"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22"},{"lineNumber":103,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-06-22"},{"lineNumber":104,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);","lastModifiedDate":"2017-06-22"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommandCopy \u003d new AddCommand(paper);","lastModifiedDate":"2017-10-24"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","lastModifiedDate":"2017-06-22"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));","lastModifiedDate":"2017-10-24"},{"lineNumber":108,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22"},{"lineNumber":109,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-06-22"},{"lineNumber":110,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","lastModifiedDate":"2017-06-22"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));","lastModifiedDate":"2017-10-24"},{"lineNumber":112,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22"},{"lineNumber":113,"author":{"gitId":"-"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-06-22"},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","lastModifiedDate":"2017-06-22"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));","lastModifiedDate":"2017-10-24"},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false","lastModifiedDate":"2017-10-24"},{"lineNumber":118,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","lastModifiedDate":"2017-06-22"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));","lastModifiedDate":"2017-10-24"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" // add person vs add task -\u003e returns false","lastModifiedDate":"2017-10-24"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertFalse(addAliceCommand.equals(addPaperCommand));","lastModifiedDate":"2017-10-24"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-22"},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22"},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-12"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person.","lastModifiedDate":"2017-05-12"},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-12"},{"lineNumber":128,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {","lastModifiedDate":"2017-08-15"},{"lineNumber":129,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","lastModifiedDate":"2017-05-12"},{"lineNumber":130,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-07-07"},{"lineNumber":131,"author":{"gitId":"-"},"content":" return command;","lastModifiedDate":"2017-05-12"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":133,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddCommand with the details of the given person.","lastModifiedDate":"2017-10-24"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private AddCommand getAddCommandForTask(Task task, Model model) {","lastModifiedDate":"2017-10-24"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AddCommand command \u003d new AddCommand(task);","lastModifiedDate":"2017-10-24"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-24"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return command;","lastModifiedDate":"2017-10-24"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-12"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing.","lastModifiedDate":"2017-05-12"},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-12"},{"lineNumber":146,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {","lastModifiedDate":"2017-05-12"},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","lastModifiedDate":"2017-03-02"},{"lineNumber":149,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12"},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":151,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-16"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-16"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12"},{"lineNumber":158,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","lastModifiedDate":"2017-05-12"},{"lineNumber":159,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":161,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {","lastModifiedDate":"2017-10-28"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-28"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":166,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":167,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12"},{"lineNumber":168,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","lastModifiedDate":"2017-05-12"},{"lineNumber":169,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12"},{"lineNumber":170,"author":{"gitId":"-"},"content":" return null;","lastModifiedDate":"2017-05-12"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":172,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-05-12"},{"lineNumber":175,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":177,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16"},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-16"},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-16"},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":183,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12"},{"lineNumber":184,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","lastModifiedDate":"2017-06-07"},{"lineNumber":185,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","lastModifiedDate":"2017-05-12"},{"lineNumber":186,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12"},{"lineNumber":187,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":188,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":189,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-10-20"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-20"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {","lastModifiedDate":"2017-10-20"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-20"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12"},{"lineNumber":196,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","lastModifiedDate":"2017-09-01"},{"lineNumber":197,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12"},{"lineNumber":198,"author":{"gitId":"-"},"content":" return null;","lastModifiedDate":"2017-05-12"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","lastModifiedDate":"2017-06-12"},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","lastModifiedDate":"2017-10-26"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-26"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-01"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","lastModifiedDate":"2017-10-01"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-01"},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":217,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25"},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-25"},{"lineNumber":219,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":220,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-24"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25"},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25"},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-25"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","lastModifiedDate":"2017-10-24"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-24"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","lastModifiedDate":"2017-10-24"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-24"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" return null;","lastModifiedDate":"2017-10-24"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {","lastModifiedDate":"2017-10-26"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-26"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":247,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":248,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-12"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateDataException when trying to add a person or task.","lastModifiedDate":"2017-10-24"},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-12"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","lastModifiedDate":"2017-10-24"},{"lineNumber":252,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12"},{"lineNumber":253,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","lastModifiedDate":"2017-03-02"},{"lineNumber":254,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","lastModifiedDate":"2017-05-12"},{"lineNumber":255,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":256,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","lastModifiedDate":"2017-10-24"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":262,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-04"},{"lineNumber":263,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","lastModifiedDate":"2017-05-04"},{"lineNumber":264,"author":{"gitId":"-"},"content":" return new AddressBook();","lastModifiedDate":"2017-05-04"},{"lineNumber":265,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04"},{"lineNumber":266,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":267,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":268,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-12"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added.","lastModifiedDate":"2017-10-24"},{"lineNumber":270,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-12"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingObjectAdded extends ModelStub {","lastModifiedDate":"2017-10-24"},{"lineNumber":272,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-05-12"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-24"},{"lineNumber":274,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":275,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12"},{"lineNumber":276,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","lastModifiedDate":"2017-03-02"},{"lineNumber":277,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));","lastModifiedDate":"2017-03-02"},{"lineNumber":278,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":279,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));","lastModifiedDate":"2017-10-24"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":285,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-04"},{"lineNumber":286,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","lastModifiedDate":"2017-05-04"},{"lineNumber":287,"author":{"gitId":"-"},"content":" return new AddressBook();","lastModifiedDate":"2017-05-04"},{"lineNumber":288,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04"},{"lineNumber":289,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12"},{"lineNumber":290,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12"},{"lineNumber":291,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-12"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":102,"wangyiming1019":24,"-":161}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-21"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-21"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-21"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-21"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-10-21"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-10-21"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-21"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-21"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-21"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-21"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-21"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-21"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-21"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-21"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-21"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-21"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-21"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-21"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}.","lastModifiedDate":"2017-10-21"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-21"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {","lastModifiedDate":"2017-10-21"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {","lastModifiedDate":"2017-10-21"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");","lastModifiedDate":"2017-10-21"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","lastModifiedDate":"2017-10-21"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-21"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-21"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","lastModifiedDate":"2017-10-21"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-21"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");","lastModifiedDate":"2017-10-21"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","lastModifiedDate":"2017-10-21"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","lastModifiedDate":"2017-10-21"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-21"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","lastModifiedDate":"2017-10-21"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-10-21"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-21"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","lastModifiedDate":"2017-10-21"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","lastModifiedDate":"2017-10-21"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","lastModifiedDate":"2017-10-21"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","lastModifiedDate":"2017-10-21"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);","lastModifiedDate":"2017-10-21"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-21"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);","lastModifiedDate":"2017-10-21"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","lastModifiedDate":"2017-10-21"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-21"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","lastModifiedDate":"2017-10-21"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-21"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","lastModifiedDate":"2017-10-21"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-21"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","lastModifiedDate":"2017-10-21"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","lastModifiedDate":"2017-10-21"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));","lastModifiedDate":"2017-10-21"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","lastModifiedDate":"2017-10-21"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));","lastModifiedDate":"2017-10-21"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-21"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}","lastModifiedDate":"2017-10-21"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-21"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-21"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-21"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;","lastModifiedDate":"2017-10-21"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-21"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"}],"authorContributionMap":{"wangyiming1019":151}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-23"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-24"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","lastModifiedDate":"2017-10-24"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-24"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-23"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-23"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-24"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-26"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-26"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-10-24"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-23"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-23"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-23"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-10-24"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-24"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-10-24"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","lastModifiedDate":"2017-10-24"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {","lastModifiedDate":"2017-10-23"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-23"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {","lastModifiedDate":"2017-10-23"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());","lastModifiedDate":"2017-10-24"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","lastModifiedDate":"2017-10-24"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").build();","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","lastModifiedDate":"2017-10-24"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","lastModifiedDate":"2017-10-24"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","lastModifiedDate":"2017-10-24"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());","lastModifiedDate":"2017-10-24"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());","lastModifiedDate":"2017-10-24"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());","lastModifiedDate":"2017-10-24"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","lastModifiedDate":"2017-10-24"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-10-24"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();","lastModifiedDate":"2017-10-24"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);","lastModifiedDate":"2017-10-24"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());","lastModifiedDate":"2017-10-28"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","lastModifiedDate":"2017-10-24"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"false\").build();","lastModifiedDate":"2017-10-24"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","lastModifiedDate":"2017-10-24"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;","lastModifiedDate":"2017-10-24"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","lastModifiedDate":"2017-10-24"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-10-24"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","lastModifiedDate":"2017-10-24"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-24"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","lastModifiedDate":"2017-10-28"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").build();","lastModifiedDate":"2017-10-28"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);","lastModifiedDate":"2017-10-28"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);","lastModifiedDate":"2017-10-28"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-28"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","lastModifiedDate":"2017-10-28"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","lastModifiedDate":"2017-10-28"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","lastModifiedDate":"2017-10-28"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-10-24"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","lastModifiedDate":"2017-10-24"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","lastModifiedDate":"2017-10-24"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())","lastModifiedDate":"2017-10-26"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())","lastModifiedDate":"2017-10-26"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())","lastModifiedDate":"2017-10-26"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())","lastModifiedDate":"2017-10-26"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" .build();","lastModifiedDate":"2017-10-26"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());","lastModifiedDate":"2017-10-26"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);","lastModifiedDate":"2017-10-24"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);","lastModifiedDate":"2017-10-24"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")","lastModifiedDate":"2017-10-24"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();","lastModifiedDate":"2017-10-24"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);","lastModifiedDate":"2017-10-24"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-26"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","lastModifiedDate":"2017-10-24"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-10-24"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","lastModifiedDate":"2017-10-24"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-24"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")","lastModifiedDate":"2017-10-26"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();","lastModifiedDate":"2017-10-26"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);","lastModifiedDate":"2017-10-26"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);","lastModifiedDate":"2017-10-26"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);","lastModifiedDate":"2017-10-26"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-26"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","lastModifiedDate":"2017-10-26"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","lastModifiedDate":"2017-10-26"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","lastModifiedDate":"2017-10-26"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-23"}],"authorContributionMap":{"jeffreygohkw":128}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-06-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-05"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-19"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-06-08"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-06-08"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-06-08"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-06-08"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-06-08"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandTest {","lastModifiedDate":"2017-06-08"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08"},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-08"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {","lastModifiedDate":"2017-08-15"},{"lineNumber":19,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();","lastModifiedDate":"2017-06-08"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-08"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08"},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-08"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {","lastModifiedDate":"2017-08-15"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-19"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","lastModifiedDate":"2017-10-28"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-08"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08"},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-08"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}.","lastModifiedDate":"2017-07-05"},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-08"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {","lastModifiedDate":"2017-07-05"},{"lineNumber":35,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();","lastModifiedDate":"2017-06-08"},{"lineNumber":36,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-07-07"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return command;","lastModifiedDate":"2017-07-05"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-08"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-08"}],"authorContributionMap":{"Esilocke":5,"-":34}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-06-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-06-05"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","lastModifiedDate":"2017-06-05"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-07-05"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","lastModifiedDate":"2017-10-16"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-07-05"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","lastModifiedDate":"2017-10-16"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-07-05"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","lastModifiedDate":"2017-10-16"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-07-05"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","lastModifiedDate":"2017-10-16"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-24"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-23"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-07-05"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-06-05"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-07-20"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-06-05"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-06-05"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-06-05"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-06-05"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","lastModifiedDate":"2017-07-20"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-06-05"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-08-15"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","lastModifiedDate":"2017-07-05"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","lastModifiedDate":"2017-10-26"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-06-05"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands.","lastModifiedDate":"2017-06-05"},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {","lastModifiedDate":"2017-06-05"},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";","lastModifiedDate":"2017-07-05"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";","lastModifiedDate":"2017-07-05"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";","lastModifiedDate":"2017-07-05"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";","lastModifiedDate":"2017-07-05"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";","lastModifiedDate":"2017-07-05"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";","lastModifiedDate":"2017-07-05"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";","lastModifiedDate":"2017-07-05"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";","lastModifiedDate":"2017-07-05"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";","lastModifiedDate":"2017-10-23"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";","lastModifiedDate":"2017-10-23"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";","lastModifiedDate":"2017-07-05"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";","lastModifiedDate":"2017-07-05"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_FAVOURITE \u003d \"false\";","lastModifiedDate":"2017-10-25"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";","lastModifiedDate":"2017-10-20"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";","lastModifiedDate":"2017-10-24"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";","lastModifiedDate":"2017-10-24"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";","lastModifiedDate":"2017-10-24"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017\";","lastModifiedDate":"2017-10-24"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017\";","lastModifiedDate":"2017-10-24"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";","lastModifiedDate":"2017-10-24"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";","lastModifiedDate":"2017-10-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;","lastModifiedDate":"2017-10-23"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;","lastModifiedDate":"2017-07-05"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;","lastModifiedDate":"2017-07-05"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_AMY;","lastModifiedDate":"2017-10-16"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_BOB;","lastModifiedDate":"2017-10-16"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_AMY;","lastModifiedDate":"2017-10-16"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_BOB;","lastModifiedDate":"2017-10-16"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_AMY;","lastModifiedDate":"2017-10-16"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_BOB;","lastModifiedDate":"2017-10-16"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_AMY;","lastModifiedDate":"2017-10-16"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_BOB;","lastModifiedDate":"2017-10-16"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_BOB;","lastModifiedDate":"2017-10-23"},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;","lastModifiedDate":"2017-10-24"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;","lastModifiedDate":"2017-10-24"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;","lastModifiedDate":"2017-10-24"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;","lastModifiedDate":"2017-10-24"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05"},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names","lastModifiedDate":"2017-07-05"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones","lastModifiedDate":"2017-07-05"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol","lastModifiedDate":"2017-07-05"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags","lastModifiedDate":"2017-07-05"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"20-20-20000\"; // bad date format","lastModifiedDate":"2017-10-24"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds","lastModifiedDate":"2017-10-24"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";","lastModifiedDate":"2017-10-24"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05"},{"lineNumber":103,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PENCIL;","lastModifiedDate":"2017-10-26"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05"},{"lineNumber":108,"author":{"gitId":"-"},"content":" static {","lastModifiedDate":"2017-07-05"},{"lineNumber":109,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","lastModifiedDate":"2017-07-05"},{"lineNumber":110,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","lastModifiedDate":"2017-07-05"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_AMY).withFavourite(VALID_FAVOURITE)","lastModifiedDate":"2017-10-25"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-07-05"},{"lineNumber":113,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","lastModifiedDate":"2017-07-05"},{"lineNumber":114,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","lastModifiedDate":"2017-07-05"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_BOB).withFavourite(VALID_FAVOURITE)","lastModifiedDate":"2017-10-25"},{"lineNumber":116,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-25"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","lastModifiedDate":"2017-10-26"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","lastModifiedDate":"2017-10-26"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","lastModifiedDate":"2017-10-26"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)","lastModifiedDate":"2017-10-26"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","lastModifiedDate":"2017-10-26"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","lastModifiedDate":"2017-10-26"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-05"},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05"},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","lastModifiedDate":"2017-06-05"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e","lastModifiedDate":"2017-06-05"},{"lineNumber":128,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}","lastModifiedDate":"2017-06-05"},{"lineNumber":129,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05"},{"lineNumber":130,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,","lastModifiedDate":"2017-06-05"},{"lineNumber":131,"author":{"gitId":"-"},"content":" Model expectedModel) {","lastModifiedDate":"2017-08-15"},{"lineNumber":132,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":133,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","lastModifiedDate":"2017-06-05"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);","lastModifiedDate":"2017-06-05"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);","lastModifiedDate":"2017-06-05"},{"lineNumber":136,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","lastModifiedDate":"2017-08-15"},{"lineNumber":137,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);","lastModifiedDate":"2017-08-15"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":140,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","lastModifiedDate":"2017-06-05"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e","lastModifiedDate":"2017-06-05"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e","lastModifiedDate":"2017-06-05"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged","lastModifiedDate":"2017-06-05"},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05"},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {","lastModifiedDate":"2017-06-05"},{"lineNumber":148,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can","lastModifiedDate":"2017-06-05"},{"lineNumber":149,"author":{"gitId":"-"},"content":" // only do so by copying its components.","lastModifiedDate":"2017-06-05"},{"lineNumber":150,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());","lastModifiedDate":"2017-06-05"},{"lineNumber":151,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());","lastModifiedDate":"2017-06-05"},{"lineNumber":152,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":153,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-06-05"},{"lineNumber":154,"author":{"gitId":"-"},"content":" command.execute();","lastModifiedDate":"2017-06-05"},{"lineNumber":155,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","lastModifiedDate":"2017-06-05"},{"lineNumber":156,"author":{"gitId":"-"},"content":" } catch (CommandException e) {","lastModifiedDate":"2017-06-05"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());","lastModifiedDate":"2017-06-05"},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());","lastModifiedDate":"2017-06-05"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());","lastModifiedDate":"2017-06-05"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-20"},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-20"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book.","lastModifiedDate":"2017-07-20"},{"lineNumber":165,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-20"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {","lastModifiedDate":"2017-07-20"},{"lineNumber":167,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);","lastModifiedDate":"2017-07-20"},{"lineNumber":168,"author":{"gitId":"-"},"content":" final String[] splitName \u003d person.getName().fullName.split(\"\\\\s+\");","lastModifiedDate":"2017-07-20"},{"lineNumber":169,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));","lastModifiedDate":"2017-07-20"},{"lineNumber":170,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-20"},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;","lastModifiedDate":"2017-07-20"},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-20"},{"lineNumber":173,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":174,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":175,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","lastModifiedDate":"2017-05-04"},{"lineNumber":176,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-04"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {","lastModifiedDate":"2017-08-15"},{"lineNumber":178,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","lastModifiedDate":"2017-05-04"},{"lineNumber":179,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":180,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);","lastModifiedDate":"2017-05-04"},{"lineNumber":181,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-08-15"},{"lineNumber":182,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","lastModifiedDate":"2017-08-15"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04"},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","lastModifiedDate":"2017-10-25"},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {","lastModifiedDate":"2017-10-25"},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);","lastModifiedDate":"2017-10-25"},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25"},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);","lastModifiedDate":"2017-10-25"},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-25"},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","lastModifiedDate":"2017-10-25"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":197,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-05"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":12,"Esilocke":34,"wangyiming1019":15,"-":129}},{"path":"src/test/java/seedu/address/logic/commands/DeleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-06-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-06-27"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-06-05"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-07-05"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-05"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-07-20"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-08-05"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-19"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-06-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-06-05"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-06-05"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-06-05"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-06-05"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-06-05"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-06-05"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-06-05"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-06-05"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeleteCommand}.","lastModifiedDate":"2017-06-05"},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05"},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class DeleteCommandTest {","lastModifiedDate":"2017-06-05"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-19"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-05"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-06-05"},{"lineNumber":32,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-06-05"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":35,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","lastModifiedDate":"2017-06-05"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":37,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-06-05"},{"lineNumber":38,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","lastModifiedDate":"2017-06-05"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-05"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","lastModifiedDate":"2017-06-05"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-06-05"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-07-05"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-05"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","lastModifiedDate":"2017-06-05"},{"lineNumber":53,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-06-05"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-06-05"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":58,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","lastModifiedDate":"2017-06-05"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":60,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-06-05"},{"lineNumber":61,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","lastModifiedDate":"2017-06-05"},{"lineNumber":62,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);","lastModifiedDate":"2017-06-05"},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-05"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","lastModifiedDate":"2017-08-15"},{"lineNumber":69,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-06-05"},{"lineNumber":70,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":71,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-06-05"},{"lineNumber":72,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","lastModifiedDate":"2017-06-05"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-06-05"},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":76,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-07-05"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void equals() {","lastModifiedDate":"2017-06-27"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommand \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteSecondCommand \u003d new DeleteCommand(INDEX_SECOND_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":85,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-06-27"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","lastModifiedDate":"2017-06-27"},{"lineNumber":87,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":88,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-06-27"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommandCopy \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","lastModifiedDate":"2017-06-27"},{"lineNumber":91,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":92,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-06-27"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));","lastModifiedDate":"2017-06-27"},{"lineNumber":94,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":95,"author":{"gitId":"-"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-06-27"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));","lastModifiedDate":"2017-06-27"},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":98,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-06-27"},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","lastModifiedDate":"2017-06-27"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns a {@code DeleteCommand} with the parameter {@code index}.","lastModifiedDate":"2017-06-05"},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" private DeleteCommand prepareCommand(Index index, int type) {","lastModifiedDate":"2017-10-24"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(index, type);","lastModifiedDate":"2017-10-24"},{"lineNumber":107,"author":{"gitId":"-"},"content":" deleteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-07-07"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return deleteCommand;","lastModifiedDate":"2017-06-05"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":111,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05"},{"lineNumber":112,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one.","lastModifiedDate":"2017-06-05"},{"lineNumber":113,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05"},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {","lastModifiedDate":"2017-06-05"},{"lineNumber":115,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);","lastModifiedDate":"2017-06-12"},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":117,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();","lastModifiedDate":"2017-06-05"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":119,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-05"}],"authorContributionMap":{"Esilocke":10,"-":109}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-21"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-21"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-21"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-21"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-10-21"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-10-21"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-21"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-21"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-21"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-21"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-21"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-21"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-21"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-21"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-21"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-21"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-21"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-21"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}.","lastModifiedDate":"2017-10-21"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-21"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {","lastModifiedDate":"2017-10-21"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","lastModifiedDate":"2017-10-21"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-21"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","lastModifiedDate":"2017-10-21"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","lastModifiedDate":"2017-10-21"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-21"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-21"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","lastModifiedDate":"2017-10-21"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-21"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","lastModifiedDate":"2017-10-21"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-10-21"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-21"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","lastModifiedDate":"2017-10-21"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","lastModifiedDate":"2017-10-21"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","lastModifiedDate":"2017-10-21"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","lastModifiedDate":"2017-10-21"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");","lastModifiedDate":"2017-10-21"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","lastModifiedDate":"2017-10-21"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","lastModifiedDate":"2017-10-21"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","lastModifiedDate":"2017-10-21"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);","lastModifiedDate":"2017-10-21"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-21"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);","lastModifiedDate":"2017-10-21"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","lastModifiedDate":"2017-10-21"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-21"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","lastModifiedDate":"2017-10-21"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-21"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","lastModifiedDate":"2017-10-21"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-21"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","lastModifiedDate":"2017-10-21"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","lastModifiedDate":"2017-10-21"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));","lastModifiedDate":"2017-10-21"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","lastModifiedDate":"2017-10-21"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));","lastModifiedDate":"2017-10-21"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-21"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}","lastModifiedDate":"2017-10-21"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-21"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {","lastModifiedDate":"2017-10-21"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);","lastModifiedDate":"2017-10-21"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-21"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;","lastModifiedDate":"2017-10-21"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-21"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"}],"authorContributionMap":{"wangyiming1019":164}},{"path":"src/test/java/seedu/address/logic/commands/EditCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-05-08"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-05-08"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-05-08"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-07-05"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-07-05"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-05"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-07-20"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-08-05"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-19"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-05-08"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-05-04"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-05-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","lastModifiedDate":"2017-05-08"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-05-04"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-05-04"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-05-04"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-05-04"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-10-16"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-10-16"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-05-04"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-10-16"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-05-04"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-28"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","lastModifiedDate":"2017-05-22"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-05-04"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-05-04"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditCommand.","lastModifiedDate":"2017-05-04"},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-04"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class EditCommandTest {","lastModifiedDate":"2017-05-08"},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-19"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-04"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-05-18"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();","lastModifiedDate":"2017-05-26"},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();","lastModifiedDate":"2017-06-05"},{"lineNumber":50,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);","lastModifiedDate":"2017-05-25"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":52,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","lastModifiedDate":"2017-05-04"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-06-05"},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","lastModifiedDate":"2017-06-05"},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-04"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-05-18"},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","lastModifiedDate":"2017-05-18"},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","lastModifiedDate":"2017-05-18"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","lastModifiedDate":"2017-05-18"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-05-18"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();","lastModifiedDate":"2017-05-18"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","lastModifiedDate":"2017-05-18"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();","lastModifiedDate":"2017-05-18"},{"lineNumber":72,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(indexLastPerson, descriptor);","lastModifiedDate":"2017-05-18"},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","lastModifiedDate":"2017-05-18"},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-05-18"},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);","lastModifiedDate":"2017-05-18"},{"lineNumber":78,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-18"},{"lineNumber":80,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-18"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","lastModifiedDate":"2017-05-18"},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-07-20"},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-05-18"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();","lastModifiedDate":"2017-05-18"},{"lineNumber":87,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","lastModifiedDate":"2017-05-18"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","lastModifiedDate":"2017-05-18"},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":90,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","lastModifiedDate":"2017-05-18"},{"lineNumber":91,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-05-18"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","lastModifiedDate":"2017-05-18"},{"lineNumber":94,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-18"},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {","lastModifiedDate":"2017-10-29"},{"lineNumber":100,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-16"},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":102,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-10-16"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);","lastModifiedDate":"2017-10-16"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();","lastModifiedDate":"2017-10-16"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);","lastModifiedDate":"2017-10-16"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();","lastModifiedDate":"2017-10-16"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);","lastModifiedDate":"2017-10-16"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();","lastModifiedDate":"2017-10-16"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);","lastModifiedDate":"2017-10-16"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();","lastModifiedDate":"2017-10-16"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);","lastModifiedDate":"2017-10-28"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();","lastModifiedDate":"2017-10-28"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":118,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","lastModifiedDate":"2017-10-16"},{"lineNumber":119,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","lastModifiedDate":"2017-10-16"},{"lineNumber":120,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","lastModifiedDate":"2017-10-28"},{"lineNumber":122,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":123,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-10-16"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);","lastModifiedDate":"2017-10-16"},{"lineNumber":125,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","lastModifiedDate":"2017-10-28"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);","lastModifiedDate":"2017-10-16"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);","lastModifiedDate":"2017-10-16"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);","lastModifiedDate":"2017-10-16"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);","lastModifiedDate":"2017-10-16"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);","lastModifiedDate":"2017-10-28"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);","lastModifiedDate":"2017-10-16"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);","lastModifiedDate":"2017-10-16"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);","lastModifiedDate":"2017-10-16"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);","lastModifiedDate":"2017-10-16"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);","lastModifiedDate":"2017-10-28"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-29"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {","lastModifiedDate":"2017-10-29"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());","lastModifiedDate":"2017-10-29"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","lastModifiedDate":"2017-10-29"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","lastModifiedDate":"2017-10-29"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":149,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":150,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-18"},{"lineNumber":151,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {","lastModifiedDate":"2017-08-15"},{"lineNumber":152,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));","lastModifiedDate":"2017-05-25"},{"lineNumber":153,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();","lastModifiedDate":"2017-06-05"},{"lineNumber":154,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);","lastModifiedDate":"2017-05-25"},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-07-05"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04"},{"lineNumber":158,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-04"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {","lastModifiedDate":"2017-08-15"},{"lineNumber":161,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-07-20"},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":163,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book","lastModifiedDate":"2017-05-18"},{"lineNumber":164,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());","lastModifiedDate":"2017-05-18"},{"lineNumber":165,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","lastModifiedDate":"2017-05-18"},{"lineNumber":166,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());","lastModifiedDate":"2017-05-18"},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":168,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-07-05"},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-18"},{"lineNumber":170,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":171,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-18"},{"lineNumber":172,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","lastModifiedDate":"2017-08-15"},{"lineNumber":173,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-05-18"},{"lineNumber":174,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();","lastModifiedDate":"2017-05-22"},{"lineNumber":175,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","lastModifiedDate":"2017-05-25"},{"lineNumber":176,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-07-05"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04"},{"lineNumber":179,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":180,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-18"},{"lineNumber":181,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,","lastModifiedDate":"2017-05-18"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * but smaller than size of address book","lastModifiedDate":"2017-05-18"},{"lineNumber":183,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-18"},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-18"},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","lastModifiedDate":"2017-08-15"},{"lineNumber":186,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-07-20"},{"lineNumber":187,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-05-18"},{"lineNumber":188,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","lastModifiedDate":"2017-05-18"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-05-18"},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":191,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex,","lastModifiedDate":"2017-05-18"},{"lineNumber":192,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","lastModifiedDate":"2017-05-18"},{"lineNumber":193,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-07-05"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-18"},{"lineNumber":196,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18"},{"lineNumber":197,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-08"},{"lineNumber":198,"author":{"gitId":"-"},"content":" public void equals() {","lastModifiedDate":"2017-05-08"},{"lineNumber":199,"author":{"gitId":"-"},"content":" final EditCommand standardCommand \u003d new EditCommand(INDEX_FIRST_PERSON, DESC_AMY);","lastModifiedDate":"2017-05-25"},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":201,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-05-08"},{"lineNumber":202,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);","lastModifiedDate":"2017-05-08"},{"lineNumber":203,"author":{"gitId":"-"},"content":" EditCommand commandWithSameValues \u003d new EditCommand(INDEX_FIRST_PERSON, copyDescriptor);","lastModifiedDate":"2017-05-25"},{"lineNumber":204,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","lastModifiedDate":"2017-05-08"},{"lineNumber":205,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":206,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-05-08"},{"lineNumber":207,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","lastModifiedDate":"2017-05-08"},{"lineNumber":208,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":209,"author":{"gitId":"-"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-05-08"},{"lineNumber":210,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","lastModifiedDate":"2017-05-08"},{"lineNumber":211,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":212,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-05-08"},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","lastModifiedDate":"2017-05-08"},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":215,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","lastModifiedDate":"2017-05-08"},{"lineNumber":216,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_SECOND_PERSON, DESC_AMY)));","lastModifiedDate":"2017-05-25"},{"lineNumber":217,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08"},{"lineNumber":218,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false","lastModifiedDate":"2017-05-08"},{"lineNumber":219,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_BOB)));","lastModifiedDate":"2017-05-25"},{"lineNumber":220,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-08"},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04"},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-22"},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns an {@code EditCommand} with parameters {@code index} and {@code descriptor}","lastModifiedDate":"2017-05-25"},{"lineNumber":224,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-22"},{"lineNumber":225,"author":{"gitId":"-"},"content":" private EditCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {","lastModifiedDate":"2017-05-25"},{"lineNumber":226,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d new EditCommand(index, descriptor);","lastModifiedDate":"2017-05-25"},{"lineNumber":227,"author":{"gitId":"-"},"content":" editCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-07-07"},{"lineNumber":228,"author":{"gitId":"-"},"content":" return editCommand;","lastModifiedDate":"2017-05-22"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-22"},{"lineNumber":230,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-08"}],"authorContributionMap":{"jeffreygohkw":47,"-":183}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-20"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;","lastModifiedDate":"2017-10-20"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-10-20"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-10-20"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-20"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-10-20"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;","lastModifiedDate":"2017-10-20"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;","lastModifiedDate":"2017-10-20"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","lastModifiedDate":"2017-10-20"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-20"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-20"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-20"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-20"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-20"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-20"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-20"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-20"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-10-20"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-20"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-20"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-20"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-20"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-20"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-20"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-20"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-10-20"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {","lastModifiedDate":"2017-10-20"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-20"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent() throws IllegalValueException {","lastModifiedDate":"2017-10-20"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";","lastModifiedDate":"2017-10-20"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);","lastModifiedDate":"2017-10-20"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);","lastModifiedDate":"2017-10-20"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);","lastModifiedDate":"2017-10-20"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book","lastModifiedDate":"2017-10-20"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","lastModifiedDate":"2017-10-20"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags","lastModifiedDate":"2017-10-20"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","lastModifiedDate":"2017-10-20"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag","lastModifiedDate":"2017-10-20"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);","lastModifiedDate":"2017-10-20"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-20"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset() throws IllegalValueException, PersonNotFoundException {","lastModifiedDate":"2017-10-20"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","lastModifiedDate":"2017-10-20"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","lastModifiedDate":"2017-10-20"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);","lastModifiedDate":"2017-10-20"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);","lastModifiedDate":"2017-10-20"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects","lastModifiedDate":"2017-10-20"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-20"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));","lastModifiedDate":"2017-10-20"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));","lastModifiedDate":"2017-10-20"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);","lastModifiedDate":"2017-10-20"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-20"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-20"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll() throws IllegalValueException, PersonNotFoundException {","lastModifiedDate":"2017-10-20"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","lastModifiedDate":"2017-10-20"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","lastModifiedDate":"2017-10-20"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);","lastModifiedDate":"2017-10-20"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","lastModifiedDate":"2017-10-20"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects","lastModifiedDate":"2017-10-20"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-20"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {","lastModifiedDate":"2017-10-20"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));","lastModifiedDate":"2017-10-20"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);","lastModifiedDate":"2017-10-20"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-20"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */","lastModifiedDate":"2017-10-20"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {","lastModifiedDate":"2017-10-20"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);","lastModifiedDate":"2017-10-20"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);","lastModifiedDate":"2017-10-20"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);","lastModifiedDate":"2017-10-20"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-20"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;","lastModifiedDate":"2017-10-20"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */","lastModifiedDate":"2017-10-20"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public AddressBook prepareAddressBook() throws DuplicatePersonException {","lastModifiedDate":"2017-10-20"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")","lastModifiedDate":"2017-10-20"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","lastModifiedDate":"2017-10-20"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")","lastModifiedDate":"2017-10-20"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-20"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")","lastModifiedDate":"2017-10-20"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","lastModifiedDate":"2017-10-20"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")","lastModifiedDate":"2017-10-20"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-20"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));","lastModifiedDate":"2017-10-20"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();","lastModifiedDate":"2017-10-20"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {","lastModifiedDate":"2017-10-20"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);","lastModifiedDate":"2017-10-20"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;","lastModifiedDate":"2017-10-20"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-20"}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-26"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-26"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-26"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","lastModifiedDate":"2017-10-26"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-26"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","lastModifiedDate":"2017-10-26"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","lastModifiedDate":"2017-10-26"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {","lastModifiedDate":"2017-10-26"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-26"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void equals() {","lastModifiedDate":"2017-10-26"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-26"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);","lastModifiedDate":"2017-10-26"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));","lastModifiedDate":"2017-10-26"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-26"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));","lastModifiedDate":"2017-10-26"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-26"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));","lastModifiedDate":"2017-10-26"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-26"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));","lastModifiedDate":"2017-10-26"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false","lastModifiedDate":"2017-10-26"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));","lastModifiedDate":"2017-10-26"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false","lastModifiedDate":"2017-10-26"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)","lastModifiedDate":"2017-10-26"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","lastModifiedDate":"2017-10-26"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","lastModifiedDate":"2017-10-26"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false","lastModifiedDate":"2017-10-26"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();","lastModifiedDate":"2017-10-26"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","lastModifiedDate":"2017-10-26"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false","lastModifiedDate":"2017-10-26"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();","lastModifiedDate":"2017-10-26"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","lastModifiedDate":"2017-10-26"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false","lastModifiedDate":"2017-10-26"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();","lastModifiedDate":"2017-10-26"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","lastModifiedDate":"2017-10-26"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26"}],"authorContributionMap":{"Esilocke":54}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-25"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","lastModifiedDate":"2017-10-25"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))","lastModifiedDate":"2017-10-25"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();","lastModifiedDate":"2017-10-25"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-10-25"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();","lastModifiedDate":"2017-10-25"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","lastModifiedDate":"2017-10-25"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-25"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-25"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);","lastModifiedDate":"2017-10-25"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-25"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","lastModifiedDate":"2017-10-25"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-25"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-25"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","lastModifiedDate":"2017-10-25"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-25"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));","lastModifiedDate":"2017-10-25"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-25"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","lastModifiedDate":"2017-10-25"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-25"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","lastModifiedDate":"2017-10-25"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-10-25"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","lastModifiedDate":"2017-10-25"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}.","lastModifiedDate":"2017-10-25"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {","lastModifiedDate":"2017-10-25"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);","lastModifiedDate":"2017-10-25"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-25"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":77}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Before","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();","lastModifiedDate":"2017-10-25"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-25"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {","lastModifiedDate":"2017-10-25"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","lastModifiedDate":"2017-10-25"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-25"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {","lastModifiedDate":"2017-10-25"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","lastModifiedDate":"2017-10-25"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);","lastModifiedDate":"2017-10-25"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);","lastModifiedDate":"2017-10-25"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","lastModifiedDate":"2017-10-25"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-25"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":46}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-29"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-29"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-29"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-29"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","lastModifiedDate":"2017-10-29"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","lastModifiedDate":"2017-10-29"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","lastModifiedDate":"2017-10-29"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","lastModifiedDate":"2017-10-29"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","lastModifiedDate":"2017-10-29"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","lastModifiedDate":"2017-10-29"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","lastModifiedDate":"2017-10-29"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;","lastModifiedDate":"2017-10-29"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-29"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-29"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","lastModifiedDate":"2017-10-29"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-29"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-29"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-29"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-29"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-10-29"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-29"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-29"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-29"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-29"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-29"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}.","lastModifiedDate":"2017-10-29"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {","lastModifiedDate":"2017-10-29"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-29"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","lastModifiedDate":"2017-10-29"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d","lastModifiedDate":"2017-10-29"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));","lastModifiedDate":"2017-10-29"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d","lastModifiedDate":"2017-10-29"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));","lastModifiedDate":"2017-10-29"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);","lastModifiedDate":"2017-10-29"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);","lastModifiedDate":"2017-10-29"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-29"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","lastModifiedDate":"2017-10-29"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-29"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);","lastModifiedDate":"2017-10-29"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","lastModifiedDate":"2017-10-29"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-29"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));","lastModifiedDate":"2017-10-29"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-29"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));","lastModifiedDate":"2017-10-29"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-10-29"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","lastModifiedDate":"2017-10-29"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {","lastModifiedDate":"2017-10-29"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","lastModifiedDate":"2017-10-29"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");","lastModifiedDate":"2017-10-29"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","lastModifiedDate":"2017-10-29"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {","lastModifiedDate":"2017-10-29"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","lastModifiedDate":"2017-10-29"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");","lastModifiedDate":"2017-10-29"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","lastModifiedDate":"2017-10-29"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {","lastModifiedDate":"2017-10-29"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","lastModifiedDate":"2017-10-29"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");","lastModifiedDate":"2017-10-29"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","lastModifiedDate":"2017-10-29"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}.","lastModifiedDate":"2017-10-29"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {","lastModifiedDate":"2017-10-29"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d","lastModifiedDate":"2017-10-29"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","lastModifiedDate":"2017-10-29"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-29"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" return command;","lastModifiedDate":"2017-10-29"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","lastModifiedDate":"2017-10-29"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","lastModifiedDate":"2017-10-29"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,","lastModifiedDate":"2017-10-29"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","lastModifiedDate":"2017-10-29"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","lastModifiedDate":"2017-10-29"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();","lastModifiedDate":"2017-10-29"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","lastModifiedDate":"2017-10-29"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","lastModifiedDate":"2017-10-29"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","lastModifiedDate":"2017-10-29"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29"}],"authorContributionMap":{"wangyiming1019":110}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-28"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-28"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","lastModifiedDate":"2017-10-28"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-28"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-28"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-28"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","lastModifiedDate":"2017-10-28"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","lastModifiedDate":"2017-10-28"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-28"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-28"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","lastModifiedDate":"2017-10-28"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-28"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-28"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}.","lastModifiedDate":"2017-10-28"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {","lastModifiedDate":"2017-10-28"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","lastModifiedDate":"2017-10-28"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","lastModifiedDate":"2017-10-28"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","lastModifiedDate":"2017-10-28"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @Before","lastModifiedDate":"2017-10-28"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","lastModifiedDate":"2017-10-28"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-28"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {","lastModifiedDate":"2017-10-28"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","lastModifiedDate":"2017-10-28"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-28"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","lastModifiedDate":"2017-10-28"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);","lastModifiedDate":"2017-10-28"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","lastModifiedDate":"2017-10-28"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-28"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-28"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {","lastModifiedDate":"2017-10-28"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-28"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-28"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {","lastModifiedDate":"2017-10-28"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-28"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-28"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","lastModifiedDate":"2017-10-28"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-10-28"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-28"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","lastModifiedDate":"2017-10-28"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-28"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-28"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-28"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));","lastModifiedDate":"2017-10-28"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-28"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-28"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));","lastModifiedDate":"2017-10-28"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-28"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));","lastModifiedDate":"2017-10-28"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-28"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));","lastModifiedDate":"2017-10-28"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-10-28"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));","lastModifiedDate":"2017-10-28"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}","lastModifiedDate":"2017-10-28"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index.","lastModifiedDate":"2017-10-28"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {","lastModifiedDate":"2017-10-28"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","lastModifiedDate":"2017-10-28"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());","lastModifiedDate":"2017-10-28"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-28"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();","lastModifiedDate":"2017-10-28"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),","lastModifiedDate":"2017-10-28"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","lastModifiedDate":"2017-10-28"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","lastModifiedDate":"2017-10-28"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","lastModifiedDate":"2017-10-28"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d","lastModifiedDate":"2017-10-28"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","lastModifiedDate":"2017-10-28"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());","lastModifiedDate":"2017-10-28"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}","lastModifiedDate":"2017-10-28"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}.","lastModifiedDate":"2017-10-28"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","lastModifiedDate":"2017-10-28"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","lastModifiedDate":"2017-10-28"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-28"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();","lastModifiedDate":"2017-10-28"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","lastModifiedDate":"2017-10-28"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","lastModifiedDate":"2017-10-28"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());","lastModifiedDate":"2017-10-28"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","lastModifiedDate":"2017-10-28"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","lastModifiedDate":"2017-10-28"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {","lastModifiedDate":"2017-10-28"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);","lastModifiedDate":"2017-10-28"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-28"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;","lastModifiedDate":"2017-10-28"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28"}],"authorContributionMap":{"jeffreygohkw":142}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-07-13"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","lastModifiedDate":"2017-07-13"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-07-13"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-13"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","lastModifiedDate":"2017-07-13"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-13"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-07-13"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-07-13"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","lastModifiedDate":"2017-07-13"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-07-13"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-07-13"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-13"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-07-13"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-07-13"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-07-13"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class RedoCommandTest {","lastModifiedDate":"2017-07-13"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","lastModifiedDate":"2017-07-13"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","lastModifiedDate":"2017-07-13"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","lastModifiedDate":"2017-07-13"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","lastModifiedDate":"2017-07-13"},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","lastModifiedDate":"2017-07-13"},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","lastModifiedDate":"2017-07-13"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-13"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() {","lastModifiedDate":"2017-08-15"},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","lastModifiedDate":"2017-07-13"},{"lineNumber":40,"author":{"gitId":"-"},"content":" Collections.emptyList(), Arrays.asList(deleteCommandTwo, deleteCommandOne));","lastModifiedDate":"2017-07-13"},{"lineNumber":41,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();","lastModifiedDate":"2017-07-13"},{"lineNumber":42,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","lastModifiedDate":"2017-07-13"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13"},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in redoStack","lastModifiedDate":"2017-07-13"},{"lineNumber":46,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","lastModifiedDate":"2017-07-13"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","lastModifiedDate":"2017-07-13"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":49,"author":{"gitId":"-"},"content":" // single command in redoStack","lastModifiedDate":"2017-07-13"},{"lineNumber":50,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","lastModifiedDate":"2017-07-13"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","lastModifiedDate":"2017-07-13"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":53,"author":{"gitId":"-"},"content":" // no command in redoStack","lastModifiedDate":"2017-07-13"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","lastModifiedDate":"2017-07-13"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":56,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-13"}],"authorContributionMap":{"Esilocke":3,"-":53}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","lastModifiedDate":"2017-10-25"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","lastModifiedDate":"2017-10-25"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-10-25"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,","lastModifiedDate":"2017-10-25"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);","lastModifiedDate":"2017-10-25"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();","lastModifiedDate":"2017-10-25"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","lastModifiedDate":"2017-10-25"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-25"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-25"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);","lastModifiedDate":"2017-10-25"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-25"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","lastModifiedDate":"2017-10-25"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-25"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-25"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","lastModifiedDate":"2017-10-25"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-25"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));","lastModifiedDate":"2017-10-25"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-25"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","lastModifiedDate":"2017-10-25"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-25"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","lastModifiedDate":"2017-10-25"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-10-25"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","lastModifiedDate":"2017-10-25"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}.","lastModifiedDate":"2017-10-25"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {","lastModifiedDate":"2017-10-25"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);","lastModifiedDate":"2017-10-25"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-25"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":77}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-07-13"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","lastModifiedDate":"2017-07-13"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-07-13"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-13"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","lastModifiedDate":"2017-07-13"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-13"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-07-13"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-07-13"},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","lastModifiedDate":"2017-07-13"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-07-13"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-07-13"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-13"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-07-13"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-07-13"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-07-13"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class UndoCommandTest {","lastModifiedDate":"2017-07-13"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","lastModifiedDate":"2017-07-13"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","lastModifiedDate":"2017-07-13"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","lastModifiedDate":"2017-07-13"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","lastModifiedDate":"2017-07-13"},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","lastModifiedDate":"2017-07-13"},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","lastModifiedDate":"2017-07-13"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-13"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() throws Exception {","lastModifiedDate":"2017-07-13"},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","lastModifiedDate":"2017-07-13"},{"lineNumber":40,"author":{"gitId":"-"},"content":" Arrays.asList(deleteCommandOne, deleteCommandTwo), Collections.emptyList());","lastModifiedDate":"2017-07-13"},{"lineNumber":41,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();","lastModifiedDate":"2017-07-13"},{"lineNumber":42,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","lastModifiedDate":"2017-07-13"},{"lineNumber":43,"author":{"gitId":"-"},"content":" deleteCommandOne.execute();","lastModifiedDate":"2017-07-13"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteCommandTwo.execute();","lastModifiedDate":"2017-07-13"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":46,"author":{"gitId":"-"},"content":" // multiple commands in undoStack","lastModifiedDate":"2017-07-13"},{"lineNumber":47,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13"},{"lineNumber":48,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","lastModifiedDate":"2017-07-13"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","lastModifiedDate":"2017-07-13"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":51,"author":{"gitId":"-"},"content":" // single command in undoStack","lastModifiedDate":"2017-07-13"},{"lineNumber":52,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","lastModifiedDate":"2017-07-13"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no command in undoStack","lastModifiedDate":"2017-07-13"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","lastModifiedDate":"2017-07-13"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13"},{"lineNumber":58,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-13"}],"authorContributionMap":{"Esilocke":3,"-":55}},{"path":"src/test/java/seedu/address/logic/parser/AddCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-06-15"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-06-15"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","lastModifiedDate":"2017-10-24"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","lastModifiedDate":"2017-07-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","lastModifiedDate":"2017-07-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","lastModifiedDate":"2017-07-05"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","lastModifiedDate":"2017-10-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","lastModifiedDate":"2017-07-05"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","lastModifiedDate":"2017-10-24"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","lastModifiedDate":"2017-10-23"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","lastModifiedDate":"2017-07-05"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","lastModifiedDate":"2017-07-05"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","lastModifiedDate":"2017-07-05"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-07-05"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","lastModifiedDate":"2017-10-23"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-07-05"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-07-05"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-07-06"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-07-06"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-06-15"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-06-15"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-06-15"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-06-15"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-06-15"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-06-15"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-06-15"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-06-15"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","lastModifiedDate":"2017-10-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class AddCommandParserTest {","lastModifiedDate":"2017-06-15"},{"lineNumber":66,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","lastModifiedDate":"2017-06-15"},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-15"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {","lastModifiedDate":"2017-08-15"},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-06-15"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY)","lastModifiedDate":"2017-10-23"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-23"},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":74,"author":{"gitId":"-"},"content":" // multiple names - last name accepted","lastModifiedDate":"2017-06-15"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23"},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":79,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted","lastModifiedDate":"2017-06-15"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23"},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":84,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted","lastModifiedDate":"2017-06-15"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY","lastModifiedDate":"2017-07-06"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23"},{"lineNumber":88,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":89,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted","lastModifiedDate":"2017-06-15"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","lastModifiedDate":"2017-07-06"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23"},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":94,"author":{"gitId":"-"},"content":" // multiple tags - all accepted","lastModifiedDate":"2017-06-15"},{"lineNumber":95,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-06-15"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","lastModifiedDate":"2017-10-23"},{"lineNumber":97,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();","lastModifiedDate":"2017-06-15"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,","lastModifiedDate":"2017-10-23"},{"lineNumber":100,"author":{"gitId":"-"},"content":" new AddCommand(expectedPersonMultipleTags));","lastModifiedDate":"2017-06-15"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-15"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {","lastModifiedDate":"2017-10-24"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","lastModifiedDate":"2017-10-24"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","lastModifiedDate":"2017-10-24"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).build();","lastModifiedDate":"2017-10-24"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted","lastModifiedDate":"2017-10-24"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER","lastModifiedDate":"2017-10-24"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","lastModifiedDate":"2017-10-24"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted","lastModifiedDate":"2017-10-24"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","lastModifiedDate":"2017-10-24"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted","lastModifiedDate":"2017-10-24"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","lastModifiedDate":"2017-10-24"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted","lastModifiedDate":"2017-10-24"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER","lastModifiedDate":"2017-10-24"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","lastModifiedDate":"2017-10-24"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-15"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {","lastModifiedDate":"2017-08-15"},{"lineNumber":134,"author":{"gitId":"-"},"content":" // zero tags","lastModifiedDate":"2017-06-15"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","lastModifiedDate":"2017-06-15"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)","lastModifiedDate":"2017-10-23"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();","lastModifiedDate":"2017-10-23"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY","lastModifiedDate":"2017-07-06"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-15"},{"lineNumber":141,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-15"},{"lineNumber":143,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {","lastModifiedDate":"2017-06-15"},{"lineNumber":144,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE);","lastModifiedDate":"2017-06-15"},{"lineNumber":145,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":146,"author":{"gitId":"-"},"content":" // missing name prefix","lastModifiedDate":"2017-06-15"},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06"},{"lineNumber":148,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","lastModifiedDate":"2017-06-15"},{"lineNumber":149,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":150,"author":{"gitId":"-"},"content":" // missing phone prefix","lastModifiedDate":"2017-06-15"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + VALID_PHONE_BOB","lastModifiedDate":"2017-07-06"},{"lineNumber":152,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","lastModifiedDate":"2017-06-15"},{"lineNumber":153,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":154,"author":{"gitId":"-"},"content":" // missing email prefix","lastModifiedDate":"2017-06-15"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06"},{"lineNumber":156,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + ADDRESS_DESC_BOB, expectedMessage);","lastModifiedDate":"2017-06-15"},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":158,"author":{"gitId":"-"},"content":" // missing address prefix","lastModifiedDate":"2017-06-15"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06"},{"lineNumber":160,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + VALID_ADDRESS_BOB, expectedMessage);","lastModifiedDate":"2017-06-15"},{"lineNumber":161,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":162,"author":{"gitId":"-"},"content":" // all prefixes missing","lastModifiedDate":"2017-06-15"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB","lastModifiedDate":"2017-07-06"},{"lineNumber":164,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);","lastModifiedDate":"2017-06-15"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-15"},{"lineNumber":166,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {","lastModifiedDate":"2017-10-24"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE);","lastModifiedDate":"2017-10-24"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix","lastModifiedDate":"2017-10-24"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER","lastModifiedDate":"2017-10-24"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" // missing description prefix","lastModifiedDate":"2017-10-24"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" // missing deadline prefix","lastModifiedDate":"2017-10-24"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + VALID_DEADLINE_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" // missing priority prefix","lastModifiedDate":"2017-10-24"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing","lastModifiedDate":"2017-10-24"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-15"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","lastModifiedDate":"2017-06-15"},{"lineNumber":194,"author":{"gitId":"-"},"content":" // invalid name","lastModifiedDate":"2017-06-15"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB","lastModifiedDate":"2017-10-23"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","lastModifiedDate":"2017-10-23"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-10-23"},{"lineNumber":198,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":199,"author":{"gitId":"-"},"content":" // invalid phone","lastModifiedDate":"2017-06-15"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC","lastModifiedDate":"2017-10-23"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","lastModifiedDate":"2017-10-23"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);","lastModifiedDate":"2017-10-23"},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":204,"author":{"gitId":"-"},"content":" // invalid email","lastModifiedDate":"2017-06-15"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-10-23"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);","lastModifiedDate":"2017-10-23"},{"lineNumber":208,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":209,"author":{"gitId":"-"},"content":" // invalid tag","lastModifiedDate":"2017-06-15"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-10-23"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB","lastModifiedDate":"2017-10-23"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-10-23"},{"lineNumber":213,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15"},{"lineNumber":214,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","lastModifiedDate":"2017-06-15"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC","lastModifiedDate":"2017-10-23"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-10-23"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-15"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {","lastModifiedDate":"2017-10-24"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" // invalid deadline","lastModifiedDate":"2017-10-24"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","lastModifiedDate":"2017-10-24"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","lastModifiedDate":"2017-10-24"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" // invalid priority","lastModifiedDate":"2017-10-24"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Priority.MESSAGE_PRIORITY_CONSTRAINTS);","lastModifiedDate":"2017-10-24"},{"lineNumber":230,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":231,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","lastModifiedDate":"2017-10-24"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","lastModifiedDate":"2017-10-24"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","lastModifiedDate":"2017-10-24"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":236,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-15"}],"authorContributionMap":{"charlesgoh":33,"Esilocke":89,"-":114}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-21"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-21"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-21"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-21"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-21"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","lastModifiedDate":"2017-10-21"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-21"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-21"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-21"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","lastModifiedDate":"2017-10-21"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-21"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {","lastModifiedDate":"2017-10-21"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();","lastModifiedDate":"2017-10-21"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","lastModifiedDate":"2017-10-21"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","lastModifiedDate":"2017-10-21"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);","lastModifiedDate":"2017-10-21"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","lastModifiedDate":"2017-10-21"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","lastModifiedDate":"2017-10-21"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));","lastModifiedDate":"2017-10-21"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","lastModifiedDate":"2017-10-21"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";","lastModifiedDate":"2017-10-22"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","lastModifiedDate":"2017-10-21"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-10-21"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","lastModifiedDate":"2017-10-21"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-21"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-21"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"}],"authorContributionMap":{"wangyiming1019":58}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-05-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-05-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-05-24"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","lastModifiedDate":"2017-05-24"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-06-27"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","lastModifiedDate":"2017-05-24"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-10-28"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-10-24"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-10-28"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-06-27"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-06-12"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","lastModifiedDate":"2017-06-27"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2017-06-27"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-05-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2017-06-27"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-06-27"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","lastModifiedDate":"2017-10-20"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","lastModifiedDate":"2017-10-23"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-23"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-06-27"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","lastModifiedDate":"2017-06-27"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","lastModifiedDate":"2017-06-27"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","lastModifiedDate":"2017-06-27"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","lastModifiedDate":"2017-06-27"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","lastModifiedDate":"2017-06-27"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","lastModifiedDate":"2017-10-29"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","lastModifiedDate":"2017-06-27"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","lastModifiedDate":"2017-05-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","lastModifiedDate":"2017-06-27"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","lastModifiedDate":"2017-10-28"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-07-17"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","lastModifiedDate":"2017-06-27"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-07-17"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-05-24"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","lastModifiedDate":"2017-06-12"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-06-27"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","lastModifiedDate":"2017-06-27"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-06-27"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","lastModifiedDate":"2017-10-23"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","lastModifiedDate":"2017-06-27"},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","lastModifiedDate":"2017-07-07"},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2017-06-27"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2017-06-27"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","lastModifiedDate":"2017-07-07"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":58,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-06-27"},{"lineNumber":59,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person));","lastModifiedDate":"2017-06-27"},{"lineNumber":60,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","lastModifiedDate":"2017-06-27"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasAdd() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-10-16"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","lastModifiedDate":"2017-10-16"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" + PersonUtil.getPersonDetails(person));","lastModifiedDate":"2017-10-16"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddCommand(person), command);","lastModifiedDate":"2017-10-16"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {","lastModifiedDate":"2017-10-23"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-10-23"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","lastModifiedDate":"2017-10-23"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","lastModifiedDate":"2017-10-23"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","lastModifiedDate":"2017-10-23"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","lastModifiedDate":"2017-10-28"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","lastModifiedDate":"2017-10-23"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","lastModifiedDate":"2017-10-24"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {","lastModifiedDate":"2017-10-23"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-10-23"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","lastModifiedDate":"2017-10-23"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","lastModifiedDate":"2017-10-23"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()","lastModifiedDate":"2017-10-23"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","lastModifiedDate":"2017-10-28"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","lastModifiedDate":"2017-10-28"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","lastModifiedDate":"2017-10-23"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","lastModifiedDate":"2017-10-24"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":105,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD) instanceof ClearCommand);","lastModifiedDate":"2017-06-27"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS) instanceof ClearCommand);","lastModifiedDate":"2017-10-16"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":113,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":115,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","lastModifiedDate":"2017-06-27"},{"lineNumber":116,"author":{"gitId":"-"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-06-27"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","lastModifiedDate":"2017-10-24"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","lastModifiedDate":"2017-10-16"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-10-16"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","lastModifiedDate":"2017-10-24"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":127,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":129,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-06-27"},{"lineNumber":130,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","lastModifiedDate":"2017-06-27"},{"lineNumber":131,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","lastModifiedDate":"2017-06-27"},{"lineNumber":132,"author":{"gitId":"-"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","lastModifiedDate":"2017-06-27"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","lastModifiedDate":"2017-06-27"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":135,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":136,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-10-16"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","lastModifiedDate":"2017-10-16"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","lastModifiedDate":"2017-10-16"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","lastModifiedDate":"2017-10-16"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","lastModifiedDate":"2017-10-16"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":145,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD) instanceof ExitCommand);","lastModifiedDate":"2017-06-27"},{"lineNumber":148,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\") instanceof ExitCommand);","lastModifiedDate":"2017-06-27"},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":150,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":151,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":153,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","lastModifiedDate":"2017-06-12"},{"lineNumber":154,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","lastModifiedDate":"2017-06-27"},{"lineNumber":155,"author":{"gitId":"-"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","lastModifiedDate":"2017-06-27"},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","lastModifiedDate":"2017-06-12"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":158,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","lastModifiedDate":"2017-10-16"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","lastModifiedDate":"2017-10-16"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","lastModifiedDate":"2017-10-16"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","lastModifiedDate":"2017-10-16"},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":167,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29"},{"lineNumber":168,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {","lastModifiedDate":"2017-10-29"},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","lastModifiedDate":"2017-10-29"},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","lastModifiedDate":"2017-10-29"},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","lastModifiedDate":"2017-10-29"},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","lastModifiedDate":"2017-10-29"},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","lastModifiedDate":"2017-10-29"},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29"},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {","lastModifiedDate":"2017-10-29"},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","lastModifiedDate":"2017-10-29"},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","lastModifiedDate":"2017-10-29"},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","lastModifiedDate":"2017-10-29"},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","lastModifiedDate":"2017-10-29"},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","lastModifiedDate":"2017-10-29"},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":185,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":187,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD) instanceof HelpCommand);","lastModifiedDate":"2017-06-27"},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\") instanceof HelpCommand);","lastModifiedDate":"2017-06-27"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":191,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-24"},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":193,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD) instanceof HistoryCommand);","lastModifiedDate":"2017-05-24"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\") instanceof HistoryCommand);","lastModifiedDate":"2017-05-24"},{"lineNumber":195,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24"},{"lineNumber":196,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-05-24"},{"lineNumber":197,"author":{"gitId":"-"},"content":" parser.parseCommand(\"histories\");","lastModifiedDate":"2017-05-24"},{"lineNumber":198,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","lastModifiedDate":"2017-05-24"},{"lineNumber":199,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","lastModifiedDate":"2017-05-24"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","lastModifiedDate":"2017-05-24"},{"lineNumber":201,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24"},{"lineNumber":202,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24"},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":204,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":205,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":206,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS) instanceof HistoryCommand);","lastModifiedDate":"2017-10-16"},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\") instanceof HistoryCommand);","lastModifiedDate":"2017-10-16"},{"lineNumber":208,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":209,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16"},{"lineNumber":210,"author":{"gitId":"wangyiming1019"},"content":" parser.parseCommand(\"histories\");","lastModifiedDate":"2017-10-16"},{"lineNumber":211,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");","lastModifiedDate":"2017-10-16"},{"lineNumber":212,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {","lastModifiedDate":"2017-10-16"},{"lineNumber":213,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","lastModifiedDate":"2017-10-16"},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":217,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":219,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD) instanceof ListCommand);","lastModifiedDate":"2017-06-27"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\") instanceof ListCommand);","lastModifiedDate":"2017-06-27"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":222,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":223,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":224,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":225,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS) instanceof ListCommand);","lastModifiedDate":"2017-10-16"},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\") instanceof ListCommand);","lastModifiedDate":"2017-10-16"},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":229,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":231,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","lastModifiedDate":"2017-06-27"},{"lineNumber":232,"author":{"gitId":"-"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-06-27"},{"lineNumber":233,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","lastModifiedDate":"2017-06-27"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":235,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":236,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","lastModifiedDate":"2017-10-16"},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-10-16"},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","lastModifiedDate":"2017-10-16"},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {","lastModifiedDate":"2017-10-28"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","lastModifiedDate":"2017-10-28"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-10-28"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","lastModifiedDate":"2017-10-28"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {","lastModifiedDate":"2017-10-28"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","lastModifiedDate":"2017-10-28"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-10-28"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","lastModifiedDate":"2017-10-28"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-20"},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWord() throws Exception {","lastModifiedDate":"2017-10-20"},{"lineNumber":259,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD) instanceof BackupCommand);","lastModifiedDate":"2017-10-20"},{"lineNumber":260,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":261,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-20"},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWordWithInput() throws Exception {","lastModifiedDate":"2017-10-20"},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD + \" test.xml\") instanceof BackupCommand);","lastModifiedDate":"2017-10-20"},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-20"},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAlias() throws Exception {","lastModifiedDate":"2017-10-20"},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS) instanceof BackupCommand);","lastModifiedDate":"2017-10-20"},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-20"},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAliasWithInput() throws Exception {","lastModifiedDate":"2017-10-20"},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS + \" test.xml\") instanceof BackupCommand);","lastModifiedDate":"2017-10-20"},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":277,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-17"},{"lineNumber":278,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD) instanceof RedoCommand);","lastModifiedDate":"2017-07-17"},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"redo 1\") instanceof RedoCommand);","lastModifiedDate":"2017-07-17"},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-17"},{"lineNumber":282,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-17"},{"lineNumber":283,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-17"},{"lineNumber":284,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":285,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD) instanceof UndoCommand);","lastModifiedDate":"2017-07-17"},{"lineNumber":286,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"undo 3\") instanceof UndoCommand);","lastModifiedDate":"2017-07-17"},{"lineNumber":287,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-17"},{"lineNumber":288,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-17"},{"lineNumber":289,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":290,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":291,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","lastModifiedDate":"2017-06-27"},{"lineNumber":292,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-06-27"},{"lineNumber":293,"author":{"gitId":"-"},"content":" parser.parseCommand(\"\");","lastModifiedDate":"2017-06-27"},{"lineNumber":294,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":295,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27"},{"lineNumber":296,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27"},{"lineNumber":297,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {","lastModifiedDate":"2017-10-16"},{"lineNumber":298,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","lastModifiedDate":"2017-06-27"},{"lineNumber":299,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2017-06-27"},{"lineNumber":300,"author":{"gitId":"-"},"content":" parser.parseCommand(\"unknownCommand\");","lastModifiedDate":"2017-06-27"},{"lineNumber":301,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27"},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal","lastModifiedDate":"2017-10-24"},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command","lastModifiedDate":"2017-10-24"},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command","lastModifiedDate":"2017-10-24"},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal","lastModifiedDate":"2017-10-24"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {","lastModifiedDate":"2017-10-24"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());","lastModifiedDate":"2017-10-24"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","lastModifiedDate":"2017-10-24"},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","lastModifiedDate":"2017-10-24"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","lastModifiedDate":"2017-10-24"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","lastModifiedDate":"2017-10-24"},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" return true;","lastModifiedDate":"2017-10-24"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":317,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-24"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":68,"Esilocke":3,"wangyiming1019":89,"-":136}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-22"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-23"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-22"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","lastModifiedDate":"2017-10-22"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","lastModifiedDate":"2017-10-22"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-10-22"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-10-22"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-10-22"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-10-22"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-29"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-22"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-23"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-23"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-23"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-22"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-23"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","lastModifiedDate":"2017-10-22"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-23"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-23"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","lastModifiedDate":"2017-10-23"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {","lastModifiedDate":"2017-10-22"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","lastModifiedDate":"2017-10-22"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);","lastModifiedDate":"2017-10-22"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();","lastModifiedDate":"2017-10-22"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-22"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {","lastModifiedDate":"2017-10-22"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified","lastModifiedDate":"2017-10-22"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","lastModifiedDate":"2017-10-22"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);","lastModifiedDate":"2017-10-22"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified","lastModifiedDate":"2017-10-22"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-22"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {","lastModifiedDate":"2017-10-22"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" // negative index","lastModifiedDate":"2017-10-22"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // zero index","lastModifiedDate":"2017-10-22"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble","lastModifiedDate":"2017-10-22"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble","lastModifiedDate":"2017-10-22"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-22"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {","lastModifiedDate":"2017-10-22"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument","lastModifiedDate":"2017-10-22"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\",","lastModifiedDate":"2017-10-22"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\",","lastModifiedDate":"2017-10-22"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","lastModifiedDate":"2017-10-22"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","lastModifiedDate":"2017-10-22"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\",","lastModifiedDate":"2017-10-29"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-29"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value","lastModifiedDate":"2017-10-22"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","lastModifiedDate":"2017-10-22"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\",","lastModifiedDate":"2017-10-22"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\",","lastModifiedDate":"2017-10-22"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","lastModifiedDate":"2017-10-22"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","lastModifiedDate":"2017-10-22"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\",","lastModifiedDate":"2017-10-29"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-29"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {","lastModifiedDate":"2017-10-23"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-23"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","lastModifiedDate":"2017-10-23"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";","lastModifiedDate":"2017-10-23"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","lastModifiedDate":"2017-10-23"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();","lastModifiedDate":"2017-10-23"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {","lastModifiedDate":"2017-10-23"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-23"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";","lastModifiedDate":"2017-10-23"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","lastModifiedDate":"2017-10-23"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();","lastModifiedDate":"2017-10-28"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {","lastModifiedDate":"2017-10-23"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-23"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";","lastModifiedDate":"2017-10-23"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","lastModifiedDate":"2017-10-28"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {","lastModifiedDate":"2017-10-23"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-23"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","lastModifiedDate":"2017-10-23"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \"","lastModifiedDate":"2017-10-23"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";","lastModifiedDate":"2017-10-23"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")","lastModifiedDate":"2017-10-23"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();","lastModifiedDate":"2017-10-23"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {","lastModifiedDate":"2017-10-23"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-23"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";","lastModifiedDate":"2017-10-23"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","lastModifiedDate":"2017-10-28"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents","lastModifiedDate":"2017-10-29"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand","lastModifiedDate":"2017-10-29"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand","lastModifiedDate":"2017-10-29"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {","lastModifiedDate":"2017-10-29"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());","lastModifiedDate":"2017-10-23"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());","lastModifiedDate":"2017-10-29"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-22"}],"authorContributionMap":{"jeffreygohkw":173}},{"path":"src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-06-09"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-06-09"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","lastModifiedDate":"2017-10-24"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-07-06"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-07-06"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-06-09"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","lastModifiedDate":"2017-06-09"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09"},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-06-09"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations","lastModifiedDate":"2017-06-09"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * outside of the DeleteCommand code. For example, inputs \"1\" and \"1 abc\" take the","lastModifiedDate":"2017-06-09"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * same path through the DeleteCommand, and therefore we test only one of them.","lastModifiedDate":"2017-06-09"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and","lastModifiedDate":"2017-06-09"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest.","lastModifiedDate":"2017-06-09"},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-09"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class DeleteCommandParserTest {","lastModifiedDate":"2017-06-09"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","lastModifiedDate":"2017-06-09"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-09"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {","lastModifiedDate":"2017-08-15"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON));","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-09"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\",","lastModifiedDate":"2017-10-24"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_TASK));","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-09"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","lastModifiedDate":"2017-08-15"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\",","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-06-09"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30"},{"lineNumber":52,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-09"}],"authorContributionMap":{"Esilocke":23,"-":29}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-21"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-21"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-21"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-21"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-21"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","lastModifiedDate":"2017-10-21"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-21"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-21"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-21"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","lastModifiedDate":"2017-10-21"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-21"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {","lastModifiedDate":"2017-10-21"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();","lastModifiedDate":"2017-10-21"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","lastModifiedDate":"2017-10-21"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","lastModifiedDate":"2017-10-21"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);","lastModifiedDate":"2017-10-21"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","lastModifiedDate":"2017-10-21"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","lastModifiedDate":"2017-10-21"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));","lastModifiedDate":"2017-10-21"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";","lastModifiedDate":"2017-10-21"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);","lastModifiedDate":"2017-10-21"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","lastModifiedDate":"2017-10-21"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;","lastModifiedDate":"2017-10-21"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));","lastModifiedDate":"2017-10-21"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","lastModifiedDate":"2017-10-21"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";","lastModifiedDate":"2017-10-22"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","lastModifiedDate":"2017-10-21"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-10-21"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","lastModifiedDate":"2017-10-21"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,","lastModifiedDate":"2017-10-21"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-21"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-21"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21"}],"authorContributionMap":{"wangyiming1019":65}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-19"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-20"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","lastModifiedDate":"2017-10-20"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-10-20"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-10-20"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","lastModifiedDate":"2017-10-20"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","lastModifiedDate":"2017-10-20"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-20"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-20"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-19"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-20"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","lastModifiedDate":"2017-10-20"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-20"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {","lastModifiedDate":"2017-10-20"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","lastModifiedDate":"2017-10-20"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);","lastModifiedDate":"2017-10-20"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();","lastModifiedDate":"2017-10-20"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-19"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {","lastModifiedDate":"2017-10-19"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument","lastModifiedDate":"2017-10-20"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-20"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args","lastModifiedDate":"2017-10-19"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","lastModifiedDate":"2017-10-20"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args","lastModifiedDate":"2017-10-19"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND","lastModifiedDate":"2017-10-20"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","lastModifiedDate":"2017-10-20"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same","lastModifiedDate":"2017-10-19"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);","lastModifiedDate":"2017-10-20"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid","lastModifiedDate":"2017-10-19"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-20"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-19"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {","lastModifiedDate":"2017-10-20"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","lastModifiedDate":"2017-10-20"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());","lastModifiedDate":"2017-10-20"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes","lastModifiedDate":"2017-10-19"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","lastModifiedDate":"2017-10-20"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));","lastModifiedDate":"2017-10-20"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words","lastModifiedDate":"2017-10-19"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","lastModifiedDate":"2017-10-20"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));","lastModifiedDate":"2017-10-20"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-19"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":26}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-29"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-29"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-29"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-29"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-29"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-29"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","lastModifiedDate":"2017-10-29"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {","lastModifiedDate":"2017-10-29"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();","lastModifiedDate":"2017-10-29"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {","lastModifiedDate":"2017-10-29"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \",","lastModifiedDate":"2017-10-29"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-29"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {","lastModifiedDate":"2017-10-29"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d","lastModifiedDate":"2017-10-29"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(","lastModifiedDate":"2017-10-29"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));","lastModifiedDate":"2017-10-29"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces","lastModifiedDate":"2017-10-29"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);","lastModifiedDate":"2017-10-29"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords","lastModifiedDate":"2017-10-29"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);","lastModifiedDate":"2017-10-29"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29"}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-28"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-28"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-28"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-28"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-28"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","lastModifiedDate":"2017-10-28"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectCommandParserTest}.","lastModifiedDate":"2017-10-28"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectCommandParserTest","lastModifiedDate":"2017-10-28"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {","lastModifiedDate":"2017-10-28"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();","lastModifiedDate":"2017-10-28"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {","lastModifiedDate":"2017-10-28"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","lastModifiedDate":"2017-10-28"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-28"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28"}],"authorContributionMap":{"jeffreygohkw":29}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-12"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-24"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-12"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","lastModifiedDate":"2017-10-13"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-12"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-12"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;","lastModifiedDate":"2017-10-12"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-24"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {","lastModifiedDate":"2017-10-12"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","lastModifiedDate":"2017-10-12"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-12"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {","lastModifiedDate":"2017-10-12"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-12"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-12"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {","lastModifiedDate":"2017-10-12"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","lastModifiedDate":"2017-10-12"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"asc\",","lastModifiedDate":"2017-10-24"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"desc\",","lastModifiedDate":"2017-10-24"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified","lastModifiedDate":"2017-10-12"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"name\",","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"phone\",","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"email\",","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"address\",","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // no field or order","lastModifiedDate":"2017-10-13"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\",","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArguments_success() throws ParseException {","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand expectedCommand;","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand actualCommand;","lastModifiedDate":"2017-10-24"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"asc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name asc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"desc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name desc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"asc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone asc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"desc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone desc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"asc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email asc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"desc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email desc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"asc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address asc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"desc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address desc\");","lastModifiedDate":"2017-10-24"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-12"}],"authorContributionMap":{"jeffreygohkw":100}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-25"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-25"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-25"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-25"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-25"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","lastModifiedDate":"2017-10-25"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {","lastModifiedDate":"2017-10-25"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();","lastModifiedDate":"2017-10-25"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {","lastModifiedDate":"2017-10-25"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));","lastModifiedDate":"2017-10-25"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","lastModifiedDate":"2017-10-25"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-25"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-25"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25"}],"authorContributionMap":{"wangyiming1019":26}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-12-24"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2016-12-24"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","lastModifiedDate":"2017-07-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-19"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","lastModifiedDate":"2017-10-01"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-04"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-04"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Collection;","lastModifiedDate":"2017-10-04"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-10-04"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","lastModifiedDate":"2017-10-04"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-10-04"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2016-12-24"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2016-12-24"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2016-12-24"},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2016-12-24"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-12-24"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2016-12-24"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-12-24"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2016-12-24"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {","lastModifiedDate":"2016-12-24"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2016-12-24"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2016-12-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();","lastModifiedDate":"2016-12-24"},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-24"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {","lastModifiedDate":"2016-12-24"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());","lastModifiedDate":"2016-12-24"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());","lastModifiedDate":"2016-12-24"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-24"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {","lastModifiedDate":"2017-05-15"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15"},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);","lastModifiedDate":"2016-12-24"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-24"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {","lastModifiedDate":"2016-12-24"},{"lineNumber":48,"author":{"gitId":"-"},"content":" AddressBook newData \u003d getTypicalAddressBook();","lastModifiedDate":"2017-07-19"},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","lastModifiedDate":"2016-12-24"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);","lastModifiedDate":"2016-12-24"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-24"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {","lastModifiedDate":"2016-12-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice","lastModifiedDate":"2017-07-19"},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));","lastModifiedDate":"2017-07-19"},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());","lastModifiedDate":"2017-07-19"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);","lastModifiedDate":"2016-12-24"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","lastModifiedDate":"2016-12-24"},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","lastModifiedDate":"2016-12-24"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-09-01"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","lastModifiedDate":"2017-09-01"},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","lastModifiedDate":"2017-09-01"},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","lastModifiedDate":"2017-09-01"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-01"},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01"},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-09-01"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","lastModifiedDate":"2017-09-01"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","lastModifiedDate":"2017-09-01"},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","lastModifiedDate":"2017-09-01"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-01"},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {","lastModifiedDate":"2017-10-01"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");","lastModifiedDate":"2017-10-01"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));","lastModifiedDate":"2017-10-01"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {","lastModifiedDate":"2017-10-01"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");","lastModifiedDate":"2017-10-01"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));","lastModifiedDate":"2017-10-01"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {","lastModifiedDate":"2017-10-01"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");","lastModifiedDate":"2017-10-01"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));","lastModifiedDate":"2017-10-01"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {","lastModifiedDate":"2017-10-01"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");","lastModifiedDate":"2017-10-01"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));","lastModifiedDate":"2017-10-01"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {","lastModifiedDate":"2017-10-01"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");","lastModifiedDate":"2017-10-01"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));","lastModifiedDate":"2017-10-01"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {","lastModifiedDate":"2017-10-01"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");","lastModifiedDate":"2017-10-01"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));","lastModifiedDate":"2017-10-01"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {","lastModifiedDate":"2017-10-01"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");","lastModifiedDate":"2017-10-01"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));","lastModifiedDate":"2017-10-01"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {","lastModifiedDate":"2017-10-01"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");","lastModifiedDate":"2017-10-01"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));","lastModifiedDate":"2017-10-01"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01"},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-24"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints.","lastModifiedDate":"2016-12-24"},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-24"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {","lastModifiedDate":"2016-12-24"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();","lastModifiedDate":"2016-12-24"},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();","lastModifiedDate":"2016-12-24"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();","lastModifiedDate":"2017-10-24"},{"lineNumber":195,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {","lastModifiedDate":"2016-12-24"},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);","lastModifiedDate":"2016-12-24"},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);","lastModifiedDate":"2016-12-24"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-12-24"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","lastModifiedDate":"2016-12-24"},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;","lastModifiedDate":"2016-12-24"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":205,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-12-24"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","lastModifiedDate":"2016-12-24"},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;","lastModifiedDate":"2016-12-24"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","lastModifiedDate":"2017-10-24"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;","lastModifiedDate":"2017-10-24"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":215,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24"},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24"},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-12-24"}],"authorContributionMap":{"charlesgoh":114,"Esilocke":8,"-":95}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-01-16"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-01-16"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-01-16"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-01-16"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {","lastModifiedDate":"2017-01-16"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-01-16"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {","lastModifiedDate":"2017-01-16"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses","lastModifiedDate":"2017-01-16"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only","lastModifiedDate":"2017-01-16"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses","lastModifiedDate":"2017-01-16"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));","lastModifiedDate":"2017-01-16"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character","lastModifiedDate":"2017-01-16"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address","lastModifiedDate":"2017-01-16"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {","lastModifiedDate":"2017-10-16"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);","lastModifiedDate":"2017-10-16"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.isPrivate());","lastModifiedDate":"2017-10-16"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");","lastModifiedDate":"2017-10-16"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-16"}],"authorContributionMap":{"jeffreygohkw":9,"-":21}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-01-16"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-01-16"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-01-16"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-01-16"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {","lastModifiedDate":"2017-01-16"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-01-16"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {","lastModifiedDate":"2017-01-16"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email","lastModifiedDate":"2017-01-16"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only","lastModifiedDate":"2017-01-16"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts","lastModifiedDate":"2017-01-16"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part","lastModifiedDate":"2017-04-05"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol","lastModifiedDate":"2017-04-05"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name","lastModifiedDate":"2017-01-16"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts","lastModifiedDate":"2017-01-16"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part","lastModifiedDate":"2017-04-05"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name","lastModifiedDate":"2017-01-16"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part","lastModifiedDate":"2017-04-05"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name","lastModifiedDate":"2017-04-05"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol","lastModifiedDate":"2017-04-05"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part","lastModifiedDate":"2017-04-05"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name","lastModifiedDate":"2017-04-05"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email","lastModifiedDate":"2017-01-16"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));","lastModifiedDate":"2017-04-05"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal","lastModifiedDate":"2017-01-16"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only","lastModifiedDate":"2017-01-16"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name","lastModifiedDate":"2017-01-16"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters","lastModifiedDate":"2017-04-05"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores","lastModifiedDate":"2017-04-05"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name","lastModifiedDate":"2017-04-05"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part","lastModifiedDate":"2017-04-05"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {","lastModifiedDate":"2017-10-16"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);","lastModifiedDate":"2017-10-16"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.isPrivate());","lastModifiedDate":"2017-10-16"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");","lastModifiedDate":"2017-10-16"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":49,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-16"}],"authorContributionMap":{"jeffreygohkw":9,"-":40}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-01-16"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-01-16"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-01-16"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-01-16"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {","lastModifiedDate":"2017-01-16"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-01-16"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {","lastModifiedDate":"2017-01-16"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name","lastModifiedDate":"2017-01-16"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string","lastModifiedDate":"2017-01-16"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only","lastModifiedDate":"2017-01-16"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters","lastModifiedDate":"2017-01-16"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters","lastModifiedDate":"2017-01-16"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name","lastModifiedDate":"2017-01-16"},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only","lastModifiedDate":"2017-01-16"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only","lastModifiedDate":"2017-01-16"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters","lastModifiedDate":"2017-01-16"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters","lastModifiedDate":"2017-01-16"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names","lastModifiedDate":"2017-01-16"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {","lastModifiedDate":"2017-10-16"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);","lastModifiedDate":"2017-10-16"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.isPrivate());","lastModifiedDate":"2017-10-16"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");","lastModifiedDate":"2017-10-16"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":35,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-16"}],"authorContributionMap":{"jeffreygohkw":9,"-":26}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-01-16"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-16"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-01-16"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-01-16"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-01-16"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {","lastModifiedDate":"2017-01-16"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-01-16"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {","lastModifiedDate":"2017-01-16"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers","lastModifiedDate":"2017-01-16"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only","lastModifiedDate":"2017-01-16"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers","lastModifiedDate":"2017-05-04"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric","lastModifiedDate":"2017-01-16"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits","lastModifiedDate":"2017-01-16"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits","lastModifiedDate":"2017-01-16"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16"},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers","lastModifiedDate":"2017-01-16"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers","lastModifiedDate":"2017-05-04"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));","lastModifiedDate":"2017-01-16"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers","lastModifiedDate":"2017-01-16"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-16"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {","lastModifiedDate":"2017-10-16"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);","lastModifiedDate":"2017-10-16"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.isPrivate());","lastModifiedDate":"2017-10-16"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");","lastModifiedDate":"2017-10-16"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16"},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-16"}],"authorContributionMap":{"jeffreygohkw":9,"-":25}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-11"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-11"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-12"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-12"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-12"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {","lastModifiedDate":"2017-10-11"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-12"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {","lastModifiedDate":"2017-10-12"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines","lastModifiedDate":"2017-10-12"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only","lastModifiedDate":"2017-10-12"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters","lastModifiedDate":"2017-10-12"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols","lastModifiedDate":"2017-10-12"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"-04-17\")); // missing day","lastModifiedDate":"2017-10-12"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04--17\")); // missing month","lastModifiedDate":"2017-10-12"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04\")); // missing year","lastModifiedDate":"2017-10-12"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"day-04-17\")); // invalid day","lastModifiedDate":"2017-10-12"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-month-17\")); // invalid month","lastModifiedDate":"2017-10-12"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-year\")); // invalid year","lastModifiedDate":"2017-10-12"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"32-04-17\")); // impossible day","lastModifiedDate":"2017-10-12"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-13-17\")); // impossible month","lastModifiedDate":"2017-10-12"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04--1\")); // impossible year","lastModifiedDate":"2017-10-12"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"0-04-17\")); // incomplete day","lastModifiedDate":"2017-10-12"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-0-17\")); // incomplete month","lastModifiedDate":"2017-10-12"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-1\")); // incomplete year","lastModifiedDate":"2017-10-12"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-201\")); // incomplete year","lastModifiedDate":"2017-10-12"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04/17\")); // inconsistent separators","lastModifiedDate":"2017-10-12"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-042017\")); // missing separator","lastModifiedDate":"2017-10-12"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)","lastModifiedDate":"2017-10-12"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string","lastModifiedDate":"2017-10-12"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // valid deadlines","lastModifiedDate":"2017-10-12"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes","lastModifiedDate":"2017-10-12"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04/04/2017\")); // slashes","lastModifiedDate":"2017-10-12"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04.04.2017\")); // dots","lastModifiedDate":"2017-10-12"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-11"}],"authorContributionMap":{"Esilocke":44}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-11"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-11"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-12"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-12"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-12"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {","lastModifiedDate":"2017-10-11"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-12"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {","lastModifiedDate":"2017-10-12"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions","lastModifiedDate":"2017-10-12"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only","lastModifiedDate":"2017-10-12"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions","lastModifiedDate":"2017-10-12"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string","lastModifiedDate":"2017-10-12"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents","lastModifiedDate":"2017-10-12"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character","lastModifiedDate":"2017-10-12"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-11"}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-11"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-11"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-12"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-12"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-12"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {","lastModifiedDate":"2017-10-11"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-12"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {","lastModifiedDate":"2017-10-12"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","lastModifiedDate":"2017-10-12"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only","lastModifiedDate":"2017-10-12"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority","lastModifiedDate":"2017-10-12"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range","lastModifiedDate":"2017-10-12"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"0\")); // priority out of range","lastModifiedDate":"2017-10-12"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names","lastModifiedDate":"2017-10-12"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string","lastModifiedDate":"2017-10-12"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation","lastModifiedDate":"2017-10-12"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-11"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-24"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-24"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-24"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {","lastModifiedDate":"2017-10-24"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","lastModifiedDate":"2017-10-24"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only","lastModifiedDate":"2017-10-24"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string","lastModifiedDate":"2017-10-24"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names","lastModifiedDate":"2017-10-24"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character","lastModifiedDate":"2017-10-24"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces","lastModifiedDate":"2017-10-24"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols","lastModifiedDate":"2017-10-24"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-24"}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-05-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-05-05"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-05-05"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-05-05"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","lastModifiedDate":"2017-05-05"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;","lastModifiedDate":"2017-05-05"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-06-05"},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-05-05"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects.","lastModifiedDate":"2017-05-05"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {","lastModifiedDate":"2017-05-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;","lastModifiedDate":"2017-05-05"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {","lastModifiedDate":"2017-05-05"},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","lastModifiedDate":"2017-05-05"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {","lastModifiedDate":"2017-05-05"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);","lastModifiedDate":"2017-05-05"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details","lastModifiedDate":"2017-06-05"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {","lastModifiedDate":"2017-08-15"},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","lastModifiedDate":"2017-06-05"},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());","lastModifiedDate":"2017-06-21"},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());","lastModifiedDate":"2017-06-21"},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());","lastModifiedDate":"2017-06-21"},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());","lastModifiedDate":"2017-06-21"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());","lastModifiedDate":"2017-10-22"},{"lineNumber":36,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());","lastModifiedDate":"2017-06-21"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05"},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {","lastModifiedDate":"2017-08-15"},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);","lastModifiedDate":"2017-06-21"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":48,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {","lastModifiedDate":"2017-08-15"},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":56,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);","lastModifiedDate":"2017-06-21"},{"lineNumber":57,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {","lastModifiedDate":"2017-08-15"},{"lineNumber":67,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);","lastModifiedDate":"2017-06-21"},{"lineNumber":69,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {","lastModifiedDate":"2017-08-15"},{"lineNumber":79,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);","lastModifiedDate":"2017-06-21"},{"lineNumber":81,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":82,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":84,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":86,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-10-22"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {","lastModifiedDate":"2017-10-22"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-22"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);","lastModifiedDate":"2017-10-22"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-22"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","lastModifiedDate":"2017-10-22"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" return this;","lastModifiedDate":"2017-10-22"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22"},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}","lastModifiedDate":"2017-07-26"},{"lineNumber":101,"author":{"gitId":"-"},"content":" * that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":102,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":103,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {","lastModifiedDate":"2017-08-15"},{"lineNumber":104,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":105,"author":{"gitId":"-"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));","lastModifiedDate":"2017-06-21"},{"lineNumber":106,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":107,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":111,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-10-25"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {","lastModifiedDate":"2017-10-25"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));","lastModifiedDate":"2017-10-25"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return this;","lastModifiedDate":"2017-10-25"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {","lastModifiedDate":"2017-05-05"},{"lineNumber":121,"author":{"gitId":"-"},"content":" return descriptor;","lastModifiedDate":"2017-05-05"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05"},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-05"}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":8,"-":102}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-10-26"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","lastModifiedDate":"2017-10-26"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-26"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","lastModifiedDate":"2017-10-26"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;","lastModifiedDate":"2017-10-26"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-26"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-26"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects.","lastModifiedDate":"2017-10-26"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {","lastModifiedDate":"2017-10-26"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;","lastModifiedDate":"2017-10-26"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {","lastModifiedDate":"2017-10-26"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","lastModifiedDate":"2017-10-26"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {","lastModifiedDate":"2017-10-26"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);","lastModifiedDate":"2017-10-26"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details","lastModifiedDate":"2017-10-26"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {","lastModifiedDate":"2017-10-26"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","lastModifiedDate":"2017-10-26"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());","lastModifiedDate":"2017-10-26"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());","lastModifiedDate":"2017-10-26"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());","lastModifiedDate":"2017-10-26"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());","lastModifiedDate":"2017-10-26"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building.","lastModifiedDate":"2017-10-26"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {","lastModifiedDate":"2017-10-26"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);","lastModifiedDate":"2017-10-26"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","lastModifiedDate":"2017-10-26"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-26"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building.","lastModifiedDate":"2017-10-26"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {","lastModifiedDate":"2017-10-26"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);","lastModifiedDate":"2017-10-26"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","lastModifiedDate":"2017-10-26"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-26"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building.","lastModifiedDate":"2017-10-26"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {","lastModifiedDate":"2017-10-26"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);","lastModifiedDate":"2017-10-26"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","lastModifiedDate":"2017-10-26"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-26"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building.","lastModifiedDate":"2017-10-26"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {","lastModifiedDate":"2017-10-26"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);","lastModifiedDate":"2017-10-26"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","lastModifiedDate":"2017-10-26"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-26"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {","lastModifiedDate":"2017-10-26"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return descriptor;","lastModifiedDate":"2017-10-26"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26"}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","lastModifiedDate":"2016-09-03"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-04-05"},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-01-18"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-01-18"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-01-18"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-04-05"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-01-18"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-05-03"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-23"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-04-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","lastModifiedDate":"2017-04-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-03"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects.","lastModifiedDate":"2017-04-05"},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-03"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonBuilder {","lastModifiedDate":"2016-09-03"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";","lastModifiedDate":"2017-04-05"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";","lastModifiedDate":"2017-04-05"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";","lastModifiedDate":"2017-04-05"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";","lastModifiedDate":"2017-04-05"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";","lastModifiedDate":"2017-10-25"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";","lastModifiedDate":"2017-10-23"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";","lastModifiedDate":"2017-04-05"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private Person person;","lastModifiedDate":"2017-04-05"},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public PersonBuilder() {","lastModifiedDate":"2017-08-15"},{"lineNumber":32,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":33,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);","lastModifiedDate":"2017-04-05"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);","lastModifiedDate":"2017-04-05"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);","lastModifiedDate":"2017-04-05"},{"lineNumber":36,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);","lastModifiedDate":"2017-04-05"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);","lastModifiedDate":"2017-10-25"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);","lastModifiedDate":"2017-10-23"},{"lineNumber":39,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);","lastModifiedDate":"2017-04-05"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,","lastModifiedDate":"2017-10-25"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" defaultRemark, defaultTags);","lastModifiedDate":"2017-10-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":43,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03"},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-11"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}.","lastModifiedDate":"2016-12-11"},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-11"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {","lastModifiedDate":"2017-05-03"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);","lastModifiedDate":"2017-04-05"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-11"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-11"},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {","lastModifiedDate":"2017-08-15"},{"lineNumber":58,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));","lastModifiedDate":"2016-09-03"},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":61,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03"},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {","lastModifiedDate":"2017-08-15"},{"lineNumber":70,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));","lastModifiedDate":"2017-04-05"},{"lineNumber":72,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03"},{"lineNumber":77,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":78,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":79,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":80,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {","lastModifiedDate":"2017-08-15"},{"lineNumber":82,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));","lastModifiedDate":"2016-09-21"},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03"},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {","lastModifiedDate":"2017-10-23"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-23"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));","lastModifiedDate":"2017-10-23"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-23"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");","lastModifiedDate":"2017-10-23"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return this;","lastModifiedDate":"2017-10-23"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {","lastModifiedDate":"2017-08-15"},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":107,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));","lastModifiedDate":"2016-09-21"},{"lineNumber":108,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":109,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":111,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03"},{"lineNumber":113,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26"},{"lineNumber":116,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":117,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {","lastModifiedDate":"2017-08-15"},{"lineNumber":118,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15"},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));","lastModifiedDate":"2016-09-21"},{"lineNumber":120,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15"},{"lineNumber":121,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","lastModifiedDate":"2017-08-15"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03"},{"lineNumber":125,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building.","lastModifiedDate":"2017-10-25"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {","lastModifiedDate":"2017-10-25"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));","lastModifiedDate":"2017-10-25"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return this;","lastModifiedDate":"2017-10-25"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25"},{"lineNumber":134,"author":{"gitId":"-"},"content":" public Person build() {","lastModifiedDate":"2017-04-05"},{"lineNumber":135,"author":{"gitId":"-"},"content":" return this.person;","lastModifiedDate":"2016-09-03"},{"lineNumber":136,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03"},{"lineNumber":137,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03"},{"lineNumber":138,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-03"}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":12,"-":113}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-10-23"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-23"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-23"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-23"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects.","lastModifiedDate":"2017-10-23"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {","lastModifiedDate":"2017-10-23"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;","lastModifiedDate":"2017-10-23"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {","lastModifiedDate":"2017-10-23"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","lastModifiedDate":"2017-10-23"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {","lastModifiedDate":"2017-10-23"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);","lastModifiedDate":"2017-10-23"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details","lastModifiedDate":"2017-10-23"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-23"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","lastModifiedDate":"2017-10-23"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().isPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().isPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().isPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().isPrivate());","lastModifiedDate":"2017-10-23"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building.","lastModifiedDate":"2017-10-23"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {","lastModifiedDate":"2017-10-23"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {","lastModifiedDate":"2017-10-23"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","lastModifiedDate":"2017-10-23"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {","lastModifiedDate":"2017-10-23"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","lastModifiedDate":"2017-10-23"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-23"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");","lastModifiedDate":"2017-10-23"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" return this;","lastModifiedDate":"2017-10-23"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building.","lastModifiedDate":"2017-10-23"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {","lastModifiedDate":"2017-10-23"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","lastModifiedDate":"2017-10-23"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","lastModifiedDate":"2017-10-23"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","lastModifiedDate":"2017-10-23"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","lastModifiedDate":"2017-10-23"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-23"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","lastModifiedDate":"2017-10-23"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" return this;","lastModifiedDate":"2017-10-23"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building.","lastModifiedDate":"2017-10-23"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {","lastModifiedDate":"2017-10-23"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","lastModifiedDate":"2017-10-23"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","lastModifiedDate":"2017-10-23"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","lastModifiedDate":"2017-10-23"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","lastModifiedDate":"2017-10-23"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-23"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","lastModifiedDate":"2017-10-23"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" return this;","lastModifiedDate":"2017-10-23"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building.","lastModifiedDate":"2017-10-23"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {","lastModifiedDate":"2017-10-23"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","lastModifiedDate":"2017-10-23"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","lastModifiedDate":"2017-10-23"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","lastModifiedDate":"2017-10-23"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","lastModifiedDate":"2017-10-23"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-23"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","lastModifiedDate":"2017-10-23"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return this;","lastModifiedDate":"2017-10-23"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {","lastModifiedDate":"2017-10-23"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","lastModifiedDate":"2017-10-23"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-23"}],"authorContributionMap":{"jeffreygohkw":90}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-04-05"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-05-09"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-05-09"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-05-09"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-23"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-05-09"},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-09"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-03-29"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-07-19"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05"},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-04-05"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * A utility class for Person.","lastModifiedDate":"2017-04-05"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-04-05"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class PersonUtil {","lastModifiedDate":"2017-04-05"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05"},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-04-05"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}.","lastModifiedDate":"2017-04-05"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-04-05"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {","lastModifiedDate":"2017-07-19"},{"lineNumber":22,"author":{"gitId":"-"},"content":" return AddCommand.COMMAND_WORD + \" \" + getPersonDetails(person);","lastModifiedDate":"2017-03-29"},{"lineNumber":23,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-04-06"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-06"},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-04-06"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details.","lastModifiedDate":"2017-04-06"},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-04-06"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {","lastModifiedDate":"2017-07-19"},{"lineNumber":29,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","lastModifiedDate":"2017-04-05"},{"lineNumber":30,"author":{"gitId":"-"},"content":" sb.append(PREFIX_NAME + person.getName().fullName + \" \");","lastModifiedDate":"2017-06-06"},{"lineNumber":31,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");","lastModifiedDate":"2017-05-09"},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");","lastModifiedDate":"2017-05-09"},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");","lastModifiedDate":"2017-05-09"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");","lastModifiedDate":"2017-10-23"},{"lineNumber":35,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach(","lastModifiedDate":"2017-05-09"},{"lineNumber":36,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")","lastModifiedDate":"2017-05-09"},{"lineNumber":37,"author":{"gitId":"-"},"content":" );","lastModifiedDate":"2017-05-09"},{"lineNumber":38,"author":{"gitId":"-"},"content":" return sb.toString();","lastModifiedDate":"2017-04-05"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-04-05"},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-04-05"}],"authorContributionMap":{"charlesgoh":2,"-":38}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-10-24"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-24"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-24"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-24"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-24"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects.","lastModifiedDate":"2017-10-24"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {","lastModifiedDate":"2017-10-24"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";","lastModifiedDate":"2017-10-24"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";","lastModifiedDate":"2017-10-24"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";","lastModifiedDate":"2017-10-24"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";","lastModifiedDate":"2017-10-24"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private Task task;","lastModifiedDate":"2017-10-24"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {","lastModifiedDate":"2017-10-24"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);","lastModifiedDate":"2017-10-24"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);","lastModifiedDate":"2017-10-24"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);","lastModifiedDate":"2017-10-24"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);","lastModifiedDate":"2017-10-24"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority);","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");","lastModifiedDate":"2017-10-24"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}.","lastModifiedDate":"2017-10-24"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {","lastModifiedDate":"2017-10-24"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);","lastModifiedDate":"2017-10-24"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building.","lastModifiedDate":"2017-10-24"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {","lastModifiedDate":"2017-10-24"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-24"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building.","lastModifiedDate":"2017-10-24"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {","lastModifiedDate":"2017-10-24"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));","lastModifiedDate":"2017-10-24"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","lastModifiedDate":"2017-10-24"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-24"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building.","lastModifiedDate":"2017-10-24"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {","lastModifiedDate":"2017-10-24"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));","lastModifiedDate":"2017-10-24"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","lastModifiedDate":"2017-10-24"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-24"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building.","lastModifiedDate":"2017-10-24"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {","lastModifiedDate":"2017-10-24"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));","lastModifiedDate":"2017-10-24"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","lastModifiedDate":"2017-10-24"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-24"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public Task build() {","lastModifiedDate":"2017-10-24"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return this.task;","lastModifiedDate":"2017-10-24"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-24"}],"authorContributionMap":{"Esilocke":93}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","lastModifiedDate":"2016-09-13"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE;","lastModifiedDate":"2017-10-25"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","lastModifiedDate":"2017-10-24"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","lastModifiedDate":"2017-10-24"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-08-22"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-08-22"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-08-07"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-08-07"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-08-07"},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-07"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2016-09-21"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-07-19"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13"},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-13"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","lastModifiedDate":"2017-08-05"},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-13"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class TypicalPersons {","lastModifiedDate":"2017-04-05"},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","lastModifiedDate":"2017-09-21"},{"lineNumber":31,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","lastModifiedDate":"2017-04-05"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")","lastModifiedDate":"2017-10-25"},{"lineNumber":33,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();","lastModifiedDate":"2016-09-13"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","lastModifiedDate":"2017-09-21"},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","lastModifiedDate":"2017-09-21"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")","lastModifiedDate":"2017-10-25"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();","lastModifiedDate":"2017-10-25"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","lastModifiedDate":"2017-09-21"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","lastModifiedDate":"2017-09-21"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","lastModifiedDate":"2017-09-21"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","lastModifiedDate":"2017-09-21"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","lastModifiedDate":"2017-09-21"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25"},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13"},{"lineNumber":49,"author":{"gitId":"-"},"content":" // Manually added","lastModifiedDate":"2016-09-13"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","lastModifiedDate":"2017-09-21"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","lastModifiedDate":"2017-09-21"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25"},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","lastModifiedDate":"2017-08-22"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","lastModifiedDate":"2017-09-21"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","lastModifiedDate":"2017-10-25"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_AMY)","lastModifiedDate":"2017-10-25"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-09-21"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","lastModifiedDate":"2017-10-25"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_BOB)","lastModifiedDate":"2017-10-25"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","lastModifiedDate":"2017-09-21"},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13"},{"lineNumber":67,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","lastModifiedDate":"2017-07-20"},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-20"},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","lastModifiedDate":"2017-08-05"},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static AddressBook getTypicalAddressBook() {","lastModifiedDate":"2017-08-05"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","lastModifiedDate":"2017-08-05"},{"lineNumber":74,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {","lastModifiedDate":"2017-08-04"},{"lineNumber":75,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-13"},{"lineNumber":76,"author":{"gitId":"-"},"content":" ab.addPerson(person);","lastModifiedDate":"2017-08-05"},{"lineNumber":77,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-06-09"},{"lineNumber":78,"author":{"gitId":"-"},"content":" assert false : \"not possible\";","lastModifiedDate":"2016-09-13"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-13"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-13"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return ab;","lastModifiedDate":"2016-09-24"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24"},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-04"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {","lastModifiedDate":"2017-10-20"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","lastModifiedDate":"2017-10-20"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {","lastModifiedDate":"2017-10-20"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-20"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","lastModifiedDate":"2017-10-20"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-10-20"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","lastModifiedDate":"2017-10-20"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return ab;","lastModifiedDate":"2017-10-20"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {","lastModifiedDate":"2017-08-07"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","lastModifiedDate":"2017-08-07"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-04"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {","lastModifiedDate":"2017-10-20"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));","lastModifiedDate":"2017-10-20"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20"},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-13"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":14,"wangyiming1019":15,"-":68}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-10-26"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","lastModifiedDate":"2017-10-26"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","lastModifiedDate":"2017-10-26"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","lastModifiedDate":"2017-10-26"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","lastModifiedDate":"2017-10-26"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","lastModifiedDate":"2017-10-26"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-26"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-26"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-26"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-10-26"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-26"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-26"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-26"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests.","lastModifiedDate":"2017-10-26"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {","lastModifiedDate":"2017-10-26"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")","lastModifiedDate":"2017-10-26"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")","lastModifiedDate":"2017-10-26"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").build();","lastModifiedDate":"2017-10-26"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")","lastModifiedDate":"2017-10-26"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\")","lastModifiedDate":"2017-10-26"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"09-11-2018\").withPriority(\"5\").build();","lastModifiedDate":"2017-10-26"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")","lastModifiedDate":"2017-10-26"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")","lastModifiedDate":"2017-10-26"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-12-2016\").withPriority(\"5\").build();","lastModifiedDate":"2017-10-26"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")","lastModifiedDate":"2017-10-26"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")","lastModifiedDate":"2017-10-26"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21.05.2015\").withPriority(\"5\").build();","lastModifiedDate":"2017-10-26"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")","lastModifiedDate":"2017-10-26"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")","lastModifiedDate":"2017-10-26"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"30-04-2017\").withPriority(\"1\").build();","lastModifiedDate":"2017-10-26"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")","lastModifiedDate":"2017-10-26"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")","lastModifiedDate":"2017-10-26"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21.08.2019\").withPriority(\"2\").build();","lastModifiedDate":"2017-10-26"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")","lastModifiedDate":"2017-10-26"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")","lastModifiedDate":"2017-10-26"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06.06.2016\").withPriority(\"5\").build();","lastModifiedDate":"2017-10-26"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}","lastModifiedDate":"2017-10-26"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","lastModifiedDate":"2017-10-26"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","lastModifiedDate":"2017-10-26"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","lastModifiedDate":"2017-10-26"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)","lastModifiedDate":"2017-10-26"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","lastModifiedDate":"2017-10-26"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","lastModifiedDate":"2017-10-26"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation","lastModifiedDate":"2017-10-26"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons.","lastModifiedDate":"2017-10-26"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksForAddressBook() {","lastModifiedDate":"2017-10-26"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","lastModifiedDate":"2017-10-26"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {","lastModifiedDate":"2017-10-26"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","lastModifiedDate":"2017-10-26"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","lastModifiedDate":"2017-10-26"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","lastModifiedDate":"2017-10-26"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return ab;","lastModifiedDate":"2017-10-26"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {","lastModifiedDate":"2017-10-26"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));","lastModifiedDate":"2017-10-26"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26"}],"authorContributionMap":{"Esilocke":76}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2017-07-06"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","lastModifiedDate":"2017-08-23"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-07-06"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","lastModifiedDate":"2017-08-05"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","lastModifiedDate":"2017-07-19"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","lastModifiedDate":"2017-10-29"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","lastModifiedDate":"2017-07-06"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;","lastModifiedDate":"2017-10-29"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;","lastModifiedDate":"2017-10-29"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;","lastModifiedDate":"2017-07-06"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;","lastModifiedDate":"2017-08-04"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","lastModifiedDate":"2017-07-06"},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;","lastModifiedDate":"2017-07-06"},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Before;","lastModifiedDate":"2017-07-06"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-07-06"},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","lastModifiedDate":"2017-07-06"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2017-07-06"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","lastModifiedDate":"2017-10-29"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","lastModifiedDate":"2017-07-06"},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {","lastModifiedDate":"2017-07-06"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;","lastModifiedDate":"2017-07-06"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;","lastModifiedDate":"2017-10-29"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","lastModifiedDate":"2017-07-06"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;","lastModifiedDate":"2017-07-06"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Before","lastModifiedDate":"2017-07-06"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setUp() {","lastModifiedDate":"2017-08-15"},{"lineNumber":34,"author":{"gitId":"-"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE, 0));","lastModifiedDate":"2017-07-06"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);","lastModifiedDate":"2017-10-29"},{"lineNumber":36,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());","lastModifiedDate":"2017-07-06"},{"lineNumber":37,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);","lastModifiedDate":"2017-07-06"},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":39,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());","lastModifiedDate":"2017-07-06"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-06"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-06"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() throws Exception {","lastModifiedDate":"2017-07-06"},{"lineNumber":44,"author":{"gitId":"-"},"content":" // default web page","lastModifiedDate":"2017-07-06"},{"lineNumber":45,"author":{"gitId":"-"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","lastModifiedDate":"2017-07-06"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());","lastModifiedDate":"2017-07-06"},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06"},{"lineNumber":48,"author":{"gitId":"-"},"content":" // associated web page of a person","lastModifiedDate":"2017-07-06"},{"lineNumber":49,"author":{"gitId":"-"},"content":" postNow(selectionChangedEventStub);","lastModifiedDate":"2017-08-05"},{"lineNumber":50,"author":{"gitId":"-"},"content":" URL expectedPersonUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX","lastModifiedDate":"2017-07-06"},{"lineNumber":51,"author":{"gitId":"-"},"content":" + ALICE.getName().fullName.replaceAll(\" \", \"+\") + GOOGLE_SEARCH_URL_SUFFIX);","lastModifiedDate":"2017-08-04"},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-04"},{"lineNumber":53,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","lastModifiedDate":"2017-08-23"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(expectedPersonUrl, browserPanelHandle.getLoadedUrl());","lastModifiedDate":"2017-07-06"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","lastModifiedDate":"2017-10-29"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);","lastModifiedDate":"2017-10-29"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX","lastModifiedDate":"2017-10-29"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX);","lastModifiedDate":"2017-10-29"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","lastModifiedDate":"2017-10-29"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());","lastModifiedDate":"2017-10-29"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-06"},{"lineNumber":64,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-06"}],"authorContributionMap":{"jeffreygohkw":14,"-":50}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2017-07-01"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-07-01"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","lastModifiedDate":"2017-08-05"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","lastModifiedDate":"2017-07-01"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","lastModifiedDate":"2017-07-01"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;","lastModifiedDate":"2017-07-01"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;","lastModifiedDate":"2017-07-01"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;","lastModifiedDate":"2017-07-01"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","lastModifiedDate":"2017-07-01"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;","lastModifiedDate":"2017-07-01"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","lastModifiedDate":"2017-07-01"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","lastModifiedDate":"2017-07-01"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-07-01"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","lastModifiedDate":"2017-07-01"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","lastModifiedDate":"2017-07-01"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-07-01"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {","lastModifiedDate":"2017-07-01"},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";","lastModifiedDate":"2017-07-01"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";","lastModifiedDate":"2017-07-01"},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());","lastModifiedDate":"2017-07-01"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();","lastModifiedDate":"2017-07-01"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());","lastModifiedDate":"2017-07-01"},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;","lastModifiedDate":"2017-07-01"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass","lastModifiedDate":"2017-07-01"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {","lastModifiedDate":"2017-07-01"},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock","lastModifiedDate":"2017-07-01"},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);","lastModifiedDate":"2017-07-01"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass","lastModifiedDate":"2017-07-01"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {","lastModifiedDate":"2017-07-01"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock","lastModifiedDate":"2017-07-01"},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);","lastModifiedDate":"2017-07-01"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before","lastModifiedDate":"2017-07-01"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {","lastModifiedDate":"2017-08-15"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());","lastModifiedDate":"2017-10-19"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);","lastModifiedDate":"2017-10-19"},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());","lastModifiedDate":"2017-10-19"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-01"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {","lastModifiedDate":"2017-08-15"},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state","lastModifiedDate":"2017-07-01"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);","lastModifiedDate":"2017-07-01"},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated","lastModifiedDate":"2017-07-01"},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);","lastModifiedDate":"2017-08-05"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,","lastModifiedDate":"2017-07-01"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));","lastModifiedDate":"2017-07-01"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01"},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-01"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the","lastModifiedDate":"2017-07-01"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}.","lastModifiedDate":"2017-07-01"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-01"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {","lastModifiedDate":"2017-07-01"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());","lastModifiedDate":"2017-07-01"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());","lastModifiedDate":"2017-07-01"},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","lastModifiedDate":"2017-07-01"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01"},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01"},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-01"}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-12-21"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2016-12-21"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","lastModifiedDate":"2016-12-21"},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","lastModifiedDate":"2016-12-21"},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2016-12-21"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2016-12-21"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2016-12-21"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","lastModifiedDate":"2016-12-21"},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-12-21"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2016-12-21"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {","lastModifiedDate":"2016-12-21"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","lastModifiedDate":"2016-12-21"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","lastModifiedDate":"2016-12-21"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","lastModifiedDate":"2016-12-21"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","lastModifiedDate":"2016-12-21"},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2016-12-21"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2016-12-21"},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2016-12-21"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","lastModifiedDate":"2016-12-21"},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-21"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void constructor_nullFileUrl_throwsNullPointerException() {","lastModifiedDate":"2017-05-15"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15"},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);","lastModifiedDate":"2016-12-21"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-21"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public void constructor_missingFileUrl_throwsAssertionError() throws Exception {","lastModifiedDate":"2016-12-21"},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","lastModifiedDate":"2016-12-21"},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","lastModifiedDate":"2016-12-21"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);","lastModifiedDate":"2016-12-21"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // public void constructor_invalidFileUrl_throwsAssertionError() {","lastModifiedDate":"2017-10-24"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" // URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","lastModifiedDate":"2017-10-24"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" // thrown.expect(AssertionError.class);","lastModifiedDate":"2017-10-24"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" // new TestUiPart\u003cObject\u003e(invalidFileUrl);","lastModifiedDate":"2017-10-24"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" // }","lastModifiedDate":"2017-10-24"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" //","lastModifiedDate":"2017-10-24"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" // @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" // public void constructor_validFileUrl_loadsFile() {","lastModifiedDate":"2017-10-24"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","lastModifiedDate":"2017-10-24"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" // assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","lastModifiedDate":"2017-10-24"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // }","lastModifiedDate":"2017-10-24"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-21"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void constructor_nullFileName_throwsNullPointerException() {","lastModifiedDate":"2017-05-15"},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15"},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);","lastModifiedDate":"2016-12-21"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-21"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void constructor_missingFileName_throwsNullPointerException() {","lastModifiedDate":"2017-05-15"},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15"},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);","lastModifiedDate":"2016-12-21"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21"},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" // @Test","lastModifiedDate":"2017-10-24"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // public void constructor_invalidFileName_throwsAssertionError() {","lastModifiedDate":"2017-10-24"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" // thrown.expect(AssertionError.class);","lastModifiedDate":"2017-10-24"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);","lastModifiedDate":"2017-10-24"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" // }","lastModifiedDate":"2017-10-24"},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","lastModifiedDate":"2016-12-21"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","lastModifiedDate":"2016-12-21"},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","lastModifiedDate":"2016-12-21"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","lastModifiedDate":"2016-12-21"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;","lastModifiedDate":"2016-12-21"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21"},{"lineNumber":80,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-21"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing.","lastModifiedDate":"2016-12-21"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","lastModifiedDate":"2016-12-21"},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-21"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","lastModifiedDate":"2016-12-21"},{"lineNumber":86,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-12-21"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","lastModifiedDate":"2016-12-21"},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","lastModifiedDate":"2016-12-21"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","lastModifiedDate":"2016-12-21"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","lastModifiedDate":"2016-12-21"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21"},{"lineNumber":94,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","lastModifiedDate":"2016-12-21"},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);","lastModifiedDate":"2016-12-21"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","lastModifiedDate":"2016-12-21"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21"},{"lineNumber":99,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21"},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21"},{"lineNumber":102,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-12-21"}],"authorContributionMap":{"charlesgoh":17,"-":85}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","lastModifiedDate":"2017-08-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-08-22"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","lastModifiedDate":"2017-08-22"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","lastModifiedDate":"2017-08-22"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","lastModifiedDate":"2017-08-22"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","lastModifiedDate":"2017-08-22"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","lastModifiedDate":"2017-10-23"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","lastModifiedDate":"2017-08-22"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","lastModifiedDate":"2017-08-22"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","lastModifiedDate":"2017-10-24"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-08-22"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-08-22"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","lastModifiedDate":"2017-08-22"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","lastModifiedDate":"2017-08-22"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","lastModifiedDate":"2017-08-22"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","lastModifiedDate":"2017-08-22"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","lastModifiedDate":"2017-08-22"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-08-22"},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-08-22"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-08-22"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-08-22"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","lastModifiedDate":"2017-08-22"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-08-22"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","lastModifiedDate":"2017-08-22"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-08-22"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-08-22"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-08-22"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-08-22"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-08-22"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-08-22"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-08-22"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-08-22"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-08-22"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","lastModifiedDate":"2017-08-22"},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":59,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {","lastModifiedDate":"2017-08-22"},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-08-22"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {","lastModifiedDate":"2017-08-22"},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","lastModifiedDate":"2017-09-08"},{"lineNumber":64,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","lastModifiedDate":"2017-08-22"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * -\u003e added","lastModifiedDate":"2017-08-22"},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22"},{"lineNumber":67,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;","lastModifiedDate":"2017-08-22"},{"lineNumber":68,"author":{"gitId":"-"},"content":" String command \u003d \" \" + AddCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \"","lastModifiedDate":"2017-08-22"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";","lastModifiedDate":"2017-10-23"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":72,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","lastModifiedDate":"2017-08-22"},{"lineNumber":73,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","lastModifiedDate":"2017-08-22"},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-08-22"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","lastModifiedDate":"2017-08-22"},{"lineNumber":76,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","lastModifiedDate":"2017-08-22"},{"lineNumber":78,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","lastModifiedDate":"2017-08-22"},{"lineNumber":79,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-08-22"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","lastModifiedDate":"2017-08-22"},{"lineNumber":82,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":84,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-08-22"},{"lineNumber":87,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":88,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":89,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","lastModifiedDate":"2017-08-22"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","lastModifiedDate":"2017-10-24"},{"lineNumber":91,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)","lastModifiedDate":"2017-08-22"},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","lastModifiedDate":"2017-10-23"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-08-22"},{"lineNumber":95,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":96,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","lastModifiedDate":"2017-08-22"},{"lineNumber":97,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","lastModifiedDate":"2017-08-22"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-23"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","lastModifiedDate":"2017-08-22"},{"lineNumber":104,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","lastModifiedDate":"2017-08-22"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24"},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23"},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":109,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":110,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","lastModifiedDate":"2017-08-22"},{"lineNumber":111,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","lastModifiedDate":"2017-08-22"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23"},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","lastModifiedDate":"2017-08-22"},{"lineNumber":118,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","lastModifiedDate":"2017-08-22"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24"},{"lineNumber":120,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","lastModifiedDate":"2017-08-22"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":123,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */","lastModifiedDate":"2017-10-24"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","lastModifiedDate":"2017-10-24"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-10-24"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-24"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-10-24"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-24"},{"lineNumber":131,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","lastModifiedDate":"2017-08-22"},{"lineNumber":132,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);","lastModifiedDate":"2017-08-22"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()","lastModifiedDate":"2017-09-08"},{"lineNumber":134,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();","lastModifiedDate":"2017-09-08"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","lastModifiedDate":"2017-08-22"},{"lineNumber":136,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","lastModifiedDate":"2017-08-22"},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","lastModifiedDate":"2017-08-22"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","lastModifiedDate":"2017-09-08"},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","lastModifiedDate":"2017-08-22"},{"lineNumber":141,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":142,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","lastModifiedDate":"2017-08-22"},{"lineNumber":143,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","lastModifiedDate":"2017-08-22"},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","lastModifiedDate":"2017-08-22"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;","lastModifiedDate":"2017-10-23"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":147,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","lastModifiedDate":"2017-08-22"},{"lineNumber":149,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" 1\");","lastModifiedDate":"2017-08-22"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();","lastModifiedDate":"2017-08-22"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","lastModifiedDate":"2017-08-22"},{"lineNumber":152,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","lastModifiedDate":"2017-08-22"},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","lastModifiedDate":"2017-08-22"},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-08-22"},{"lineNumber":159,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-08-22"},{"lineNumber":163,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-08-22"},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-08-22"},{"lineNumber":171,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":173,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2017-08-22"},{"lineNumber":175,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY","lastModifiedDate":"2017-10-23"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-08-22"},{"lineNumber":180,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY","lastModifiedDate":"2017-10-23"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":184,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","lastModifiedDate":"2017-08-22"},{"lineNumber":185,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":186,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC","lastModifiedDate":"2017-10-23"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","lastModifiedDate":"2017-08-22"},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","lastModifiedDate":"2017-10-23"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;","lastModifiedDate":"2017-10-23"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-08-22"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":196,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":197,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22"},{"lineNumber":198,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and verifies that the command box displays","lastModifiedDate":"2017-08-22"},{"lineNumber":199,"author":{"gitId":"-"},"content":" * an empty string, the result display box displays the success message of executing {@code AddCommand} with the","lastModifiedDate":"2017-08-22"},{"lineNumber":200,"author":{"gitId":"-"},"content":" * details of {@code toAdd}, and the model related components equal to the current model added with {@code toAdd}.","lastModifiedDate":"2017-08-22"},{"lineNumber":201,"author":{"gitId":"-"},"content":" * These verifications are done by","lastModifiedDate":"2017-08-22"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-08-22"},{"lineNumber":203,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,","lastModifiedDate":"2017-08-22"},{"lineNumber":204,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged.","lastModifiedDate":"2017-08-22"},{"lineNumber":205,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-08-22"},{"lineNumber":206,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22"},{"lineNumber":207,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {","lastModifiedDate":"2017-08-22"},{"lineNumber":208,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":210,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":211,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22"},{"lineNumber":212,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}","lastModifiedDate":"2017-08-22"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * instead.","lastModifiedDate":"2017-08-22"},{"lineNumber":214,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)","lastModifiedDate":"2017-08-22"},{"lineNumber":215,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22"},{"lineNumber":216,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {","lastModifiedDate":"2017-08-22"},{"lineNumber":217,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08"},{"lineNumber":218,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-22"},{"lineNumber":219,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":220,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-08-22"},{"lineNumber":221,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","lastModifiedDate":"2017-08-22"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":223,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);","lastModifiedDate":"2017-08-22"},{"lineNumber":224,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","lastModifiedDate":"2017-08-22"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22"},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result","lastModifiedDate":"2017-08-22"},{"lineNumber":230,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to","lastModifiedDate":"2017-08-22"},{"lineNumber":231,"author":{"gitId":"-"},"content":" * {@code expectedModel}.","lastModifiedDate":"2017-08-22"},{"lineNumber":232,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)","lastModifiedDate":"2017-08-22"},{"lineNumber":233,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22"},{"lineNumber":234,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","lastModifiedDate":"2017-08-22"},{"lineNumber":235,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-08-22"},{"lineNumber":236,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","lastModifiedDate":"2017-08-22"},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","lastModifiedDate":"2017-08-22"},{"lineNumber":239,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","lastModifiedDate":"2017-08-22"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":241,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","lastModifiedDate":"2017-08-22"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","lastModifiedDate":"2017-08-22"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * These verifications are done by","lastModifiedDate":"2017-08-22"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-08-22"},{"lineNumber":247,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","lastModifiedDate":"2017-08-22"},{"lineNumber":248,"author":{"gitId":"-"},"content":" * error style.","lastModifiedDate":"2017-08-22"},{"lineNumber":249,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-08-22"},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22"},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","lastModifiedDate":"2017-08-22"},{"lineNumber":252,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08"},{"lineNumber":253,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":254,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-08-22"},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","lastModifiedDate":"2017-08-22"},{"lineNumber":256,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","lastModifiedDate":"2017-08-22"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":260,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-08-22"}],"authorContributionMap":{"charlesgoh":36,"-":224}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","lastModifiedDate":"2017-08-22"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","lastModifiedDate":"2017-08-22"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","lastModifiedDate":"2017-10-28"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","lastModifiedDate":"2017-08-22"},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-08-22"},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-09-13"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-08-22"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-08-22"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-08-22"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-08-22"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-08-22"},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {","lastModifiedDate":"2017-08-22"},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-08-22"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void clear() {","lastModifiedDate":"2017-08-22"},{"lineNumber":20,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();","lastModifiedDate":"2017-09-08"},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing","lastModifiedDate":"2017-10-28"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared","lastModifiedDate":"2017-08-22"},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");","lastModifiedDate":"2017-10-28"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */","lastModifiedDate":"2017-08-22"},{"lineNumber":29,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;","lastModifiedDate":"2017-08-22"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS, TYPE_ALL);","lastModifiedDate":"2017-10-28"},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);","lastModifiedDate":"2017-08-22"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */","lastModifiedDate":"2017-08-22"},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","lastModifiedDate":"2017-08-22"},{"lineNumber":36,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-08-22"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","lastModifiedDate":"2017-08-22"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */","lastModifiedDate":"2017-08-22"},{"lineNumber":41,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","lastModifiedDate":"2017-08-22"},{"lineNumber":42,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","lastModifiedDate":"2017-09-13"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","lastModifiedDate":"2017-08-22"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","lastModifiedDate":"2017-08-22"},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":46,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */","lastModifiedDate":"2017-08-22"},{"lineNumber":47,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","lastModifiedDate":"2017-08-22"},{"lineNumber":48,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","lastModifiedDate":"2017-09-13"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","lastModifiedDate":"2017-08-22"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":52,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */","lastModifiedDate":"2017-08-22"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","lastModifiedDate":"2017-08-22"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","lastModifiedDate":"2017-08-22"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2017-08-22"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","lastModifiedDate":"2017-08-22"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model.","lastModifiedDate":"2017-08-22"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * These verifications are done by","lastModifiedDate":"2017-08-22"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-08-22"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes.","lastModifiedDate":"2017-08-22"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-08-22"},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {","lastModifiedDate":"2017-08-22"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL);","lastModifiedDate":"2017-10-28"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","lastModifiedDate":"2017-10-28"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":73,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22"},{"lineNumber":74,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays","lastModifiedDate":"2017-08-22"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}.","lastModifiedDate":"2017-08-22"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)","lastModifiedDate":"2017-08-22"},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22"},{"lineNumber":78,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {","lastModifiedDate":"2017-08-22"},{"lineNumber":79,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-08-22"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","lastModifiedDate":"2017-08-22"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","lastModifiedDate":"2017-08-22"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","lastModifiedDate":"2017-08-22"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","lastModifiedDate":"2017-08-22"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","lastModifiedDate":"2017-08-22"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * These verifications are done by","lastModifiedDate":"2017-08-22"},{"lineNumber":89,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-08-22"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","lastModifiedDate":"2017-08-22"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * error style.","lastModifiedDate":"2017-08-22"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-08-22"},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22"},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","lastModifiedDate":"2017-08-22"},{"lineNumber":95,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08"},{"lineNumber":96,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22"},{"lineNumber":97,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-08-22"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","lastModifiedDate":"2017-08-22"},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","lastModifiedDate":"2017-08-22"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","lastModifiedDate":"2017-08-22"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22"},{"lineNumber":103,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-08-22"}],"authorContributionMap":{"Esilocke":6,"-":97}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","lastModifiedDate":"2017-09-02"},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-09-19"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-09-19"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","lastModifiedDate":"2017-09-02"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","lastModifiedDate":"2017-09-02"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","lastModifiedDate":"2017-09-02"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","lastModifiedDate":"2017-09-02"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","lastModifiedDate":"2017-09-02"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","lastModifiedDate":"2017-09-02"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","lastModifiedDate":"2017-09-02"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","lastModifiedDate":"2017-09-02"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","lastModifiedDate":"2017-10-23"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","lastModifiedDate":"2017-09-02"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","lastModifiedDate":"2017-09-02"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","lastModifiedDate":"2017-10-23"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-09-02"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-09-02"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-09-02"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-09-02"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","lastModifiedDate":"2017-09-02"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","lastModifiedDate":"2017-09-02"},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-09-02"},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-09-02"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-09-02"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","lastModifiedDate":"2017-09-02"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-09-02"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-09-02"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-09-02"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-09-02"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-09-02"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-09-02"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-09-02"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-09-02"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-09-02"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-09-02"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-09-02"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-09-02"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","lastModifiedDate":"2017-09-02"},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":54,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {","lastModifiedDate":"2017-09-02"},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-09-02"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","lastModifiedDate":"2017-09-02"},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","lastModifiedDate":"2017-09-08"},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","lastModifiedDate":"2017-09-02"},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","lastModifiedDate":"2017-09-02"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited","lastModifiedDate":"2017-09-02"},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02"},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","lastModifiedDate":"2017-09-02"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB","lastModifiedDate":"2017-10-23"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";","lastModifiedDate":"2017-10-23"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-09-02"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","lastModifiedDate":"2017-10-23"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();","lastModifiedDate":"2017-10-23"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","lastModifiedDate":"2017-09-02"},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","lastModifiedDate":"2017-09-02"},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","lastModifiedDate":"2017-09-02"},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-09-02"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","lastModifiedDate":"2017-09-02"},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","lastModifiedDate":"2017-09-02"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","lastModifiedDate":"2017-09-02"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-09-02"},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson(","lastModifiedDate":"2017-09-02"},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","lastModifiedDate":"2017-09-08"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","lastModifiedDate":"2017-09-02"},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","lastModifiedDate":"2017-09-02"},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","lastModifiedDate":"2017-09-02"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","lastModifiedDate":"2017-10-23"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","lastModifiedDate":"2017-09-02"},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","lastModifiedDate":"2017-09-02"},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02"},{"lineNumber":93,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","lastModifiedDate":"2017-09-02"},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","lastModifiedDate":"2017-09-08"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();","lastModifiedDate":"2017-10-23"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","lastModifiedDate":"2017-09-02"},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","lastModifiedDate":"2017-09-02"},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02"},{"lineNumber":100,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","lastModifiedDate":"2017-09-02"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();","lastModifiedDate":"2017-10-23"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","lastModifiedDate":"2017-09-02"},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","lastModifiedDate":"2017-09-02"},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":106,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","lastModifiedDate":"2017-09-02"},{"lineNumber":107,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","lastModifiedDate":"2017-09-13"},{"lineNumber":108,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","lastModifiedDate":"2017-09-19"},{"lineNumber":110,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","lastModifiedDate":"2017-09-02"},{"lineNumber":111,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","lastModifiedDate":"2017-09-08"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","lastModifiedDate":"2017-10-24"},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","lastModifiedDate":"2017-09-02"},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","lastModifiedDate":"2017-09-02"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * -\u003e rejected","lastModifiedDate":"2017-09-02"},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02"},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","lastModifiedDate":"2017-09-13"},{"lineNumber":119,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","lastModifiedDate":"2017-09-08"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02"},{"lineNumber":121,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-09-02"},{"lineNumber":122,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":123,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","lastModifiedDate":"2017-09-02"},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":125,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","lastModifiedDate":"2017-09-02"},{"lineNumber":126,"author":{"gitId":"-"},"content":" * browser url changes","lastModifiedDate":"2017-09-02"},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02"},{"lineNumber":128,"author":{"gitId":"-"},"content":" showAllPersons();","lastModifiedDate":"2017-09-13"},{"lineNumber":129,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02"},{"lineNumber":130,"author":{"gitId":"-"},"content":" selectPerson(index);","lastModifiedDate":"2017-09-13"},{"lineNumber":131,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","lastModifiedDate":"2017-09-02"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23"},{"lineNumber":133,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","lastModifiedDate":"2017-09-02"},{"lineNumber":134,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","lastModifiedDate":"2017-09-02"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","lastModifiedDate":"2017-09-02"},{"lineNumber":136,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","lastModifiedDate":"2017-09-02"},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":139,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02"},{"lineNumber":141,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-09-02"},{"lineNumber":142,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":143,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02"},{"lineNumber":145,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-09-02"},{"lineNumber":146,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":148,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","lastModifiedDate":"2017-09-08"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02"},{"lineNumber":150,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-09-02"},{"lineNumber":151,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-09-02"},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","lastModifiedDate":"2017-09-02"},{"lineNumber":158,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);","lastModifiedDate":"2017-09-02"},{"lineNumber":159,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,","lastModifiedDate":"2017-09-02"},{"lineNumber":162,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-09-02"},{"lineNumber":163,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,","lastModifiedDate":"2017-09-02"},{"lineNumber":166,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);","lastModifiedDate":"2017-09-02"},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,","lastModifiedDate":"2017-09-02"},{"lineNumber":170,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);","lastModifiedDate":"2017-09-02"},{"lineNumber":171,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,","lastModifiedDate":"2017-09-02"},{"lineNumber":174,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-09-02"},{"lineNumber":175,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":177,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","lastModifiedDate":"2017-09-02"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","lastModifiedDate":"2017-09-19"},{"lineNumber":179,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02"},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","lastModifiedDate":"2017-09-19"},{"lineNumber":181,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","lastModifiedDate":"2017-09-02"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","lastModifiedDate":"2017-10-23"},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-09-02"},{"lineNumber":184,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","lastModifiedDate":"2017-09-02"},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","lastModifiedDate":"2017-09-02"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;","lastModifiedDate":"2017-10-23"},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-09-02"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02"},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that","lastModifiedDate":"2017-09-02"},{"lineNumber":193,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","lastModifiedDate":"2017-09-02"},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","lastModifiedDate":"2017-09-02"},{"lineNumber":195,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)","lastModifiedDate":"2017-09-02"},{"lineNumber":196,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02"},{"lineNumber":197,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {","lastModifiedDate":"2017-09-02"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","lastModifiedDate":"2017-09-02"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02"},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":203,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":204,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","lastModifiedDate":"2017-09-02"},{"lineNumber":205,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":206,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","lastModifiedDate":"2017-09-02"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","lastModifiedDate":"2017-09-02"},{"lineNumber":208,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02"},{"lineNumber":209,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,","lastModifiedDate":"2017-09-02"},{"lineNumber":210,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","lastModifiedDate":"2017-09-02"},{"lineNumber":211,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08"},{"lineNumber":212,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-09-02"},{"lineNumber":213,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","lastModifiedDate":"2017-09-02"},{"lineNumber":214,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","lastModifiedDate":"2017-09-02"},{"lineNumber":215,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-09-02"},{"lineNumber":216,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","lastModifiedDate":"2017-09-02"},{"lineNumber":217,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","lastModifiedDate":"2017-09-02"},{"lineNumber":218,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","lastModifiedDate":"2017-09-02"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02"},{"lineNumber":220,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","lastModifiedDate":"2017-09-02"},{"lineNumber":222,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);","lastModifiedDate":"2017-09-02"},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02"},{"lineNumber":224,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":225,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02"},{"lineNumber":226,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","lastModifiedDate":"2017-09-02"},{"lineNumber":227,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","lastModifiedDate":"2017-09-02"},{"lineNumber":228,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","lastModifiedDate":"2017-09-02"},{"lineNumber":229,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02"},{"lineNumber":230,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","lastModifiedDate":"2017-09-02"},{"lineNumber":231,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","lastModifiedDate":"2017-09-02"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02"},{"lineNumber":233,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":234,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02"},{"lineNumber":235,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":236,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":237,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":238,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":239,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","lastModifiedDate":"2017-09-02"},{"lineNumber":240,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","lastModifiedDate":"2017-09-02"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-09-02"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","lastModifiedDate":"2017-09-02"},{"lineNumber":247,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02"},{"lineNumber":248,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","lastModifiedDate":"2017-09-02"},{"lineNumber":249,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","lastModifiedDate":"2017-09-02"},{"lineNumber":250,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-09-02"},{"lineNumber":251,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-09-02"},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","lastModifiedDate":"2017-09-02"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","lastModifiedDate":"2017-09-02"},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","lastModifiedDate":"2017-09-02"},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","lastModifiedDate":"2017-09-02"},{"lineNumber":256,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2017-09-02"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-09-02"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02"},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","lastModifiedDate":"2017-09-02"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02"},{"lineNumber":261,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","lastModifiedDate":"2017-09-02"},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-09-02"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-09-02"},{"lineNumber":272,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02"},{"lineNumber":273,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","lastModifiedDate":"2017-09-02"},{"lineNumber":274,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08"},{"lineNumber":275,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02"},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-09-02"},{"lineNumber":277,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","lastModifiedDate":"2017-09-02"},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-09-02"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","lastModifiedDate":"2017-09-02"},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","lastModifiedDate":"2017-09-02"},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02"},{"lineNumber":282,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-09-02"}],"authorContributionMap":{"charlesgoh":14,"-":268}}] +[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\"]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface).","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"* It is a Java application primarily targeted for students doing group projects.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"_Marco Jakob_.","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","lastModifiedDate":"2017-05-30","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":7,"-":26}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/","lastModifiedDate":"2017-09-13","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","lastModifiedDate":"2017-08-01","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team.","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/.","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Charles Goh","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://charlesgoh.me[homepage]] [https://github.com/charlesgoh[github]]","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Jeffrey Goh","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Kelvin Lin","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esiloke[github]]","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Wang Yi Ming","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1090[github]]","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component","lastModifiedDate":"2017-10-09","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","lastModifiedDate":"2017-05-30","isFullCredit":true}],"authorContributionMap":{"charlesgoh":19,"-":29}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","lastModifiedDate":"2017-08-01","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them.","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-03","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started].","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"The `Storage` component,","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"// tag::undoredo[]","lastModifiedDate":"2017-07-31","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" // ... list logic ...","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" // ... undo logic ...","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" executeUndoableCommand();","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" // ... delete logic ...","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"---","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct.","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"---","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"---","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"// end::undoredo[]","lastModifiedDate":"2017-07-31","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-30","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the add, delete, list, select, and edit commands.","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Instead of making a new Logic object for each new command, polymorphism is used to implement the \"Task\" version of each command.","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"An example of using polymorphism to handle Person vs Task addition:","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"[source,java]","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"----","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"public class AddCommand extends Command {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Person(person);","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_PERSON;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" toAdd \u003d new Task(task);","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" toHandle \u003d HANDLE_TYPE_TASK;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"----","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"The AddCommand will thus call a different constructor depending on the type of the argument supplied to it. To facilitate this, the respective Parser class must also be modified:","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":"[source,java]","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"----","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(toAdd);","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"----","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":"The AddCommandParser checks the args to see if this is a task, then creates the object to be added, and creates a new AddCommand to handle the result. +","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"To support the addition of Task objects, the Storage component is modified to accept Task objects in a similar manner as to how Person objects are being stored.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"[source, html]","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"---","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"---","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":"Tasks objects are stored in the same level of hierarchy as Person objects, and during startup, are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use polymorphism to allow existing commands to implement the new commands +","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"**Pros:** Under this scheme, any command can be extended to allow addition of new commands of any type, without affecting the architecture significantly +","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"**Cons:** SRP may be violated as each Command class may now need to handle 2 different types of objects. +","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Create new classes for all new commands +","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"**Pros:** Simpler to implement. +","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"**Cons:** Code duplication occurs as the commands for Person and Tasks objects share the same structure.","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"---","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` method in UniquePersonList. It supports","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"charlesgoh"},"content":"The Logic Diagram for this sort command implementation is shown below:","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort name desc`. The following sequence diagram","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` class. +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the person lists. Future changes to the implementation will be easier as a consequence. +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList` will have to rely on the `SortCommand` class.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"charlesgoh"},"content":"---","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for both user and developer and reduced complexity in implementation. +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"charlesgoh"},"content":"The backup command makes use of both the model manager and the storage manager. The `LogicManager` class was","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"charlesgoh"},"content":"improved to support the accessing of storage value.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"charlesgoh"},"content":"The backup command arguments are parsed through the `BackupCommandParser`, which passes control over to the","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class. If there is a file path specified by the user, then the `execute()` command within the","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"charlesgoh"},"content":"`BackupCommand` class will save the backup file to that path. If not file path is specified, the backup file will be","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"charlesgoh"},"content":"saved to a default location.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup`. The backup file will be saved to a default location:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDefaultDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `backup testBackup.xml`. The following sequence diagram","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"charlesgoh"},"content":"demonstrates how this works:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceCustomDiagram.png[width\u003d\"800]","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods result in the actual person list being sorted.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement backup command via Command Line Interface +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Backing up data is easier and faster for users who are familiar with the commands. Less button clicks. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"charlesgoh"},"content":"**Cons:** UI not as intuitive. Users who are not familiar with the application may not know about this feature +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement backup command via GUI +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for all users since the options are all graphical +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hinders productivity. Excessive number of clicks to accomplish an essential task.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"charlesgoh"},"content":"---","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Custom and/or Default file paths for backup file +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implemented both types of commands +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"charlesgoh"},"content":"**Pros:** User can choose either command option. Gives the user more choices +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May seem confusing to the user at first +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement only the default option (save backup file to data directory of application) +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Faster for the user to key in one word rather than a command with many words +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Reduces choice for experienced users who may want to save to another location or use a different save name","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email` and `Address` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes.","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field.","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor.","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`.","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : Sequence Diagram for adding a Person with private fields_","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"jeffreygohkw"},"content":"@Override","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`.","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"jeffreygohkw"},"content":"----","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"-"},"content":" Name updatedName;","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"-"},"content":" return updatedName;","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":"---","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"_Figure 3.6.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"-"},"content":"**Alternative 2:** Enhance the functi-onality of EditCommand. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"[source, java]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":" return new LocateCommand(index);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"-"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of `Person`s, a `CommandException` will be thrown.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"This code for this can be found below:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"-"},"content":"[source, java]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"@Override","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"[source, java]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":"_Figure 3.7.1 : Sequence Diagram for Locating a Person\u0027s Address_","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Create a seperate command `locate`. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`addtag 1 2 3 t/friends`) will be executed.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"The same operation will happen for `deletetag` command.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"in a similar way.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"-"},"content":"public class AddTagCommand extends UndoableCommand {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"-"},"content":" // check whether the index within the range","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":" return new CommandResult();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"-"},"content":"Suppose the user enter the `addtag 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"-"},"content":"_Figure 3.8.1 : Add Tag Sequence Diagram for Logic_ +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"-"},"content":"The `deletetag` command works the same as `addtag` command with different name only.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `addtag` and `deletetag` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"-"},"content":"---","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `addtag` and `deletetag` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"-"},"content":"The `findtag` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"-"},"content":"[source,java]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"is for the tags to be excluded.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"[sourcce,java]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"-"},"content":"----","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"-"},"content":"Suppose the user enter `findtag friends` command. The following sequence diagram shows how the find tag command works:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":"_Figure 3.9.1 : Find Tag Sequence Diagram for Logic_ +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `findtag` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `findtag` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `findtag` command will be similar to the `find` command. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `findtag` in `FindCommand`. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":"*Logging Levels*","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"-"},"content":"There are three ways to run tests.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"[TIP]","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"We have two types of tests:","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"|`* * *` |user |add a new person |","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |first-time user |be able to see a user guide when I first start the program |be clear on how to use it","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with many social media accounts |be able to add my contacts\u0027 social media accounts to the address book |improve connectivity and learn more about my contacts","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"|`*` |user with many persons in the address book |sort persons by name |locate a person easily","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |non tech-savvy user |have the option to fill out certain fields |use the address book without having to use the intimidating CLI.","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |error-prone user |have minor typos auto corrected |continue using the address book without correcting my mistakes","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"[discrete]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"*MSS*","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"1. User requests to list persons","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"Use case ends.","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"*Extensions*","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"[none]","lastModifiedDate":"2017-09-04","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","lastModifiedDate":"2017-09-04","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-09-04","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":"Use case ends.","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid.","lastModifiedDate":"2017-09-04","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-09-04","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":"[none]","lastModifiedDate":"2017-09-04","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message.","lastModifiedDate":"2017-09-04","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"Use case resumes at step 2.","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"Esilocke"},"content":"[discrete]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"*MSS*","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"*Extensions*","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found.","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found.","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"[discrete]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"*MSS*","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"Esilocke"},"content":"*Extensions*","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid.","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message.","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"Esilocke"},"content":"[discrete]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"*MSS*","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":"*Extensions*","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands.","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands.","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"Esilocke"},"content":"[discrete]","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"*MSS*","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message.","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"Esilocke"},"content":"*Extensions*","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"Use case ends.","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid.","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"[none]","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message.","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"Esilocke"},"content":"+","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1.","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse.","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0.","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing.","lastModifiedDate":"2017-10-07","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"-"},"content":"[[mainstream-os]]","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"-"},"content":"Mainstream OS","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"....","lastModifiedDate":"2017-09-04","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"-"},"content":"....","lastModifiedDate":"2017-09-04","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"charlesgoh"},"content":"....","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"charlesgoh"},"content":"....","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"-"},"content":"[appendix]","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"-"},"content":"\u003d\u003d Product Survey","lastModifiedDate":"2017-05-30","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"*Product Name*","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":"Author: ...","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"-"},"content":"Pros:","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"-"},"content":"* ...","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"-"},"content":"* ...","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"-"},"content":"Cons:","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"-"},"content":"* ...","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"-"},"content":"* ...","lastModifiedDate":"2017-05-19","isFullCredit":true}],"authorContributionMap":{"charlesgoh":70,"jeffreygohkw":157,"Esilocke":178,"-":847}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - User Guide","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","lastModifiedDate":"2017-08-01","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team SE-EDU` Since: `Jun 2016` Licence: `MIT`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Overview","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"Address++ is an address book application that can store contacts, as well as maintain a list of ongoing tasks. You can use the various commands in Address++ to maintain, create, and delete your contacts, or tasks. +","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"Address++ is targeted at NUS students, such as those working on projects or assignments.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here].","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":". Copy the file to the folder you want to use as the home folder for your Address++.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"image::Ui.png[width\u003d\"790\"]","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"adds a contact named `John Doe` to Address++.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Format: `help` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1].","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a person/task: `add`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book, be it a newly met project member, or your friend who is taking the same module as you. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"`add` can be replaced by `a` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"Format: `add n/NAME p/[PHONE_NUMBER] e/[EMAIL] a/[ADDRESS] b/[BIRTHDAY] r/[REMARK] f/[FACULTY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address` or `Remark` to be private by placing a `p` in front of the prefix. +","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears`","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"* `add n/Betsy Crowe t/friend e/betsycrowe@example.com b/29-02-1996 a/Newgate Prison p/1234567 t/criminal r/Stares at the wall`","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"* `add n/Ima Hidearu b/ a/ e/ p/ r/ t/secretive`","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"* `add n/Luke Groundswimmer p/ a/ e/ c/`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"* `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate c/`","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"By adding the word `task`, you can use the same command to add a new task or deadline, such as a reminder of project deadlines. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"Format: `add task n/NAME d/DESCRIPTION [t/DEADLINE] [p/PRIORITY]` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"* Task deadlines should be in the format DD/MM/YYYY +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 1 to 5 inclusive, with 5 being the highest priority +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"* `add task n/Update documentation d/Update docs for V1.1 for CS2103T t/10-10-2017 p/4`","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"* `add task n/Buy new pencil p/2`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a tag to persons : `addtag` (Since V1.2)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"You can use the `addtag` command to add tag for multiple persons in the address book. For example, you may wish to add tag `friends` to the first two persons in the address book. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"`addtag` can be replaced by `atag` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"Format: `addtag INDEX... t/[TAG]` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"* You can add the tag of the person at the specific `INDEX`.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, addtag will add the tag to all contacts in the address book.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"`addtag 1 2 t/friends` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"Adds the friends tag of the 1st and 2nd person in the address book.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"`addtag t/acquaintance` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"Adds the acquaintance tag to all contacts in the address book.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all persons : `list`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts, or tasks, in the address book. To list out only the tasks present, use `list task` instead. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"Format: `list` `list task` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"If you want to see all your contacts, as well as all your tasks at the same time, type `list all` instead. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"Format: `list all`","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"Instead of typing out `add` every time, you can alternatively use `l` to shorten the command.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing a person : `edit`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] c/[GOOGLE CALENDAR URL] [t/TAG]...` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"* An Edit command containing only private fields will result in a error message.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"* An Edit command with both private and public fields will only modify the public fields.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com` +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/` +","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"* `edit 1 p/` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"Removes the phone number of the 1st person.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `edit` will allow you to edit task details instead. You may wish to edit your task deadlines, for example, when your project schedule changes, or your task priorities, when a task becomes more urgent. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"Format: `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/5` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"Edits the priority of the 2nd task to be `5`.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"* `edit task 2 p/ t/` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"Removes the priority and deadline of the second task.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edittag` (Since v1.2)","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"You can use `edittag` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"`edittag` can be replaced by `et` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"Format: `edittag TAGTOBERENAMED NEWTAGNAME` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `TAGTOBERENAMED` value.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"* `edittag friends enemies` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"Changes the tag called `friends` to one called `enemies` instead. All existing contacts with a `friends` tag will now have an `enemies` tag instead.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS]`","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"Shorthand commands: `cp`","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"* `changeprivacy 1 p/false e/true` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":"Sets the phone number of the 1st person to be public and their email address to be private. The 1st person\u0027s phone number will be displayed, if available, while their email address will be hidden in the UI.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"* `cp 2 a/false n/true e/false` +","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":"Sets the address and email of the 2nd person to be public and their name to be private. The 2nd person\u0027s address and email will be displayed, if available, while their name will be hidden in the UI.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite persons. For example, you may wish to set your girlfriend as your favourite contact. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"`favourite 1 2` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"Favourites the 1st and 2nd person in the address book.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":"`favourite 1` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"Favourite the 1st person in the results of the `find` command.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"Format: `showfavourite` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"`showfavourite` command: It will return an empty list if there is no favourite persons.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"* `find John` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"Returns `john` and `John Doe`","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"* `find Betsy Tim John` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"Returns any person having names `Betsy`, `Tim`, or `John`","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":"Adding `task` after `find` will allow you to sieve through your tasks, instead of your contacts. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"In addition to searching the name and description of tasks, you can also opt to filter your tasks by their priority. Simply include `p/PRIORITY` after all your other criteria to do so. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"All tasks with a priority higher than or equal to the value provided will be shown. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"Format: `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY] +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"*Important note on `find` criteria*","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"* You can only search for names in Address++","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":"Returns any task that has the word `update` in their names or descriptions","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"* `find task update 4` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"Returns all tasks that has the word `update` in their names or descriptions, and are of priority `4` or higher.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `findtag` (Since V1.4)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"You can use the `findtag` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/not` in front of the `friends`. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"`findtag` can be replaced by `ftag` for faster input. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"Format: `findtag KEYWORD [MORE_KEYWORDS]` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"* `findtag friends` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"Returns any persons having tag `friends`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"* `findtag friends colleagues` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"Returns any person having tags `friends` or `colleagues`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"* `findtag /notfriends` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"Returns any persons not have tag `friends`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"* `findtag classmates /notfriends` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"Returns any person have tags `classmates` but not have tag `friends`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"*Important note on `findtag` criteria","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `friend` will not match `friends`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"* There is no space `/not` and tag name e.g. `/not friends` will not match `/notfriends`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts or tasks from the address book. The `delete` command will help you clean up obsolete or completed tasks, or contacts who you may not wish to associate with anymore. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"`delete 2` +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"Deletes the 2nd person in the address book.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"`delete 1` +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"Deletes the 1st person in the results of the `find` command.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":"In order to delete tasks, an additional `task` keyword must be specified after the `delete` command. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"Format: `delete task INDEX`+","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"* Deletes the person or task at the specified `INDEX`.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":"* `list task` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"`delete task 2` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"Deletes the 2nd task in the address book.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":"`delete task 1` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"Deletes the 1st task in the results of the `find task` command.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `deletetag` (Since V1.2)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"You can use `deletetag` to delete the tag of multiple persons from the address book. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"`deletetag` can be replaced by `dtag` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"Format: `deletetag INDEX... t/[TAG]` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"* If you do not key in any index, deletetag will delete the tag from all contacts in the address book.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"`deletetag 1 2 t/friends` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag of the 1st and 2nd person in the address book.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"`deletetag t/friends` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":"Delete the friends tag from all contacts in the address book.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sorting your contact list : `sort`","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts by any field in ascending or descending order using the `sort` command +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"`sort` can be replaced by `so` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":"Format: `sort FIELD ORDER` +","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contact by any field in either ascending or descending order","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":"* Field parameters are limited to the following fields: NAME, PHONE, EMAIL, ADDRESS.","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC.","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":"Examples:","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":"* `sort name asc` +","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in ascending order by the name field.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":"* `sort address desc` +","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":"This allows you to sort all persons in the address book in descending order by the address field.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Backing up your data : `backup`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"You can backup your saved data on Address++ by using the `backup` command. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"`backup` can be replaced by `bk` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [RELATIVE LOCATION]` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":"* Allows you to backup your saved data on Address++ in another file.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"charlesgoh"},"content":"* You can backup your data in the default location or you can specify your desired save location.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"charlesgoh"},"content":"* You can use the default save name or use your own.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"charlesgoh"},"content":"* `backup` or `bk` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"charlesgoh"},"content":"This command will help you back up in the default save location --\u003e In the data directory of your application.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"charlesgoh"},"content":"* `backup ./test.xml` or `bk ./test.xml` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"charlesgoh"},"content":"This saves the backup file in the current data directory, with the name `test.xml`.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact or task, and look at it in greater detail, such as examining a task with a very long description, or checking out the full address of one of your friends. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"Format (person): `select INDEX` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"`select 2` +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"Selects the 2nd person in the address book.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"`select 1` +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"Selects the 1st person in the results of the `find` command.","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"To select a task, a `task` keyword must additionally be specified after `select` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"Format: `select task INDEX` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"* Selecting a task will load a list of the people who are assigned to it, instead of the Google search page.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"* `list task` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"`select task 2` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"Selects the 2nd task in the address book.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"`select task 1` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"Selects the 1st task in the results of the `find task` command.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"-"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":"`locate` can be replaced by `loc` for faster input. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"-"},"content":"Format (person): `locate INDEX` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"-"},"content":"`locate 2` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"-"},"content":"Locates the address of the 2nd person in the address book on Google Maps.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"-"},"content":"`locate 1` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"Locates the address of the 1st person in the results of the `find` command on Google Maps.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"-"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"-"},"content":"** It is up to you to provide a specific and valid address.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"-"},"content":"* A person with a private address cannot be searched on Google Maps.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Mark task as complete : `setcomplete` (To be coming in V2.0)","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"* `list task` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"`setcomplete 2` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as completed.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"`setcomplete 1` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as completed.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Mark task as incomplete : `setincomplete` (To be coming in V2.0)","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"* `list task` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"`setincomplete 2` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"Sets the 2nd task in the address book as incomplete.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"* `find task update` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"`setincomplete 1` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"Sets the 1st task in the results of the `find task` command as incomplete.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign contacts to task : `assign` (To be coming in V2.0)","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"-"},"content":"Format: `assign TASKINDEX PEOPLEINDEX...` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"`list task` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"`assign 2 1 4 5` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"Assigns the 2nd task in the address book to the 1st, 4th and 5th contacts.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"`find task update` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"`assign 1 2` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"Assigns the 1st task in the results of the `find task` command to the 2nd person in the address book.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismiss contacts from task : `dismiss` (To be coming in V2.0)","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"-"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"Format: `dismiss TASKINDEX PEOPLEINDEX...` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"Examples:","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"`list task` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"`dismiss 2 1 4 5` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"Dismisses 1st, 4th and 5th contacts in the address book from the 2nd task.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"* `list` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"`find task update` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"`dismiss 1 2` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"Dismisses the 2nd person in the address book from the 1st task in the results of the `find task` command.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"-"},"content":"Format: `history` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"// tag::undoredo[]","lastModifiedDate":"2017-07-31","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"Format: `undo` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"[NOTE]","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"Undoable commands: those commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`).","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"`list` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"* `select 1` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"`list` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"`undo` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"-"},"content":"The `undo` command fails as there are no undoable commands executed previously.","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"`clear` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":"* `list` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":"`unfavourite 1 2` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"-"},"content":"Unfavourites the 1st and 2nd person in the address book.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":"* `find Betsy` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":"`unfavourite 1` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":"Unfavourite the 1st person in the results of the `find` command.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"****","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` wasn\u0027t necessary. `redo` reverses the most recent `undo` command. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"Format: `redo` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"Examples:","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"`redo` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"The `redo` command fails as there are no `undo` commands executed previously.","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"* `delete 1` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":"`clear` +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"`undo` (reverses the `clear` command) +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":"`undo` (reverses the `delete 1` command) +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":"`redo` (reapplies the `delete 1` command) +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"-"},"content":"`redo` (reapplies the `clear` command) +","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"// end::undoredo[]","lastModifiedDate":"2017-07-31","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"-"},"content":"Format: `clear` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"Format: `exit`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"-"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4].","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"If you want to change the location of the save file, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"If you want to open a different save file, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Using the browser","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"jeffreygohkw"},"content":"If you click on a box containing a contact, an internet browser on the right side of the window.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"* Performing a left click will allow you to perform a search on Google for the name of the contact, and is equivalent to doing a `select` on that oerson.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"jeffreygohkw"},"content":"* If a person\u0027s name or address is set to private, the browser will not perform a search if you click on their box.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"* Right clicking on the browser will allow you to go to the previous or next page, as well as reload the page.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"jeffreygohkw"},"content":"****","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Exporting the data","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":"Address book data can be exported in a number of different formats, thus allowing the data to be compatible to any device.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"-"},"content":"To export data, click on `File -\u003e Export As...` or use the keyboard shortcut kbd:[CTRL]+kbd:[E]` and select the new location and file name for the export file in the pop-up window.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Auto-Complete: Learning Your Typing Habits","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"charlesgoh"},"content":"The program will learn your typing habits and give autocomplete suggestions that become more accurate over time.","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"-"},"content":"* *Add* : `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [b/BIRTHDAY] [f/FACULTY] [c/GOOGLE CALENDAR URL] [t/TAG]...` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"-"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665, b/29-02-1996 f/SOC c/www.enteryourcalendarurlhere.com t/friend t/colleague`","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"jeffreygohkw"},"content":"* *Add with private fields* : `add or a pn/NAME pp/PHONE_NUMBER pe/EMAIL pa/ADDRESS b/BIRTHDAY f/FACULTY c/[GOOGLE CALENDAR URL] [t/TAG]...` +","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665`","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"-"},"content":"* *Add task* : `add task n/NAME [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"e.g. `add task n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"-"},"content":"* *Add tag* : `addtag INDEX t/[TAG]` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"-"},"content":"e.g. `addtag 1 2 t/friends`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"-"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE]` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false`","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"Esilocke"},"content":"* *Clear person* : `clear`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"-"},"content":"* *Clear tasks* : `cleartask`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"e.g. `delete 3`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task INDEX` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task 4`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":"* *Delete tag* : `deletetag INDEX t/[TAG]` +","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":"e.g. `deletetag 1 2 t/friends`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] c/[GOOGLE CALENDAR URL] [a/ADDRESS] [t/TAG]...` +","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY]` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":"e.g. `edit task 2 p/veryhigh`","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edittag TAGTOCHANGE NEWTAGNAME` +","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"e.g. `edittag friends enemies`","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"e.g. `find James Jake`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"Esilocke"},"content":"e.g. `find task update p/high`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":"* *Help* : `help`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"* *List persons* : `list`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"Esilocke"},"content":"* *List tasks* : `list task`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":"* *Locate a person\u0027s address* : `locate`","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"e.g.`select 2`","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task INDEX` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"Esilocke"},"content":"e.g.`select task 2`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign TASKINDEX PERSONINDEX...` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 21`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss TASKINDEX PERSONINDEX...` +","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 17`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"* *History* : `history`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"* *Undo* : `undo`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"* *Redo* : `redo`","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-10","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"* *Help* : kbd:[[F1]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]","lastModifiedDate":"2017-10-30","isFullCredit":true}],"authorContributionMap":{"charlesgoh":32,"jeffreygohkw":47,"Esilocke":255,"-":414}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","lastModifiedDate":"2016-10-07","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application.","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 3, 0, true);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model, storage);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","lastModifiedDate":"2016-10-12","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","lastModifiedDate":"2016-10-12","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" ui.start(primaryStage);","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" public void stop() {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" ui.stop();","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(userPrefs);","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" Platform.exit();","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" System.exit(0);","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" this.stop();","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" launch(args);","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":5,"-":210}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return person;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location.","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-03","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":14}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location.","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-03","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":14}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-28","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-25","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model, Storage storage) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.history \u003d new CommandHistory();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.addressBookParser \u003d new AddressBookParser();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" Command command \u003d addressBookParser.parseCommand(commandText);","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return result;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } finally {","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" history.add(commandText);","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-21","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":8,"-":63}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Adds a person or task to the address book.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \"","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"PHONE \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"ADDRESS \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \"","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_REMARK + \"REMARK \"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"friends \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"owesMoney\";","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Adds a task to the address book. \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"DESCRIPTION \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"DEADLINE \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"PRIORITY \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_SUCCESS \u003d \"New task added: \\n%1$s\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private boolean isTask \u003d false;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public AddCommand(ReadOnlyPerson person) {","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d null;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@Code ReadOnlyTask}","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public AddCommand(ReadOnlyTask task) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d null;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" isTask \u003d true;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" requireNonNull(model);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_TASK_SUCCESS, taskToAdd));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddCommand)) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } else if (taskToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).taskToAdd \u003d\u003d null) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert(personToAdd !\u003d null);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddCommand) other).personToAdd);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else if (personToAdd \u003d\u003d null \u0026\u0026 ((AddCommand) other).personToAdd \u003d\u003d null) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assert(taskToAdd !\u003d null);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assert(((AddCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddCommand) other).taskToAdd);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":60,"wangyiming1019":1,"-":58}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends UndoableCommand {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"addtag\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"atag\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all persons in the current list.\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * @param addTag tag to add to all entries in the address book","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public AddTagCommand(Tag addTag) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" requireNonNull(addTag);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" this.addTag \u003d addTag;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" reinitlializeArray(lastShownList.size());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private void reinitlializeArray(int size) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" targetIndexes.add(Index.fromZeroBased(i));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-16","isFullCredit":true}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":108}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.io.IOException;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location.","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" ~/Desktop\";","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private String args;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" super();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(storage);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" if (args.equals(\"\")) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBookDefault(model.getAddressBook());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" } else {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" storage.backupAddressBook(model.getAddressBook(), args);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" } catch (IOException e) {","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-10-18","isFullCredit":true}],"authorContributionMap":{"charlesgoh":48}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d person.getName();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d person.getPhone();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d person.getEmail();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d person.getAddress();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Remark r \u003d person.getRemark();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" Boolean f \u003d person.getFavourite();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e t \u003d person.getTags();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" n.setPrivate(pps.getNameIsPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" p.setPrivate(pps.getPhoneIsPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" e.setPrivate(pps.getEmailIsPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" a.setPrivate(pps.getAddressIsPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" r.setPrivate(pps.getRemarkIsPrivate());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" return new Person(n, p, e, a, f, r, t);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" return index;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" return true;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" // state check","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of nameIsPrivate","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of phoneIsPrivate","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of emailIsPrivate","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of addressIsPrivate","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of remarkIsPrivate","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" * @return the value of remarkIsPrivate","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getRemarkIsPrivate() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" return remarkIsPrivate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remarkIsPrivate);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" return true;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" // state check","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-15","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":270,"wangyiming1019":2}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Clears the address book.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"%s has been cleared!\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_PERSONS \u003d \"Contact list\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_TASKS \u003d \"Task list\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String TYPE_ALL \u003d \"Address book\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private boolean isClearTask;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private boolean isClearPerson;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private boolean isClearAll;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Prefix type;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String cleared;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public ClearCommand() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d true;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" type \u003d null;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_ALL;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public ClearCommand(Prefix type) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d true;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d false;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_TASK;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_TASKS;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" isClearPerson \u003d true;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" isClearTask \u003d false;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" isClearAll \u003d false;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this.type \u003d PREFIX_PERSON;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" cleared \u003d TYPE_PERSONS;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"An invalid type was provided!\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (isClearAll) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else if (isClearTask) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } else if (isClearPerson) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), type);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assert false : \"At least one boolean must be true.\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, cleared));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"Esilocke":60,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.MainWindow;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public abstract class Command {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" protected Model model;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" protected MainWindow mainWindow;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" protected CommandHistory history;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary","lastModifiedDate":"2016-09-19","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {","lastModifiedDate":"2016-09-19","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);","lastModifiedDate":"2016-09-19","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * access to the dependencies.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a person or task identified using its last displayed index from the address book.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person or task identified by the index number used in the last listing.\\n\"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DELETE_TASK_SUCCESS \u003d \"Deleted Task: %1$s\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_PERSON \u003d 0;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final int DELETE_TYPE_TASK \u003d 1;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private int type;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public DeleteCommand(Index targetIndex, int objectType) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.type \u003d objectType;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_PERSON) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } else if (targetIndex.getZeroBased() \u003e\u003d tasksList.size() \u0026\u0026 type \u003d\u003d DELETE_TYPE_TASK) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (type \u003d\u003d DELETE_TYPE_PERSON) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TASK_SUCCESS, taskToDelete));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex)","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.type \u003d\u003d ((DeleteCommand) other).type); // state check","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"Esilocke":28,"wangyiming1019":1,"-":47}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends UndoableCommand {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"deletetag\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"dtag\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 2 t/friends \\n\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"This is an nonexistent tag in the given persons list.\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * @param toDelete tag to delete from given target indexes","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public DeleteTagCommand(Tag toDelete) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toDelete);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.toDelete \u003d toDelete;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" reinitlializeArray(lastShownList.size());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private void reinitlializeArray(int size) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c size; i++) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" targetIndexes.add(Index.fromZeroBased(i));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-16","isFullCredit":true}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":108}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Edits the details of an existing person or task in the address book.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" + \"by the index number used in the last person listing. \"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Edits the details of the task identified \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: \\n%1$s\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TASK_SUCCESS \u003d \"Edited Task: \\n%1$s\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean areFieldsAllPrivate \u003d true;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private final Index index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @param index of the person in the filtered person list to edit","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the person with","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" requireNonNull(index);","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" this.index \u003d index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d null;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public EditCommand(Index index, EditTaskDescriptor editTaskDescriptor) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d null;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //TODO see if we can use Singleton pattern to handle the Descriptors.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TASK_SUCCESS, editedTask));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" * edited with {@code editPersonDescriptor}.","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert personToEdit !\u003d null;","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" Remark updatedRemark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedTags);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().isPrivate()) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().isPrivate()) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().isPrivate()) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().isPrivate()) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" if (!personToEdit.getRemark().isPrivate()) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":" } else {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"charlesgoh"},"content":" updatedRemark \u003d personToEdit.getRemark();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"wangyiming1019"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" * edited with {@code editTaskDescriptor}.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":" assert taskToEdit !\u003d null;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":" TaskName updatedTaskName;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" Description updatedDescription;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" Deadline updatedDeadline;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":" Priority updatedPriority;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" // short circuit if same object","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" return false;","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" if (this.isTask !\u003d ((EditCommand) other).isTask) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" if (this.isTask) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":" * corresponding field value of the person.","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" private Name name;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" private Phone phone;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":" private Email email;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":" private Address address;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"wangyiming1019"},"content":" private Boolean favourite;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"charlesgoh"},"content":" private Remark remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" this.name \u003d toCopy.name;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":" this.phone \u003d toCopy.phone;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":" this.email \u003d toCopy.email;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" this.address \u003d toCopy.address;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d toCopy.favourite;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d toCopy.remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":" this.tags \u003d toCopy.tags;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited.","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"charlesgoh"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark, this.tags);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":" public void setName(Name name) {","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":" this.name \u003d name;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":" this.email \u003d email;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":" this.address \u003d address;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"charlesgoh"},"content":" public Optional\u003cRemark\u003e getRemark() {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"charlesgoh"},"content":" return Optional.ofNullable(remark);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"-"},"content":" this.tags \u003d tags;","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"-"},"content":" return Optional.ofNullable(tags);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"-"},"content":" // short circuit if same object","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"-"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"-"},"content":" return false;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"-"},"content":" // state check","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags());","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-26","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":" private Description description;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" private Priority priority;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":" // state check","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2016-12-26","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"jeffreygohkw":152,"Esilocke":174,"wangyiming1019":15,"-":206}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends UndoableCommand {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"edittag\";","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"etag\";","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the specified tag \"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-19","isFullCredit":true}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(personToFavourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":22}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Finds and lists all persons or tasks in address book whose name contains any of the argument keywords.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_USAGE \u003d COMMAND_WORD + \": Finds all tasks whose names or descriptions \"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private boolean isTask;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d null;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public FindCommand(TaskContainsKeywordPredicate predicate) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d null;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" this.isTask \u003d true;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (isTask) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof FindCommand)) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask !\u003d ((FindCommand) other).isTask) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" } else if (this.isTask) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return this.taskPredicate.equals(((FindCommand) other).taskPredicate);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return this.personPredicate.equals(((FindCommand) other).personPredicate);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-22","isFullCredit":true}],"authorContributionMap":{"Esilocke":36,"wangyiming1019":1,"-":30}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords.","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive.","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends Command {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"findtag\";","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"ftag\";","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose tags contain any of \"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" friends colleagues\";","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-24","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person: %1$s\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":54}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-13","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book.","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-14","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommand extends UndoableCommand {","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\"));","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons by chosen \"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS] and by order [ASC/DESC]. Case insensitive\\n\"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [FIELD] [ORDER]\\n\"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" email desc\";","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All persons in address book successfully sorted\";","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private final String field;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private final String order;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String field, String order) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public String getField() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return this.field;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public String getOrder() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return this.order;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() {","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-09-30","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-09-30","isFullCredit":true}],"authorContributionMap":{"charlesgoh":48,"jeffreygohkw":8}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-13","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" model.unfavouritePerson(personToUnfavourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" assert false : \"The target person cannot be missing\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution.","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" PREFIX_REMARK_PRIVATE, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE,","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" PREFIX_EMAIL_PRIVATE, PREFIX_ADDRESS_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_DEADLINE,","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" PREFIX_DESCRIPTION, PREFIX_PRIORITY, PREFIX_TASK);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d constructTask(args);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(taskToAdd);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d constructPerson(args);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return new AddCommand(personToAdd);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyPerson constructPerson(String args) throws ParseException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PHONE)","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)))) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_EMAIL)","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)))) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_ADDRESS)","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)))) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_REMARK)","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)))) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" Remark remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" } else {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, tagList);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" return person;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" private static ReadOnlyTask constructTask(String args) throws ParseException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION))) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-03-17","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_DEADLINE))) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_PRIORITY))) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" TaskName name;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" Description description;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Priority priority;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" description \u003d ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" deadline \u003d ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" priority \u003d ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d new Task(name, description, deadline, priority);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" return task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-02-05","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18,"jeffreygohkw":48,"Esilocke":73,"wangyiming1019":1,"-":52}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser implements Parser\u003cAddTagCommand\u003e {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (indexes.trim().isEmpty()) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new AddTagCommand(toAdd);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-16","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"wangyiming1019":65}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Parses user input.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddressBookParser {","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * @param userInput full user input string","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * @return the command based on the user input","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public Command parseCommand(String userInput) throws ParseException {","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" switch (commandWord) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","lastModifiedDate":"2017-02-05","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" case AddTagCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommandParser().parse(arguments);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" case EditTagCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(arguments);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" case SelectCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" case LocateCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommandParser().parse(arguments);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" case DeleteTagCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommandParser().parse(arguments);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" case FindCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" case FindTagCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommandParser().parse(arguments);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" case ListCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" return new ListCommand();","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" return new HistoryCommand();","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" return new ExitCommand();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" return new HelpCommand();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-14","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" return new UndoCommand();","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" return new RedoCommand();","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" default:","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":9,"Esilocke":6,"wangyiming1019":41,"-":91}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * filepath.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-10-20","isFullCredit":true}],"authorContributionMap":{"charlesgoh":17}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an EditCommand object for execution.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Index index;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-22","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":151}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditCommand object","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_PERSON);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand(PREFIX_TASK);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26","isFullCredit":true}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"ra/\");","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"pr/\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-02-11","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":6,"Esilocke":5,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution.","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Index index;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(filteredString.trim());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_TASK);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new DeleteCommand(index, DeleteCommand.DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new ParseException(","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-26","isFullCredit":true}],"authorContributionMap":{"Esilocke":12,"-":28}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (indexes.trim().isEmpty()) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return new DeleteTagCommand(toDelete);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-16","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"wangyiming1019":62}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Collection;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution.","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(args);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return constructTaskDescriptor(args);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return constructPersonDescriptor(args);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Person object. **/","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructPersonDescriptor(String args) throws ParseException {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-03-20","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" PREFIX_TAG);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" Index index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor \u003d new EditPersonDescriptor();","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return new EditCommand(index, editPersonDescriptor);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditCommand that edits a Task object. **/","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" private EditCommand constructTaskDescriptor(String args) throws ParseException {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index index;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor \u003d new EditTaskDescriptor();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return new EditCommand(index, editTaskDescriptor);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty.","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * {@code Set\u003cTag\u003e} containing zero tags.","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assert tags !\u003d null;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" if (tags.isEmpty()) {","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return Optional.empty();","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-26","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":47,"-":78}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * and returns an EditCommand object for execution.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return tagList;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-20","isFullCredit":true}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":29}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution.","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedArgs \u003d args.trim();","lastModifiedDate":"2017-02-12","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TASK).isPresent()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" if (trimmedArgs.isEmpty()) {","lastModifiedDate":"2017-02-12","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" throw new ParseException(","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return new FindCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" trimmedArgs \u003d argsWithNoTaskPrefix.trim();","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindCommand.MESSAGE_TASK_USAGE));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return new FindCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords)));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-26","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-26","isFullCredit":true}],"authorContributionMap":{"Esilocke":14,"-":31}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution.","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":36}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new SelectCommand object","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an SelectCommand object for execution.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":29}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collection;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes.","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type.","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods.","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class ParserUtil {","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";","lastModifiedDate":"2017-06-02","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-02","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * trimmed.","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer).","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {","lastModifiedDate":"2017-06-02","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);","lastModifiedDate":"2017-06-02","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(name);","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Name to be private if true.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" requireNonNull(phone);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Phone to be private if true.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" requireNonNull(address);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Address to be private if true.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" * Takes in a (@code boolean isPrivate) which will set the Remark to be private if true.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" throws IllegalValueException {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remark);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" requireNonNull(email);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean isPrivate) which will set the Email to be private if true.","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","lastModifiedDate":"2017-07-18","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" requireNonNull(email);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}.","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(tags);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" for (String tagName : tags) {","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" return tagSet;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-11","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-02-11","isFullCredit":true}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":29,"Esilocke":39,"-":104}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 0;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 1;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution.","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" if (argKeywords.length !\u003d 2) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-10-01","isFullCredit":true}],"authorContributionMap":{"charlesgoh":44,"jeffreygohkw":4}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":29}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors.","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","lastModifiedDate":"2016-12-22","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" //// person-level operations","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" // in the person list.","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" persons.add(newPerson);","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}.","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}.","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * another existing person in the list.","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2017-04-07","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","lastModifiedDate":"2017-04-07","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // in the person list.","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);","lastModifiedDate":"2017-08-07","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" *","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" * @param field","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" * @param order","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" // used for checking person tag references","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" //// tag-level operations","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" tags.add(t);","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" //// task-level operations","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" //// util methods","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" // TODO: refine later","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList();","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2016-09-01","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2016-09-01","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-01","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" return tags.asObservableList();","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-01","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-01","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"charlesgoh":10,"Esilocke":105,"wangyiming1019":16,"-":182}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * The API of the Model component.","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public interface Model {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /** Adds the given person */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * another existing person in the list.","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by field in ascending (asc) or descending (desc) order","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" * @param field","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" * @param order","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-25","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":36,"wangyiming1019":18,"-":49}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" super();","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public ModelManager() {","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" return addressBook;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list.","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag.","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" int index;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" addressBook.unfavouritePerson(target);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" updateFilteredPersonList(new NameContainsFavouritePredicate());","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2016-10-12","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * {@code addressBook}","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-19","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" requireNonNull(predicate);","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" // short circuit if same object","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" return false;","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" // state check","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-31","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":98,"wangyiming1019":49,"-":118}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list.","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons.","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list.","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags.","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Validates given address.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public Address(String address) throws IllegalValueException {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.value \u003d address;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this(address);","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return value;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return value.hashCode();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":14,"Esilocke":6,"-":59}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Validates given email.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public Email(String email) throws IllegalValueException {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this(email);","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return value;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return value.hashCode();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":14,"Esilocke":6,"-":55}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String fullName;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given name.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Name(String name) throws IllegalValueException {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(name);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.fullName \u003d trimmedName;","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this(name);","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return fullName;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.fullName.equals(((Name) other).fullName)); // state check","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return fullName.hashCode();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":14,"-":65}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given.","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" return true;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" } else {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" return false;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/not\")) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" } else {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(4));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":92}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Every field must be present and not null.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Boolean favourite, Remark remark, Set\u003cTag\u003e tags) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson.","lastModifiedDate":"2016-12-22","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" source.getRemark(), source.getTags());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setName(Name name) {","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return name;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public Name getName() {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return name.get();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return phone;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public Phone getPhone() {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return phone.get();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return email;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Email getEmail() {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return email.get();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return address;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public Address getAddress() {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return address.get();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return favourite;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark.get();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * if modification is attempted.","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return tags;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set.","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {","lastModifiedDate":"2017-03-11","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" return getAsText();","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":16,"wangyiming1019":22,"-":136}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given phone number.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) throws IllegalValueException {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return value;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return value.hashCode();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15,"Esilocke":6,"-":55}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();","lastModifiedDate":"2017-03-07","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark());","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" default String getAsText() {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" builder.append(getName())","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" .append(\" Phone: \")","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" .append(getPhone())","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" .append(\" Email: \")","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .append(getEmail())","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .append(\" Address: \")","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" .append(getAddress())","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Tags: \");","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return builder.toString();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"public class Remark {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" /*","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public final String value;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" *","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" this(remark);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" if (isPrivate) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" return \"\u003cPrivate Remark\u003e\";","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" return value;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public boolean isPrivate() {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" return isPrivate;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public void setPrivate(boolean isPrivate) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" this.isPrivate \u003d isPrivate;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"}","lastModifiedDate":"2017-10-22","isFullCredit":true}],"authorContributionMap":{"charlesgoh":78}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Iterator;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" // used by asObservableList()","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public boolean contains(ReadOnlyPerson toCheck) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Adds a person to the list.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" internalList.add(new Person(toAdd));","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","lastModifiedDate":"2017-08-07","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","lastModifiedDate":"2017-08-07","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" internalList.set(index, new Person(editedPerson));","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" *","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" *","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" setPersons(replacement);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * @param field","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" * @param order","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().fullName.compareTo(o2.getName().fullName);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" };","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" };","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" };","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" };","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" case \"name\":","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" case \"email\":","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" case \"address\":","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" default:","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" break;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" default:","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" return internalList.iterator();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","lastModifiedDate":"2017-04-14","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" return internalList.hashCode();","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":88,"wangyiming1019":30,"-":124}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;","lastModifiedDate":"2016-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name.","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Calendar;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Deadline {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DEADLINE_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task deadlines must be in the format DD-MM-YYYY, with \u0027-\u0027, \u0027.\u0027, \u0027.\u0027 as separators\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" Deadline format: DDSMMSYYYY, in DAY-MONTH-YEAR format.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" S represents the separators, and can be any of these characters: - . /","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_VALIDATION_REGEX \u003d \"\\\\d\\\\d[-./]\\\\d\\\\d[-./]\\\\d\\\\d\\\\d\\\\d.*\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String DEADLINE_PERIOD_DELIMITER \u003d \".\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /*","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" Expected indexes for the separator characters","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_1 \u003d 2;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_SEPARATOR_INDEX_2 \u003d 5;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_DAY_INDEX \u003d 0;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_MONTH_INDEX \u003d 1;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final int DEADLINE_YEAR_INDEX \u003d 2;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public final Calendar calendar;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public final String value;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } else if (deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d null;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String trimmedDeadline \u003d deadline.trim();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (!isValidDeadline(trimmedDeadline)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DEADLINE_CONSTRAINTS);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDeadline;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" this.calendar \u003d Calendar.getInstance();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" calendar.clear();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" char separator \u003d trimmedDeadline.charAt(DEADLINE_SEPARATOR_INDEX_1);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d trimmedDeadline.split(Character.toString(separator));","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.calendar.set(year, month, day);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is in valid deadline format.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(DEADLINE_VALIDATION_REGEX)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } else if (test.charAt(DEADLINE_SEPARATOR_INDEX_1) !\u003d test.charAt(DEADLINE_SEPARATOR_INDEX_2)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return isValidDate(test);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDate(String test) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" Calendar testCalendar \u003d setCalendar(test);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" testCalendar.setLenient(false);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" testCalendar.getTime();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * Returns a Calendar object that represents the given date string.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private static Calendar setCalendar(String date) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" Calendar result \u003d Calendar.getInstance();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" result.clear();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String separator \u003d Character.toString(date.charAt(DEADLINE_SEPARATOR_INDEX_1));","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" if (separator.equals(DEADLINE_PERIOD_DELIMITER)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" separator \u003d \"\\\\.\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" String[] splitTest \u003d date.split(separator);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" int day \u003d Integer.parseInt(splitTest[DEADLINE_DAY_INDEX]);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" int month \u003d Integer.parseInt(splitTest[DEADLINE_MONTH_INDEX]);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" int year \u003d Integer.parseInt(splitTest[DEADLINE_YEAR_INDEX]);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" result.set(year, month, day);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return result;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return value;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12","isFullCredit":true}],"authorContributionMap":{"Esilocke":131}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12","isFullCredit":true}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Priority {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 1 to 5, inclusive, where 1 represents the lowest priority\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 1;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public final String value;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Validates given priority.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PRIORITY_PLACEHOLDER_VALUE;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Integer.parseInt(trimmedPriority);","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedPriority;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return value;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Priority) other).value)); // state check","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12","isFullCredit":true}],"authorContributionMap":{"Esilocke":83}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .append(getPriority());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return builder.toString();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-23","isFullCredit":true}],"authorContributionMap":{"Esilocke":43}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book.","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return taskName.get();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return description.get();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return deadline.get();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return priority.get();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return getAsText();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return taskName;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return description;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return deadline;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return priority;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12","isFullCredit":true}],"authorContributionMap":{"Esilocke":105}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c keywords.size(); i++) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String keyword \u003d keywords.get(i);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)); // state check","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskName {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /*","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public final String taskName;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Validates given name.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name.","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public String toString() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return taskName;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-12","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return taskFoundAndDeleted;","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-23","isFullCredit":true}],"authorContributionMap":{"Esilocke":124}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-24","isFullCredit":true}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-23","isFullCredit":true}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" return new Person[] {","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"),","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"),","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"),","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"),","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"),","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"),","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" };","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","lastModifiedDate":"2017-04-07","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","lastModifiedDate":"2017-04-07","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return sampleAb;","lastModifiedDate":"2017-04-07","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-20","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (String s : strings) {","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return tags;","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-12-20","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * @param addressBook cannot be null.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem writing to the file.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBook(ReadOnlyAddressBook addressBook, String args) throws IOException;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" void changeFilePath(String fp, UserPrefs u);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":3,"-":44}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-02-15","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","lastModifiedDate":"2017-02-15","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();","lastModifiedDate":"2017-02-15","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-15","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-15","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath() + \"-backup.xml\");","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (IOException e) {","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-26","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" @Override","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"charlesgoh":20,"jeffreygohkw":8,"-":92}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private String name;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private String phone;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String email;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private String address;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private String remark;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @XmlElement","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","lastModifiedDate":"2016-12-22","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","lastModifiedDate":"2016-12-22","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Converts a given Person into this class for JAXB use.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" name \u003d source.getName().fullName;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" phone \u003d source.getPhone().value;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" email \u003d source.getEmail().value;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" address \u003d source.getAddress().value;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" favourite \u003d source.getFavourite().toString();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" remark \u003d source.getRemark().value;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().isPrivate();","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().isPrivate();","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().isPrivate();","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().isPrivate();","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" remarkIsPrivate \u003d source.getRemark().isPrivate();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" tagged \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" for (Tag tag : source.getTags()) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" tagged.add(new XmlAdaptedTag(tag));","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public Person toModelType() throws IllegalValueException {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag tag : tagged) {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" personTags.add(tag.toModelType());","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-14","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" if (remarkIsPrivate \u003d\u003d null) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" remarkIsPrivate \u003d false;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","lastModifiedDate":"2017-03-14","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" return new Person(name, phone, email, address, favourite, remark, tags);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":27,"wangyiming1019":6,"-":73}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private String name;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private String description;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private String deadline;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private String priority;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" priority \u003d source.getPriority().value;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-24","isFullCredit":true}],"authorContributionMap":{"Esilocke":55}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format.","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,","lastModifiedDate":"2016-10-12","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {","lastModifiedDate":"2016-10-12","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location.","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Default back up data which saves file in the same directory as the main save file","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBookDefault(ReadOnlyAddressBook addressBook) throws IOException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file\");","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath + \"-backup.xml\");","lastModifiedDate":"2017-10-18","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","lastModifiedDate":"2016-12-22","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","lastModifiedDate":"2016-12-22","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-01","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling","lastModifiedDate":"2016-10-01","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-10-19","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return null;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"Esilocke":17,"-":74}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","lastModifiedDate":"2017-08-10","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App.","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://maps.google.com/search/\";","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private WebView browser;","lastModifiedDate":"2016-12-13","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public BrowserPanel() {","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" super(FXML);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-03","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page.","lastModifiedDate":"2017-04-03","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" loadDefaultPage();","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {","lastModifiedDate":"2017-06-19","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().isPrivate()) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().fullName.replaceAll(\" \", \"+\")","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027saddress if their address is not private","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().isPrivate()) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void loadPage(String url) {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));","lastModifiedDate":"2017-08-10","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * Loads a default HTML file with a background that matches the general theme.","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private void loadDefaultPage() {","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" loadPage(defaultPage.toExternalForm());","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Frees resources allocated to the browser.","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void freeResources() {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" browser \u003d null;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" loadPersonPage(event.getNewSelection().person);","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-21","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":37,"-":75}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-09","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;","lastModifiedDate":"2016-10-15","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;","lastModifiedDate":"2016-10-15","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Stage primaryStage;","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Logic logic;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Config config;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(FXML);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" // Set dependencies","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" this.config \u003d config;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" // Configure the UI","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" setIcon(ICON);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" setWindowMinSize();","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" setAccelerators();","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" return primaryStage;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void setAccelerators() {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"CTRL+O\"));","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"CTRL+S\"));","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem.","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" /*","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK.","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * the TextInputControl(s).","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay.","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" event.consume();","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" });","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself.","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" *","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" *","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" *","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" void fillInnerParts() {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" browserPanel \u003d new BrowserPanel();","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","lastModifiedDate":"2017-06-14","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" void hide() {","lastModifiedDate":"2016-10-15","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" primaryStage.hide();","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Sets the given image as the icon of the main window.","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" private void setIcon(String iconSource) {","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-02","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences.","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","lastModifiedDate":"2016-10-15","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void setWindowMinSize() {","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" primaryStage.setMinWidth(MIN_WIDTH);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window.","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {","lastModifiedDate":"2016-10-15","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" * Opens the help window.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" public void handleHelp() {","lastModifiedDate":"2016-08-31","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" helpWindow.show();","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" void show() {","lastModifiedDate":"2016-10-15","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" primaryStage.show();","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" raise(new OpenRequestEvent());","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","lastModifiedDate":"2017-10-08","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" raise(new SaveAsRequestEvent());","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-03","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" * Closes the application.","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" private void handleExit() {","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","lastModifiedDate":"2016-08-26","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-25","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","lastModifiedDate":"2016-08-25","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" return this.personListPanel;","lastModifiedDate":"2016-08-25","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-25","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" void releaseResources() {","lastModifiedDate":"2016-10-15","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" browserPanel.freeResources();","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-10-15","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" handleHelp();","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-16","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-18","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"jeffreygohkw":107,"Esilocke":11,"-":218}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-03-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private HBox cardPane;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private Label name;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Label id;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private Label phone;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private Label address;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" private Label remark;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @FXML","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private Label email;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private FlowPane tags;","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex) {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" super(FXML);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" this.person \u003d person;","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" initTags(person);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" bindListeners(person);","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes.","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" tags.getChildren().clear();","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" });","lastModifiedDate":"2017-07-12","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @param tag","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" * @return","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" private String getTagColour(String tag) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" if (!colourHash.containsKey(tag)) {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" String colour \u003d Colours.values()[randomiser].toString();","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" colourHash.put(tag, colour);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return colourHash.get(tag);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Assigns each tag a colour","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * @param person","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" private void initTags(ReadOnlyPerson person) {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" person.getTags().forEach(tag -\u003e {","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" tags.getChildren().add(newTagLabel);","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" });","lastModifiedDate":"2017-10-15","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-18","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" // short circuit if same object","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" return true;","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" return false;","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" // state check","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-14","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-21","isFullCredit":true}],"authorContributionMap":{"charlesgoh":31,"wangyiming1019":9,"-":85}},{"path":"src/main/java/seedu/address/ui/StatusBarFooter.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.time.Clock;","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Date;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.controlsfx.control.StatusBar;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","lastModifiedDate":"2017-08-10","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A ui for the status bar that is displayed at the footer of the application.","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class StatusBarFooter extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_INITIAL \u003d \"Not updated yet in this session\";","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_UPDATED \u003d \"Last Updated: %s\";","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Used to generate time stamps.","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * TODO: change clock to an instance variable.","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * We leave it as a static variable because manual dependency injection","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * will require passing down the clock reference all the way from MainApp,","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * but it should be easier once we have factories/DI frameworks.","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private static Clock clock \u003d Clock.systemDefaultZone();","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StatusBarFooter.class);","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-10","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"StatusBarFooter.fxml\";","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-12-10","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private StatusBar syncStatus;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-12-10","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private StatusBar totalPersons;","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" @FXML","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private StatusBar saveLocationStatus;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-08","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public StatusBarFooter(String saveLocation, int initialTotalPersons) {","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" super(FXML);","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" setSyncStatus(SYNC_STATUS_INITIAL);","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" setSaveLocation(\"./\" + saveLocation);","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" setTotalPersons(initialTotalPersons);","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Sets the clock used to determine the current time.","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public static void setClock(Clock clock) {","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" StatusBarFooter.clock \u003d clock;","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Returns the clock currently in use.","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static Clock getClock() {","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return clock;","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void setSaveLocation(String location) {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.saveLocationStatus.setText(location));","lastModifiedDate":"2017-08-10","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" private void setSyncStatus(String status) {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.syncStatus.setText(status));","lastModifiedDate":"2017-08-10","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent abce) {","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" long now \u003d clock.millis();","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" String lastUpdated \u003d new Date(now).toString();","lastModifiedDate":"2017-02-14","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(abce, \"Setting last updated status to \" + lastUpdated));","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" setSyncStatus(String.format(SYNC_STATUS_UPDATED, lastUpdated));","lastModifiedDate":"2017-02-25","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" this.setTotalPersons(abce.data.getPersonList().size());","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" private void setTotalPersons(int totalPersons) {","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" this.totalPersons.setText(totalPersons + \" person(s) listed\");","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-27","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-08","isFullCredit":true}],"authorContributionMap":{"charlesgoh":9,"-":80}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" *","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private Label id;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Label description;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private Label priority;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" super(FXML);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return true;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof TaskCard)) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return false;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // state check","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" TaskCard card \u003d (TaskCard) other;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return id.getText().equals(card.id.getText())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 task.equals(card.task);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-28","isFullCredit":true}],"authorContributionMap":{"Esilocke":76}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @FXML","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" super(FXML);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map(","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" });","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" });","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Subscribe","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" setText(null);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" } else {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-28","isFullCredit":true}],"authorContributionMap":{"Esilocke":88}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-25","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-09-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2016-08-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","lastModifiedDate":"2016-09-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2016-08-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-01","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" //Set the application icon.","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-09-25","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void stop() {","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" mainWindow.hide();","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" String contentText) {","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");","lastModifiedDate":"2016-08-20","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" alert.setTitle(title);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","lastModifiedDate":"2016-10-12","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.showAndWait();","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-16","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" Platform.exit();","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" System.exit(1);","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-08-18","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-08-25","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","lastModifiedDate":"2016-10-12","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Subscribe","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","lastModifiedDate":"2016-09-29","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.exception);","lastModifiedDate":"2017-06-29","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-08-18","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":4,"-":120}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));","lastModifiedDate":"2017-10-02","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-30","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-30","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-17","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddCommandTest {","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingObjectAdded modelStub \u003d new ModelStubAcceptingObjectAdded();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d getAddCommandForTask(validTask, modelStub).execute();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddCommand.MESSAGE_TASK_SUCCESS, validTask), commandResult.feedbackToUser);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_TASK);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" getAddCommandForTask(validTask, modelStub).execute();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void equals() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommand \u003d new AddCommand(paper);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" AddCommand addPencilCommand \u003d new AddCommand(pencil);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" AddCommand addPaperCommandCopy \u003d new AddCommand(paper);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" // add person vs add task -\u003e returns false","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertFalse(addAliceCommand.equals(addPaperCommand));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-22","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person.","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" return command;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddCommand with the details of the given person.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private AddCommand getAddCommandForTask(Task task, Model model) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AddCommand command \u003d new AddCommand(task);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return command;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing.","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" return null;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","lastModifiedDate":"2017-06-07","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" return null;","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" @Override","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" @Override","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" return null;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateDataException when trying to add a person or task.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" return new AddressBook();","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingObjectAdded extends ModelStub {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));","lastModifiedDate":"2017-03-02","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" return new AddressBook();","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-12","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-12","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":102,"wangyiming1019":24,"-":161}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}.","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":151}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"false\").build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").build();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" .build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-23","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":128}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandTest {","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model,","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL), model);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}.","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return command;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-08","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-08","isFullCredit":true}],"authorContributionMap":{"Esilocke":5,"-":34}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands.","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_FAVOURITE \u003d \"false\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_AMY;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public static final String NAME_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_NAME_PRIVATE + VALID_NAME_BOB;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_AMY;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PHONE_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_PHONE_PRIVATE + VALID_PHONE_BOB;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_AMY;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public static final String EMAIL_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_EMAIL_PRIVATE + VALID_EMAIL_BOB;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_AMY;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_ADDRESS_BOB;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB_PRIVATE \u003d \" \" + PREFIX_ADDRESS_PRIVATE + VALID_REMARK_BOB;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"20-20-20000\"; // bad date format","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public static final EditCommand.EditPersonDescriptor DESC_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PENCIL;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public static final EditCommand.EditTaskDescriptor DESC_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" static {","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_AMY).withFavourite(VALID_FAVOURITE)","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_BOB).withFavourite(VALID_FAVOURITE)","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" Model expectedModel) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" // only do so by copying its components.","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" command.execute();","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" } catch (CommandException e) {","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book.","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" final String[] splitName \u003d person.getName().fullName.split(\"\\\\s+\");","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-05","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":12,"Esilocke":34,"wangyiming1019":15,"-":129}},{"path":"src/test/java/seedu/address/logic/commands/DeleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeleteCommand}.","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class DeleteCommandTest {","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(DeleteCommand.MESSAGE_DELETE_PERSON_SUCCESS, personToDelete);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(deleteCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d prepareCommand(outOfBoundIndex, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void equals() {","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommand \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteSecondCommand \u003d new DeleteCommand(INDEX_SECOND_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteFirstCommandCopy \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns a {@code DeleteCommand} with the parameter {@code index}.","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" private DeleteCommand prepareCommand(Index index, int type) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" DeleteCommand deleteCommand \u003d new DeleteCommand(index, type);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" deleteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return deleteCommand;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one.","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-05","isFullCredit":true}],"authorContributionMap":{"Esilocke":10,"-":109}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}.","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":164}},{"path":"src/test/java/seedu/address/logic/commands/EditCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditCommand.","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class EditCommandTest {","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();","lastModifiedDate":"2017-05-26","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(indexLastPerson, descriptor);","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson);","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertCommandSuccess(editCommand, model, expectedMessage, expectedModel);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditCommand.MESSAGE_ALL_FIELDS_PRIVATE);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editCommand, model, expectedMessage);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, EditCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * but smaller than size of address book","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d prepareCommand(outOfBoundIndex,","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-18","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" public void equals() {","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" final EditCommand standardCommand \u003d new EditCommand(INDEX_FIRST_PERSON, DESC_AMY);","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" EditCommand commandWithSameValues \u003d new EditCommand(INDEX_FIRST_PERSON, copyDescriptor);","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_SECOND_PERSON, DESC_AMY)));","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_BOB)));","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-08","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns an {@code EditCommand} with parameters {@code index} and {@code descriptor}","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" private EditCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" EditCommand editCommand \u003d new EditCommand(index, descriptor);","lastModifiedDate":"2017-05-25","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" editCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" return editCommand;","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-22","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-08","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":47,"-":183}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent() throws IllegalValueException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset() throws IllegalValueException, PersonNotFoundException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll() throws IllegalValueException, PersonNotFoundException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public AddressBook prepareAddressBook() throws DuplicatePersonException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-20","isFullCredit":true}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void equals() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26","isFullCredit":true}],"authorContributionMap":{"Esilocke":54}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":77}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Before","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":46}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"/**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}.","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}.","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" return command;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":110}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" @Before","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code JumpToListRequestEvent}","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" try {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":142}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class RedoCommandTest {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Collections.emptyList(), Arrays.asList(deleteCommandTwo, deleteCommandOne));","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in redoStack","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // single command in redoStack","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // no command in redoStack","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-13","isFullCredit":true}],"authorContributionMap":{"Esilocke":3,"-":53}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":77}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class UndoCommandTest {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandOne \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private final DeleteCommand deleteCommandTwo \u003d new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" deleteCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" deleteCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void execute() throws Exception {","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Arrays.asList(deleteCommandOne, deleteCommandTwo), Collections.emptyList());","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" deleteCommandOne.execute();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteCommandTwo.execute();","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // multiple commands in undoStack","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" // single command in undoStack","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no command in undoStack","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-13","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-13","isFullCredit":true}],"authorContributionMap":{"Esilocke":3,"-":55}},{"path":"src/test/java/seedu/address/logic/parser/AddCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-07-05","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class AddCommandParserTest {","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY)","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" // multiple names - last name accepted","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // multiple tags - all accepted","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" new AddCommand(expectedPersonMultipleTags));","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, new AddCommand(expectedTask));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // zero tags","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY, new AddCommand(expectedPerson));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE);","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // missing name prefix","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" // missing phone prefix","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + VALID_PHONE_BOB","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // missing email prefix","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + ADDRESS_DESC_BOB, expectedMessage);","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" // missing address prefix","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + VALID_ADDRESS_BOB, expectedMessage);","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" // all prefixes missing","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_TASK_USAGE);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" // missing description prefix","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" // missing deadline prefix","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + VALID_DEADLINE_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" // missing priority prefix","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" // invalid name","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" // invalid phone","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" // invalid email","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" // invalid tag","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-15","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" // invalid deadline","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" // invalid priority","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Priority.MESSAGE_PRIORITY_CONSTRAINTS);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC, Deadline.MESSAGE_DEADLINE_CONSTRAINTS);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-15","isFullCredit":true}],"authorContributionMap":{"charlesgoh":33,"Esilocke":89,"-":114}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":58}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","lastModifiedDate":"2017-07-07","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person));","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasAdd() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" + PersonUtil.getPersonDetails(person));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddCommand(person), command);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().isPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().isPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().isPrivate())","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().isPrivate()));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD) instanceof ClearCommand);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS) instanceof ClearCommand);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON), command);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD) instanceof ExitCommand);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\") instanceof ExitCommand);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","lastModifiedDate":"2017-06-12","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + keywords.stream().collect(Collectors.joining(\" \")));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD) instanceof HelpCommand);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\") instanceof HelpCommand);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD) instanceof HistoryCommand);","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\") instanceof HistoryCommand);","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" parser.parseCommand(\"histories\");","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-24","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS) instanceof HistoryCommand);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\") instanceof HistoryCommand);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"wangyiming1019"},"content":" try {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"wangyiming1019"},"content":" parser.parseCommand(\"histories\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD) instanceof ListCommand);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\") instanceof ListCommand);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS) instanceof ListCommand);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\") instanceof ListCommand);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWord() throws Exception {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD) instanceof BackupCommand);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupWordWithInput() throws Exception {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_WORD + \" test.xml\") instanceof BackupCommand);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAlias() throws Exception {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS) instanceof BackupCommand);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackupAliasWithInput() throws Exception {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand.COMMAND_ALIAS + \" test.xml\") instanceof BackupCommand);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD) instanceof RedoCommand);","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"redo 1\") instanceof RedoCommand);","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD) instanceof UndoCommand);","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" assertTrue(parser.parseCommand(\"undo 3\") instanceof UndoCommand);","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-17","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" parser.parseCommand(\"\");","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" parser.parseCommand(\"unknownCommand\");","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-27","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" return true;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":68,"Esilocke":3,"wangyiming1019":89,"-":136}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" // negative index","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // zero index","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\",","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\",","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\",","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\",","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\",","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\",","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-22","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":173}},{"path":"src/test/java/seedu/address/logic/parser/DeleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_PERSON;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeleteCommand.DELETE_TYPE_TASK;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * outside of the DeleteCommand code. For example, inputs \"1\" and \"1 abc\" take the","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * same path through the DeleteCommand, and therefore we test only one of them.","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest.","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class DeleteCommandParserTest {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_PERSON));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" new DeleteCommand(INDEX_FIRST_PERSON, DELETE_TYPE_TASK));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" //@@author","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-06-09","isFullCredit":true}],"authorContributionMap":{"Esilocke":23,"-":29}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-21","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":65}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-19","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":26}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \",","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-29","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectCommandParserTest}.","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectCommandParserTest","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-28","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":29}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"asc\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"desc\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"name\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"phone\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"email\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"address\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // no field or order","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\",","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-13","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArguments_success() throws ParseException {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand expectedCommand;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" SortCommand actualCommand;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"asc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name asc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"name\", \"desc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"name desc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"asc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone asc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"phone\", \"desc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"phone desc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"asc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email asc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"email\", \"desc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"email desc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"asc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address asc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" expectedCommand \u003d new SortCommand(\"address\", \"desc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" actualCommand \u003d parser.parse(\"address desc\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getField(), actualCommand.getField());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getOrder(), actualCommand.getOrder());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-12","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":100}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Test","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"}","lastModifiedDate":"2017-10-25","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":26}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Collection;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-10-04","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" AddressBook newData \u003d getTypicalAddressBook();","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-01","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" AddressBook testBook \u003d getTypicalAddressBook();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-01","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints.","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-24","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-12-24","isFullCredit":true}],"authorContributionMap":{"charlesgoh":114,"Esilocke":8,"-":95}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.isPrivate());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-16","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":9,"-":21}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.isPrivate());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-16","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":9,"-":40}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.isPrivate());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-16","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":9,"-":26}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers","lastModifiedDate":"2017-05-04","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-01-16","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" @Test","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.isPrivate());","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-16","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-01-16","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":9,"-":25}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"-04-17\")); // missing day","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04--17\")); // missing month","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04\")); // missing year","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"day-04-17\")); // invalid day","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-month-17\")); // invalid month","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-year\")); // invalid year","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"32-04-17\")); // impossible day","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-13-17\")); // impossible month","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04--1\")); // impossible year","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"0-04-17\")); // incomplete day","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-0-17\")); // incomplete month","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-1\")); // incomplete year","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04-201\")); // incomplete year","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-04/17\")); // inconsistent separators","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"04-042017\")); // missing separator","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // valid deadlines","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04/04/2017\")); // slashes","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04.04.2017\")); // dots","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-11","isFullCredit":true}],"authorContributionMap":{"Esilocke":44}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-11","isFullCredit":true}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {","lastModifiedDate":"2017-10-11","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"0\")); // priority out of range","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-12","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-11","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-24","isFullCredit":true}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects.","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-06-05","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" return this;","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-22","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));","lastModifiedDate":"2017-06-21","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return this;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" return descriptor;","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-05-05","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-05-05","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":8,"-":102}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditCommand.EditTaskDescriptor;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" return descriptor;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26","isFullCredit":true}],"authorContributionMap":{"Esilocke":88}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2016-09-23","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-01-18","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-05-03","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects.","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonBuilder {","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private Person person;","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public PersonBuilder() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" defaultRemark, defaultTags);","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-11","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}.","lastModifiedDate":"2016-12-11","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-11","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {","lastModifiedDate":"2017-05-03","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-11","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-11","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" try {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return this;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building.","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return this;","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" /**","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building.","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" */","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" return this;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" }","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":"","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" public Person build() {","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" return this.person;","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-03","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-03","isFullCredit":true}],"authorContributionMap":{"charlesgoh":13,"wangyiming1019":12,"-":113}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().isPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().isPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().isPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().isPrivate());","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" return this;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" return this;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" return this;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" /**","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building.","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return this;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"}","lastModifiedDate":"2017-10-23","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":90}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-03-29","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * A utility class for Person.","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class PersonUtil {","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}.","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" return AddCommand.COMMAND_WORD + \" \" + getPersonDetails(person);","lastModifiedDate":"2017-03-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-04-06","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-04-06","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-04-06","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details.","lastModifiedDate":"2017-04-06","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-04-06","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" sb.append(PREFIX_NAME + person.getName().fullName + \" \");","lastModifiedDate":"2017-06-06","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach(","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" );","lastModifiedDate":"2017-05-09","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" return sb.toString();","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-04-05","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"-":38}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private Task task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building.","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return this;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public Task build() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" return this.task;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-24","isFullCredit":true}],"authorContributionMap":{"Esilocke":93}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE;","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-08-07","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-08-07","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","lastModifiedDate":"2017-08-07","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-07","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2016-09-21","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class TypicalPersons {","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","lastModifiedDate":"2017-04-05","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // Manually added","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_AMY)","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE).withRemark(VALID_REMARK_BOB)","lastModifiedDate":"2017-10-25","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","lastModifiedDate":"2017-09-21","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-20","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-26","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static AddressBook getTypicalAddressBook() {","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" ab.addPerson(person);","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-06-09","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" assert false : \"not possible\";","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-13","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return ab;","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-09-24","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return ab;","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {","lastModifiedDate":"2017-08-07","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","lastModifiedDate":"2017-08-07","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-20","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-09-13","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":14,"wangyiming1019":15,"-":68}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","lastModifiedDate":"2017-10-30","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"09-11-2018\").withPriority(\"5\").build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-12-2016\").withPriority(\"5\").build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21.05.2015\").withPriority(\"5\").build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"30-04-2017\").withPriority(\"1\").build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21.08.2019\").withPriority(\"2\").build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06.06.2016\").withPriority(\"5\").build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons.","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksForAddressBook() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" try {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return ab;","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","lastModifiedDate":"2017-10-26","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"}","lastModifiedDate":"2017-10-26","isFullCredit":true}],"authorContributionMap":{"Esilocke":76}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","lastModifiedDate":"2017-08-23","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","lastModifiedDate":"2017-07-19","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Before;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Before","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setUp() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE, 0));","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() throws Exception {","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // default web page","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" // associated web page of a person","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" postNow(selectionChangedEventStub);","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" URL expectedPersonUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" + ALICE.getName().fullName.replaceAll(\" \", \"+\") + GOOGLE_SEARCH_URL_SUFFIX);","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-04","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","lastModifiedDate":"2017-08-23","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(expectedPersonUrl, browserPanelHandle.getLoadedUrl());","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());","lastModifiedDate":"2017-10-29","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-06","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-06","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":14,"-":50}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());","lastModifiedDate":"2017-10-19","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {","lastModifiedDate":"2017-08-15","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);","lastModifiedDate":"2017-08-05","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}.","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-07-01","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-07-01","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-01-19","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void constructor_nullFileUrl_throwsNullPointerException() {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public void constructor_missingFileUrl_throwsAssertionError() throws Exception {","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // public void constructor_invalidFileUrl_throwsAssertionError() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" // URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" // thrown.expect(AssertionError.class);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" // new TestUiPart\u003cObject\u003e(invalidFileUrl);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" // }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" //","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" // @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" // public void constructor_validFileUrl_loadsFile() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" // assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void constructor_nullFileName_throwsNullPointerException() {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void constructor_missingFileName_throwsNullPointerException() {","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","lastModifiedDate":"2017-05-15","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" // @Test","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // public void constructor_invalidFileName_throwsAssertionError() {","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" // thrown.expect(AssertionError.class);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" // }","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing.","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2016-12-21","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2016-12-21","isFullCredit":true}],"authorContributionMap":{"charlesgoh":17,"-":85}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * -\u003e added","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" String command \u003d \" \" + AddCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" 1\");","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and verifies that the command box displays","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" * an empty string, the result display box displays the success message of executing {@code AddCommand} with the","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" * details of {@code toAdd}, and the model related components equal to the current model added with {@code toAdd}.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" * These verifications are done by","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * instead.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" * {@code expectedModel}.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * These verifications are done by","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" * error style.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-08-22","isFullCredit":true}],"authorContributionMap":{"charlesgoh":36,"-":224}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.ClearCommand.TYPE_ALL;","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-09-13","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void clear() {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS, TYPE_ALL);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","lastModifiedDate":"2017-09-13","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","lastModifiedDate":"2017-09-13","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * These verifications are done by","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS, TYPE_ALL);","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","lastModifiedDate":"2017-10-28","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * These verifications are done by","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * error style.","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-08-22","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-08-22","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":97}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","lastModifiedDate":"2017-09-19","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","lastModifiedDate":"2017-09-19","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson(","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","lastModifiedDate":"2017-09-13","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","lastModifiedDate":"2017-09-19","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","lastModifiedDate":"2017-10-24","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * -\u003e rejected","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","lastModifiedDate":"2017-09-13","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" * browser url changes","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" showAllPersons();","lastModifiedDate":"2017-09-13","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" selectPerson(index);","lastModifiedDate":"2017-09-13","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","lastModifiedDate":"2017-09-19","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","lastModifiedDate":"2017-09-19","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;","lastModifiedDate":"2017-10-23","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" try {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" } else {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" */","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","lastModifiedDate":"2017-09-08","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":"","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","lastModifiedDate":"2017-09-02","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"}","lastModifiedDate":"2017-09-02","isFullCredit":true}],"authorContributionMap":{"charlesgoh":14,"-":268}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Alpha_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Alpha_master/authorship.json index 4a79046f92..a23cb89368 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Alpha_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Alpha_master/authorship.json @@ -1 +1 @@ -[{"path":"annotationTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"fake all the lines in this file is writtened by fakeAuthor"},{"lineNumber":2,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg"},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author"},{"lineNumber":10,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":11,"author":{"gitId":"-"},"content":"fake"}],"authorContributionMap":{"harryggg":5,"-":6}},{"path":"blameTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3"}],"authorContributionMap":{"harryggg":3,"-":1}},{"path":"newFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4"}],"authorContributionMap":{"harryggg":4}}] +[{"path":"annotationTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"fake all the lines in this file is writtened by fakeAuthor","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"fake","isFullCredit":true}],"authorContributionMap":{"harryggg":5,"-":6}},{"path":"blameTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true}],"authorContributionMap":{"harryggg":3,"-":1}},{"path":"newFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4","isFullCredit":true}],"authorContributionMap":{"harryggg":4}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Beta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Beta_master/authorship.json index ff1d3dea45..bb035f2a14 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Beta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Beta_master/authorship.json @@ -1 +1 @@ -[{"path":"src/main/resources/view/InfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e"},{"lineNumber":4,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"700.0\" prefWidth\u003d\"800.0\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"browserPlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"timetablePlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"-":7,"nbr":1}},{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e"},{"lineNumber":4,"author":{"gitId":"April0616"},"content":""},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import java.net.URL?\u003e"},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Menu?\u003e"},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e"},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":16,"author":{"gitId":"April0616"},"content":" \u003cstylesheets\u003e"},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e"},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003c/stylesheets\u003e"},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" maxHeight\u003d\"22.0\" prefHeight\u003d\"22.0\" prefWidth\u003d\"2000.0\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e"},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e"},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e"},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e"},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e"},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e"},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003c/MenuBar\u003e"},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox\u003e"},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cVBox fx:id\u003d\"personList\"\u003e"},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" minWidth\u003d\"255.0\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane\u003e"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":""},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.26582278481012656\" orientation\u003d\"VERTICAL\" prefWidth\u003d\"2000.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":34,"author":{"gitId":"April0616"},"content":""},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4269269269269269\" maxHeight\u003d\"628.0\" minHeight\u003d\"230.0\" prefHeight\u003d\"600.0\" prefWidth\u003d\"1990.0\"\u003e"},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cVBox maxWidth\u003d\"1000.0\" minHeight\u003d\"81.0\" minWidth\u003d\"430.0\" prefHeight\u003d\"81.0\" prefWidth\u003d\"843.0\" SplitPane.resizableWithParent\u003d\"true\"\u003e"},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e"},{"lineNumber":40,"author":{"gitId":"April0616"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" alignment\u003d\"TOP_CENTER\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"10.0\" right\u003d\"10.0\" /\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personInfoPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003c!-- @@author April0616 --\u003e"},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cVBox minWidth\u003d\"200\" prefWidth\u003d\"323.0\"\u003e"},{"lineNumber":52,"author":{"gitId":"April0616"},"content":""},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"305.0\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e"},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e"},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e"},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"320.0\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e"},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e"},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e"},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e"},{"lineNumber":66,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":68,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":71,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":72,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":74,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e"},{"lineNumber":75,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e"}],"authorContributionMap":{"April0616":54,"-":20,"nbr":1}},{"path":"src/main/resources/view/PersonInfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"April0616"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"April0616"},"content":""},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e"},{"lineNumber":4,"author":{"gitId":"April0616"},"content":""},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.Image?\u003e"},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e"},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.shape.Circle?\u003e"},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.text.Font?\u003e"},{"lineNumber":16,"author":{"gitId":"April0616"},"content":"\u003cAnchorPane styleClass\u003d\"person-info-panel\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":17,"author":{"gitId":"April0616"},"content":""},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"250.0\" prefWidth\u003d\"448.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"250.0\" prefWidth\u003d\"198.0\"\u003e"},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane prefHeight\u003d\"216.0\" prefWidth\u003d\"210.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cImageView fitHeight\u003d\"210.0\" fitWidth\u003d\"221.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\"\u003e"},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003cimage\u003e"},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cImage url\u003d\"@../images/personInfoBg.jpg\" /\u003e"},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003c/image\u003e"},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e"},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003cCircle fx:id\u003d\"photoCircle\" fill\u003d\"WHITE\" layoutX\u003d\"111.0\" layoutY\u003d\"100.0\" radius\u003d\"86.0\" stroke\u003d\"floralwhite\" strokeType\u003d\"INSIDE\" strokeWidth\u003d\"10\" /\u003e"},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cVBox alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"250.0\" prefWidth\u003d\"574.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cStackPane alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"20.0\" prefWidth\u003d\"304.0\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":34,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"35.0\" prefWidth\u003d\"391.0\" styleClass\u003d\"display_big_label\" text\u003d\"\\$name\"\u003e"},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cfont\u003e"},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cFont size\u003d\"24.0\" /\u003e"},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003c/font\u003e"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003c/Label\u003e"},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":40,"author":{"gitId":"April0616"},"content":" \u003cInsets left\u003d\"15.0\" top\u003d\"20.0\" /\u003e"},{"lineNumber":41,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":42,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e"},{"lineNumber":43,"author":{"gitId":"April0616"},"content":" \u003cFlowPane fx:id\u003d\"tags\" columnHalignment\u003d\"CENTER\"\u003e"},{"lineNumber":44,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":45,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5.0\" left\u003d\"15.0\" right\u003d\"10.0\" /\u003e"},{"lineNumber":46,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":47,"author":{"gitId":"April0616"},"content":" \u003c/FlowPane\u003e"},{"lineNumber":48,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"100.0\" prefWidth\u003d\"200.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":49,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"160.0\" prefWidth\u003d\"9.0\" HBox.hgrow\u003d\"NEVER\"\u003e"},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Gender\" /\u003e"},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Matric No\" /\u003e"},{"lineNumber":52,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Phone\" /\u003e"},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Email\" /\u003e"},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Birthday\" /\u003e"},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Address\" /\u003e"},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Remark\" /\u003e"},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"200.0\" prefWidth\u003d\"100.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"phone\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"email\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"birthday\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"address\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"\u003e"},{"lineNumber":65,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":66,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":67,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e"},{"lineNumber":68,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"\u003e"},{"lineNumber":69,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":70,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":71,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e"},{"lineNumber":72,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":74,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"15.0\" /\u003e"},{"lineNumber":75,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":76,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":77,"author":{"gitId":"April0616"},"content":" \u003cHBox.margin\u003e"},{"lineNumber":78,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":79,"author":{"gitId":"April0616"},"content":" \u003c/HBox.margin\u003e"},{"lineNumber":80,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":81,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":82,"author":{"gitId":"April0616"},"content":"\u003c/AnchorPane\u003e"}],"authorContributionMap":{"April0616":82}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e"},{"lineNumber":10,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":12,"author":{"gitId":"nbr"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":19,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":21,"author":{"gitId":"nbr"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"cell_big_label\" text\u003d\"\\$first\" /\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003cFlowPane fx:id\u003d\"tags\"\u003e"},{"lineNumber":31,"author":{"gitId":"nbr"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":32,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5.0\" /\u003e"},{"lineNumber":33,"author":{"gitId":"nbr"},"content":" \u003c/VBox.margin\u003e\u003c/FlowPane\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":37,"author":{"gitId":"nbr"},"content":" \u003crowConstraints\u003e"},{"lineNumber":38,"author":{"gitId":"nbr"},"content":" \u003cRowConstraints /\u003e"},{"lineNumber":39,"author":{"gitId":"nbr"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"-":29,"nbr":12}},{"path":"src/main/resources/view/PersonListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.ListView?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":5,"author":{"gitId":"nbr"},"content":"\u003cVBox styleClass\u003d\"personListBox\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cListView fx:id\u003d\"personListView\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e"}],"authorContributionMap":{"-":6,"nbr":1}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"nbr"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"-":25,"nbr":2}},{"path":"unused/CombinedTimetableDisplay.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\" xmlns\u003d\"http://javafx.com/javafx/8\""},{"lineNumber":16,"author":{"gitId":"-"},"content":" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.2\" orientation\u003d\"VERTICAL\" prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cAnchorPane styleClass\u003d\"combined-timetable-label\"\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cGridPane layoutX\u003d\"151.0\" layoutY\u003d\"26.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\""},{"lineNumber":22,"author":{"gitId":"-"},"content":" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" maxWidth\u003d\"300\" minWidth\u003d\"300.0\" prefWidth\u003d\"300\"/\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\"/\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cRowConstraints minHeight\u003d\"10.0\" prefHeight\u003d\"30.0\" vgrow\u003d\"SOMETIMES\"/\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_RIGHT\"\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cLabel alignment\u003d\"CENTER\" styleClass\u003d\"combined-timetable-main-label\" text\u003d\"Timetables Displayed: \"\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cInsets right\u003d\"2.5\"/\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"1\"\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"names\" styleClass\u003d\"combined-timetable-names\" text\u003d\"Label\"\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cInsets left\u003d\"2.5\"/\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" prefHeight\u003d\"100.0\" prefWidth\u003d\"160.0\"/\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"zacharytang":2,"-":46}},{"path":"unused/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":""},{"lineNumber":3,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":4,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e"},{"lineNumber":6,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":7,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":8,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":9,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cchildren\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/ImageView\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"/\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e"},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e"},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"/\u003e"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"zacharytang":8,"April0616":2,"-":55}}] +[{"path":"src/main/resources/view/InfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"700.0\" prefWidth\u003d\"800.0\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"browserPlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"timetablePlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"-":7,"nbr":1}},{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import java.net.URL?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Menu?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"April0616"},"content":" \u003cstylesheets\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003c/stylesheets\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" maxHeight\u003d\"22.0\" prefHeight\u003d\"22.0\" prefWidth\u003d\"2000.0\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003c/MenuBar\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cVBox fx:id\u003d\"personList\"\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" minWidth\u003d\"255.0\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.26582278481012656\" orientation\u003d\"VERTICAL\" prefWidth\u003d\"2000.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4269269269269269\" maxHeight\u003d\"628.0\" minHeight\u003d\"230.0\" prefHeight\u003d\"600.0\" prefWidth\u003d\"1990.0\"\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cVBox maxWidth\u003d\"1000.0\" minHeight\u003d\"81.0\" minWidth\u003d\"430.0\" prefHeight\u003d\"81.0\" prefWidth\u003d\"843.0\" SplitPane.resizableWithParent\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" alignment\u003d\"TOP_CENTER\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"10.0\" right\u003d\"10.0\" /\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personInfoPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003c!-- @@author April0616 --\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cVBox minWidth\u003d\"200\" prefWidth\u003d\"323.0\"\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"305.0\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"320.0\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":54,"-":20,"nbr":1}},{"path":"src/main/resources/view/PersonInfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"April0616"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.Image?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.shape.Circle?\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.text.Font?\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"April0616"},"content":"\u003cAnchorPane styleClass\u003d\"person-info-panel\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"250.0\" prefWidth\u003d\"448.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"250.0\" prefWidth\u003d\"198.0\"\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane prefHeight\u003d\"216.0\" prefWidth\u003d\"210.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cImageView fitHeight\u003d\"210.0\" fitWidth\u003d\"221.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003cimage\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cImage url\u003d\"@../images/personInfoBg.jpg\" /\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003c/image\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003cCircle fx:id\u003d\"photoCircle\" fill\u003d\"WHITE\" layoutX\u003d\"111.0\" layoutY\u003d\"100.0\" radius\u003d\"86.0\" stroke\u003d\"floralwhite\" strokeType\u003d\"INSIDE\" strokeWidth\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cVBox alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"250.0\" prefWidth\u003d\"574.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cStackPane alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"20.0\" prefWidth\u003d\"304.0\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"35.0\" prefWidth\u003d\"391.0\" styleClass\u003d\"display_big_label\" text\u003d\"\\$name\"\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cfont\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cFont size\u003d\"24.0\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003c/font\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"April0616"},"content":" \u003cInsets left\u003d\"15.0\" top\u003d\"20.0\" /\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"April0616"},"content":" \u003cFlowPane fx:id\u003d\"tags\" columnHalignment\u003d\"CENTER\"\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5.0\" left\u003d\"15.0\" right\u003d\"10.0\" /\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"April0616"},"content":" \u003c/FlowPane\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"100.0\" prefWidth\u003d\"200.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"160.0\" prefWidth\u003d\"9.0\" HBox.hgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Gender\" /\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Matric No\" /\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Phone\" /\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Email\" /\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Birthday\" /\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Address\" /\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Remark\" /\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"200.0\" prefWidth\u003d\"100.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"phone\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"email\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"birthday\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"address\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"15.0\" /\u003e","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"April0616"},"content":" \u003cHBox.margin\u003e","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"April0616"},"content":" \u003c/HBox.margin\u003e","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"April0616"},"content":"\u003c/AnchorPane\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":82}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"nbr"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"nbr"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"cell_big_label\" text\u003d\"\\$first\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003cFlowPane fx:id\u003d\"tags\"\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"nbr"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5.0\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"nbr"},"content":" \u003c/VBox.margin\u003e\u003c/FlowPane\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"nbr"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"nbr"},"content":" \u003cRowConstraints /\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"nbr"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":29,"nbr":12}},{"path":"src/main/resources/view/PersonListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.ListView?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"nbr"},"content":"\u003cVBox styleClass\u003d\"personListBox\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cListView fx:id\u003d\"personListView\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":6,"nbr":1}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"nbr"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":25,"nbr":2}},{"path":"unused/CombinedTimetableDisplay.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\" xmlns\u003d\"http://javafx.com/javafx/8\"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.2\" orientation\u003d\"VERTICAL\" prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cAnchorPane styleClass\u003d\"combined-timetable-label\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cGridPane layoutX\u003d\"151.0\" layoutY\u003d\"26.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" maxWidth\u003d\"300\" minWidth\u003d\"300.0\" prefWidth\u003d\"300\"/\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\"/\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cRowConstraints minHeight\u003d\"10.0\" prefHeight\u003d\"30.0\" vgrow\u003d\"SOMETIMES\"/\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_RIGHT\"\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cLabel alignment\u003d\"CENTER\" styleClass\u003d\"combined-timetable-main-label\" text\u003d\"Timetables Displayed: \"\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cInsets right\u003d\"2.5\"/\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"1\"\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"names\" styleClass\u003d\"combined-timetable-names\" text\u003d\"Label\"\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cInsets left\u003d\"2.5\"/\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" prefHeight\u003d\"100.0\" prefWidth\u003d\"160.0\"/\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"zacharytang":2,"-":46}},{"path":"unused/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cchildren\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/ImageView\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"/\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"/\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"zacharytang":8,"April0616":2,"-":55}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Charlie_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Charlie_master/authorship.json index a2f19b4aae..f2f87922ca 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Charlie_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Charlie_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"ifndef::env-github[]"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"image::images/Ui.png[width\u003d\"600\"]"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"endif::[]"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface)."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"* It is a Java application primarily targeted for students doing group projects."},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls."},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Site Map"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Acknowledgements"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"_Marco Jakob_."},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_."},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]"}],"authorContributionMap":{"charlesgoh":36}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us"},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team."},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/."},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Goh Chang Kang, Charles"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[https://github.com/charlesgoh[github]]"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert, Password Security Commands"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Jeffrey Goh Keng Wee"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Lin Ziwen Kelvin"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esilocke[github]]"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Wang Yiming"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1019[github]]"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"}],"authorContributionMap":{"charlesgoh":18,"Esilocke":4,"-":26}},{"path":"docs/ContactUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Contact Us"},{"lineNumber":2,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":3,"author":{"gitId":"-"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"* *Bug reports, Suggestions* : Post in our https://github.com/CS2103AUG2017-W09-B2/main/issues[issue tracker] if you noticed bugs or have suggestions on how to improve."},{"lineNumber":5,"author":{"gitId":"-"},"content":"* *Contributing* : We welcome pull requests. Follow the process described https://github.com/oss-generic/process[here]"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"* *Email us* : You can also reach us at `e0014961 [at] u.nus.edu`"}],"authorContributionMap":{"Esilocke":2,"-":4}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later"},{"lineNumber":22,"author":{"gitId":"-"},"content":"+"},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":26,"author":{"gitId":"-"},"content":"+"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE"},{"lineNumber":29,"author":{"gitId":"-"},"content":"+"},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them."},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer"},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)"},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle"},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`"},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK"},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`"},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`"},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`"},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings"},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +"},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests."},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands"},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)"},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`"},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code."},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork."},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up."},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e)."},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section."},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started]."},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]"},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component."},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`."},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other."},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary."},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level."},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)"},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file."},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components."},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App."},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor."},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory."},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk."},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component."},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class."},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class."},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`."},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]"},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk."},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time."},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]"},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components."},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component."},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class."},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component."},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change."},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly."},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :"},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command."},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`."},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events."},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`."},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call."},{"lineNumber":183,"author":{"gitId":"-"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]"},{"lineNumber":193,"author":{"gitId":"-"},"content":""},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences."},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data."},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change."},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyTask\u003e` that can be \u0027observed\u0027."},{"lineNumber":200,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components."},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":205,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `Storage` component,"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back."},{"lineNumber":212,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back."},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package."},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation"},{"lineNumber":219,"author":{"gitId":"-"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented."},{"lineNumber":221,"author":{"gitId":"-"},"content":""},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow"},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go."},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.1 : Using the UI to change font size_"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size:"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"1. `onAction` handlers are used to handle UI font size buttons. These handlers will post"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"new events via `ComponentManager`."},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":"2. CLI commands also post new events to handle font size changes, when the relevant command is entered (e.g. `fontsize increase`)."},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeChangeSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.2 : Sequence diagram for fontsize changing_"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"From the sequence diagram above, we can observe that the font size changes are handled by subscriber functions in PersonListPanel"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"and TaskListPanel."},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"The initial implementation required access to the model from the UI. This implementation was replaced with one that"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"standardised the handling of font size change requests through events."},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Use either UI or CLI based implementations +"},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implementing both UI and CLI functionality +"},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More options for the user. Not much increase in complexity when implementing the CLI version +"},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Cons:** This implementation required passing information between classes, which may cause unnecessary coupling. +"},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implementing only UI functionality +"},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Less tedious to implement and very intuitive for the user +"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Users who prefer typing commands will not have the option of editing their font sizes using the CLI"},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"charlesgoh"},"content":"//tag::avatar[]"},{"lineNumber":261,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatar on ViewPersonPanel"},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":"The following function allows the setting of URL for the `ImageView` attribute within the `ViewPersonPanel` class:"},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":"[source,java]"},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":"private void initializeAvatar() {"},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" String avatarPath \u003d person.getAvatar().value;"},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" if (!avatarPath.equals(\"\")) {"},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Initializing avatar to image at saved URL\");"},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" Image newImage \u003d new Image(avatarPath);"},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":" avatarImage.setImage(newImage);"},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":"The `initializeAvatar` method piggybacks on the `handlePersonPanelSelectionChangedEvent` event handler. Whenever there is"},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":"a change in the person selection panel, this function will call the `initializeAvatar` method, which will update"},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"the `ImageView` attribute."},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":"[source,java]"},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":"@Subscribe"},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":"private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" this.person \u003d event.getNewSelection().person;"},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" initializeWithPerson(person);"},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();"},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":"}"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":"As of v1.5, the avatar field supports only URLs sourced online. References to local files may work but require the"},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"prefix \"file:\""},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":299,"author":{"gitId":"-"},"content":"//tag::undoredo[]"},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`."},{"lineNumber":303,"author":{"gitId":"-"},"content":""},{"lineNumber":304,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:"},{"lineNumber":305,"author":{"gitId":"-"},"content":""},{"lineNumber":306,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.1 : Command inheritance_"},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern]."},{"lineNumber":310,"author":{"gitId":"-"},"content":""},{"lineNumber":311,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:"},{"lineNumber":312,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":313,"author":{"gitId":"-"},"content":"----"},{"lineNumber":314,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":315,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":316,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":317,"author":{"gitId":"-"},"content":" // ... list logic ..."},{"lineNumber":318,"author":{"gitId":"-"},"content":" }"},{"lineNumber":319,"author":{"gitId":"-"},"content":"}"},{"lineNumber":320,"author":{"gitId":"-"},"content":"----"},{"lineNumber":321,"author":{"gitId":"-"},"content":""},{"lineNumber":322,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:"},{"lineNumber":323,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":324,"author":{"gitId":"-"},"content":"----"},{"lineNumber":325,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {"},{"lineNumber":326,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":327,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":328,"author":{"gitId":"-"},"content":" // ... undo logic ..."},{"lineNumber":329,"author":{"gitId":"-"},"content":""},{"lineNumber":330,"author":{"gitId":"-"},"content":" executeUndoableCommand();"},{"lineNumber":331,"author":{"gitId":"-"},"content":" }"},{"lineNumber":332,"author":{"gitId":"-"},"content":"}"},{"lineNumber":333,"author":{"gitId":"-"},"content":""},{"lineNumber":334,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":335,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":336,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":337,"author":{"gitId":"-"},"content":" // ... delete logic ..."},{"lineNumber":338,"author":{"gitId":"-"},"content":" }"},{"lineNumber":339,"author":{"gitId":"-"},"content":"}"},{"lineNumber":340,"author":{"gitId":"-"},"content":"----"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning."},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command)."},{"lineNumber":345,"author":{"gitId":"-"},"content":""},{"lineNumber":346,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.2 : Initial status of undo/redo stack_"},{"lineNumber":348,"author":{"gitId":"-"},"content":""},{"lineNumber":349,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person."},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.3 : After executing `delete 5`_"},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":355,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all."},{"lineNumber":356,"author":{"gitId":"-"},"content":""},{"lineNumber":357,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`."},{"lineNumber":358,"author":{"gitId":"-"},"content":""},{"lineNumber":359,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed."},{"lineNumber":360,"author":{"gitId":"-"},"content":""},{"lineNumber":361,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.4 : Executing undo_"},{"lineNumber":363,"author":{"gitId":"-"},"content":""},{"lineNumber":364,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":365,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`."},{"lineNumber":366,"author":{"gitId":"-"},"content":""},{"lineNumber":367,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:"},{"lineNumber":368,"author":{"gitId":"-"},"content":""},{"lineNumber":369,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.5 : Undo/redo sequence diagram_"},{"lineNumber":371,"author":{"gitId":"-"},"content":""},{"lineNumber":372,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed)."},{"lineNumber":373,"author":{"gitId":"-"},"content":""},{"lineNumber":374,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":375,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`."},{"lineNumber":376,"author":{"gitId":"-"},"content":""},{"lineNumber":377,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow)."},{"lineNumber":378,"author":{"gitId":"-"},"content":""},{"lineNumber":379,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.6 : Executing `clear`_"},{"lineNumber":381,"author":{"gitId":"-"},"content":""},{"lineNumber":382,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:"},{"lineNumber":383,"author":{"gitId":"-"},"content":""},{"lineNumber":384,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.7 : Stack is not changed after `list`_"},{"lineNumber":386,"author":{"gitId":"-"},"content":""},{"lineNumber":387,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:"},{"lineNumber":388,"author":{"gitId":"-"},"content":""},{"lineNumber":389,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.8 : Undo/Redo activity diagram_"},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":393,"author":{"gitId":"-"},"content":""},{"lineNumber":394,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +"},{"lineNumber":395,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +"},{"lineNumber":396,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +"},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":398,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +"},{"lineNumber":399,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +"},{"lineNumber":400,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +"},{"lineNumber":401,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo."},{"lineNumber":402,"author":{"gitId":"-"},"content":""},{"lineNumber":403,"author":{"gitId":"-"},"content":"---"},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +"},{"lineNumber":406,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +"},{"lineNumber":407,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +"},{"lineNumber":408,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +"},{"lineNumber":409,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":410,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +"},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +"},{"lineNumber":412,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct."},{"lineNumber":413,"author":{"gitId":"-"},"content":""},{"lineNumber":414,"author":{"gitId":"-"},"content":"---"},{"lineNumber":415,"author":{"gitId":"-"},"content":""},{"lineNumber":416,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +"},{"lineNumber":417,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +"},{"lineNumber":418,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +"},{"lineNumber":419,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +"},{"lineNumber":420,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +"},{"lineNumber":422,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +"},{"lineNumber":423,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +"},{"lineNumber":424,"author":{"gitId":"-"},"content":""},{"lineNumber":425,"author":{"gitId":"-"},"content":"---"},{"lineNumber":426,"author":{"gitId":"-"},"content":""},{"lineNumber":427,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +"},{"lineNumber":428,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +"},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +"},{"lineNumber":430,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +"},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":432,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +"},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +"},{"lineNumber":434,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +"},{"lineNumber":435,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":436,"author":{"gitId":"-"},"content":""},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"// tag::task[]"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +"},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the `add`, `delete`, `find`, `select`, and `edit` commands."},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Object inheritance is thus used to create the commands that are shared with those used to handle Person objects."},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task-related Command implementation"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"An example of using inheritance to handle Person vs Task addition:"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {"},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand(toAdd);"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {"},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand(toAdd);"},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"The Parser in charge of the command will thus return either an AddPersonCommand, or an AddTaskCommand, depending on whether you specify to add a Task or not in the arguments."},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":" +"},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:"},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.1.1 : Sequence Diagram for adding a Task_"},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task structure and subclasses"},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"The Task object has several subclasses, which store information about the task. The following class diagram illustrates the structure of a Task object."},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"image::TaskClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.2.1 : Class Diagram for the Task class_"},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"Each subclass contains its own methods for input validation, and the Assignees class supports some methods for changing its assignedList."},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task Object Storage"},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"[source, xml]"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e"},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e"},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e"},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e"},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Task objects are stored in a similar manner to Person objects, and share the same level of hierarchy as Person objects. During startup, tasks are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book."},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +"},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use inheritance to implement different commands for Task and Person objects +"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"**Pros:** Can be easily extended to allow handling of other types of objects, and preserves Separation of Concerns. +"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"**Cons:** Minor code duplication occurs as the commands for Person and Tasks objects share the same structure. +"},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Use polymorphism to allow existing commands to implement task handling +"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"**Pros:** Code duplication is kept to a minimum as the Command will handle Task and Person objects in the same class. +"},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"**Cons:** Single Responsibility Principle is violated as each Command class now needs to handle 2 different types of objects. +"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +"},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +"},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes. +"},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa. +"},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage. +"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"// end::task[]"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]"},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign and Dismiss Commands"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"The `assign` and `dismiss` command allows you to assign contacts to and from your tasks, thus aiding coordination and collaboration. +"},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"The Assignees class stores information related to who is assigned to a particular task through maintaining an internal ArrayList that keeps track of all the indexes of the people who are assigned to the task. +"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"The indexes stored in the Assignees class *refer to the index of the person in the UniquePersonList, not the visible index shown to the user in the UI*. This means that the indexes will not change even if the list shown in the UI changes, such as after a `find` operation. +"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"For example, given the below list of persons:"},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexMovement.png[width\u003d\"800\"]"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.1 : Mapping of indexes to a task_"},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"After a `find` operation, only the second, fourth and fifth persons are visible."},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"When you call `assign 1 2 to/1`, while the first and second persons in the visible list will be assigned to the first Task, in this case the \"Second person\" and \"Fourth person\", internally the assignee list contain Indexes corresponding the following values: +"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[source, java]"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"assignedList \u003d {1, 3}"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"The indexes 1 and 3 refer to the zero-based index of the \"Second person\" and \"Fourth person\" in the complete list."},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Due to this requirement, when the UniquePersonList changes, the assigned indexes of each task will be updated as well."},{"lineNumber":555,"author":{"gitId":"-"},"content":""},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"The `add` operation will not require the assigned indexes to be updated, as each newly added person is not assigned to any task by default, and when a person is added, he is inserted to the end of the list, thus the order of the other persons will not change."},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"After a `clear` operation that clears only the persons list, all task assignee lists will be cleared and re-initialized."},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"After a `delete` operation, the order of the persons in the persons list may change. This is especially so when the first person is deleted, as this will cause the positions of all other persons to decrease by 1."},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"The activity diagram below illustrates the process of updating task assignee lists when a person is deleted."},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexDelete.png[width\u003d\"800]"},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.2 : Activity Diagram for updating Assignees after deleting a Person_"},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"After a `sort` operation, the order of the persons in the persons list may change as well. However, in comparison to `delete`, the new position of the person is not fixed."},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"To ensure that the indexes are updated properly, the change in positions after each `sort` operation is maintained as well inside the UniquePersonList. +"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexSort.png[width\u003d\"800\"]"},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.3 : Mapping of indexes after a sort operation_"},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"All task assignee lists will thus be updated using the mappings from the sort operation. Each index in the list will be replaced by the value given in the mappings."},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"For example, if a task previously had an index of \"1\" assigned to it, it be replaced by an index of \"4\"."},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of assigned persons in the Assignee class +"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store the Indexes of the persons only +"},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"**Pros:** The assigned persons will only need to be retrieved on a per-need basis, rather than residing in the Assignee class all the time, thus making storage simpler +"},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":"**Cons:** UniquePersonList will be coupled to Tasks, as Tasks will need to retrieve information from the UniquePersonList in order to update itself after any operation that could potentially change the UniquePersonList ordering. +"},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store the whole person in the Assignees class +"},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":"**Pros:** The Assignees class will not need to depend on the UniquePersonList as its internal list is independent from that of the UniquePersonList +"},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"**Cons:** Repetition of information is incurred in the storage file, as the same person can appear multiple times if he is assigned to multiple tasks. This will increase the size of the storage file, and make read-write operations slow. +"},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]"},{"lineNumber":587,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]"},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":589,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":590,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` methods in UniquePersonList and UniqueTaskList. It supports"},{"lineNumber":591,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field."},{"lineNumber":592,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":593,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator."},{"lineNumber":594,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":595,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`"},{"lineNumber":596,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class or the UniqueTaskList class."},{"lineNumber":597,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":598,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for sort commands that trigger sorting in person listings is shown below:"},{"lineNumber":599,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":600,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandPersonDiagram.png[width\u003d\"800\"]"},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command class diagram_"},{"lineNumber":602,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":603,"author":{"gitId":"charlesgoh"},"content":"Likewise, the UML Class diagram for sort commands that trigger sorting in task listings is shown below:"},{"lineNumber":604,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":605,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandTaskDiagram.png[width\u003d\"800\"]"},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort task command class diagram_"},{"lineNumber":607,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":608,"author":{"gitId":"charlesgoh"},"content":"We can deduce from the UML diagrams diagrams above that the only difference between the implementation"},{"lineNumber":609,"author":{"gitId":"charlesgoh"},"content":"of the sorting for persons and tasks lies in the location where the sorting is actually executed."},{"lineNumber":610,"author":{"gitId":"charlesgoh"},"content":"The sorting of persons happens in `UniquePersonList` class while the sorting of tasks happens in `UniqueTaskList`."},{"lineNumber":611,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":612,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort person name desc`. The following sequence diagram"},{"lineNumber":613,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works."},{"lineNumber":614,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":615,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]"},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command sequence diagram_"},{"lineNumber":617,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":618,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods results in the actual person or task list being sorted. This list will be"},{"lineNumber":619,"author":{"gitId":"charlesgoh"},"content":"reflected in both the application\u0027s storage as well as the graphical user interface."},{"lineNumber":620,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":621,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":622,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":623,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +"},{"lineNumber":624,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":625,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` and `UniqueTaskList` class. +"},{"lineNumber":626,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the lists."},{"lineNumber":627,"author":{"gitId":"charlesgoh"},"content":"Future changes to the implementation will be easier as a consequence. +"},{"lineNumber":628,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +"},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +"},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +"},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList`"},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":"and `UniqueTaskList` will have to rely on the `SortCommand` class."},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +"},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +"},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive and reduces complexity in implementation. +"},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +"},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +"},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +"},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system."},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":"// end::sort[]"},{"lineNumber":647,"author":{"gitId":"-"},"content":""},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":"// tag::backup[]"},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":"The `backup` command uses the event handler `BackupRequestEvent`. When raised, this"},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":"event notifies the subscriber `backupAddressBook` method in Storage class."},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":"The outlining sequence diagram for this process (excluding the interaction with the"},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":"`BackupRequestEvent`) is shown below:"},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDiagram.png[width\u003d\"800]"},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"_Figure 3.7.1 : Backup command sequence diagram_"},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +"},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":664,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use an event handler to initialize the backup process +"},{"lineNumber":665,"author":{"gitId":"-"},"content":"**Pros:** Avoids coupling the logic to the storage unnecessarily. +"},{"lineNumber":666,"author":{"gitId":"-"},"content":"**Cons:** May not be as intuitive for some developers in the beginning +"},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":668,"author":{"gitId":"-"},"content":"**Alternative 2:** Access storage component directly instead of using event handlers +"},{"lineNumber":669,"author":{"gitId":"-"},"content":"**Pros:** May be more intuitive as it is a direct approach +"},{"lineNumber":670,"author":{"gitId":"-"},"content":"**Cons:** Violates the Law of Demeter."},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":"// end::backup[]"},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":"// tag::password[]"},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock and Unlock Command"},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":"The `lock` and `unlock` commands utilise the Model to access the user preferences of"},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"the application."},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"Arguments are processed in the `UnlockCommandParser` or `LockCommandParser`,"},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":"which passes control over to the `UnlockCommand` and `LockCommand` class respectively."},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":"These `Command` classes will then call the Model to toggle the lock\u0027s state."},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":683,"author":{"gitId":"-"},"content":"The activity diagram below outlines the basic logic of the lock states concept.:"},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":"image::LockStatesActivityDiagram.png[width\u003d\"800]"},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"_Figure 3.8.1 : Lock/Unlock command activity diagram_"},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":"From the activity diagram we can see that lock states are preserved in the `preferences.json`"},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":"file after the application closes by passing the lock state into the `UserPrefs` class to be"},{"lineNumber":690,"author":{"gitId":"-"},"content":"saved by the Storage component."},{"lineNumber":691,"author":{"gitId":"-"},"content":""},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":"The default state of the lock is set to False (i.e. locked) when the user first opens the"},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":"application. Subsequent changes to the lock will persist in the user preferences."},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `lock` and `unlock` Commands"},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Call methods in the Model directly to change UserPrefs +"},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive. Highest returns for minimal amount of code +"},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May be confusing to some developers in the beginning, since another"},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"intuitive approach is to use event handlers +"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Use Event Handlers +"},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for some developers +"},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will still have to access Model, which makes its advantage over direct calls next to none"},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d ChangePassword Command"},{"lineNumber":710,"author":{"gitId":"-"},"content":"The default password when users first open Address++ is `password`. The ChangePassword command"},{"lineNumber":711,"author":{"gitId":"-"},"content":"sets a new password in the temporary User Preferences. When the application is closed, this"},{"lineNumber":712,"author":{"gitId":"-"},"content":"information is passed to the Storage Component to be saved into the file `preferences.json`"},{"lineNumber":713,"author":{"gitId":"-"},"content":""},{"lineNumber":714,"author":{"gitId":"-"},"content":"To illustrate this concept better, let us have a look at the `preferences.json` file:"},{"lineNumber":715,"author":{"gitId":"-"},"content":"[source, json]"},{"lineNumber":716,"author":{"gitId":"-"},"content":"{"},{"lineNumber":717,"author":{"gitId":"-"},"content":" \"guiSettings\" : {"},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" \"windowWidth\" : 1309.0,"},{"lineNumber":719,"author":{"gitId":"-"},"content":" \"windowHeight\" : 720.0,"},{"lineNumber":720,"author":{"gitId":"-"},"content":" \"windowCoordinates\" : {"},{"lineNumber":721,"author":{"gitId":"-"},"content":" \"x\" : 0,"},{"lineNumber":722,"author":{"gitId":"-"},"content":" \"y\" : 22"},{"lineNumber":723,"author":{"gitId":"-"},"content":" }"},{"lineNumber":724,"author":{"gitId":"-"},"content":" },"},{"lineNumber":725,"author":{"gitId":"-"},"content":" \"addressBookFilePath\" : \"data/addressbook.xml\","},{"lineNumber":726,"author":{"gitId":"-"},"content":" \"addressBookName\" : \"My Address++\","},{"lineNumber":727,"author":{"gitId":"-"},"content":" \"addressBookLockState\" : false,"},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":" \"addressBookEncryptedPassword\" : \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\","},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" \"theme\" : \"/view/DarkTheme.css\""},{"lineNumber":730,"author":{"gitId":"-"},"content":"}"},{"lineNumber":731,"author":{"gitId":"-"},"content":""},{"lineNumber":732,"author":{"gitId":"-"},"content":"As shown in the cope snippet above, the password is stored as one of the entries in the JSON"},{"lineNumber":733,"author":{"gitId":"-"},"content":"file."},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":735,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":736,"author":{"gitId":"-"},"content":"SHA256 encryption was used to calculate a hash for the password. This is to delay anyone snooping around the"},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"user\u0027s file directories from seeing the real password immediately."},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":739,"author":{"gitId":"-"},"content":"**Validation Checks**"},{"lineNumber":740,"author":{"gitId":"-"},"content":"****"},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":"1. **Password Validation** -\u003e Is the password correct?"},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"2. **Password Confirmation** -\u003e Does the new password and confirmation password match?"},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"3. **Password Uniqueness** -\u003e Is the new password different from the old password?"},{"lineNumber":744,"author":{"gitId":"-"},"content":"****"},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":746,"author":{"gitId":"-"},"content":"The activity diagram below outlines the process flow for the `ChangePasswordCommand`:"},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":748,"author":{"gitId":"-"},"content":"image::ChangePasswordActivityDiagram.png[width\u003d\"800]"},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"_Figure 3.9.1 : ChangePassword command activity diagram_"},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":753,"author":{"gitId":"-"},"content":"**Aspect:** On Demand Saving vs. Save On Exit +"},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":755,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Save On Exit +"},{"lineNumber":756,"author":{"gitId":"-"},"content":"**Pros:** Simplifies process flow as the command class no longer has to access both Model and Storage components +"},{"lineNumber":757,"author":{"gitId":"-"},"content":"**Cons:** Any system/application crash may cause change password data to be lost +"},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":759,"author":{"gitId":"-"},"content":"**Alternative 2:** On Demand Saving +"},{"lineNumber":760,"author":{"gitId":"-"},"content":"**Pros:** Changes may persist even through system and application crashes +"},{"lineNumber":761,"author":{"gitId":"-"},"content":"**Cons:** May slow down application, although not significantly. Complicates process flow."},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"// end::password[]"},{"lineNumber":763,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":764,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacy[]"},{"lineNumber":765,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields"},{"lineNumber":766,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":767,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email`, `Address` and `Remark` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not."},{"lineNumber":768,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":769,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacy.png[width\u003d\"800\"]"},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.1 : Class diagram for a Person, only Name, Phone, Email, Address and Remark contain an isPrivate boolean to indicate if it is private or not_"},{"lineNumber":771,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +"},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +"},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +"},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":776,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes."},{"lineNumber":777,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field."},{"lineNumber":778,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor."},{"lineNumber":779,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`."},{"lineNumber":780,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":781,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":782,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.2 : Sequence Diagram for adding a Person with private fields_"},{"lineNumber":783,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":784,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +"},{"lineNumber":785,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:"},{"lineNumber":786,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":787,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":788,"author":{"gitId":"jeffreygohkw"},"content":"@Override"},{"lineNumber":789,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {"},{"lineNumber":790,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":791,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":792,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":793,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;"},{"lineNumber":794,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":795,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":796,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":797,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI."},{"lineNumber":798,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":799,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name."},{"lineNumber":800,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":801,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`."},{"lineNumber":802,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":803,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`."},{"lineNumber":804,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following"},{"lineNumber":805,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":806,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":807,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":808,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":809,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":810,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":811,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":812,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":813,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":814,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":815,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":816,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":817,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":818,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":819,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format"},{"lineNumber":820,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":821,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]"},{"lineNumber":822,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":823,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e"},{"lineNumber":824,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e"},{"lineNumber":825,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e"},{"lineNumber":826,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e"},{"lineNumber":827,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e"},{"lineNumber":828,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e"},{"lineNumber":829,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e"},{"lineNumber":830,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e"},{"lineNumber":831,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e"},{"lineNumber":832,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremark\u003echeerful lad\u003c/remark\u003e"},{"lineNumber":833,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremarkIsPrivate\u003efalse\u003c/remarkIsPrivate\u003e"},{"lineNumber":834,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e"},{"lineNumber":835,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e"},{"lineNumber":836,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":837,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same."},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +"},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was."},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":844,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`."},{"lineNumber":845,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true."},{"lineNumber":846,"author":{"gitId":"-"},"content":""},{"lineNumber":847,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false."},{"lineNumber":848,"author":{"gitId":"-"},"content":""},{"lineNumber":849,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object."},{"lineNumber":850,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":851,"author":{"gitId":"-"},"content":"----"},{"lineNumber":852,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":853,"author":{"gitId":"-"},"content":" Name updatedName;"},{"lineNumber":854,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {"},{"lineNumber":855,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":856,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":857,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":858,"author":{"gitId":"-"},"content":" }"},{"lineNumber":859,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":860,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":861,"author":{"gitId":"-"},"content":" }"},{"lineNumber":862,"author":{"gitId":"-"},"content":" return updatedName;"},{"lineNumber":863,"author":{"gitId":"-"},"content":"}"},{"lineNumber":864,"author":{"gitId":"-"},"content":"----"},{"lineNumber":865,"author":{"gitId":"-"},"content":""},{"lineNumber":866,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing."},{"lineNumber":867,"author":{"gitId":"-"},"content":""},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":869,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +"},{"lineNumber":871,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":872,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +"},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +"},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +"},{"lineNumber":875,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +"},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +"},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to."},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +"},{"lineNumber":882,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +"},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +"},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +"},{"lineNumber":886,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +"},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +"},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users."},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy"},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`."},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below."},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.11.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_"},{"lineNumber":899,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object."},{"lineNumber":901,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`."},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":"This is illustrated in the code below, which shows how the privacy of `Name` is set in `PersonPrivacySettings`:"},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {"},{"lineNumber":908,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {"},{"lineNumber":909,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {"},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`"},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`."},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`. For example, the new `Name` is created in the code snippet below:"},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {"},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);"},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);"},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":936,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":937,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":938,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");"},{"lineNumber":939,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":940,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {"},{"lineNumber":941,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());"},{"lineNumber":942,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":943,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());"},{"lineNumber":944,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":945,"author":{"gitId":"jeffreygohkw"},"content":" return name;"},{"lineNumber":946,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":947,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":948,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`."},{"lineNumber":949,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":950,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":951,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`."},{"lineNumber":952,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all."},{"lineNumber":953,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":954,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":955,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":956,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +"},{"lineNumber":957,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":958,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +"},{"lineNumber":959,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +"},{"lineNumber":960,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +"},{"lineNumber":961,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":962,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Enhance the functionality of EditCommand. +"},{"lineNumber":963,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +"},{"lineNumber":964,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data."},{"lineNumber":965,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":966,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the address book\u0027s privacy level"},{"lineNumber":967,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":968,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommand` allows the user to change the privacy level of Address++, letting users easily reveal data hidden by private fields, or hide persons containing private fields entirely."},{"lineNumber":969,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":970,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `PrivacyLevelCommand` is illustrated below."},{"lineNumber":971,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":972,"author":{"gitId":"jeffreygohkw"},"content":"image::PrivacyLevelSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":973,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.1 : Sequence Diagram for changing the privacy level of the address book_"},{"lineNumber":974,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":975,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommandParser` will accept any integer that is input in the command line, and create a `PrivacyLevelCommand` that stores the integer, which represents the privacy level to switch to."},{"lineNumber":976,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":977,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution,`PrivacyLevelCommand` will first check if the integer falls within the range of the minimum and maximum privacy level. If it does not, a new `CommandException` is thrown, reminding the user of the valid input levels."},{"lineNumber":978,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":979,"author":{"gitId":"jeffreygohkw"},"content":"If the integer is within the valid range, `PrivacyLevelCommand` will update the privacy level of `Model`. Following that, it will proceed to update the privacy level of each person."},{"lineNumber":980,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":981,"author":{"gitId":"jeffreygohkw"},"content":"`Model`, each `Person` and each field that can be set as private all contain a `privacyLevel` variable to indicate the current privacy level. This value should remain the same between all of these objects throughout the operation of Address++."},{"lineNumber":982,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":983,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacyLevel.png[width\u003d\"800\"]"},{"lineNumber":984,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.2 : Class Diagram of Person, which shows which classes contain an integer to indicate the privacy level_"},{"lineNumber":985,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":986,"author":{"gitId":"jeffreygohkw"},"content":"Finally, depending on the privacy level, `PrivacyLevelCommand` will update the call `model.updateFilteredPersonList()` with the appropriate predicate."},{"lineNumber":987,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":988,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated in the code snippet below."},{"lineNumber":989,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":990,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":991,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":992,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {"},{"lineNumber":993,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":994,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {"},{"lineNumber":995,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":996,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":997,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);"},{"lineNumber":998,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {"},{"lineNumber":999,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);"},{"lineNumber":1000,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);"},{"lineNumber":1001,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);"},{"lineNumber":1002,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":1003,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);"},{"lineNumber":1004,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":1005,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":1006,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {"},{"lineNumber":1007,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":1008,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1009,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1010,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {"},{"lineNumber":1011,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());"},{"lineNumber":1012,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1013,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":1014,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1015,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));"},{"lineNumber":1016,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1017,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1018,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1019,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1020,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1021,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Storing of the privacy level +"},{"lineNumber":1022,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1023,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have each relevant class store a privacy level integer. +"},{"lineNumber":1024,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Less coupling, less modification of existing code required. +"},{"lineNumber":1025,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify every relevant object every time `PrivacyLevelCommand` is called. Runs the risk that an object may accidentally not have its privacy level modified to match the other objects if privacy levels are not properly updated. +"},{"lineNumber":1026,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1027,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store the privacy level in the model and have any object that needs to check it query from model. +"},{"lineNumber":1028,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only one integer needs to be modified for the privacy level of the entire address book to change, which also eliminates any possibility that privacy level may be different when used by different objects. +"},{"lineNumber":1029,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases coupling, classes such as Name will need to have a Model object as one of its variables to access Model. Large scale modification of existing code and tests are necessary."},{"lineNumber":1030,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacy[]"},{"lineNumber":1031,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1032,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]"},{"lineNumber":1033,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps"},{"lineNumber":1034,"author":{"gitId":"-"},"content":""},{"lineNumber":1035,"author":{"gitId":"jeffreygohkw"},"content":"Locating a person\u0027s address allows users to take the address that is stored by a person and search it on Google Maps in the browser."},{"lineNumber":1036,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +"},{"lineNumber":1038,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:"},{"lineNumber":1039,"author":{"gitId":"-"},"content":""},{"lineNumber":1040,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1041,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1042,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":1043,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":1044,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":1045,"author":{"gitId":"-"},"content":" return new LocateCommand(index);"},{"lineNumber":1046,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":1047,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":1048,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":1049,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1050,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1051,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1052,"author":{"gitId":"-"},"content":""},{"lineNumber":1053,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of persons, a `CommandException` will be thrown."},{"lineNumber":1054,"author":{"gitId":"-"},"content":""},{"lineNumber":1055,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution."},{"lineNumber":1056,"author":{"gitId":"-"},"content":""},{"lineNumber":1057,"author":{"gitId":"-"},"content":"This code for this can be found below:"},{"lineNumber":1058,"author":{"gitId":"-"},"content":""},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1060,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1061,"author":{"gitId":"-"},"content":"public CommandResult execute() throws CommandException {"},{"lineNumber":1062,"author":{"gitId":"-"},"content":""},{"lineNumber":1063,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":1064,"author":{"gitId":"-"},"content":""},{"lineNumber":1065,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":1066,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":1067,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1068,"author":{"gitId":"-"},"content":""},{"lineNumber":1069,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":1070,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":1071,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":1072,"author":{"gitId":"-"},"content":""},{"lineNumber":1073,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1074,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:"},{"lineNumber":1077,"author":{"gitId":"-"},"content":""},{"lineNumber":1078,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1079,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1080,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":1081,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":1082,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":1083,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1084,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":1085,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":1086,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1087,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1088,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1089,"author":{"gitId":"-"},"content":""},{"lineNumber":1090,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:"},{"lineNumber":1091,"author":{"gitId":"-"},"content":""},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1093,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.13.1 : Sequence Diagram for Locating a Person\u0027s Address_"},{"lineNumber":1094,"author":{"gitId":"-"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1096,"author":{"gitId":"-"},"content":""},{"lineNumber":1097,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +"},{"lineNumber":1098,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1099,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command `locate`. +"},{"lineNumber":1100,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +"},{"lineNumber":1101,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +"},{"lineNumber":1102,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1103,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +"},{"lineNumber":1105,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users."},{"lineNumber":1106,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]"},{"lineNumber":1107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1108,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]"},{"lineNumber":1109,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another using Google Maps"},{"lineNumber":1110,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1111,"author":{"gitId":"jeffreygohkw"},"content":"When the `navigate` command is entered into the command line, `NavigateCommandParse` will first reset its internal `from`, `to`, `fromIndex`, `toIndex` to null. It will then check for the input prefixes and ensure that only one of the prefixes from the group `fp/`, `ft/`, and `fa/`, which we will subsequently call the `from` prefixes are present. It then does the same with the prefixes from the group `tp/`, `tt/` and `ta/`, which we will call the `to` prefixes. +"},{"lineNumber":1112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1113,"author":{"gitId":"jeffreygohkw"},"content":"This is done by invoking the `checkFrom` and `checkTo` methods as can be seen from the code snippet below. For the example `checkFrom`, it takes in 3 booleans on whether or not each prefix is present and checks whether or not there is exactly one kind of `from` prefix. It throws an error if there are no `from` prefixes or more than one type of `from` prefixes."},{"lineNumber":1114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1115,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1116,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1117,"author":{"gitId":"jeffreygohkw"},"content":"private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)"},{"lineNumber":1118,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {"},{"lineNumber":1119,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {"},{"lineNumber":1120,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":1121,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {"},{"lineNumber":1122,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present"},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);"},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1132,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"`checkFrom` calls `setArgsForNavigateCommand`, which sets the variables in the `NavigateCommandParser` to the appropriate values depending on whether the address originates from a person, a task or is a manual input by the user."},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":"private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person, boolean forFrom) throws IllegalValueException {"},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {"},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());"},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());"},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {"},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());"},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1153,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());"},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":1157,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());"},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1160,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());"},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1164,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1167,"author":{"gitId":"jeffreygohkw"},"content":"Finally, `NavigateCommandParser` will create a new `NavigateCommand` based on the inputs as set by `setArgsForNavigateCommand`."},{"lineNumber":1168,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1169,"author":{"gitId":"jeffreygohkw"},"content":"When `NavigateCommand` is created, it first checks if there are duplicate `from` or `to` addresses that are passed into it and throws an error if that is the case."},{"lineNumber":1170,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1173,"author":{"gitId":"jeffreygohkw"},"content":"private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex) throws IllegalArgumentException {"},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {"},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":1176,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1177,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {"},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1180,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1183,"author":{"gitId":"jeffreygohkw"},"content":"If it passes this check, `NavigateCommand` stores `fromLocation` and `toLocation`, which are the Locations of any manually added address by the user to navigate from and to respectively. It also stores `toIndex` and `fromIndex`, which are the Indexes of the `Person` or `Task` to extract the address from as well as `toIsTask` and `fromIsTask`, which are booleans that indicate whether `toIndex` and `fromIndex` are indexes of Persons or Tasks."},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `NavigateCommmand`, it will first check if it has a non-null `fromIndex`, if it does, it will create a new Location based on its `fromIndex` and `fromIsTask` values using the `setLocationByIndex` method. Otherwise, it will set the Location to be the Location in `locationfrom`. This can be seen below:"},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1187,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"if (fromIndex !\u003d null) {"},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":1190,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);"},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);"},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1194,"author":{"gitId":"jeffreygohkw"},"content":"} else {"},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;"},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1197,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"setLocationByIndex throws CommandException if the target Person or Task does not have a valid Address to extract due to the Address being blank, or it being private."},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1201,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {"},{"lineNumber":1204,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {"},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {"},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1208,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());"},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1211,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {"},{"lineNumber":1212,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":1213,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {"},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":1215,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())"},{"lineNumber":1217,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":1218,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1220,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1221,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1222,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1223,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` does the same for the Address to navigate `To` and posts a new `BrowserPanelNavigateEvent`, passing in the `Location` to navigate `From` and the `Location` to navigate `To`. +"},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` will then create a new `CommandResult` to indicate a successful `Command`."},{"lineNumber":1225,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":"`BrowserPanel` will then get the information from this `BrowserPanelNavigateEvent`, and load the appropriate Google Maps URL after replacing information such as the Unit Number and extra whitespaces. This has to be done as Google Maps does not function properly with Unit Numbers or spaces in its URL."},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1229,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"private void loadDirectionsPage(String fromLocation, String toLocation) {"},{"lineNumber":1231,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\""},{"lineNumber":1232,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\""},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":1236,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);"},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1239,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":"The overall sequence of events is illustrated by the following sequence diagram:"},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"image::NavigateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1243,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.14.1 : Sequence Diagram for Navigating from one Address to another_"},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1246,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1247,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1248,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to pass the appropriate information to NavigateCommand +"},{"lineNumber":1249,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1250,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have a constructor that takes in a large number of arguments so that NavigateCommand can correctly identify what kind of Location to post in BrowserPanelNavigateEvent. +"},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only 1 constructor needed. +"},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional methods will be needed to properly identify which Location to use for navigation. +"},{"lineNumber":1253,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1254,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Create many constructors to segregate the different possible scenarios that might happen. +"},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear what information to use to generate the Locations +"},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires large numbers of constructors to be created, easy for mistakes to occur as Constructors all share the same name but different argument types."},{"lineNumber":1257,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to transfer information of the address from one class to another +"},{"lineNumber":1259,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1260,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Wrap the address in a `Location` class before posting the BrowserPanelNavigateEvent. +"},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only Locations, which indicates that the address is properly parsed, will be passed for the BrowserPanel to read, reducing the possibility of BrowserPanel reading stray unwanted strings as addresses to navigate to and from. The value stored inside each Location cannot be altered once that Location object has been created. +"},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** A new class has to be created and Strings, Addresses and TaskAddresses will need to be converted to Locations first. +"},{"lineNumber":1263,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1264,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Simply pass on a String containing the address from class to class +"},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easy to read and transfer information, lower overhead +"},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** It is easier for stray Strings to pollute the information, and the Strings can be unintentionally modified."},{"lineNumber":1267,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]"},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1269,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]"},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening and Saving of the .xml save file"},{"lineNumber":1271,"author":{"gitId":"jeffreygohkw"},"content":"Both `OpenCommand` and `SaveAsCommand` function in a very similar way."},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"When `open` or `save` is input by the user, `AddressBookParser` will create a new `OpenCommand` or `SaveAsCommand`."},{"lineNumber":1273,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1274,"author":{"gitId":"jeffreygohkw"},"content":"These two commands will then post a new `OpenRequestEvent` or a new `SaveAsRequestEvent` and return a successful `CommandResult`."},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` will have two methods, `HandleOpenRequestEvent` and `HandleSaveAsRequestEvent` that subscribe to the above two events and will call `handleOpen` and `handleSaveAs`."},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1280,"author":{"gitId":"jeffreygohkw"},"content":"private void handleOpen() throws IOException, DataConversionException {"},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":1282,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog"},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);"},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file"},{"lineNumber":1290,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file"},{"lineNumber":1292,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));"},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1296,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1297,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1299,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1300,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"private void handleSaveAs() throws IOException {"},{"lineNumber":1302,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":1304,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":1305,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog"},{"lineNumber":1308,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);"},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension"},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {"},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");"},{"lineNumber":1314,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1315,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file"},{"lineNumber":1316,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":1317,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences"},{"lineNumber":1318,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());"},{"lineNumber":1319,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);"},{"lineNumber":1320,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":1321,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":1322,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1324,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1326,"author":{"gitId":"jeffreygohkw"},"content":"Both `handleOpen` and `handleSaveAs` will create a new `FileChooser` extension filter that only allows the pop-up window to save files and load files in the .xml format."},{"lineNumber":1327,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1328,"author":{"gitId":"jeffreygohkw"},"content":"Upon successfully selecting a file to load or a location to save as in the pop-up window, both methods will call `changefilepath` in `Storage` to the selected file path."},{"lineNumber":1329,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"Finally, both commands diverge as `handleOpen` will call `resetData` to reset the data using the new save file, while `handleSaveAs` will call `saveAddressBook` and `saveUserPrefs` to save the data. Both methods will finally call `fillInnerParts()` to refresh the data displayed on the UI."},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated using the sequence diagram below:"},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1334,"author":{"gitId":"jeffreygohkw"},"content":"image::OpenSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1335,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.15.1 : Sequence Diagram for Opening a save file_"},{"lineNumber":1336,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1337,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1338,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How does `OpenCommand` and `SaveAsCommand` determine the file location to save or load the save file from +"},{"lineNumber":1339,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1340,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Open a `FileChooser` window, allowing the user to move through their file directory to acquire their save location and to select the name of the save file. +"},{"lineNumber":1341,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** User friendly, many other applications function similarly when saving and loading. Easier to implement and use as part of the dropdown menu in the User Interface. +"},{"lineNumber":1342,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Not entirely command line based. +"},{"lineNumber":1343,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1344,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Input the file directory and file name to save or load from as part of the command. +"},{"lineNumber":1345,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Entirely command line based, may be more preferable for users who prefer using the command line. +"},{"lineNumber":1346,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires more complex code. Command must check if the file location to save or load from is valid, and that there is a valid file of that name."},{"lineNumber":1347,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]"},{"lineNumber":1348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1349,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]"},{"lineNumber":1350,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the theme of the address book"},{"lineNumber":1351,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1352,"author":{"gitId":"jeffreygohkw"},"content":"The original style of the address book may not be for everyone. `ThemeCommand` allows users to switch between multiple preset themes."},{"lineNumber":1353,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1354,"author":{"gitId":"jeffreygohkw"},"content":"`ThemeCommandParser` trims the arguments after the word `theme` in the command line, removing any whitespaces leading up to and following that word. If the entire String ended up trimmed, then `ThemeCommandParser` will throw a `ParseException`. Otherwise, it creates a new `ThemeCommand`, passing in the trimmed word as seen below:"},{"lineNumber":1355,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1356,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1357,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1358,"author":{"gitId":"jeffreygohkw"},"content":"public ThemeCommand parse(String args) throws ParseException {"},{"lineNumber":1359,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {"},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));"},{"lineNumber":1362,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);"},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1366,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1367,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1368,"author":{"gitId":"jeffreygohkw"},"content":"When initialising the Address Book, the `AddressBook` class will create a `HashMap\u003cString, String\u003e` to store the keys and values of the themes."},{"lineNumber":1369,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1370,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1371,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1372,"author":{"gitId":"jeffreygohkw"},"content":"private void initialiseStyleMap() {"},{"lineNumber":1373,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"DarkTheme.css\");"},{"lineNumber":1374,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"DarkTheme.css\");"},{"lineNumber":1375,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"LightTheme.css\");"},{"lineNumber":1376,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"LightTheme.css\");"},{"lineNumber":1377,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1378,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1379,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"The keys correspond to the possible user inputs, such as `light` or `dark`, while the values contain the filepath of the .css files, such as `DarkTheme.css`. This way, users do not need to remember and will not have to know what the .css files are like to use the theme command."},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1382,"author":{"gitId":"jeffreygohkw"},"content":"On executing `ThemeCommand`, it first checks if the input string can be found in the set of keys in the HashMap contained by the `AddressBook` class. If it cannot be found, or if the value corresponding to the input string is identical to that of the value of the file path of the .css file stored in Model, then a `CommandException` is thrown, as users cannot change to a non-existent theme, or a theme that is already in use."},{"lineNumber":1383,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1384,"author":{"gitId":"jeffreygohkw"},"content":"If the string is valid, `ThemeCommand` will post a `ChangeThemeRequestEvent` and set the theme to the new file path corresponding to the input String in `Model`. `Model` will then continue on to set the theme in `UserPrefs` as well, so that it can be loaded on starting the application."},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` contains a method `handleChangeThemeEvent` that subscribes to the `ChangeThemeRequestEvent`. `handleChangeThemeEvent` calls `handlChangeTheme`, which first checks if there is an existing theme, if there is, it removes it, then sets adds the new theme through the file path that was passed to it."},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1388,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1390,"author":{"gitId":"jeffreygohkw"},"content":"public void handleChangeTheme(String theme) {"},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {"},{"lineNumber":1392,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);"},{"lineNumber":1393,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1394,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(VIEW_PATH + theme);"},{"lineNumber":1395,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1396,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1397,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"After all is done, `ThemeCommand` returns a `CommandResult`, indicating the success of the command."},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"The overall execution of `ThemeCommand` is seen in the following code snippet."},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {"},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;"},{"lineNumber":1406,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1407,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {"},{"lineNumber":1408,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);"},{"lineNumber":1409,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));"},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1412,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1413,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {"},{"lineNumber":1414,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));"},{"lineNumber":1415,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));"},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);"},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));"},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for the whole process is show below:"},{"lineNumber":1424,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1425,"author":{"gitId":"jeffreygohkw"},"content":"image::ThemeSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1426,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.16.1 : Sequence Diagram for Changing Themes_"},{"lineNumber":1427,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Getting the correct file path to the .css file +"},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Store the file path in a HashMap, where the keys are the possible inputs that the user may type and the values are the actual filepaths +"},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier on the user. They do not need to remember any complicated .css names or file paths, and the input string can be customisable by changing the names of the keys added to the HashMap. +"},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Slightly more work needed to initialise the HashMap and check if the file paths are valid. +"},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Change the name of the .css file and file paths such that what the user directly inputs can correspond to the actual .css file. +"},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** A HashMap is no longer needed, instead, the input string just needs to be parsed to be turned into a file path. This makes it easier to add additional .css files, as developers do not have to keep modifying the initialisation of the HashMap +"},{"lineNumber":1435,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Less flexibility in naming the file, user may break the code if they realise the input string directly used as part of the file path."},{"lineNumber":1436,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]"},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"// tag::adddeletetag[]"},{"lineNumber":1439,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism"},{"lineNumber":1440,"author":{"gitId":"-"},"content":""},{"lineNumber":1441,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete"},{"lineNumber":1442,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`."},{"lineNumber":1443,"author":{"gitId":"-"},"content":""},{"lineNumber":1444,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`."},{"lineNumber":1445,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once."},{"lineNumber":1446,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`add tag/ 1 2 3 t/friends`) will be executed."},{"lineNumber":1447,"author":{"gitId":"-"},"content":"The same operation will happen for `delete tag/` command."},{"lineNumber":1448,"author":{"gitId":"-"},"content":""},{"lineNumber":1449,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works"},{"lineNumber":1450,"author":{"gitId":"-"},"content":"in a similar way."},{"lineNumber":1451,"author":{"gitId":"-"},"content":""},{"lineNumber":1452,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:"},{"lineNumber":1453,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1454,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1455,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":1456,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book."},{"lineNumber":1457,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1458,"author":{"gitId":"-"},"content":"public class AddTagCommand extends AddCommand {"},{"lineNumber":1459,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":1460,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":1461,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":1462,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1463,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":1464,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":1465,"author":{"gitId":"-"},"content":""},{"lineNumber":1466,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":1467,"author":{"gitId":"-"},"content":" // check whether the index within the range"},{"lineNumber":1468,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1469,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":1470,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag"},{"lineNumber":1471,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1472,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag"},{"lineNumber":1473,"author":{"gitId":"-"},"content":" return new CommandResult();"},{"lineNumber":1474,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1475,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1476,"author":{"gitId":"-"},"content":""},{"lineNumber":1477,"author":{"gitId":"-"},"content":"Suppose the user enter the `add tag/ 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:"},{"lineNumber":1478,"author":{"gitId":"-"},"content":""},{"lineNumber":1479,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":1480,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : Add Tag Sequence Diagram for Logic_ +"},{"lineNumber":1481,"author":{"gitId":"-"},"content":"The `delete tag/` command works the same as `add tag/` command with different name only."},{"lineNumber":1482,"author":{"gitId":"-"},"content":""},{"lineNumber":1483,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1484,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +"},{"lineNumber":1485,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +"},{"lineNumber":1486,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception."},{"lineNumber":1487,"author":{"gitId":"-"},"content":""},{"lineNumber":1488,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1489,"author":{"gitId":"-"},"content":""},{"lineNumber":1490,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1491,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `add tag/` and `delete tag/` +"},{"lineNumber":1492,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +"},{"lineNumber":1493,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +"},{"lineNumber":1494,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+"},{"lineNumber":1495,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1496,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +"},{"lineNumber":1497,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +"},{"lineNumber":1498,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list."},{"lineNumber":1499,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle."},{"lineNumber":1500,"author":{"gitId":"-"},"content":""},{"lineNumber":1501,"author":{"gitId":"-"},"content":"---"},{"lineNumber":1502,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +"},{"lineNumber":1503,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `add tag/` and `delete tag/` +"},{"lineNumber":1504,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +"},{"lineNumber":1505,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +"},{"lineNumber":1506,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1507,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +"},{"lineNumber":1508,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +"},{"lineNumber":1509,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner."},{"lineNumber":1510,"author":{"gitId":"-"},"content":"// end::adddeletetag[]"},{"lineNumber":1511,"author":{"gitId":"-"},"content":""},{"lineNumber":1512,"author":{"gitId":"-"},"content":"// tag::findtag[]"},{"lineNumber":1513,"author":{"gitId":"-"},"content":""},{"lineNumber":1514,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism"},{"lineNumber":1515,"author":{"gitId":"-"},"content":""},{"lineNumber":1516,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book."},{"lineNumber":1517,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`."},{"lineNumber":1518,"author":{"gitId":"-"},"content":""},{"lineNumber":1519,"author":{"gitId":"-"},"content":"The `find tag/` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`."},{"lineNumber":1520,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first."},{"lineNumber":1521,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar."},{"lineNumber":1522,"author":{"gitId":"-"},"content":""},{"lineNumber":1523,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences."},{"lineNumber":1524,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`."},{"lineNumber":1525,"author":{"gitId":"-"},"content":""},{"lineNumber":1526,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:"},{"lineNumber":1527,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String."},{"lineNumber":1528,"author":{"gitId":"-"},"content":""},{"lineNumber":1529,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1530,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1531,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":1532,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":1533,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":1534,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {"},{"lineNumber":1535,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":1536,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");"},{"lineNumber":1537,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1538,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();"},{"lineNumber":1539,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1540,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1541,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one"},{"lineNumber":1542,"author":{"gitId":"-"},"content":"is for the tags to be excluded."},{"lineNumber":1543,"author":{"gitId":"-"},"content":""},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":1545,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1546,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":1547,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":1548,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":1549,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":1550,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1551,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":1552,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {"},{"lineNumber":1553,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {"},{"lineNumber":1554,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);"},{"lineNumber":1555,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1556,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));"},{"lineNumber":1557,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1558,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1559,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1560,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1561,"author":{"gitId":"-"},"content":""},{"lineNumber":1562,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +"},{"lineNumber":1563,"author":{"gitId":"-"},"content":"Suppose the user enter `find tag/ friends` command. The following sequence diagram shows how the find tag command works:"},{"lineNumber":1564,"author":{"gitId":"-"},"content":""},{"lineNumber":1565,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1566,"author":{"gitId":"-"},"content":"_Figure 3.18.1 : Find Tag Sequence Diagram for Logic_ +"},{"lineNumber":1567,"author":{"gitId":"-"},"content":""},{"lineNumber":1568,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1569,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list."},{"lineNumber":1570,"author":{"gitId":"-"},"content":""},{"lineNumber":1571,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1572,"author":{"gitId":"-"},"content":""},{"lineNumber":1573,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1574,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `find tag/` +"},{"lineNumber":1575,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `find tag/` +"},{"lineNumber":1576,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `find tag/` command will be similar to the `find` command. +"},{"lineNumber":1577,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +"},{"lineNumber":1578,"author":{"gitId":"-"},"content":""},{"lineNumber":1579,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `find tag/` in `FindCommand`. +"},{"lineNumber":1580,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +"},{"lineNumber":1581,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle"},{"lineNumber":1582,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things."},{"lineNumber":1583,"author":{"gitId":"-"},"content":"// end::findtag[]"},{"lineNumber":1584,"author":{"gitId":"-"},"content":""},{"lineNumber":1585,"author":{"gitId":"-"},"content":"// tag::favunfav[]"},{"lineNumber":1586,"author":{"gitId":"-"},"content":""},{"lineNumber":1587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favourite/Unfavourite Person mechanism"},{"lineNumber":1588,"author":{"gitId":"-"},"content":"To favourite a person is achieved by `FavouriteCommand`. It basically changes the value of the `favourite` status of a `Person` but there is no specific `Favourite` field for person."},{"lineNumber":1589,"author":{"gitId":"-"},"content":""},{"lineNumber":1590,"author":{"gitId":"-"},"content":"In this sense, a boolean value needs to be created to store the favourite status of a contact. As `AddCommand` does not involve `favourite`, the default `favourite` status for every newly added `Person` is false."},{"lineNumber":1591,"author":{"gitId":"-"},"content":""},{"lineNumber":1592,"author":{"gitId":"-"},"content":"The `favourite` status is a boolean value and it will be set as true through `FavouriteCommand`. Then, the target person will be updated."},{"lineNumber":1593,"author":{"gitId":"-"},"content":""},{"lineNumber":1594,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1595,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1596,"author":{"gitId":"-"},"content":"public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":1597,"author":{"gitId":"-"},"content":""},{"lineNumber":1598,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":1599,"author":{"gitId":"-"},"content":""},{"lineNumber":1600,"author":{"gitId":"-"},"content":" // throw invalid person index"},{"lineNumber":1601,"author":{"gitId":"-"},"content":""},{"lineNumber":1602,"author":{"gitId":"-"},"content":" // update favourite status"},{"lineNumber":1603,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":1604,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),"},{"lineNumber":1605,"author":{"gitId":"-"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),"},{"lineNumber":1606,"author":{"gitId":"-"},"content":" personToFavourite.getAddress(), true,"},{"lineNumber":1607,"author":{"gitId":"-"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),"},{"lineNumber":1608,"author":{"gitId":"-"},"content":" personToFavourite.getTags());"},{"lineNumber":1609,"author":{"gitId":"-"},"content":" // update target person"},{"lineNumber":1610,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":1611,"author":{"gitId":"-"},"content":" model.updatePerson(personToFavourite, editedPerson);"},{"lineNumber":1612,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":1613,"author":{"gitId":"-"},"content":" // throw exception"},{"lineNumber":1614,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1615,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":1616,"author":{"gitId":"-"},"content":""},{"lineNumber":1617,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));"},{"lineNumber":1618,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1619,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1620,"author":{"gitId":"-"},"content":"`FavouriteCommand` takes in an integer as its argument. The command is first being parsed in `AddressBookParser` to be identified as an instance of `FavouriteCommand`."},{"lineNumber":1621,"author":{"gitId":"-"},"content":"Then it is parsed by `FavouriteCommandParser` to parse the index. Invalid indexes will be handled by throwing an exception. This is how `FavouriteCommandParser` is implemented:"},{"lineNumber":1622,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1623,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1624,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":1625,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand"},{"lineNumber":1626,"author":{"gitId":"-"},"content":" * and returns an FavouriteCommand object for execution."},{"lineNumber":1627,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":1628,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1629,"author":{"gitId":"-"},"content":" public FavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":1630,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":1631,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":1632,"author":{"gitId":"-"},"content":" return new FavouriteCommand(index);"},{"lineNumber":1633,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":1634,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":1635,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":1636,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1637,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1638,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1639,"author":{"gitId":"-"},"content":""},{"lineNumber":1640,"author":{"gitId":"-"},"content":"The following sequence diagram shows how a `FavouriteCommand` is processed: +"},{"lineNumber":1641,"author":{"gitId":"-"},"content":""},{"lineNumber":1642,"author":{"gitId":"-"},"content":"image::FavouriteSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1643,"author":{"gitId":"-"},"content":"_Figure 3.19.1 : Favourite Sequence Diagram for Logic_ +"},{"lineNumber":1644,"author":{"gitId":"-"},"content":""},{"lineNumber":1645,"author":{"gitId":"-"},"content":"To indicate that a person has been `favoured`, `PersonCard` is modified to contain a `favouriteLabel` that changes its appearance based on the `favourite` status of the person."},{"lineNumber":1646,"author":{"gitId":"-"},"content":"It will first detect the boolean favourite status of the person. If the person is a favourite contact, a heart will be shown."},{"lineNumber":1647,"author":{"gitId":"-"},"content":"The colours of the border and the background of the label are set to transparent, so that only the background picture, which is a heart, will be shown."},{"lineNumber":1648,"author":{"gitId":"-"},"content":""},{"lineNumber":1649,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":1650,"author":{"gitId":"-"},"content":""},{"lineNumber":1651,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `favourite` +"},{"lineNumber":1652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `favourite`. +"},{"lineNumber":1653,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to modify existing command. +"},{"lineNumber":1654,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Person` class to update the person status. The constructor of `person` has been modified so all the `person` in the address book must change accordingly. +"},{"lineNumber":1655,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `favourite` in `AddCommand` +"},{"lineNumber":1656,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +"},{"lineNumber":1657,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. The `favourite` status will be treated as an optional field when using `AddCommand`. In order to change `favourite` status, `EditCommand` may be modified which is very troublesome. +"},{"lineNumber":1658,"author":{"gitId":"-"},"content":""},{"lineNumber":1659,"author":{"gitId":"-"},"content":"---"},{"lineNumber":1660,"author":{"gitId":"-"},"content":"**Aspect:** Store `Favourite` values +"},{"lineNumber":1661,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Store it as a `Boolean` value +"},{"lineNumber":1662,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to create another class. +"},{"lineNumber":1663,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` and `ModelManager` to update the person status.It is also prone to bugs when developers forget to change the ObjectProperty to `String` in UI classes. +"},{"lineNumber":1664,"author":{"gitId":"-"},"content":""},{"lineNumber":1665,"author":{"gitId":"-"},"content":"**Alternative 2:** Add a new `Favourite` field +"},{"lineNumber":1666,"author":{"gitId":"-"},"content":"**Pros:** Similar way to store other personal information. It also follows the open-close principle and exercises cohesion, where all matters related to `Favourite` field is dealt in its own class. +"},{"lineNumber":1667,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. Adding a new field will cause many changes in UI, Logic, Model and Storage. Some test cases will be rewritten."},{"lineNumber":1668,"author":{"gitId":"-"},"content":"// end::favunfav[]"},{"lineNumber":1669,"author":{"gitId":"-"},"content":""},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging"},{"lineNumber":1671,"author":{"gitId":"-"},"content":""},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations."},{"lineNumber":1673,"author":{"gitId":"-"},"content":""},{"lineNumber":1674,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])"},{"lineNumber":1675,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level"},{"lineNumber":1676,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file."},{"lineNumber":1677,"author":{"gitId":"-"},"content":""},{"lineNumber":1678,"author":{"gitId":"-"},"content":"*Logging Levels*"},{"lineNumber":1679,"author":{"gitId":"-"},"content":""},{"lineNumber":1680,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application"},{"lineNumber":1681,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution"},{"lineNumber":1682,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App"},{"lineNumber":1683,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size"},{"lineNumber":1684,"author":{"gitId":"-"},"content":""},{"lineNumber":1685,"author":{"gitId":"-"},"content":""},{"lineNumber":1686,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration"},{"lineNumber":1687,"author":{"gitId":"-"},"content":""},{"lineNumber":1688,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`)."},{"lineNumber":1689,"author":{"gitId":"-"},"content":""},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation"},{"lineNumber":1691,"author":{"gitId":"-"},"content":""},{"lineNumber":1692,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation."},{"lineNumber":1693,"author":{"gitId":"-"},"content":""},{"lineNumber":1694,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1695,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting."},{"lineNumber":1696,"author":{"gitId":"-"},"content":""},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation"},{"lineNumber":1698,"author":{"gitId":"-"},"content":""},{"lineNumber":1699,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits."},{"lineNumber":1700,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time."},{"lineNumber":1701,"author":{"gitId":"-"},"content":""},{"lineNumber":1702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation"},{"lineNumber":1703,"author":{"gitId":"-"},"content":""},{"lineNumber":1704,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis."},{"lineNumber":1705,"author":{"gitId":"-"},"content":""},{"lineNumber":1706,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format"},{"lineNumber":1707,"author":{"gitId":"-"},"content":""},{"lineNumber":1708,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages."},{"lineNumber":1709,"author":{"gitId":"-"},"content":""},{"lineNumber":1710,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format."},{"lineNumber":1711,"author":{"gitId":"-"},"content":""},{"lineNumber":1712,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format."},{"lineNumber":1713,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`."},{"lineNumber":1714,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu."},{"lineNumber":1715,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below."},{"lineNumber":1716,"author":{"gitId":"-"},"content":""},{"lineNumber":1717,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]"},{"lineNumber":1718,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_"},{"lineNumber":1719,"author":{"gitId":"-"},"content":""},{"lineNumber":1720,"author":{"gitId":"-"},"content":"\u003d\u003d Testing"},{"lineNumber":1721,"author":{"gitId":"-"},"content":""},{"lineNumber":1722,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests"},{"lineNumber":1723,"author":{"gitId":"-"},"content":""},{"lineNumber":1724,"author":{"gitId":"-"},"content":"There are three ways to run tests."},{"lineNumber":1725,"author":{"gitId":"-"},"content":""},{"lineNumber":1726,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":1727,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies."},{"lineNumber":1728,"author":{"gitId":"-"},"content":""},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*"},{"lineNumber":1730,"author":{"gitId":"-"},"content":""},{"lineNumber":1731,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`"},{"lineNumber":1732,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`"},{"lineNumber":1733,"author":{"gitId":"-"},"content":""},{"lineNumber":1734,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*"},{"lineNumber":1735,"author":{"gitId":"-"},"content":""},{"lineNumber":1736,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)"},{"lineNumber":1737,"author":{"gitId":"-"},"content":""},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1739,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle."},{"lineNumber":1740,"author":{"gitId":"-"},"content":""},{"lineNumber":1741,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*"},{"lineNumber":1742,"author":{"gitId":"-"},"content":""},{"lineNumber":1743,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running."},{"lineNumber":1744,"author":{"gitId":"-"},"content":""},{"lineNumber":1745,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)"},{"lineNumber":1746,"author":{"gitId":"-"},"content":""},{"lineNumber":1747,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests"},{"lineNumber":1748,"author":{"gitId":"-"},"content":""},{"lineNumber":1749,"author":{"gitId":"-"},"content":"We have two types of tests:"},{"lineNumber":1750,"author":{"gitId":"-"},"content":""},{"lineNumber":1751,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,"},{"lineNumber":1752,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package."},{"lineNumber":1753,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package."},{"lineNumber":1754,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,"},{"lineNumber":1755,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +"},{"lineNumber":1756,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`"},{"lineNumber":1757,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +"},{"lineNumber":1758,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`"},{"lineNumber":1759,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +"},{"lineNumber":1760,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`"},{"lineNumber":1761,"author":{"gitId":"-"},"content":""},{"lineNumber":1762,"author":{"gitId":"-"},"content":""},{"lineNumber":1763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing"},{"lineNumber":1764,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**"},{"lineNumber":1765,"author":{"gitId":"-"},"content":""},{"lineNumber":1766,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing."},{"lineNumber":1767,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`."},{"lineNumber":1768,"author":{"gitId":"-"},"content":""},{"lineNumber":1769,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops"},{"lineNumber":1770,"author":{"gitId":"-"},"content":""},{"lineNumber":1771,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation"},{"lineNumber":1772,"author":{"gitId":"-"},"content":""},{"lineNumber":1773,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation."},{"lineNumber":1774,"author":{"gitId":"-"},"content":""},{"lineNumber":1775,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration"},{"lineNumber":1776,"author":{"gitId":"-"},"content":""},{"lineNumber":1777,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details."},{"lineNumber":1778,"author":{"gitId":"-"},"content":""},{"lineNumber":1779,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release"},{"lineNumber":1780,"author":{"gitId":"-"},"content":""},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Here are the steps to create a new release."},{"lineNumber":1782,"author":{"gitId":"-"},"content":""},{"lineNumber":1783,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]."},{"lineNumber":1784,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e."},{"lineNumber":1785,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`"},{"lineNumber":1786,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created."},{"lineNumber":1787,"author":{"gitId":"-"},"content":""},{"lineNumber":1788,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies"},{"lineNumber":1789,"author":{"gitId":"-"},"content":""},{"lineNumber":1790,"author":{"gitId":"Esilocke"},"content":"A project often depends on third-party libraries. For example, Address++ depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +"},{"lineNumber":1791,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +"},{"lineNumber":1792,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)"},{"lineNumber":1793,"author":{"gitId":"-"},"content":""},{"lineNumber":1794,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1795,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories"},{"lineNumber":1796,"author":{"gitId":"-"},"content":""},{"lineNumber":1797,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`"},{"lineNumber":1798,"author":{"gitId":"-"},"content":""},{"lineNumber":1799,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]"},{"lineNumber":1800,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1801,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can..."},{"lineNumber":1802,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App"},{"lineNumber":1803,"author":{"gitId":"-"},"content":""},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new person | keep track of my contacts"},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need"},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new task | keep track of my tasks and assignments"},{"lineNumber":1809,"author":{"gitId":"-"},"content":""},{"lineNumber":1810,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need"},{"lineNumber":1811,"author":{"gitId":"-"},"content":""},{"lineNumber":1812,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts"},{"lineNumber":1813,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1814,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added"},{"lineNumber":1815,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1816,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made"},{"lineNumber":1817,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1818,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values"},{"lineNumber":1819,"author":{"gitId":"-"},"content":""},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"|`* * *` |cautious user |be able to lock my address book application whenever I want with a password | prevent people with malicious intent from making changes to my data"},{"lineNumber":1821,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1822,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident"},{"lineNumber":1823,"author":{"gitId":"-"},"content":""},{"lineNumber":1824,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location"},{"lineNumber":1825,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1826,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs"},{"lineNumber":1827,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1828,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity"},{"lineNumber":1829,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1830,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better"},{"lineNumber":1831,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1832,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me"},{"lineNumber":1833,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1834,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts"},{"lineNumber":1835,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1836,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms"},{"lineNumber":1837,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1838,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others"},{"lineNumber":1839,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1840,"author":{"gitId":"Esilocke"},"content":"|`* *` |cautious user |be able to back up my address book data | retrieve my back up data in the event I make breaking changes to my actual address book and there is no way of undoing them"},{"lineNumber":1841,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"|`* *` |user with poor eyesight |be able to increase the font size | use the application without straining my eyes"},{"lineNumber":1843,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"|`* *` |forgetful user |be able to see who is assigned to a task | find my contacts who are in charge more quickly"},{"lineNumber":1845,"author":{"gitId":"-"},"content":""},{"lineNumber":1846,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly"},{"lineNumber":1847,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1848,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like"},{"lineNumber":1849,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1850,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts"},{"lineNumber":1851,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"|`*` |user |be able to mark my favourite contacts |find them more easily"},{"lineNumber":1853,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently"},{"lineNumber":1855,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1856,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features"},{"lineNumber":1857,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1858,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1859,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1860,"author":{"gitId":"-"},"content":""},{"lineNumber":1861,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1862,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases"},{"lineNumber":1863,"author":{"gitId":"-"},"content":""},{"lineNumber":1864,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)"},{"lineNumber":1865,"author":{"gitId":"-"},"content":""},{"lineNumber":1866,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person"},{"lineNumber":1868,"author":{"gitId":"-"},"content":""},{"lineNumber":1869,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1870,"author":{"gitId":"-"},"content":""},{"lineNumber":1871,"author":{"gitId":"-"},"content":"1. User requests to list persons"},{"lineNumber":1872,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1873,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list"},{"lineNumber":1874,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person"},{"lineNumber":1875,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1876,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1877,"author":{"gitId":"-"},"content":""},{"lineNumber":1878,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1879,"author":{"gitId":"-"},"content":""},{"lineNumber":1880,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1881,"author":{"gitId":"-"},"content":"* 2a. The list is empty."},{"lineNumber":1882,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1883,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1884,"author":{"gitId":"-"},"content":""},{"lineNumber":1885,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid."},{"lineNumber":1886,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1887,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1888,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1889,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1890,"author":{"gitId":"-"},"content":"Use case resumes at step 2."},{"lineNumber":1891,"author":{"gitId":"-"},"content":""},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person"},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria"},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria"},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found."},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found."},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person"},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons"},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list"},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person."},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person."},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid."},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid."},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message."},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail."},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made."},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1956,"author":{"gitId":"-"},"content":""},{"lineNumber":1957,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1958,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps"},{"lineNumber":1959,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1960,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1961,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1962,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps"},{"lineNumber":1963,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo"},{"lineNumber":1964,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message"},{"lineNumber":1965,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone."},{"lineNumber":1966,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1967,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1968,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1969,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1970,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1971,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1972,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands."},{"lineNumber":1973,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1974,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1975,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands."},{"lineNumber":1976,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1977,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3."},{"lineNumber":1978,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1979,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1980,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands."},{"lineNumber":1981,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1982,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1983,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands."},{"lineNumber":1984,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1985,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3"},{"lineNumber":1986,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1987,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1988,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort"},{"lineNumber":1989,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1990,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1991,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1992,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria"},{"lineNumber":1993,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria"},{"lineNumber":1994,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message."},{"lineNumber":1995,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1996,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1997,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1998,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1999,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":2000,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":2001,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":2002,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":2003,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":2004,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":2005,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid."},{"lineNumber":2006,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":2007,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":2008,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message."},{"lineNumber":2009,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":2010,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1."},{"lineNumber":2011,"author":{"gitId":"-"},"content":""},{"lineNumber":2012,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":2013,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements"},{"lineNumber":2014,"author":{"gitId":"-"},"content":""},{"lineNumber":2015,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed."},{"lineNumber":2016,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage."},{"lineNumber":2017,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse."},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure."},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse."},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0."},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing."},{"lineNumber":2022,"author":{"gitId":"-"},"content":""},{"lineNumber":2023,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":2024,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary"},{"lineNumber":2025,"author":{"gitId":"-"},"content":""},{"lineNumber":2026,"author":{"gitId":"-"},"content":"[[mainstream-os]]"},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Mainstream OS"},{"lineNumber":2028,"author":{"gitId":"-"},"content":""},{"lineNumber":2029,"author":{"gitId":"-"},"content":"...."},{"lineNumber":2030,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X"},{"lineNumber":2031,"author":{"gitId":"-"},"content":"...."},{"lineNumber":2032,"author":{"gitId":"-"},"content":""},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]"},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible"},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"...."},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data."},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"...."},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2040,"author":{"gitId":"-"},"content":"[appendix]"}],"authorContributionMap":{"charlesgoh":240,"jeffreygohkw":601,"Esilocke":296,"-":903}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:"},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//tag::introduction[]"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"//end::introduction[]"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer."},{"lineNumber":30,"author":{"gitId":"-"},"content":"+"},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":34,"author":{"gitId":"-"},"content":"+"},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here]."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++."},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds."},{"lineNumber":38,"author":{"gitId":"-"},"content":"+"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]"},{"lineNumber":40,"author":{"gitId":"-"},"content":"+"},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +"},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window."},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window"},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++."},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list"},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`."},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`."},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc."},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable."},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too big? Address++ allows you to change your font sizes at will. Here are three"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"ways of changing the font sizes:"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"**Option 1: Menu Font Size Buttons and Keyboard Shortcuts**"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"**Option 3: Handtype command into CLI**:"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeCLI.png[width\u003d\"540\"]"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"* Increase Size Command: `fontsize increase`"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"* Decrease Size Command: `fs decrease`"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"* Reset Size Command: `fontsize reset`"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"* `fontsize` can be replaced with `fs` for faster input. +"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]"},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"If you have trouble figuring out how to do something, or would like to find out about more features, you can click"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"on the **help** menu button. You can also enter the command `help` to access the help window."},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"image::HelpButtonUI.png[width\u003d\"540\"]"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":"Format: `help` +"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1]."},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"// tag::addprivacy[]"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"// tag::avatar[]"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Adding a person: `add`"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book."},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input."},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address`, `Remark` and `Avatar`, to be private by placing a `p` in front of the prefix. +"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"* As of version v1.5, the avatar fields accepts all URLs, and filenames with the prefix \"file:\""},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"You made a new friend John Doe, and want to save him into Address++. You could type the following command to add his details:"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"v/https://helloworld.world/image.png`"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"You meet Ima Hidearu, another one of your group members, but you do not know anything about him other than his name."},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" Nevertheless, you are still able to add him into Address++:"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/Ima Hidearu r/secretive`"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 3** +"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"Sometimes, you may wish to keep some fields private (i.e. not reveal them in the application). You can use the private"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"option while typing in your command:"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate pr/A true hero` +"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"**Note:** you do not have to set all fields as private, and you can choose which specific fields you want to set as private."},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"//end::addprivacy[]"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"//tag::addtask[]"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a task: `add task/` (Since V1.2)"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"You can use the `add task/` command to add new tasks to your address book. This allows you to keep track of your"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"assignments and project objectives."},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Format: `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input."},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 0 to 5 inclusive, with 5 being the highest priority +"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"* Adding a task with a priority of 0 is the same as not adding a priority. Only priority level above 1 will be displayed in the User Interface +"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default."},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"**Examples**:"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"You are assigned the task of writing a 1500-word essay that is due in 3 weeks. You decide to add this"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"task into Address++."},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Essay d/Write a 1500-word essay on philosophical thinking t/3 weeks later p/4`"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"You are required to submit at least one forum post to the school forums each week. To remind yourself of this task,"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"you add it into Address++."},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Weekly forum post p/1`"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"// end::addtask[]"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":"// tag::addtag[]"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a tag to persons : `add tag/` (Since V1.2)"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"You can use the `add tag/` command to add tag for multiple persons in the address book. For example, you may wish to add the tag `friends` to the first two persons in the address book. +"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"`add tag/` can be replaced by `a tag/` for faster input. +"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"Format: `add tag/ INDEX... t/[TAG]` +"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":"****"},{"lineNumber":193,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":"* You can add the tag of the person at the specific `INDEX`. +"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":"* The index refers to the index number shown in the most recent listing. +"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ... +"},{"lineNumber":198,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, `add tag/` will add the tag to all contacts in the address book."},{"lineNumber":199,"author":{"gitId":"-"},"content":"****"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**"},{"lineNumber":202,"author":{"gitId":"-"},"content":"****"},{"lineNumber":203,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add tag `friends` to the 1st and 2nd persons in the address book. You can use `list` to show all the contacts in the address book first,"},{"lineNumber":205,"author":{"gitId":"-"},"content":"then use the `addtag` command to achieve it."},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":208,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ 1 2 t/friends` +"},{"lineNumber":209,"author":{"gitId":"-"},"content":"****"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":"****"},{"lineNumber":212,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add a common tag to all the persons in the address book. You can type in the following command:"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ t/acquaintance` +"},{"lineNumber":217,"author":{"gitId":"-"},"content":"****"},{"lineNumber":218,"author":{"gitId":"-"},"content":"image::AddTagCommand.png[width\u003d\"790\"]"},{"lineNumber":219,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : AddTagCommand_"},{"lineNumber":220,"author":{"gitId":"-"},"content":"// end::addtag[]"},{"lineNumber":221,"author":{"gitId":"-"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Listing all persons : `list`"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts and tasks in the address book. +"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"`list` can be replaced by `l` for faster input. +"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"Format: `list` +"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"// tag::editprivacy[]"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit`"},{"lineNumber":232,"author":{"gitId":"-"},"content":""},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +"},{"lineNumber":238,"author":{"gitId":"-"},"content":""},{"lineNumber":239,"author":{"gitId":"-"},"content":"****"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command."},{"lineNumber":242,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values."},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands."},{"lineNumber":244,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it."},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command."},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message."},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields."},{"lineNumber":248,"author":{"gitId":"-"},"content":"****"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"**Examples**:"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":"Your friend John Doe has changed his email. You decide to update his entry in Address++ to reflect this change."},{"lineNumber":254,"author":{"gitId":"-"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 1 p/91234567 e/johndoe@example.com`"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"Your friend Betsy is no longer taking part in the same project as you, and has changed her phone number to a new one"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":"that you are not aware of. You decide to update her entry in Address++ accordingly."},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 2 p/ t/`"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"// end::editprivacy[]"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"// tag::edittask[]"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit task/` (Since V1.2)"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"You can use the `edit task/` command to quickly fix mistakes in your entries, or add/remove details in your tasks. You may wish to edit your tasks when their requirements change, for example. +"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":"Format: `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided."},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values."},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"You had previously added a task reminding you to write a 1500-word essay. However you receive notification that the word requirement"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"is now 1800 words instead. You edit the task to reflect this change."},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 2 d/1800 words essay`"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"One of your assignments has been pushed back and is no longer as urgent as before. You edit the task to reflect this change."},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 4 deadline/2 months later p/2`"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"// end::edittask[]"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"// tag::edittag[]"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edit tag/` (Since v1.2)"},{"lineNumber":296,"author":{"gitId":"-"},"content":""},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"You can use `edit tag/` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"`edit tag/` can be replaced by `et` for faster input. +"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Format: `edit tag/ OLDTAGNAME NEWTAGNAME` +"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different."},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `OLDTAGNAME` value."},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**:"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"You have finished a project, and have become good friends with your project mates."},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"You decide to promote all your project mates into friends."},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit tag/ project friends`"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"// end::edittag[]"},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"// tag::changeprivacy[]"},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":"`changeprivacy` can be replaced by `cp` for faster input. +"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":325,"author":{"gitId":"charlesgoh"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR]`"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields."},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix."},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI."},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI."},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy."},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting."},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":"You are meeting some new groupmates for your upcoming project and you are not too comfortable with exposing your family\u0027s particulars. +"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":"You decide to hide your family\u0027s phone number, email and home address by setting them to private. +"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `changeprivacy 1 p/true e/true a/true`"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":"// end::changeprivacy[]"},{"lineNumber":345,"author":{"gitId":"-"},"content":""},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacylevel[]"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy Level of the address book : `privacylevel`(Since V1.5)"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":"Changing a person\u0027s privacy just to reveal their data or to make a person fully confidential may be time-consuming. If you would like to view all the data hidden by private fields easily, or completely hide a person with private fields, you can use this command to change the Privacy Level of the address book. +"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":"At level 1, all data, regardless of whether they are set to be private or public, can be viewed. +"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":"At level 2, private fields will have their data hidden by a string, such as `\u003cPrivate Phone\u003e`. +"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":"At level 3, any person containing at least one private field will be completely hidden in the address book. +"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"`privacylevel` can be replaced by `pl` for faster input. +"},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"Format: `privacylevel LEVEL`"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"* Address++ always launches in privacy level 2."},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":"* The `LEVEL` that you input can only contain the values 1, 2, or 3."},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":"* This does not change the actual privacy setting of each field, thus, changing the privacy level to 1 does not make any of the private fields public."},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":"** Thus, even if you have set the address book to be privacy level 1, you cannot edit a field that is set as private without setting it back to public."},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":"** Similarly, since a person is completely hidden in privacy level 3, you will have to set the privacy level back to 2 or 1 to be able to modify that person."},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":"You have an address book full of various contacts with private fields, however, now you need to access the email addresses of all your contacts to ask them for help in your upcoming survey. +"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"You decide to use the privacylevel command to reveal all you contacts\u0027 hidden data."},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 1`"},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2** +"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"You wish to completely hide some of your confidential contacts from view, but your address book is too large, and you do not want to have to individually set every field for every confidential person to be private. +"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":"Using the privacylevel command, you set each contact with any private field to be hidden in the address book. +"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 3`"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacylevel[]"},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":381,"author":{"gitId":"-"},"content":"// tag::favourite[]"},{"lineNumber":382,"author":{"gitId":"-"},"content":""},{"lineNumber":383,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite contacts. For example, you may wish to set your girlfriend as your favourite contact. You will see a heart png next to your girlfriend\u0027s name"},{"lineNumber":386,"author":{"gitId":"-"},"content":"once you successfully set her as your favourite contact. +"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":388,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +"},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":390,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +"},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"-"},"content":"****"},{"lineNumber":393,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":394,"author":{"gitId":"-"},"content":""},{"lineNumber":395,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`."},{"lineNumber":396,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":397,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"* You will see a heart shape next to your favourite persons."},{"lineNumber":399,"author":{"gitId":"-"},"content":"****"},{"lineNumber":400,"author":{"gitId":"-"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +"},{"lineNumber":402,"author":{"gitId":"-"},"content":"****"},{"lineNumber":403,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":404,"author":{"gitId":"-"},"content":"Suppose you want to set the 2nd person in the address book to be your favourite contact. You should `list` all the persons first, then use `favourite` command to achieve it."},{"lineNumber":405,"author":{"gitId":"-"},"content":""},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 2` +"},{"lineNumber":408,"author":{"gitId":"-"},"content":"****"},{"lineNumber":409,"author":{"gitId":"-"},"content":""},{"lineNumber":410,"author":{"gitId":"-"},"content":"****"},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":412,"author":{"gitId":"-"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to set `Betsy Brandt` as your favourite contact."},{"lineNumber":413,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `favourite` her."},{"lineNumber":414,"author":{"gitId":"-"},"content":""},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Betsy` +"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 1` +"},{"lineNumber":417,"author":{"gitId":"-"},"content":"****"},{"lineNumber":418,"author":{"gitId":"-"},"content":"image::FavouriteCommandBeforeAndAfter.png[width\u003d\"790\"]"},{"lineNumber":419,"author":{"gitId":"-"},"content":"_Figure 3.12.1 : FavouriteCommand_"},{"lineNumber":420,"author":{"gitId":"-"},"content":"// end::favourite[]"},{"lineNumber":421,"author":{"gitId":"-"},"content":""},{"lineNumber":422,"author":{"gitId":"-"},"content":"// tag::showfavourite[]"},{"lineNumber":423,"author":{"gitId":"-"},"content":""},{"lineNumber":424,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)"},{"lineNumber":425,"author":{"gitId":"-"},"content":""},{"lineNumber":426,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":430,"author":{"gitId":"-"},"content":"Format: `showfavourite` +"},{"lineNumber":431,"author":{"gitId":"-"},"content":""},{"lineNumber":432,"author":{"gitId":"-"},"content":"****"},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":434,"author":{"gitId":"-"},"content":""},{"lineNumber":435,"author":{"gitId":"-"},"content":"* `showfavourite` command: It will return an empty list if there is no favourite persons."},{"lineNumber":436,"author":{"gitId":"-"},"content":"****"},{"lineNumber":437,"author":{"gitId":"-"},"content":"image::ShowFavouriteCommand.png[width\u003d\"250\"]"},{"lineNumber":438,"author":{"gitId":"-"},"content":"_Figure 3.13.1 : ShowFavouriteCommand_"},{"lineNumber":439,"author":{"gitId":"-"},"content":"// end::showfavourite[]"},{"lineNumber":440,"author":{"gitId":"-"},"content":""},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`"},{"lineNumber":442,"author":{"gitId":"-"},"content":""},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"*Things To Note*"},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`"},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Only the names will be searched"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"You would like to find all the people whose name contains the word \"David\". You first use `list` to show all your contacts,"},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the contacts named \"David\"."},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David` +"},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":468,"author":{"gitId":"-"},"content":"****"},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find people whose name contain the word \"David\" or \"Joe\"."},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David Joe` +"},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"// tag::findtask[]"},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Finding a task : `find task/` (Since V1.3)"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"You can use the `find task/` command to quickly find tasks that match your criteria, as well as tasks that have a certain level of urgency. +"},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"Furthermore, you can choose to only retrieve tasks that are either complete, or still in progress. +"},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +"},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Format: `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Things To Note*"},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":488,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`"},{"lineNumber":489,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`"},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"* Both the name and the description will be searched"},{"lineNumber":491,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`"},{"lineNumber":492,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"* *You must include at least 1 search keyword*, in order to filter the results by their priority, and whether or not it is completed."},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"* The `PRIORITY` must be an integer from 1 to 5, inclusive. If the priority search is included, all tasks that have a priority at least that of the specified priority will matced."},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"* `STATE` must be either `true` or `false`. If it is `true`, you will only see tasks that have been marked as complete, and if it is `false, you will only see tasks that are not complete, in addition to all other search criteria."},{"lineNumber":496,"author":{"gitId":"-"},"content":"****"},{"lineNumber":497,"author":{"gitId":"-"},"content":""},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"You would like to find all the tasks related to \"Report\". You first use `list` to show all your tasks,"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the tasks related to \"Report\"."},{"lineNumber":503,"author":{"gitId":"-"},"content":""},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report` +"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find tasks that have a \"High\" or \"Highest\" priority."},{"lineNumber":511,"author":{"gitId":"-"},"content":""},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4` +"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Furthermore, as you have several tasks related to \"Report\" that are already complete, you only want to see the tasks that are still not done."},{"lineNumber":519,"author":{"gitId":"-"},"content":""},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4 done/false` +"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"// end::findtask[]"},{"lineNumber":524,"author":{"gitId":"-"},"content":""},{"lineNumber":525,"author":{"gitId":"-"},"content":"// tag::showtag[]"},{"lineNumber":526,"author":{"gitId":"-"},"content":""},{"lineNumber":527,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all tags : `showtag` (Since V1.5)"},{"lineNumber":528,"author":{"gitId":"-"},"content":""},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"You can use the `showtag` command to quickly show all tags in the address book. Sometimes you may forget `tags` that you have added a few weeks ago. You may use this command to help you. +"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":531,"author":{"gitId":"-"},"content":"`showtag` can be replaced by `stag` for faster input. +"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":533,"author":{"gitId":"-"},"content":"Format: `showtag` +"},{"lineNumber":534,"author":{"gitId":"-"},"content":""},{"lineNumber":535,"author":{"gitId":"-"},"content":"****"},{"lineNumber":536,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":537,"author":{"gitId":"-"},"content":""},{"lineNumber":538,"author":{"gitId":"-"},"content":"* `showtag` command: It will return an empty list if there is no tags in the address book."},{"lineNumber":539,"author":{"gitId":"-"},"content":"* You may want to use `showtag` command to help you recall all the `tags` in the address book before you try to use `findtag` to find persons."},{"lineNumber":540,"author":{"gitId":"-"},"content":"****"},{"lineNumber":541,"author":{"gitId":"-"},"content":"// end::showtag[]"},{"lineNumber":542,"author":{"gitId":"-"},"content":""},{"lineNumber":543,"author":{"gitId":"-"},"content":"// tag::findtag[]"},{"lineNumber":544,"author":{"gitId":"-"},"content":""},{"lineNumber":545,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `find tag/` (Since V1.4)"},{"lineNumber":546,"author":{"gitId":"-"},"content":""},{"lineNumber":547,"author":{"gitId":"-"},"content":"You can use the `find tag/` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +"},{"lineNumber":548,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/` in front of the `friends`. +"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":550,"author":{"gitId":"-"},"content":"`find tag/` can be replaced by `f tag/` for faster input. +"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":552,"author":{"gitId":"-"},"content":"Format: `find tag/ KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":553,"author":{"gitId":"-"},"content":""},{"lineNumber":554,"author":{"gitId":"-"},"content":"****"},{"lineNumber":555,"author":{"gitId":"-"},"content":"**Things To Note** +"},{"lineNumber":556,"author":{"gitId":"-"},"content":""},{"lineNumber":557,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`"},{"lineNumber":558,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`"},{"lineNumber":559,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons."},{"lineNumber":560,"author":{"gitId":"-"},"content":"* Only full words will be matched. e.g. `friend` will not match `friends`"},{"lineNumber":561,"author":{"gitId":"-"},"content":"* There is no space between `/` and tag name. e.g. `/ friends` will not match `/friends`."},{"lineNumber":562,"author":{"gitId":"-"},"content":"****"},{"lineNumber":563,"author":{"gitId":"-"},"content":""},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":565,"author":{"gitId":"-"},"content":"****"},{"lineNumber":566,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":567,"author":{"gitId":"-"},"content":"Suppose you want to find contatcs with tag `friends` or `colleagues`, you can just key in the following command."},{"lineNumber":568,"author":{"gitId":"-"},"content":""},{"lineNumber":569,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends colleagues`"},{"lineNumber":570,"author":{"gitId":"-"},"content":"****"},{"lineNumber":571,"author":{"gitId":"-"},"content":""},{"lineNumber":572,"author":{"gitId":"-"},"content":"****"},{"lineNumber":573,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":574,"author":{"gitId":"-"},"content":"Suppose you want to find contacts without tag `frineds`, you can key in the following command."},{"lineNumber":575,"author":{"gitId":"-"},"content":""},{"lineNumber":576,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ /friends`"},{"lineNumber":577,"author":{"gitId":"-"},"content":"****"},{"lineNumber":578,"author":{"gitId":"-"},"content":""},{"lineNumber":579,"author":{"gitId":"-"},"content":"****"},{"lineNumber":580,"author":{"gitId":"-"},"content":"**Example Scenario 3:** +"},{"lineNumber":581,"author":{"gitId":"-"},"content":"Suppose you want to find contacts with tag `friends` but without `colleagues`, you can key in the following command."},{"lineNumber":582,"author":{"gitId":"-"},"content":""},{"lineNumber":583,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends /colleagues`"},{"lineNumber":584,"author":{"gitId":"-"},"content":"****"},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::FindTagCommand.png[width\u003d\"790\"]"},{"lineNumber":586,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : FindTagCommand_"},{"lineNumber":587,"author":{"gitId":"-"},"content":"// end::findtag[]"},{"lineNumber":588,"author":{"gitId":"-"},"content":""},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`"},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts from the address book. The `delete` command will help you clean up contacts who you may not wish to associate with anymore. +"},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +"},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +"},{"lineNumber":596,"author":{"gitId":"-"},"content":""},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":599,"author":{"gitId":"-"},"content":""},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"* Deletes the person at the specified `INDEX`."},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first person from your contacts."},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1`"},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":"You wish to delete \"Maribel Edelweiss\" from your contacts. However you have many contacts, and are not sure where Maribel is."},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"You thus use `find` to find contacts who are named \"Maribel\", then delete Maribel Edelweiss accordingly."},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Maribel` +"},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 3`"},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"// tag::deletetask[]"},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a task : `delete task/` (Since V1.2)"},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"You can use the `delete task/` command to remove tasks from the address book. The `delete task/` command will help you clean up obsolete or completed tasks. +"},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"`delete task/` can be replaced by `d task/` for faster input. +"},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Format: `delete task/ INDEX` +"},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"* Deletes the task at the specified `INDEX`."},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent task listing."},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first task."},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 1`"},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":645,"author":{"gitId":"-"},"content":""},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"You wish to delete a task named \"1500-word Essay\". However you have many tasks, and are not sure where it is."},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"You thus use `find task/` to find tasks related to \"Essays\", before using `delete task/` to delete \"1500-word Essay\" accordingly."},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ Essay` +"},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 3`"},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"// end::deletetask[]"},{"lineNumber":655,"author":{"gitId":"-"},"content":"// tag::deletetag[]"},{"lineNumber":656,"author":{"gitId":"-"},"content":""},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `delete tag/` (Since V1.2)"},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"You can use `delete tag/` to delete the tag of multiple persons from the address book. +"},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":661,"author":{"gitId":"-"},"content":"`delete tag/` can be replaced by `d tag/` for faster input. +"},{"lineNumber":662,"author":{"gitId":"-"},"content":""},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Format: `delete tag/ INDEX... t/[TAG]` +"},{"lineNumber":664,"author":{"gitId":"-"},"content":""},{"lineNumber":665,"author":{"gitId":"-"},"content":""},{"lineNumber":666,"author":{"gitId":"-"},"content":"****"},{"lineNumber":667,"author":{"gitId":"-"},"content":"**Things To Note** +"},{"lineNumber":668,"author":{"gitId":"-"},"content":""},{"lineNumber":669,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`."},{"lineNumber":670,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":671,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"* If you do not key in any index, delete tag/ will delete the tag from all contacts in the address book."},{"lineNumber":673,"author":{"gitId":"-"},"content":"****"},{"lineNumber":674,"author":{"gitId":"-"},"content":""},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":676,"author":{"gitId":"-"},"content":"****"},{"lineNumber":677,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":678,"author":{"gitId":"-"},"content":"Suppose you want to delete `classmates` tag for the first two persons in the address book, you can `list` all the persons first, then"},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"use the `delete tag/` command to achieve."},{"lineNumber":680,"author":{"gitId":"-"},"content":""},{"lineNumber":681,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +"},{"lineNumber":682,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ 1 2 t/friends` +"},{"lineNumber":683,"author":{"gitId":"-"},"content":"****"},{"lineNumber":684,"author":{"gitId":"-"},"content":""},{"lineNumber":685,"author":{"gitId":"-"},"content":"****"},{"lineNumber":686,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":687,"author":{"gitId":"-"},"content":"Suppose you want to delete `friends` tag from all contacts in the address book."},{"lineNumber":688,"author":{"gitId":"-"},"content":""},{"lineNumber":689,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +"},{"lineNumber":690,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ t/friends` +"},{"lineNumber":691,"author":{"gitId":"-"},"content":"****"},{"lineNumber":692,"author":{"gitId":"-"},"content":"image::DeleTagCommand.png[width\u003d\"790\"]"},{"lineNumber":693,"author":{"gitId":"-"},"content":"_Figure 3.20.1 : DeleteTagCommand_"},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::deletetag[]"},{"lineNumber":695,"author":{"gitId":"-"},"content":""},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]"},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Sorting your contact list and tasks : `sort` (Since V1.1)"},{"lineNumber":698,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts or tasks by using the `sort` command +"},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"`sort` can be replaced with `so` for faster input. +"},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"Format: `sort LIST FIELD ORDER` +"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":705,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contacts by any field in either ascending or descending order"},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your tasks by deadline or by priority in ascending or descending order"},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for person contacts: NAME, PHONE, EMAIL, ADDRESS, REMARK, AVATAR."},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for tasks: DEADLINE, PRIORITY."},{"lineNumber":710,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC."},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts"},{"lineNumber":712,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":713,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":"You have many contacts on Address++. You decide to make it neater by sorting your contacts"},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":"by name in ascending order:"},{"lineNumber":719,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort person name asc`"},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":"You add a few tasks of different priorities. You decide to sort the tasks so you can see"},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":"the higher priority tasks on the top of the list:"},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort task priority desc`"},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":"//end::sort[]"},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":"//tag::backup[]"},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Backing up your data : `backup` (Since V1.2)"},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +"},{"lineNumber":735,"author":{"gitId":"-"},"content":""},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [FILENAME]` +"},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"`backup` can be replaced with `bk` for faster input. +"},{"lineNumber":738,"author":{"gitId":"-"},"content":""},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":"This allows you to backup your saved data on Address++ in another file."},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario**: +"},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":"You decide to backup your data just in case you accidentally make changes that"},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":"cannot be undone. You type the following code:"},{"lineNumber":746,"author":{"gitId":"-"},"content":""},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":"`backup filename.xml`"},{"lineNumber":748,"author":{"gitId":"-"},"content":""},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":"The file will then be saved in the same directory location as your `JAR` application file"},{"lineNumber":750,"author":{"gitId":"-"},"content":"****"},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"//end::backup[]"},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":"//tag::password[]"},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Protecting your data : `lock` `unlock` (Since V1.5)"},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":"Worried about security? Address++ allows your to protect your data with a password."},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":"Using the `lock` and `unlock` commands, you can toggle between security modes. +"},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":"Locked address books only allow viewing of data. If anyone attempts to tamper with"},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"your data, they will be greeted with this error:"},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"image::LockedRestriction.png[width\u003d\"800\"]"},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":"Format for `lock` Command: `lock pw/[PASSWORD]` +"},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":"`lock` can be replaced with `lk` for faster input. +"},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":"Format for `unlock` Command: `unlock pw/[PASSWORD]` +"},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":"`unlock` can be replaced with `ul` for faster input. +"},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"The default password is `password`"},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":773,"author":{"gitId":"-"},"content":"****"},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":"You have just finished editing your contacts on Address++ and you decide to have a break away from"},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"your computer. You decide to lock Address++ using the following command:"},{"lineNumber":777,"author":{"gitId":"-"},"content":""},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `lock pw/password`"},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":"When you return to your computer, you decide to continue adding contacts in Address++."},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"To unlock the Address++ application, you use the following command:"},{"lineNumber":784,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `unlock pw/password`"},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":787,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing your password : `changepassword` (Since V1.5)"},{"lineNumber":789,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":790,"author":{"gitId":"charlesgoh"},"content":"Want to choose a better password? The `changepassword` command allows you to change your"},{"lineNumber":791,"author":{"gitId":"charlesgoh"},"content":"password whenever you want, provided you know the old password."},{"lineNumber":792,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":793,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":794,"author":{"gitId":"charlesgoh"},"content":"The default password is \u0027password\u0027"},{"lineNumber":795,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":796,"author":{"gitId":"charlesgoh"},"content":"image::ChangePasswordImages.png[width\u003d\"800\"]"},{"lineNumber":797,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":798,"author":{"gitId":"charlesgoh"},"content":"Format: `changepassword pw/[PASSWORD] np/[NEWPASSWORD] cfp/[CONFIRMPASSWORD]` +"},{"lineNumber":799,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":800,"author":{"gitId":"charlesgoh"},"content":"**`changepassword` can be replaced with `cpw` for faster input.** +"},{"lineNumber":801,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":802,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":803,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":804,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":805,"author":{"gitId":"charlesgoh"},"content":"You open Address++ for the first time. After reading the user guide, you realize"},{"lineNumber":806,"author":{"gitId":"charlesgoh"},"content":"that the default password (\"password\") is not good enough. You decide to make a new"},{"lineNumber":807,"author":{"gitId":"charlesgoh"},"content":"one with the following command:"},{"lineNumber":808,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":809,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `changepassword pw/password np/newpassword cfp/newpassword`"},{"lineNumber":810,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":811,"author":{"gitId":"charlesgoh"},"content":"//end::password[]"},{"lineNumber":812,"author":{"gitId":"-"},"content":""},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`"},{"lineNumber":814,"author":{"gitId":"-"},"content":""},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact, and look at it in greater detail. +"},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +"},{"lineNumber":818,"author":{"gitId":"-"},"content":""},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":"Format: `select INDEX` +"},{"lineNumber":820,"author":{"gitId":"-"},"content":""},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"The first person in your contacts has a very long address, and you want to see if it is correct."},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select 1` +"},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"// tag::selecttask[]"},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a task : `select task/` (Since V1.4)"},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":"You can use `select task/` to pick out a task, and look at it in greater detail. +"},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +"},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"Format: `select task/ INDEX` +"},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"The first task has a very long description, and you want to see it in full."},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select task/ 1` +"},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"// end::selecttask[]"},{"lineNumber":863,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]"},{"lineNumber":864,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)"},{"lineNumber":865,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":866,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +"},{"lineNumber":867,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +"},{"lineNumber":869,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +"},{"lineNumber":871,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":872,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +"},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +"},{"lineNumber":875,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where the second person in your address book lives. +"},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `list` +"},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 2` +"},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +"},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where a specific person in your address book, Betsy, lives. +"},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Betsy` +"},{"lineNumber":882,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 1` +"},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":886,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +"},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses."},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps."},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"* A person with no address will open Google Maps, but it will not search for an address as there is no address to search for."},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing."},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]"},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]"},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another : `navigate` (Since V1.5)"},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"Although `locate` shows you where a person\u0027s address is, it does not tell you how to get there. The `navigate` command will provide directions, with the help of Google Maps, on how to get from one address to another. +"},{"lineNumber":899,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"`navigate` can be replaced by `nav` for faster input. +"},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +"},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +"},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +"},{"lineNumber":908,"author":{"gitId":"Esilocke"},"content":"You are planning to go to your friend Roy\u0027s house for their birthday party that afternoon, but you have just ended class at NUS. +"},{"lineNumber":909,"author":{"gitId":"Esilocke"},"content":"You have never been to their house before, and you enlist the aid of Address++ to find the fastest route to their house. +"},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Roy` +"},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fa/NUS tp/1`"},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +"},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":"After the birthday party, you have a group meeting scheduled for your project. You have this meeting schedules as your first task, and you seek help from Address++ to find a path from Roy\u0027s house to the group meeting. +"},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fp/1 tt/1`"},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 3:** +"},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"To conclude your long and busy day, you have to send off your sister at Changi Airport, who is going off on an exchange programme. +"},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"Using the navigate command once again, you find an efficient route from the location of your group meeting to the airport. +"},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate ft/1 ta/Changi Airport`"},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +"},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses."},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address or a person with no address cannot be navigated from or navigated to."},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"* A task with no address cannot be navigated from or navigated to."},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing."},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":"* You may only input exactly one of the 3 prefixes from `fp/` `ft/` and `fa/` to indicate the address to navigate from, and exactly one of the 3 prefixes from `tp/` `tt/` and `ta/` to indicate the address to navigate to."},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":"** If you input any less or any more than 1 of the 3 prefixes from each group, the command will fail."},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":"** There is no need to match the type of prefixes. You can navigate with any combination of prefixes as long as there is only one prefix to indicate the address to navigate from and only one prefix to indicate the address to navigate to."},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]"},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"// tag::setstate[]"},{"lineNumber":937,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as complete : `setcomplete` (Since V1.5)"},{"lineNumber":938,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +"},{"lineNumber":940,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":941,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +"},{"lineNumber":942,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":943,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +"},{"lineNumber":944,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed."},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"You have finally completed a task that involves writing a 1500-word essay."},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e\u003e `setcomplete 6` +"},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as incomplete : `setincomplete` (Since V1.5)"},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +"},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +"},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":967,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +"},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete."},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"You realised that you had marked a task as complete, even though it is still in progress."},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"Furthermore you are not sure when you had marked it as complete. However, you are still able to safely mark the task as being"},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":"in progress."},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `setincomplete 7`"},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"// end::setstate[]"},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]"},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assigning contacts to task : `assign` (Since V1.4)"},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +"},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +"},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +"},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"You have created a new task to complete a paper model. However you are unable to do it by yourself, and require the help of some of your friends."},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `assign 1 5 7 to/5`"},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismissing contacts from task : `dismiss` (Since V1.4)"},{"lineNumber":1016,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1017,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +"},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +"},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +"},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"One of the tasks that you had created previously with many people assigned turned out to be easier than expected."},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"You believe that this task could do with less manpower and would like to remove some of the previously assigned contacts from this task."},{"lineNumber":1038,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `dismiss 1 5 7 from/5`"},{"lineNumber":1040,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1041,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Viewing contacts assigned to a task : `viewassign` (Since V1.5)"},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"You can use `viewassign` to see who is assigned to a particular task. You may wish to use `viewassign` when you want to contact only the people who are assigned to a particular task, for example. +"},{"lineNumber":1045,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"`viewassign` can be replaced by `va` for faster input. +"},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1048,"author":{"gitId":"Esilocke"},"content":"Format: `viewassign INDEX` +"},{"lineNumber":1049,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1050,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"2 weeks after assigning some of your contacts to a particular task, you decide to obtain a status report about their current progress. +"},{"lineNumber":1062,"author":{"gitId":"Esilocke"},"content":"However you have forgotten who you have assigned to that task. You thus use `viewassign` to see who is assigned to that task."},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `viewassign 4`"},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1066,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]"},{"lineNumber":1067,"author":{"gitId":"-"},"content":""},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]"},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing the Address Book\u0027s theme : `theme` (Since V1.5)"},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1071,"author":{"gitId":"jeffreygohkw"},"content":"Perhaps you may not be too fond of the existing style of the address book and you want to have something fresh. The `theme` command changes the address book between two themes, `light` and `dark`."},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":1073,"author":{"gitId":"jeffreygohkw"},"content":"`theme` can be replaced by `th` for faster input. +"},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1075,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +"},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1077,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +"},{"lineNumber":1078,"author":{"gitId":"jeffreygohkw"},"content":"It is late at night and the light theme is a little too brightly coloured. Preferring a darker theme, you can choose to input the theme command to make the theme into a darker colour. +"},{"lineNumber":1079,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `theme dark`"},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1081,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"Format: `theme` + THEME"},{"lineNumber":1083,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1085,"author":{"gitId":"jeffreygohkw"},"content":"* There are only two themes as of v1.5, light and dark. More themes of different colours could be added in a future release."},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1087,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]"},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1089,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`"},{"lineNumber":1090,"author":{"gitId":"-"},"content":""},{"lineNumber":1091,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +"},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1093,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +"},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"Format: `history` +"},{"lineNumber":1096,"author":{"gitId":"-"},"content":""},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1100,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box."},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1102,"author":{"gitId":"-"},"content":""},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"// tag::undo[]"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`"},{"lineNumber":1105,"author":{"gitId":"-"},"content":""},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +"},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +"},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1110,"author":{"gitId":"-"},"content":"Format: `undo` +"},{"lineNumber":1111,"author":{"gitId":"-"},"content":""},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Undoable commands: Commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`)."},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1117,"author":{"gitId":"-"},"content":""},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts."},{"lineNumber":1122,"author":{"gitId":"-"},"content":""},{"lineNumber":1123,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1124,"author":{"gitId":"-"},"content":""},{"lineNumber":1125,"author":{"gitId":"Esilocke"},"content":"You realise this immediately and undo your mistake."},{"lineNumber":1126,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1127,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`"},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1130,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts. Furthermore, not knowing this, you made a mistake when editing another person\u0027s name."},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarisa Liselote`"},{"lineNumber":1136,"author":{"gitId":"-"},"content":""},{"lineNumber":1137,"author":{"gitId":"Esilocke"},"content":"You realise that something is amiss, and find out that you made not one, but two mistakes. Nevertheless you still manage to recover your contact by using multiple `undo` commands."},{"lineNumber":1138,"author":{"gitId":"-"},"content":""},{"lineNumber":1139,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"Finally, you edit Clarissa\u0027s name correctly."},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1144,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarissa Liselotte`"},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"// end::undo[]"},{"lineNumber":1147,"author":{"gitId":"-"},"content":""},{"lineNumber":1148,"author":{"gitId":"-"},"content":"// tag::unfavourite[]"},{"lineNumber":1149,"author":{"gitId":"-"},"content":""},{"lineNumber":1150,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)"},{"lineNumber":1151,"author":{"gitId":"-"},"content":""},{"lineNumber":1152,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +"},{"lineNumber":1153,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +"},{"lineNumber":1154,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1155,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +"},{"lineNumber":1156,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1157,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +"},{"lineNumber":1158,"author":{"gitId":"-"},"content":""},{"lineNumber":1159,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1160,"author":{"gitId":"-"},"content":"**Things To Note** +"},{"lineNumber":1161,"author":{"gitId":"-"},"content":""},{"lineNumber":1162,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`."},{"lineNumber":1163,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":1164,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":1165,"author":{"gitId":"-"},"content":"* The heart png will disappear once you `unfavourite` the person."},{"lineNumber":1166,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1167,"author":{"gitId":"-"},"content":""},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1169,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1170,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":1171,"author":{"gitId":"-"},"content":"Suppose you do not want to the 2nd person in the address book to be your favourite contact anymore, you should `list` all the persons first, then use `unfavourite` command to achieve it."},{"lineNumber":1172,"author":{"gitId":"-"},"content":""},{"lineNumber":1173,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +"},{"lineNumber":1174,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 2` +"},{"lineNumber":1175,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1176,"author":{"gitId":"-"},"content":""},{"lineNumber":1177,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1178,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":1179,"author":{"gitId":"-"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to `unfavourite` `Betsy Brandt` in the address book."},{"lineNumber":1180,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `unfavourite` `Betsy Brandt`."},{"lineNumber":1181,"author":{"gitId":"-"},"content":""},{"lineNumber":1182,"author":{"gitId":"-"},"content":"\u003e\u003e `find Betsy` +"},{"lineNumber":1183,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 1` +"},{"lineNumber":1184,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1185,"author":{"gitId":"-"},"content":"image::UnfavouriteCommand.png[width\u003d\"790\"]"},{"lineNumber":1186,"author":{"gitId":"-"},"content":"_Figure 3.37.1 : UnfavouriteCommand_"},{"lineNumber":1187,"author":{"gitId":"-"},"content":"// end::unfavourite[]"},{"lineNumber":1188,"author":{"gitId":"-"},"content":""},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"// tag::redo[]"},{"lineNumber":1190,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`"},{"lineNumber":1191,"author":{"gitId":"-"},"content":""},{"lineNumber":1192,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` was not necessary. `redo` reverses the most recent `undo` command. +"},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +"},{"lineNumber":1195,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1196,"author":{"gitId":"-"},"content":"Format: `redo` +"},{"lineNumber":1197,"author":{"gitId":"-"},"content":""},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts."},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo your mistake."},{"lineNumber":1206,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`"},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"However you realise that you have deleted the correct person. Instead of typing `delete 1`, you choose to `redo` your command instead."},{"lineNumber":1210,"author":{"gitId":"-"},"content":""},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`"},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1214,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts, as well as two of your tasks."},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 5` +"},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 8` +"},{"lineNumber":1220,"author":{"gitId":"-"},"content":""},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo all your previous commands."},{"lineNumber":1222,"author":{"gitId":"-"},"content":""},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`"},{"lineNumber":1226,"author":{"gitId":"-"},"content":""},{"lineNumber":1227,"author":{"gitId":"Esilocke"},"content":"However you realise that no mistake was made. Instead of typing your commands again, you choose to `redo` your commands instead."},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +"},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +"},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`"},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1233,"author":{"gitId":"Esilocke"},"content":"// end::redo[]"},{"lineNumber":1234,"author":{"gitId":"Esilocke"},"content":"// tag::clear[]"},{"lineNumber":1235,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`"},{"lineNumber":1236,"author":{"gitId":"-"},"content":""},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +"},{"lineNumber":1238,"author":{"gitId":"Esilocke"},"content":"Additionally, if you clear only the contacts list or the task list, you can specify which type to clear in the command. +"},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1240,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +"},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1242,"author":{"gitId":"-"},"content":"Format: `clear` +"},{"lineNumber":1243,"author":{"gitId":"-"},"content":""},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"To clear only the contacts list, type `clear person/` +"},{"lineNumber":1245,"author":{"gitId":"Esilocke"},"content":"To clear only the tasks list, type `clear task/` +"},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1249,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"* If both `person/` and `task` are specified, or if neither were specified, the `clear` command will delete all entries in the address book."},{"lineNumber":1251,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1252,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1255,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1256,"author":{"gitId":"Esilocke"},"content":"You have completed every task in your task list, and want to clean it up."},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1258,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear task/` +"},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1261,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1262,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1263,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. However you would still like to keep smome of the tasks for further reference."},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1265,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear person/` +"},{"lineNumber":1266,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1268,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1270,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. You would like to clear everything in Address++ to make space for your own contacts and tasks."},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1272,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear` +"},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1275,"author":{"gitId":"Esilocke"},"content":"// end::clear[]"},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"// tag::open[]"},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening a save file : `open`"},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"Switching between address books is made easy with the `open` command, as it allows you can load different save files into the application. +"},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"You can choose which .xml file to open from the pop up window that appears upon executing this command. +"},{"lineNumber":1280,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":"`open` can be replaced by `o` for faster input. +"},{"lineNumber":1282,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":"Format `open`"},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":"// end::open[]"},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":"// tag::saveas[]"},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Saving the data as a new save file : `save`"},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to save a copy of your data in a separate location or with a different name, the `save` command will allow you to do just that. +"},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":"You can choose what to name your save file and where to save it from the pop up window that appears upon executing this command. +"},{"lineNumber":1290,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":"`save` can be replaced by `sa` for faster input. +"},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":"Format: `save`"},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":"// end::saveas[]"},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1296,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`"},{"lineNumber":1297,"author":{"gitId":"-"},"content":""},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +"},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Format: `exit`"},{"lineNumber":1300,"author":{"gitId":"-"},"content":""},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4]."},{"lineNumber":1302,"author":{"gitId":"-"},"content":""},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]"},{"lineNumber":1304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data"},{"lineNumber":1305,"author":{"gitId":"-"},"content":""},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +"},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually."},{"lineNumber":1308,"author":{"gitId":"-"},"content":""},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, you can use the `save` command, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window."},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, you can use the `open` command, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window."},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]"},{"lineNumber":1314,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1315,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ"},{"lineNumber":1316,"author":{"gitId":"-"},"content":""},{"lineNumber":1317,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +"},{"lineNumber":1318,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location."},{"lineNumber":1319,"author":{"gitId":"-"},"content":""},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet"},{"lineNumber":1321,"author":{"gitId":"-"},"content":""},{"lineNumber":1322,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1324,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `add pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1326,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"e.g. `add task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`"},{"lineNumber":1328,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `add tag/ [INDEX...] t/[TAG]` +"},{"lineNumber":1329,"author":{"gitId":"Esilocke"},"content":"e.g. `add tag/ 1 2 t/friends`"},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +"},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false r/true`"},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `privacylevel [LEVEL]` +"},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`"},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"* *Clear persons* : `clear person/`"},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"* *Clear tasks* : `clear task/`"},{"lineNumber":1336,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +"},{"lineNumber":1337,"author":{"gitId":"-"},"content":"e.g. `delete 3`"},{"lineNumber":1338,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task/ INDEX` +"},{"lineNumber":1339,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task/ 4`"},{"lineNumber":1340,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `delete tag/ [INDEX...] t/[TAG]` +"},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"e.g. `delete tag/ 1 2 t/friends`"},{"lineNumber":1342,"author":{"gitId":"charlesgoh"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +"},{"lineNumber":1343,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`"},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1345,"author":{"gitId":"Esilocke"},"content":"e.g. `edit task/ 2 p/veryhigh`"},{"lineNumber":1346,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edit tag/ TAGTOCHANGE NEWTAGNAME` +"},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"e.g. `edit tag/ friends enemies`"},{"lineNumber":1348,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +"},{"lineNumber":1349,"author":{"gitId":"-"},"content":"e.g. `favourite 1`"},{"lineNumber":1350,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +"},{"lineNumber":1351,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`"},{"lineNumber":1352,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +"},{"lineNumber":1353,"author":{"gitId":"-"},"content":"e.g. `showfavourite`"},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":1355,"author":{"gitId":"-"},"content":"e.g. `find James Jake`"},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `find tag/ TAG [MORE_TAGS]` +"},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"e.g. `find tag/ friends`"},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +"},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"e.g. `find task/ update p/high done/false`"},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : `help`"},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `list`"},{"lineNumber":1362,"author":{"gitId":"-"},"content":"* *List tags* : `showtag`"},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate INDEX`"},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +"},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navigate fa/Tampines Mall ta/Sentosa"},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +"},{"lineNumber":1367,"author":{"gitId":"-"},"content":"e.g.`select 2`"},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task/ INDEX` +"},{"lineNumber":1369,"author":{"gitId":"Esilocke"},"content":"e.g.`select task/ 2`"},{"lineNumber":1370,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +"},{"lineNumber":1371,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`"},{"lineNumber":1372,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +"},{"lineNumber":1373,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`"},{"lineNumber":1374,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +"},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`"},{"lineNumber":1376,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +"},{"lineNumber":1377,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`"},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `viewassign INDEX` +"},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"e.g. `viewassign 1`"},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `theme THEME` +"},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `theme light`"},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"* *History* : `history`"},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":"* *Undo* : `undo`"},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"* *Redo* : `redo`"},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `open`"},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `save`"},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : `exit`"},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Command Shorthand Cheat Sheet"},{"lineNumber":1390,"author":{"gitId":"Esilocke"},"content":"* *Add* : `a n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `a n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1392,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `a pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1393,"author":{"gitId":"Esilocke"},"content":"e.g. `a pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `a task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"e.g. `a task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`"},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `a tag/ [INDEX...] t/[TAG]` +"},{"lineNumber":1397,"author":{"gitId":"Esilocke"},"content":"e.g. `a tag/ 1 2 t/friends`"},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `cp INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +"},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `cp 2 n/true p/false e/true a/false r/true`"},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `pl [LEVEL]` +"},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`"},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear persons* : `c person`"},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear tasks* : `c task`"},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":"* *Delete person* : `d INDEX` +"},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `d 3`"},{"lineNumber":1406,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `d task/ INDEX` +"},{"lineNumber":1407,"author":{"gitId":"Esilocke"},"content":"e.g. `d task/ 4`"},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `d tag/ INDEX t/[TAG]` +"},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"e.g. `d tag/ 1 2 t/friends`"},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `e INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `e 2 n/James Lee e/jameslee@example.com`"},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `e task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1413,"author":{"gitId":"Esilocke"},"content":"e.g. `e task/ 2 p/veryhigh`"},{"lineNumber":1414,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `e tag/ OLDTAGNAME NEWTAGNAME` +"},{"lineNumber":1415,"author":{"gitId":"Esilocke"},"content":"e.g. `e tag/ friends enemies`"},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":"* *Favourite persons* :`fav INDEX` +"},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `fav 1`"},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":"* *Unfavourite persons* :`unfav INDEX` +"},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `unfav 1`"},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"* *Show favourite list* :`sfav` +"},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sfav`"},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":"* *Find person* : `f KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `f James Jake`"},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `f tag/ Tag [MORE_TAGS]` +"},{"lineNumber":1425,"author":{"gitId":"Esilocke"},"content":"e.g. `f tag/ friends`"},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `f task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +"},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":"e.g. `f task/ update p/high`"},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `l`"},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"* *List tags* : `stag`"},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `loc INDEX`"},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navi [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +"},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navi fa/Tampines Mall ta/Sentosa"},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"* *Select person* : `s INDEX` +"},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"e.g.`s 2`"},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `s task/ INDEX` +"},{"lineNumber":1436,"author":{"gitId":"Esilocke"},"content":"e.g.`s task/ 2`"},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as complete* : `stc INDEX` +"},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `stc 4`"},{"lineNumber":1439,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as incomplete* : `sti INDEX` +"},{"lineNumber":1440,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sti 5`"},{"lineNumber":1441,"author":{"gitId":"jeffreygohkw"},"content":"* *Assign to task* : `as PERSONINDEX... to/TASKINDEX` +"},{"lineNumber":1442,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `as 4 1 17 18 to/21`"},{"lineNumber":1443,"author":{"gitId":"jeffreygohkw"},"content":"* *Dismiss from task* : `ds PERSONINDEX... from/TASKINDEX` +"},{"lineNumber":1444,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `ds 4 1 from/17`"},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `va INDEX` +"},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"e.g. `va 1`"},{"lineNumber":1447,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `th THEME` +"},{"lineNumber":1448,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `th light`"},{"lineNumber":1449,"author":{"gitId":"jeffreygohkw"},"content":"* *History* : `h`"},{"lineNumber":1450,"author":{"gitId":"jeffreygohkw"},"content":"* *Undo* : `u`"},{"lineNumber":1451,"author":{"gitId":"jeffreygohkw"},"content":"* *Redo* : `r`"},{"lineNumber":1452,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `o`"},{"lineNumber":1453,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `sa`"},{"lineNumber":1454,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1455,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts"},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1457,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]"},{"lineNumber":1458,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[F1]"},{"lineNumber":1459,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]"},{"lineNumber":1460,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]"},{"lineNumber":1461,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":1462,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":1463,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":1464,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1465,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept"},{"lineNumber":1466,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary."},{"lineNumber":1467,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1468,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]"}],"authorContributionMap":{"charlesgoh":191,"jeffreygohkw":252,"Esilocke":662,"-":363}},{"path":"docs/team/JeffreyGoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Jeffrey Goh - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: ../images"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: ../stylesheets"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Project: Address++"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is a desktop address book application that aims to help users manage their contacts and their time. It is primarily targeted at students with projects, although it may be used in a wide variety of other settings as well. Users will be able to interact with it using a Command Line Interface, and it has a Graphic User Interface created with JavaFX."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/jeffreygohkw.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/jeffreygohkw.md[Test code]]"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Privacy of Fields"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior (Add and Edit Co-authored with Charles Goh)"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003daddprivacy]"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003deditprivacy]"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dchangeprivacy]"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dprivacylevel]"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"Users may have contacts that they would like to keep confidential or those that they do not feel comfortable displaying in public. Instead of removing the contact from the address book, setting a field to private allows users to choose exactly what information they would like to display and what they would like to hide."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"In addition, a private name cannot be searched for, and a private address cannot be used in the locate and navigate commands to prevent users from finding out the value of the private field."},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"Having a private field also doubles up as an extra layer of protection against unintentional modifications, as private fields cannot be edited without changing them back to public fields."},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"It may be inconvenient for a user to set a person\u0027s fields to public and back to private every time they would like to have a peek at the data that was hidden, or to set a person\u0027s every field to private if they want to hide them. Thus, having a command to change the privacy level of the address book will make it much more convenient for users to access private information."},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dprivacy]"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Locating a person\u0027s address"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dlocate]"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"While a person\u0027s phone and email address can be used directly, users often are unaware of where exactly their contacts\u0027 addresses are located in real life. The locate command aims to solve this problem by taking the address of a contact and searching for it on Google Maps. This allows the user to find out where exactly their contacts\u0027 addresses are located."},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dlocate]"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Navigating from one address to another"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dnavigate]"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"Locating a contact does not tell users how to arrive at that particular contact\u0027s address. Furthermore, users may face the scenario where they have to travel and meet different groups and different contacts throughout the day. The Navigate command allows users to find out the most efficient path from one address to another with the aid of Google Maps."},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"Users are able to utilize the addresses attached to a person, as well as those attached to a task, in the navigate command. They can also manually input addresses in the custom line if they are looking for directions to or from an address that is not presently stored inside the address book. This greatly enhances the flexibility of the command, and allows users to use the command without having to add a dummy task or person to store new addresses beforehand."},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dnavigate]"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Opening and Saving of the .xml save file"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopen]"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dsaveas]"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopensaveas]"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"Open and Save As will allow users to more easily manage their data. Open allows them to load their data from a .xml file, letting them easily work on multiple different address books. +"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"Save As allows users to save their address book data, letting it serve as backup or allowing them to be placed in a different location on the computer while still remaining operational. +"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"This also allows for easier transfers of save files between devices without having to manually drag and manage the save files to and from the folder where Address++ is located."},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"It can even potentially allow for syncing save files between devices if external software like Dropbox is used."},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dopensaveas]"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Other contributions"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":"* Add Menu Icons for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#10])"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"* Add Keyboard Shortcuts for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#11], https://github.com/CS2103AUG2017-W09-B2/main/pull/101[#101])"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"* Modified SortCommand to be undoable, and wrote test cases for it (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/29[#29], https://github.com/CS2103AUG2017-W09-B2/main/pull/30[#30])"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"* Created TaskAddress to store the address of tasks (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/129[#129], https://github.com/CS2103AUG2017-W09-B2/main/pull/132[#132])"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"* Added Travis, Coveralls and Appveyor links for Continuous Integration (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/4[#4], https://github.com/CS2103AUG2017-W09-B2/main/pull/22[#22])"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"* Performed Acceptance Testing for Team T16-B2 (Issue https://github.com/CS2103AUG2017-T16-B2/main/issues/102[#102])"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":"* Wrote some Manual Testing tests (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/162[#162], https://github.com/CS2103AUG2017-W09-B2/main/pull/165[#165])"}],"authorContributionMap":{"jeffreygohkw":159}},{"path":"docs/team/KelvinLin.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"\u003d Lin Ziwen Kelvin - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":":imagesDir: ../images"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":":stylesDir: ../stylesheets"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: AddressBook++"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/Esilocke.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/Esilocke.md[Test code]]"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Edit Tag"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittag]"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"#End of Extract#"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"The user may find a need to change the name of a particular name. +"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"In the context of the target user, suppose that a user wishes to change the tag `CS2103Groupmates` to `friends`, after he has completed the module. +"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"The user would need to delete the tag from all users who are tagged with `CS2103Groupmates`, and add the tag `friends` to them one-by-one. `edittag` thus aims to make this process faster by allowing users to rename all instances of the tag from the address book."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"The EditTagCommand iterates through each person in the UniquePersonList, and replaces the old tag, if found, with the new tag."},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Optional Data Input"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"Optional Data Input allows tasks and persons to have only one compulsory field, the name. All other fields in a person or task can be left unspecified, allowing for a greater range of inputs."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"We may not always have the opportunity to find contacts or tasks with complete information. +"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"This means that some contacts may not have an address, or email address, while some tasks may not have a deadline, or a description. Without Optional Data Input, the user would need to come up with random placeholder values for each prefix, which would greatly hinder user experience as the user would need to type in unnecessary values to satisfy the command format. +"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"Allowing optional data input thus lifts the restriction of making every field compulsory, and thus allows users to fill in a wider range of input."},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"When a user does not fill in a prefix for a particular field, the parser will create an object corresponding to the missing field with a placeholder value."},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"[source, java]"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"public Phone(String args) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ..."},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"public boolean isValidPhone(String args) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (args.equals(PHONE_PLACEHOLDER_VALUE) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" ..."},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"In addition, the isValid method is also updated to accept placeholder values as valid inputs."},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Tasks Management"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003daddtask]"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittask]"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003ddeletetask]"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dfindtask]"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dselecttask]"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dsetstate]"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dassignDismiss]"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dclear]"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"#End of Extract#"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"Our intended target audience are primarily NUS students, who are working on projects. In addition to managing their contact details, allowing users to manage their tasks would also greatly improve their user experience, as they would not need to keep track of their project deadlines separately."},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dtask]"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dassignDismiss]"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"#End of Extract#"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Other contributions"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* Conducted internal acceptance testing [https://github.com/CS2103AUG2017-W09-B2/main/issues/155[Issue #155]]"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"* Conducted Acceptance Testing for other teams [https://github.com/CS2103AUG2017-F09-B1/main/issues/83[F09-B1]] [https://github.com/CS2103AUG2017-F09-B1/main/issues/82[F09-B1]]"}],"authorContributionMap":{"charlesgoh":1,"Esilocke":114}},{"path":"docs/team/charlesgoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Charles Goh - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":":imagesDir: ../images"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":":stylesDir: ../stylesheets"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: Address++"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"Address++ is a desktop address book application that aims to provide students and"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"professionals with an effective tool to help them manage their contacts and their time."},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"This is a snapshot of our User Interface"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"My contributions to this project are listed below:"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/charlesgoh.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/charlesgoh.md[Test code]]"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Password Protection Commands `lock` `unlock` `changepassword`"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dpassword]"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"Many users have security related concerns. In order to slow malicious users from causing"},{"lineNumber":33,"author":{"gitId":"-"},"content":"damage to users\u0027 Address++ application, the password protection suite of commands were"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"created."},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dpassword]"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dsort]"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"As more contacts and tasks are added to the application, the lists may get long and disorganized. The Sort Command"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"allows users to sort both contacts and tasks by key fields. Examples include sorting contacts by name and"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"sorting contacts by deadlines."},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dbackup]"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"Users are able to back up their data before making any changes so that in the event of an"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"emergency (e.g. clearing all data and then closing afterwards), the old save data can be restored."},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dbackup]"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dfontsize]"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"Different monitors render the application differently. On some monitors, the words may appear to be too small. The font size"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"commands and buttons allow users to increase/decrease/reset the font sizes at any time when using the application."},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dfontsize]"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Avatar and Remark Fields"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior: Co-authored with Jeffrey Goh"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003davatar]"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":"Avatars and remarks help users to identify different contacts. It was also implemented with the intention of making the application"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"more user friendly."},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation for Avatar Field"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003davatar]"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Other contributions"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":"* Added tests for task related implementations (https://github.com/CS2103AUG2017-W09-B2/main/pull/115/files[#115]) +"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":"* Conducted Acceptance Testing for another team [https://github.com/CS2103AUG2017-W09-B4/main/issues/77[W09-B4]]"}],"authorContributionMap":{"charlesgoh":160,"-":2}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 5, 0, false);"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());"},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book."},{"lineNumber":88,"author":{"gitId":"-"},"content":" */"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");"},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null."},{"lineNumber":117,"author":{"gitId":"-"},"content":" */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;"},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());"},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \""},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");"},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;"},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \""},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");"},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":169,"author":{"gitId":"-"},"content":" }"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(model.getUserPrefs());"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private String appTitle \u003d \"Address++\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well."},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/"},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;"},{"lineNumber":13,"author":{"gitId":"-"},"content":" }"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BackupRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * An Event for backing up of data to a selected location."},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class BackupRequestEvent extends BaseEvent {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private Model model;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private String args;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public BackupRequestEvent(Model model, String args) {"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public Model getModel() {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" return model;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public void setModel(Model model) {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public String getArgs() {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" return args;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void setArgs(String args) {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String toString() {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelNavigateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelNavigateEvent extends BaseEvent {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" private final Location fromLocation;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final Location toLocation;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelNavigateEvent(Location fromLocation, Location toLocation) {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.fromLocation \u003d fromLocation;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.toLocation \u003d toLocation;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Location getFromLocation() {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" return fromLocation;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Location getToLocation() {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" return toLocation;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":33}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeFontSizeEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a font size change triggered by a command or the UI"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"public class ChangeFontSizeEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static int increaseSizeEventIndex \u003d 0;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static int decreaseSizeEventIndex \u003d 1;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static int resetSizeEventIndex \u003d 2;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private int triggerOption;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public ChangeFontSizeEvent(int triggerOption) {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public String toString() {"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" return \"New Event: Font size change\";"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static int getIncreaseSizeEventIndex() {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" return increaseSizeEventIndex;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public static int getDecreaseSizeEventIndex() {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return decreaseSizeEventIndex;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static int getResetSizeEventIndex() {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return resetSizeEventIndex;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public int getTriggerOption() {"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return triggerOption;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public void setTriggerOption(int triggerOption) {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangeThemeRequestEvent extends BaseEvent {"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" private final String styleSheet;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public ChangeThemeRequestEvent(String styleSheet) {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" this.styleSheet \u003d styleSheet;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public String getStyleSheet() {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return styleSheet;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/commons/events/ui/JumpToListRequestTaskEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Indicates a request to jump to the list of tasks"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class JumpToListRequestTaskEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public final int targetIndex;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public JumpToListRequestTaskEvent(Index targetIndex) {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" //TODO optimize this class"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex.getZeroBased();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user."},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution."},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();"},{"lineNumber":31,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model) {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.history \u003d new CommandHistory();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" this.addressBookParser \u003d new AddressBookParser();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");"},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" return result;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" } finally {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" history.add(commandText);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":12,"Esilocke":8,"-":49}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that adds an object to the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class AddCommand extends UndoableCommand {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/AddPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Adds a person to the address book."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"John Doe \""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"98765432 \""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johnd@example.com \""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + PREFIX_REMARK + \"Sells sea shells on the sea shore \""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + PREFIX_AVATAR + \"avatar-filepath.png\""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"friends \""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"owesMoney\";"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public AddPersonCommand(ReadOnlyPerson person) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddPersonCommand)) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assert (((AddPersonCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddPersonCommand) other).personToAdd);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":73}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book."},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends AddCommand {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all \""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" + \"target persons in the current list.\";"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":126}},{"path":"src/main/java/seedu/address/logic/commands/AddTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \": Adds a task to the address book. \""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS]\\n\""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"12 Kent Ridge Crescent, 119275\";"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New task added: \\n%1$s\";"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Creates an AddTaskCommand to add the specified {@code ReadOnlyTask}"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public AddTaskCommand(ReadOnlyTask task) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" super();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddTaskCommand)) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assert (taskToAdd !\u003d null);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert (((AddTaskCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddTaskCommand) other).taskToAdd);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":70}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location."},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \"MyBackUpFile\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" super();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new BackupRequestEvent(model, args));"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/logic/commands/ChangePasswordCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Changes user\u0027s password provided old password is correct and new passwords match."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommand extends Command {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"changepassword\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"cpw\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Password changed successfully\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes user password. \\n\""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"NEWPASSWORD \""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"CONFIRMPASSWORD \\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\";"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_OLD_NEW_PS_SAME \u003d \"New password must be different from your old password\";"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ERROR_OCCURED \u003d \"An error occured. Please try again.\\n\";"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Your password is incorrect. Please try again.\\n\";"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_CONFIRMATION_INCORRECT \u003d \"Your new password and confirmation password \""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" + \"do not match. Please try again\\n\";"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(ChangePasswordCommand.class);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private String oldPassword;"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private String newPassword;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" private String confirmationPassword;"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" * Takes in old password, new password and confirmation password from parser and creates a new"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * ChangePasswordCommand object"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param oldPassword"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" * @param newPassword"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" * @param confirmPassword"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand(String oldPassword, String newPassword, String confirmPassword) {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.oldPassword \u003d oldPassword;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" this.newPassword \u003d newPassword;"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.confirmationPassword \u003d confirmPassword;"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes string using SHA256 encryption and returns hashed string"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * @param argument"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" private String forwardHash(String argument) {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(argument, StandardCharsets.UTF_8).toString();"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes the user input password and checks if it matches with the encrypted password saved"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldPasswordCorrect() {"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String forwardHashedInputPassword \u003d forwardHash(oldPassword);"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" String forwardHashActualPassword;"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" forwardHashActualPassword \u003d userPrefs.getAddressBookEncryptedPassword();"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" if (forwardHashActualPassword.equals(forwardHashedInputPassword)) {"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Actual password and input password matches\");"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return true;"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Actual password and input password do not match\");"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" return false;"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Takes new input passwords and checks them against one another."},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" private boolean isNewPasswordInputsSame() {"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return newPassword.equals(confirmationPassword);"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Checks if old password and new password are the same"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldAndNewPasswordTheSame() {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return oldPassword.equals(newPassword);"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" // Case where old password is incorrect"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" if (!isOldPasswordCorrect()) {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Password is incorrect. Note: Default password is \u0027password\u0027 \");"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Case where new password and confirmation password do not match"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" if (!isNewPasswordInputsSame()) {"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"New password and confirmation password do not match\");"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_CONFIRMATION_INCORRECT);"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" // Case where old and new passwords are the same"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" if (isOldAndNewPasswordTheSame()) {"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Old password and new password cannot be the same\");"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_OLD_NEW_PS_SAME);"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Case where user input passes both checks. Password is changed and UserPrefs saved"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs;"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" // Get user prefs file"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d model.getUserPrefs();"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set new password to user prefs"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(newPassword);"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" // Logs new password and saved password for debugging purposes"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String hashedNewPassword \u003d forwardHash(newPassword);"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" String userPrefsHashedPassword \u003d userPrefs.getAddressBookEncryptedPassword();"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New Password: \" + newPassword"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted New Password: \" + hashedNewPassword"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted Password From UserPrefs:\" + userPrefsHashedPassword"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" + \"\\nCommand\u0027s Password and UserPrefs saved password matches: \""},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + Boolean.toString(hashedNewPassword.equals(userPrefsHashedPassword)) + \"\\n\");"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" // Return command result"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":142}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_AVATAR + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD + \" \""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_AVATAR + FALSE_WORD;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d null;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(model.getPrivacyLevel());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Person must have all fields initialised.\");"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps)"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Name name \u003d createNameWithPrivacy(person, pps);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone \u003d createPhoneWithPrivacy(person, pps);"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" Email email \u003d createEmailWithPrivacy(person, pps);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Address address \u003d createAddressWithPrivacy(person, pps);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark \u003d createRemarkWithPrivacy(person, pps);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar \u003d person.getAvatar();"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" Boolean favourite \u003d person.getFavourite();"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tag \u003d person.getTags();"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tag);"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Name) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Name) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return name;"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createPhoneWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getPhone().getIsPrivate()) {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(false);"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(true);"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Phone\");"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(pps.getPhoneIsPrivate());"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(person.getPhone().getIsPrivate());"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return phone;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createEmailWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getEmail().getIsPrivate()) {"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(false);"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(true);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Email\");"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(pps.getEmailIsPrivate());"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(person.getEmail().getIsPrivate());"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return email;"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createAddressWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(false);"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(true);"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Address\");"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(pps.getAddressIsPrivate());"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(person.getAddress().getIsPrivate());"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" return address;"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createRemarkWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getRemark().getIsPrivate()) {"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(false);"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(true);"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Remark\");"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(pps.getRemarkIsPrivate());"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(person.getRemark().getIsPrivate());"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return remark;"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return index;"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person."},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {"},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}"},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {"},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;"},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;"},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;"},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null."},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;"},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":359,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":360,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":361,"author":{"gitId":"charlesgoh"},"content":" * Returns the value of remarkIsPrivate"},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" public Boolean getRemarkIsPrivate() {"},{"lineNumber":364,"author":{"gitId":"charlesgoh"},"content":" return remarkIsPrivate;"},{"lineNumber":365,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":366,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":367,"author":{"gitId":"charlesgoh"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {"},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remarkIsPrivate);"},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;"},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":371,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":372,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {"},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;"},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())"},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())"},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())"},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())"},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());"},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":381}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Clears all entries in the address book."},{"lineNumber":11,"author":{"gitId":"-"},"content":" */"},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/ClearPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the contacts in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommand extends ClearCommand {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All contacts have been cleared!\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_PERSON);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/ClearTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the tasks in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommand extends ClearCommand {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All tasks have been cleared!\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_TASK);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public abstract class Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" protected CommandHistory history;"},{"lineNumber":17,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons."},{"lineNumber":21,"author":{"gitId":"-"},"content":" *"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed"},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks."},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message."},{"lineNumber":41,"author":{"gitId":"-"},"content":" *"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command."},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * access to the dependencies."},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that deletes an object from the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class DeleteCommand extends UndoableCommand {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/DeletePersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Deletes a person from the address book."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommand extends DeleteCommand {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person identified by the index number used in the last listing.\\n\""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Person: %1$s\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand(Index targetIndex) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size()) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToDelete));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeletePersonCommand // instanceof handles nulls"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeletePersonCommand) other).targetIndex)); // state check"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book."},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends DeleteCommand {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"The target persons do not have input tags.\";"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons."},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list."},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":125}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a task from the address book."},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommand extends DeleteCommand {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the task identified by the index number used in the last listing.\\n\""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Task: %1$s\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand(Index targetIndex) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToDelete));"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeleteTaskCommand // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteTaskCommand) other).targetIndex)); // state check"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":56}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends UndoableCommand {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + \"TASK \";"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" if (!personsToDismiss.contains(toDismiss)) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":89}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that edits an object in the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class EditCommand extends UndoableCommand {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";"},{"lineNumber":11,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/EditPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * Edits a person in the address book."},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommand extends EditCommand {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last person listing. \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"91234567 \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Person: \\n%1$s\";"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static boolean areFieldsAllPrivate \u003d true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final EditPersonDescriptor editPersonDescriptor;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private final Index index;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * @param index of the person in the filtered person list to edit"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * @param editPersonDescriptor details to edit the person with"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand(Index index, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editPersonDescriptor);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" editedPerson.setPrivacyLevel(model.getPrivacyLevel());"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}."},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" updatedAvatar \u003d createUpdatedAvatar(personToEdit, editPersonDescriptor);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedAvatar, updatedTags);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().getIsPrivate()) {"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().getIsPrivate()) {"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().getIsPrivate()) {"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().getIsPrivate()) {"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" //**author charlesgoh"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().getIsPrivate()) {"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Avatar) for use in createEditedPerson"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Avatar) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar createUpdatedAvatar(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAvatar().isPresent()) {"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAvatar;"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" //author"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());"},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonCommand)) {"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand e \u003d (EditPersonCommand) other;"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the person."},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" public static class EditPersonDescriptor {"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" private Name name;"},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" private Phone phone;"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" private Email email;"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" private Address address;"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" private Boolean favourite;"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" private Remark remark;"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" private Avatar avatar;"},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" private Set\u003cTag\u003e tags;"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor() {}"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" this.name \u003d toCopy.name;"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d toCopy.phone;"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" this.email \u003d toCopy.email;"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" this.address \u003d toCopy.address;"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" this.favourite \u003d toCopy.favourite;"},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d toCopy.remark;"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d toCopy.avatar;"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d toCopy.tags;"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited."},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark,"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" this.avatar, this.tags);"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" public void setName(Name name) {"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":" this.name \u003d name;"},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cName\u003e getName() {"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(name);"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d phone;"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPhone\u003e getPhone() {"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(phone);"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void setEmail(Email email) {"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" this.email \u003d email;"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cEmail\u003e getEmail() {"},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(email);"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" public void setAddress(Address address) {"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" this.address \u003d address;"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAddress\u003e getAddress() {"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(address);"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":368,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":369,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":370,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;"},{"lineNumber":371,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":372,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {"},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);"},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":376,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d remark;"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cRemark\u003e getRemark() {"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(remark);"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" public void setAvatar(Avatar avatar) {"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d avatar;"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAvatar\u003e getAvatar() {"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(avatar);"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d tags;"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(tags);"},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonDescriptor)) {"},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" return getName().equals(e.getName())"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar())"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTags().equals(e.getTags());"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":190,"Esilocke":227,"wangyiming1019":9}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends EditCommand {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \": Edits the specified tag \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/EditTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Edits a task in the address book."},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommand extends EditCommand {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \": Edits the details of the task identified \""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Task: \\n%1$s\";"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private final Index index;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand(Index index, EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownTaskList.size()) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedTask));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * edited with {@code editTaskDescriptor}."},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assert taskToEdit !\u003d null;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" TaskName updatedTaskName;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Description updatedDescription;"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" Deadline updatedDeadline;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Priority updatedPriority;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Assignees assignees;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" Boolean updatedState;"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" TaskAddress updatedTaskAddress;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // You cannot edit assignees or state using edit command"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assignees \u003d taskToEdit.getAssignees();"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" updatedState \u003d taskToEdit.getCompleteState();"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress \u003d editTaskDescriptor.getTaskAddress().orElse(taskToEdit.getTaskAddress());"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState,"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress);"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskCommand)) {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand e \u003d (EditTaskCommand) other;"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task."},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private Description description;"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" private Priority priority;"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" private TaskAddress taskAddress;"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d toCopy.taskAddress;"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited."},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority,"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" this.taskAddress);"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d taskAddress;"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskAddress\u003e getTaskAddress() {"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskAddress);"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority())"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTaskAddress().equals(e.getTaskAddress());"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":224}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getAddress(), true,"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getTags());"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToFavourite, editedPerson);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that finds objects in the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class FindCommand extends Command {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/FindPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" * Finds people in the address book."},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommand extends FindCommand {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand(NameContainsKeywordsPredicate predicate) {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindPersonCommand"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personPredicate.equals(((FindPersonCommand) other).personPredicate);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":32}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords."},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive."},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends FindCommand {"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" + \": Finds all persons whose tags contain any of \""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" friends colleagues\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/FindTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Finds tasks in the address book."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommand extends FindCommand {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \": Finds all tasks whose names or descriptions \""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]... [p/MINIMUM_PRIORITY] [done/TASK_STATE]\\n\""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_COMPLETE_VALUE \u003d \"The task status should either be \u0027true\u0027 or \u0027false\u0027\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PRIORITY \u003d \"The specified priority should be an integer from 1 to 5\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand(TaskContainsKeywordPredicate predicate) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindTaskCommand"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskPredicate.equals(((FindTaskCommand) other).taskPredicate);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/commands/FontSizeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 5;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"fontsize\";"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"fs\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String INCREASE_SIZE_PARAMETER \u003d \"increase\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String DECREASE_SIZE_PARAMETER \u003d \"decrease\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String RESET_SIZE_PARAMETER \u003d \"reset\";"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" INCREASE_SIZE_PARAMETER, DECREASE_SIZE_PARAMETER, RESET_SIZE_PARAMETER));"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Increases, decreases or resets font sizes \\n\""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [OPTION]\\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" increase\\n\""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" reset\\n\";"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\" + MESSAGE_USAGE;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_INCREASE_FONT \u003d \"Font size increased successfully\";"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_DECREASE_FONT \u003d \"Font size decreased successfully\";"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_RESET_FONT \u003d \"Font size reset successfully\";"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" private final String option;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand(String option) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.option \u003d option;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getOption() {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return this.option;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" switch (option) {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" case INCREASE_SIZE_PARAMETER:"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_INCREASE_FONT);"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" case DECREASE_SIZE_PARAMETER:"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_DECREASE_FONT);"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" case RESET_SIZE_PARAMETER:"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_RESET_FONT);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" System.err.println(\"Parameter is invalid\");"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_INVALID_INPUT + MESSAGE_USAGE);"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":68}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person at Index: %1$s\";"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_ADDRESS_FAILURE \u003d \"Person %1$s has no Address\";"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().getIsPrivate()) {"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().toString().equals(\"\")) {"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_NO_ADDRESS_FAILURE, targetIndex.getOneBased()));"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":62}},{"path":"src/main/java/seedu/address/logic/commands/LockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class LockCommand extends Command {"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"lock\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"lk\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Locks the application. \""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ locked successfully\";"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public LockCommand(String password) {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs."},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to lock"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/NavigateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Navigates from one address to another with the help of Google Maps"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"navigate\";"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"nav\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" + \": Get directions from one address to another.\\n\""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three)\""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \" AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three)\\n\""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" fp/2 ta/University Town\";"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NAVIGATE_SUCCESS \u003d \"Navigating from %1$s to %2$s\";"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_FROM_ERROR \u003d \"Only one type of From prefix allowed.\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_TO_ERROR \u003d \"Only one type of To prefix allowed.\";"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR \u003d \"Address of the Person at index %1$s is private.\";"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR \u003d \"Person at index %1$s does not have an address.\";"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_HAS_NO_ADDRESS_ERROR \u003d \"Task at index %1$s does not have an address.\";"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationFrom;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationTo;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private final Index fromIndex;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private final Index toIndex;"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean fromIsTask;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean toIsTask;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d null;"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d null;"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" checkDuplicateFromAndToLocation(locationFrom, locationTo, fromIndex, toIndex);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null) {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null) {"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" this.locationFrom \u003d from;"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" this.locationTo \u003d to;"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" this.toIndex \u003d toIndex;"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIndex \u003d fromIndex;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" this.toIsTask \u003d toIsTask;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIsTask \u003d fromIsTask;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Throws an IllegalArgumentException if there is both locationFrom and fromIndex are not null,"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * or if both locationTo and toIndex are not null."},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo,"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" Index fromIndex, Index toIndex) throws IllegalArgumentException {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" Location from;"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" Location to;"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" if (fromIndex !\u003d null) {"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" if (toIndex !\u003d null) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d setLocationByIndex(toIndex, toIsTask);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelNavigateEvent(from, to));"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_NAVIGATE_SUCCESS, from, to));"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationFrom() {"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" return locationFrom;"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationTo() {"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" return locationTo;"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" public Index getFromIndex() {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" return fromIndex;"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" public Index getToIndex() {"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" return toIndex;"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isFromIsTask() {"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return fromIsTask;"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isToIsTask() {"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" return toIsTask;"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NavigateCommand // instanceof handles nulls"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationFrom(other)"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationTo(other)"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIndex(other)"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIndex(other)"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIsTask(other)"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIsTask(other)); // state check"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationFrom) of this object is equal to that of the other Object"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationFrom(Object other) {"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationFrom \u003d\u003d null) {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationFrom \u003d\u003d null;"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationFrom.equals(((NavigateCommand) other).locationFrom);"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationTo) of this object is equal to that of the other Object"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationTo(Object other) {"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationTo \u003d\u003d null) {"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationTo \u003d\u003d null;"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationTo.equals(((NavigateCommand) other).locationTo);"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIndex) of this object is equal to that of the other Object"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIndex(Object other) {"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" if (this.fromIndex \u003d\u003d null) {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).fromIndex \u003d\u003d null;"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIndex.equals(((NavigateCommand) other).fromIndex);"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIndex) of this object is equal to that of the other Object"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIndex(Object other) {"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" if (this.toIndex \u003d\u003d null) {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).toIndex \u003d\u003d null;"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIndex.equals(((NavigateCommand) other).toIndex);"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIsTask) of this object is equal to that of the other Object"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIsTask(Object other) {"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIsTask \u003d\u003d (((NavigateCommand) other).fromIsTask);"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIsTask) of this object is equal to that of the other Object"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIsTask(Object other) {"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIsTask \u003d\u003d (((NavigateCommand) other).toIsTask);"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":224}},{"path":"src/main/java/seedu/address/logic/commands/OpenCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommand extends Command {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"open\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"o\";"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String OPEN_COMMAND_SUCCESS \u003d \"Successfully opened file.\";"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new OpenRequestEvent());"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(OPEN_COMMAND_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/PrivacyLevelCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Handles the changing of Privacy Levels in the address book"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"privacylevel\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"pl\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String CHANGE_PRIVACY_LEVEL_SUCCESS \u003d \"Successfully changed privacy level to %1$s.\";"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String WRONG_PRIVACY_LEVEL_MESSAGE \u003d \"Privacy Level can only be 1, 2 or 3\";"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MIN_PRIVACY_LEVEL \u003d 1;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MAX_PRIVACY_LEVEL \u003d 3;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \": Changes the privacy level of the address book. Level 1 shows all data, level 2 hides private fields\""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" + \" and level 3 hides persons with at least 1 private field.\\n\""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: LEVEL (must be 1, 2 or 3)\\n\""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final int level;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand(int level) {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.level \u003d level;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public int getLevel() {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return level;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof PrivacyLevelCommand // instanceof handles nulls"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.level \u003d\u003d ((PrivacyLevelCommand) other).level); // state check"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":77}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SaveAsCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data to a new save file at a desired location"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommand extends Command {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"save\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"sa\";"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String SAVE_AS_COMMAND_SUCCESS \u003d \"Successfully saved file.\";"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new SaveAsRequestEvent());"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(SAVE_AS_COMMAND_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that selects an object in the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class SelectCommand extends Command {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/SelectPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Selects a person in the address book and loads the view panel for that person."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommand extends SelectCommand {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Person: %1$s\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand(Index targetIndex) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectPersonCommand // instanceof handles nulls"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectPersonCommand) other).targetIndex)); // state check"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":47}},{"path":"src/main/java/seedu/address/logic/commands/SelectTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * Selects a task in the address book and loads the view panel for that task."},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommand extends SelectCommand {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \": Selects the task identified by the index number used in the last task listing.\\n\""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Task: %1$s\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand(Index targetIndex) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownTaskList.size()) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestTaskEvent(targetIndex));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectTaskCommand // instanceof handles nulls"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectTaskCommand) other).targetIndex)); // state check"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":49}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as complete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as incomplete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_LIST_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"person\", \"task\"));"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\", \"priority\", \"deadline\"));"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons or all tasks by chosen \""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive\\n\""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [LIST] [FIELD] [ORDER]\\n\""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" person email desc\\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_WORD + \" task deadline desc\\n\";"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Person Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Task Field Values: DEADLINE, PRIORITY\\n\""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_PERSONS \u003d \"All persons in address book successfully sorted\";"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_TASKS \u003d \"All tasks in address book successfully sorted\";"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" private final String list;"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private final String field;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private final String order;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String list, String field, String order) {"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" this.list \u003d list;"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * Checks if argument command has the same parameter properties"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param commandB"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public boolean sameCommandAs(SortCommand commandB) {"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return commandB.getList().equals(this.list) \u0026\u0026 commandB.getField()"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .equals(this.field) \u0026\u0026 commandB.getOrder().equals(this.order);"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public String getField() {"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" return this.field;"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" return this.order;"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public String getList() {"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" return this.list;"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" if (this.list.equals(ACCEPTED_LIST_PARAMETERS.get(0))) {"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_PERSONS);"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" model.sortTasks(getField(), getOrder());"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_TASKS);"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":2}},{"path":"src/main/java/seedu/address/logic/commands/TagListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * List all tags in the address book to the user"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommand extends Command {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showtag\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"stag\";"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAILURE \u003d \"There is no tag!\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All the tags are here: \";"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(displayTags());"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * display all the tags to user"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * @return String displayTags"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String displayTags() {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" String displayTags;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e tagList \u003d getAllTagsInAddressBook();"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" if (tagList.isEmpty()) {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_FAILURE;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_SUCCESS + convertTagToString(tagList);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return displayTags;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * get all the tags in the address book without duplication"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" * @return allTagList"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" private ArrayList\u003cTag\u003e getAllTagsInAddressBook() {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e allTagList \u003d new ArrayList\u003cTag\u003e();"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" if (!allTagList.contains(tag)) {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" allTagList.add(tag);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" return allTagList;"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" * convert a list of tags to a String"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * @return String tags"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ArrayList\u003cTag\u003e tagList) {"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagNameList \u003d new ArrayList\u003cString\u003e();"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : tagList) {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" tagNameList.add(tag.getTagName());"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Collections.sort(tagNameList);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder tagNameString \u003d new StringBuilder();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" for (String tagName : tagNameList) {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" tagNameString.append(\"\u003c\").append(tagName).append(\"\u003e \");"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" return tagNameString.toString().trim();"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/ThemeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommand extends Command {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"theme\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"th\";"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" + \": Sets the theme based on the specified style.\\n\""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: STYLE\\n\""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" dark\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_CHANGE_SUCCESS \u003d \"Theme Changed to: %1$s\";"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_NOT_AVAILABLE \u003d \"Theme %1$s is not available.\";"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_IN_USE \u003d \"Theme %1$s is currently in use.\";"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private final String style;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand (String style) {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" this.style \u003d style;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return style;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ThemeCommand // instanceof handles nulls"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.style.equals(((ThemeCommand) other).style)); // state check"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":64}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToUnfavourite.getName(),"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getPhone(), personToUnfavourite.getEmail(),"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getAddress(), false,"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getRemark(), personToUnfavourite.getAvatar(),"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getTags());"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToUnfavourite, editedPerson);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/UnlockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommand extends Command {"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"unlock\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"ul\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Unlocks the application. \""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ unlocked successfully\";"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand(String password) {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs."},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to unlocked"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/ViewAssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Displays a list of all persons assigned to a specified task"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"viewassign\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"va\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Shows all persons assigned to a task\\n\""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index taskIndex;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand(Index taskIndex) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToFind \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.viewAssignees(taskToFind);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" || other instanceof ViewAssignCommand"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((ViewAssignCommand) other).taskIndex);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":48}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object"},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution."},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK, PREFIX_TAG_FULL)) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d AddTaskCommandParser.constructTask(args);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new AddTaskCommand(taskToAdd);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TAG_FULL)) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AddTagCommandParser().parse(filteredArgs);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d AddPersonCommandParser.constructPerson(args);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new AddPersonCommand(personToAdd);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":28,"-":23}},{"path":"src/main/java/seedu/address/logic/parser/AddPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR_PRIVATE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ReadOnlyPerson object in the context of AddPersonCommand."},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"public class AddPersonCommandParser extends AddCommandParser {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided."},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static ReadOnlyPerson constructPerson(String args) throws ParseException {"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_AVATAR, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_AVATAR_PRIVATE);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d makeName(argMultimap);"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d makePhone(argMultimap);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d makeEmail(argMultimap);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d mmakeAddress(argMultimap);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d makeAvatar(argMultimap);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d makeRemark(argMultimap);"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, avatar, tagList);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Name based on the input arguments"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static Name makeName(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return name;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Phone based on the input arguments"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone makePhone(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)) {"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(null);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" return phone;"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Email based on the input arguments"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" private static Email makeEmail(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)) {"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(null);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" return email;"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Address based on the input arguments"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" private static Address mmakeAddress(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)) {"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(null);"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return address;"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Avatar based on the input arguments"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar makeAvatar(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_AVATAR))) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).get();"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d new Avatar(null);"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return avatar;"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Remark based on the input arguments"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark makeRemark(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)) {"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(null);"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return remark;"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":164,"Esilocke":2}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser extends AddCommandParser {"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution."},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" protected static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/parser/AddTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ReadOnlyTask object in the context of AddTaskCommand."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParser extends AddCommandParser {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyTask from the arguments provided."},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static ReadOnlyTask constructTask(String args) throws ParseException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY,"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" PREFIX_ADDRESS, PREFIX_TASK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" TaskName name;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Description description;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Priority priority;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" TaskAddress address;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" description \u003d arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION)"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get()"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" : new Description(null);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" deadline \u003d arePrefixesPresent(argMultimap, PREFIX_DEADLINE)"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get()"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" : new Deadline(null);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" priority \u003d arePrefixesPresent(argMultimap, PREFIX_PRIORITY)"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get()"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" : new Priority(null);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" address \u003d arePrefixesPresent(argMultimap, PREFIX_ADDRESS)"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS)).get()"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" : new TaskAddress(null);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, address);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":67}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":"public class AddressBookParser {"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_NO_ACCESS \u003d \"Not allowed! You must unlock before\""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" + \" making any changes.\\n\" + UnlockCommand.MESSAGE_USAGE;"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args."},{"lineNumber":58,"author":{"gitId":"-"},"content":" */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Parses user input into command for execution."},{"lineNumber":65,"author":{"gitId":"-"},"content":" *"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @param userInput full user input string"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @return the command based on the user input"},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // Check lock state"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Parsing command. Lock state is currently: \" + Boolean.toString(lockState));"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());"},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");"},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" Command result \u003d processNonCrudCommands(commandWord, arguments);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" if (result !\u003d null) {"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" return result;"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // Test for lock. If locked, return no access message"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" if (lockState) {"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(MESSAGE_NO_ACCESS);"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_WORD:"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_ALIAS:"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommandParser().parse(arguments);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_WORD:"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_ALIAS:"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommandParser().parse(arguments);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:"},{"lineNumber":120,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:"},{"lineNumber":132,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_WORD:"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_ALIAS:"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" return new TagListCommand();"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":154,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:"},{"lineNumber":156,"author":{"gitId":"-"},"content":" return new HistoryCommand();"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:"},{"lineNumber":160,"author":{"gitId":"-"},"content":" return new UndoCommand();"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:"},{"lineNumber":164,"author":{"gitId":"-"},"content":" return new RedoCommand();"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_WORD:"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_ALIAS:"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommandParser().parse(arguments);"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_WORD:"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_ALIAS:"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommandParser().parse(arguments);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":179,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" * Checks for non crud command words or aliases and returns the relevant commmand if there is one."},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" * Otherwise control is returned back to the original parseCommand method."},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" * Note: Code was refactored due to codacy\u0027s recommendation that there was a problem with parseCommand\u0027s"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" * NPath complexity (i.e. it the code was too long. Makes it less readable and prone to errors)"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" * @param commandWord"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" * @param arguments"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" private Command processNonCrudCommands(String commandWord, String arguments) throws ParseException {"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality and for locking and unlocking"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_WORD:"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_ALIAS:"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return new OpenCommand();"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_WORD:"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_ALIAS:"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" return new SaveAsCommand();"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return new ExitCommand();"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" return new HelpCommand();"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_WORD:"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_ALIAS:"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return new SelectCommandParser().parse(arguments);"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_WORD:"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_ALIAS:"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" return new LocateCommandParser().parse(arguments);"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_WORD:"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_ALIAS:"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" return new NavigateCommandParser().parse(arguments);"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_WORD:"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_ALIAS:"},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommandParser().parse(arguments);"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_WORD:"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_ALIAS:"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return new LockCommandParser().parse(arguments);"},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_WORD:"},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_ALIAS:"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommandParser().parse(arguments);"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" return new ListCommand();"},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" return null;"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":249,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":106,"jeffreygohkw":19,"Esilocke":25,"wangyiming1019":29,"-":70}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * filepath."},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 1;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Parses the given user input and backs up data into a separate file name."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @param userInput"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ChangePasswordCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new ChangePassword object"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandParser implements Parser\u003cChangePasswordCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePasswordCommand"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a ChangePasswordCommand object for execution."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" .tokenize(args, PREFIX_PASSWORD, PREFIX_NEW_PASSWORD, PREFIX_CONFIRM_PASSWORD);"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" // Check and split arguments before passing them to ChangePasswordCommand"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_NEW_PASSWORD).isPresent()"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).isPresent()) {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException("},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String password \u003d argMultimap.getValue(PREFIX_PASSWORD).get();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String newPassword \u003d argMultimap.getValue(PREFIX_NEW_PASSWORD).get();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" String confirmPassword \u003d argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).get();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommand(password, newPassword, confirmPassword);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":38}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePrivacyCommand"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ChangePrivacyCommand object for execution."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ClearCommand object"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser implements Parser\u003cClearCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearPersonCommand();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new ClearTaskCommand();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person/\");"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TAG_FULL \u003d new Prefix(\"tag/\");"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"v/\");"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR_PRIVATE \u003d new Prefix(\"pv/\");"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task/\");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"p/\");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_STATE \u003d new Prefix(\"done/\");"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_PERSON \u003d new Prefix(\"fp/\");"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_TASK \u003d new Prefix(\"ft/\");"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_ADDRESS \u003d new Prefix(\"fa/\");"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_PERSON \u003d new Prefix(\"tp/\");"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_TASK \u003d new Prefix(\"tt/\");"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_ADDRESS \u003d new Prefix(\"ta/\");"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_NEW_PASSWORD \u003d new Prefix(\"np/\");"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_CONFIRM_PASSWORD \u003d new Prefix(\"cfp/\");"},{"lineNumber":45,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":14,"Esilocke":9,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommandParser().parse(filteredString);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return new DeleteTagCommandParser().parse(filteredArgs);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommandParser().parse(args);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/DeletePersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParser extends DeleteCommandParser {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand."},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand parse(String args) throws ParseException {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommand(index);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution."},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":69}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParser {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object in the context of DeleteTaskCommand."},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand parse(String args) throws ParseException {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommand(index);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object"},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" requireNonNull(args);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommandParser().constructTaskDescriptor(filteredArgs);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(filteredArgs);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommandParser().constructPersonDescriptor(args);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":16,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/EditPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditPersonCommand object"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParser extends EditCommandParser {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditPersonCommand that edits a Person object. **/"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand constructPersonDescriptor(String args) throws ParseException {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" PREFIX_REMARK, PREFIX_AVATAR, PREFIX_TAG);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.EditPersonDescriptor editPersonDescriptor \u003d new EditPersonCommand.EditPersonDescriptor();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).ifPresent(editPersonDescriptor::setAvatar);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommand(index, editPersonDescriptor);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty."},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * {@code Set\u003cTag\u003e} containing zero tags."},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert tags !\u003d null;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (tags.isEmpty()) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return Optional.empty();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":74}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditTagCommand"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * and returns an EditTagCommand object for execution."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return tagList;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/logic/parser/EditTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditTaskCommand object"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParser extends EditCommandParser {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditTaskCommand that edits a Task object. **/"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand constructTaskDescriptor(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY, PREFIX_ADDRESS);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor editTaskDescriptor \u003d new EditTaskCommand.EditTaskDescriptor();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS))"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setTaskAddress);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommand(index, editTaskDescriptor);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommandParser().parse(args);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new FindTagCommandParser().parse(filteredArgs);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommandParser().parse(args);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/FindPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindPersonCommand object"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParser extends FindCommandParser {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindPersonCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an FindPersonCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindPersonCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/FindTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_STATE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindTaskCommand object"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandParser extends FindCommandParser {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindTaskCommand"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * and returns an FindTaskCommand object for execution."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand parse(String args) throws ParseException {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(argsWithNoTaskPrefix, PREFIX_PRIORITY, PREFIX_STATE);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String keywords \u003d argMultimap.getPreamble();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d keywords.trim();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityFindRequired \u003d argMultimap.getValue(PREFIX_PRIORITY).isPresent();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" boolean isStateFindRequired \u003d argMultimap.getValue(PREFIX_STATE).isPresent();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" int minPriority \u003d 0;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" boolean isComplete \u003d false;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (isPriorityFindRequired) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" minPriority \u003d parsePriority(argMultimap.getValue(PREFIX_PRIORITY).get());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" if (isStateFindRequired) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" isComplete \u003d parseState(argMultimap.getValue(PREFIX_STATE).get());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords),"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" isStateFindRequired, isPriorityFindRequired, isComplete, minPriority));"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns an integer corresponding to its value"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Guarantees: The specified value is valid as a priority value"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private int parsePriority(String args) throws ParseException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(Priority.MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" int priority;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.parseInt(args.trim());"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (priority \u003c 1 || priority \u003e 5) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return priority;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns a boolean value corresponding to its value"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" private boolean parseState(String args) throws ParseException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" if (\"true\".equals(trimmed) || \"false\".equals(trimmed)) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return Boolean.valueOf(trimmed);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_COMPLETE_VALUE);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/logic/parser/FontSizeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParser implements Parser\u003cFontSizeCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final int PARAMETER_POSITION \u003d 0;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the FontSizeCommand"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a FontSizeCommand object for execution."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 1) {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" if (!FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])) {"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, FontSizeCommand.MESSAGE_USAGE));"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommand(argKeywords[PARAMETER_POSITION]);"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":48}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new LocateCommand object"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the LocateCommand"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an LocateCommand object for execution."},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/LockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class LockCommandParser implements Parser\u003cLockCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the LockCommand"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * and returns a LockCommand object for execution."},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public LockCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[0]);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[1]);"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":36}},{"path":"src/main/java/seedu/address/logic/parser/NavigateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.stream.Stream;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new NavigateCommand object"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParser implements Parser\u003cNavigateCommand\u003e {"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" private Location from \u003d null;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private Location to \u003d null;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Index fromIndex \u003d null;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Index toIndex \u003d null;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the NavigateCommand"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an NavigateCommand object for execution."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand parse(String args) throws ParseException {"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" resetValues();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argumentMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_NAVIGATE_FROM_PERSON,"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_FROM_TASK, PREFIX_NAVIGATE_FROM_ADDRESS, PREFIX_NAVIGATE_TO_PERSON,"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_TO_TASK, PREFIX_NAVIGATE_TO_ADDRESS);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_ADDRESS);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_PERSON);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_TASK);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" boolean toAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_ADDRESS);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" boolean toPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_PERSON);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" boolean toTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_TASK);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkFrom(argumentMultimap, fromAddress, fromPerson, fromTask);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" checkTo(argumentMultimap, toAddress, toPerson, toTask);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return new NavigateCommand(from, to, fromIndex, toIndex, fromTask, toTask);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * Resets the values stored in NavigateCommandParser object to null"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void resetValues() {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d null;"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d null;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d null;"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d null;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Checksif only 1 To argument is provided"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no To arguments or there are more than 1 To arguements"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" private void checkTo(ArgumentMultimap argumentMultimap, boolean toAddress, boolean toPerson, boolean toTask)"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (!(toAddress || toPerson || toTask)) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((toAddress \u0026\u0026 (toPerson || toTask)) || (toPerson \u0026\u0026 toTask)) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more to prefixes are present"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, toAddress, toPerson, false);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if only 1 From argument is provided"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no From arguments or there are more than 1 From arguments"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person,"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" boolean forFrom) throws IllegalValueException {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":144}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes."},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type."},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtil {"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * trimmed."},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer)."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Name to be private if true."},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Phone to be private if true."},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":101,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":102,"author":{"gitId":"-"},"content":" */"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Address to be private if true."},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e avatar} into an {@code Optional\u003cAddress\u003e} if {@code avatar} is present."},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAvatar\u003e parseAvatar(Optional\u003cString\u003e avatar) throws IllegalValueException {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(avatar);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" return avatar.isPresent() ? Optional.of(new Avatar(avatar.get())) : Optional.empty();"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Remark to be private if true."},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":152,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Email to be private if true."},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":171,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":172,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}."},{"lineNumber":173,"author":{"gitId":"-"},"content":" */"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" requireNonNull(tags);"},{"lineNumber":176,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" for (String tagName : tags) {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":" return tagSet;"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present."},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present."},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present."},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present."},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a {@code TaskAddress} if it is present."},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cTaskAddress\u003e parseTaskAddress(Optional\u003cString\u003e address) throws IllegalValueException {"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new TaskAddress(address.get())) : Optional.empty();"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a (@code Location) if it is present."},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cLocation\u003e parseLocationFromAddress(Optional\u003cString\u003e location) throws IllegalValueException {"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(location);"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return location.isPresent() ? Optional.of(new Location(location.get())) : Optional.empty();"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" * the value in the String."},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" public static ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" int parsedInt;"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" if (!s.isEmpty()) {"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":123,"Esilocke":64,"-":66}},{"path":"src/main/java/seedu/address/logic/parser/PrivacyLevelCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new PrivacyLevelCommand object"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParser implements Parser\u003cPrivacyLevelCommand\u003e {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the PrivacyLevelCommand"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an PrivacyLevelCommand object for execution."},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand parse(String args) throws ParseException {"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" int level \u003d ParserUtil.parseIndex(args).getOneBased();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommand(level);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException("},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, PrivacyLevelCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27}},{"path":"src/main/java/seedu/address/logic/parser/SelectCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new SelectCommand object"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class SelectCommandParser implements Parser\u003cSelectCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * and returns an SelectCommand object for execution."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public SelectCommand parse(String args) throws ParseException {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\").trim();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommandParser().parse(trimmed);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommandParser().parse(args);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/SelectPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectPersonCommand object"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParser extends SelectCommandParser {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectPersonCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectPersonCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommand(index);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SelectTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectTaskCommand object"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParser extends SelectCommandParser {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectTaskCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectTaskCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommand(index);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int LIST_ARG_POSITION \u003d 0;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 1;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 2;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 3;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e PERSON_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(0, 4);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e TASK_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(4, 6);"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution."},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Eliminate spaces"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(0))"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 TASK_FIELD_ARGS.contains(argKeywords[1]))"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(1))"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 PERSON_FIELD_ARGS.contains(argKeywords[1]))) {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_LIST_PARAMETERS.contains(argKeywords[LIST_ARG_POSITION])) {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[LIST_ARG_POSITION],"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":66}},{"path":"src/main/java/seedu/address/logic/parser/ThemeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ThemeCommand object"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParser implements Parser\u003cThemeCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ThemeCommand"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ThemeCommand object for execution."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand parse(String args) throws ParseException {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/UnlockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommandParser implements Parser\u003cUnlockCommand\u003e {"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d \"Password is required\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the UnlockCommand"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a UnlockCommand object for execution."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException("},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[0]);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[1]);"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ViewAssignCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ViewAssignCommand object"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParser implements Parser\u003cViewAssignCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand parse(String args) throws ParseException {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommand(index);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":24}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashMap;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)"},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private HashMap\u003cString, String\u003e styleMap;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"},{"lineNumber":45,"author":{"gitId":"-"},"content":" *"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * among constructors."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" styleMap \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public AddressBook() {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" initialiseStyleMap();"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}"},{"lineNumber":62,"author":{"gitId":"-"},"content":" */"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" resetData(toBeCopied);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" //// list overwrite operations"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" requireNonNull(newData);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":97,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}."},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasks.clearAssignees();"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":125,"author":{"gitId":"-"},"content":" //// person-level operations"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":128,"author":{"gitId":"-"},"content":" * Adds a person to the address book."},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,"},{"lineNumber":130,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}."},{"lineNumber":131,"author":{"gitId":"-"},"content":" *"},{"lineNumber":132,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists."},{"lineNumber":133,"author":{"gitId":"-"},"content":" */"},{"lineNumber":134,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);"},{"lineNumber":137,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":138,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":139,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":140,"author":{"gitId":"-"},"content":" persons.add(newPerson);"},{"lineNumber":141,"author":{"gitId":"-"},"content":" }"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}."},{"lineNumber":145,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}."},{"lineNumber":146,"author":{"gitId":"-"},"content":" *"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":149,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":150,"author":{"gitId":"-"},"content":" *"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)"},{"lineNumber":154,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);"},{"lineNumber":158,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":160,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":161,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":162,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" public void sortTasksBy(String field, String order) {"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" tasks.sortBy(field, order);"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the index of {@code ReadOnlyPerson} specified"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractPersonIndexes(ArrayList\u003cReadOnlyPerson\u003e personsToExtract) {"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return persons.extractIndexes(personsToExtract);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}."},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":201,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);"},{"lineNumber":202,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":203,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":204,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":205,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}."},{"lineNumber":206,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":208,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":209,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);"},{"lineNumber":210,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":211,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:"},{"lineNumber":214,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":216,"author":{"gitId":"-"},"content":" */"},{"lineNumber":217,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {"},{"lineNumber":218,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());"},{"lineNumber":219,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list"},{"lineNumber":222,"author":{"gitId":"-"},"content":" // used for checking person tag references"},{"lineNumber":223,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();"},{"lineNumber":224,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list."},{"lineNumber":227,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();"},{"lineNumber":228,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));"},{"lineNumber":229,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":235,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":236,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":237,"author":{"gitId":"-"},"content":" */"},{"lineNumber":238,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {"},{"lineNumber":239,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":244,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":245,"author":{"gitId":"-"},"content":" */"},{"lineNumber":246,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {"},{"lineNumber":247,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":249,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":250,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":251,"author":{"gitId":"-"},"content":" }"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the UniquePersonList"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" return persons.getMappings();"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":264,"author":{"gitId":"-"},"content":" //// tag-level operations"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {"},{"lineNumber":267,"author":{"gitId":"-"},"content":" tags.add(t);"},{"lineNumber":268,"author":{"gitId":"-"},"content":" }"},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" //// task-level operations"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book."},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists."},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified person from all assignment lists for every task **/"},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" public void removePersonFromAssignees(Index target) {"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" tasks.removeAssignee(target);"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" * Updates the Assignees for all tasks in the internal tasks list with their new mappings"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" public void updateTaskAssigneeMappings(Index[] mappings) {"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" tasks.updateAssignees(mappings);"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}."},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":325,"author":{"gitId":"-"},"content":" //// theme-level operations"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Initialises the style map by adding the key value pairs"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" * for the strings that will be input in ThemeCommand and the file name of the .css file"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void initialiseStyleMap() {"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"/view/DarkTheme.css\");"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"/view/DarkTheme.css\");"},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"/view/LightTheme.css\");"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"/view/LightTheme.css\");"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" return styleMap;"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":" //// util methods"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":345,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\""},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";"},{"lineNumber":348,"author":{"gitId":"-"},"content":" // TODO: refine later"},{"lineNumber":349,"author":{"gitId":"-"},"content":" }"},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":352,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":353,"author":{"gitId":"-"},"content":" return persons.asObservableList();"},{"lineNumber":354,"author":{"gitId":"-"},"content":" }"},{"lineNumber":355,"author":{"gitId":"-"},"content":""},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromPersonList(int index) {"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" return persons.asObservableList().get(index);"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":368,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":369,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":370,"author":{"gitId":"-"},"content":" return tags.asObservableList();"},{"lineNumber":371,"author":{"gitId":"-"},"content":" }"},{"lineNumber":372,"author":{"gitId":"-"},"content":""},{"lineNumber":373,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":374,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":375,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":376,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls"},{"lineNumber":377,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);"},{"lineNumber":380,"author":{"gitId":"-"},"content":" }"},{"lineNumber":381,"author":{"gitId":"-"},"content":""},{"lineNumber":382,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":383,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":384,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);"},{"lineNumber":386,"author":{"gitId":"-"},"content":" }"},{"lineNumber":387,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":25,"Esilocke":131,"wangyiming1019":17,"-":193}},{"path":"src/main/java/seedu/address/model/Location.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Location in the address book."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidLocation(String)}"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class Location {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" \"Location can take any value, and it should not be blank\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" /*"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String LOCATION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given location."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given location string is invalid."},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public Location(String location) throws IllegalValueException {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (location \u003d\u003d null) {"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidLocation(location)) {"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d location;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid location."},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidLocation(String test) {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(LOCATION_VALIDATION_REGEX);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof Location // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Location) other).value)); // state check"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The API of the Model component."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public interface Model {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */"},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" /** Deletes the given person. */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Adds the given person */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}."},{"lineNumber":64,"author":{"gitId":"-"},"content":" *"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":70,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}."},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /** Displays all persons assigned to the specified task */"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" void viewAssignees(ReadOnlyTask task);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}."},{"lineNumber":114,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":115,"author":{"gitId":"-"},"content":" */"},{"lineNumber":116,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}."},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by chosen field in ascending (asc) or descending (desc) order"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" * Sorts all tasks in task list by chosen field in ascending (asc) or descending (desc) order"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" void sortTasks(String field, String order);"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Returns lock state. True means locked. False means unlocked"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" boolean getLockState();"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" * Locks address book from model"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" void lockAddressBookFromModel();"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Unlock address book from model"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" void unlockAddressBookFromModel();"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" * Returns a copy of the UserPrefs"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" UserPrefs getUserPrefs();"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson getPersonAtIndexFromAddressBook(int index);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" void setTheme(String theme);"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" String getTheme();"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" HashMap\u003cString, String\u003e getStyleMap();"},{"lineNumber":174,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":15,"Esilocke":58,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePrivacyLevelPredicate;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPrivacyLevelPredicate;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPrivacyLevelPredicate;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.PersonCompleteMatchPredicate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data."},{"lineNumber":50,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized."},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" private final UserPrefs userPrefs;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs."},{"lineNumber":64,"author":{"gitId":"-"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.userPrefs \u003d userPrefs;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d userPrefs.getTheme();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" public ModelManager() {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":103,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":105,"author":{"gitId":"-"},"content":" }"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */"},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":113,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" persons.add(target);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d addressBook.extractPersonIndexes(persons);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" Index personIndex \u003d personIndexes.get(0);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" addressBook.removePersonFromAssignees(personIndex);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list."},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":142,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":143,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":145,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list."},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":166,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":167,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":168,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);"},{"lineNumber":172,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" Index[] updatedIndexes \u003d addressBook.getMappings();"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" System.out.println(updatedIndexes.length);"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" addressBook.updateTaskAssigneeMappings(updatedIndexes);"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks(String field, String order) {"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(field, order);"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" return userPrefs;"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public boolean getLockState() {"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return getUserPrefs().getAddressBookLockState();"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBookFromModel() {"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().lockAddressBook();"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBookFromModel() {"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().unlockAddressBook();"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes."},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag."},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" int index;"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":235,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);"},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);"},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToAssign);"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d newAssignees.assign(positions);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneAdded) {"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToAssignTo, newAssignees);"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToAssignTo, updatedTask);"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToDismiss);"},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneDismissed \u003d newAssignees.dismiss(positions);"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneDismissed) {"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToDismissFrom, newAssignees);"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToDismissFrom, updatedTask);"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();"},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d toSet.getTaskAddress();"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state, taskAddress);"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d task.getAssignees();"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e internalList \u003d assignees.getList();"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToShow \u003d new ArrayList\u003c\u003e();"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" for (Index i : internalList) {"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" assert(i.getZeroBased() \u003c filteredPersons.size());"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" personsToShow.add(filteredPersons.get(i.getZeroBased()));"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" PersonCompleteMatchPredicate assignedPredicate \u003d new PersonCompleteMatchPredicate(personsToShow);"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" updateFilteredPersonList(assignedPredicate);"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":337,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":338,"author":{"gitId":"-"},"content":""},{"lineNumber":339,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":340,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of"},{"lineNumber":341,"author":{"gitId":"-"},"content":" * {@code addressBook}"},{"lineNumber":342,"author":{"gitId":"-"},"content":" */"},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":344,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":345,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);"},{"lineNumber":346,"author":{"gitId":"-"},"content":" }"},{"lineNumber":347,"author":{"gitId":"-"},"content":""},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(predicate);"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 3) {"},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" if (predicate instanceof NameContainsKeywordsPredicate) {"},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsKeywordsPrivacyLevelPredicate((("},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPredicate) predicate).getKeywords()));"},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsTagsPredicate) {"},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsTagsPrivacyLevelPredicate((("},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsTagsPredicate) predicate).getTags()));"},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsFavouritePredicate) {"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsFavouritePrivacyLevelPredicate());"},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate \u003d\u003d PREDICATE_SHOW_ALL_PERSONS) {"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());"},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":386,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":387,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {"},{"lineNumber":388,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":389,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {"},{"lineNumber":390,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":391,"author":{"gitId":"-"},"content":" }"},{"lineNumber":392,"author":{"gitId":"-"},"content":""},{"lineNumber":393,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":394,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {"},{"lineNumber":395,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":396,"author":{"gitId":"-"},"content":" }"},{"lineNumber":397,"author":{"gitId":"-"},"content":""},{"lineNumber":398,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":399,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;"},{"lineNumber":400,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)"},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);"},{"lineNumber":403,"author":{"gitId":"-"},"content":" }"},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Utility methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" * Constructs a new {@code ReadOnlyTask} from an existing ReadOnlyTask, with the specified assignees list."},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyTask constructTaskWithNewAssignee(ReadOnlyTask originalTask, Assignees updatedAssignees) {"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d originalTask.getTaskName();"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" Description description \u003d originalTask.getDescription();"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d originalTask.getDeadline();"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d originalTask.getPriority();"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d originalTask.getCompleteState();"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d originalTask.getTaskAddress();"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, updatedAssignees,"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" state, taskAddress);"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" return updatedTask;"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":424,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":425,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":426,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":427,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c 1 || level \u003e 3) {"},{"lineNumber":428,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy Level can only be 0, 1 or 2\");"},{"lineNumber":429,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":430,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":431,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":432,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":434,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":435,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":436,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":437,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":438,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":439,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {"},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getPersonAtIndexFromPersonList(index);"},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {"},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;"},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" userPrefs.setTheme(theme);"},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" return theme;"},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {"},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getStyleMap();"},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":461,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":72,"Esilocke":186,"wangyiming1019":58,"-":110}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list."},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String addressBookFilePath \u003d \"data/addressbook.xml\";"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private String addressBookName \u003d \"My Address++\";"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private boolean addressBookLockState \u003d false;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private String addressBookEncryptedPassword \u003d Hashing.sha256()"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" .hashString(\"password\", StandardCharsets.UTF_8).toString();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" public UserPrefs() {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" this.setGuiSettings(1080, 720, 0, 0);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return addressBookFilePath;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" public String getAddressBookName() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" return addressBookName;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public String getAddressBookEncryptedPassword() {"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" return addressBookEncryptedPassword;"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void setAddressBookEncryptedPassword(String addressBookPasswordInput) {"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" this.addressBookEncryptedPassword \u003d Hashing.sha256()"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" .hashString(addressBookPasswordInput, StandardCharsets.UTF_8).toString();"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBook() {"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d true;"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBook() {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d false;"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean getAddressBookLockState() {"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return this.addressBookLockState;"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well."},{"lineNumber":82,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)"},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookEncryptedPassword, o.addressBookEncryptedPassword)"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":100,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());"},{"lineNumber":103,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nPassword : \" + addressBookEncryptedPassword);"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));"},{"lineNumber":107,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (theme \u003d\u003d null) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return \"/view/DarkTheme.css\";"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return theme;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":12,"-":74}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given address."},{"lineNumber":27,"author":{"gitId":"-"},"content":" *"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address) throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.value \u003d address;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this(address);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid person address."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s avatar filepath in the address book."},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"public class Avatar {"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" \"Person avatar can take any values, and it should not be blank\";"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" * Validates given address."},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public Avatar(String address) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d AVATAR_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" if (!isValidAvatar(address)) {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d address;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidAvatar(String test) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return test.matches(AVATAR_VALIDATION_REGEX) || test.equals(AVATAR_PLACEHOLDER_VALUE);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Avatar // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":57,"jeffreygohkw":6}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given email."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email) throws IllegalValueException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this(email);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":42,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Validates given name."},{"lineNumber":28,"author":{"gitId":"-"},"content":" *"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name) throws IllegalValueException {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d trimmedName;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(name);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":71,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Name) other).value)); // state check"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":47,"-":48}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured and has no private fields"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsFavouritePrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsFavouritePrivacyLevelPredicate() {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return (person.getFavourite() \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsFavouritePrivacyLevelPredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given."},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameContainsKeywordsPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public NameContainsKeywordsPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" this.keywords \u003d keywords;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" }"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" return keywords.stream()"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword));"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getKeywords() {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" return keywords;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":33,"author":{"gitId":"-"},"content":" || (other instanceof NameContainsKeywordsPredicate // instanceof handles nulls"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPredicate) other).keywords)); // state check"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":7,"-":30}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" * and has no private fields"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsKeywordsPrivacyLevelPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.keywords \u003d keywords;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return (keywords.stream()"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword))"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsKeywordsPrivacyLevelPredicate // instanceof handles nulls"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPrivacyLevelPredicate) other).keywords)); //state check"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/\")) {"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(1));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getTags() {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return tags;"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":6,"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags and hasno private fields."},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsTagsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e tags;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsTagsPrivacyLevelPredicate(List\u003cString\u003e tags) {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.tags \u003d tags;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" String allTagString \u003d convertTagToString(person);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (isOnlyUnwantedTags) {"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" return (!(unwantedTag.stream()"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))))"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" return (wantedTag.stream()"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !(unwantedTag.stream()"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))))"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" * check only unwanted tag list has elements"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" * @return a boolean value"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e unwantedTag) {"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" for (String everyTag : tags) {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (!everyTag.startsWith(\"/\")) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" wantedTag.add(everyTag);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" unwantedTag.add(everyTag.substring(1));"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * Convert a set of tags to Strings"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : personTags) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(\" \");"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return allTagNames.toString().trim();"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":86}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cAvatar\u003e avatar;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Every field must be present and not null."},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Boolean favourite, Remark remark, Avatar avatar, Set\u003cTag\u003e tags) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" this.avatar \u003d new SimpleObjectProperty\u003c\u003e(avatar);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" source.getRemark(), source.getAvatar(), source.getTags());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return name;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public Name getName() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return name.get();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return phone;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public Phone getPhone() {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" return phone.get();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return email;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public Email getEmail() {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" return email.get();"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" return address;"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public Address getAddress() {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return address.get();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return favourite;"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" return remark.get();"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void setAvatar(Avatar avatar) {"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" this.avatar.set(requireNonNull(avatar));"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cAvatar\u003e avatarProperty() {"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" return avatar;"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" public Avatar getAvatar() {"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" return avatar.get();"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":155,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}"},{"lineNumber":157,"author":{"gitId":"-"},"content":" * if modification is attempted."},{"lineNumber":158,"author":{"gitId":"-"},"content":" */"},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" }"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":166,"author":{"gitId":"-"},"content":" }"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set."},{"lineNumber":170,"author":{"gitId":"-"},"content":" */"},{"lineNumber":171,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":176,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":177,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":178,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls"},{"lineNumber":179,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":183,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":184,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags, avatar);"},{"lineNumber":186,"author":{"gitId":"-"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" return getAsText();"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.getName().setPrivacyLevel(level);"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" this.getPhone().setPrivacyLevel(level);"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" this.getEmail().setPrivacyLevel(level);"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" this.getAddress().setPrivacyLevel(level);"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" this.getRemark().setPrivacyLevel(level);"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if the Person has at least one private field and false otherwise"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" public boolean hasPrivateField() {"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return (this.getName().getIsPrivate() || this.getPhone().getIsPrivate() || this.getAddress().getIsPrivate()"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" || this.getEmail().getIsPrivate() || this.getRemark().getIsPrivate());"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":37,"jeffreygohkw":25,"wangyiming1019":20,"-":134}},{"path":"src/main/java/seedu/address/model/person/PersonCompleteMatchPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s matches any one of the keywords"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class PersonCompleteMatchPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" private final List\u003cReadOnlyPerson\u003e keywords;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public PersonCompleteMatchPredicate(List\u003cReadOnlyPerson\u003e keywords) {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return keywords.stream()"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" .anyMatch(person::equals);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || (other instanceof PersonCompleteMatchPredicate // instanceof handles nulls"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((PersonCompleteMatchPredicate) other).keywords)); // state check"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Validates given phone number."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone) throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number."},{"lineNumber":47,"author":{"gitId":"-"},"content":" */"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":69,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls"},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook."},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();"},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();"},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cAvatar\u003e avatarProperty();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" Avatar getAvatar();"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" boolean hasPrivateField();"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":42,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark())"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getAvatar().equals(this.getAvatar());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details."},{"lineNumber":54,"author":{"gitId":"-"},"content":" */"},{"lineNumber":55,"author":{"gitId":"-"},"content":" default String getAsText() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" builder.append(getName())"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Phone: \")"},{"lineNumber":59,"author":{"gitId":"-"},"content":" .append(getPhone())"},{"lineNumber":60,"author":{"gitId":"-"},"content":" .append(\" Email: \")"},{"lineNumber":61,"author":{"gitId":"-"},"content":" .append(getEmail())"},{"lineNumber":62,"author":{"gitId":"-"},"content":" .append(\" Address: \")"},{"lineNumber":63,"author":{"gitId":"-"},"content":" .append(getAddress())"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" .append(\" Avatar: \")"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" .append(getAvatar())"},{"lineNumber":68,"author":{"gitId":"-"},"content":" .append(\" Tags: \");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" return builder.toString();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book."},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark."},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid."},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this(remark);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Remark\u003e\";"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":66,"jeffreygohkw":29}},{"path":"src/main/java/seedu/address/model/person/ShowAllPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured after taking into account privacy level."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class ShowAllPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public ShowAllPrivacyLevelPredicate() {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return !person.hasPrivateField();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ShowAllPrivacyLevelPredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Iterator;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations."},{"lineNumber":25,"author":{"gitId":"-"},"content":" *"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cPerson\u003e internalCopy \u003d FXCollections.observableArrayList();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" // used by asObservableList()"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public boolean contains(ReadOnlyPerson toCheck) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Adds a person to the list."},{"lineNumber":46,"author":{"gitId":"-"},"content":" *"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" internalList.add(new Person(toAdd));"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}."},{"lineNumber":59,"author":{"gitId":"-"},"content":" *"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list."},{"lineNumber":61,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":62,"author":{"gitId":"-"},"content":" */"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" internalList.set(index, new Person(editedPerson));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list."},{"lineNumber":81,"author":{"gitId":"-"},"content":" *"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":83,"author":{"gitId":"-"},"content":" */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list."},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list."},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));"},{"lineNumber":131,"author":{"gitId":"-"},"content":" }"},{"lineNumber":132,"author":{"gitId":"-"},"content":" setPersons(replacement);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" }"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":136,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":137,"author":{"gitId":"-"},"content":" */"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the {@code ReadOnlyPerson} specified"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractIndexes(ArrayList\u003cReadOnlyPerson\u003e persons) {"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : persons) {"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" int position \u003d internalList.indexOf(p);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromZeroBased(position));"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return indexes;"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the internalList before sorting"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index[] mappings \u003d new Index[internalCopy.size()];"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" int count \u003d 0;"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" for (Person p : internalCopy) {"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(p);"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" mappings[count] \u003d Index.fromZeroBased(index);"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" count++;"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" return mappings;"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalList.size());"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" internalCopy.clear();"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" for (Person p : internalList) {"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" internalCopy.add(p);"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalCopy.size());"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" switch (field) {"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" case \"name\":"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;"},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" case \"email\":"},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" case \"address\":"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;"},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" switch (order) {"},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":"},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":258,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":259,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {"},{"lineNumber":260,"author":{"gitId":"-"},"content":" return internalList.iterator();"},{"lineNumber":261,"author":{"gitId":"-"},"content":" }"},{"lineNumber":262,"author":{"gitId":"-"},"content":""},{"lineNumber":263,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":264,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":265,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":266,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls"},{"lineNumber":267,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));"},{"lineNumber":268,"author":{"gitId":"-"},"content":" }"},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":271,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":272,"author":{"gitId":"-"},"content":" return internalList.hashCode();"},{"lineNumber":273,"author":{"gitId":"-"},"content":" }"},{"lineNumber":274,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":89,"Esilocke":35,"wangyiming1019":31,"-":119}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name."},{"lineNumber":20,"author":{"gitId":"-"},"content":" *"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing."},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Assignees {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e assignedList;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public Assignees(ArrayList\u003cIndex\u003e assignees) {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public Assignees() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public Assignees(Assignees toCopy) {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(toCopy.getList());"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean assign(ArrayList\u003cIndex\u003e personsToAssign) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d false;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" for (Index i : personsToAssign) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!assignedList.contains(i)) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assignedList.add(i);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" atLeastOneAdded \u003d true;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return atLeastOneAdded;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /** Updates the internal assignedList with the correct Index values after a sort operation */"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void updateList(Index[] mappings) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e updatedList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" for (Index i : assignedList) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Index updatedPosition \u003d mappings[i.getZeroBased()];"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" updatedList.add(updatedPosition);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedList.clear();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(updatedList);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list, and returns true if at least 1 person was removed */"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public boolean dismiss(ArrayList\u003cIndex\u003e personsToDismiss) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return assignedList.removeAll(personsToDismiss);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e getList() {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this.assignedList;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Deletes the specified index from the internal list, and decrements all other indexes in the assigned list"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * that have a value lower than the deleted index by 1."},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void decrementIndex(Index deletedIndex) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(deletedIndex);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c assignedList.size(); i++) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index current \u003d assignedList.get(i);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (current.getZeroBased() \u003e deletedIndex.getZeroBased()) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" int indexValue \u003d current.getZeroBased() - 1;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index decrementedIndex \u003d Index.fromZeroBased(indexValue);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assignedList.set(i, decrementedIndex);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return assignedList.hashCode();"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":90}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Date;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.DateGroup;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.Parser;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class Deadline {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_DATE \u003d"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" \"The specified date is invalid.\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public final Date date;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null || deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.date \u003d null;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" this.date \u003d setDateFromArgs(deadline);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d date.toString();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" setDateFromArgs(test);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Returns a Date object that represents the given date string."},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static Date setDateFromArgs(String date) throws IllegalValueException {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Parser deadlineParser \u003d new Parser();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cDateGroup\u003e groups \u003d deadlineParser.parse(date);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cDate\u003e dates \u003d null;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" for (DateGroup group : groups) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" dates \u003d group.getDates();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (dates \u003d\u003d null) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_INVALID_DATE);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return dates.get(0);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":86}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description."},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Priority {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String[] PRIORITY_TEXT_STRINGS \u003d {\"\", \"Lowest\", \"Low\", \"Medium\", \"High\", \"Highest\"};"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 0;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final int value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given priority."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null || priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d 0;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d Integer.parseInt(trimmedPriority);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return PRIORITY_TEXT_STRINGS[value];"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value \u003d\u003d ((Priority) other).value); // state check"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":75}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" TaskAddress getTaskAddress();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskAddress\u003e taskAddressProperty();"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e changeStateProperty();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" void changeState();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .append(\" Address: \")"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .append(getTaskAddress())"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .append(\" \")"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return builder.toString();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState()"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskAddress().equals(this.getTaskAddress());"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskAddress\u003e taskAddress;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete, TaskAddress taskAddress) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * by default."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState(), task.getTaskAddress());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return taskName.get();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return description.get();"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return deadline.get();"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return priority.get();"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return assignees.get();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return state.get();"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public TaskAddress getTaskAddress() {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return taskAddress.get();"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return getAsText();"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" return description;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return deadline;"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return priority;"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return assignees;"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskAddress\u003e taskAddressProperty() {"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" return taskAddress;"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e changeStateProperty() {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d getCompleteState();"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (state) {"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as incomplete\");"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as complete\");"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" public void changeState() {"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" this.setState(!this.getCompleteState());"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" this.taskAddress.set(taskAddress);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String printableState;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" return printableState;"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":200}},{"path":"src/main/java/seedu/address/model/task/TaskAddress.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Task\u0027s address in the address book."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidTaskAddress(String)}"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class TaskAddress {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" \"Task addresses can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /*"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public final String taskAddress;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given address."},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public TaskAddress(String address) throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d ADDRESS_PLACEHOLDER_VALUE;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidTaskAddress(address)) {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_TASK_ADDRESS_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d address;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid task address."},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidTaskAddress(String test) {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof TaskAddress // instanceof handles nulls"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.taskAddress.equals(((TaskAddress) other).taskAddress)); // state check"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress.hashCode();"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByState;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByPriority;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private boolean isComplete;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private int basePriority;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords, boolean isStateCheckRequired,"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityCheckRequired, boolean isComplete, int basePriority) {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d isPriorityCheckRequired;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d isStateCheckRequired;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d isComplete;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d basePriority;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d false;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d false;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d false;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d 0;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" for (String keyword : keywords) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (needFilterByState \u0026\u0026 task.getCompleteState() !\u003d isComplete) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } else if (needFilterByPriority \u0026\u0026 task.getPriority().value \u003c basePriority) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } else if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByPriority \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByPriority"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByState \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByState"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isComplete \u003d\u003d ((TaskContainsKeywordPredicate) other).isComplete"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.basePriority \u003d\u003d ((TaskContainsKeywordPredicate) other).basePriority); // state check"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class TaskName {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public final String taskName;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Validates given name."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument."},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}."},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list."},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list."},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" * Removes all assignees from all tasks."},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" t.clearAssignees();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified assignee from all tasks **/"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void removeAssignee(Index personIndex) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" updated.decrementIndex(personIndex);"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" internalList.clear();"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" * Updates the assignee list within each task to match that of the newPersonIndexes."},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * This method is called after a sort persons operation due to the order change"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public void updateAssignees(Index[] newPersonIndexes) {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" updated.updateList(newPersonIndexes);"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" internalList.clear();"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * Sorts person list by all persons by any field in ascending or descending order"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e comparator \u003d null;"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e priorityComparator \u003d Comparator.comparingInt(o -\u003e o.getPriority().value);"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e deadlineComparator \u003d (o1, o2) -\u003e {"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" if (o1.getDeadline().date \u003d\u003d null || o2.getDeadline().date \u003d\u003d null) {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return 0;"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" switch (field) {"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" case \"priority\":"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d priorityComparator;"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" case \"deadline\":"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d deadlineComparator;"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" switch (order) {"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":60,"Esilocke":179}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task."},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class SampleDataUtil {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" return new Person[] {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"), new Avatar(\"\"),"},{"lineNumber":29,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),"},{"lineNumber":30,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"), new Avatar(\"\"),"},{"lineNumber":33,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),"},{"lineNumber":34,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"), new Avatar(\"\"),"},{"lineNumber":37,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),"},{"lineNumber":38,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"), new Avatar(\"\"),"},{"lineNumber":41,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),"},{"lineNumber":42,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"), new Avatar(\"\"),"},{"lineNumber":45,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),"},{"lineNumber":46,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"), new Avatar(\"\"),"},{"lineNumber":49,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))"},{"lineNumber":50,"author":{"gitId":"-"},"content":" };"},{"lineNumber":51,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return sampleAb;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given."},{"lineNumber":70,"author":{"gitId":"-"},"content":" */"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" for (String s : strings) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}."},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found."},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format."},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage."},{"lineNumber":35,"author":{"gitId":"-"},"content":" * @param addressBook cannot be null."},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem writing to the file."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" void changeFilePath(String fp, UserPrefs u);"},{"lineNumber":46,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":2,"-":43}},{"path":"src/main/java/seedu/address/storage/Storage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * API of the Storage component"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public interface Storage extends AddressBookStorage, UserPrefsStorage {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"-"},"content":" void saveUserPrefs(UserPrefs userPrefs) throws IOException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location. Subscribes to BackupRequestEvent"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" void handleBackupAddressBook(BackupRequestEvent event) throws IOException;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Saves the current version of the Address Book to the hard disk."},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Creates the data file if it is missing."},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Raises {@link DataSavingExceptionEvent} if there was an error during saving."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" void handleAddressBookChangedEvent(AddressBookChangedEvent abce);"},{"lineNumber":46,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"-":38}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" @Subscribe"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" public void handleBackupAddressBook(BackupRequestEvent event) throws IOException {"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyAddressBook addressBook \u003d event.getModel().getAddressBook();"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" String args \u003d event.getArgs();"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, args);"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));"},{"lineNumber":97,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":11,"jeffreygohkw":8,"-":91}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedIndex.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlValue;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * JAXB-friendly adapted version of the Index."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedIndex {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" @XmlValue"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private int index;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedIndex."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex() {}"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Converts a given Index into this class for JAXB use."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex(Index source) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d source.getZeroBased();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted tag object into an Index object."},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints\\"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public Index toModelType() throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return Index.fromZeroBased(index);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private String name;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":29,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private String phone;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private String email;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String address;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" private String remark;"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private String avatar;"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson."},{"lineNumber":55,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use."},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().value;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d source.getAvatar().value;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().getIsPrivate();"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().getIsPrivate();"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().getIsPrivate();"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().getIsPrivate();"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().getIsPrivate();"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object."},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tags);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":71,"wangyiming1019":3,"-":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private String name;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private String description;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private String deadline;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private String priority;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String state;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @XmlElement"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedIndex\u003e assignees \u003d new ArrayList\u003c\u003e();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private String address;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use."},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.toString(source.getPriority().value);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" address \u003d source.getTaskAddress().taskAddress;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assignees \u003d new ArrayList\u003c\u003e();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (Index i : source.getAssignees().getList()) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assignees.add(new XmlAdaptedIndex(i));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object."},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" final TaskAddress address \u003d new TaskAddress(this.address);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cIndex\u003e assigneeIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" for (XmlAdaptedIndex index : assignees) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assigneeIndexes.add(index.toModelType());"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" final Assignees assignees \u003d new Assignees(assigneeIndexes);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, assignees, state, address);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format."},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,"},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);"},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a custom save file name"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.info(filePath);"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":12,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook."},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":19,"-":73}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_PREFIX \u003d \"https://www.google.com.sg/maps/dir/?api\u003d1\";"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_SUFFIX \u003d \"/\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private WebView browser;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public BrowserPanel() {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page."},{"lineNumber":50,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" loadDefaultPage();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().value.replaceAll(\" \", \"+\")"},{"lineNumber":66,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s address if their address is not private"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Loads Google Maps with directions on how to go from one location to another"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * @param fromLocation The location we want to start from"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * @param toLocation The location we want to reach"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDirectionsPage(String fromLocation, String toLocation) {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":101,"author":{"gitId":"-"},"content":" public void loadPage(String url) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"-"},"content":" * Loads a default HTML file with a background that matches the general theme."},{"lineNumber":107,"author":{"gitId":"-"},"content":" */"},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void loadDefaultPage() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" loadPage(defaultPage.toExternalForm());"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Frees resources allocated to the browser."},{"lineNumber":115,"author":{"gitId":"-"},"content":" */"},{"lineNumber":116,"author":{"gitId":"-"},"content":" public void freeResources() {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" browser \u003d null;"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" loadDirectionsPage(event.getFromLocation().toString(), event.getToLocation().toString());"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":68,"Esilocke":1,"-":65}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";"},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Stage primaryStage;"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container"},{"lineNumber":64,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private ViewTaskPanel viewTaskPanel;"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private ViewPersonPanel viewPersonPanel;"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":73,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":76,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":100,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":106,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":109,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" // Set dependencies"},{"lineNumber":116,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;"},{"lineNumber":117,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":118,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" // Configure the UI"},{"lineNumber":122,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());"},{"lineNumber":123,"author":{"gitId":"-"},"content":" setIcon(ICON);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" setWindowMinSize();"},{"lineNumber":125,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" setWindowDefaultTheme(prefs);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());"},{"lineNumber":128,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" setAccelerators();"},{"lineNumber":131,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" return primaryStage;"},{"lineNumber":136,"author":{"gitId":"-"},"content":" }"},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem."},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator"},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":157,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK."},{"lineNumber":160,"author":{"gitId":"-"},"content":" *"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will"},{"lineNumber":162,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and"},{"lineNumber":163,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by"},{"lineNumber":165,"author":{"gitId":"-"},"content":" * the TextInputControl(s)."},{"lineNumber":166,"author":{"gitId":"-"},"content":" *"},{"lineNumber":167,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open"},{"lineNumber":168,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay."},{"lineNumber":170,"author":{"gitId":"-"},"content":" */"},{"lineNumber":171,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" event.consume();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":" });"},{"lineNumber":177,"author":{"gitId":"-"},"content":" }"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself."},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window."},{"lineNumber":208,"author":{"gitId":"-"},"content":" */"},{"lineNumber":209,"author":{"gitId":"-"},"content":" void fillInnerParts() {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" browserPanel \u003d new BrowserPanel();"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" viewTaskPanel \u003d new ViewTaskPanel();"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" viewPersonPanel \u003d new ViewPersonPanel();"},{"lineNumber":213,"author":{"gitId":"-"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());"},{"lineNumber":216,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();"},{"lineNumber":222,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());"},{"lineNumber":226,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);"},{"lineNumber":229,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" void hide() {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" primaryStage.hide();"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }"},{"lineNumber":235,"author":{"gitId":"-"},"content":""},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);"},{"lineNumber":238,"author":{"gitId":"-"},"content":" }"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Sets the given image as the icon of the main window."},{"lineNumber":242,"author":{"gitId":"-"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}"},{"lineNumber":243,"author":{"gitId":"-"},"content":" */"},{"lineNumber":244,"author":{"gitId":"-"},"content":" private void setIcon(String iconSource) {"},{"lineNumber":245,"author":{"gitId":"-"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":249,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences."},{"lineNumber":250,"author":{"gitId":"-"},"content":" */"},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {"},{"lineNumber":252,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());"},{"lineNumber":253,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());"},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());"},{"lineNumber":256,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default theme based on user preferences."},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultTheme(UserPrefs prefs) {"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(prefs.getTheme());"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":267,"author":{"gitId":"-"},"content":" private void setWindowMinSize() {"},{"lineNumber":268,"author":{"gitId":"-"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);"},{"lineNumber":269,"author":{"gitId":"-"},"content":" primaryStage.setMinWidth(MIN_WIDTH);"},{"lineNumber":270,"author":{"gitId":"-"},"content":" }"},{"lineNumber":271,"author":{"gitId":"-"},"content":""},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" return getRoot().getStylesheets().get(1);"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":276,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":277,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window."},{"lineNumber":278,"author":{"gitId":"-"},"content":" */"},{"lineNumber":279,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {"},{"lineNumber":280,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),"},{"lineNumber":281,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());"},{"lineNumber":282,"author":{"gitId":"-"},"content":" }"},{"lineNumber":283,"author":{"gitId":"-"},"content":""},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command for menu item"},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {"},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command for menu item"},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":298,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {"},{"lineNumber":299,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling decrease in font size\");"},{"lineNumber":300,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));"},{"lineNumber":301,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":302,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":304,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command"},{"lineNumber":305,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":306,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":307,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {"},{"lineNumber":308,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling reset in font size\");"},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));"},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":311,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":312,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":313,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":314,"author":{"gitId":"-"},"content":" * Opens the help window."},{"lineNumber":315,"author":{"gitId":"-"},"content":" */"},{"lineNumber":316,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":317,"author":{"gitId":"-"},"content":" public void handleHelp() {"},{"lineNumber":318,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();"},{"lineNumber":319,"author":{"gitId":"-"},"content":" helpWindow.show();"},{"lineNumber":320,"author":{"gitId":"-"},"content":" }"},{"lineNumber":321,"author":{"gitId":"-"},"content":""},{"lineNumber":322,"author":{"gitId":"-"},"content":" void show() {"},{"lineNumber":323,"author":{"gitId":"-"},"content":" primaryStage.show();"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpenRequestEvent(OpenRequestEvent event) throws IOException, DataConversionException {"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" handleOpen();"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {"},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog"},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension"},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {"},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");"},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);"},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAsRequestEvent(SaveAsRequestEvent event) throws IOException, DataConversionException {"},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" handleSaveAs();"},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the existing theme to the input theme"},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" public void handleChangeTheme(String theme) {"},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {"},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);"},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":397,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(theme);"},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":399,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":""},{"lineNumber":401,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":402,"author":{"gitId":"-"},"content":" private void handleExit() {"},{"lineNumber":403,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());"},{"lineNumber":404,"author":{"gitId":"-"},"content":" }"},{"lineNumber":405,"author":{"gitId":"-"},"content":""},{"lineNumber":406,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {"},{"lineNumber":407,"author":{"gitId":"-"},"content":" return this.personListPanel;"},{"lineNumber":408,"author":{"gitId":"-"},"content":" }"},{"lineNumber":409,"author":{"gitId":"-"},"content":""},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":414,"author":{"gitId":"-"},"content":" void releaseResources() {"},{"lineNumber":415,"author":{"gitId":"-"},"content":" browserPanel.freeResources();"},{"lineNumber":416,"author":{"gitId":"-"},"content":" }"},{"lineNumber":417,"author":{"gitId":"-"},"content":""},{"lineNumber":418,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":419,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {"},{"lineNumber":420,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":421,"author":{"gitId":"-"},"content":" handleHelp();"},{"lineNumber":422,"author":{"gitId":"-"},"content":" }"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewTaskPanel.getRoot());"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewPersonPanel.getRoot());"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" private void handleChangeThemeEvent(ChangeThemeRequestEvent event) {"},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" handleChangeTheme(event.getStyleSheet());"},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":461,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":172,"Esilocke":35,"-":212}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.ImageView;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later."},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":40,"author":{"gitId":"-"},"content":" *"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" initTags(person);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" initFavourite(person);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));"},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" });"},{"lineNumber":89,"author":{"gitId":"-"},"content":" person.favouriteProperty().addListener((observable, oldValue, newValue) -\u003e initFavourite(person));"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * display the heart for favourite person"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private void initFavourite(ReadOnlyPerson person) {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" boolean favouriteStatus \u003d person.getFavourite();"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Label favouriteLabel \u003d new Label();"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" Image starFilled \u003d new Image(getClass().getResource(\"/images/heart.png\").toExternalForm());"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" if (favouriteStatus) {"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setGraphic(new ImageView(starFilled));"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setStyle(\"-fx-background-color: transparent; -fx-border-color: transparent\");"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" cardPane.getChildren().add(favouriteLabel);"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @param tag"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" * @return"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" * @param person"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" });"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":155,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":157,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":158,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":162,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":164,"author":{"gitId":"-"},"content":" }"},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":167,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;"},{"lineNumber":168,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":169,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);"},{"lineNumber":170,"author":{"gitId":"-"},"content":" }"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" return name;"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" return phone;"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" return address;"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" return email;"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" //author"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":67,"Esilocke":2,"wangyiming1019":52,"-":84}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Panel containing the list of persons."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" setConnections(personList);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));"},{"lineNumber":51,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":61,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":" });"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier + 1);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier - 1);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // Set new font size"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New person font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for person cards"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * @param event"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" @Subscribe"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" private void handlePersonCardChangeFontSizeEvent (ChangeFontSizeEvent event) {"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" case 0:"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" case 1:"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" case 2:"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it."},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":148,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);"},{"lineNumber":149,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":150,"author":{"gitId":"-"},"content":" });"},{"lineNumber":151,"author":{"gitId":"-"},"content":" }"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" * Listens for change of font size events"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" * @param event"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":158,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":160,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}."},{"lineNumber":183,"author":{"gitId":"-"},"content":" */"},{"lineNumber":184,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {"},{"lineNumber":185,"author":{"gitId":"-"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);"},{"lineNumber":189,"author":{"gitId":"-"},"content":""},{"lineNumber":190,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {"},{"lineNumber":191,"author":{"gitId":"-"},"content":" setGraphic(null);"},{"lineNumber":192,"author":{"gitId":"-"},"content":" setText(null);"},{"lineNumber":193,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }"},{"lineNumber":196,"author":{"gitId":"-"},"content":" }"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":92,"jeffreygohkw":7,"Esilocke":14,"-":86}},{"path":"src/main/java/seedu/address/ui/StatusBarFooter.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.time.Clock;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.controlsfx.control.StatusBar;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A ui for the status bar that is displayed at the footer of the application."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class StatusBarFooter extends UiPart\u003cRegion\u003e {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_INITIAL \u003d \"Not updated yet in this session\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_UPDATED \u003d \"Last Updated: %s\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Used to generate time stamps."},{"lineNumber":26,"author":{"gitId":"-"},"content":" *"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * TODO: change clock to an instance variable."},{"lineNumber":28,"author":{"gitId":"-"},"content":" * We leave it as a static variable because manual dependency injection"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * will require passing down the clock reference all the way from MainApp,"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * but it should be easier once we have factories/DI frameworks."},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static Clock clock \u003d Clock.systemDefaultZone();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StatusBarFooter.class);"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"StatusBarFooter.fxml\";"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private StatusBar syncStatus;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private StatusBar totalPersons;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private StatusBar saveLocationStatus;"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public StatusBarFooter(String saveLocation, int initialTotalPersons) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" setSyncStatus(SYNC_STATUS_INITIAL);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" setSaveLocation(\"./\" + saveLocation);"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" setTotalPersons(initialTotalPersons);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the clock used to determine the current time."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static void setClock(Clock clock) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" StatusBarFooter.clock \u003d clock;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Returns the clock currently in use."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static Clock getClock() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return clock;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void setSaveLocation(String location) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.saveLocationStatus.setText(location));"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" private void setSyncStatus(String status) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.syncStatus.setText(status));"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent abce) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" long now \u003d clock.millis();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" String lastUpdated \u003d new Date(now).toString();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(abce, \"Setting last updated status to \" + lastUpdated));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" setSyncStatus(String.format(SYNC_STATUS_UPDATED, lastUpdated));"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" this.setTotalPersons(abce.data.getPersonList().size());"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" private void setTotalPersons(int totalPersons) {"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.totalPersons.setText(totalPersons + \" person(s) listed\");"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":9,"-":79}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private Label taskAddress;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" taskAddress.textProperty().bind(Bindings.convert(task.taskAddressProperty()));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" taskAddress.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" assignCount.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" state.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof TaskCard)) {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" TaskCard card \u003d (TaskCard) other;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 task.equals(card.task);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return taskName;"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return description;"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return deadline;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" return priority;"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public Label getTaskAddress() {"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":47,"jeffreygohkw":4,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map("},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier + 1);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier - 1);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set new font size"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New task font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for task cards"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" * @param event"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" @Subscribe"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" private void handleTaskCardChangeFontSizeEvent (ChangeFontSizeEvent event) {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" case 0:"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" case 1:"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" case 2:"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it."},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestTaskEvent(JumpToListRequestTaskEvent event) {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in task list view\");"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}."},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" setText(null);"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":1,"Esilocke":114}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component"},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */"},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */"},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private static UserPrefs prefs;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");"},{"lineNumber":51,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" //Set the application icon."},{"lineNumber":54,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts"},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (Throwable e) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" prefs.setTheme(mainWindow.getTheme());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" mainWindow.hide();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters."},{"lineNumber":94,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog."},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,"},{"lineNumber":97,"author":{"gitId":"-"},"content":" String contentText) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" alert.getDialogPane().getStylesheets().add(String.format(\"view/\", prefs.getTheme()));"},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.initOwner(owner);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setTitle(title);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);"},{"lineNumber":105,"author":{"gitId":"-"},"content":" alert.showAndWait();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},"},{"lineNumber":110,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog."},{"lineNumber":111,"author":{"gitId":"-"},"content":" */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());"},{"lineNumber":115,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":116,"author":{"gitId":"-"},"content":" System.exit(1);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":122,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":124,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,"},{"lineNumber":125,"author":{"gitId":"-"},"content":" event.exception);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"-":118}},{"path":"src/main/java/seedu/address/ui/ViewPersonPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.HashMap;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.Random;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.Image;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.ImageView;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.VBox;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Contains the details of a person."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewPersonPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewPersonPanel.fxml\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" * Preset values for random selection later."},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private enum Colours {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private static Random randomNumber \u003d new Random();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyPerson person;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private VBox personPanel;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private Label name;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private Label phone;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" private Label address;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private Label remark;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private ImageView avatarImage;"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Label email;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel(ReadOnlyPerson person, int fontSizeMultiplier) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" this.person \u003d person;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" initializeAvatar();"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel() {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private void initializeWithPerson(ReadOnlyPerson person) {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" //author charlesgoh"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" * Sets avatar to a URL or filepath and falls back to the placeholder avatar if specified path fits in"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * neither categories"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" private void initializeAvatar() {"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String avatarPath \u003d person.getAvatar().value;"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to set avatar to image at specified URL or filepath\");"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" Image newImage \u003d new Image(avatarPath);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(newImage);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException ex) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" logger.warning(\"Saved path is not a valid filepath or URL path. Setting avatar to placeholder\");"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" Image imagePlaceholder \u003d new Image(\"file:docs/images/Avatar.png\");"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(imagePlaceholder);"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof ViewPersonPanel)) {"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" ViewPersonPanel card \u003d (ViewPersonPanel) other;"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" return person.equals(card.person);"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" public Label getName() {"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return name;"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public Label getPhone() {"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return phone;"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" public Label getAddress() {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" return address;"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public Label getRemark() {"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" return remark;"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public Label getEmail() {"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" return email;"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.person \u003d event.getNewSelection().person;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":28,"Esilocke":155}},{"path":"src/main/java/seedu/address/ui/ViewTaskPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Contains details of a Task."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class ViewTaskPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewTaskPanel.fxml\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Label taskName;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Label description;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Label deadline;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Label priority;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Label state;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyTask task;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel(ReadOnlyTask task) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (task !\u003d null) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(task);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel() {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private void initializeWithTask(ReadOnlyTask task) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(event.getNewSelection().task);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":67}},{"path":"src/test/data/ManualTesting/[W09-B2][Address++]TestScript.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++ - Test Script"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":":experimental:"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github[]"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":":tip-caption: :bulb:"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":":note-caption: :information_source:"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Getting Started"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"Ensure that you have the [W09-B2][Address++].jar file and the [W09-B2][Address++]SampleData.xml available on your computer and a working internet connection."},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Importing the test data"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":". Launch [W09-B2][Address++].jar."},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":". On initial launch, it should contain sample data of 6 different persons and 0 tasks."},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":". Type `open` to open a pop up window."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":". Navigate to the location of the [W09-B2][Address++]SampleData.xml file and click Open to open it."},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":". The sample data containing 20 different persons and 7 different tasks should be loaded."},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":". You are now ready to begin testing."},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d User Interface"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"* The Menu on the top of the screen contains 3 buttons: `File`, `Help` and `Font Size`."},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"* Below the menu is the command line, you can type your commands in here."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"* The box below the command line will show feedback when you type in commands, such as if the command is successful or if you have typed an erroneous command."},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"* The leftmost panel contains the list of persons in the address book."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* The middle panel contains the list of tasks in the address book."},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"* The rightmost panel contains either the details of the selected task or person, or the in-application browser."},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"* The bottom bar contains miscellaneous information about the address book, such as the file where the save data will be stored and the number of persons in the address book."},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Testing"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"Unless explicitly stated, each test section for each command is assumed to be carried out continuously. +"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"This means that you *should carry out the tests in the given order*. +"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"Each test section is carried out independently. This means that you are recommended to `undo` to restore the address book after each test section."},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d HelpCommand"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"*Opening the help window*"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"help"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"The User Guide appears in a separate window."},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"Opened help window."},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddPersonCommand"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"*Adding a person with all details*"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"add n/Svea Lisenhower p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"A person named Svea Lisenhower, with the details as stated above is added to the address book at index 21. +"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"New person added: +"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"Svea Lisenhower Phone: 98009621 Email: svea_li@example.com Address: Jurong West Street 65 Blk 667A Remark: Russian Exchange Student Avatar: https://example.com/image.png Tags:"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing compulsory details*"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"add p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing."},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"add: Adds a person to the address book. Parameters: n/NAME [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]... +"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"Example: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 r/Sells sea shells on the sea shore v/avatar-filepath.pngt/friends t/owesMoney"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing optional details*"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"add n/Kent Seethis"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"A person named Kent Seethis, but with no other details is added to the address book at index 22. +"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"New person added: +"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"Kent Seethis Phone: Email: Address: Remark: Avatar: Tags:"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid phones*"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl p/@"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid."},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid emails*"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl e/here"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid."},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid tags*"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl t/@"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified tag is invalid."},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTaskCommand"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"*Adding a task with all details*"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":"add task/ n/Buy pencils d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"A task named \"Buy pencils\", with a description of \"Buy 4 pencils from Popular\", with a deadline of \"Sat Nov 18 19:00:00 SGT 2017\","},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"a priority of \"Low\", and an address of \"West Point\" is added to the addresss book at index 8 in the task list. +"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"New task added: +"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"Buy pencils Description: Buy 4 pencils from Popular Deadline: Sat Nov 18 19:00:00 SGT 2017 Priority: Low Address: West Point \u003cIncomplete\u003e +"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing compulsory details*"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"add task/ d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing."},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"add task/: Adds a task to the address book. Parameters: n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS] +"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Example: add task/ n/Buy pencil d/Buy a new pencil from ABS by/10-10-2017 p/4 a/12 Kent Ridge Crescent, 119275"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing optional details*"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"A task with the name \"Create better task\", and no other details present is added to the address book at index 9 in the task list. +"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"New task added:"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"Create better task Description: Deadline: Priority: Address: \u003cIncomplete\u003e"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid deadlines*"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task by/AAAAAAAAAAAAA"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified deadline is invalid."},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid."},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid priority*"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task p/99999999"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified priority is invalid."},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTagCommand"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":"*Adding tags to persons in Address++*"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 2 t/friends"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":"The first two person in the person list will have the tag `friends` but it will not show in the person panel."},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"add tag/ t/friends"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will have the tag `friends`."},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons if all of them having the input tags*"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 3 t/friends"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since all of them have the tag `friends` already."},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"This tag already exists in all target persons in the current list."},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with invalid index*"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"add tag/ 23 t/friends"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list."},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid."},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with no input tags*"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 t/"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags."},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ListCommand"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":"*List all entries*"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"list"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"All tasks and persons in the address book are listed."},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Listed all entries"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditPersonCommand"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"*Editing a person for all entries*"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Laura Edelweiss p/1111111 a/House of Edelweiss e/laura@example.com r/Heiress to the House of Edelweiss t/Heiress v/https://example.com/validimage2.png"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"The person at index 7 (Elizabeth Edelweiss) is updated and now has new details matching the command."},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":"Edited Person: +"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"Laura Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":"*Editing a person with only 1 entry*"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Elizabath Edelweiss"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":"Only the name of the person at index 7 (Now named Laura Edelweiss) is changed to Elizabeth Edelweiss. All other details remain the same."},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":"Edited Person: +"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":"Elizabath Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":"edit 7 n/"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid."},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"Person names should only contain alphanumeric characters and spaces, and it should not be blank"},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"edit 7 p/ppp"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid."},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"edit 7 e/ppp"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid."},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":"edit 7 t/@@@@@@"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid."},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"*Editing a private person*"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"edit 11 n/Unhide me"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person\u0027s name is private."},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"At least one field to be edited must be public."},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid person*"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"edit 19999 n/Unhide me"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid."},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTaskCommand"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"*Editing a task for all entries*"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Paper Castle d/Castle Garde by/9 December 2017 8pm p/1 a/NUS"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The task at index 7 is updated and now has new details matching the command."},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"Edited Task: +"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"Paper Castle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"*Editing a task with only 1 entry*"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Sandcastle"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"Only the name of the task at index 7 (Now named Paper Castle) is changed to Sandcastle. All other details remain the same."},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"Edited Task: +"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"Sandcastle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*"},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid."},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"Task names can be in any format, and should not be blank"},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 by/AAAAAAAA"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid."},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid."},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 e/ppp"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid."},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid task*"},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"edit task/ 19999 n/Tiny, tiny house"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid."},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTagCommand"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag in the address book*"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends goodFriends"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"All instances of \"friends\" tags are replaced with \"goodFriends\" tags (at indexes 1, 3, 10, 11, 12, 17). +"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Replaced tag friends with goodFriends"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"*Renaming a non-existant tag in the address book*"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends nemesis"},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"As \"friends\" were renamed to \"goodFriends\", there are no more \"friends\" tags. +"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the tag \"friends\" is not in any of the contacts."},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"No such tag was found in the address book."},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with the exact same name*"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends goodFriends"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the two tag names are exactly the same. +"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"The new name of the tag cannot be the same as the old name."},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*"},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +"},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@"},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +"},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +"},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies"},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ChangePrivacyCommand"},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of public fields*"},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/true p/true e/true a/true r/true"},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":588,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as private, and the original data is hidden in the UI."},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":590,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: \u003cPrivate Name\u003e Phone: \u003cPrivate Phone\u003e Email: \u003cPrivate Email\u003e Address: \u003cPrivate Address\u003e Remark: \u003cPrivate Remark\u003e Avatar: Tags: [project]"},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":596,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 n/false"},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":599,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s name, being originally public, remains public."},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:"},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of private fields*"},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/false p/false e/false a/false r/false"},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as public, revealing all the original data in the UI."},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]"},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 a/true"},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s address, being originally private, remains private."},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:"},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of empty fields*"},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/true"},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to private."},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: \u003cPrivate Remark\u003e Avatar: Tags: [GEQ2000]"},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/false"},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to public, but since it is empty, it does not display any data."},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":655,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":656,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]"},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d PrivacyLevelCommand"},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":661,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy level*"},{"lineNumber":662,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":664,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":665,"author":{"gitId":"Esilocke"},"content":"privacylevel 1"},{"lineNumber":666,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":667,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":668,"author":{"gitId":"Esilocke"},"content":"All persons are listed with any private data revealed."},{"lineNumber":669,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":670,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":671,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 1."},{"lineNumber":673,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":674,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":676,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":677,"author":{"gitId":"Esilocke"},"content":"privacylevel 3"},{"lineNumber":678,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":680,"author":{"gitId":"Esilocke"},"content":"Lists all persons except those that have at least one private field."},{"lineNumber":681,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":682,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":683,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":684,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 3."},{"lineNumber":685,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":687,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":688,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":689,"author":{"gitId":"Esilocke"},"content":"privacylevel 2"},{"lineNumber":690,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":691,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":692,"author":{"gitId":"Esilocke"},"content":"List all persons. Fields that are private will have their data hidden."},{"lineNumber":693,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":694,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":695,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":696,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 2."},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":698,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":699,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteCommand"},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":701,"author":{"gitId":"Esilocke"},"content":"*Setting a person in the Address++ to be the favourite person*"},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":703,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":704,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":705,"author":{"gitId":"Esilocke"},"content":"list +"},{"lineNumber":706,"author":{"gitId":"Esilocke"},"content":"favourite 2"},{"lineNumber":707,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":708,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":709,"author":{"gitId":"Esilocke"},"content":"The 2nd person in the Address++ will be favoured and a heart picture will be shown next to his name."},{"lineNumber":710,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":711,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"Favourited Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]"},{"lineNumber":713,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person if he has been favoured*"},{"lineNumber":715,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":716,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":717,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"list +"},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"favourite 1"},{"lineNumber":720,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":721,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":722,"author":{"gitId":"Esilocke"},"content":"An error message will display since the first person in the Address++ has been favoured."},{"lineNumber":723,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":725,"author":{"gitId":"Esilocke"},"content":"Person is already favourited."},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":727,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person with invalid index*"},{"lineNumber":728,"author":{"gitId":"-"},"content":""},{"lineNumber":729,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":730,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":731,"author":{"gitId":"Esilocke"},"content":"favourite 56"},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":733,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"An error message will display since there is no 56th person in the current list."},{"lineNumber":735,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":736,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":738,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteListCommand"},{"lineNumber":740,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":"*Listing all favoured persons in the Address++*"},{"lineNumber":742,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":743,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":745,"author":{"gitId":"Esilocke"},"content":"showfavourite"},{"lineNumber":746,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":747,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"List all the favoured persons."},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":750,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons."},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":753,"author":{"gitId":"Esilocke"},"content":"*Listing empty list with no favoured person in the Address++*"},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":755,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"showfavourite"},{"lineNumber":758,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":759,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":760,"author":{"gitId":"Esilocke"},"content":"An empty list but with successful message."},{"lineNumber":761,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons."},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindPersonCommand"},{"lineNumber":766,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":767,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*"},{"lineNumber":768,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":"find plumley"},{"lineNumber":772,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":773,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":774,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\", case insensitive, in their name are displayed. +"},{"lineNumber":775,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":776,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":777,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":778,"author":{"gitId":"Esilocke"},"content":"2 persons listed!"},{"lineNumber":779,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":780,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":781,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*"},{"lineNumber":782,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":783,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":784,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":785,"author":{"gitId":"Esilocke"},"content":"find plumley edelweiss"},{"lineNumber":786,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":787,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\" or \"edelweiss\", case insensitive, in their name are displayed. +"},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":"4 persons listed!"},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindTaskCommand"},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*"},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":"find task/ on"},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\", case insensitive, in their name or description are displayed. +"},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!"},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*"},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"find task/ on stew"},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description are displayed. +"},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":820,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"3 tasks listed!"},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with priority search*"},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"find task/ on stew p/4"},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and have a priority of \"High\" or above are displayed. +"},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!"},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state search*"},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true"},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and are currently complete are displayed. +"},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!"},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state and priority search*"},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true p/3"},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, with a priority of at least \"medium\", and are currently complete are displayed. +"},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":863,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":864,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!"},{"lineNumber":865,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":866,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d TagListCommand"},{"lineNumber":868,"author":{"gitId":"-"},"content":""},{"lineNumber":869,"author":{"gitId":"-"},"content":"*Listing all the tag in the Address++*"},{"lineNumber":870,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":871,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":873,"author":{"gitId":"-"},"content":"showtag"},{"lineNumber":874,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":875,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":876,"author":{"gitId":"-"},"content":"Tags contain capital letter will displayed in front. All the tags (with or without capital letter) will be displayed in alphabetical order."},{"lineNumber":877,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":878,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":879,"author":{"gitId":"-"},"content":"All the tags are here: \u003cGEQ2000\u003e \u003cacquaintance\u003e \u003cclassmates\u003e \u003cenemy\u003e \u003cfamily\u003e \u003cfriends\u003e \u003cneighbours\u003e \u003cproject\u003e \u003csecretive\u003e \u003ctutee\u003e"},{"lineNumber":880,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":881,"author":{"gitId":"-"},"content":"*Listing empty tag list with no tags in Address++*"},{"lineNumber":882,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":883,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":884,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":885,"author":{"gitId":"-"},"content":"showtag"},{"lineNumber":886,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":887,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":888,"author":{"gitId":"-"},"content":"There is no tag list."},{"lineNumber":889,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":890,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":891,"author":{"gitId":"-"},"content":"There is no tag!"},{"lineNumber":892,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":893,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d FindTagCommand"},{"lineNumber":894,"author":{"gitId":"-"},"content":""},{"lineNumber":895,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with specific tags*"},{"lineNumber":896,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":897,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":898,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":899,"author":{"gitId":"-"},"content":"find tag/ friends"},{"lineNumber":900,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":902,"author":{"gitId":"-"},"content":"List all the persons who have tag `friends`."},{"lineNumber":903,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":904,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":905,"author":{"gitId":"-"},"content":"6 persons listed!"},{"lineNumber":906,"author":{"gitId":"-"},"content":""},{"lineNumber":907,"author":{"gitId":"-"},"content":"*Finding person in the Address++ without specific tags*"},{"lineNumber":908,"author":{"gitId":"-"},"content":""},{"lineNumber":909,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":910,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":911,"author":{"gitId":"-"},"content":"find tag/ /friends"},{"lineNumber":912,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":913,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":914,"author":{"gitId":"-"},"content":"List all the persons without tag `friends`."},{"lineNumber":915,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":916,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":917,"author":{"gitId":"-"},"content":"14 persons listed!"},{"lineNumber":918,"author":{"gitId":"-"},"content":""},{"lineNumber":919,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with \"TAGA\" but without \"TAGB\"*"},{"lineNumber":920,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":921,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":922,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":923,"author":{"gitId":"-"},"content":"find tag/ friends /classmates"},{"lineNumber":924,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":925,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":926,"author":{"gitId":"-"},"content":"Persons have tag `friends` but do not have tag `classmates` will be listed."},{"lineNumber":927,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":928,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":929,"author":{"gitId":"-"},"content":"5 persons listed!"},{"lineNumber":930,"author":{"gitId":"-"},"content":""},{"lineNumber":931,"author":{"gitId":"-"},"content":"*Failing to find persons in the Address++ with valid tags*"},{"lineNumber":932,"author":{"gitId":"-"},"content":""},{"lineNumber":933,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":934,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":935,"author":{"gitId":"-"},"content":"find tag/ fff"},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":937,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":938,"author":{"gitId":"-"},"content":"Although it is a valid tag, there is no person with tag `fff`. Hence, no person will be listed."},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":940,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":941,"author":{"gitId":"-"},"content":"0 persons listed!"},{"lineNumber":942,"author":{"gitId":"-"},"content":""},{"lineNumber":943,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeletePersonCommand"},{"lineNumber":944,"author":{"gitId":"-"},"content":""},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*"},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"delete 20"},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":"The contact at index 20, Myuria Plumley is deleted from the address book. +"},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"Deleted Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]"},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*"},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"delete 2000"},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":967,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTaskCommand"},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*"},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"delete task/ 7"},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is deleted from the address book. +"},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"Deleted Task: Paper Model for project Description: Paper model of Himeji castle for project. Myucel/Myuria twins in charge Deadline: Wed Dec 13 17:00:00 SGT 2017 Priority: Medium Address: \u003cIncomplete\u003e"},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*"},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"delete task/ 7000"},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTagCommand"},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"*Deleting tags from persons in the Address++*"},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/friends"},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"The tag `friends` for the first person will be deleted. The rest tags remain no change."},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]"},{"lineNumber":1016,"author":{"gitId":"-"},"content":""},{"lineNumber":1017,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"delete tag/ t/friends"},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will not have the tag `friends`."},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]"},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons if none of them have the input tags*"},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/neighbour"},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"An error message will display since target persons do not have tag `neighbour`."},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"The target persons do not have input tags."},{"lineNumber":1038,"author":{"gitId":"-"},"content":""},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with invalid index*"},{"lineNumber":1040,"author":{"gitId":"-"},"content":""},{"lineNumber":1041,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":"delete tag/ 23 t/friends"},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1045,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list."},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1048,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1049,"author":{"gitId":"-"},"content":"The person index provided is invalid"},{"lineNumber":1050,"author":{"gitId":"-"},"content":""},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with no input tags*"},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 t/"},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags."},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":1062,"author":{"gitId":"-"},"content":""},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectPersonCommand"},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"*Selecting a person*"},{"lineNumber":1066,"author":{"gitId":"-"},"content":""},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1068,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"select 19"},{"lineNumber":1070,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1071,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1072,"author":{"gitId":"Esilocke"},"content":"The person at index 19, \"Myucel Plumley\" is selected, and her details are listed in the UI panel. +"},{"lineNumber":1073,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1074,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1075,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1076,"author":{"gitId":"Esilocke"},"content":"Selected Person: 19"},{"lineNumber":1077,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1078,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1079,"author":{"gitId":"Esilocke"},"content":"*Selecting a person with an invalid index*"},{"lineNumber":1080,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1081,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1082,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1083,"author":{"gitId":"Esilocke"},"content":"select 19999"},{"lineNumber":1084,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1085,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1086,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1087,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1088,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1089,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1090,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":1091,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1093,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectTaskCommand"},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1095,"author":{"gitId":"Esilocke"},"content":"*Selecting a task*"},{"lineNumber":1096,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"select task/ 7"},{"lineNumber":1100,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1102,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is selected and its details are shown in the UI panel. +"},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1104,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1105,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Selected Task: 7"},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"*Selecting a task with an invalid index*"},{"lineNumber":1110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1111,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"select task/ 7000"},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d LocateCommand"},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":"*Locating a person\u0027s address on Google Maps*"},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":"locate 1"},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and searches for the first person\u0027s address. +"},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"Searching for Person at Index: 1"},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":"*Failing to locate a person with no address*"},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":"locate 2"},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":"An error message is printed, as the person at index 2 has no address. +"},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":"Person 2 has no Address"},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"*Failing to locate a person with a private address*"},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"locate 6"},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +"},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1164,"author":{"gitId":"Esilocke"},"content":"Person 6 has a Private Address"},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d NavigateCommand"},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Person*"},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"navigate fp/1 tp/3"},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first person\u0027s address to the third person\u0027s address. +"},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 30 Geylang Street 29, #06-40 to Blk 30 Lorong 3 Serangoon Gardens, #07-18"},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Task*"},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 tt/1"},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to the first task\u0027s address. +"},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to Blk 45 Aljunied Street 85, #11-31"},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1197,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Address*"},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 ta/NUS"},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to NUS. +"},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to NUS"},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Person*"},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tp/3"},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the third person\u0027s address. +"},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1222,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to Blk 30 Lorong 3 Serangoon Gardens, #07-18"},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Task*"},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tt/4"},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the fourth task\u0027s address. +"},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1236,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to SR-1, COM-1 NUS"},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Address*"},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1243,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 ta/NUS"},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to NUS. +"},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1249,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to NUS"},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Person*"},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":"navigate fa/NUS tp/3"},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NUS to the third person\u0027s address. +"},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1263,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":"Navigating from NUS to Blk 30 Lorong 3 Serangoon Gardens, #07-18"},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Task*"},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":"navigate fa/NTU tt/4"},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NTU to the fourth task\u0027s address. +"},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1276,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1277,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1278,"author":{"gitId":"Esilocke"},"content":"Navigating from NTU to SR-1, COM-1 NUS"},{"lineNumber":1279,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1280,"author":{"gitId":"-"},"content":""},{"lineNumber":1281,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Address*"},{"lineNumber":1282,"author":{"gitId":"-"},"content":""},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1284,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1285,"author":{"gitId":"Esilocke"},"content":"navigate fa/SMU ta/NUS"},{"lineNumber":1286,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1287,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1288,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from SMU to NUS. +"},{"lineNumber":1289,"author":{"gitId":"-"},"content":""},{"lineNumber":1290,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1291,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":"Navigating from SMU to NUS"},{"lineNumber":1293,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1294,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1295,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has a private address*"},{"lineNumber":1296,"author":{"gitId":"-"},"content":""},{"lineNumber":1297,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1298,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1299,"author":{"gitId":"Esilocke"},"content":"navigate fp/6 ta/Changi Airport"},{"lineNumber":1300,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1301,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1302,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +"},{"lineNumber":1303,"author":{"gitId":"-"},"content":""},{"lineNumber":1304,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1305,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1306,"author":{"gitId":"Esilocke"},"content":"Address of the Person at index 6 is private."},{"lineNumber":1307,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1308,"author":{"gitId":"-"},"content":""},{"lineNumber":1309,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has no address*"},{"lineNumber":1310,"author":{"gitId":"-"},"content":""},{"lineNumber":1311,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1312,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1313,"author":{"gitId":"Esilocke"},"content":"navigate fp/8 ta/Changi Airport"},{"lineNumber":1314,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1315,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1316,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 8 has no address. +"},{"lineNumber":1317,"author":{"gitId":"-"},"content":""},{"lineNumber":1318,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1319,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"Person at index 8 does not have an address."},{"lineNumber":1321,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1322,"author":{"gitId":"-"},"content":""},{"lineNumber":1323,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a task has no address*"},{"lineNumber":1324,"author":{"gitId":"-"},"content":""},{"lineNumber":1325,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1326,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"navigate ft/2 ta/Changi Airport"},{"lineNumber":1328,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1329,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1330,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the task at index 2 has no address. +"},{"lineNumber":1331,"author":{"gitId":"-"},"content":""},{"lineNumber":1332,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1333,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"Task at index 2 does not have an address."},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1336,"author":{"gitId":"-"},"content":""},{"lineNumber":1337,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*"},{"lineNumber":1338,"author":{"gitId":"-"},"content":""},{"lineNumber":1339,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1340,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"navigate"},{"lineNumber":1342,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1343,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1345,"author":{"gitId":"-"},"content":""},{"lineNumber":1346,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1348,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":1349,"author":{"gitId":"Esilocke"},"content":"navigate: Get directions from one address to another. +"},{"lineNumber":1350,"author":{"gitId":"Esilocke"},"content":"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three) AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three) +"},{"lineNumber":1351,"author":{"gitId":"Esilocke"},"content":"Example: navigate fp/2 ta/University Town"},{"lineNumber":1352,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1353,"author":{"gitId":"-"},"content":""},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"*Error when no address after a fa/ or ta/ prefix is entered*"},{"lineNumber":1355,"author":{"gitId":"-"},"content":""},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"navigate fa/ tp/1"},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1360,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1361,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1362,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1363,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1364,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1365,"author":{"gitId":"Esilocke"},"content":"Location can take any value, and it should not be blank"},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1367,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"*Error when no integer after a fp/, tp/, ft/ or tt/ prefix is entered*"},{"lineNumber":1369,"author":{"gitId":"-"},"content":""},{"lineNumber":1370,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1371,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1372,"author":{"gitId":"Esilocke"},"content":"navigate ft/ tp/1"},{"lineNumber":1373,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1374,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1376,"author":{"gitId":"-"},"content":""},{"lineNumber":1377,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"Index is not a non-zero unsigned integer."},{"lineNumber":1380,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1381,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetCompleteCommand"},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as complete*"},{"lineNumber":1385,"author":{"gitId":"-"},"content":""},{"lineNumber":1386,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1387,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":"setcomplete 3"},{"lineNumber":1389,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1390,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1391,"author":{"gitId":"Esilocke"},"content":"The task at index 3, \"Visit David\u0027s house\" is marked as completed. +"},{"lineNumber":1392,"author":{"gitId":"-"},"content":""},{"lineNumber":1393,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"Marked Task as completed: Visit David\u0027s house Description: Visit to David Li\u0027s house next Saturday Deadline: Sat Nov 18 12:00:00 SGT 2017 Priority: Low Address: Blk 436 Serangoon Gardens Street 26, #16-43 \u003cIncomplete\u003e"},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1397,"author":{"gitId":"-"},"content":""},{"lineNumber":1398,"author":{"gitId":"Esilocke"},"content":"*Marking an already complete task as complete*"},{"lineNumber":1399,"author":{"gitId":"-"},"content":""},{"lineNumber":1400,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1401,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1402,"author":{"gitId":"Esilocke"},"content":"setcomplete 3"},{"lineNumber":1403,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1404,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1405,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already complete +"},{"lineNumber":1406,"author":{"gitId":"-"},"content":""},{"lineNumber":1407,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"The specified task is already completed"},{"lineNumber":1410,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1411,"author":{"gitId":"-"},"content":""},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*"},{"lineNumber":1413,"author":{"gitId":"-"},"content":""},{"lineNumber":1414,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1415,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1416,"author":{"gitId":"Esilocke"},"content":"setcomplete 7000"},{"lineNumber":1417,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1418,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1419,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1420,"author":{"gitId":"-"},"content":""},{"lineNumber":1421,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1422,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1423,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1425,"author":{"gitId":"-"},"content":""},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetInompleteCommand"},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1428,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as incomplete*"},{"lineNumber":1429,"author":{"gitId":"-"},"content":""},{"lineNumber":1430,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1431,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1432,"author":{"gitId":"Esilocke"},"content":"setincomplete 1"},{"lineNumber":1433,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1434,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"The task at index 1, \"Tuition\" is marked as incomplete. +"},{"lineNumber":1436,"author":{"gitId":"-"},"content":""},{"lineNumber":1437,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1438,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1439,"author":{"gitId":"Esilocke"},"content":"Marked Task as incomplete: Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1440,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1441,"author":{"gitId":"-"},"content":""},{"lineNumber":1442,"author":{"gitId":"Esilocke"},"content":"*Marking an already incomplete task as incomplete*"},{"lineNumber":1443,"author":{"gitId":"-"},"content":""},{"lineNumber":1444,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"setincomplete 1"},{"lineNumber":1447,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1448,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1449,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already incomplete +"},{"lineNumber":1450,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1451,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1452,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1453,"author":{"gitId":"Esilocke"},"content":"The specified task is already incomplete"},{"lineNumber":1454,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1455,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*"},{"lineNumber":1457,"author":{"gitId":"-"},"content":""},{"lineNumber":1458,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1459,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1460,"author":{"gitId":"Esilocke"},"content":"setincomplete 7000"},{"lineNumber":1461,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1462,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1463,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1464,"author":{"gitId":"-"},"content":""},{"lineNumber":1465,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1466,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1467,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1468,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1469,"author":{"gitId":"-"},"content":""},{"lineNumber":1470,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AssignCommand"},{"lineNumber":1471,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1472,"author":{"gitId":"Esilocke"},"content":"*Assigning 1 contact to a task*"},{"lineNumber":1473,"author":{"gitId":"-"},"content":""},{"lineNumber":1474,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1475,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1476,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1"},{"lineNumber":1477,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1478,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1479,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Myucel Plumley is assigned to the first task, Tuition. The task now has 4 people assigned to it instead of 3. +"},{"lineNumber":1480,"author":{"gitId":"-"},"content":""},{"lineNumber":1481,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1482,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1483,"author":{"gitId":"Esilocke"},"content":"Assigned 1 people to +"},{"lineNumber":1484,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1485,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1486,"author":{"gitId":"-"},"content":""},{"lineNumber":1487,"author":{"gitId":"Esilocke"},"content":"*Assigning multiple contacts to a task*"},{"lineNumber":1488,"author":{"gitId":"-"},"content":""},{"lineNumber":1489,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1490,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1491,"author":{"gitId":"Esilocke"},"content":"assign 18 20 to/1"},{"lineNumber":1492,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1493,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1494,"author":{"gitId":"Esilocke"},"content":"The contacts at index 18 and 20, Myuria Plumley and Clarissa Liselotte are assigned to the first task, Tuition. The task now has 6 people assigned to it instead of 4. +"},{"lineNumber":1495,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1496,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1497,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1498,"author":{"gitId":"Esilocke"},"content":"Assigned 2 people to +"},{"lineNumber":1499,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1500,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1501,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1502,"author":{"gitId":"Esilocke"},"content":"*Assigning contacts who are already assigned to a task*"},{"lineNumber":1503,"author":{"gitId":"-"},"content":""},{"lineNumber":1504,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1505,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1506,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1"},{"lineNumber":1507,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1508,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1509,"author":{"gitId":"Esilocke"},"content":"Myucel Plumley was already assigned to the task Tuition. An error message is printed out as she is already assigned to the task. +"},{"lineNumber":1510,"author":{"gitId":"-"},"content":""},{"lineNumber":1511,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1512,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1513,"author":{"gitId":"Esilocke"},"content":"All the specified persons are already assigned to this task"},{"lineNumber":1514,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1515,"author":{"gitId":"-"},"content":""},{"lineNumber":1516,"author":{"gitId":"Esilocke"},"content":"*Assigning no contacts to a task*"},{"lineNumber":1517,"author":{"gitId":"-"},"content":""},{"lineNumber":1518,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1519,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1520,"author":{"gitId":"Esilocke"},"content":"assign to/1"},{"lineNumber":1521,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1522,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1523,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified."},{"lineNumber":1524,"author":{"gitId":"-"},"content":""},{"lineNumber":1525,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1526,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1527,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified"},{"lineNumber":1528,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1529,"author":{"gitId":"-"},"content":""},{"lineNumber":1530,"author":{"gitId":"Esilocke"},"content":"*Assigning to a task with an invalid index*"},{"lineNumber":1531,"author":{"gitId":"-"},"content":""},{"lineNumber":1532,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1533,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1534,"author":{"gitId":"Esilocke"},"content":"assign 5 to/7000"},{"lineNumber":1535,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1536,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1537,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1538,"author":{"gitId":"-"},"content":""},{"lineNumber":1539,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1540,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1541,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1542,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1543,"author":{"gitId":"-"},"content":""},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DismissCommand"},{"lineNumber":1545,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1546,"author":{"gitId":"Esilocke"},"content":"*Dismissing 1 contact from a task*"},{"lineNumber":1547,"author":{"gitId":"-"},"content":""},{"lineNumber":1548,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1549,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1550,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1"},{"lineNumber":1551,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1552,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1553,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Alex Yeoh is assigned to the first task, Tuition. The task now has 2 people assigned to it instead of 3. +"},{"lineNumber":1554,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1555,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1556,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1557,"author":{"gitId":"Esilocke"},"content":"Dismissed 1 people from task +"},{"lineNumber":1558,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1559,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1560,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1561,"author":{"gitId":"Esilocke"},"content":"*Dismissing multiple contacts from a task*"},{"lineNumber":1562,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1563,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1564,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1565,"author":{"gitId":"Esilocke"},"content":"dismiss 6 8 from/1"},{"lineNumber":1566,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1567,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1568,"author":{"gitId":"Esilocke"},"content":"The contacts at index 6 and 8, David Ng and Ima Hidearu are assigned to the first task, Tuition. The task now has 0 people assigned to it instead of 2. +"},{"lineNumber":1569,"author":{"gitId":"-"},"content":""},{"lineNumber":1570,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1571,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1572,"author":{"gitId":"Esilocke"},"content":"Dismissed 2 people from task +"},{"lineNumber":1573,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1574,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1575,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1576,"author":{"gitId":"Esilocke"},"content":"*Dismissing contacts who are already assigned from a task*"},{"lineNumber":1577,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1578,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1579,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1580,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1"},{"lineNumber":1581,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1582,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1583,"author":{"gitId":"Esilocke"},"content":"There are no contacts assigned to the task Tuition."},{"lineNumber":1584,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as none of the specified contacts were assigned to the task."},{"lineNumber":1585,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1586,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1587,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1588,"author":{"gitId":"Esilocke"},"content":"None of the specified persons are assigned to this task"},{"lineNumber":1589,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1590,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1591,"author":{"gitId":"Esilocke"},"content":"*Dismissing no contacts from a task*"},{"lineNumber":1592,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1593,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1594,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1595,"author":{"gitId":"Esilocke"},"content":"dismiss from/1"},{"lineNumber":1596,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1597,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1598,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified."},{"lineNumber":1599,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1600,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1601,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1602,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified"},{"lineNumber":1603,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1604,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1605,"author":{"gitId":"Esilocke"},"content":"*Dismissing from a task with an invalid index*"},{"lineNumber":1606,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1607,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1608,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1609,"author":{"gitId":"Esilocke"},"content":"dismiss 5 from/7000"},{"lineNumber":1610,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1611,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1612,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1613,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1614,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1615,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1616,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1617,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1618,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1619,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ViewAssignCommand"},{"lineNumber":1620,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1621,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with no persons assigned to it*"},{"lineNumber":1622,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1623,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1624,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1625,"author":{"gitId":"Esilocke"},"content":"viewassign 2"},{"lineNumber":1626,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1627,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1628,"author":{"gitId":"Esilocke"},"content":"No contacts are listed +"},{"lineNumber":1629,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1630,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1631,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1632,"author":{"gitId":"-"},"content":"0 persons listed!"},{"lineNumber":1633,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1634,"author":{"gitId":"-"},"content":""},{"lineNumber":1635,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with some persons assigned to it*"},{"lineNumber":1636,"author":{"gitId":"-"},"content":""},{"lineNumber":1637,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1638,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1639,"author":{"gitId":"Esilocke"},"content":"viewassign 1"},{"lineNumber":1640,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1641,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1642,"author":{"gitId":"Esilocke"},"content":"3 contacts are listed, Alex Yeoh, David Ng, Ima Hidearu +"},{"lineNumber":1643,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1644,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1645,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1646,"author":{"gitId":"Esilocke"},"content":"3 persons listed!"},{"lineNumber":1647,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1648,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1649,"author":{"gitId":"Esilocke"},"content":"*Viewing from a task with an invalid index*"},{"lineNumber":1650,"author":{"gitId":"-"},"content":""},{"lineNumber":1651,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1652,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1653,"author":{"gitId":"Esilocke"},"content":"viewassign 99999"},{"lineNumber":1654,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1655,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1656,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1657,"author":{"gitId":"-"},"content":""},{"lineNumber":1658,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1659,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1660,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1661,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1662,"author":{"gitId":"-"},"content":""},{"lineNumber":1663,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ThemeCommand"},{"lineNumber":1664,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1665,"author":{"gitId":"Esilocke"},"content":"*Changing the theme of the address book*"},{"lineNumber":1666,"author":{"gitId":"-"},"content":""},{"lineNumber":1667,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1668,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1669,"author":{"gitId":"Esilocke"},"content":"theme light"},{"lineNumber":1670,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1671,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1672,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a bright colour. +"},{"lineNumber":1673,"author":{"gitId":"-"},"content":""},{"lineNumber":1674,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1675,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1676,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: light"},{"lineNumber":1677,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1678,"author":{"gitId":"-"},"content":""},{"lineNumber":1679,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1680,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1681,"author":{"gitId":"Esilocke"},"content":"theme dark"},{"lineNumber":1682,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1683,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1684,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a dark colour.+"},{"lineNumber":1685,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1686,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1687,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: dark"},{"lineNumber":1688,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1689,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1690,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*"},{"lineNumber":1691,"author":{"gitId":"-"},"content":""},{"lineNumber":1692,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1693,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1694,"author":{"gitId":"Esilocke"},"content":"theme"},{"lineNumber":1695,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1696,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1697,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1698,"author":{"gitId":"-"},"content":""},{"lineNumber":1699,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1700,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1701,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":1702,"author":{"gitId":"Esilocke"},"content":"theme: Sets the theme based on the specified style. +"},{"lineNumber":1703,"author":{"gitId":"Esilocke"},"content":"Parameters: STYLE +"},{"lineNumber":1704,"author":{"gitId":"Esilocke"},"content":"Example: theme dark"},{"lineNumber":1705,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1706,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1707,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d HistoryCommand"},{"lineNumber":1708,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1709,"author":{"gitId":"Esilocke"},"content":"*Lists all commands done in reverser chronological order*"},{"lineNumber":1710,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1711,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1712,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1713,"author":{"gitId":"Esilocke"},"content":"notacommand +"},{"lineNumber":1714,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +"},{"lineNumber":1715,"author":{"gitId":"Esilocke"},"content":"history"},{"lineNumber":1716,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1717,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1718,"author":{"gitId":"Esilocke"},"content":"The two previous commands are listed in the box below the command line in reverse chronological order from top to bottom. +"},{"lineNumber":1719,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1720,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1721,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1722,"author":{"gitId":"Esilocke"},"content":"Entered commands (from most recent to earliest): +"},{"lineNumber":1723,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +"},{"lineNumber":1724,"author":{"gitId":"Esilocke"},"content":"notacommand"},{"lineNumber":1725,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1726,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1727,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d UndoCommand"},{"lineNumber":1728,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1729,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1730,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1731,"author":{"gitId":"Esilocke"},"content":"delete 1 +"},{"lineNumber":1732,"author":{"gitId":"Esilocke"},"content":"undo"},{"lineNumber":1733,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1734,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1735,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo. +"},{"lineNumber":1736,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1737,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1738,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1739,"author":{"gitId":"Esilocke"},"content":"Undo success!"},{"lineNumber":1740,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1741,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1742,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1743,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1744,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1745,"author":{"gitId":"Esilocke"},"content":"add n/Reed Richards p/94444444 e/reed@futurefoundation.com a/Baxter Building r/Loves to stretch +"},{"lineNumber":1746,"author":{"gitId":"Esilocke"},"content":"undo"},{"lineNumber":1747,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1748,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1749,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo."},{"lineNumber":1750,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1751,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1752,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1753,"author":{"gitId":"Esilocke"},"content":"Undo success!"},{"lineNumber":1754,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1755,"author":{"gitId":"-"},"content":""},{"lineNumber":1756,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UnfavouriteCommand"},{"lineNumber":1757,"author":{"gitId":"-"},"content":""},{"lineNumber":1758,"author":{"gitId":"-"},"content":"*Setting a favoured person in the Address++ to be the unfavoured person*"},{"lineNumber":1759,"author":{"gitId":"-"},"content":""},{"lineNumber":1760,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1761,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1762,"author":{"gitId":"-"},"content":"list +"},{"lineNumber":1763,"author":{"gitId":"-"},"content":"unfavourite 1"},{"lineNumber":1764,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1765,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1766,"author":{"gitId":"-"},"content":"The 1st person in the Address++ will be unfavoured and the heart picture will disappear."},{"lineNumber":1767,"author":{"gitId":"-"},"content":""},{"lineNumber":1768,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1769,"author":{"gitId":"-"},"content":"Unfavourited Person: Alex Yeoh Phone: 87438807 Email: alexyeoh@example.com Address: Blk 30 Geylang Street 29, #06-40 Remark: Cheerful lad Avatar: Tags: [friends]"},{"lineNumber":1770,"author":{"gitId":"-"},"content":""},{"lineNumber":1771,"author":{"gitId":"-"},"content":"*Failing to set a unfavored person if he has not been favoured*"},{"lineNumber":1772,"author":{"gitId":"-"},"content":""},{"lineNumber":1773,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1774,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1775,"author":{"gitId":"-"},"content":"list +"},{"lineNumber":1776,"author":{"gitId":"-"},"content":"unfavourite 2"},{"lineNumber":1777,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1778,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1779,"author":{"gitId":"-"},"content":"An error message will display since the second person in the Address++ has bot been favoured."},{"lineNumber":1780,"author":{"gitId":"-"},"content":""},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1782,"author":{"gitId":"-"},"content":"Person is not favourited yet."},{"lineNumber":1783,"author":{"gitId":"-"},"content":""},{"lineNumber":1784,"author":{"gitId":"-"},"content":"*Failing to set a unfavoured person with invalid index*"},{"lineNumber":1785,"author":{"gitId":"-"},"content":""},{"lineNumber":1786,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1787,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1788,"author":{"gitId":"-"},"content":"unfavourite 56"},{"lineNumber":1789,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1790,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1791,"author":{"gitId":"-"},"content":"An error message will display since there is no 56th person in the current list."},{"lineNumber":1792,"author":{"gitId":"-"},"content":""},{"lineNumber":1793,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1794,"author":{"gitId":"-"},"content":"The person index provided is invalid"},{"lineNumber":1795,"author":{"gitId":"-"},"content":""},{"lineNumber":1796,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d RedoCommand"},{"lineNumber":1797,"author":{"gitId":"-"},"content":""},{"lineNumber":1798,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1799,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1800,"author":{"gitId":"Esilocke"},"content":"delete 1 +"},{"lineNumber":1801,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1802,"author":{"gitId":"Esilocke"},"content":"redo"},{"lineNumber":1803,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo and deleted again after a redo. +"},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1809,"author":{"gitId":"Esilocke"},"content":"Redo success!"},{"lineNumber":1810,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1811,"author":{"gitId":"-"},"content":""},{"lineNumber":1812,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1813,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1814,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1815,"author":{"gitId":"Esilocke"},"content":"add n/Peter Parker p/92241783 e/ceo@parkerindustries.com a/New York City r/Top 10 smartest people in the world +"},{"lineNumber":1816,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1817,"author":{"gitId":"Esilocke"},"content":"redo"},{"lineNumber":1818,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1819,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo and added again with a redo."},{"lineNumber":1821,"author":{"gitId":"-"},"content":""},{"lineNumber":1822,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1823,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1824,"author":{"gitId":"Esilocke"},"content":"Redo success!"},{"lineNumber":1825,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1826,"author":{"gitId":"-"},"content":""},{"lineNumber":1827,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1828,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book to its original state before continuing with testing."},{"lineNumber":1829,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1830,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ClearCommand"},{"lineNumber":1831,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1832,"author":{"gitId":"Esilocke"},"content":"*Clearing all entries*"},{"lineNumber":1833,"author":{"gitId":"-"},"content":""},{"lineNumber":1834,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1835,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1836,"author":{"gitId":"Esilocke"},"content":"clear"},{"lineNumber":1837,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1838,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1839,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +"},{"lineNumber":1840,"author":{"gitId":"-"},"content":""},{"lineNumber":1841,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1843,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!"},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1845,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1846,"author":{"gitId":"Esilocke"},"content":"*Clearing persons only*"},{"lineNumber":1847,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1848,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1849,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1850,"author":{"gitId":"Esilocke"},"content":"clear person/"},{"lineNumber":1851,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1853,"author":{"gitId":"Esilocke"},"content":"All persons vanish from the leftmost column, leaving them empty. +"},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1855,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1856,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1857,"author":{"gitId":"Esilocke"},"content":"All contacts have been cleared!"},{"lineNumber":1858,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1859,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1860,"author":{"gitId":"Esilocke"},"content":"*Clearing tasks only*"},{"lineNumber":1861,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1862,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1863,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1864,"author":{"gitId":"Esilocke"},"content":"clear task/"},{"lineNumber":1865,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1866,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1867,"author":{"gitId":"Esilocke"},"content":"All tasks vanish from the middle columns, leaving them empty. +"},{"lineNumber":1868,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1869,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1870,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1871,"author":{"gitId":"Esilocke"},"content":"All tasks have been cleared!"},{"lineNumber":1872,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1873,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1874,"author":{"gitId":"Esilocke"},"content":"*Both person and task specified*"},{"lineNumber":1875,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1876,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1877,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1878,"author":{"gitId":"Esilocke"},"content":"clear task/ person/ task/ task/ person/"},{"lineNumber":1879,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1880,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1881,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +"},{"lineNumber":1882,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1883,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1884,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1885,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!"},{"lineNumber":1886,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1887,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1888,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1889,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book before continuing with testing."},{"lineNumber":1890,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1891,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d OpenCommand and SaveAsCommand"},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"*Saves data as a new .xml file and switches to that file*"},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"save +"},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"Save the new save file as test.xml. +"},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Click save."},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the file followed by test.xml. +"},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Successfully saved file."},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"*Opens and switches to a new .xml save file*"},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"Following the above save command:"},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":"clear"},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"To differentiate the test.xml with the [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"The address book contains no more persons or tasks."},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"open +"},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml and select [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":"Click open."},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the [W09-B2][Address++]SampleData.xml followed by the name [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"The original data is restored in the address book. +"},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":"Successfully opened file."},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ExitCommand"},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"*Exits Address++*"},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":"Input Command:"},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"exit"},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"Expected Result: Address++ closes."},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1956,"author":{"gitId":"-"},"content":""},{"lineNumber":1957,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":1958,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1959,"author":{"gitId":"charlesgoh"},"content":"*Sorts persons by name in ascending order*"},{"lineNumber":1960,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1961,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":1962,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1963,"author":{"gitId":"charlesgoh"},"content":"sort person name asc"},{"lineNumber":1964,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1965,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":1966,"author":{"gitId":"charlesgoh"},"content":"Person list panel will sort all persons by their names in ascending order +"},{"lineNumber":1967,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1968,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":1969,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1970,"author":{"gitId":"charlesgoh"},"content":"All persons in address book successfully sorted"},{"lineNumber":1971,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1972,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1973,"author":{"gitId":"charlesgoh"},"content":"*Sorts tasks by priority in descending order*"},{"lineNumber":1974,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1975,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":1976,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1977,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +"},{"lineNumber":1978,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1979,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":1980,"author":{"gitId":"charlesgoh"},"content":"Task list panel will sort all tasks by their priorities in descending order +"},{"lineNumber":1981,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1982,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":1983,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1984,"author":{"gitId":"charlesgoh"},"content":"All tasks in address book successfully sorted"},{"lineNumber":1985,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1986,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1987,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*"},{"lineNumber":1988,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1989,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":1990,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1991,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +"},{"lineNumber":1992,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1993,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":1994,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +"},{"lineNumber":1995,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1996,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":1997,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1998,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":1999,"author":{"gitId":"charlesgoh"},"content":"sort: Sorts all persons or all tasks by chosen field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive +"},{"lineNumber":2000,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [LIST] [FIELD] [ORDER] +"},{"lineNumber":2001,"author":{"gitId":"charlesgoh"},"content":"Example: sort person email desc +"},{"lineNumber":2002,"author":{"gitId":"charlesgoh"},"content":"Example 2: sort task deadline desc +"},{"lineNumber":2003,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2004,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2005,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":2006,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2007,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2008,"author":{"gitId":"charlesgoh"},"content":"Currently supports mac relative file paths. No guarantee of support for other operating system."},{"lineNumber":2009,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2010,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*"},{"lineNumber":2011,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2012,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2013,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2014,"author":{"gitId":"charlesgoh"},"content":"backup +"},{"lineNumber":2015,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2016,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2017,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +"},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":2022,"author":{"gitId":"charlesgoh"},"content":"backup: Backs up data to a user input location field [FILEPATH] +"},{"lineNumber":2023,"author":{"gitId":"charlesgoh"},"content":"Parameter: KEYWORD [FILEPATH] +"},{"lineNumber":2024,"author":{"gitId":"charlesgoh"},"content":"Example: backupMyBackUpFile +"},{"lineNumber":2025,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2026,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2027,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to same file path*"},{"lineNumber":2028,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2029,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2030,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2031,"author":{"gitId":"charlesgoh"},"content":"backup filename.xml"},{"lineNumber":2032,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the same directory as the jar file +"},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully."},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2040,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2041,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to relative file path*"},{"lineNumber":2042,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2043,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2044,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2045,"author":{"gitId":"charlesgoh"},"content":"backup ./../filename.xml +"},{"lineNumber":2046,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2047,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2048,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the directory preceding one level above the jar file +"},{"lineNumber":2049,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2050,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2051,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2052,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully."},{"lineNumber":2053,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2054,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2055,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Change Password Command"},{"lineNumber":2056,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2057,"author":{"gitId":"charlesgoh"},"content":"*Invalid Command Format Input*"},{"lineNumber":2058,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2059,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2060,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2061,"author":{"gitId":"charlesgoh"},"content":"changepassword +"},{"lineNumber":2062,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2063,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2064,"author":{"gitId":"charlesgoh"},"content":"Invalid command format error message with usage message +"},{"lineNumber":2065,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2066,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2067,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2068,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":2069,"author":{"gitId":"charlesgoh"},"content":"changepassword: Changes user password. +"},{"lineNumber":2070,"author":{"gitId":"charlesgoh"},"content":"pw/PASSWORD np/NEWPASSWORD cfp/CONFIRMPASSWORD +"},{"lineNumber":2071,"author":{"gitId":"charlesgoh"},"content":"Example: changepassword pw/password np/mynewpassword111 cfp/mynewpassword111 +"},{"lineNumber":2072,"author":{"gitId":"charlesgoh"},"content":"Example 2: cpw pw/password np/mynewpassword111 cfp/mynewpassword111 +"},{"lineNumber":2073,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2074,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2075,"author":{"gitId":"charlesgoh"},"content":"*Change Password with valid inputs*"},{"lineNumber":2076,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2077,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2078,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2079,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +"},{"lineNumber":2080,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2081,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2082,"author":{"gitId":"charlesgoh"},"content":"Application password will change to `newpassword` +"},{"lineNumber":2083,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2084,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2085,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2086,"author":{"gitId":"charlesgoh"},"content":"Password changed successfully"},{"lineNumber":2087,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2088,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2089,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Password entered*"},{"lineNumber":2090,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2091,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2092,"author":{"gitId":"charlesgoh"},"content":"Run this after running the previous command. Otherwise change the password to something incorrect. Default password"},{"lineNumber":2093,"author":{"gitId":"charlesgoh"},"content":"is `password`"},{"lineNumber":2094,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2095,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2096,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2097,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +"},{"lineNumber":2098,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2099,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2100,"author":{"gitId":"charlesgoh"},"content":"Application password will remain as `newpassword` and reject input +"},{"lineNumber":2101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2102,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2103,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2104,"author":{"gitId":"charlesgoh"},"content":"Your password is incorrect. Please try again."},{"lineNumber":2105,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2107,"author":{"gitId":"charlesgoh"},"content":"*Old and new passwords are the same*"},{"lineNumber":2108,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2109,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2110,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2111,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/newpassword cfp/newpassword +"},{"lineNumber":2112,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2113,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2114,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +"},{"lineNumber":2115,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2116,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2117,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2118,"author":{"gitId":"charlesgoh"},"content":"New password must be different from your old password"},{"lineNumber":2119,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2121,"author":{"gitId":"charlesgoh"},"content":"*New password and confirmation passwords do not match*"},{"lineNumber":2122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2123,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2124,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2125,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/evennewerpassword cfp/wutwutWUUUUUT? +"},{"lineNumber":2126,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2127,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2128,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +"},{"lineNumber":2129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2130,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2131,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2132,"author":{"gitId":"charlesgoh"},"content":"Your new password and confirmation password do not match. Please try again"},{"lineNumber":2133,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2135,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock Command"},{"lineNumber":2136,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2137,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2138,"author":{"gitId":"charlesgoh"},"content":"The following tests assume that the password has been set to `newpassword` from the above tests. If you opened the application"},{"lineNumber":2139,"author":{"gitId":"charlesgoh"},"content":"for the first time, use the default password `password`."},{"lineNumber":2140,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2141,"author":{"gitId":"charlesgoh"},"content":"*Lock Application failure with incorrect password*"},{"lineNumber":2142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2143,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2144,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2145,"author":{"gitId":"charlesgoh"},"content":"lock pw/wrongpasswordlol +"},{"lineNumber":2146,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2147,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2148,"author":{"gitId":"charlesgoh"},"content":"Application will fail to lock +"},{"lineNumber":2149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2150,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2151,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2152,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again"},{"lineNumber":2153,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2154,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2155,"author":{"gitId":"charlesgoh"},"content":"*Lock Application with correct password*"},{"lineNumber":2156,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2157,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2158,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2159,"author":{"gitId":"charlesgoh"},"content":"lock pw/newpassword"},{"lineNumber":2160,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2161,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2162,"author":{"gitId":"charlesgoh"},"content":"Locks application. Try performing any CRUD statements after locking (i.e. add or edit. It will fail) +"},{"lineNumber":2163,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2164,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2165,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2166,"author":{"gitId":"charlesgoh"},"content":"Address++ locked successfully"},{"lineNumber":2167,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2168,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2169,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Unlock Command"},{"lineNumber":2170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2171,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2172,"author":{"gitId":"charlesgoh"},"content":"This section is a continuation of the previous section on the Lock Command"},{"lineNumber":2173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2174,"author":{"gitId":"charlesgoh"},"content":"*Fail to unlock application with incorrect password*"},{"lineNumber":2175,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2176,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2177,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2178,"author":{"gitId":"charlesgoh"},"content":"unlock pw/wrongpassword:P"},{"lineNumber":2179,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2180,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2181,"author":{"gitId":"charlesgoh"},"content":"Fails to unlock application. You will still not be able to execute CRUD commands +"},{"lineNumber":2182,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2183,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2184,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2185,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again"},{"lineNumber":2186,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2188,"author":{"gitId":"charlesgoh"},"content":"*Unlock application with correct password*"},{"lineNumber":2189,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2190,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2191,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2192,"author":{"gitId":"charlesgoh"},"content":"unlock pw/newpassword:P"},{"lineNumber":2193,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2194,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2195,"author":{"gitId":"charlesgoh"},"content":"Unlocks application. You can now execute CRUD commands +"},{"lineNumber":2196,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2197,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2198,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2199,"author":{"gitId":"charlesgoh"},"content":"Address++ unlocked successfully"},{"lineNumber":2200,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2201,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2202,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command"},{"lineNumber":2203,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2204,"author":{"gitId":"charlesgoh"},"content":"*Increase font size*"},{"lineNumber":2205,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2206,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2207,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2208,"author":{"gitId":"charlesgoh"},"content":"fontsize increase"},{"lineNumber":2209,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2210,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2211,"author":{"gitId":"charlesgoh"},"content":"Increases font size by 1 level +"},{"lineNumber":2212,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2213,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2214,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2215,"author":{"gitId":"charlesgoh"},"content":"Font size increased successfully"},{"lineNumber":2216,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2217,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2218,"author":{"gitId":"charlesgoh"},"content":"*Decrease font size*"},{"lineNumber":2219,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2220,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2221,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2222,"author":{"gitId":"charlesgoh"},"content":"fs decrease"},{"lineNumber":2223,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2224,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2225,"author":{"gitId":"charlesgoh"},"content":"Decrease font size by 1 level +"},{"lineNumber":2226,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2227,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2228,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2229,"author":{"gitId":"charlesgoh"},"content":"Font size decreased successfully"},{"lineNumber":2230,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2231,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2232,"author":{"gitId":"charlesgoh"},"content":"*Reset font size*"},{"lineNumber":2233,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2234,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2235,"author":{"gitId":"charlesgoh"},"content":"You can try increasing the font size a few more times. There will be a max font size to prevent you from"},{"lineNumber":2236,"author":{"gitId":"charlesgoh"},"content":"increasing too much."},{"lineNumber":2237,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2238,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2239,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2240,"author":{"gitId":"charlesgoh"},"content":"fontsize reset +"},{"lineNumber":2241,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2242,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2243,"author":{"gitId":"charlesgoh"},"content":"Resets font size in the application +"},{"lineNumber":2244,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2245,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2246,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2247,"author":{"gitId":"charlesgoh"},"content":"Font size reset successfully"},{"lineNumber":2248,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2249,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2250,"author":{"gitId":"charlesgoh"},"content":"*Incorrect input format*"},{"lineNumber":2251,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2252,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2253,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2254,"author":{"gitId":"charlesgoh"},"content":"fontsize +"},{"lineNumber":2255,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2256,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2257,"author":{"gitId":"charlesgoh"},"content":"Displays invalid command format error and the usage message +"},{"lineNumber":2258,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2259,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2260,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2261,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":2262,"author":{"gitId":"charlesgoh"},"content":"fontsize: Increases, decreases or resets font sizes +"},{"lineNumber":2263,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [OPTION] +"},{"lineNumber":2264,"author":{"gitId":"charlesgoh"},"content":"Example: fontsize increase +"},{"lineNumber":2265,"author":{"gitId":"charlesgoh"},"content":"Example 2: fs reset +"},{"lineNumber":2266,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2267,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2268,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatars"},{"lineNumber":2269,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2270,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2271,"author":{"gitId":"charlesgoh"},"content":"There is full support for URLs. No guarantee for local file paths. Local file paths must add a local prefix `file:`"},{"lineNumber":2272,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2273,"author":{"gitId":"charlesgoh"},"content":"*Add avatar URL*"},{"lineNumber":2274,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2275,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2276,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2277,"author":{"gitId":"charlesgoh"},"content":"edit 1 v/[URL] +"},{"lineNumber":2278,"author":{"gitId":"charlesgoh"},"content":"Replace [URL] with a valid image online."},{"lineNumber":2279,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2280,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2281,"author":{"gitId":"charlesgoh"},"content":"Replaces placeholder avatar with the online image +"}],"authorContributionMap":{"charlesgoh":324,"jeffreygohkw":186,"Esilocke":1500,"-":271}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" });"},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));"},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data."},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully."},{"lineNumber":97,"author":{"gitId":"-"},"content":" */"},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel."},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}."},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}."},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected."},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card."},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected."},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task."},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list."},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list."},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list."},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call."},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list."},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" String defaultConfigAsString \u003d \"App title : Address++\\n\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code AddPersonCommand}."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandIntegrationTest {"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), expectedModel);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code AddPersonCommand} which upon execution, adds {@code person} into the {@code model}."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand prepareCommand(Person person, Model model) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":9,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandTest {"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommand \u003d new AddPersonCommand(alice);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addBobCommand \u003d new AddPersonCommand(bob);"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommandCopy \u003d new AddPersonCommand(alice);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddPersonCommand with the details of the given person."},{"lineNumber":81,"author":{"gitId":"-"},"content":" */"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand getAddCommandForPerson(Person person, Model model) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person or task."},{"lineNumber":90,"author":{"gitId":"-"},"content":" */"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":98,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added."},{"lineNumber":105,"author":{"gitId":"-"},"content":" */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":115,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":116,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":2,"-":100}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}."},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AddTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandTest {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" AddTaskCommandTest.ModelStubAcceptingTaskAdded modelStub \u003d new AddTaskCommandTest.ModelStubAcceptingTaskAdded();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d prepareCommand(validTask, modelStub).execute();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddTaskCommand.MESSAGE_SUCCESS, validTask), commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new AddTaskCommandTest.ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddTaskCommand.MESSAGE_DUPLICATE_TASK);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" prepareCommand(validTask, modelStub).execute();"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommand \u003d new AddTaskCommand(paper);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPencilCommand \u003d new AddTaskCommand(pencil);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommandCopy \u003d new AddTaskCommand(paper);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddTaskCommand with the details of the given task."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" private AddTaskCommand prepareCommand(Task task, Model model) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand command \u003d new AddTaskCommand(task);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateTaskException when trying to add a task."},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the task being added."},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingTaskAdded extends ModelStub {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":119}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_success() throws Exception {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_success() throws Exception {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_success() throws Exception {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void execute_allPersonsAlreadyAssigned_throwsCommandException() throws Exception {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assignCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, expectedModel, AssignCommand.MESSAGE_NONE_ASSIGNED);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets."},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index taskIndex) {"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, taskIndex);"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":156}},{"path":"src/test/java/seedu/address/logic/commands/ChangePasswordCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.ChangePasswordCommandParser;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandTest {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_PASSWORD \u003d \"password\";"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_SECOND_PASSWORD \u003d \"password2\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private UserPrefs userPrefs;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ChangePasswordCommandParser parser;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d new UserPrefs();"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" parser \u003d new ChangePasswordCommandParser();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void parseWrongArgumentsFailure() {"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" // No arguments failure"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Wrong number of arguments"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"one two?\", String"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // No prefixes"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"password password2 password3\", String"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void testUserPrefsPasswords() {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Check original password"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" String expectedPassword \u003d getHashed256(DEFAULT_PASSWORD);"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // Lock address book and check if state has changed"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(DEFAULT_SECOND_PASSWORD);"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" expectedPassword \u003d getHashed256(DEFAULT_SECOND_PASSWORD);"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Helps to convert string to SHA256 counterpart"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" private String getHashed256(String password) {"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":74}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\")"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" .setRemarkPrivate(\"false\").build();"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getRemarkIsPrivate(), pps.getRemarkIsPrivate());"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsCopy \u003d new PersonPrivacySettings(pps);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getAddressIsPrivate(), pps.getAddressIsPrivate());"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getEmailIsPrivate(), pps.getEmailIsPrivate());"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getNameIsPrivate(), pps.getNameIsPrivate());"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getPhoneIsPrivate(), pps.getPhoneIsPrivate());"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getRemarkIsPrivate(), pps.getRemarkIsPrivate());"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(true);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(true);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(true);"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"true\")"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").setRemarkPrivate(\"true\")"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").setRemarkPrivate(\"false\")"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(false);"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(false);"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(false);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(false);"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":149}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class ClearCommandTest {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/ClearPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommandTest {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearPersonCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ClearPersonCommand prepareCommand(Model model) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ClearPersonCommand command \u003d new ClearPersonCommand();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/commands/ClearTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommandTest {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // Verify that only the tasks are cleared"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearTaskCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ClearTaskCommand prepareCommand(Model model) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ClearTaskCommand command \u003d new ClearTaskCommand();"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":39}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands."},{"lineNumber":35,"author":{"gitId":"-"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_NAME_CHRIS \u003d \"Chris Chan\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_PHONE_CHRIS \u003d \"33333333\";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_EMAIL_CHRIS \u003d \"chris@example.com\";"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_ADDRESS_CHRIS \u003d \"Block 132, Chris Street 5\";"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_REMARK_CHRIS \u003d \"He likes swimming\";"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_AMY \u003d \"amyavatar\";"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_BOB \u003d \"bobavatar\";"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_CHRIS \u003d \"chirsavatar\";"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_ALICE \u003d \"false\";"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_BOB \u003d \"true\";"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_TAG_CHRISTAG \u003d \"special\";"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017 12pm\";"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017 12pm\";"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PENCIL \u003d \"12 Kent Ridge Cres\";"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PAPER \u003d \"Bedok Mall\";"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final String NAME_DESC_CHRIS \u003d \" \" + PREFIX_NAME + VALID_NAME_CHRIS;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public static final String PHONE_DESC_CHRIS \u003d \" \" + PREFIX_PHONE + VALID_PHONE_CHRIS;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" public static final String EMAIL_DESC_CHRIS \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_CHRIS;"},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" public static final String ADDRESS_DESC_CHRIS \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_CHRIS;"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" public static final String REMARK_DESC_CHRIS \u003d \" \" + PREFIX_REMARK + VALID_REMARK_CHRIS;"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_AMY \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_AMY;"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_BOB \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_BOB;"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_CHRIS \u003d \" \" + PREFIX_AVATAR + VALID_REMARK_CHRIS;"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PENCIL \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PAPER \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_TASK_NAME_DESC \u003d \" \" + PREFIX_NAME + \" \"; // task name cannot be blank"},{"lineNumber":109,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones"},{"lineNumber":111,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"TIMELESS AGES\"; // not a date"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_ADDRESS_DESC \u003d \" \" + PREFIX_ADDRESS + \" \"; // priority is out of bounds"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_AMY;"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_BOB;"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PENCIL;"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PAPER;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" static {"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //TODO: Change avatar filename to a real filename"},{"lineNumber":126,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)"},{"lineNumber":127,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_AMY).withAvatar(VALID_AVATAR_AMY).withFavourite(VALID_FAVOURITE_ALICE)"},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":130,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":131,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_BOB).withAvatar(VALID_AVATAR_BOB).withFavourite(VALID_FAVOURITE_ALICE)"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}"},{"lineNumber":146,"author":{"gitId":"-"},"content":" */"},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,"},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);"},{"lineNumber":153,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":160,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":162,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged"},{"lineNumber":163,"author":{"gitId":"-"},"content":" */"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can"},{"lineNumber":166,"author":{"gitId":"-"},"content":" // only do so by copying its components."},{"lineNumber":167,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());"},{"lineNumber":168,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":171,"author":{"gitId":"-"},"content":" command.execute();"},{"lineNumber":172,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (CommandException e) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());"},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());"},{"lineNumber":176,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());"},{"lineNumber":177,"author":{"gitId":"-"},"content":" }"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":181,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book."},{"lineNumber":182,"author":{"gitId":"-"},"content":" */"},{"lineNumber":183,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {"},{"lineNumber":184,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" final String[] splitName \u003d person.getName().value.split(\"\\\\s+\");"},{"lineNumber":186,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":193,"author":{"gitId":"-"},"content":" */"},{"lineNumber":194,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":199,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":200,"author":{"gitId":"-"},"content":" }"},{"lineNumber":201,"author":{"gitId":"-"},"content":" }"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book."},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public static void showFirstTaskOnly(Model model) {"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(0);"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book."},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" public static void showSecondTaskOnly(Model model) {"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(1);"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * Deletes the first task in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public static void deleteFirstTask(Model model) {"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask firstTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(firstTask);"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Task in filtered list must exist in model.\", pnfe);"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {"},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);"},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":247,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":250,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":15,"jeffreygohkw":5,"Esilocke":81,"wangyiming1019":25,"-":124}},{"path":"src/test/java/seedu/address/logic/commands/DeletePersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeletePersonCommand}."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandTest {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":71,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommand \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteSecondCommand \u003d new DeletePersonCommand(INDEX_SECOND_PERSON);"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommandCopy \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeletePersonCommand} with the parameter {@code index}."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" private DeletePersonCommand prepareCommand(Index index) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d new DeletePersonCommand(index);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" deletePersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" return deletePersonCommand;"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one."},{"lineNumber":112,"author":{"gitId":"-"},"content":" */"},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":22,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}."},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() throws Exception {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" showNoTask(expectedModel);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommand \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteSecondCommand \u003d new DeleteTaskCommand(INDEX_SECOND_TASK);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommandCopy \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(1));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(null));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeleteTaskCommand} with the parameter {@code index}."},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private DeleteTaskCommand prepareCommand(Index index) {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d new DeleteTaskCommand(index);"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" deleteTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return deleteTaskCommand;"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show no tasks."},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" private void showNoTask(Model model) {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(p -\u003e false);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().isEmpty();"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":115}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_success() throws Exception {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_success() throws Exception {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_success() throws Exception {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void execute_noneDismissed_throwsCommandException() throws Exception {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, DismissCommand.MESSAGE_NONE_ASSIGNED);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets."},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index taskIndex) {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, taskIndex);"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":151}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditPersonCommand."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandTest {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(indexLastPerson, descriptor);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));"},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book"},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex, descriptor);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book"},{"lineNumber":185,"author":{"gitId":"-"},"content":" */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex,"},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" final EditPersonCommand standardCommand \u003d new EditPersonCommand(INDEX_FIRST_PERSON, DESC_AMY);"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand commandWithSameValues \u003d new EditPersonCommand(INDEX_FIRST_PERSON, copyDescriptor);"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_SECOND_PERSON, DESC_AMY)));"},{"lineNumber":219,"author":{"gitId":"-"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_FIRST_PERSON, DESC_BOB)));"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditPersonCommand} with parameters {@code index} and {@code descriptor}"},{"lineNumber":226,"author":{"gitId":"-"},"content":" */"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" private EditPersonCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d new EditPersonCommand(index, descriptor);"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" editPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return editPersonCommand;"},{"lineNumber":231,"author":{"gitId":"-"},"content":" }"},{"lineNumber":232,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":31,"-":140}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_BOB;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorTest {"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":26,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptorWithSameValues \u003d new EditPersonDescriptor(DESC_AMY);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(descriptorWithSameValues));"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(DESC_AMY));"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(null));"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(5));"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different values -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(DESC_BOB));"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different name -\u003e returns false"},{"lineNumber":42,"author":{"gitId":"-"},"content":" EditPersonDescriptor editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withName(VALID_NAME_BOB).build();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" // different phone -\u003e returns false"},{"lineNumber":46,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withPhone(VALID_PHONE_BOB).build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // different email -\u003e returns false"},{"lineNumber":50,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withEmail(VALID_EMAIL_BOB).build();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // different address -\u003e returns false"},{"lineNumber":54,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAddress(VALID_ADDRESS_BOB).build();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" // different tags -\u003e returns false"},{"lineNumber":58,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // different remarks -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // different avatar -\u003e returns false"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAvatar(VALID_AVATAR_BOB).build();"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // different favourite status -\u003e returns false"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withFavourite(VALID_FAVOURITE_BOB).build();"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":16,"-":57}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent_throwsCommandException() throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset_success() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll_success() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" private AddressBook prepareAddressBook() throws DuplicatePersonException {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditTaskCommand."},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandTest {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder().build();"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder(editedTask).build();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(Index.fromZeroBased(3), descriptor);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(3), editedTask);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Index indexLastTask \u003d Index.fromOneBased(model.getFilteredTaskList().size());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask lastTask \u003d model.getFilteredTaskList().get(indexLastTask.getZeroBased());"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" TaskBuilder taskInList \u003d new TaskBuilder(lastTask);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d taskInList.withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(indexLastTask, descriptor);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(lastTask, editedTask);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskInFilteredList \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder(taskInFilteredList).withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK,"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(0), editedTask);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexUnfilteredList_failure() {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex, descriptor);"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" * Edit filtered list where index is larger than size of filtered list,"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * but smaller than size of address book"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexFilteredList_failure() {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex,"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" final EditTaskCommand standardCommand \u003d new EditTaskCommand(INDEX_FIRST_TASK, DESC_PENCIL);"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor copyDescriptor \u003d new EditTaskCommand.EditTaskDescriptor(DESC_PENCIL);"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand commandWithSameValues \u003d new EditTaskCommand(INDEX_FIRST_TASK, copyDescriptor);"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different index -\u003e returns false"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_SECOND_TASK, DESC_PENCIL)));"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // different descriptor -\u003e returns false"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_FIRST_TASK, DESC_PAPER)));"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskCommand} with parameters {@code index} and {@code descriptor}"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private EditTaskCommand prepareCommand(Index index, EditTaskCommand.EditTaskDescriptor descriptor) {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d new EditTaskCommand(index, descriptor);"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" editTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return editTaskCommand;"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":152}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" // different task address -\u003e returns false"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code FindPersonCommand}."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d"},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommand \u003d new FindPersonCommand(firstPredicate);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findSecondCommand \u003d new FindPersonCommand(secondPredicate);"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommandCopy \u003d new FindPersonCommand(firstPredicate);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\" \");"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindPersonCommand}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" */"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" private FindPersonCommand prepareCommand(String userInput) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":89,"author":{"gitId":"-"},"content":" */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindPersonCommand command, String expectedMessage,"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"-":84}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}."},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}."},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/FindTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_TASKS_LISTED_OVERVIEW;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.ACCEPT;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.DATE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.GRADLE;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandTest {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommand \u003d new FindTaskCommand(firstPredicate);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findSecondCommand \u003d new FindTaskCommand(secondPredicate);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommandCopy \u003d new FindTaskCommand(firstPredicate);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void execute_zeroKeywords_noTaskFound() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 0);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\" \");"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public void execute_multipleKeywords_multipleTasksFound() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 3);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\"Resolve Acceptance Date\");"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ACCEPT, DATE, GRADLE));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindTaskCommand}."},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" private FindTaskCommand prepareCommand(String userInput) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * - the {@code FilteredList\u003cReadOnlyTask\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindTaskCommand command, String expectedMessage,"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e expectedList) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedList, model.getFilteredTaskList());"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":97}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code BrowserPanelLocateEvent}"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index."},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}."},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}."},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/NavigateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code NavigateCommand}."},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandTest {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromAddress_success() throws IllegalValueException {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to, null, null, false, false);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromPersons_success() throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromTasks_success() throws IllegalValueException {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidArgs_failure() throws IllegalValueException {"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to,"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand naviOne \u003d prepareCommand(from, to,"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_SECOND_PERSON, false, false);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Executes the input (@code NavigateCommand) and checks that (@code BrowserPanelNavigateEvent) is raised with"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * the correct locations"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(NavigateCommand navi) throws IllegalValueException {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" Location from;"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Location to;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationFrom() !\u003d null) {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d navi.getLocationFrom();"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isFromIsTask()) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredTaskList().get(navi.getFromIndex().getZeroBased())"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredPersonList().get(navi.getFromIndex().getZeroBased())"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationTo() !\u003d null) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d navi.getLocationTo();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isToIsTask()) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredTaskList().get(navi.getToIndex().getZeroBased())"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredPersonList().get(navi.getToIndex().getZeroBased())"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d navi.execute();"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(NavigateCommand.MESSAGE_NAVIGATE_SUCCESS,"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" from, to),"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelNavigateEvent lastEvent \u003d"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelNavigateEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(from, lastEvent.getFromLocation());"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(to, lastEvent.getToLocation());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code NavigateCommand} based on input parameters."},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommand prepareCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d new NavigateCommand(locationFrom, locationTo, fromIndex, toIndex, fromIsTask, toIsTask);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" navi.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return navi;"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":135}},{"path":"src/test/java/seedu/address/logic/commands/OpenCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.OpenCommand.OPEN_COMMAND_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommandTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new OpenCommand().execute();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(OPEN_COMMAND_SUCCESS, result.feedbackToUser);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof OpenRequestEvent);"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/PrivacyLevelCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Assert;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code PrivacyLevelCommand}."},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandTest {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndex_success() {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //valid levels"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand onePlc \u003d prepareCommand(1);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand twoPlc \u003d prepareCommand(2);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand threePlc \u003d prepareCommand(3);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(onePlc);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(twoPlc);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(threePlc);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndex_failure() {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //Negative level"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand negativePlc \u003d prepareCommand(-1);"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //Zero level"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand zeroPlc \u003d prepareCommand(0);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //Level greater than the maximum level allowed"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand tooBigPlc \u003d prepareCommand(5);"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(negativePlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(zeroPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(tooBigPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that the privacy level of the model and each person has been"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * changed to that of the level as specified in the input (@code PrivacyLevelCommand)"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(PrivacyLevelCommand plc) {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" commandResult \u003d plc.execute();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(PrivacyLevelCommand.CHANGE_PRIVACY_LEVEL_SUCCESS, plc.getLevel()),"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //Check the model\u0027s privacy level"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(model.getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //Iterate through the list of persons in the model"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" //Check the person\u0027s Privacy Level"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getAddressBook().getPersonList().get(i);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" //Check Privacy Level of all fields of each person that can be private"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getName().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getPhone().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getEmail().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getAddress().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getRemark().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that a {@code CommandException}"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(PrivacyLevelCommand plc, String expectedMessage) {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" plc.execute();"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Assert.assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}."},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommand prepareCommand(int level) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand privacyLevelCommand \u003d new PrivacyLevelCommand(level);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" privacyLevelCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return privacyLevelCommand;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":116}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RedoCommandTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Collections.emptyList(), Arrays.asList(deletePersonCommandTwo, deletePersonCommandOne));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();"},{"lineNumber":41,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" // multiple commands in redoStack"},{"lineNumber":45,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" // single command in redoStack"},{"lineNumber":49,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" // no command in redoStack"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":8,"-":47}},{"path":"src/test/java/seedu/address/logic/commands/SaveAsCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SaveAsCommand.SAVE_AS_COMMAND_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommandTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new SaveAsCommand().execute();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(SAVE_AS_COMMAND_SUCCESS, result.feedbackToUser);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof SaveAsRequestEvent);"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/SelectPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectPersonCommand}."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandTest {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Rule"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" @Before"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public void setUp() {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommand \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectSecondCommand \u003d new SelectPersonCommand(INDEX_SECOND_PERSON);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommandCopy \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestEvent} is raised with the correct index."},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectPersonCommand.MESSAGE_SUCCESS, index.getOneBased());"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectPersonCommand.execute();"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestEvent lastEvent \u003d"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" * is thrown with the ."},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.execute();"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectPersonCommand} with parameters {@code index}."},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" private SelectPersonCommand prepareCommand(Index index) {"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d new SelectPersonCommand(index);"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" return selectPersonCommand;"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":139}},{"path":"src/test/java/seedu/address/logic/commands/SelectTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandTest {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Before"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void setUp() {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index lastTaskIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size());"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_TASK);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastTaskIndex);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommand \u003d new SelectTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectSecondCommand \u003d new SelectTaskCommand(INDEX_SECOND_TASK);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommandCopy \u003d new SelectTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestTaskEvent} is raised with the correct index."},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectTaskCommand.MESSAGE_SUCCESS, index.getOneBased());"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectTaskCommand.execute();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent lastEvent \u003d"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestTaskEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" * is thrown with the ."},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.execute();"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectTaskCommand} with parameters {@code index}."},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" private SelectTaskCommand prepareCommand(Index index) {"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d new SelectTaskCommand(index);"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" return selectTaskCommand;"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":136}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListValidIndex_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListInvalidIndex_failure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, SetCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(expectedModel);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}."},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":118}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showSecondTaskOnly;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_changeIncompleteTask_failure() throws Exception {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, SetIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(model);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(expectedModel);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}."},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":117}},{"path":"src/test/java/seedu/address/logic/commands/TagListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS_WITH_NEW_TAG;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommandTest {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" private TagListCommand listTagsCommand;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String expectedMessage;"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Before"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cTag\u003e tagList \u003d new ArrayList\u003cTag\u003e();"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand \u003d new TagListCommand();"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder expectedMessageString \u003d new StringBuilder(listTagsCommand.MESSAGE_SUCCESS);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (!tagList.contains(tag)) {"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" tagList.add(tag);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageString.append(\"\u003c\").append(tag.getTagName()).append(\"\u003e \");"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" expectedMessage \u003d expectedMessageString.toString().trim();"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void executeTagListNotEmpty() {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyTagListShowNothing() throws DuplicatePersonException {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModelWithNoTags \u003d new ModelManager();"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessageWithNoTags \u003d listTagsCommand.MESSAGE_FAILURE;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" TagListCommand tagListCommandWithNoTags \u003d new TagListCommand();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" tagListCommandWithNoTags.setData(expectedModelWithNoTags, new CommandHistory(),"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" new UndoRedoStack());"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(tagListCommandWithNoTags, expectedModelWithNoTags,"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageWithNoTags, expectedModelWithNoTags);"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithPersonAdd() throws DuplicatePersonException {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithTagEdited() throws"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" PersonNotFoundException, DuplicatePersonException {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":88}},{"path":"src/test/java/seedu/address/logic/commands/ThemeCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_CHANGE_SUCCESS;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_IN_USE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_NOT_AVAILABLE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandTest {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommand \u003d new ThemeCommand(\"light\");"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkThemeCommand \u003d new ThemeCommand(\"Dark\");"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommand));"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommandCopy \u003d new ThemeCommand(\"light\");"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommandCopy));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(1));"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(null));"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" // different theme -\u003e returns false"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(darkThemeCommand));"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_correctTheme_success() throws CommandException {"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"light\");"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(command, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"light\"));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkCommand \u003d prepareCommand(\"dark\");"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(darkCommand, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"dark\"));"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_wrongArguments_failure() {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"notATheme\");"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_NOT_AVAILABLE, \"notATheme\"));"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_themeAlreadyLoaded_failure() {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"dark\");"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_IN_USE, \"dark\"));"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightCommand \u003d prepareCommand(\"light\");"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(lightCommand, model, String.format(MESSAGE_THEME_IN_USE, \"light\"));"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses {@code userInput} into a {@code ThemeCommand}."},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommand prepareCommand(String userInput) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d new ThemeCommand(userInput);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return command;"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Asserts that {@code command} is successfully executed"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void assertCommandSuccess(ThemeCommand command, String expectedMessage) throws CommandException {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getTheme());"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getUserPrefs().getTheme());"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":98}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class UndoCommandTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() throws Exception {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Arrays.asList(deletePersonCommandOne, deletePersonCommandTwo), Collections.emptyList());"},{"lineNumber":40,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();"},{"lineNumber":41,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.execute();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.execute();"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in undoStack"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":47,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // single command in undoStack"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" // no command in undoStack"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":11,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/commands/UnlockLockCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class UnlockLockCommandTest {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private Model model;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" model \u003d new ModelManager();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public void checkLockFunctionality() throws Exception {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Check initial state is unlocked"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Check that lock works"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Check double lock"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Check that unlock works"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // Check double unlock"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":46}},{"path":"src/test/java/seedu/address/logic/commands/ViewAssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToShow \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(Index.fromZeroBased(5));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, 3);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.viewAssignees(taskToShow);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(viewAssignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommand \u003d new ViewAssignCommand(INDEX_FIRST_TASK);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewSecondCommand \u003d new ViewAssignCommand(INDEX_SECOND_TASK);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommand));"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommandCopy \u003d new ViewAssignCommand(INDEX_FIRST_TASK);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommandCopy));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(1));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(null));"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(viewSecondCommand));"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code ViewAssignCommand} with the parameter {@code index}."},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommand prepareCommand(Index index) {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d new ViewAssignCommand(index);"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" viewAssignCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return viewAssignCommand;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":90}},{"path":"src/test/java/seedu/address/logic/parser/AddPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandParserTest {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // multiple names - last name accepted"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // multiple tags - all accepted"},{"lineNumber":77,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPersonMultipleTags));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" // zero tags"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY,"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPerson));"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":98,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE);"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" // missing name prefix"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB"},{"lineNumber":103,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" // all prefixes missing"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB"},{"lineNumber":107,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":111,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" // invalid phone"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" // invalid email"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":" // invalid tag"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":28,"Esilocke":22,"-":86}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParserTest {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private AddCommandParser parser \u003d new AddCommandParser();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // multiple addresses - last address accepted"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + TASK_ADDRESS_DESC_PAPER + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // invalid deadline"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" // invalid priority"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Priority.MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;"},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":81,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;"},{"lineNumber":84,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":86,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":88,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":92,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":94,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":96,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" private static final boolean DEFAULT_STATE_LOCK \u003d false;"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" AddCommand command \u003d (AddPersonCommand) parser"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(PersonUtil.getAddCommand(person), DEFAULT_STATE_LOCK);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddPersonCommand(person), command);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(TaskUtil.getAddCommand(task), DEFAULT_STATE_LOCK);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddTaskCommand(task), command);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddPersonCommand) parser.parseCommand(AddPersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":125,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(new AddPersonCommand(person), command);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(AddTaskCommand.COMMAND_ALIAS + \" \""},{"lineNumber":130,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(new AddTaskCommand(task), command);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \""},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandPrivacyLevel() throws Exception {"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 1\", DEFAULT_STATE_LOCK)"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 2\", DEFAULT_STATE_LOCK)"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK)"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasPrivacyLevel() throws Exception {"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 1\", DEFAULT_STATE_LOCK)"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 2\", DEFAULT_STATE_LOCK)"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK)"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandTheme() throws Exception {"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" dark\", DEFAULT_STATE_LOCK)"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" light\", DEFAULT_STATE_LOCK)"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasTheme() throws Exception {"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" dark\", DEFAULT_STATE_LOCK)"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" light\", DEFAULT_STATE_LOCK)"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ClearCommand);"},{"lineNumber":228,"author":{"gitId":"-"},"content":" }"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":231,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ClearCommand);"},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":235,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand("},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \""},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand("},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \""},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand("},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand("},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \""},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":260,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":261,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \""},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \""},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":282,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":283,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {"},{"lineNumber":284,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":285,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \""},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \""},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \""},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":296,"author":{"gitId":"-"},"content":" }"},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {"},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \""},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandOpen() throws Exception {"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(OpenCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof OpenCommand);"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(OpenCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof OpenCommand);"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandSaveAs() throws Exception {"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(SaveAsCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof SaveAsCommand);"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(SaveAsCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof SaveAsCommand);"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":350,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":352,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {"},{"lineNumber":353,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ExitCommand);"},{"lineNumber":354,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser"},{"lineNumber":355,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ExitCommand);"},{"lineNumber":356,"author":{"gitId":"-"},"content":" }"},{"lineNumber":357,"author":{"gitId":"-"},"content":""},{"lineNumber":358,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {"},{"lineNumber":360,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand("},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + keywords.stream()"},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate(keywords,"},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" DEFAULT_STATE_LOCK, DEFAULT_STATE_LOCK, false, 0)), command);"},{"lineNumber":371,"author":{"gitId":"-"},"content":" }"},{"lineNumber":372,"author":{"gitId":"-"},"content":""},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {"},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand("},{"lineNumber":377,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + keywords"},{"lineNumber":378,"author":{"gitId":"charlesgoh"},"content":" .stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \""},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate("},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" keywords, DEFAULT_STATE_LOCK, false, false, 0)), command);"},{"lineNumber":386,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":387,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":388,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":389,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":390,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAddTag() throws Exception {"},{"lineNumber":391,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":392,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":393,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":395,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":396,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_WORD"},{"lineNumber":397,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":398,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":399,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":400,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);"},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":402,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":403,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":404,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasAddTag() throws Exception {"},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":406,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":407,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":408,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":409,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":410,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_ALIAS"},{"lineNumber":411,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":412,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":413,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":414,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);"},{"lineNumber":415,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":416,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":417,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":418,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDeleteTag() throws Exception {"},{"lineNumber":419,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":420,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":421,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":422,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":423,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":424,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_WORD"},{"lineNumber":425,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":426,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":427,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":428,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);"},{"lineNumber":429,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":430,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":431,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":432,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDeleteTag() throws Exception {"},{"lineNumber":433,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":434,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":435,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":436,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":438,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_ALIAS"},{"lineNumber":439,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":440,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":441,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":442,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);"},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":444,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":445,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":446,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandTagList() throws Exception {"},{"lineNumber":447,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_WORD,"},{"lineNumber":448,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand"},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasTagList() throws Exception {"},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_ALIAS,"},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":457,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand"},{"lineNumber":458,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":459,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":460,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":461,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":462,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {"},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":465,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":466,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":467,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":468,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":469,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":470,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":471,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":472,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {"},{"lineNumber":473,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":474,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":475,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":476,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":477,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":478,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":479,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":480,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":481,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":482,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavourite() throws Exception {"},{"lineNumber":483,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand("},{"lineNumber":484,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":485,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":486,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":487,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":488,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":489,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":490,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavourite() throws Exception {"},{"lineNumber":491,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand("},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":493,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":494,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":495,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":496,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":497,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":498,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnfavourite() throws Exception {"},{"lineNumber":499,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand("},{"lineNumber":500,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":501,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":502,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":503,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":504,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":505,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":506,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasUnfavourite() throws Exception {"},{"lineNumber":507,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand("},{"lineNumber":508,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":509,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":510,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":511,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":512,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":513,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":514,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavouriteList() throws Exception {"},{"lineNumber":515,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_WORD,"},{"lineNumber":516,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":517,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand"},{"lineNumber":518,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":519,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":520,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":521,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":522,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavouriteList() throws Exception {"},{"lineNumber":523,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_ALIAS,"},{"lineNumber":524,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":525,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand"},{"lineNumber":526,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":527,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":528,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":529,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":530,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":531,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {"},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HelpCommand);"},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HelpCommand);"},{"lineNumber":534,"author":{"gitId":"-"},"content":" }"},{"lineNumber":535,"author":{"gitId":"-"},"content":""},{"lineNumber":536,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":537,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {"},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand"},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":541,"author":{"gitId":"-"},"content":""},{"lineNumber":542,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);"},{"lineNumber":544,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":545,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {"},{"lineNumber":546,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":547,"author":{"gitId":"-"},"content":" }"},{"lineNumber":548,"author":{"gitId":"-"},"content":" }"},{"lineNumber":549,"author":{"gitId":"-"},"content":""},{"lineNumber":550,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":551,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {"},{"lineNumber":552,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":553,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand"},{"lineNumber":554,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":555,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":556,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":557,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);"},{"lineNumber":558,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":559,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {"},{"lineNumber":560,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":561,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":562,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":563,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":564,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":565,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {"},{"lineNumber":566,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":567,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand"},{"lineNumber":568,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":569,"author":{"gitId":"-"},"content":" }"},{"lineNumber":570,"author":{"gitId":"-"},"content":""},{"lineNumber":571,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":572,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {"},{"lineNumber":573,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":574,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand"},{"lineNumber":575,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":576,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":577,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":578,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":579,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {"},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand("},{"lineNumber":581,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":583,"author":{"gitId":"-"},"content":" }"},{"lineNumber":584,"author":{"gitId":"-"},"content":""},{"lineNumber":585,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":586,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {"},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand("},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":590,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":591,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {"},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {"},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandNavigate() throws Exception {"},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand("},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);"},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),"},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" command);"},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasNavigate() throws Exception {"},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand("},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_ALIAS + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);"},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":625,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),"},{"lineNumber":626,"author":{"gitId":"jeffreygohkw"},"content":" command);"},{"lineNumber":627,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":628,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandWord() throws Exception {"},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \""},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)"},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);"},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandAlias() throws Exception {"},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \""},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)"},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);"},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackup() throws Exception {"},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand"},{"lineNumber":647,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);"},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand"},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);"},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeWord() throws Exception {"},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {"},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser"},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand"},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);"},{"lineNumber":658,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeAlias() throws Exception {"},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {"},{"lineNumber":664,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser"},{"lineNumber":665,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand"},{"lineNumber":666,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);"},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":668,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":669,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":670,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandValid() throws Exception {"},{"lineNumber":672,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix"},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix"},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias"},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":686,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandWordInvalid() throws Exception {"},{"lineNumber":690,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":691,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));"},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);"},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandAliasInvalid() throws Exception {"},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));"},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);"},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandValid() throws Exception {"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix"},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix"},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":710,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \""},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":712,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":713,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias"},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD"},{"lineNumber":719,"author":{"gitId":"charlesgoh"},"content":" + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandWordInvalid() throws Exception {"},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));"},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);"},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandAliasInvalid() throws Exception {"},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":732,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));"},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);"},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":735,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":" public void parseChangePasswordCommand() throws Exception {"},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are correct and valid"},{"lineNumber":739,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are wrong but valid"},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":746,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":748,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that have the wrong order (i.e. fields are in the wrong order)"},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \""},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":" // Do the same thing for alias counterparts"},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":770,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":773,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \""},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":783,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":784,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {"},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof RedoCommand);"},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_STATE_LOCK) instanceof RedoCommand);"},{"lineNumber":787,"author":{"gitId":"-"},"content":" }"},{"lineNumber":788,"author":{"gitId":"-"},"content":""},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {"},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD"},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {"},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS"},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {"},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {"},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":819,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":820,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {"},{"lineNumber":821,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof UndoCommand);"},{"lineNumber":822,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_STATE_LOCK) instanceof UndoCommand);"},{"lineNumber":823,"author":{"gitId":"-"},"content":" }"},{"lineNumber":824,"author":{"gitId":"-"},"content":""},{"lineNumber":825,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":826,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {"},{"lineNumber":827,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":828,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":829,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"\", DEFAULT_STATE_LOCK);"},{"lineNumber":830,"author":{"gitId":"-"},"content":" }"},{"lineNumber":831,"author":{"gitId":"-"},"content":""},{"lineNumber":832,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":833,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {"},{"lineNumber":834,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":835,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":836,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_STATE_LOCK);"},{"lineNumber":837,"author":{"gitId":"-"},"content":" }"},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal"},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command"},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command"},{"lineNumber":844,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal"},{"lineNumber":845,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":846,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {"},{"lineNumber":847,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());"},{"lineNumber":848,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":849,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":850,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":851,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":852,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":853,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":854,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":223,"jeffreygohkw":156,"Esilocke":164,"wangyiming1019":201,"-":110}},{"path":"src/test/java/seedu/address/logic/parser/AssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private AssignTaskCommandParser parser \u003d new AssignTaskCommandParser();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new AssignCommand(indexes, INDEX_FIRST_TASK));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + \"aaaaa\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" AssignCommand.MESSAGE_USAGE));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/ClearCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ClearCommandParser parser \u003d new ClearCommandParser();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidType_failure() throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" some invalid value\","},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void parseValidTypes_success() throws ParseException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ClearCommand expectedClearAll \u003d new ClearCommand();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_PERSON.getPrefix()) instanceof ClearPersonCommand);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_TASK.getPrefix()) instanceof ClearTaskCommand);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ClearCommand multipleTypesSpecified \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearPersonCommand);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearTaskCommand);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ClearCommand repeatedTypes \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix() + PREFIX_PERSON.getPrefix() + \" \" + PREFIX_TASK.getPrefix() + \" \");"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearPersonCommand);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearTaskCommand);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":43}},{"path":"src/test/java/seedu/address/logic/parser/DeletePersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * outside of the DeletePersonCommand code. For example, inputs \"1\" and \"1 abc\" take the"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * same path through the DeletePersonCommand, and therefore we test only one of them."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParserTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeletePersonCommand(INDEX_FIRST_PERSON));"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\","},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":8,"-":25}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\","},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new DeleteTaskCommand(INDEX_FIRST_TASK));"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\","},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/DismissCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private DismissTaskCommandParser parser \u003d new DismissTaskCommandParser();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new DismissCommand(indexes, INDEX_FIRST_TASK));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + \"aaaaa\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" DismissCommand.MESSAGE_USAGE));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/EditPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParserTest {"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final String TAG_EMPTY \u003d \" \" + PREFIX_TAG;"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" private EditCommandParser parser \u003d new EditCommandParser();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no index specified"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" // no field specified"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"1\", EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" // no index and no field specified"},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" // negative index"},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" // zero index"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS); // invalid name"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS); // invalid phone"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS); // invalid email"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS); // invalid tag"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" // invalid phone followed by valid email"},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC + EMAIL_DESC_AMY, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone"},{"lineNumber":91,"author":{"gitId":"-"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + PHONE_DESC_BOB + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // while parsing {@code PREFIX_TAG} alone will reset the tags of the {@code Person} being edited,"},{"lineNumber":95,"author":{"gitId":"-"},"content":" // parsing it together with a valid tag results in error"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + TAG_EMPTY, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_EMPTY + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_EMPTY + TAG_DESC_FRIEND + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" // multiple invalid values, but only the first invalid value is captured"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC + INVALID_EMAIL_DESC + VALID_ADDRESS_AMY + VALID_PHONE_AMY,"},{"lineNumber":102,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void parse_allFieldsSpecified_success() {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":108,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":109,"author":{"gitId":"-"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + NAME_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":113,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void parse_someFieldsSpecified_success() {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + EMAIL_DESC_AMY;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)"},{"lineNumber":125,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).build();"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" }"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":132,"author":{"gitId":"-"},"content":" public void parse_oneFieldSpecified_success() {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" // name"},{"lineNumber":134,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":135,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + NAME_DESC_AMY;"},{"lineNumber":136,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY).build();"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" // phone"},{"lineNumber":141,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY;"},{"lineNumber":142,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_AMY).build();"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" // email"},{"lineNumber":147,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_AMY;"},{"lineNumber":148,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withEmail(VALID_EMAIL_AMY).build();"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" // address"},{"lineNumber":153,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + ADDRESS_DESC_AMY;"},{"lineNumber":154,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withAddress(VALID_ADDRESS_AMY).build();"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" // tags"},{"lineNumber":159,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":160,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":168,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":169,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND"},{"lineNumber":170,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)"},{"lineNumber":173,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND)"},{"lineNumber":174,"author":{"gitId":"-"},"content":" .build();"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":181,"author":{"gitId":"-"},"content":" public void parse_invalidValueFollowedByValidValue_success() {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" // no other valid values specified"},{"lineNumber":183,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":184,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + INVALID_PHONE_DESC + PHONE_DESC_BOB;"},{"lineNumber":185,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).build();"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":187,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" // other valid values specified"},{"lineNumber":190,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_BOB + INVALID_PHONE_DESC + ADDRESS_DESC_BOB"},{"lineNumber":191,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB;"},{"lineNumber":192,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).build();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" }"},{"lineNumber":197,"author":{"gitId":"-"},"content":""},{"lineNumber":198,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":199,"author":{"gitId":"-"},"content":" public void parse_resetTags_success() {"},{"lineNumber":200,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":201,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + TAG_EMPTY;"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withTags().build();"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":16,"-":192}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/EditTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TASK_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParserTest {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private EditCommandParser parser \u003d new EditCommandParser();"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no index specified"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + VALID_TASK_NAME_PAPER, MESSAGE_INVALID_FORMAT);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no field specified"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\", EditTaskCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" // no index and no field specified"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" // negative index"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"-5\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // zero index"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"0\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC,"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" TaskName.MESSAGE_NAME_CONSTRAINTS); // invalid name"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC,"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE); // invalid deadline"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_PRIORITY_DESC,"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Priority.MESSAGE_PRIORITY_CONSTRAINTS); // invalid priority"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // invalid phone followed by valid email"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC + PRIORITY_DESC_PAPER,"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + DEADLINE_DESC_PAPER + INVALID_DEADLINE_DESC,"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // multiple invalid values, but only the first invalid value is captured"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC + INVALID_PRIORITY_DESC"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + VALID_DEADLINE_PAPER + VALID_DESCRIPTION_PAPER, TaskName.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public void parse_allFieldsSpecified_success() {"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER + DESCRIPTION_DESC_PAPER"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" + DEADLINE_DESC_PAPER + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void parse_someFieldsSpecified_success() {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER).withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void parse_oneFieldSpecified_success() {"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" // name"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_THIRD_TASK;"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER;"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // phone"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER;"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER).build();"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // email"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DEADLINE_DESC_PAPER;"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" // address"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER;"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" // tags"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL;"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValueFollowedByValidValue_success() {"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" // no other valid values specified"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + INVALID_DEADLINE_DESC + DEADLINE_DESC_PAPER;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" // other valid values specified"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER + INVALID_DEADLINE_DESC"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":194}},{"path":"src/test/java/seedu/address/logic/parser/FIndTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class FIndTaskCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private FindCommandParser parser \u003d new FindCommandParser();"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void parse_emptyArg_throwsParseException() {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsFindCommand() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // no leading and trailing whitespaces"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand expectedFindTaskCommand \u003d"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(\"Lucy\", \"Date\")));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"Lucy Date\", expectedFindTaskCommand);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // multiple whitespaces between keywords"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \" \\n Lucy \\n \\t Date \\t\", expectedFindTaskCommand);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParserTest {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" private FindCommandParser parser \u003d new FindCommandParser();"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void parse_emptyArg_throwsParseException() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsFindCommand() {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" // no leading and trailing whitespaces"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand expectedFindPersonCommand \u003d"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(\"Alice\", \"Bob\")));"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"Alice Bob\", expectedFindPersonCommand);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" // multiple whitespaces between keywords"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \\n Alice \\n \\t Bob \\t\", expectedFindPersonCommand);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":8,"-":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \","},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate("},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/FontSizeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.ACCEPTED_PARAMETERS;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_USAGE;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" private FontSizeCommandParser parser \u003d new FontSizeCommandParser();"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void parse_wrongArguments_failure() {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" // No arguments specified"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" // Wrong arguments specified"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"random input\","},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand expectedCommand;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand actualCommand;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" for (String arg: ACCEPTED_PARAMETERS) {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new FontSizeCommand(arg);"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" // Check for command word"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" // Check for command alias"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectPersonCommandParserTest}."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectPersonCommandParserTest"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/NavigateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@autho jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParserTest {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommandParser parser \u003d new NavigateCommandParser();"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsPresent_success() throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //From address to address"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fata \u003d new NavigateCommand(new Location(\"NUS\"), new Location(\"Sentosa\"),"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" null, null, false, false);"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fata);"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //From address to person"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatp \u003d new NavigateCommand(new Location(\"NUS\"), null,"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_PERSON, false, false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\", fatp);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //From address to task"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatt \u003d new NavigateCommand(new Location(\"NUS\"), null,"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_TASK, false, true);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fatt);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //From person to address"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fpta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, null, false, false);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fpta);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //From person to person"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptp \u003d new NavigateCommand(null, null,"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON, false, false);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fptp);"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" //From person to task"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptt \u003d new NavigateCommand(null, null,"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_SECOND_TASK, false, true);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\", fptt);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //From task to address"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand ftta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, null, true, false);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", ftta);"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" //From task to person"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttp \u003d new NavigateCommand(null, null,"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_THIRD_PERSON, true, false);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fttp);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //From task to task"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttt \u003d new NavigateCommand(null, null,"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fttt);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_repeatedFromAndTos_failure() {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Froms"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Tos"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\","},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingFromOrTo_failure() {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" //No To"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\","},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" //No From"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"NUS\","},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_failure() {"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" //Non positive indices"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"-1\", ParserUtil.MESSAGE_INVALID_INDEX);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":139}},{"path":"src/test/java/seedu/address/logic/parser/ParserUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtilTest {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static final boolean PRIVATE_FIELD \u003d true;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String INVALID_NAME \u003d \"R@chel\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"+651234\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String INVALID_ADDRESS \u003d \" \";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final String INVALID_EMAIL \u003d \"example.com\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_REMARK \u003d \" \";"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_AVATAR \u003d \" \";"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final String INVALID_TAG \u003d \"#friend\";"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_NAME \u003d \" \";"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_DEADLINE \u003d \"The distant, distant past\";"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_PRIORITY \u003d \"99\";"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_ADDRESS \u003d \" \";"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Rachel Walker\";"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"123456\";"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"123 Main Street #0505\";"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"rachel@example.com\";"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_REMARK \u003d \"Thinks that P\u003dNP\";"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_AVATAR \u003d \"valid_file.png\";"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_1 \u003d \"friend\";"},{"lineNumber":60,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_2 \u003d \"neighbour\";"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_NAME \u003d \"Launcher\";"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DESCRIPTION \u003d \"An arbitrary decision\";"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DEADLINE \u003d \"2 weeks later\";"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_PRIORITY \u003d \"3\";"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_ADDRESS \u003d \"NUS\";"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public final ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void parseIndex_invalidInput_throwsIllegalValueException() throws Exception {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(\"10 a\");"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void parseIndex_outOfRangeInput_throwsIllegalValueException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_INVALID_INDEX);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(Long.toString(Integer.MAX_VALUE + 1));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void parseIndex_validInput_success() throws Exception {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" // No whitespaces"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\"1\"));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // Leading and trailing whitespaces"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\" 1 \"));"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void parseName_null_throwsNullPointerException() throws Exception {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" ParserUtil.parseName(null);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseName_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(INVALID_NAME));"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public void parseName_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseName(Optional.empty()).isPresent());"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void parseName_validValue_returnsName() throws Exception {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" Name expectedName \u003d new Name(VALID_NAME);"},{"lineNumber":112,"author":{"gitId":"-"},"content":" Optional\u003cName\u003e actualName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" Name expectedPrivateName \u003d new Name(VALID_NAME, PRIVATE_FIELD);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" Optional\u003cName\u003e actualPrivateName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertEquals(expectedName, actualName.get());"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateName, actualPrivateName.get());"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void parsePhone_null_throwsNullPointerException() throws Exception {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(null);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void parsePhone_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(INVALID_PHONE));"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parsePhone_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parsePhone(Optional.empty()).isPresent());"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void parsePhone_validValue_returnsPhone() throws Exception {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" Phone expectedPhone \u003d new Phone(VALID_PHONE);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" Optional\u003cPhone\u003e actualPhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Phone expectedPrivatePhone \u003d new Phone(VALID_PHONE, PRIVATE_FIELD);"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPhone\u003e actualPrivatePhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(expectedPhone, actualPhone.get());"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivatePhone, actualPrivatePhone.get());"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void parseAddress_null_throwsNullPointerException() throws Exception {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":151,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(null);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" }"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"-"},"content":" public void parseAddress_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":157,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(INVALID_ADDRESS));"},{"lineNumber":158,"author":{"gitId":"-"},"content":" }"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"-"},"content":" public void parseAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseAddress(Optional.empty()).isPresent());"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parseAddress_validValue_returnsAddress() throws Exception {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" Address expectedAddress \u003d new Address(VALID_ADDRESS);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" Optional\u003cAddress\u003e actualAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" Address expectedPrivateAddress \u003d new Address(VALID_ADDRESS, PRIVATE_FIELD);"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAddress\u003e actualPrivateAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertEquals(expectedAddress, actualAddress.get());"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateAddress, actualPrivateAddress.get());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void parseEmail_null_throwsNullPointerException() throws Exception {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":179,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(null);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":183,"author":{"gitId":"-"},"content":" public void parseEmail_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":184,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":185,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(INVALID_EMAIL));"},{"lineNumber":186,"author":{"gitId":"-"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void parseEmail_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseEmail(Optional.empty()).isPresent());"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void parseEmail_validValue_returnsEmail() throws Exception {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" Email expectedEmail \u003d new Email(VALID_EMAIL);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" Optional\u003cEmail\u003e actualEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" Email expectedPrivateEmail \u003d new Email(VALID_EMAIL, PRIVATE_FIELD);"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" Optional\u003cEmail\u003e actualPrivateEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertEquals(expectedEmail, actualEmail.get());"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateEmail, actualPrivateEmail.get());"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_null_throwsNullPointerException() throws Exception {"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(null);"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(Optional.of(INVALID_REMARK));"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseRemark(Optional.empty()).isPresent());"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_validValue_returnsRemark() throws Exception {"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" Remark expectedRemark \u003d new Remark(VALID_REMARK);"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" Remark expectedPrivateRemark \u003d new Remark(VALID_REMARK, PRIVATE_FIELD);"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualPrivateRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedRemark, actualRemark.get());"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateRemark, actualPrivateRemark.get());"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_null_throwsNullPointerException() throws Exception {"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(null);"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(Optional.of(INVALID_AVATAR));"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseAvatar(Optional.empty()).isPresent());"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_validValue_returnsAvatar() throws Exception {"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" Avatar expectedAvatar \u003d new Avatar(VALID_AVATAR);"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAvatar\u003e actualAvatar \u003d ParserUtil.parseAvatar(Optional.of(VALID_AVATAR));"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAvatar, actualAvatar.get());"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void parseTags_null_throwsNullPointerException() throws Exception {"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(null);"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithInvalidTags_throwsIllegalValueException() throws Exception {"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, INVALID_TAG));"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" public void parseTags_emptyCollection_returnsEmptySet() throws Exception {"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertTrue(ParserUtil.parseTags(Collections.emptyList()).isEmpty());"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithValidTags_returnsTagSet() throws Exception {"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e actualTagSet \u003d ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, VALID_TAG_2));"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e expectedTagSet \u003d new HashSet\u003c\u003e(Arrays.asList(new Tag(VALID_TAG_1), new Tag(VALID_TAG_2)));"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTagSet, actualTagSet);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_null_throwsNullPointerException() throws Exception {"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(null);"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(INVALID_TASK_NAME));"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskName(Optional.empty()).isPresent());"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_validValue_returnsTaskName() throws Exception {"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" TaskName expectedTaskName \u003d new TaskName(VALID_TASK_NAME);"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskName\u003e actualTaskName \u003d ParserUtil.parseTaskName(Optional.of(VALID_TASK_NAME));"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskName, actualTaskName.get());"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_null_throwsNullPointerException() throws Exception {"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(null);"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDescription(Optional.empty()).isPresent());"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_validValue_returnsDescription() throws Exception {"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Description expectedDescription \u003d new Description(VALID_DESCRIPTION);"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDescription\u003e actualDescription \u003d ParserUtil.parseDescription(Optional.of(VALID_DESCRIPTION));"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDescription, actualDescription.get());"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_null_throwsNullPointerException() throws Exception {"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(null);"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(INVALID_DEADLINE));"},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDeadline(Optional.empty()).isPresent());"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_validValue_returnsDeadline() throws Exception {"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" Deadline expectedDeadline \u003d new Deadline(VALID_DEADLINE);"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDeadline\u003e actualDeadline \u003d ParserUtil.parseDeadline(Optional.of(VALID_DEADLINE));"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDeadline, actualDeadline.get());"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_null_throwsNullPointerException() throws Exception {"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(null);"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(INVALID_PRIORITY));"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parsePriority(Optional.empty()).isPresent());"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_validValue_returnsPriority() throws Exception {"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" Priority expectedPriority \u003d new Priority(VALID_PRIORITY);"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPriority\u003e actualPriority \u003d ParserUtil.parsePriority(Optional.of(VALID_PRIORITY));"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPriority, actualPriority.get());"},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_null_throwsNullPointerException() throws Exception {"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(null);"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(INVALID_TASK_ADDRESS));"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskAddress(Optional.empty()).isPresent());"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_validValue_returnsTaskAddress() throws Exception {"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" TaskAddress expectedTaskAddress \u003d new TaskAddress(VALID_TASK_ADDRESS);"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskAddress\u003e actualTaskAddress \u003d ParserUtil.parseTaskAddress(Optional.of(VALID_TASK_ADDRESS));"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskAddress, actualTaskAddress.get());"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_null_throwsNullPointerException() throws Exception {"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(null);"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_invalidValue_throwsParseException() throws Exception {"},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(\"1 2 a b c\");"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_validValue_returnsIndexes() throws Exception {"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e expectedIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON,"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" INDEX_THIRD_PERSON));"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\"1 2 3\"));"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\" 1 2 3 \"));"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":260,"-":162}},{"path":"src/test/java/seedu/address/logic/parser/PrivacyLevelCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParserTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommandParser parser \u003d new PrivacyLevelCommandParser();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new PrivacyLevelCommand(INDEX_FIRST_PERSON.getOneBased()));"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"2\", new PrivacyLevelCommand(INDEX_SECOND_PERSON.getOneBased()));"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"3\", new PrivacyLevelCommand(INDEX_THIRD_PERSON.getOneBased()));"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"???\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/test/java/seedu/address/logic/parser/SelectPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Test scope: similar to {@code DeletePersonCommandParserTest}."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandParserTest"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParserTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new SelectPersonCommand(INDEX_FIRST_PERSON));"},{"lineNumber":23,"author":{"gitId":"-"},"content":" }"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":23}},{"path":"src/test/java/seedu/address/logic/parser/SelectTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \" + PREFIX_TASK.getPrefix() + \" 1\","},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new SelectTaskCommand(INDEX_FIRST_TASK));"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \" + PREFIX_TASK.getPrefix() + \" -1\","},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/SetCompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskCompleteCommandParser parser \u003d new SetTaskCompleteCommandParser();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\","},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetCompleteCommand(INDEX_FIRST_TASK));"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\","},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SetIncompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskIncompleteCommandParser parser \u003d new SetTaskIncompleteCommandParser();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\","},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetIncompleteCommand(INDEX_FIRST_TASK));"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\","},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_ORDER_PARAMETERS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" // no list specified"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_FIELD_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0),"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // list is person but field is for tasks"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(5)"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" // list is task but field is for person"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(1) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0)"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // Incorrect test"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\","},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" SortCommand expectedCommand;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" SortCommand actualCommand;"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // For person sorts"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" String list \u003d ACCEPTED_LIST_PARAMETERS.get(0);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" String field \u003d ACCEPTED_FIELD_PARAMETERS.get(0);"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" String order \u003d ACCEPTED_ORDER_PARAMETERS.get(0);"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // For task sorts"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" list \u003d ACCEPTED_LIST_PARAMETERS.get(1);"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" field \u003d ACCEPTED_FIELD_PARAMETERS.get(5);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" order \u003d ACCEPTED_ORDER_PARAMETERS.get(1);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":26,"jeffreygohkw":53}},{"path":"src/test/java/seedu/address/logic/parser/ThemeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParserTest {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommandParser parser \u003d new ThemeCommandParser();"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_emptyArg_throwsParseException() {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand.MESSAGE_USAGE));"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsFindCommand() {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" // no leading and trailing whitespaces"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand expectedFindPersonCommand \u003d"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" new ThemeCommand(\"light\");"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"light\", expectedFindPersonCommand);"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // multiple whitespaces between keywords"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \" light \", expectedFindPersonCommand);"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/ViewAssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommandParser parser \u003d new ViewAssignCommandParser();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsDeleteCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new ViewAssignCommand(INDEX_FIRST_PERSON));"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\","},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice"},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints."},{"lineNumber":190,"author":{"gitId":"-"},"content":" */"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();"},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":" }"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":111,"Esilocke":18,"-":88}},{"path":"src/test/java/seedu/address/model/ModelManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class ModelManagerTest {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void getFilteredPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" modelManager.getFilteredPersonList().remove(0);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /*"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of deleteTag is equals to the expected"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to delete."},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTagValidIndexesAndTagSuccess() throws Exception {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"someTag\", \"friends\").build();"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(\"someTag\");"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(toDelete, indexes);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"friends\").build();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" /*"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of addTag is equals to the expected"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to add."},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void addTagValidIndexesAndTagSuccess() throws Exception {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\").build();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(\"newTag\");"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(toAdd, indexes);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\", \"newTag\").build();"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\", \"newTag\").build();"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBookBuilder().withPerson(ALICE).withPerson(BENSON).build();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" AddressBook differentAddressBook \u003d new AddressBook();"},{"lineNumber":115,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":118,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager(addressBook, userPrefs);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" ModelManager modelManagerCopy \u003d new ModelManager(addressBook, userPrefs);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManagerCopy));"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManager));"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(null));"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(5));"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" // different addressBook -\u003e returns false"},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(differentAddressBook, userPrefs)));"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" // different filteredList -\u003e returns false"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String[] keywords \u003d ALICE.getName().value.split(\"\\\\s+\");"},{"lineNumber":136,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(keywords)));"},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(addressBook, userPrefs)));"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" // resets modelManager to initial state for upcoming tests"},{"lineNumber":140,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" // different userPrefs -\u003e returns true"},{"lineNumber":143,"author":{"gitId":"-"},"content":" UserPrefs differentUserPrefs \u003d new UserPrefs();"},{"lineNumber":144,"author":{"gitId":"-"},"content":" differentUserPrefs.setAddressBookName(\"differentName\");"},{"lineNumber":145,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(new ModelManager(addressBook, differentUserPrefs)));"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":1,"wangyiming1019":82,"-":64}},{"path":"src/test/java/seedu/address/model/UniquePersonListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class UniquePersonListTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" UniquePersonList uniquePersonList \u003d new UniquePersonList();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" uniquePersonList.asObservableList().remove(0);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byName_bothOrders() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e nameComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, nameComparator);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"asc\");"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(nameComparator));"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"desc\");"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byPhone_bothOrders() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e phoneComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, phoneComparator);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"asc\");"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(phoneComparator));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"desc\");"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byEmail_bothOrders() {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e emailComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, emailComparator);"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"asc\");"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(emailComparator));"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"desc\");"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byAddress_bothOrders() {"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e addressComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, addressComparator);"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"asc\");"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(addressComparator));"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"desc\");"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":155,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":136,"-":19}},{"path":"src/test/java/seedu/address/model/UniqueTaskListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Rule;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.UniqueTaskList;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalTasks;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class UniqueTaskListTest {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Rule"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" UniqueTaskList uniquePersonList \u003d new UniqueTaskList();"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" uniquePersonList.asObservableList().remove(0);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byDeadline_bothOrders() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"asc\");"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"desc\");"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byPriority_bothOrders() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return Integer.compare(o1.getPriority().value, o2.getPriority().value);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"asc\");"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"desc\");"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.getIsPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":19}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.getIsPrivate());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":38}},{"path":"src/test/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicateTest {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicate \u003d"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate secondPredicate \u003d"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(secondPredicateKeywordList);"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicate));"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicateCopy \u003d"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(1));"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(null));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(secondPredicate));"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameContainsKeywords_returnsTrue() throws IllegalValueException {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // One keyword"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.singletonList(\"Alice\"));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(testee));"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" testee.getPhone().setPrivate(true);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // Multiple keywords"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Alice\", \"Bob\"));"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Carol\").build();"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // Only one matching keyword"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Bob\", \"Carol\"));"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Carol\").build()));"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" testee.getAddress().setPrivate(true);"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // Mixed-case keywords"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"aLIce\", \"bOB\"));"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // Zero keywords"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.emptyList());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" // Non-matching keyword"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Carol\"));"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" testee.getRemark().setPrivate(true);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice\").withPhone(\"12345\")"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" .withEmail(\"alice@email.com\").withAddress(\"Main Street\").build();"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" // Keywords match phone, email and address, but does not match name"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList("},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" \"12345\", \"alice@email.com\", \"Main\", \"Street\"));"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":113}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name"},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.getIsPrivate());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":24}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getIsPrivate());"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":23}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" // valid deadlines"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"the day after tomorrow\")); // slashes"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"4-11\"));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":25}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"-1\")); // priority out of range"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskContainsKeywordPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicateTest {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d new TaskContainsKeywordPredicate(secondPredicateKeywordList);"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate thirdPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicate));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicateCopy \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(1));"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(null));"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different keywords -\u003e returns false"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(secondPredicate));"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(thirdPredicate));"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void test_nameContainsKeywords_returnsTrue() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // One keyword"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pen\").build()));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // Zero keywords"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.emptyList());"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy\").build()));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // Non-matching keyword"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pen\"));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void test_descriptionContainsKeywords_returnsTrue() {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // One keyword"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy 3 Pencil\").build()));"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pen\").build()));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void priorityMatches() {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // Priority level equal to required level"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // Priority level greater than required level"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"4\").build()));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // Priority level less than required level"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" // Name matches, priority check not required, even though priority level does not match"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" false, false, false, 3);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Priority matches, but name does not match"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" public void stateMatches() {"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" // States are equivalent"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // States are different"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" // Name matches, state check not required, even though state does not match"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // State matches, but name does not match"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" public void combinationTests() {"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" // At most 1 invalid input per test case"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" // Matches all"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencil now\")"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" // Name does not match, but description does"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Get something\").withDescription(\"Get 3 Pencil now\")"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" // Description does not match, but name does"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy 3 Pencil\").withDescription(\"Get something\")"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but priority does not"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"2\").withState(true).build()));"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but state does not"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(false).build()));"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":182}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));"},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class."},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class."},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),"},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called"},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder"},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored."},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method"},{"lineNumber":61,"author":{"gitId":"-"},"content":" */"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back"},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back"},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));"},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path"},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified"},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}."},{"lineNumber":112,"author":{"gitId":"-"},"content":" */"},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));"},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());"},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" descriptor.setAvatar(person.getAvatar());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":54,"author":{"gitId":"-"},"content":" */"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":66,"author":{"gitId":"-"},"content":" */"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"remark is expected to be unique.\");"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Avatar} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withAvatar(String avatar) {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseAvatar(Optional.of(avatar)).ifPresent(descriptor::setAvatar);"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"avatar is expected to be unique.\");"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" //@author"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * that we are building."},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":135,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {"},{"lineNumber":136,"author":{"gitId":"-"},"content":" return descriptor;"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":40,"Esilocke":1,"wangyiming1019":9,"-":88}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskAddress(task.getTaskAddress());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskAddress(String address) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(address)).ifPresent(descriptor::setTaskAddress);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return descriptor;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":101}},{"path":"src/test/java/seedu/address/testutil/ModelStub.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * A default model stub that have all of the methods failing."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class ModelStub implements Model {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public void setMainWindow(MainWindow mainWindow) {"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throws DuplicatePersonException {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public void sortTasks(String field, String order) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" return 0;"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" return null;"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return null;"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" return null;"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public boolean getLockState() {"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public void lockAddressBookFromModel() {"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void unlockAddressBookFromModel() {"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called\");"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":17,"jeffreygohkw":37,"Esilocke":153,"wangyiming1019":24,"-":1}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class PersonBuilder {"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_AVATAR \u003d \"\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private Person person;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" public PersonBuilder() {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Avatar defaultAvatar \u003d new Avatar(DEFAULT_AVATAR);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" defaultRemark, defaultAvatar, defaultTags);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building."},{"lineNumber":59,"author":{"gitId":"-"},"content":" */"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building."},{"lineNumber":71,"author":{"gitId":"-"},"content":" */"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));"},{"lineNumber":75,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building."},{"lineNumber":83,"author":{"gitId":"-"},"content":" */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));"},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withAvatar(String filepath) {"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.person.setAvatar(new Avatar(filepath));"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Avatar is invalid\");"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":119,"author":{"gitId":"-"},"content":" */"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));"},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building."},{"lineNumber":131,"author":{"gitId":"-"},"content":" */"},{"lineNumber":132,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));"},{"lineNumber":135,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building."},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":149,"author":{"gitId":"-"},"content":" public Person build() {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" return this.person;"},{"lineNumber":151,"author":{"gitId":"-"},"content":" }"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":34,"wangyiming1019":12,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects."},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().getIsPrivate());"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().getIsPrivate());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().getIsPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().getIsPrivate());"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(person.getRemark().getIsPrivate());"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code remarkIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setRemarkPrivate(String remark) {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":106}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * A utility class for Person."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonUtil {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand.COMMAND_WORD + \" \" + getPersonDetails(person);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details."},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" sb.append(PREFIX_NAME + person.getName().value + \" \");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");"},{"lineNumber":34,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_AVATAR + person.getAvatar().value + \" \");"},{"lineNumber":37,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach("},{"lineNumber":38,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")"},{"lineNumber":39,"author":{"gitId":"-"},"content":" );"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":1,"Esilocke":2,"-":35}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_ADDRESS \u003d \"12 Kent Ridge Crescent, 119275\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Task task;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" TaskAddress defaultAddress \u003d new TaskAddress(DEFAULT_ADDRESS);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState, defaultAddress);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building."},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building."},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building."},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building."},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building."},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code Task} that we are building."},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskAddress(String address) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskAddress(new TaskAddress(address));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Assignees} of the {@code Task} that we are building."},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withAssignees(String... args) {"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" for (String s : args) {"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromOneBased(Integer.parseInt(s)));"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" this.task.setAssignees(new Assignees(indexes));"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public Task build() {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return this.task;"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":135}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + Integer.toString(task.getPriority().value) + \" \");"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_ADDRESS + task.getTaskAddress().taskAddress + \" \");"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return sb.toString();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests."},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_CHRIS;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_CHRIS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_ALICE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_CHRIS;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_CHRIS;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_CHRIS;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests."},{"lineNumber":33,"author":{"gitId":"-"},"content":" */"},{"lineNumber":34,"author":{"gitId":"-"},"content":"public class TypicalPersons {"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")"},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")"},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_AMY)"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_BOB)"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS).withEmail(VALID_EMAIL_CHRIS)"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" .withAddress(VALID_ADDRESS_CHRIS).withFavourite(VALID_FAVOURITE_ALICE)"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_CHRIS)"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_CHRISTAG).build();"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS_WITH_NEW_TAG \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS)"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_CHRIS).withAddress(VALID_ADDRESS_CHRIS)"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_CHRIS)"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" .withTags(\"friends\").build();"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":88,"author":{"gitId":"-"},"content":" */"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":91,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" ab.addPerson(person);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assert false : \"not possible\";"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" return ab;"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":18,"wangyiming1019":32,"-":64}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").withAssignees(\"4\")"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"21 Heng Mui Keng Terrace, #02-01-01 I-Cube Building\").build();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\").withState(true)"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").withTaskAddress(\"Tampines Mall\").build();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).withTaskAddress(\"27 Prince George\u0027s Park\")"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .build();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").withTaskAddress(\"Central Park\").build();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").withTaskAddress(\"16 Gemmill Ln\").build();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).withAssignees(\"1\", \"2\", \"3\")"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"NUS School of Computing, COM1, 13 Computing Drive, 117417\").build();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\")"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"Changi Airport\").build();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL)"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String KEYWORD_MATCHING_LUCY \u003d \"Lucy\"; // A keyword that matches LUCY"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_PREFIX;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_SUFFIX;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelNavigateEvent panelNavigateEventStub;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() throws IllegalValueException {"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" panelNavigateEventStub \u003d new BrowserPanelNavigateEvent(new Location(\"NUS\"),"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" new Location(BENSON.getAddress().toString()));"},{"lineNumber":44,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());"},{"lineNumber":45,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // default web page"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelNavigateEventStub);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDirUrl \u003d new URL(GOOGLE_MAPS_DIRECTIONS_PREFIX"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026origin\u003d\""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getFromLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getToLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDirUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":47,"-":31}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultiplier());"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags"},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card"},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" });"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock"},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock"},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated"},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());"},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // no tags"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public void equals() {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}."},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":89,"Esilocke":1}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final JumpToListRequestTaskEvent JUMP_TO_SECOND_EVENT \u003d new"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent(INDEX_SECOND_PERSON);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void handleJumpToListRequestTaskEvent() {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"}"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""}],"authorContributionMap":{"charlesgoh":57,"Esilocke":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing."},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":22,"-":80}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards."},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPerson.getName().value, actualCard.getName());"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),"},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}."},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTask.getPriority().toString(), actualCard.getPriority());"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":1,"Esilocke":1,"-":71}},{"path":"src/test/java/systemtests/AddPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * -\u003e added"},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + AddPersonCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */"},{"lineNumber":90,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in"},{"lineNumber":92,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void addSecondTest() throws Exception {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void addThirdTest() throws Exception {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */"},{"lineNumber":134,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()"},{"lineNumber":150,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public void addFourthTest() throws Exception {"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */"},{"lineNumber":161,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" 1\");"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */"},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */"},{"lineNumber":184,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);"},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":196,"author":{"gitId":"-"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":206,"author":{"gitId":"-"},"content":" }"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Executes the {@code AddPersonCommand} that adds {@code toAdd} to the model and verifies that the command box"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * displays an empty string, the result display box displays the success message of executing"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * {@code AddPersonCommand} with the details of {@code toAdd}, and the model related components equal to the"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" * current model added with {@code toAdd}."},{"lineNumber":213,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":214,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,"},{"lineNumber":216,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged."},{"lineNumber":217,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":218,"author":{"gitId":"-"},"content":" */"},{"lineNumber":219,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":""},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}"},{"lineNumber":225,"author":{"gitId":"-"},"content":" * instead."},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)"},{"lineNumber":227,"author":{"gitId":"-"},"content":" */"},{"lineNumber":228,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {"},{"lineNumber":229,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(AddPersonCommand.MESSAGE_SUCCESS, toAdd);"},{"lineNumber":236,"author":{"gitId":"-"},"content":""},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":238,"author":{"gitId":"-"},"content":" }"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * {@code expectedModel}."},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)"},{"lineNumber":245,"author":{"gitId":"-"},"content":" */"},{"lineNumber":246,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":247,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":255,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":256,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":257,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":258,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":260,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":261,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":262,"author":{"gitId":"-"},"content":" */"},{"lineNumber":263,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":268,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":270,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":271,"author":{"gitId":"-"},"content":" }"},{"lineNumber":272,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":50,"Esilocke":30,"-":192}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * for test verification."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @ClassRule"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d"},{"lineNumber":52,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initializeStage();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" public BrowserPanelHandle getBrowserPanel() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated."},{"lineNumber":106,"author":{"gitId":"-"},"content":" */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" rememberStates();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar"},{"lineNumber":110,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command."},{"lineNumber":111,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());"},{"lineNumber":116,"author":{"gitId":"-"},"content":" }"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":119,"author":{"gitId":"-"},"content":" * Displays all persons in the address book."},{"lineNumber":120,"author":{"gitId":"-"},"content":" */"},{"lineNumber":121,"author":{"gitId":"-"},"content":" protected void showAllPersons() {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d getModel().getFilteredPersonList().size();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive)."},{"lineNumber":128,"author":{"gitId":"-"},"content":" */"},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + keyword);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size();"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list."},{"lineNumber":136,"author":{"gitId":"-"},"content":" */"},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" \" + index.getOneBased());"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getPersonListPanel().getSelectedCardIndex() \u003d\u003d index.getZeroBased();"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly."},{"lineNumber":146,"author":{"gitId":"-"},"content":" */"},{"lineNumber":147,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,"},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());"},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":157,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * their current state."},{"lineNumber":159,"author":{"gitId":"-"},"content":" */"},{"lineNumber":160,"author":{"gitId":"-"},"content":" private void rememberStates() {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" getBrowserPanel().rememberUrl();"},{"lineNumber":163,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();"},{"lineNumber":164,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();"},{"lineNumber":165,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();"},{"lineNumber":166,"author":{"gitId":"-"},"content":" }"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details"},{"lineNumber":170,"author":{"gitId":"-"},"content":" * of the previously selected person."},{"lineNumber":171,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()"},{"lineNumber":172,"author":{"gitId":"-"},"content":" */"},{"lineNumber":173,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());"},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at"},{"lineNumber":180,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected."},{"lineNumber":181,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":183,"author":{"gitId":"-"},"content":" */"},{"lineNumber":184,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {"},{"lineNumber":185,"author":{"gitId":"-"},"content":" String selectedCardName \u003d getPersonListPanel().getHandleToSelectedCard().getName();"},{"lineNumber":186,"author":{"gitId":"-"},"content":" URL expectedUrl;"},{"lineNumber":187,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" expectedUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX + selectedCardName.replaceAll(\" \", \"+\")"},{"lineNumber":189,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":190,"author":{"gitId":"-"},"content":" } catch (MalformedURLException mue) {"},{"lineNumber":191,"author":{"gitId":"-"},"content":" throw new AssertionError(\"URL expected to be valid.\");"},{"lineNumber":192,"author":{"gitId":"-"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" //TODO Might need to remove this as the person panel no longer involves google search."},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //assertEquals(expectedUrl, getBrowserPanel().getLoadedUrl());"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":200,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged."},{"lineNumber":201,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":203,"author":{"gitId":"-"},"content":" */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style."},{"lineNumber":211,"author":{"gitId":"-"},"content":" */"},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style."},{"lineNumber":218,"author":{"gitId":"-"},"content":" */"},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":""},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same."},{"lineNumber":225,"author":{"gitId":"-"},"content":" */"},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {"},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same."},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);"},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());"},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }"},{"lineNumber":243,"author":{"gitId":"-"},"content":""},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct."},{"lineNumber":246,"author":{"gitId":"-"},"content":" */"},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());"},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());"},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());"},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertEquals(MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE), getBrowserPanel().getLoadedUrl());"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());"},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());"},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {"},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model."},{"lineNumber":262,"author":{"gitId":"-"},"content":" */"},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();"},{"lineNumber":265,"author":{"gitId":"-"},"content":" }"},{"lineNumber":266,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":6,"-":260}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void clear() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared"},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void clearTestTwo() throws Exception {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":44,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":50,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model."},{"lineNumber":65,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes."},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}."},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)"},{"lineNumber":79,"author":{"gitId":"-"},"content":" */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":89,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":90,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":3,"Esilocke":5,"-":97}},{"path":"src/test/java/systemtests/DeletePersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeletePersonCommand.MESSAGE_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getLastIndex;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getMidIndex;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_DELETE_COMMAND_FORMAT \u003d"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void delete() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" /* ----------------- Performing delete operation while an unfiltered list is being shown -------------------- */"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: delete the first person in the list, command with leading spaces and trailing spaces -\u003e deleted */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + DeletePersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";"},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: delete the last person in the list -\u003e deleted */"},{"lineNumber":41,"author":{"gitId":"-"},"content":" Model modelBeforeDeletingLast \u003d getModel();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d getLastIndex(modelBeforeDeletingLast);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(lastPersonIndex);"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" /* Case: undo deleting the last person in the list -\u003e last person restored */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: redo deleting the last person in the list -\u003e last person deleted again */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" removePerson(modelBeforeDeletingLast, lastPersonIndex);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: delete the middle person in the list -\u003e deleted */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" Index middlePersonIndex \u003d getMidIndex(getModel());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(middlePersonIndex);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ------------------ Performing delete operation while a filtered list is being shown ---------------------- */"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book and person list -\u003e deleted */"},{"lineNumber":63,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" assertCommandSuccess(index);"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book but out of bounds of person list"},{"lineNumber":69,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":70,"author":{"gitId":"-"},"content":" */"},{"lineNumber":71,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + invalidIndex;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /* --------------------- Performing delete operation while a person card is selected ------------------------ */"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: delete the selected person -\u003e person list panel selects the person before the deleted person */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" Index selectedIndex \u003d getLastIndex(expectedModel);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" Index expectedIndex \u003d Index.fromZeroBased(selectedIndex.getZeroBased() - 1);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" selectPerson(selectedIndex);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + selectedIndex.getOneBased();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" deletedPerson \u003d removePerson(expectedModel, selectedIndex);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, expectedIndex);"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid delete operation ------------------------------------ */"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" 0\";"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" -1\";"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":100,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased("},{"lineNumber":101,"author":{"gitId":"-"},"content":" getModel().getAddressBook().getPersonList().size() + 1);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + outOfBoundsIndex.getOneBased();"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" 1 abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertCommandFailure(\"DelETE 1\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Removes the {@code ReadOnlyPerson} at the specified {@code index} in {@code model}\u0027s address book."},{"lineNumber":117,"author":{"gitId":"-"},"content":" * @return the removed person"},{"lineNumber":118,"author":{"gitId":"-"},"content":" */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" private ReadOnlyPerson removePerson(Model model, Index index) {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" ReadOnlyPerson targetPerson \u003d getPerson(model, index);"},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" model.deletePerson(targetPerson);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new AssertionError(\"targetPerson is retrieved from model.\");"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return targetPerson;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" * Deletes the person at {@code toDelete} by creating a default {@code DeletePersonCommand} using"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" * {@code toDelete} and performs the same verification as {@code assertCommandSuccess(String, Model, String)}."},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)"},{"lineNumber":133,"author":{"gitId":"-"},"content":" */"},{"lineNumber":134,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Index toDelete) {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":136,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, toDelete);"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertCommandSuccess("},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand.COMMAND_WORD + \" \" + toDelete.getOneBased(),"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" expectedModel, expectedResultMessage);"},{"lineNumber":142,"author":{"gitId":"-"},"content":" }"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":149,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card remains unchanged.\u003cbr\u003e"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":153,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}."},{"lineNumber":154,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":155,"author":{"gitId":"-"},"content":" */"},{"lineNumber":156,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":158,"author":{"gitId":"-"},"content":" }"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String)} except that the browser url"},{"lineNumber":162,"author":{"gitId":"-"},"content":" * and selected card are expected to update accordingly depending on the card at {@code expectedSelectedCardIndex}."},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":165,"author":{"gitId":"-"},"content":" */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":168,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":186,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":187,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":188,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":190,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":191,"author":{"gitId":"-"},"content":" */"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":193,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":199,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":200,"author":{"gitId":"-"},"content":" }"},{"lineNumber":201,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":21,"-":180}},{"path":"src/test/java/systemtests/EditPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited"},{"lineNumber":64,"author":{"gitId":"-"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson("},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public void editThree() throws Exception {"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":128,"author":{"gitId":"-"},"content":" */"},{"lineNumber":129,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" public void editFourth() throws Exception {"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" int invalidIndex;"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * browser url changes"},{"lineNumber":148,"author":{"gitId":"-"},"content":" */"},{"lineNumber":149,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":150,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":151,"author":{"gitId":"-"},"content":" selectPerson(index);"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":154,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the"},{"lineNumber":155,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" //TODO rewrite GUI check for this as select no longer displays google searches"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":170,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":172,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public void editFive() throws Exception {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + NAME_DESC_BOB,"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" public void editSix() throws Exception {"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */"},{"lineNumber":217,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));"},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));"},{"lineNumber":219,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":232,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged."},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)"},{"lineNumber":236,"author":{"gitId":"-"},"content":" */"},{"lineNumber":237,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);"},{"lineNumber":239,"author":{"gitId":"-"},"content":" }"},{"lineNumber":240,"author":{"gitId":"-"},"content":""},{"lineNumber":241,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditPersonCommand}.\u003cbr\u003e"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list."},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":248,"author":{"gitId":"-"},"content":" */"},{"lineNumber":249,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,"},{"lineNumber":250,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":251,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":252,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":253,"author":{"gitId":"-"},"content":" expectedModel.updatePerson("},{"lineNumber":254,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);"},{"lineNumber":255,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {"},{"lineNumber":257,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException("},{"lineNumber":258,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }"},{"lineNumber":260,"author":{"gitId":"-"},"content":""},{"lineNumber":261,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson), expectedSelectedCardIndex);"},{"lineNumber":263,"author":{"gitId":"-"},"content":" }"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged."},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":269,"author":{"gitId":"-"},"content":" */"},{"lineNumber":270,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":271,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":272,"author":{"gitId":"-"},"content":" }"},{"lineNumber":273,"author":{"gitId":"-"},"content":""},{"lineNumber":274,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":275,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":276,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":277,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":278,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":279,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at"},{"lineNumber":280,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e"},{"lineNumber":281,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":282,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":283,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":284,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":285,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":286,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":287,"author":{"gitId":"-"},"content":" */"},{"lineNumber":288,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":289,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":290,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":291,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":292,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":293,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":296,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":297,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":298,"author":{"gitId":"-"},"content":" }"},{"lineNumber":299,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":300,"author":{"gitId":"-"},"content":" }"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":303,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":304,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":305,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":306,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":307,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":308,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":309,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":310,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":311,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":312,"author":{"gitId":"-"},"content":" */"},{"lineNumber":313,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":314,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":315,"author":{"gitId":"-"},"content":""},{"lineNumber":316,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":317,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":318,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":319,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":320,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":321,"author":{"gitId":"-"},"content":" }"},{"lineNumber":322,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":49,"Esilocke":40,"-":233}},{"path":"src/test/java/systemtests/FindPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void find() {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, command with leading spaces and trailing spaces"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER + \" \";"},{"lineNumber":32,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL); // first names of Benson and Daniel are \"Meier\""},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" /* Case: repeat previous find command where person list is displaying the persons we are finding"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found"},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /* Case: find person where person list is not displaying the person we are finding -\u003e 1 person found */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Carl\";"},{"lineNumber":46,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, CARL);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords -\u003e 2 persons found */"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Benson Daniel\";"},{"lineNumber":52,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords in reversed order -\u003e 2 persons found */"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson\";"},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords with 1 repeat -\u003e 2 persons found */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson Daniel\";"},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 matching keywords and 1 non-matching keyword"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson NonMatchingKeyWord\";"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo previous find command -\u003e rejected */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo previous find command -\u003e rejected */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: find same persons in address book after deleting 1 of them -\u003e 1 person found */"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" executeCommand(DeletePersonCommand.COMMAND_WORD + \" 1\");"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert !getModel().getAddressBook().getPersonList().contains(BENSON);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is same as name but of different case -\u003e 1 person found */"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" MeIeR\";"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is substring of name -\u003e 0 persons found */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mei\";"},{"lineNumber":99,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: find person in address book, name is substring of keyword -\u003e 0 persons found */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Meiers\";"},{"lineNumber":105,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: find person not in address book -\u003e 0 persons found */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mark\";"},{"lineNumber":111,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /* Case: find phone number of person in address book -\u003e 0 persons found */"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getPhone().value;"},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: find address of person in address book -\u003e 0 persons found */"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getAddress().value;"},{"lineNumber":121,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" /* Case: find email of person in address book -\u003e 0 persons found */"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getEmail().value;"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /* Case: find tags of person in address book -\u003e 0 persons found */"},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cTag\u003e tags \u003d new ArrayList\u003c\u003e(DANIEL.getTags());"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + tags.get(0).tagName;"},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: find while a person is selected -\u003e selected card deselected */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":137,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" assert !getPersonListPanel().getHandleToSelectedCard().getName().equals(DANIEL.getName().value);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel\";"},{"lineNumber":140,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);"},{"lineNumber":141,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: find person in empty address book -\u003e 0 persons found */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;"},{"lineNumber":148,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();"},{"lineNumber":149,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" command \u003d \"FiNd Meier\";"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":160,"author":{"gitId":"-"},"content":" * box displays {@code Messages#MESSAGE_PERSONS_LISTED_OVERVIEW} with the number of people in the filtered list,"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the model related components equal to {@code expectedModel}."},{"lineNumber":162,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":163,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Also verifies that the status bar remains unchanged, and the command box has the default style class, and the"},{"lineNumber":165,"author":{"gitId":"-"},"content":" * selected card updated accordingly, depending on {@code cardStatus}."},{"lineNumber":166,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":167,"author":{"gitId":"-"},"content":" */"},{"lineNumber":168,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel) {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format("},{"lineNumber":170,"author":{"gitId":"-"},"content":" MESSAGE_PERSONS_LISTED_OVERVIEW, expectedModel.getFilteredPersonList().size());"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":180,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":181,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":185,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":186,"author":{"gitId":"-"},"content":" */"},{"lineNumber":187,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":189,"author":{"gitId":"-"},"content":""},{"lineNumber":190,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":193,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }"},{"lineNumber":196,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":1,"Esilocke":22,"-":173}},{"path":"src/test/java/systemtests/SelectPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.SelectPersonCommand.MESSAGE_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void select() {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" /* Case: select the first card in the person list, command with leading spaces and trailing spaces"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * -\u003e selected"},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /* Case: select the last card in the person list -\u003e selected */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + personCount.getOneBased();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, personCount);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: undo previous selection -\u003e rejected */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /* Case: redo selecting last card in the list -\u003e rejected */"},{"lineNumber":40,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public void selectSecondTest() throws Exception {"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: select the middle card in the person list -\u003e selected */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" Index middleIndex \u003d Index.fromOneBased(personCount.getOneBased() / 2);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + middleIndex.getOneBased();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":56,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* Case: select the current selected card -\u003e selected */"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book but out of bounds of person list"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" public void selectThirdTest() throws Exception {"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book and person list -\u003e selected */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Index validIndex \u003d Index.fromOneBased(1);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" assert validIndex.getZeroBased() \u003c getModel().getFilteredPersonList().size();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + validIndex.getOneBased();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, validIndex);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + 0,"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + -1,"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" abc\","},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void selectFourthTest() throws Exception {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" 1 abc\","},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandFailure(\"SeLeCt 1\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: select from empty address book -\u003e rejected */"},{"lineNumber":109,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":112,"author":{"gitId":"-"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * box displays the success message of executing select command with the {@code expectedSelectedCardIndex}"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * of the selected person, and the model related components equal to the current model."},{"lineNumber":119,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":120,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar remain unchanged. The resulting"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * browser url and selected card will be verified if the current selected card and the card at"},{"lineNumber":123,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex} are different."},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":126,"author":{"gitId":"-"},"content":" */"},{"lineNumber":127,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index expectedSelectedCardIndex) {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format("},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" MESSAGE_SUCCESS, expectedSelectedCardIndex.getOneBased());"},{"lineNumber":131,"author":{"gitId":"-"},"content":" int preExecutionSelectedCardIndex \u003d getPersonListPanel().getSelectedCardIndex();"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" if (preExecutionSelectedCardIndex \u003d\u003d expectedSelectedCardIndex.getZeroBased()) {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":143,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":144,"author":{"gitId":"-"},"content":" }"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":149,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":153,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":154,"author":{"gitId":"-"},"content":" */"},{"lineNumber":155,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":160,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":18,"Esilocke":21,"-":125}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,"},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" });"},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":70}}] +[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"image::images/Ui.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"endif::[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface).","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"* It is a Java application primarily targeted for students doing group projects.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Site Map","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Acknowledgements","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"_Marco Jakob_.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":36}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Goh Chang Kang, Charles","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[https://github.com/charlesgoh[github]]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert, Password Security Commands","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Jeffrey Goh Keng Wee","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Lin Ziwen Kelvin","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esilocke[github]]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Wang Yiming","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1019[github]]","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18,"Esilocke":4,"-":26}},{"path":"docs/ContactUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Contact Us","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"* *Bug reports, Suggestions* : Post in our https://github.com/CS2103AUG2017-W09-B2/main/issues[issue tracker] if you noticed bugs or have suggestions on how to improve.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"* *Contributing* : We welcome pull requests. Follow the process described https://github.com/oss-generic/process[here]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"* *Email us* : You can also reach us at `e0014961 [at] u.nus.edu`","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":4}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started].","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyTask\u003e` that can be \u0027observed\u0027.","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `Storage` component,","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package.","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.1 : Using the UI to change font size_","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size:","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"1. `onAction` handlers are used to handle UI font size buttons. These handlers will post","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"new events via `ComponentManager`.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":"2. CLI commands also post new events to handle font size changes, when the relevant command is entered (e.g. `fontsize increase`).","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeChangeSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.2 : Sequence diagram for fontsize changing_","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"From the sequence diagram above, we can observe that the font size changes are handled by subscriber functions in PersonListPanel","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"and TaskListPanel.","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"The initial implementation required access to the model from the UI. This implementation was replaced with one that","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"standardised the handling of font size change requests through events.","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Use either UI or CLI based implementations +","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implementing both UI and CLI functionality +","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More options for the user. Not much increase in complexity when implementing the CLI version +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Cons:** This implementation required passing information between classes, which may cause unnecessary coupling. +","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implementing only UI functionality +","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Less tedious to implement and very intuitive for the user +","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Users who prefer typing commands will not have the option of editing their font sizes using the CLI","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"charlesgoh"},"content":"//tag::avatar[]","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatar on ViewPersonPanel","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":"The following function allows the setting of URL for the `ImageView` attribute within the `ViewPersonPanel` class:","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":"[source,java]","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":"private void initializeAvatar() {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" String avatarPath \u003d person.getAvatar().value;","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" if (!avatarPath.equals(\"\")) {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Initializing avatar to image at saved URL\");","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" Image newImage \u003d new Image(avatarPath);","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":" avatarImage.setImage(newImage);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":"The `initializeAvatar` method piggybacks on the `handlePersonPanelSelectionChangedEvent` event handler. Whenever there is","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":"a change in the person selection panel, this function will call the `initializeAvatar` method, which will update","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"the `ImageView` attribute.","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":"[source,java]","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":"@Subscribe","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":"private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" this.person \u003d event.getNewSelection().person;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" initializeWithPerson(person);","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":"As of v1.5, the avatar field supports only URLs sourced online. References to local files may work but require the","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"prefix \"file:\"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"//tag::undoredo[]","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.1 : Command inheritance_","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" // ... list logic ...","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" // ... undo logic ...","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" executeUndoableCommand();","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" // ... delete logic ...","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.2 : Initial status of undo/redo stack_","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.3 : After executing `delete 5`_","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.4 : Executing undo_","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.5 : Undo/redo sequence diagram_","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.6 : Executing `clear`_","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.7 : Stack is not changed after `list`_","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.8 : Undo/Redo activity diagram_","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"// tag::task[]","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the `add`, `delete`, `find`, `select`, and `edit` commands.","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Object inheritance is thus used to create the commands that are shared with those used to handle Person objects.","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task-related Command implementation","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"An example of using inheritance to handle Person vs Task addition:","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand(toAdd);","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand(toAdd);","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"The Parser in charge of the command will thus return either an AddPersonCommand, or an AddTaskCommand, depending on whether you specify to add a Task or not in the arguments.","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":" +","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.1.1 : Sequence Diagram for adding a Task_","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task structure and subclasses","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"The Task object has several subclasses, which store information about the task. The following class diagram illustrates the structure of a Task object.","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"image::TaskClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.2.1 : Class Diagram for the Task class_","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"Each subclass contains its own methods for input validation, and the Assignees class supports some methods for changing its assignedList.","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task Object Storage","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"[source, xml]","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Task objects are stored in a similar manner to Person objects, and share the same level of hierarchy as Person objects. During startup, tasks are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book.","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use inheritance to implement different commands for Task and Person objects +","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"**Pros:** Can be easily extended to allow handling of other types of objects, and preserves Separation of Concerns. +","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"**Cons:** Minor code duplication occurs as the commands for Person and Tasks objects share the same structure. +","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Use polymorphism to allow existing commands to implement task handling +","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"**Pros:** Code duplication is kept to a minimum as the Command will handle Task and Person objects in the same class. +","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"**Cons:** Single Responsibility Principle is violated as each Command class now needs to handle 2 different types of objects. +","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes. +","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa. +","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage. +","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"// end::task[]","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign and Dismiss Commands","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"The `assign` and `dismiss` command allows you to assign contacts to and from your tasks, thus aiding coordination and collaboration. +","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"The Assignees class stores information related to who is assigned to a particular task through maintaining an internal ArrayList that keeps track of all the indexes of the people who are assigned to the task. +","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"The indexes stored in the Assignees class *refer to the index of the person in the UniquePersonList, not the visible index shown to the user in the UI*. This means that the indexes will not change even if the list shown in the UI changes, such as after a `find` operation. +","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"For example, given the below list of persons:","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexMovement.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.1 : Mapping of indexes to a task_","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"After a `find` operation, only the second, fourth and fifth persons are visible.","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"When you call `assign 1 2 to/1`, while the first and second persons in the visible list will be assigned to the first Task, in this case the \"Second person\" and \"Fourth person\", internally the assignee list contain Indexes corresponding the following values: +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[source, java]","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"assignedList \u003d {1, 3}","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"The indexes 1 and 3 refer to the zero-based index of the \"Second person\" and \"Fourth person\" in the complete list.","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Due to this requirement, when the UniquePersonList changes, the assigned indexes of each task will be updated as well.","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"The `add` operation will not require the assigned indexes to be updated, as each newly added person is not assigned to any task by default, and when a person is added, he is inserted to the end of the list, thus the order of the other persons will not change.","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"After a `clear` operation that clears only the persons list, all task assignee lists will be cleared and re-initialized.","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"After a `delete` operation, the order of the persons in the persons list may change. This is especially so when the first person is deleted, as this will cause the positions of all other persons to decrease by 1.","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"The activity diagram below illustrates the process of updating task assignee lists when a person is deleted.","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexDelete.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.2 : Activity Diagram for updating Assignees after deleting a Person_","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"After a `sort` operation, the order of the persons in the persons list may change as well. However, in comparison to `delete`, the new position of the person is not fixed.","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"To ensure that the indexes are updated properly, the change in positions after each `sort` operation is maintained as well inside the UniquePersonList. +","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexSort.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.3 : Mapping of indexes after a sort operation_","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"All task assignee lists will thus be updated using the mappings from the sort operation. Each index in the list will be replaced by the value given in the mappings.","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"For example, if a task previously had an index of \"1\" assigned to it, it be replaced by an index of \"4\".","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of assigned persons in the Assignee class +","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store the Indexes of the persons only +","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"**Pros:** The assigned persons will only need to be retrieved on a per-need basis, rather than residing in the Assignee class all the time, thus making storage simpler +","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":"**Cons:** UniquePersonList will be coupled to Tasks, as Tasks will need to retrieve information from the UniquePersonList in order to update itself after any operation that could potentially change the UniquePersonList ordering. +","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store the whole person in the Assignees class +","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":"**Pros:** The Assignees class will not need to depend on the UniquePersonList as its internal list is independent from that of the UniquePersonList +","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"**Cons:** Repetition of information is incurred in the storage file, as the same person can appear multiple times if he is assigned to multiple tasks. This will increase the size of the storage file, and make read-write operations slow. +","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` methods in UniquePersonList and UniqueTaskList. It supports","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field.","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator.","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class or the UniqueTaskList class.","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for sort commands that trigger sorting in person listings is shown below:","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandPersonDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command class diagram_","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"charlesgoh"},"content":"Likewise, the UML Class diagram for sort commands that trigger sorting in task listings is shown below:","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandTaskDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort task command class diagram_","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"charlesgoh"},"content":"We can deduce from the UML diagrams diagrams above that the only difference between the implementation","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"charlesgoh"},"content":"of the sorting for persons and tasks lies in the location where the sorting is actually executed.","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"charlesgoh"},"content":"The sorting of persons happens in `UniquePersonList` class while the sorting of tasks happens in `UniqueTaskList`.","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort person name desc`. The following sequence diagram","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works.","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command sequence diagram_","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods results in the actual person or task list being sorted. This list will be","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"charlesgoh"},"content":"reflected in both the application\u0027s storage as well as the graphical user interface.","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` and `UniqueTaskList` class. +","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the lists.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"charlesgoh"},"content":"Future changes to the implementation will be easier as a consequence. +","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList`","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":"and `UniqueTaskList` will have to rely on the `SortCommand` class.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive and reduces complexity in implementation. +","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system.","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":"// end::sort[]","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":"// tag::backup[]","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":"The `backup` command uses the event handler `BackupRequestEvent`. When raised, this","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":"event notifies the subscriber `backupAddressBook` method in Storage class.","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":"The outlining sequence diagram for this process (excluding the interaction with the","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":"`BackupRequestEvent`) is shown below:","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"_Figure 3.7.1 : Backup command sequence diagram_","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use an event handler to initialize the backup process +","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"**Pros:** Avoids coupling the logic to the storage unnecessarily. +","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"**Cons:** May not be as intuitive for some developers in the beginning +","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"**Alternative 2:** Access storage component directly instead of using event handlers +","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"**Pros:** May be more intuitive as it is a direct approach +","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"**Cons:** Violates the Law of Demeter.","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":"// end::backup[]","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":"// tag::password[]","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock and Unlock Command","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":"The `lock` and `unlock` commands utilise the Model to access the user preferences of","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"the application.","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"Arguments are processed in the `UnlockCommandParser` or `LockCommandParser`,","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":"which passes control over to the `UnlockCommand` and `LockCommand` class respectively.","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":"These `Command` classes will then call the Model to toggle the lock\u0027s state.","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"The activity diagram below outlines the basic logic of the lock states concept.:","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":"image::LockStatesActivityDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"_Figure 3.8.1 : Lock/Unlock command activity diagram_","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":"From the activity diagram we can see that lock states are preserved in the `preferences.json`","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":"file after the application closes by passing the lock state into the `UserPrefs` class to be","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"saved by the Storage component.","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":"The default state of the lock is set to False (i.e. locked) when the user first opens the","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":"application. Subsequent changes to the lock will persist in the user preferences.","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `lock` and `unlock` Commands","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Call methods in the Model directly to change UserPrefs +","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive. Highest returns for minimal amount of code +","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May be confusing to some developers in the beginning, since another","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"intuitive approach is to use event handlers +","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Use Event Handlers +","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for some developers +","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will still have to access Model, which makes its advantage over direct calls next to none","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d ChangePassword Command","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":"The default password when users first open Address++ is `password`. The ChangePassword command","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":"sets a new password in the temporary User Preferences. When the application is closed, this","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":"information is passed to the Storage Component to be saved into the file `preferences.json`","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":"To illustrate this concept better, let us have a look at the `preferences.json` file:","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":"[source, json]","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":"{","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"-"},"content":" \"guiSettings\" : {","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" \"windowWidth\" : 1309.0,","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":" \"windowHeight\" : 720.0,","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":" \"windowCoordinates\" : {","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":" \"x\" : 0,","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":" \"y\" : 22","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":" },","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":" \"addressBookFilePath\" : \"data/addressbook.xml\",","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":" \"addressBookName\" : \"My Address++\",","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":" \"addressBookLockState\" : false,","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":" \"addressBookEncryptedPassword\" : \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\",","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" \"theme\" : \"/view/DarkTheme.css\"","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"As shown in the cope snippet above, the password is stored as one of the entries in the JSON","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"file.","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"SHA256 encryption was used to calculate a hash for the password. This is to delay anyone snooping around the","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"user\u0027s file directories from seeing the real password immediately.","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"**Validation Checks**","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":"1. **Password Validation** -\u003e Is the password correct?","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"2. **Password Confirmation** -\u003e Does the new password and confirmation password match?","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"3. **Password Uniqueness** -\u003e Is the new password different from the old password?","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"The activity diagram below outlines the process flow for the `ChangePasswordCommand`:","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"image::ChangePasswordActivityDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"_Figure 3.9.1 : ChangePassword command activity diagram_","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"-"},"content":"**Aspect:** On Demand Saving vs. Save On Exit +","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Save On Exit +","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"-"},"content":"**Pros:** Simplifies process flow as the command class no longer has to access both Model and Storage components +","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"-"},"content":"**Cons:** Any system/application crash may cause change password data to be lost +","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"**Alternative 2:** On Demand Saving +","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"**Pros:** Changes may persist even through system and application crashes +","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"-"},"content":"**Cons:** May slow down application, although not significantly. Complicates process flow.","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"// end::password[]","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacy[]","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email`, `Address` and `Remark` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not.","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacy.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.1 : Class diagram for a Person, only Name, Phone, Email, Address and Remark contain an isPrivate boolean to indicate if it is private or not_","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes.","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field.","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor.","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`.","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.2 : Sequence Diagram for adding a Person with private fields_","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"jeffreygohkw"},"content":"@Override","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI.","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name.","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`.","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`.","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremark\u003echeerful lad\u003c/remark\u003e","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremarkIsPrivate\u003efalse\u003c/remarkIsPrivate\u003e","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same.","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was.","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`.","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false.","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object.","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing.","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to.","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users.","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`.","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below.","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.11.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object.","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`.","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":"This is illustrated in the code below, which shows how the privacy of `Name` is set in `PersonPrivacySettings`:","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`.","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`. For example, the new `Name` is created in the code snippet below:","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"jeffreygohkw"},"content":" return name;","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`.","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all.","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Enhance the functionality of EditCommand. +","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data.","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the address book\u0027s privacy level","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommand` allows the user to change the privacy level of Address++, letting users easily reveal data hidden by private fields, or hide persons containing private fields entirely.","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `PrivacyLevelCommand` is illustrated below.","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"jeffreygohkw"},"content":"image::PrivacyLevelSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.1 : Sequence Diagram for changing the privacy level of the address book_","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommandParser` will accept any integer that is input in the command line, and create a `PrivacyLevelCommand` that stores the integer, which represents the privacy level to switch to.","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution,`PrivacyLevelCommand` will first check if the integer falls within the range of the minimum and maximum privacy level. If it does not, a new `CommandException` is thrown, reminding the user of the valid input levels.","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"jeffreygohkw"},"content":"If the integer is within the valid range, `PrivacyLevelCommand` will update the privacy level of `Model`. Following that, it will proceed to update the privacy level of each person.","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"jeffreygohkw"},"content":"`Model`, each `Person` and each field that can be set as private all contain a `privacyLevel` variable to indicate the current privacy level. This value should remain the same between all of these objects throughout the operation of Address++.","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacyLevel.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.2 : Class Diagram of Person, which shows which classes contain an integer to indicate the privacy level_","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"jeffreygohkw"},"content":"Finally, depending on the privacy level, `PrivacyLevelCommand` will update the call `model.updateFilteredPersonList()` with the appropriate predicate.","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated in the code snippet below.","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Storing of the privacy level +","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have each relevant class store a privacy level integer. +","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Less coupling, less modification of existing code required. +","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify every relevant object every time `PrivacyLevelCommand` is called. Runs the risk that an object may accidentally not have its privacy level modified to match the other objects if privacy levels are not properly updated. +","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store the privacy level in the model and have any object that needs to check it query from model. +","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only one integer needs to be modified for the privacy level of the entire address book to change, which also eliminates any possibility that privacy level may be different when used by different objects. +","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases coupling, classes such as Name will need to have a Model object as one of its variables to access Model. Large scale modification of existing code and tests are necessary.","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacy[]","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"jeffreygohkw"},"content":"Locating a person\u0027s address allows users to take the address that is stored by a person and search it on Google Maps in the browser.","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of persons, a `CommandException` will be thrown.","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution.","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"This code for this can be found below:","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.13.1 : Sequence Diagram for Locating a Person\u0027s Address_","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command `locate`. +","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users.","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another using Google Maps","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"jeffreygohkw"},"content":"When the `navigate` command is entered into the command line, `NavigateCommandParse` will first reset its internal `from`, `to`, `fromIndex`, `toIndex` to null. It will then check for the input prefixes and ensure that only one of the prefixes from the group `fp/`, `ft/`, and `fa/`, which we will subsequently call the `from` prefixes are present. It then does the same with the prefixes from the group `tp/`, `tt/` and `ta/`, which we will call the `to` prefixes. +","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"jeffreygohkw"},"content":"This is done by invoking the `checkFrom` and `checkTo` methods as can be seen from the code snippet below. For the example `checkFrom`, it takes in 3 booleans on whether or not each prefix is present and checks whether or not there is exactly one kind of `from` prefix. It throws an error if there are no `from` prefixes or more than one type of `from` prefixes.","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"jeffreygohkw"},"content":"private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"`checkFrom` calls `setArgsForNavigateCommand`, which sets the variables in the `NavigateCommandParser` to the appropriate values depending on whether the address originates from a person, a task or is a manual input by the user.","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":"private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person, boolean forFrom) throws IllegalValueException {","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"jeffreygohkw"},"content":"Finally, `NavigateCommandParser` will create a new `NavigateCommand` based on the inputs as set by `setArgsForNavigateCommand`.","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"jeffreygohkw"},"content":"When `NavigateCommand` is created, it first checks if there are duplicate `from` or `to` addresses that are passed into it and throws an error if that is the case.","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"jeffreygohkw"},"content":"private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex) throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"jeffreygohkw"},"content":"If it passes this check, `NavigateCommand` stores `fromLocation` and `toLocation`, which are the Locations of any manually added address by the user to navigate from and to respectively. It also stores `toIndex` and `fromIndex`, which are the Indexes of the `Person` or `Task` to extract the address from as well as `toIsTask` and `fromIsTask`, which are booleans that indicate whether `toIndex` and `fromIndex` are indexes of Persons or Tasks.","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `NavigateCommmand`, it will first check if it has a non-null `fromIndex`, if it does, it will create a new Location based on its `fromIndex` and `fromIsTask` values using the `setLocationByIndex` method. Otherwise, it will set the Location to be the Location in `locationfrom`. This can be seen below:","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"if (fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"jeffreygohkw"},"content":"} else {","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"setLocationByIndex throws CommandException if the target Person or Task does not have a valid Address to extract due to the Address being blank, or it being private.","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` does the same for the Address to navigate `To` and posts a new `BrowserPanelNavigateEvent`, passing in the `Location` to navigate `From` and the `Location` to navigate `To`. +","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` will then create a new `CommandResult` to indicate a successful `Command`.","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":"`BrowserPanel` will then get the information from this `BrowserPanelNavigateEvent`, and load the appropriate Google Maps URL after replacing information such as the Unit Number and extra whitespaces. This has to be done as Google Maps does not function properly with Unit Numbers or spaces in its URL.","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"private void loadDirectionsPage(String fromLocation, String toLocation) {","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\"","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\"","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"image::NavigateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.14.1 : Sequence Diagram for Navigating from one Address to another_","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to pass the appropriate information to NavigateCommand +","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have a constructor that takes in a large number of arguments so that NavigateCommand can correctly identify what kind of Location to post in BrowserPanelNavigateEvent. +","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only 1 constructor needed. +","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional methods will be needed to properly identify which Location to use for navigation. +","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Create many constructors to segregate the different possible scenarios that might happen. +","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear what information to use to generate the Locations +","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires large numbers of constructors to be created, easy for mistakes to occur as Constructors all share the same name but different argument types.","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to transfer information of the address from one class to another +","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Wrap the address in a `Location` class before posting the BrowserPanelNavigateEvent. +","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only Locations, which indicates that the address is properly parsed, will be passed for the BrowserPanel to read, reducing the possibility of BrowserPanel reading stray unwanted strings as addresses to navigate to and from. The value stored inside each Location cannot be altered once that Location object has been created. +","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** A new class has to be created and Strings, Addresses and TaskAddresses will need to be converted to Locations first. +","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Simply pass on a String containing the address from class to class +","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easy to read and transfer information, lower overhead +","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** It is easier for stray Strings to pollute the information, and the Strings can be unintentionally modified.","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening and Saving of the .xml save file","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"jeffreygohkw"},"content":"Both `OpenCommand` and `SaveAsCommand` function in a very similar way.","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"When `open` or `save` is input by the user, `AddressBookParser` will create a new `OpenCommand` or `SaveAsCommand`.","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"jeffreygohkw"},"content":"These two commands will then post a new `OpenRequestEvent` or a new `SaveAsRequestEvent` and return a successful `CommandResult`.","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` will have two methods, `HandleOpenRequestEvent` and `HandleSaveAsRequestEvent` that subscribe to the above two events and will call `handleOpen` and `handleSaveAs`.","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"jeffreygohkw"},"content":"private void handleOpen() throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"private void handleSaveAs() throws IOException {","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"jeffreygohkw"},"content":"Both `handleOpen` and `handleSaveAs` will create a new `FileChooser` extension filter that only allows the pop-up window to save files and load files in the .xml format.","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"jeffreygohkw"},"content":"Upon successfully selecting a file to load or a location to save as in the pop-up window, both methods will call `changefilepath` in `Storage` to the selected file path.","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"Finally, both commands diverge as `handleOpen` will call `resetData` to reset the data using the new save file, while `handleSaveAs` will call `saveAddressBook` and `saveUserPrefs` to save the data. Both methods will finally call `fillInnerParts()` to refresh the data displayed on the UI.","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated using the sequence diagram below:","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"jeffreygohkw"},"content":"image::OpenSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.15.1 : Sequence Diagram for Opening a save file_","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How does `OpenCommand` and `SaveAsCommand` determine the file location to save or load the save file from +","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Open a `FileChooser` window, allowing the user to move through their file directory to acquire their save location and to select the name of the save file. +","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** User friendly, many other applications function similarly when saving and loading. Easier to implement and use as part of the dropdown menu in the User Interface. +","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Not entirely command line based. +","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Input the file directory and file name to save or load from as part of the command. +","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Entirely command line based, may be more preferable for users who prefer using the command line. +","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires more complex code. Command must check if the file location to save or load from is valid, and that there is a valid file of that name.","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the theme of the address book","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"jeffreygohkw"},"content":"The original style of the address book may not be for everyone. `ThemeCommand` allows users to switch between multiple preset themes.","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"jeffreygohkw"},"content":"`ThemeCommandParser` trims the arguments after the word `theme` in the command line, removing any whitespaces leading up to and following that word. If the entire String ended up trimmed, then `ThemeCommandParser` will throw a `ParseException`. Otherwise, it creates a new `ThemeCommand`, passing in the trimmed word as seen below:","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"jeffreygohkw"},"content":"public ThemeCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"jeffreygohkw"},"content":"When initialising the Address Book, the `AddressBook` class will create a `HashMap\u003cString, String\u003e` to store the keys and values of the themes.","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"jeffreygohkw"},"content":"private void initialiseStyleMap() {","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"DarkTheme.css\");","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"DarkTheme.css\");","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"LightTheme.css\");","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"LightTheme.css\");","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"The keys correspond to the possible user inputs, such as `light` or `dark`, while the values contain the filepath of the .css files, such as `DarkTheme.css`. This way, users do not need to remember and will not have to know what the .css files are like to use the theme command.","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"jeffreygohkw"},"content":"On executing `ThemeCommand`, it first checks if the input string can be found in the set of keys in the HashMap contained by the `AddressBook` class. If it cannot be found, or if the value corresponding to the input string is identical to that of the value of the file path of the .css file stored in Model, then a `CommandException` is thrown, as users cannot change to a non-existent theme, or a theme that is already in use.","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"jeffreygohkw"},"content":"If the string is valid, `ThemeCommand` will post a `ChangeThemeRequestEvent` and set the theme to the new file path corresponding to the input String in `Model`. `Model` will then continue on to set the theme in `UserPrefs` as well, so that it can be loaded on starting the application.","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` contains a method `handleChangeThemeEvent` that subscribes to the `ChangeThemeRequestEvent`. `handleChangeThemeEvent` calls `handlChangeTheme`, which first checks if there is an existing theme, if there is, it removes it, then sets adds the new theme through the file path that was passed to it.","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"jeffreygohkw"},"content":"public void handleChangeTheme(String theme) {","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(VIEW_PATH + theme);","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"After all is done, `ThemeCommand` returns a `CommandResult`, indicating the success of the command.","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"The overall execution of `ThemeCommand` is seen in the following code snippet.","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for the whole process is show below:","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"jeffreygohkw"},"content":"image::ThemeSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.16.1 : Sequence Diagram for Changing Themes_","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Getting the correct file path to the .css file +","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Store the file path in a HashMap, where the keys are the possible inputs that the user may type and the values are the actual filepaths +","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier on the user. They do not need to remember any complicated .css names or file paths, and the input string can be customisable by changing the names of the keys added to the HashMap. +","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Slightly more work needed to initialise the HashMap and check if the file paths are valid. +","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Change the name of the .css file and file paths such that what the user directly inputs can correspond to the actual .css file. +","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** A HashMap is no longer needed, instead, the input string just needs to be parsed to be turned into a file path. This makes it easier to add additional .css files, as developers do not have to keep modifying the initialisation of the HashMap +","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Less flexibility in naming the file, user may break the code if they realise the input string directly used as part of the file path.","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"// tag::adddeletetag[]","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`.","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once.","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`add tag/ 1 2 3 t/friends`) will be executed.","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"-"},"content":"The same operation will happen for `delete tag/` command.","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"-"},"content":"in a similar way.","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book.","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"-"},"content":"public class AddTagCommand extends AddCommand {","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"-"},"content":" // check whether the index within the range","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1469,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":1470,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":1471,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1472,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag","isFullCredit":true},{"lineNumber":1473,"author":{"gitId":"-"},"content":" return new CommandResult();","isFullCredit":true},{"lineNumber":1474,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1475,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1476,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1477,"author":{"gitId":"-"},"content":"Suppose the user enter the `add tag/ 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:","isFullCredit":true},{"lineNumber":1478,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1479,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1480,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : Add Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":1481,"author":{"gitId":"-"},"content":"The `delete tag/` command works the same as `add tag/` command with different name only.","isFullCredit":true},{"lineNumber":1482,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1483,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1484,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":1485,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":1486,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception.","isFullCredit":true},{"lineNumber":1487,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1488,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1489,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1490,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1491,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `add tag/` and `delete tag/` +","isFullCredit":true},{"lineNumber":1492,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +","isFullCredit":true},{"lineNumber":1493,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +","isFullCredit":true},{"lineNumber":1494,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+","isFullCredit":true},{"lineNumber":1495,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1496,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +","isFullCredit":true},{"lineNumber":1497,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +","isFullCredit":true},{"lineNumber":1498,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list.","isFullCredit":true},{"lineNumber":1499,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle.","isFullCredit":true},{"lineNumber":1500,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1501,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":1502,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +","isFullCredit":true},{"lineNumber":1503,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `add tag/` and `delete tag/` +","isFullCredit":true},{"lineNumber":1504,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +","isFullCredit":true},{"lineNumber":1505,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +","isFullCredit":true},{"lineNumber":1506,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1507,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +","isFullCredit":true},{"lineNumber":1508,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +","isFullCredit":true},{"lineNumber":1509,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner.","isFullCredit":true},{"lineNumber":1510,"author":{"gitId":"-"},"content":"// end::adddeletetag[]","isFullCredit":true},{"lineNumber":1511,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1512,"author":{"gitId":"-"},"content":"// tag::findtag[]","isFullCredit":true},{"lineNumber":1513,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1514,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism","isFullCredit":true},{"lineNumber":1515,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1516,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book.","isFullCredit":true},{"lineNumber":1517,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":1518,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1519,"author":{"gitId":"-"},"content":"The `find tag/` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`.","isFullCredit":true},{"lineNumber":1520,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first.","isFullCredit":true},{"lineNumber":1521,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar.","isFullCredit":true},{"lineNumber":1522,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1523,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences.","isFullCredit":true},{"lineNumber":1524,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`.","isFullCredit":true},{"lineNumber":1525,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1526,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:","isFullCredit":true},{"lineNumber":1527,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String.","isFullCredit":true},{"lineNumber":1528,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1529,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1530,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1531,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":1532,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":1533,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":1534,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":1535,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":1536,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":1537,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1538,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":1539,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1540,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1541,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one","isFullCredit":true},{"lineNumber":1542,"author":{"gitId":"-"},"content":"is for the tags to be excluded.","isFullCredit":true},{"lineNumber":1543,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1545,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1546,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":1547,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":1548,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":1549,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":1550,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1551,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":1552,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":1553,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {","isFullCredit":true},{"lineNumber":1554,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":1555,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1556,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));","isFullCredit":true},{"lineNumber":1557,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1558,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1559,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1560,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1561,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1562,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +","isFullCredit":true},{"lineNumber":1563,"author":{"gitId":"-"},"content":"Suppose the user enter `find tag/ friends` command. The following sequence diagram shows how the find tag command works:","isFullCredit":true},{"lineNumber":1564,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1565,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1566,"author":{"gitId":"-"},"content":"_Figure 3.18.1 : Find Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":1567,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1568,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1569,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list.","isFullCredit":true},{"lineNumber":1570,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1571,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1572,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1573,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1574,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `find tag/` +","isFullCredit":true},{"lineNumber":1575,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `find tag/` +","isFullCredit":true},{"lineNumber":1576,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `find tag/` command will be similar to the `find` command. +","isFullCredit":true},{"lineNumber":1577,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +","isFullCredit":true},{"lineNumber":1578,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1579,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `find tag/` in `FindCommand`. +","isFullCredit":true},{"lineNumber":1580,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","isFullCredit":true},{"lineNumber":1581,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle","isFullCredit":true},{"lineNumber":1582,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things.","isFullCredit":true},{"lineNumber":1583,"author":{"gitId":"-"},"content":"// end::findtag[]","isFullCredit":true},{"lineNumber":1584,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1585,"author":{"gitId":"-"},"content":"// tag::favunfav[]","isFullCredit":true},{"lineNumber":1586,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favourite/Unfavourite Person mechanism","isFullCredit":true},{"lineNumber":1588,"author":{"gitId":"-"},"content":"To favourite a person is achieved by `FavouriteCommand`. It basically changes the value of the `favourite` status of a `Person` but there is no specific `Favourite` field for person.","isFullCredit":true},{"lineNumber":1589,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1590,"author":{"gitId":"-"},"content":"In this sense, a boolean value needs to be created to store the favourite status of a contact. As `AddCommand` does not involve `favourite`, the default `favourite` status for every newly added `Person` is false.","isFullCredit":true},{"lineNumber":1591,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1592,"author":{"gitId":"-"},"content":"The `favourite` status is a boolean value and it will be set as true through `FavouriteCommand`. Then, the target person will be updated.","isFullCredit":true},{"lineNumber":1593,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1594,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1595,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1596,"author":{"gitId":"-"},"content":"public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":1597,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1598,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":1599,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1600,"author":{"gitId":"-"},"content":" // throw invalid person index","isFullCredit":true},{"lineNumber":1601,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1602,"author":{"gitId":"-"},"content":" // update favourite status","isFullCredit":true},{"lineNumber":1603,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":1604,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),","isFullCredit":true},{"lineNumber":1605,"author":{"gitId":"-"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),","isFullCredit":true},{"lineNumber":1606,"author":{"gitId":"-"},"content":" personToFavourite.getAddress(), true,","isFullCredit":true},{"lineNumber":1607,"author":{"gitId":"-"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),","isFullCredit":true},{"lineNumber":1608,"author":{"gitId":"-"},"content":" personToFavourite.getTags());","isFullCredit":true},{"lineNumber":1609,"author":{"gitId":"-"},"content":" // update target person","isFullCredit":true},{"lineNumber":1610,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":1611,"author":{"gitId":"-"},"content":" model.updatePerson(personToFavourite, editedPerson);","isFullCredit":true},{"lineNumber":1612,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":1613,"author":{"gitId":"-"},"content":" // throw exception","isFullCredit":true},{"lineNumber":1614,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1615,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":1616,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1617,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","isFullCredit":true},{"lineNumber":1618,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1619,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1620,"author":{"gitId":"-"},"content":"`FavouriteCommand` takes in an integer as its argument. The command is first being parsed in `AddressBookParser` to be identified as an instance of `FavouriteCommand`.","isFullCredit":true},{"lineNumber":1621,"author":{"gitId":"-"},"content":"Then it is parsed by `FavouriteCommandParser` to parse the index. Invalid indexes will be handled by throwing an exception. This is how `FavouriteCommandParser` is implemented:","isFullCredit":true},{"lineNumber":1622,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1623,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1624,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":1625,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","isFullCredit":true},{"lineNumber":1626,"author":{"gitId":"-"},"content":" * and returns an FavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":1627,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":1628,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1629,"author":{"gitId":"-"},"content":" public FavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1630,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":1631,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":1632,"author":{"gitId":"-"},"content":" return new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":1633,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":1634,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":1635,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1636,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1637,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1638,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1639,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1640,"author":{"gitId":"-"},"content":"The following sequence diagram shows how a `FavouriteCommand` is processed: +","isFullCredit":true},{"lineNumber":1641,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1642,"author":{"gitId":"-"},"content":"image::FavouriteSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1643,"author":{"gitId":"-"},"content":"_Figure 3.19.1 : Favourite Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":1644,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1645,"author":{"gitId":"-"},"content":"To indicate that a person has been `favoured`, `PersonCard` is modified to contain a `favouriteLabel` that changes its appearance based on the `favourite` status of the person.","isFullCredit":true},{"lineNumber":1646,"author":{"gitId":"-"},"content":"It will first detect the boolean favourite status of the person. If the person is a favourite contact, a heart will be shown.","isFullCredit":true},{"lineNumber":1647,"author":{"gitId":"-"},"content":"The colours of the border and the background of the label are set to transparent, so that only the background picture, which is a heart, will be shown.","isFullCredit":true},{"lineNumber":1648,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1649,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":1650,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1651,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `favourite` +","isFullCredit":true},{"lineNumber":1652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `favourite`. +","isFullCredit":true},{"lineNumber":1653,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to modify existing command. +","isFullCredit":true},{"lineNumber":1654,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Person` class to update the person status. The constructor of `person` has been modified so all the `person` in the address book must change accordingly. +","isFullCredit":true},{"lineNumber":1655,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `favourite` in `AddCommand` +","isFullCredit":true},{"lineNumber":1656,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","isFullCredit":true},{"lineNumber":1657,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. The `favourite` status will be treated as an optional field when using `AddCommand`. In order to change `favourite` status, `EditCommand` may be modified which is very troublesome. +","isFullCredit":true},{"lineNumber":1658,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1659,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":1660,"author":{"gitId":"-"},"content":"**Aspect:** Store `Favourite` values +","isFullCredit":true},{"lineNumber":1661,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Store it as a `Boolean` value +","isFullCredit":true},{"lineNumber":1662,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to create another class. +","isFullCredit":true},{"lineNumber":1663,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` and `ModelManager` to update the person status.It is also prone to bugs when developers forget to change the ObjectProperty to `String` in UI classes. +","isFullCredit":true},{"lineNumber":1664,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1665,"author":{"gitId":"-"},"content":"**Alternative 2:** Add a new `Favourite` field +","isFullCredit":true},{"lineNumber":1666,"author":{"gitId":"-"},"content":"**Pros:** Similar way to store other personal information. It also follows the open-close principle and exercises cohesion, where all matters related to `Favourite` field is dealt in its own class. +","isFullCredit":true},{"lineNumber":1667,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. Adding a new field will cause many changes in UI, Logic, Model and Storage. Some test cases will be rewritten.","isFullCredit":true},{"lineNumber":1668,"author":{"gitId":"-"},"content":"// end::favunfav[]","isFullCredit":true},{"lineNumber":1669,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","isFullCredit":true},{"lineNumber":1671,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","isFullCredit":true},{"lineNumber":1673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1674,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])","isFullCredit":true},{"lineNumber":1675,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","isFullCredit":true},{"lineNumber":1676,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","isFullCredit":true},{"lineNumber":1677,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1678,"author":{"gitId":"-"},"content":"*Logging Levels*","isFullCredit":true},{"lineNumber":1679,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1680,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","isFullCredit":true},{"lineNumber":1681,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","isFullCredit":true},{"lineNumber":1682,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","isFullCredit":true},{"lineNumber":1683,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","isFullCredit":true},{"lineNumber":1684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1685,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1686,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","isFullCredit":true},{"lineNumber":1687,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1688,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","isFullCredit":true},{"lineNumber":1689,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","isFullCredit":true},{"lineNumber":1691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1692,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation.","isFullCredit":true},{"lineNumber":1693,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1694,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1695,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","isFullCredit":true},{"lineNumber":1696,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","isFullCredit":true},{"lineNumber":1698,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1699,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","isFullCredit":true},{"lineNumber":1700,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","isFullCredit":true},{"lineNumber":1701,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","isFullCredit":true},{"lineNumber":1703,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1704,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","isFullCredit":true},{"lineNumber":1705,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1706,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","isFullCredit":true},{"lineNumber":1707,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1708,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","isFullCredit":true},{"lineNumber":1709,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1710,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","isFullCredit":true},{"lineNumber":1711,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1712,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","isFullCredit":true},{"lineNumber":1713,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","isFullCredit":true},{"lineNumber":1714,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","isFullCredit":true},{"lineNumber":1715,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","isFullCredit":true},{"lineNumber":1716,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1717,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":1718,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_","isFullCredit":true},{"lineNumber":1719,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1720,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":1721,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1722,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","isFullCredit":true},{"lineNumber":1723,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1724,"author":{"gitId":"-"},"content":"There are three ways to run tests.","isFullCredit":true},{"lineNumber":1725,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1726,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":1727,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","isFullCredit":true},{"lineNumber":1728,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","isFullCredit":true},{"lineNumber":1730,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1731,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","isFullCredit":true},{"lineNumber":1732,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","isFullCredit":true},{"lineNumber":1733,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1734,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","isFullCredit":true},{"lineNumber":1735,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1736,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","isFullCredit":true},{"lineNumber":1737,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1739,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","isFullCredit":true},{"lineNumber":1740,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1741,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","isFullCredit":true},{"lineNumber":1742,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1743,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","isFullCredit":true},{"lineNumber":1744,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1745,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","isFullCredit":true},{"lineNumber":1746,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1747,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","isFullCredit":true},{"lineNumber":1748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1749,"author":{"gitId":"-"},"content":"We have two types of tests:","isFullCredit":true},{"lineNumber":1750,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1751,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","isFullCredit":true},{"lineNumber":1752,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","isFullCredit":true},{"lineNumber":1753,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","isFullCredit":true},{"lineNumber":1754,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","isFullCredit":true},{"lineNumber":1755,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","isFullCredit":true},{"lineNumber":1756,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","isFullCredit":true},{"lineNumber":1757,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","isFullCredit":true},{"lineNumber":1758,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","isFullCredit":true},{"lineNumber":1759,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","isFullCredit":true},{"lineNumber":1760,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","isFullCredit":true},{"lineNumber":1761,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1762,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","isFullCredit":true},{"lineNumber":1764,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","isFullCredit":true},{"lineNumber":1765,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1766,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","isFullCredit":true},{"lineNumber":1767,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","isFullCredit":true},{"lineNumber":1768,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1769,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","isFullCredit":true},{"lineNumber":1770,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1771,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","isFullCredit":true},{"lineNumber":1772,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1773,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","isFullCredit":true},{"lineNumber":1774,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1775,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","isFullCredit":true},{"lineNumber":1776,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1777,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1778,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1779,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","isFullCredit":true},{"lineNumber":1780,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","isFullCredit":true},{"lineNumber":1782,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1783,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","isFullCredit":true},{"lineNumber":1784,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","isFullCredit":true},{"lineNumber":1785,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","isFullCredit":true},{"lineNumber":1786,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","isFullCredit":true},{"lineNumber":1787,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1788,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","isFullCredit":true},{"lineNumber":1789,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1790,"author":{"gitId":"Esilocke"},"content":"A project often depends on third-party libraries. For example, Address++ depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","isFullCredit":true},{"lineNumber":1791,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","isFullCredit":true},{"lineNumber":1792,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","isFullCredit":true},{"lineNumber":1793,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1794,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1795,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","isFullCredit":true},{"lineNumber":1796,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1797,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","isFullCredit":true},{"lineNumber":1798,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1799,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","isFullCredit":true},{"lineNumber":1800,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1801,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","isFullCredit":true},{"lineNumber":1802,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","isFullCredit":true},{"lineNumber":1803,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new person | keep track of my contacts","isFullCredit":true},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","isFullCredit":true},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new task | keep track of my tasks and assignments","isFullCredit":true},{"lineNumber":1809,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1810,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","isFullCredit":true},{"lineNumber":1811,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1812,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts","isFullCredit":true},{"lineNumber":1813,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1814,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added","isFullCredit":true},{"lineNumber":1815,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1816,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made","isFullCredit":true},{"lineNumber":1817,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1818,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values","isFullCredit":true},{"lineNumber":1819,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"|`* * *` |cautious user |be able to lock my address book application whenever I want with a password | prevent people with malicious intent from making changes to my data","isFullCredit":true},{"lineNumber":1821,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1822,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident","isFullCredit":true},{"lineNumber":1823,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1824,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location","isFullCredit":true},{"lineNumber":1825,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1826,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs","isFullCredit":true},{"lineNumber":1827,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1828,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity","isFullCredit":true},{"lineNumber":1829,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1830,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better","isFullCredit":true},{"lineNumber":1831,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1832,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me","isFullCredit":true},{"lineNumber":1833,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1834,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts","isFullCredit":true},{"lineNumber":1835,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1836,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms","isFullCredit":true},{"lineNumber":1837,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1838,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others","isFullCredit":true},{"lineNumber":1839,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1840,"author":{"gitId":"Esilocke"},"content":"|`* *` |cautious user |be able to back up my address book data | retrieve my back up data in the event I make breaking changes to my actual address book and there is no way of undoing them","isFullCredit":true},{"lineNumber":1841,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"|`* *` |user with poor eyesight |be able to increase the font size | use the application without straining my eyes","isFullCredit":true},{"lineNumber":1843,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"|`* *` |forgetful user |be able to see who is assigned to a task | find my contacts who are in charge more quickly","isFullCredit":true},{"lineNumber":1845,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1846,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly","isFullCredit":true},{"lineNumber":1847,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1848,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like","isFullCredit":true},{"lineNumber":1849,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1850,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts","isFullCredit":true},{"lineNumber":1851,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"|`*` |user |be able to mark my favourite contacts |find them more easily","isFullCredit":true},{"lineNumber":1853,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently","isFullCredit":true},{"lineNumber":1855,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1856,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features","isFullCredit":true},{"lineNumber":1857,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1858,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1859,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1860,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1861,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1862,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","isFullCredit":true},{"lineNumber":1863,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1864,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)","isFullCredit":true},{"lineNumber":1865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1866,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person","isFullCredit":true},{"lineNumber":1868,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1869,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1870,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1871,"author":{"gitId":"-"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1872,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1873,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list","isFullCredit":true},{"lineNumber":1874,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person","isFullCredit":true},{"lineNumber":1875,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1876,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1877,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1878,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1879,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1880,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1881,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1882,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1883,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1884,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1885,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1886,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1887,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1888,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1889,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1890,"author":{"gitId":"-"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1891,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person","isFullCredit":true},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria","isFullCredit":true},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria","isFullCredit":true},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found.","isFullCredit":true},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found.","isFullCredit":true},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person","isFullCredit":true},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list","isFullCredit":true},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person.","isFullCredit":true},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person.","isFullCredit":true},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid.","isFullCredit":true},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail.","isFullCredit":true},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made.","isFullCredit":true},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1957,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1958,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps","isFullCredit":true},{"lineNumber":1959,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1960,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1961,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1962,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps","isFullCredit":true},{"lineNumber":1963,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo","isFullCredit":true},{"lineNumber":1964,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message","isFullCredit":true},{"lineNumber":1965,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone.","isFullCredit":true},{"lineNumber":1966,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1967,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1968,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1969,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1970,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1971,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1972,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands.","isFullCredit":true},{"lineNumber":1973,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1974,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1975,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands.","isFullCredit":true},{"lineNumber":1976,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1977,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3.","isFullCredit":true},{"lineNumber":1978,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1979,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1980,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands.","isFullCredit":true},{"lineNumber":1981,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1982,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1983,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands.","isFullCredit":true},{"lineNumber":1984,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1985,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3","isFullCredit":true},{"lineNumber":1986,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1987,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1988,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort","isFullCredit":true},{"lineNumber":1989,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1990,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1991,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1992,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria","isFullCredit":true},{"lineNumber":1993,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria","isFullCredit":true},{"lineNumber":1994,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message.","isFullCredit":true},{"lineNumber":1995,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1996,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1997,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1998,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1999,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":2000,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":2001,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":2002,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":2003,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":2004,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":2005,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid.","isFullCredit":true},{"lineNumber":2006,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":2007,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":2008,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":2009,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":2010,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1.","isFullCredit":true},{"lineNumber":2011,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2012,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":2013,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","isFullCredit":true},{"lineNumber":2014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2015,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed.","isFullCredit":true},{"lineNumber":2016,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.","isFullCredit":true},{"lineNumber":2017,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","isFullCredit":true},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure.","isFullCredit":true},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse.","isFullCredit":true},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0.","isFullCredit":true},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing.","isFullCredit":true},{"lineNumber":2022,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2023,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":2024,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":2025,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2026,"author":{"gitId":"-"},"content":"[[mainstream-os]]","isFullCredit":true},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Mainstream OS","isFullCredit":true},{"lineNumber":2028,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2029,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":2030,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","isFullCredit":true},{"lineNumber":2031,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":2032,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]","isFullCredit":true},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible","isFullCredit":true},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"....","isFullCredit":true},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data.","isFullCredit":true},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"....","isFullCredit":true},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2040,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":240,"jeffreygohkw":601,"Esilocke":296,"-":903}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//tag::introduction[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"//end::introduction[]","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here].","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too big? Address++ allows you to change your font sizes at will. Here are three","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"ways of changing the font sizes:","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"**Option 1: Menu Font Size Buttons and Keyboard Shortcuts**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"**Option 3: Handtype command into CLI**:","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeCLI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"* Increase Size Command: `fontsize increase`","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"* Decrease Size Command: `fs decrease`","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"* Reset Size Command: `fontsize reset`","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"* `fontsize` can be replaced with `fs` for faster input. +","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"If you have trouble figuring out how to do something, or would like to find out about more features, you can click","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"on the **help** menu button. You can also enter the command `help` to access the help window.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"image::HelpButtonUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"Format: `help` +","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1].","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"// tag::addprivacy[]","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"// tag::avatar[]","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Adding a person: `add`","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input.","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address`, `Remark` and `Avatar`, to be private by placing a `p` in front of the prefix. +","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"* As of version v1.5, the avatar fields accepts all URLs, and filenames with the prefix \"file:\"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"You made a new friend John Doe, and want to save him into Address++. You could type the following command to add his details:","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"v/https://helloworld.world/image.png`","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"You meet Ima Hidearu, another one of your group members, but you do not know anything about him other than his name.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" Nevertheless, you are still able to add him into Address++:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/Ima Hidearu r/secretive`","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 3** +","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"Sometimes, you may wish to keep some fields private (i.e. not reveal them in the application). You can use the private","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"option while typing in your command:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate pr/A true hero` +","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"**Note:** you do not have to set all fields as private, and you can choose which specific fields you want to set as private.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"//end::addprivacy[]","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"//tag::addtask[]","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a task: `add task/` (Since V1.2)","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"You can use the `add task/` command to add new tasks to your address book. This allows you to keep track of your","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"assignments and project objectives.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Format: `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 0 to 5 inclusive, with 5 being the highest priority +","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"* Adding a task with a priority of 0 is the same as not adding a priority. Only priority level above 1 will be displayed in the User Interface +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"**Examples**:","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"You are assigned the task of writing a 1500-word essay that is due in 3 weeks. You decide to add this","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"task into Address++.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Essay d/Write a 1500-word essay on philosophical thinking t/3 weeks later p/4`","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"You are required to submit at least one forum post to the school forums each week. To remind yourself of this task,","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"you add it into Address++.","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Weekly forum post p/1`","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"// end::addtask[]","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"// tag::addtag[]","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a tag to persons : `add tag/` (Since V1.2)","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"You can use the `add tag/` command to add tag for multiple persons in the address book. For example, you may wish to add the tag `friends` to the first two persons in the address book. +","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"`add tag/` can be replaced by `a tag/` for faster input. +","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"Format: `add tag/ INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":"* You can add the tag of the person at the specific `INDEX`. +","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":"* The index refers to the index number shown in the most recent listing. +","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ... +","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, `add tag/` will add the tag to all contacts in the address book.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add tag `friends` to the 1st and 2nd persons in the address book. You can use `list` to show all the contacts in the address book first,","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"then use the `addtag` command to achieve it.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ 1 2 t/friends` +","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add a common tag to all the persons in the address book. You can type in the following command:","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ t/acquaintance` +","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"image::AddTagCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : AddTagCommand_","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"// end::addtag[]","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Listing all persons : `list`","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts and tasks in the address book. +","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"`list` can be replaced by `l` for faster input. +","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"Format: `list` +","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"// tag::editprivacy[]","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit`","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command.","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it.","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message.","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields.","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"**Examples**:","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":"Your friend John Doe has changed his email. You decide to update his entry in Address++ to reflect this change.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 1 p/91234567 e/johndoe@example.com`","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"Your friend Betsy is no longer taking part in the same project as you, and has changed her phone number to a new one","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":"that you are not aware of. You decide to update her entry in Address++ accordingly.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 2 p/ t/`","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"// end::editprivacy[]","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"// tag::edittask[]","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit task/` (Since V1.2)","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"You can use the `edit task/` command to quickly fix mistakes in your entries, or add/remove details in your tasks. You may wish to edit your tasks when their requirements change, for example. +","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":"Format: `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided.","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"You had previously added a task reminding you to write a 1500-word essay. However you receive notification that the word requirement","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"is now 1800 words instead. You edit the task to reflect this change.","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 2 d/1800 words essay`","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"One of your assignments has been pushed back and is no longer as urgent as before. You edit the task to reflect this change.","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 4 deadline/2 months later p/2`","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"// end::edittask[]","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"// tag::edittag[]","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edit tag/` (Since v1.2)","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"You can use `edit tag/` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"`edit tag/` can be replaced by `et` for faster input. +","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Format: `edit tag/ OLDTAGNAME NEWTAGNAME` +","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different.","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `OLDTAGNAME` value.","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**:","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"You have finished a project, and have become good friends with your project mates.","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"You decide to promote all your project mates into friends.","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit tag/ project friends`","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"// end::edittag[]","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"// tag::changeprivacy[]","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":"`changeprivacy` can be replaced by `cp` for faster input. +","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"charlesgoh"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR]`","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields.","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI.","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI.","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy.","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting.","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":"You are meeting some new groupmates for your upcoming project and you are not too comfortable with exposing your family\u0027s particulars. +","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":"You decide to hide your family\u0027s phone number, email and home address by setting them to private. +","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `changeprivacy 1 p/true e/true a/true`","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":"// end::changeprivacy[]","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacylevel[]","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy Level of the address book : `privacylevel`(Since V1.5)","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":"Changing a person\u0027s privacy just to reveal their data or to make a person fully confidential may be time-consuming. If you would like to view all the data hidden by private fields easily, or completely hide a person with private fields, you can use this command to change the Privacy Level of the address book. +","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":"At level 1, all data, regardless of whether they are set to be private or public, can be viewed. +","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":"At level 2, private fields will have their data hidden by a string, such as `\u003cPrivate Phone\u003e`. +","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":"At level 3, any person containing at least one private field will be completely hidden in the address book. +","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"`privacylevel` can be replaced by `pl` for faster input. +","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"Format: `privacylevel LEVEL`","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"* Address++ always launches in privacy level 2.","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":"* The `LEVEL` that you input can only contain the values 1, 2, or 3.","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":"* This does not change the actual privacy setting of each field, thus, changing the privacy level to 1 does not make any of the private fields public.","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":"** Thus, even if you have set the address book to be privacy level 1, you cannot edit a field that is set as private without setting it back to public.","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":"** Similarly, since a person is completely hidden in privacy level 3, you will have to set the privacy level back to 2 or 1 to be able to modify that person.","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":"You have an address book full of various contacts with private fields, however, now you need to access the email addresses of all your contacts to ask them for help in your upcoming survey. +","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"You decide to use the privacylevel command to reveal all you contacts\u0027 hidden data.","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 1`","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"You wish to completely hide some of your confidential contacts from view, but your address book is too large, and you do not want to have to individually set every field for every confidential person to be private. +","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":"Using the privacylevel command, you set each contact with any private field to be hidden in the address book. +","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 3`","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacylevel[]","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"// tag::favourite[]","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite contacts. For example, you may wish to set your girlfriend as your favourite contact. You will see a heart png next to your girlfriend\u0027s name","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"once you successfully set her as your favourite contact. +","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"* You will see a heart shape next to your favourite persons.","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"Suppose you want to set the 2nd person in the address book to be your favourite contact. You should `list` all the persons first, then use `favourite` command to achieve it.","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 2` +","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to set `Betsy Brandt` as your favourite contact.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `favourite` her.","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Betsy` +","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 1` +","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"image::FavouriteCommandBeforeAndAfter.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"_Figure 3.12.1 : FavouriteCommand_","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"// end::favourite[]","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"// tag::showfavourite[]","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"Format: `showfavourite` +","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"* `showfavourite` command: It will return an empty list if there is no favourite persons.","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"image::ShowFavouriteCommand.png[width\u003d\"250\"]","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"_Figure 3.13.1 : ShowFavouriteCommand_","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"// end::showfavourite[]","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"*Things To Note*","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Only the names will be searched","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"You would like to find all the people whose name contains the word \"David\". You first use `list` to show all your contacts,","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the contacts named \"David\".","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David` +","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find people whose name contain the word \"David\" or \"Joe\".","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David Joe` +","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"// tag::findtask[]","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Finding a task : `find task/` (Since V1.3)","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"You can use the `find task/` command to quickly find tasks that match your criteria, as well as tasks that have a certain level of urgency. +","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"Furthermore, you can choose to only retrieve tasks that are either complete, or still in progress. +","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Format: `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Things To Note*","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"* Both the name and the description will be searched","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"* *You must include at least 1 search keyword*, in order to filter the results by their priority, and whether or not it is completed.","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"* The `PRIORITY` must be an integer from 1 to 5, inclusive. If the priority search is included, all tasks that have a priority at least that of the specified priority will matced.","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"* `STATE` must be either `true` or `false`. If it is `true`, you will only see tasks that have been marked as complete, and if it is `false, you will only see tasks that are not complete, in addition to all other search criteria.","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"You would like to find all the tasks related to \"Report\". You first use `list` to show all your tasks,","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the tasks related to \"Report\".","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report` +","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find tasks that have a \"High\" or \"Highest\" priority.","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4` +","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Furthermore, as you have several tasks related to \"Report\" that are already complete, you only want to see the tasks that are still not done.","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4 done/false` +","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"// end::findtask[]","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"-"},"content":"// tag::showtag[]","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all tags : `showtag` (Since V1.5)","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"You can use the `showtag` command to quickly show all tags in the address book. Sometimes you may forget `tags` that you have added a few weeks ago. You may use this command to help you. +","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"-"},"content":"`showtag` can be replaced by `stag` for faster input. +","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"-"},"content":"Format: `showtag` +","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"-"},"content":"* `showtag` command: It will return an empty list if there is no tags in the address book.","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"-"},"content":"* You may want to use `showtag` command to help you recall all the `tags` in the address book before you try to use `findtag` to find persons.","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"// end::showtag[]","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"-"},"content":"// tag::findtag[]","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `find tag/` (Since V1.4)","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"-"},"content":"You can use the `find tag/` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/` in front of the `friends`. +","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"-"},"content":"`find tag/` can be replaced by `f tag/` for faster input. +","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"-"},"content":"Format: `find tag/ KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"-"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons.","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"-"},"content":"* Only full words will be matched. e.g. `friend` will not match `friends`","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"-"},"content":"* There is no space between `/` and tag name. e.g. `/ friends` will not match `/friends`.","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"Suppose you want to find contatcs with tag `friends` or `colleagues`, you can just key in the following command.","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends colleagues`","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"Suppose you want to find contacts without tag `frineds`, you can key in the following command.","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ /friends`","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"-"},"content":"**Example Scenario 3:** +","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"Suppose you want to find contacts with tag `friends` but without `colleagues`, you can key in the following command.","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends /colleagues`","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::FindTagCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : FindTagCommand_","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"// end::findtag[]","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts from the address book. The `delete` command will help you clean up contacts who you may not wish to associate with anymore. +","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"* Deletes the person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first person from your contacts.","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1`","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":"You wish to delete \"Maribel Edelweiss\" from your contacts. However you have many contacts, and are not sure where Maribel is.","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"You thus use `find` to find contacts who are named \"Maribel\", then delete Maribel Edelweiss accordingly.","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Maribel` +","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 3`","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"// tag::deletetask[]","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a task : `delete task/` (Since V1.2)","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"You can use the `delete task/` command to remove tasks from the address book. The `delete task/` command will help you clean up obsolete or completed tasks. +","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"`delete task/` can be replaced by `d task/` for faster input. +","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Format: `delete task/ INDEX` +","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"* Deletes the task at the specified `INDEX`.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent task listing.","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first task.","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 1`","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"You wish to delete a task named \"1500-word Essay\". However you have many tasks, and are not sure where it is.","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"You thus use `find task/` to find tasks related to \"Essays\", before using `delete task/` to delete \"1500-word Essay\" accordingly.","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ Essay` +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 3`","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"// end::deletetask[]","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"// tag::deletetag[]","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `delete tag/` (Since V1.2)","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"You can use `delete tag/` to delete the tag of multiple persons from the address book. +","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"`delete tag/` can be replaced by `d tag/` for faster input. +","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Format: `delete tag/ INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`.","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"* If you do not key in any index, delete tag/ will delete the tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":"Suppose you want to delete `classmates` tag for the first two persons in the address book, you can `list` all the persons first, then","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"use the `delete tag/` command to achieve.","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ 1 2 t/friends` +","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"-"},"content":"Suppose you want to delete `friends` tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ t/friends` +","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"-"},"content":"image::DeleTagCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"-"},"content":"_Figure 3.20.1 : DeleteTagCommand_","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::deletetag[]","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Sorting your contact list and tasks : `sort` (Since V1.1)","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts or tasks by using the `sort` command +","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"`sort` can be replaced with `so` for faster input. +","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"Format: `sort LIST FIELD ORDER` +","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contacts by any field in either ascending or descending order","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your tasks by deadline or by priority in ascending or descending order","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for person contacts: NAME, PHONE, EMAIL, ADDRESS, REMARK, AVATAR.","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for tasks: DEADLINE, PRIORITY.","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC.","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":"You have many contacts on Address++. You decide to make it neater by sorting your contacts","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":"by name in ascending order:","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort person name asc`","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":"You add a few tasks of different priorities. You decide to sort the tasks so you can see","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":"the higher priority tasks on the top of the list:","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort task priority desc`","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":"//end::sort[]","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":"//tag::backup[]","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Backing up your data : `backup` (Since V1.2)","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [FILENAME]` +","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"`backup` can be replaced with `bk` for faster input. +","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":"This allows you to backup your saved data on Address++ in another file.","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario**: +","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":"You decide to backup your data just in case you accidentally make changes that","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":"cannot be undone. You type the following code:","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":"`backup filename.xml`","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":"The file will then be saved in the same directory location as your `JAR` application file","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"//end::backup[]","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":"//tag::password[]","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Protecting your data : `lock` `unlock` (Since V1.5)","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":"Worried about security? Address++ allows your to protect your data with a password.","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":"Using the `lock` and `unlock` commands, you can toggle between security modes. +","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":"Locked address books only allow viewing of data. If anyone attempts to tamper with","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"your data, they will be greeted with this error:","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"image::LockedRestriction.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":"Format for `lock` Command: `lock pw/[PASSWORD]` +","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":"`lock` can be replaced with `lk` for faster input. +","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":"Format for `unlock` Command: `unlock pw/[PASSWORD]` +","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":"`unlock` can be replaced with `ul` for faster input. +","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"The default password is `password`","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":"You have just finished editing your contacts on Address++ and you decide to have a break away from","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"your computer. You decide to lock Address++ using the following command:","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `lock pw/password`","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":"When you return to your computer, you decide to continue adding contacts in Address++.","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"To unlock the Address++ application, you use the following command:","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `unlock pw/password`","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing your password : `changepassword` (Since V1.5)","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"charlesgoh"},"content":"Want to choose a better password? The `changepassword` command allows you to change your","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"charlesgoh"},"content":"password whenever you want, provided you know the old password.","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"charlesgoh"},"content":"The default password is \u0027password\u0027","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"charlesgoh"},"content":"image::ChangePasswordImages.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"charlesgoh"},"content":"Format: `changepassword pw/[PASSWORD] np/[NEWPASSWORD] cfp/[CONFIRMPASSWORD]` +","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"charlesgoh"},"content":"**`changepassword` can be replaced with `cpw` for faster input.** +","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"charlesgoh"},"content":"You open Address++ for the first time. After reading the user guide, you realize","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"charlesgoh"},"content":"that the default password (\"password\") is not good enough. You decide to make a new","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"charlesgoh"},"content":"one with the following command:","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `changepassword pw/password np/newpassword cfp/newpassword`","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"charlesgoh"},"content":"//end::password[]","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact, and look at it in greater detail. +","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":"Format: `select INDEX` +","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"The first person in your contacts has a very long address, and you want to see if it is correct.","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select 1` +","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"// tag::selecttask[]","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a task : `select task/` (Since V1.4)","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":"You can use `select task/` to pick out a task, and look at it in greater detail. +","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"Format: `select task/ INDEX` +","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"The first task has a very long description, and you want to see it in full.","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select task/ 1` +","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"// end::selecttask[]","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where the second person in your address book lives. +","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 2` +","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where a specific person in your address book, Betsy, lives. +","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Betsy` +","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 1` +","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses.","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps.","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"* A person with no address will open Google Maps, but it will not search for an address as there is no address to search for.","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing.","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another : `navigate` (Since V1.5)","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"Although `locate` shows you where a person\u0027s address is, it does not tell you how to get there. The `navigate` command will provide directions, with the help of Google Maps, on how to get from one address to another. +","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"`navigate` can be replaced by `nav` for faster input. +","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"Esilocke"},"content":"You are planning to go to your friend Roy\u0027s house for their birthday party that afternoon, but you have just ended class at NUS. +","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"Esilocke"},"content":"You have never been to their house before, and you enlist the aid of Address++ to find the fastest route to their house. +","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Roy` +","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fa/NUS tp/1`","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":"After the birthday party, you have a group meeting scheduled for your project. You have this meeting schedules as your first task, and you seek help from Address++ to find a path from Roy\u0027s house to the group meeting. +","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fp/1 tt/1`","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 3:** +","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"To conclude your long and busy day, you have to send off your sister at Changi Airport, who is going off on an exchange programme. +","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"Using the navigate command once again, you find an efficient route from the location of your group meeting to the airport. +","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate ft/1 ta/Changi Airport`","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses.","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address or a person with no address cannot be navigated from or navigated to.","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"* A task with no address cannot be navigated from or navigated to.","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing.","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":"* You may only input exactly one of the 3 prefixes from `fp/` `ft/` and `fa/` to indicate the address to navigate from, and exactly one of the 3 prefixes from `tp/` `tt/` and `ta/` to indicate the address to navigate to.","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":"** If you input any less or any more than 1 of the 3 prefixes from each group, the command will fail.","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":"** There is no need to match the type of prefixes. You can navigate with any combination of prefixes as long as there is only one prefix to indicate the address to navigate from and only one prefix to indicate the address to navigate to.","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"// tag::setstate[]","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as complete : `setcomplete` (Since V1.5)","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"You have finally completed a task that involves writing a 1500-word essay.","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e\u003e `setcomplete 6` +","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as incomplete : `setincomplete` (Since V1.5)","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete.","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"You realised that you had marked a task as complete, even though it is still in progress.","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"Furthermore you are not sure when you had marked it as complete. However, you are still able to safely mark the task as being","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":"in progress.","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `setincomplete 7`","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"// end::setstate[]","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assigning contacts to task : `assign` (Since V1.4)","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"You have created a new task to complete a paper model. However you are unable to do it by yourself, and require the help of some of your friends.","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `assign 1 5 7 to/5`","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismissing contacts from task : `dismiss` (Since V1.4)","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"One of the tasks that you had created previously with many people assigned turned out to be easier than expected.","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"You believe that this task could do with less manpower and would like to remove some of the previously assigned contacts from this task.","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `dismiss 1 5 7 from/5`","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Viewing contacts assigned to a task : `viewassign` (Since V1.5)","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"You can use `viewassign` to see who is assigned to a particular task. You may wish to use `viewassign` when you want to contact only the people who are assigned to a particular task, for example. +","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"`viewassign` can be replaced by `va` for faster input. +","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"Esilocke"},"content":"Format: `viewassign INDEX` +","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"2 weeks after assigning some of your contacts to a particular task, you decide to obtain a status report about their current progress. +","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"Esilocke"},"content":"However you have forgotten who you have assigned to that task. You thus use `viewassign` to see who is assigned to that task.","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `viewassign 4`","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing the Address Book\u0027s theme : `theme` (Since V1.5)","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"jeffreygohkw"},"content":"Perhaps you may not be too fond of the existing style of the address book and you want to have something fresh. The `theme` command changes the address book between two themes, `light` and `dark`.","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"jeffreygohkw"},"content":"`theme` can be replaced by `th` for faster input. +","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"jeffreygohkw"},"content":"It is late at night and the light theme is a little too brightly coloured. Preferring a darker theme, you can choose to input the theme command to make the theme into a darker colour. +","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `theme dark`","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"Format: `theme` + THEME","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"jeffreygohkw"},"content":"* There are only two themes as of v1.5, light and dark. More themes of different colours could be added in a future release.","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"Format: `history` +","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"// tag::undo[]","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"Format: `undo` +","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Undoable commands: Commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`).","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts.","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"Esilocke"},"content":"You realise this immediately and undo your mistake.","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts. Furthermore, not knowing this, you made a mistake when editing another person\u0027s name.","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarisa Liselote`","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"Esilocke"},"content":"You realise that something is amiss, and find out that you made not one, but two mistakes. Nevertheless you still manage to recover your contact by using multiple `undo` commands.","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"Finally, you edit Clarissa\u0027s name correctly.","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarissa Liselotte`","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"// end::undo[]","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"-"},"content":"// tag::unfavourite[]","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"-"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"-"},"content":"* The heart png will disappear once you `unfavourite` the person.","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"-"},"content":"Suppose you do not want to the 2nd person in the address book to be your favourite contact anymore, you should `list` all the persons first, then use `unfavourite` command to achieve it.","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 2` +","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"-"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to `unfavourite` `Betsy Brandt` in the address book.","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `unfavourite` `Betsy Brandt`.","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"-"},"content":"\u003e\u003e `find Betsy` +","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 1` +","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"-"},"content":"image::UnfavouriteCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"-"},"content":"_Figure 3.37.1 : UnfavouriteCommand_","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"-"},"content":"// end::unfavourite[]","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"// tag::redo[]","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` was not necessary. `redo` reverses the most recent `undo` command. +","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"-"},"content":"Format: `redo` +","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts.","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo your mistake.","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"However you realise that you have deleted the correct person. Instead of typing `delete 1`, you choose to `redo` your command instead.","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts, as well as two of your tasks.","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 5` +","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 8` +","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo all your previous commands.","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"Esilocke"},"content":"However you realise that no mistake was made. Instead of typing your commands again, you choose to `redo` your commands instead.","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"Esilocke"},"content":"// end::redo[]","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"Esilocke"},"content":"// tag::clear[]","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"Esilocke"},"content":"Additionally, if you clear only the contacts list or the task list, you can specify which type to clear in the command. +","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":"Format: `clear` +","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"To clear only the contacts list, type `clear person/` +","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"Esilocke"},"content":"To clear only the tasks list, type `clear task/` +","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"* If both `person/` and `task` are specified, or if neither were specified, the `clear` command will delete all entries in the address book.","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"Esilocke"},"content":"You have completed every task in your task list, and want to clean it up.","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear task/` +","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. However you would still like to keep smome of the tasks for further reference.","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear person/` +","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. You would like to clear everything in Address++ to make space for your own contacts and tasks.","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear` +","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"Esilocke"},"content":"// end::clear[]","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"// tag::open[]","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening a save file : `open`","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"Switching between address books is made easy with the `open` command, as it allows you can load different save files into the application. +","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"You can choose which .xml file to open from the pop up window that appears upon executing this command. +","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":"`open` can be replaced by `o` for faster input. +","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":"Format `open`","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":"// end::open[]","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":"// tag::saveas[]","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Saving the data as a new save file : `save`","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to save a copy of your data in a separate location or with a different name, the `save` command will allow you to do just that. +","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":"You can choose what to name your save file and where to save it from the pop up window that appears upon executing this command. +","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":"`save` can be replaced by `sa` for faster input. +","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":"Format: `save`","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":"// end::saveas[]","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Format: `exit`","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4].","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually.","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, you can use the `save` command, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window.","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, you can use the `open` command, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window.","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location.","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `add pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"e.g. `add task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `add tag/ [INDEX...] t/[TAG]` +","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"Esilocke"},"content":"e.g. `add tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false r/true`","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `privacylevel [LEVEL]` +","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"* *Clear persons* : `clear person/`","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"* *Clear tasks* : `clear task/`","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"-"},"content":"e.g. `delete 3`","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task/ INDEX` +","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task/ 4`","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `delete tag/ [INDEX...] t/[TAG]` +","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"e.g. `delete tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"charlesgoh"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"Esilocke"},"content":"e.g. `edit task/ 2 p/veryhigh`","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edit tag/ TAGTOCHANGE NEWTAGNAME` +","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"e.g. `edit tag/ friends enemies`","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"-"},"content":"e.g. `favourite 1`","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"-"},"content":"e.g. `showfavourite`","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"-"},"content":"e.g. `find James Jake`","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `find tag/ TAG [MORE_TAGS]` +","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"e.g. `find tag/ friends`","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"e.g. `find task/ update p/high done/false`","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : `help`","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `list`","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"-"},"content":"* *List tags* : `showtag`","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate INDEX`","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navigate fa/Tampines Mall ta/Sentosa","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"-"},"content":"e.g.`select 2`","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task/ INDEX` +","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"Esilocke"},"content":"e.g.`select task/ 2`","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `viewassign INDEX` +","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"e.g. `viewassign 1`","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `theme THEME` +","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `theme light`","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"* *History* : `history`","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":"* *Undo* : `undo`","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"* *Redo* : `redo`","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `open`","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `save`","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : `exit`","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Command Shorthand Cheat Sheet","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"Esilocke"},"content":"* *Add* : `a n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `a n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `a pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"Esilocke"},"content":"e.g. `a pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `a task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"e.g. `a task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `a tag/ [INDEX...] t/[TAG]` +","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"Esilocke"},"content":"e.g. `a tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `cp INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `cp 2 n/true p/false e/true a/false r/true`","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `pl [LEVEL]` +","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear persons* : `c person`","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear tasks* : `c task`","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":"* *Delete person* : `d INDEX` +","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `d 3`","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `d task/ INDEX` +","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"Esilocke"},"content":"e.g. `d task/ 4`","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `d tag/ INDEX t/[TAG]` +","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"e.g. `d tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `e INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `e 2 n/James Lee e/jameslee@example.com`","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `e task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"Esilocke"},"content":"e.g. `e task/ 2 p/veryhigh`","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `e tag/ OLDTAGNAME NEWTAGNAME` +","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"Esilocke"},"content":"e.g. `e tag/ friends enemies`","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":"* *Favourite persons* :`fav INDEX` +","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `fav 1`","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":"* *Unfavourite persons* :`unfav INDEX` +","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `unfav 1`","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"* *Show favourite list* :`sfav` +","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sfav`","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":"* *Find person* : `f KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `f James Jake`","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `f tag/ Tag [MORE_TAGS]` +","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"Esilocke"},"content":"e.g. `f tag/ friends`","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `f task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":"e.g. `f task/ update p/high`","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `l`","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"* *List tags* : `stag`","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `loc INDEX`","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navi [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navi fa/Tampines Mall ta/Sentosa","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"* *Select person* : `s INDEX` +","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"e.g.`s 2`","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `s task/ INDEX` +","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"Esilocke"},"content":"e.g.`s task/ 2`","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as complete* : `stc INDEX` +","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `stc 4`","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as incomplete* : `sti INDEX` +","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sti 5`","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"jeffreygohkw"},"content":"* *Assign to task* : `as PERSONINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `as 4 1 17 18 to/21`","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"jeffreygohkw"},"content":"* *Dismiss from task* : `ds PERSONINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `ds 4 1 from/17`","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `va INDEX` +","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"e.g. `va 1`","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `th THEME` +","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `th light`","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"jeffreygohkw"},"content":"* *History* : `h`","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"jeffreygohkw"},"content":"* *Undo* : `u`","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"jeffreygohkw"},"content":"* *Redo* : `r`","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `o`","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `sa`","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[F1]","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary.","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":191,"jeffreygohkw":252,"Esilocke":662,"-":363}},{"path":"docs/team/JeffreyGoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Jeffrey Goh - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Project: Address++","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is a desktop address book application that aims to help users manage their contacts and their time. It is primarily targeted at students with projects, although it may be used in a wide variety of other settings as well. Users will be able to interact with it using a Command Line Interface, and it has a Graphic User Interface created with JavaFX.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/jeffreygohkw.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/jeffreygohkw.md[Test code]]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Privacy of Fields","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior (Add and Edit Co-authored with Charles Goh)","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003daddprivacy]","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003deditprivacy]","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dchangeprivacy]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dprivacylevel]","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"Users may have contacts that they would like to keep confidential or those that they do not feel comfortable displaying in public. Instead of removing the contact from the address book, setting a field to private allows users to choose exactly what information they would like to display and what they would like to hide.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"In addition, a private name cannot be searched for, and a private address cannot be used in the locate and navigate commands to prevent users from finding out the value of the private field.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"Having a private field also doubles up as an extra layer of protection against unintentional modifications, as private fields cannot be edited without changing them back to public fields.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"It may be inconvenient for a user to set a person\u0027s fields to public and back to private every time they would like to have a peek at the data that was hidden, or to set a person\u0027s every field to private if they want to hide them. Thus, having a command to change the privacy level of the address book will make it much more convenient for users to access private information.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dprivacy]","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Locating a person\u0027s address","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dlocate]","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"While a person\u0027s phone and email address can be used directly, users often are unaware of where exactly their contacts\u0027 addresses are located in real life. The locate command aims to solve this problem by taking the address of a contact and searching for it on Google Maps. This allows the user to find out where exactly their contacts\u0027 addresses are located.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dlocate]","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Navigating from one address to another","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dnavigate]","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"Locating a contact does not tell users how to arrive at that particular contact\u0027s address. Furthermore, users may face the scenario where they have to travel and meet different groups and different contacts throughout the day. The Navigate command allows users to find out the most efficient path from one address to another with the aid of Google Maps.","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"Users are able to utilize the addresses attached to a person, as well as those attached to a task, in the navigate command. They can also manually input addresses in the custom line if they are looking for directions to or from an address that is not presently stored inside the address book. This greatly enhances the flexibility of the command, and allows users to use the command without having to add a dummy task or person to store new addresses beforehand.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dnavigate]","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Opening and Saving of the .xml save file","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopen]","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dsaveas]","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopensaveas]","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"Open and Save As will allow users to more easily manage their data. Open allows them to load their data from a .xml file, letting them easily work on multiple different address books. +","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"Save As allows users to save their address book data, letting it serve as backup or allowing them to be placed in a different location on the computer while still remaining operational. +","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"This also allows for easier transfers of save files between devices without having to manually drag and manage the save files to and from the folder where Address++ is located.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"It can even potentially allow for syncing save files between devices if external software like Dropbox is used.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dopensaveas]","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Other contributions","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":"* Add Menu Icons for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#10])","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"* Add Keyboard Shortcuts for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#11], https://github.com/CS2103AUG2017-W09-B2/main/pull/101[#101])","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"* Modified SortCommand to be undoable, and wrote test cases for it (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/29[#29], https://github.com/CS2103AUG2017-W09-B2/main/pull/30[#30])","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"* Created TaskAddress to store the address of tasks (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/129[#129], https://github.com/CS2103AUG2017-W09-B2/main/pull/132[#132])","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"* Added Travis, Coveralls and Appveyor links for Continuous Integration (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/4[#4], https://github.com/CS2103AUG2017-W09-B2/main/pull/22[#22])","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"* Performed Acceptance Testing for Team T16-B2 (Issue https://github.com/CS2103AUG2017-T16-B2/main/issues/102[#102])","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":"* Wrote some Manual Testing tests (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/162[#162], https://github.com/CS2103AUG2017-W09-B2/main/pull/165[#165])","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":159}},{"path":"docs/team/KelvinLin.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"\u003d Lin Ziwen Kelvin - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: AddressBook++","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/Esilocke.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/Esilocke.md[Test code]]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Edit Tag","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittag]","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"The user may find a need to change the name of a particular name. +","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"In the context of the target user, suppose that a user wishes to change the tag `CS2103Groupmates` to `friends`, after he has completed the module. +","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"The user would need to delete the tag from all users who are tagged with `CS2103Groupmates`, and add the tag `friends` to them one-by-one. `edittag` thus aims to make this process faster by allowing users to rename all instances of the tag from the address book.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"The EditTagCommand iterates through each person in the UniquePersonList, and replaces the old tag, if found, with the new tag.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Optional Data Input","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"Optional Data Input allows tasks and persons to have only one compulsory field, the name. All other fields in a person or task can be left unspecified, allowing for a greater range of inputs.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"We may not always have the opportunity to find contacts or tasks with complete information. +","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"This means that some contacts may not have an address, or email address, while some tasks may not have a deadline, or a description. Without Optional Data Input, the user would need to come up with random placeholder values for each prefix, which would greatly hinder user experience as the user would need to type in unnecessary values to satisfy the command format. +","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"Allowing optional data input thus lifts the restriction of making every field compulsory, and thus allows users to fill in a wider range of input.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"When a user does not fill in a prefix for a particular field, the parser will create an object corresponding to the missing field with a placeholder value.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"[source, java]","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"public Phone(String args) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ...","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"public boolean isValidPhone(String args) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (args.equals(PHONE_PLACEHOLDER_VALUE) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" ...","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"In addition, the isValid method is also updated to accept placeholder values as valid inputs.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Tasks Management","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003daddtask]","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittask]","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003ddeletetask]","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dfindtask]","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dselecttask]","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dsetstate]","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dassignDismiss]","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dclear]","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"Our intended target audience are primarily NUS students, who are working on projects. In addition to managing their contact details, allowing users to manage their tasks would also greatly improve their user experience, as they would not need to keep track of their project deadlines separately.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dtask]","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dassignDismiss]","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Other contributions","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* Conducted internal acceptance testing [https://github.com/CS2103AUG2017-W09-B2/main/issues/155[Issue #155]]","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"* Conducted Acceptance Testing for other teams [https://github.com/CS2103AUG2017-F09-B1/main/issues/83[F09-B1]] [https://github.com/CS2103AUG2017-F09-B1/main/issues/82[F09-B1]]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"Esilocke":114}},{"path":"docs/team/charlesgoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Charles Goh - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: Address++","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"Address++ is a desktop address book application that aims to provide students and","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"professionals with an effective tool to help them manage their contacts and their time.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"This is a snapshot of our User Interface","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"My contributions to this project are listed below:","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/charlesgoh.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/charlesgoh.md[Test code]]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Password Protection Commands `lock` `unlock` `changepassword`","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dpassword]","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Many users have security related concerns. In order to slow malicious users from causing","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"damage to users\u0027 Address++ application, the password protection suite of commands were","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"created.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dpassword]","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dsort]","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"As more contacts and tasks are added to the application, the lists may get long and disorganized. The Sort Command","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"allows users to sort both contacts and tasks by key fields. Examples include sorting contacts by name and","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"sorting contacts by deadlines.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dbackup]","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"Users are able to back up their data before making any changes so that in the event of an","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"emergency (e.g. clearing all data and then closing afterwards), the old save data can be restored.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dbackup]","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dfontsize]","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"Different monitors render the application differently. On some monitors, the words may appear to be too small. The font size","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"commands and buttons allow users to increase/decrease/reset the font sizes at any time when using the application.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dfontsize]","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Avatar and Remark Fields","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior: Co-authored with Jeffrey Goh","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003davatar]","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":"Avatars and remarks help users to identify different contacts. It was also implemented with the intention of making the application","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"more user friendly.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation for Avatar Field","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003davatar]","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Other contributions","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":"* Added tests for task related implementations (https://github.com/CS2103AUG2017-W09-B2/main/pull/115/files[#115]) +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":"* Conducted Acceptance Testing for another team [https://github.com/CS2103AUG2017-W09-B4/main/issues/77[W09-B4]]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":160,"-":2}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 5, 0, false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(model.getUserPrefs());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private String appTitle \u003d \"Address++\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BackupRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * An Event for backing up of data to a selected location.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class BackupRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private Model model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private String args;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public BackupRequestEvent(Model model, String args) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public Model getModel() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" return model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public void setModel(Model model) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public String getArgs() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" return args;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void setArgs(String args) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelNavigateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelNavigateEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" private final Location fromLocation;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final Location toLocation;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelNavigateEvent(Location fromLocation, Location toLocation) {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.fromLocation \u003d fromLocation;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.toLocation \u003d toLocation;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Location getFromLocation() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" return fromLocation;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Location getToLocation() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" return toLocation;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":33}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeFontSizeEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a font size change triggered by a command or the UI","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"public class ChangeFontSizeEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static int increaseSizeEventIndex \u003d 0;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static int decreaseSizeEventIndex \u003d 1;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static int resetSizeEventIndex \u003d 2;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private int triggerOption;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public ChangeFontSizeEvent(int triggerOption) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" return \"New Event: Font size change\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static int getIncreaseSizeEventIndex() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" return increaseSizeEventIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public static int getDecreaseSizeEventIndex() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return decreaseSizeEventIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static int getResetSizeEventIndex() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return resetSizeEventIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public int getTriggerOption() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return triggerOption;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public void setTriggerOption(int triggerOption) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangeThemeRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" private final String styleSheet;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public ChangeThemeRequestEvent(String styleSheet) {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" this.styleSheet \u003d styleSheet;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public String getStyleSheet() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return styleSheet;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/commons/events/ui/JumpToListRequestTaskEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Indicates a request to jump to the list of tasks","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class JumpToListRequestTaskEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public final int targetIndex;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public JumpToListRequestTaskEvent(Index targetIndex) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" //TODO optimize this class","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex.getZeroBased();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" this.addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" return result;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" } finally {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" history.add(commandText);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":12,"Esilocke":8,"-":49}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that adds an object to the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class AddCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/AddPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"John Doe \"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"98765432 \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + PREFIX_REMARK + \"Sells sea shells on the sea shore \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + PREFIX_AVATAR + \"avatar-filepath.png\"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"friends \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"owesMoney\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public AddPersonCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddPersonCommand)) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assert (((AddPersonCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddPersonCommand) other).personToAdd);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":73}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends AddCommand {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" + \"target persons in the current list.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":126}},{"path":"src/main/java/seedu/address/logic/commands/AddTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \": Adds a task to the address book. \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS]\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"12 Kent Ridge Crescent, 119275\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New task added: \\n%1$s\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Creates an AddTaskCommand to add the specified {@code ReadOnlyTask}","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public AddTaskCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" super();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddTaskCommand)) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assert (taskToAdd !\u003d null);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert (((AddTaskCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddTaskCommand) other).taskToAdd);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":70}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \"MyBackUpFile\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" super();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new BackupRequestEvent(model, args));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/logic/commands/ChangePasswordCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Changes user\u0027s password provided old password is correct and new passwords match.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommand extends Command {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"changepassword\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"cpw\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Password changed successfully\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes user password. \\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"NEWPASSWORD \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"CONFIRMPASSWORD \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_OLD_NEW_PS_SAME \u003d \"New password must be different from your old password\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ERROR_OCCURED \u003d \"An error occured. Please try again.\\n\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Your password is incorrect. Please try again.\\n\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_CONFIRMATION_INCORRECT \u003d \"Your new password and confirmation password \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" + \"do not match. Please try again\\n\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(ChangePasswordCommand.class);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private String oldPassword;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private String newPassword;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" private String confirmationPassword;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" * Takes in old password, new password and confirmation password from parser and creates a new","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * ChangePasswordCommand object","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param oldPassword","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" * @param newPassword","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" * @param confirmPassword","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand(String oldPassword, String newPassword, String confirmPassword) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.oldPassword \u003d oldPassword;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" this.newPassword \u003d newPassword;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.confirmationPassword \u003d confirmPassword;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes string using SHA256 encryption and returns hashed string","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * @param argument","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" private String forwardHash(String argument) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(argument, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes the user input password and checks if it matches with the encrypted password saved","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldPasswordCorrect() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String forwardHashedInputPassword \u003d forwardHash(oldPassword);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" String forwardHashActualPassword;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" forwardHashActualPassword \u003d userPrefs.getAddressBookEncryptedPassword();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" if (forwardHashActualPassword.equals(forwardHashedInputPassword)) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Actual password and input password matches\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return true;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Actual password and input password do not match\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" return false;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Takes new input passwords and checks them against one another.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" private boolean isNewPasswordInputsSame() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return newPassword.equals(confirmationPassword);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Checks if old password and new password are the same","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldAndNewPasswordTheSame() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return oldPassword.equals(newPassword);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" // Case where old password is incorrect","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" if (!isOldPasswordCorrect()) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Password is incorrect. Note: Default password is \u0027password\u0027 \");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Case where new password and confirmation password do not match","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" if (!isNewPasswordInputsSame()) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"New password and confirmation password do not match\");","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_CONFIRMATION_INCORRECT);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" // Case where old and new passwords are the same","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" if (isOldAndNewPasswordTheSame()) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Old password and new password cannot be the same\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_OLD_NEW_PS_SAME);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Case where user input passes both checks. Password is changed and UserPrefs saved","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" // Get user prefs file","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set new password to user prefs","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(newPassword);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" // Logs new password and saved password for debugging purposes","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String hashedNewPassword \u003d forwardHash(newPassword);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" String userPrefsHashedPassword \u003d userPrefs.getAddressBookEncryptedPassword();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New Password: \" + newPassword","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted New Password: \" + hashedNewPassword","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted Password From UserPrefs:\" + userPrefsHashedPassword","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" + \"\\nCommand\u0027s Password and UserPrefs saved password matches: \"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + Boolean.toString(hashedNewPassword.equals(userPrefsHashedPassword)) + \"\\n\");","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" // Return command result","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":142}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_AVATAR + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_AVATAR + FALSE_WORD;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d null;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(model.getPrivacyLevel());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Person must have all fields initialised.\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps)","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Name name \u003d createNameWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone \u003d createPhoneWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" Email email \u003d createEmailWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Address address \u003d createAddressWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark \u003d createRemarkWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar \u003d person.getAvatar();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" Boolean favourite \u003d person.getFavourite();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tag \u003d person.getTags();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tag);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Name) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Name) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return name;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createPhoneWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getPhone().getIsPrivate()) {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Phone\");","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(person.getPhone().getIsPrivate());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return phone;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createEmailWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getEmail().getIsPrivate()) {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Email\");","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(person.getEmail().getIsPrivate());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return email;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createAddressWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Address\");","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(person.getAddress().getIsPrivate());","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" return address;","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createRemarkWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getRemark().getIsPrivate()) {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Remark\");","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(person.getRemark().getIsPrivate());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return remark;","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return index;","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person.","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null.","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"charlesgoh"},"content":" * Returns the value of remarkIsPrivate","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" public Boolean getRemarkIsPrivate() {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"charlesgoh"},"content":" return remarkIsPrivate;","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"charlesgoh"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remarkIsPrivate);","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":381}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Clears all entries in the address book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/ClearPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the contacts in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommand extends ClearCommand {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All contacts have been cleared!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_PERSON);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/ClearTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the tasks in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommand extends ClearCommand {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All tasks have been cleared!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_TASK);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public abstract class Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" protected CommandHistory history;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * access to the dependencies.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that deletes an object from the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/DeletePersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Deletes a person from the address book.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommand extends DeleteCommand {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person identified by the index number used in the last listing.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Person: %1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size()) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToDelete));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeletePersonCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeletePersonCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends DeleteCommand {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"The target persons do not have input tags.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":125}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a task from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommand extends DeleteCommand {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the task identified by the index number used in the last listing.\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Task: %1$s\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToDelete));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeleteTaskCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteTaskCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":56}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + \"TASK \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" if (!personsToDismiss.contains(toDismiss)) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":89}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that edits an object in the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class EditCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/EditPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * Edits a person in the address book.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommand extends EditCommand {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last person listing. \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"91234567 \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Person: \\n%1$s\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static boolean areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final EditPersonDescriptor editPersonDescriptor;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * @param index of the person in the filtered person list to edit","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * @param editPersonDescriptor details to edit the person with","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editPersonDescriptor);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" editedPerson.setPrivacyLevel(model.getPrivacyLevel());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" updatedAvatar \u003d createUpdatedAvatar(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedAvatar, updatedTags);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().getIsPrivate()) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().getIsPrivate()) {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" //**author charlesgoh","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().getIsPrivate()) {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Avatar) for use in createEditedPerson","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Avatar) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar createUpdatedAvatar(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAvatar().isPresent()) {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAvatar;","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" //author","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonCommand)) {","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand e \u003d (EditPersonCommand) other;","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the person.","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" public static class EditPersonDescriptor {","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" private Name name;","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" private Phone phone;","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" private Email email;","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" private Address address;","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" private Boolean favourite;","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" private Remark remark;","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" private Avatar avatar;","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" private Set\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor() {}","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" this.name \u003d toCopy.name;","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d toCopy.phone;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" this.email \u003d toCopy.email;","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" this.address \u003d toCopy.address;","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" this.favourite \u003d toCopy.favourite;","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d toCopy.remark;","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d toCopy.avatar;","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d toCopy.tags;","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark,","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" this.avatar, this.tags);","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cName\u003e getName() {","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(name);","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPhone\u003e getPhone() {","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(phone);","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cEmail\u003e getEmail() {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(email);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAddress\u003e getAddress() {","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(address);","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cRemark\u003e getRemark() {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(remark);","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" public void setAvatar(Avatar avatar) {","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d avatar;","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAvatar\u003e getAvatar() {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(avatar);","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(tags);","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonDescriptor)) {","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" return getName().equals(e.getName())","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar())","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTags().equals(e.getTags());","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":190,"Esilocke":227,"wangyiming1019":9}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends EditCommand {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \": Edits the specified tag \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/EditTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Edits a task in the address book.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommand extends EditCommand {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \": Edits the details of the task identified \"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Task: \\n%1$s\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand(Index index, EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownTaskList.size()) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedTask));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * edited with {@code editTaskDescriptor}.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assert taskToEdit !\u003d null;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" TaskName updatedTaskName;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Description updatedDescription;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" Deadline updatedDeadline;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Priority updatedPriority;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Assignees assignees;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" Boolean updatedState;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" TaskAddress updatedTaskAddress;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // You cannot edit assignees or state using edit command","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assignees \u003d taskToEdit.getAssignees();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" updatedState \u003d taskToEdit.getCompleteState();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress \u003d editTaskDescriptor.getTaskAddress().orElse(taskToEdit.getTaskAddress());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState,","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskCommand)) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand e \u003d (EditTaskCommand) other;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task.","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private Description description;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" private Priority priority;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" private TaskAddress taskAddress;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d toCopy.taskAddress;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority,","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" this.taskAddress);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d taskAddress;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskAddress\u003e getTaskAddress() {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskAddress);","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority())","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTaskAddress().equals(e.getTaskAddress());","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":224}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getAddress(), true,","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getTags());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToFavourite, editedPerson);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that finds objects in the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class FindCommand extends Command {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/FindPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" * Finds people in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommand extends FindCommand {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand(NameContainsKeywordsPredicate predicate) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindPersonCommand","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personPredicate.equals(((FindPersonCommand) other).personPredicate);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":32}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends FindCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" + \": Finds all persons whose tags contain any of \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" friends colleagues\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/FindTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Finds tasks in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommand extends FindCommand {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \": Finds all tasks whose names or descriptions \"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]... [p/MINIMUM_PRIORITY] [done/TASK_STATE]\\n\"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_COMPLETE_VALUE \u003d \"The task status should either be \u0027true\u0027 or \u0027false\u0027\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PRIORITY \u003d \"The specified priority should be an integer from 1 to 5\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand(TaskContainsKeywordPredicate predicate) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindTaskCommand","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskPredicate.equals(((FindTaskCommand) other).taskPredicate);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/commands/FontSizeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 5;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"fontsize\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"fs\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String INCREASE_SIZE_PARAMETER \u003d \"increase\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String DECREASE_SIZE_PARAMETER \u003d \"decrease\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String RESET_SIZE_PARAMETER \u003d \"reset\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" INCREASE_SIZE_PARAMETER, DECREASE_SIZE_PARAMETER, RESET_SIZE_PARAMETER));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Increases, decreases or resets font sizes \\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [OPTION]\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" increase\\n\"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" reset\\n\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\" + MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_INCREASE_FONT \u003d \"Font size increased successfully\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_DECREASE_FONT \u003d \"Font size decreased successfully\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_RESET_FONT \u003d \"Font size reset successfully\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" private final String option;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand(String option) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.option \u003d option;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getOption() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return this.option;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" switch (option) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" case INCREASE_SIZE_PARAMETER:","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_INCREASE_FONT);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" case DECREASE_SIZE_PARAMETER:","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_DECREASE_FONT);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" case RESET_SIZE_PARAMETER:","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_RESET_FONT);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" System.err.println(\"Parameter is invalid\");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_INVALID_INPUT + MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":68}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person at Index: %1$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_ADDRESS_FAILURE \u003d \"Person %1$s has no Address\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_NO_ADDRESS_FAILURE, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":62}},{"path":"src/main/java/seedu/address/logic/commands/LockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class LockCommand extends Command {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"lock\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"lk\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Locks the application. \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ locked successfully\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public LockCommand(String password) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to lock","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/NavigateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Navigates from one address to another with the help of Google Maps","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"navigate\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"nav\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" + \": Get directions from one address to another.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three)\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \" AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" fp/2 ta/University Town\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NAVIGATE_SUCCESS \u003d \"Navigating from %1$s to %2$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_FROM_ERROR \u003d \"Only one type of From prefix allowed.\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_TO_ERROR \u003d \"Only one type of To prefix allowed.\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR \u003d \"Address of the Person at index %1$s is private.\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR \u003d \"Person at index %1$s does not have an address.\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_HAS_NO_ADDRESS_ERROR \u003d \"Task at index %1$s does not have an address.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationFrom;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationTo;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private final Index fromIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private final Index toIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean fromIsTask;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean toIsTask;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d null;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d null;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" checkDuplicateFromAndToLocation(locationFrom, locationTo, fromIndex, toIndex);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" this.locationFrom \u003d from;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" this.locationTo \u003d to;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" this.toIndex \u003d toIndex;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIndex \u003d fromIndex;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" this.toIsTask \u003d toIsTask;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIsTask \u003d fromIsTask;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Throws an IllegalArgumentException if there is both locationFrom and fromIndex are not null,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * or if both locationTo and toIndex are not null.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo,","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" Index fromIndex, Index toIndex) throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" Location from;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" Location to;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" if (fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" if (toIndex !\u003d null) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d setLocationByIndex(toIndex, toIsTask);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelNavigateEvent(from, to));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_NAVIGATE_SUCCESS, from, to));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationFrom() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" return locationFrom;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationTo() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" return locationTo;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" public Index getFromIndex() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" return fromIndex;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" public Index getToIndex() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" return toIndex;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isFromIsTask() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return fromIsTask;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isToIsTask() {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" return toIsTask;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NavigateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationFrom(other)","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationTo(other)","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIndex(other)","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIndex(other)","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIsTask(other)","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIsTask(other)); // state check","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationFrom) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationFrom(Object other) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationFrom \u003d\u003d null) {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationFrom \u003d\u003d null;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationFrom.equals(((NavigateCommand) other).locationFrom);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationTo) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationTo(Object other) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationTo \u003d\u003d null) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationTo \u003d\u003d null;","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationTo.equals(((NavigateCommand) other).locationTo);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIndex) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIndex(Object other) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" if (this.fromIndex \u003d\u003d null) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).fromIndex \u003d\u003d null;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIndex.equals(((NavigateCommand) other).fromIndex);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIndex) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIndex(Object other) {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" if (this.toIndex \u003d\u003d null) {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).toIndex \u003d\u003d null;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIndex.equals(((NavigateCommand) other).toIndex);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIsTask) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIsTask(Object other) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIsTask \u003d\u003d (((NavigateCommand) other).fromIsTask);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIsTask) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIsTask(Object other) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIsTask \u003d\u003d (((NavigateCommand) other).toIsTask);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":224}},{"path":"src/main/java/seedu/address/logic/commands/OpenCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommand extends Command {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"open\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"o\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String OPEN_COMMAND_SUCCESS \u003d \"Successfully opened file.\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new OpenRequestEvent());","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(OPEN_COMMAND_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/PrivacyLevelCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Handles the changing of Privacy Levels in the address book","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"privacylevel\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"pl\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String CHANGE_PRIVACY_LEVEL_SUCCESS \u003d \"Successfully changed privacy level to %1$s.\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String WRONG_PRIVACY_LEVEL_MESSAGE \u003d \"Privacy Level can only be 1, 2 or 3\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MIN_PRIVACY_LEVEL \u003d 1;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MAX_PRIVACY_LEVEL \u003d 3;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \": Changes the privacy level of the address book. Level 1 shows all data, level 2 hides private fields\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" + \" and level 3 hides persons with at least 1 private field.\\n\"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: LEVEL (must be 1, 2 or 3)\\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final int level;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand(int level) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.level \u003d level;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public int getLevel() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return level;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof PrivacyLevelCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.level \u003d\u003d ((PrivacyLevelCommand) other).level); // state check","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":77}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SaveAsCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data to a new save file at a desired location","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommand extends Command {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"save\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"sa\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String SAVE_AS_COMMAND_SUCCESS \u003d \"Successfully saved file.\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new SaveAsRequestEvent());","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(SAVE_AS_COMMAND_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that selects an object in the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class SelectCommand extends Command {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/SelectPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Selects a person in the address book and loads the view panel for that person.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommand extends SelectCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Person: %1$s\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectPersonCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectPersonCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":47}},{"path":"src/main/java/seedu/address/logic/commands/SelectTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * Selects a task in the address book and loads the view panel for that task.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommand extends SelectCommand {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \": Selects the task identified by the index number used in the last task listing.\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Task: %1$s\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownTaskList.size()) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestTaskEvent(targetIndex));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectTaskCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectTaskCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":49}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as complete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as incomplete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_LIST_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"person\", \"task\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\", \"priority\", \"deadline\"));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons or all tasks by chosen \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [LIST] [FIELD] [ORDER]\\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" person email desc\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_WORD + \" task deadline desc\\n\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Person Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Task Field Values: DEADLINE, PRIORITY\\n\"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_PERSONS \u003d \"All persons in address book successfully sorted\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_TASKS \u003d \"All tasks in address book successfully sorted\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" private final String list;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private final String field;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private final String order;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String list, String field, String order) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" this.list \u003d list;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * Checks if argument command has the same parameter properties","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param commandB","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public boolean sameCommandAs(SortCommand commandB) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return commandB.getList().equals(this.list) \u0026\u0026 commandB.getField()","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .equals(this.field) \u0026\u0026 commandB.getOrder().equals(this.order);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public String getField() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" return this.field;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" return this.order;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public String getList() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" return this.list;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" if (this.list.equals(ACCEPTED_LIST_PARAMETERS.get(0))) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_PERSONS);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" model.sortTasks(getField(), getOrder());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_TASKS);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":2}},{"path":"src/main/java/seedu/address/logic/commands/TagListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * List all tags in the address book to the user","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommand extends Command {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showtag\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"stag\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAILURE \u003d \"There is no tag!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All the tags are here: \";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(displayTags());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * display all the tags to user","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * @return String displayTags","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String displayTags() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" String displayTags;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e tagList \u003d getAllTagsInAddressBook();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" if (tagList.isEmpty()) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_SUCCESS + convertTagToString(tagList);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return displayTags;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * get all the tags in the address book without duplication","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" * @return allTagList","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" private ArrayList\u003cTag\u003e getAllTagsInAddressBook() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e allTagList \u003d new ArrayList\u003cTag\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" if (!allTagList.contains(tag)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" allTagList.add(tag);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" return allTagList;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" * convert a list of tags to a String","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * @return String tags","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ArrayList\u003cTag\u003e tagList) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagNameList \u003d new ArrayList\u003cString\u003e();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : tagList) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" tagNameList.add(tag.getTagName());","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Collections.sort(tagNameList);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder tagNameString \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" for (String tagName : tagNameList) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" tagNameString.append(\"\u003c\").append(tagName).append(\"\u003e \");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" return tagNameString.toString().trim();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/ThemeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommand extends Command {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"theme\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"th\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" + \": Sets the theme based on the specified style.\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: STYLE\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" dark\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_CHANGE_SUCCESS \u003d \"Theme Changed to: %1$s\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_NOT_AVAILABLE \u003d \"Theme %1$s is not available.\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_IN_USE \u003d \"Theme %1$s is currently in use.\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private final String style;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand (String style) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" this.style \u003d style;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return style;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ThemeCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.style.equals(((ThemeCommand) other).style)); // state check","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":64}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToUnfavourite.getName(),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getPhone(), personToUnfavourite.getEmail(),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getAddress(), false,","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getRemark(), personToUnfavourite.getAvatar(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getTags());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToUnfavourite, editedPerson);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/UnlockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommand extends Command {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"unlock\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"ul\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Unlocks the application. \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ unlocked successfully\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand(String password) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to unlocked","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/ViewAssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Displays a list of all persons assigned to a specified task","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"viewassign\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"va\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Shows all persons assigned to a task\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index taskIndex;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToFind \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.viewAssignees(taskToFind);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" || other instanceof ViewAssignCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((ViewAssignCommand) other).taskIndex);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":48}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK, PREFIX_TAG_FULL)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d AddTaskCommandParser.constructTask(args);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new AddTaskCommand(taskToAdd);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TAG_FULL)) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AddTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d AddPersonCommandParser.constructPerson(args);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new AddPersonCommand(personToAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28,"-":23}},{"path":"src/main/java/seedu/address/logic/parser/AddPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR_PRIVATE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ReadOnlyPerson object in the context of AddPersonCommand.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"public class AddPersonCommandParser extends AddCommandParser {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static ReadOnlyPerson constructPerson(String args) throws ParseException {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_AVATAR, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_AVATAR_PRIVATE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d makeName(argMultimap);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d makePhone(argMultimap);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d makeEmail(argMultimap);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d mmakeAddress(argMultimap);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d makeAvatar(argMultimap);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d makeRemark(argMultimap);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, avatar, tagList);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Name based on the input arguments","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static Name makeName(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return name;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Phone based on the input arguments","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone makePhone(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(null);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" return phone;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Email based on the input arguments","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" private static Email makeEmail(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(null);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" return email;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Address based on the input arguments","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" private static Address mmakeAddress(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(null);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return address;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Avatar based on the input arguments","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar makeAvatar(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_AVATAR))) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).get();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d new Avatar(null);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return avatar;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Remark based on the input arguments","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark makeRemark(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)) {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(null);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return remark;","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":164,"Esilocke":2}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser extends AddCommandParser {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" protected static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/parser/AddTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ReadOnlyTask object in the context of AddTaskCommand.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParser extends AddCommandParser {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyTask from the arguments provided.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static ReadOnlyTask constructTask(String args) throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY,","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" PREFIX_ADDRESS, PREFIX_TASK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" TaskName name;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Description description;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Priority priority;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" TaskAddress address;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" description \u003d arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION)","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get()","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" : new Description(null);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" deadline \u003d arePrefixesPresent(argMultimap, PREFIX_DEADLINE)","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get()","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" : new Deadline(null);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" priority \u003d arePrefixesPresent(argMultimap, PREFIX_PRIORITY)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get()","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" : new Priority(null);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" address \u003d arePrefixesPresent(argMultimap, PREFIX_ADDRESS)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS)).get()","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" : new TaskAddress(null);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, address);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":67}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"public class AddressBookParser {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_NO_ACCESS \u003d \"Not allowed! You must unlock before\"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" + \" making any changes.\\n\" + UnlockCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @param userInput full user input string","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @return the command based on the user input","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // Check lock state","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Parsing command. Lock state is currently: \" + Boolean.toString(lockState));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" Command result \u003d processNonCrudCommands(commandWord, arguments);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" if (result !\u003d null) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" return result;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // Test for lock. If locked, return no access message","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" if (lockState) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(MESSAGE_NO_ACCESS);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" return new TagListCommand();","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" return new HistoryCommand();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" return new UndoCommand();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" return new RedoCommand();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" * Checks for non crud command words or aliases and returns the relevant commmand if there is one.","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" * Otherwise control is returned back to the original parseCommand method.","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" * Note: Code was refactored due to codacy\u0027s recommendation that there was a problem with parseCommand\u0027s","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" * NPath complexity (i.e. it the code was too long. Makes it less readable and prone to errors)","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" * @param commandWord","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" * @param arguments","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" private Command processNonCrudCommands(String commandWord, String arguments) throws ParseException {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality and for locking and unlocking","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return new OpenCommand();","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" return new SaveAsCommand();","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return new SelectCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" return new LocateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" return new NavigateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return new LockCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" return null;","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":106,"jeffreygohkw":19,"Esilocke":25,"wangyiming1019":29,"-":70}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * filepath.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 1;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Parses the given user input and backs up data into a separate file name.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @param userInput","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ChangePasswordCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new ChangePassword object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandParser implements Parser\u003cChangePasswordCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePasswordCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a ChangePasswordCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" .tokenize(args, PREFIX_PASSWORD, PREFIX_NEW_PASSWORD, PREFIX_CONFIRM_PASSWORD);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" // Check and split arguments before passing them to ChangePasswordCommand","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_NEW_PASSWORD).isPresent()","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).isPresent()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String password \u003d argMultimap.getValue(PREFIX_PASSWORD).get();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String newPassword \u003d argMultimap.getValue(PREFIX_NEW_PASSWORD).get();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" String confirmPassword \u003d argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).get();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommand(password, newPassword, confirmPassword);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":38}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePrivacyCommand","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ChangePrivacyCommand object for execution.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ClearCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser implements Parser\u003cClearCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearPersonCommand();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new ClearTaskCommand();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person/\");","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TAG_FULL \u003d new Prefix(\"tag/\");","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"v/\");","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR_PRIVATE \u003d new Prefix(\"pv/\");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task/\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_STATE \u003d new Prefix(\"done/\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_PERSON \u003d new Prefix(\"fp/\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_TASK \u003d new Prefix(\"ft/\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_ADDRESS \u003d new Prefix(\"fa/\");","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_PERSON \u003d new Prefix(\"tp/\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_TASK \u003d new Prefix(\"tt/\");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_ADDRESS \u003d new Prefix(\"ta/\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_NEW_PASSWORD \u003d new Prefix(\"np/\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_CONFIRM_PASSWORD \u003d new Prefix(\"cfp/\");","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":14,"Esilocke":9,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommandParser().parse(filteredString);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return new DeleteTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommandParser().parse(args);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/DeletePersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParser extends DeleteCommandParser {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommand(index);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":69}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParser {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object in the context of DeleteTaskCommand.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommand(index);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommandParser().constructTaskDescriptor(filteredArgs);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommandParser().constructPersonDescriptor(args);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":16,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/EditPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditPersonCommand object","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParser extends EditCommandParser {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditPersonCommand that edits a Person object. **/","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand constructPersonDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" PREFIX_REMARK, PREFIX_AVATAR, PREFIX_TAG);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.EditPersonDescriptor editPersonDescriptor \u003d new EditPersonCommand.EditPersonDescriptor();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).ifPresent(editPersonDescriptor::setAvatar);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommand(index, editPersonDescriptor);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * {@code Set\u003cTag\u003e} containing zero tags.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert tags !\u003d null;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (tags.isEmpty()) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":74}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditTagCommand","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * and returns an EditTagCommand object for execution.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return tagList;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/logic/parser/EditTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditTaskCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParser extends EditCommandParser {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditTaskCommand that edits a Task object. **/","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand constructTaskDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY, PREFIX_ADDRESS);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor editTaskDescriptor \u003d new EditTaskCommand.EditTaskDescriptor();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS))","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setTaskAddress);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommand(index, editTaskDescriptor);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommandParser().parse(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new FindTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommandParser().parse(args);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/FindPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindPersonCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParser extends FindCommandParser {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindPersonCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an FindPersonCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/FindTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_STATE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindTaskCommand object","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandParser extends FindCommandParser {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindTaskCommand","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * and returns an FindTaskCommand object for execution.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(argsWithNoTaskPrefix, PREFIX_PRIORITY, PREFIX_STATE);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String keywords \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d keywords.trim();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityFindRequired \u003d argMultimap.getValue(PREFIX_PRIORITY).isPresent();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" boolean isStateFindRequired \u003d argMultimap.getValue(PREFIX_STATE).isPresent();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" int minPriority \u003d 0;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" boolean isComplete \u003d false;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (isPriorityFindRequired) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" minPriority \u003d parsePriority(argMultimap.getValue(PREFIX_PRIORITY).get());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" if (isStateFindRequired) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" isComplete \u003d parseState(argMultimap.getValue(PREFIX_STATE).get());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" isStateFindRequired, isPriorityFindRequired, isComplete, minPriority));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns an integer corresponding to its value","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Guarantees: The specified value is valid as a priority value","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private int parsePriority(String args) throws ParseException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(Priority.MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" int priority;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.parseInt(args.trim());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (priority \u003c 1 || priority \u003e 5) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return priority;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns a boolean value corresponding to its value","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" private boolean parseState(String args) throws ParseException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" if (\"true\".equals(trimmed) || \"false\".equals(trimmed)) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return Boolean.valueOf(trimmed);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_COMPLETE_VALUE);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/logic/parser/FontSizeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParser implements Parser\u003cFontSizeCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final int PARAMETER_POSITION \u003d 0;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the FontSizeCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a FontSizeCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 1) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" if (!FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, FontSizeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommand(argKeywords[PARAMETER_POSITION]);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":48}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new LocateCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the LocateCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an LocateCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/LockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class LockCommandParser implements Parser\u003cLockCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the LockCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * and returns a LockCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public LockCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[0]);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[1]);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":36}},{"path":"src/main/java/seedu/address/logic/parser/NavigateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new NavigateCommand object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParser implements Parser\u003cNavigateCommand\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" private Location from \u003d null;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private Location to \u003d null;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Index fromIndex \u003d null;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Index toIndex \u003d null;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the NavigateCommand","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an NavigateCommand object for execution.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" resetValues();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argumentMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_NAVIGATE_FROM_PERSON,","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_FROM_TASK, PREFIX_NAVIGATE_FROM_ADDRESS, PREFIX_NAVIGATE_TO_PERSON,","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_TO_TASK, PREFIX_NAVIGATE_TO_ADDRESS);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_ADDRESS);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_PERSON);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_TASK);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" boolean toAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_ADDRESS);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" boolean toPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_PERSON);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" boolean toTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_TASK);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkFrom(argumentMultimap, fromAddress, fromPerson, fromTask);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" checkTo(argumentMultimap, toAddress, toPerson, toTask);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return new NavigateCommand(from, to, fromIndex, toIndex, fromTask, toTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * Resets the values stored in NavigateCommandParser object to null","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void resetValues() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d null;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d null;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d null;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d null;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Checksif only 1 To argument is provided","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no To arguments or there are more than 1 To arguements","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" private void checkTo(ArgumentMultimap argumentMultimap, boolean toAddress, boolean toPerson, boolean toTask)","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (!(toAddress || toPerson || toTask)) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((toAddress \u0026\u0026 (toPerson || toTask)) || (toPerson \u0026\u0026 toTask)) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more to prefixes are present","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, toAddress, toPerson, false);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if only 1 From argument is provided","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no From arguments or there are more than 1 From arguments","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person,","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" boolean forFrom) throws IllegalValueException {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":144}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtil {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * trimmed.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer).","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Name to be private if true.","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Phone to be private if true.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Address to be private if true.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e avatar} into an {@code Optional\u003cAddress\u003e} if {@code avatar} is present.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAvatar\u003e parseAvatar(Optional\u003cString\u003e avatar) throws IllegalValueException {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(avatar);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" return avatar.isPresent() ? Optional.of(new Avatar(avatar.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Remark to be private if true.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Email to be private if true.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}.","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" requireNonNull(tags);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" for (String tagName : tags) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" return tagSet;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present.","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present.","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present.","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a {@code TaskAddress} if it is present.","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cTaskAddress\u003e parseTaskAddress(Optional\u003cString\u003e address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new TaskAddress(address.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a (@code Location) if it is present.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cLocation\u003e parseLocationFromAddress(Optional\u003cString\u003e location) throws IllegalValueException {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(location);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return location.isPresent() ? Optional.of(new Location(location.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" * the value in the String.","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" public static ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" int parsedInt;","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" if (!s.isEmpty()) {","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":123,"Esilocke":64,"-":66}},{"path":"src/main/java/seedu/address/logic/parser/PrivacyLevelCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new PrivacyLevelCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParser implements Parser\u003cPrivacyLevelCommand\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the PrivacyLevelCommand","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an PrivacyLevelCommand object for execution.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" int level \u003d ParserUtil.parseIndex(args).getOneBased();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommand(level);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, PrivacyLevelCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27}},{"path":"src/main/java/seedu/address/logic/parser/SelectCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new SelectCommand object","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class SelectCommandParser implements Parser\u003cSelectCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * and returns an SelectCommand object for execution.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public SelectCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\").trim();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommandParser().parse(trimmed);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommandParser().parse(args);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/SelectPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectPersonCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParser extends SelectCommandParser {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectPersonCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectPersonCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommand(index);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SelectTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectTaskCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParser extends SelectCommandParser {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectTaskCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectTaskCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommand(index);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int LIST_ARG_POSITION \u003d 0;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 1;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 2;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 3;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e PERSON_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(0, 4);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e TASK_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(4, 6);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Eliminate spaces","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(0))","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 TASK_FIELD_ARGS.contains(argKeywords[1]))","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(1))","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 PERSON_FIELD_ARGS.contains(argKeywords[1]))) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_LIST_PARAMETERS.contains(argKeywords[LIST_ARG_POSITION])) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[LIST_ARG_POSITION],","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":66}},{"path":"src/main/java/seedu/address/logic/parser/ThemeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ThemeCommand object","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParser implements Parser\u003cThemeCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ThemeCommand","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ThemeCommand object for execution.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/UnlockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommandParser implements Parser\u003cUnlockCommand\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d \"Password is required\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the UnlockCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a UnlockCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[0]);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[1]);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ViewAssignCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ViewAssignCommand object","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParser implements Parser\u003cViewAssignCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommand(index);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":24}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private HashMap\u003cString, String\u003e styleMap;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * among constructors.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" styleMap \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public AddressBook() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" initialiseStyleMap();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" //// list overwrite operations","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasks.clearAssignees();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" //// person-level operations","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" persons.add(newPerson);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" public void sortTasksBy(String field, String order) {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" tasks.sortBy(field, order);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the index of {@code ReadOnlyPerson} specified","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractPersonIndexes(ArrayList\u003cReadOnlyPerson\u003e personsToExtract) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return persons.extractIndexes(personsToExtract);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" // used for checking person tag references","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the UniquePersonList","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" return persons.getMappings();","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" //// tag-level operations","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" tags.add(t);","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" //// task-level operations","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists.","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified person from all assignment lists for every task **/","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" public void removePersonFromAssignees(Index target) {","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" tasks.removeAssignee(target);","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" * Updates the Assignees for all tasks in the internal tasks list with their new mappings","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" public void updateTaskAssigneeMappings(Index[] mappings) {","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" tasks.updateAssignees(mappings);","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}.","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" //// theme-level operations","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Initialises the style map by adding the key value pairs","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" * for the strings that will be input in ThemeCommand and the file name of the .css file","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void initialiseStyleMap() {","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"/view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"/view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"/view/LightTheme.css\");","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"/view/LightTheme.css\");","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" return styleMap;","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" //// util methods","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\"","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":" // TODO: refine later","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" return persons.asObservableList();","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromPersonList(int index) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" return persons.asObservableList().get(index);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":" return tags.asObservableList();","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":25,"Esilocke":131,"wangyiming1019":17,"-":193}},{"path":"src/main/java/seedu/address/model/Location.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Location in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidLocation(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class Location {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" \"Location can take any value, and it should not be blank\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" /*","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String LOCATION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given location.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given location string is invalid.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public Location(String location) throws IllegalValueException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (location \u003d\u003d null) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidLocation(location)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d location;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid location.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidLocation(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(LOCATION_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof Location // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Location) other).value)); // state check","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The API of the Model component.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public interface Model {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Adds the given person */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /** Displays all persons assigned to the specified task */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" void viewAssignees(ReadOnlyTask task);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by chosen field in ascending (asc) or descending (desc) order","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" * Sorts all tasks in task list by chosen field in ascending (asc) or descending (desc) order","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" void sortTasks(String field, String order);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Returns lock state. True means locked. False means unlocked","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" boolean getLockState();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" * Locks address book from model","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" void lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Unlock address book from model","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" void unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" * Returns a copy of the UserPrefs","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" UserPrefs getUserPrefs();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson getPersonAtIndexFromAddressBook(int index);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" void setTheme(String theme);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" String getTheme();","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" HashMap\u003cString, String\u003e getStyleMap();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":15,"Esilocke":58,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.PersonCompleteMatchPredicate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" private final UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.userPrefs \u003d userPrefs;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d userPrefs.getTheme();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public ModelManager() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" persons.add(target);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d addressBook.extractPersonIndexes(persons);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" Index personIndex \u003d personIndexes.get(0);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" addressBook.removePersonFromAssignees(personIndex);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" Index[] updatedIndexes \u003d addressBook.getMappings();","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" System.out.println(updatedIndexes.length);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" addressBook.updateTaskAssigneeMappings(updatedIndexes);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks(String field, String order) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(field, order);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" return userPrefs;","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return getUserPrefs().getAddressBookLockState();","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().lockAddressBook();","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().unlockAddressBook();","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" int index;","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToAssign);","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d newAssignees.assign(positions);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneAdded) {","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToAssignTo, newAssignees);","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToAssignTo, updatedTask);","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToDismiss);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneDismissed \u003d newAssignees.dismiss(positions);","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneDismissed) {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToDismissFrom, newAssignees);","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToDismissFrom, updatedTask);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d toSet.getTaskAddress();","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state, taskAddress);","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d task.getAssignees();","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e internalList \u003d assignees.getList();","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToShow \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" for (Index i : internalList) {","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" assert(i.getZeroBased() \u003c filteredPersons.size());","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" personsToShow.add(filteredPersons.get(i.getZeroBased()));","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" PersonCompleteMatchPredicate assignedPredicate \u003d new PersonCompleteMatchPredicate(personsToShow);","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" updateFilteredPersonList(assignedPredicate);","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" * {@code addressBook}","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 3) {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" if (predicate instanceof NameContainsKeywordsPredicate) {","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsKeywordsPrivacyLevelPredicate(((","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPredicate) predicate).getKeywords()));","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsTagsPredicate) {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsTagsPrivacyLevelPredicate(((","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsTagsPredicate) predicate).getTags()));","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsFavouritePredicate) {","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsFavouritePrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate \u003d\u003d PREDICATE_SHOW_ALL_PERSONS) {","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Utility methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" * Constructs a new {@code ReadOnlyTask} from an existing ReadOnlyTask, with the specified assignees list.","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyTask constructTaskWithNewAssignee(ReadOnlyTask originalTask, Assignees updatedAssignees) {","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d originalTask.getTaskName();","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" Description description \u003d originalTask.getDescription();","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d originalTask.getDeadline();","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d originalTask.getPriority();","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d originalTask.getCompleteState();","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d originalTask.getTaskAddress();","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, updatedAssignees,","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" state, taskAddress);","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" return updatedTask;","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c 1 || level \u003e 3) {","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy Level can only be 0, 1 or 2\");","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getPersonAtIndexFromPersonList(index);","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" userPrefs.setTheme(theme);","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" return theme;","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getStyleMap();","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":72,"Esilocke":186,"wangyiming1019":58,"-":110}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String addressBookFilePath \u003d \"data/addressbook.xml\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private String addressBookName \u003d \"My Address++\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private boolean addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private String addressBookEncryptedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" .hashString(\"password\", StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public UserPrefs() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" this.setGuiSettings(1080, 720, 0, 0);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return addressBookFilePath;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public String getAddressBookName() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return addressBookName;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public String getAddressBookEncryptedPassword() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" return addressBookEncryptedPassword;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void setAddressBookEncryptedPassword(String addressBookPasswordInput) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" this.addressBookEncryptedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" .hashString(addressBookPasswordInput, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBook() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d true;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBook() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean getAddressBookLockState() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return this.addressBookLockState;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookEncryptedPassword, o.addressBookEncryptedPassword)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nPassword : \" + addressBookEncryptedPassword);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (theme \u003d\u003d null) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return \"/view/DarkTheme.css\";","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return theme;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":12,"-":74}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this(address);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid person address.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s avatar filepath in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"public class Avatar {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" \"Person avatar can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public Avatar(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d AVATAR_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" if (!isValidAvatar(address)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidAvatar(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return test.matches(AVATAR_VALIDATION_REGEX) || test.equals(AVATAR_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Avatar // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":57,"jeffreygohkw":6}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given email.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this(email);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":42,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d trimmedName;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(name);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Name) other).value)); // state check","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":47,"-":48}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured and has no private fields","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsFavouritePrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsFavouritePrivacyLevelPredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return (person.getFavourite() \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsFavouritePrivacyLevelPredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameContainsKeywordsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public NameContainsKeywordsPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" return keywords.stream()","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getKeywords() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" return keywords;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" || (other instanceof NameContainsKeywordsPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPredicate) other).keywords)); // state check","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":7,"-":30}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" * and has no private fields","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsKeywordsPrivacyLevelPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return (keywords.stream()","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword))","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsKeywordsPrivacyLevelPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPrivacyLevelPredicate) other).keywords)); //state check","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/\")) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(1));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getTags() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return tags;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":6,"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags and hasno private fields.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsTagsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e tags;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsTagsPrivacyLevelPredicate(List\u003cString\u003e tags) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" String allTagString \u003d convertTagToString(person);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (isOnlyUnwantedTags) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" return (!(unwantedTag.stream()","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))))","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" return (wantedTag.stream()","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))))","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" * check only unwanted tag list has elements","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" * @return a boolean value","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (!everyTag.startsWith(\"/\")) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" unwantedTag.add(everyTag.substring(1));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * Convert a set of tags to Strings","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":86}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cAvatar\u003e avatar;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Every field must be present and not null.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Boolean favourite, Remark remark, Avatar avatar, Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" this.avatar \u003d new SimpleObjectProperty\u003c\u003e(avatar);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" source.getRemark(), source.getAvatar(), source.getTags());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return name;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public Name getName() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return name.get();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return phone;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public Phone getPhone() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" return phone.get();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return email;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public Email getEmail() {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" return email.get();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" return address;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public Address getAddress() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return address.get();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return favourite;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" return remark.get();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void setAvatar(Avatar avatar) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" this.avatar.set(requireNonNull(avatar));","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cAvatar\u003e avatarProperty() {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" return avatar;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" public Avatar getAvatar() {","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" return avatar.get();","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" * if modification is attempted.","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags, avatar);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.getName().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" this.getPhone().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" this.getEmail().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" this.getAddress().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" this.getRemark().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if the Person has at least one private field and false otherwise","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" public boolean hasPrivateField() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return (this.getName().getIsPrivate() || this.getPhone().getIsPrivate() || this.getAddress().getIsPrivate()","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" || this.getEmail().getIsPrivate() || this.getRemark().getIsPrivate());","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":37,"jeffreygohkw":25,"wangyiming1019":20,"-":134}},{"path":"src/main/java/seedu/address/model/person/PersonCompleteMatchPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s matches any one of the keywords","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class PersonCompleteMatchPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" private final List\u003cReadOnlyPerson\u003e keywords;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public PersonCompleteMatchPredicate(List\u003cReadOnlyPerson\u003e keywords) {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return keywords.stream()","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" .anyMatch(person::equals);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || (other instanceof PersonCompleteMatchPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((PersonCompleteMatchPredicate) other).keywords)); // state check","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Validates given phone number.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cAvatar\u003e avatarProperty();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" Avatar getAvatar();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" boolean hasPrivateField();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark())","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getAvatar().equals(this.getAvatar());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" builder.append(getName())","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Phone: \")","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" .append(getPhone())","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" .append(\" Email: \")","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" .append(getEmail())","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" .append(\" Address: \")","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" .append(getAddress())","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" .append(\" Avatar: \")","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" .append(getAvatar())","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" .append(\" Tags: \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this(remark);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Remark\u003e\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":66,"jeffreygohkw":29}},{"path":"src/main/java/seedu/address/model/person/ShowAllPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured after taking into account privacy level.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class ShowAllPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public ShowAllPrivacyLevelPredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return !person.hasPrivateField();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ShowAllPrivacyLevelPredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cPerson\u003e internalCopy \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public boolean contains(ReadOnlyPerson toCheck) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Adds a person to the list.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" internalList.add(new Person(toAdd));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" internalList.set(index, new Person(editedPerson));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" setPersons(replacement);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the {@code ReadOnlyPerson} specified","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractIndexes(ArrayList\u003cReadOnlyPerson\u003e persons) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : persons) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" int position \u003d internalList.indexOf(p);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromZeroBased(position));","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return indexes;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the internalList before sorting","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index[] mappings \u003d new Index[internalCopy.size()];","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" int count \u003d 0;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" for (Person p : internalCopy) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(p);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" mappings[count] \u003d Index.fromZeroBased(index);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" count++;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" return mappings;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalList.size());","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" internalCopy.clear();","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" for (Person p : internalList) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" internalCopy.add(p);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalCopy.size());","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":89,"Esilocke":35,"wangyiming1019":31,"-":119}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Assignees {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e assignedList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public Assignees(ArrayList\u003cIndex\u003e assignees) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public Assignees() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public Assignees(Assignees toCopy) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(toCopy.getList());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean assign(ArrayList\u003cIndex\u003e personsToAssign) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d false;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" for (Index i : personsToAssign) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!assignedList.contains(i)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assignedList.add(i);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" atLeastOneAdded \u003d true;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return atLeastOneAdded;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /** Updates the internal assignedList with the correct Index values after a sort operation */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void updateList(Index[] mappings) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e updatedList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" for (Index i : assignedList) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Index updatedPosition \u003d mappings[i.getZeroBased()];","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" updatedList.add(updatedPosition);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedList.clear();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(updatedList);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list, and returns true if at least 1 person was removed */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public boolean dismiss(ArrayList\u003cIndex\u003e personsToDismiss) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return assignedList.removeAll(personsToDismiss);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e getList() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this.assignedList;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Deletes the specified index from the internal list, and decrements all other indexes in the assigned list","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * that have a value lower than the deleted index by 1.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void decrementIndex(Index deletedIndex) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(deletedIndex);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c assignedList.size(); i++) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index current \u003d assignedList.get(i);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (current.getZeroBased() \u003e deletedIndex.getZeroBased()) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" int indexValue \u003d current.getZeroBased() - 1;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index decrementedIndex \u003d Index.fromZeroBased(indexValue);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assignedList.set(i, decrementedIndex);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return assignedList.hashCode();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":90}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.DateGroup;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.Parser;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class Deadline {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_DATE \u003d","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" \"The specified date is invalid.\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public final Date date;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null || deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.date \u003d null;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" this.date \u003d setDateFromArgs(deadline);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d date.toString();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" setDateFromArgs(test);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Returns a Date object that represents the given date string.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static Date setDateFromArgs(String date) throws IllegalValueException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Parser deadlineParser \u003d new Parser();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cDateGroup\u003e groups \u003d deadlineParser.parse(date);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cDate\u003e dates \u003d null;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" for (DateGroup group : groups) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" dates \u003d group.getDates();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (dates \u003d\u003d null) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return dates.get(0);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":86}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Priority {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String[] PRIORITY_TEXT_STRINGS \u003d {\"\", \"Lowest\", \"Low\", \"Medium\", \"High\", \"Highest\"};","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 0;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final int value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given priority.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null || priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d 0;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d Integer.parseInt(trimmedPriority);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return PRIORITY_TEXT_STRINGS[value];","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value \u003d\u003d ((Priority) other).value); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":75}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" TaskAddress getTaskAddress();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskAddress\u003e taskAddressProperty();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e changeStateProperty();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" void changeState();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .append(\" Address: \")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .append(getTaskAddress())","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .append(\" \")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState()","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskAddress().equals(this.getTaskAddress());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskAddress\u003e taskAddress;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete, TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * by default.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState(), task.getTaskAddress());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return taskName.get();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return description.get();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return deadline.get();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return priority.get();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return assignees.get();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return state.get();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public TaskAddress getTaskAddress() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return taskAddress.get();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" return description;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return deadline;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return priority;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return assignees;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskAddress\u003e taskAddressProperty() {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" return taskAddress;","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e changeStateProperty() {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d getCompleteState();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (state) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as incomplete\");","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as complete\");","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" public void changeState() {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" this.setState(!this.getCompleteState());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" this.taskAddress.set(taskAddress);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String printableState;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" return printableState;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":200}},{"path":"src/main/java/seedu/address/model/task/TaskAddress.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Task\u0027s address in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidTaskAddress(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class TaskAddress {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" \"Task addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /*","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public final String taskAddress;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public TaskAddress(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d ADDRESS_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidTaskAddress(address)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_TASK_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d address;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid task address.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidTaskAddress(String test) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof TaskAddress // instanceof handles nulls","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.taskAddress.equals(((TaskAddress) other).taskAddress)); // state check","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress.hashCode();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByState;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByPriority;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private boolean isComplete;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private int basePriority;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords, boolean isStateCheckRequired,","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityCheckRequired, boolean isComplete, int basePriority) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d isPriorityCheckRequired;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d isStateCheckRequired;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d isComplete;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d basePriority;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d false;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d false;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d false;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d 0;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" for (String keyword : keywords) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (needFilterByState \u0026\u0026 task.getCompleteState() !\u003d isComplete) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } else if (needFilterByPriority \u0026\u0026 task.getPriority().value \u003c basePriority) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } else if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByPriority \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByPriority","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByState \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByState","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isComplete \u003d\u003d ((TaskContainsKeywordPredicate) other).isComplete","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.basePriority \u003d\u003d ((TaskContainsKeywordPredicate) other).basePriority); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class TaskName {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public final String taskName;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" * Removes all assignees from all tasks.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" t.clearAssignees();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified assignee from all tasks **/","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void removeAssignee(Index personIndex) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" updated.decrementIndex(personIndex);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" internalList.clear();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" * Updates the assignee list within each task to match that of the newPersonIndexes.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * This method is called after a sort persons operation due to the order change","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public void updateAssignees(Index[] newPersonIndexes) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" updated.updateList(newPersonIndexes);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" internalList.clear();","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * Sorts person list by all persons by any field in ascending or descending order","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e priorityComparator \u003d Comparator.comparingInt(o -\u003e o.getPriority().value);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e deadlineComparator \u003d (o1, o2) -\u003e {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" if (o1.getDeadline().date \u003d\u003d null || o2.getDeadline().date \u003d\u003d null) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return 0;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" case \"priority\":","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d priorityComparator;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" case \"deadline\":","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d deadlineComparator;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":60,"Esilocke":179}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task.","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" return new Person[] {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return sampleAb;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" for (String s : strings) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * @param addressBook cannot be null.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem writing to the file.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" void changeFilePath(String fp, UserPrefs u);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":2,"-":43}},{"path":"src/main/java/seedu/address/storage/Storage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * API of the Storage component","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public interface Storage extends AddressBookStorage, UserPrefsStorage {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" void saveUserPrefs(UserPrefs userPrefs) throws IOException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location. Subscribes to BackupRequestEvent","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" void handleBackupAddressBook(BackupRequestEvent event) throws IOException;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Saves the current version of the Address Book to the hard disk.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Creates the data file if it is missing.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Raises {@link DataSavingExceptionEvent} if there was an error during saving.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" void handleAddressBookChangedEvent(AddressBookChangedEvent abce);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"-":38}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" public void handleBackupAddressBook(BackupRequestEvent event) throws IOException {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyAddressBook addressBook \u003d event.getModel().getAddressBook();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" String args \u003d event.getArgs();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, args);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":11,"jeffreygohkw":8,"-":91}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedIndex.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlValue;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * JAXB-friendly adapted version of the Index.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedIndex {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" @XmlValue","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private int index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedIndex.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex() {}","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Converts a given Index into this class for JAXB use.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex(Index source) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d source.getZeroBased();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted tag object into an Index object.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints\\","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public Index toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return Index.fromZeroBased(index);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private String name;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private String phone;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private String email;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String address;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" private String remark;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private String avatar;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().value;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d source.getAvatar().value;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().getIsPrivate();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().getIsPrivate();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().getIsPrivate();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().getIsPrivate();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().getIsPrivate();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tags);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":71,"wangyiming1019":3,"-":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private String name;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private String description;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private String deadline;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private String priority;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String state;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedIndex\u003e assignees \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private String address;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.toString(source.getPriority().value);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" address \u003d source.getTaskAddress().taskAddress;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assignees \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (Index i : source.getAssignees().getList()) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assignees.add(new XmlAdaptedIndex(i));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" final TaskAddress address \u003d new TaskAddress(this.address);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cIndex\u003e assigneeIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" for (XmlAdaptedIndex index : assignees) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assigneeIndexes.add(index.toModelType());","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" final Assignees assignees \u003d new Assignees(assigneeIndexes);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, assignees, state, address);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a custom save file name","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.info(filePath);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":12,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":19,"-":73}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_PREFIX \u003d \"https://www.google.com.sg/maps/dir/?api\u003d1\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_SUFFIX \u003d \"/\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private WebView browser;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public BrowserPanel() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" loadDefaultPage();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().value.replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s address if their address is not private","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Loads Google Maps with directions on how to go from one location to another","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * @param fromLocation The location we want to start from","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * @param toLocation The location we want to reach","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDirectionsPage(String fromLocation, String toLocation) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" public void loadPage(String url) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" * Loads a default HTML file with a background that matches the general theme.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void loadDefaultPage() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" loadPage(defaultPage.toExternalForm());","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Frees resources allocated to the browser.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" public void freeResources() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" browser \u003d null;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" loadDirectionsPage(event.getFromLocation().toString(), event.getToLocation().toString());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":68,"Esilocke":1,"-":65}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Stage primaryStage;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private ViewTaskPanel viewTaskPanel;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private ViewPersonPanel viewPersonPanel;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" // Set dependencies","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" // Configure the UI","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" setIcon(ICON);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" setWindowMinSize();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" setWindowDefaultTheme(prefs);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" setAccelerators();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" return primaryStage;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" * the TextInputControl(s).","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" event.consume();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window.","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" void fillInnerParts() {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" browserPanel \u003d new BrowserPanel();","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" viewTaskPanel \u003d new ViewTaskPanel();","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" viewPersonPanel \u003d new ViewPersonPanel();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" void hide() {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" primaryStage.hide();","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Sets the given image as the icon of the main window.","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" private void setIcon(String iconSource) {","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences.","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default theme based on user preferences.","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultTheme(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(prefs.getTheme());","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" private void setWindowMinSize() {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" primaryStage.setMinWidth(MIN_WIDTH);","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" return getRoot().getStylesheets().get(1);","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window.","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command for menu item","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command for menu item","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling decrease in font size\");","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling reset in font size\");","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" * Opens the help window.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" public void handleHelp() {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" helpWindow.show();","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" void show() {","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" primaryStage.show();","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpenRequestEvent(OpenRequestEvent event) throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" handleOpen();","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAsRequestEvent(SaveAsRequestEvent event) throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" handleSaveAs();","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the existing theme to the input theme","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" public void handleChangeTheme(String theme) {","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(theme);","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" private void handleExit() {","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" return this.personListPanel;","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":" void releaseResources() {","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" browserPanel.freeResources();","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" handleHelp();","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewTaskPanel.getRoot());","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewPersonPanel.getRoot());","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" private void handleChangeThemeEvent(ChangeThemeRequestEvent event) {","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" handleChangeTheme(event.getStyleSheet());","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":172,"Esilocke":35,"-":212}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.ImageView;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" initFavourite(person);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" person.favouriteProperty().addListener((observable, oldValue, newValue) -\u003e initFavourite(person));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * display the heart for favourite person","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private void initFavourite(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" boolean favouriteStatus \u003d person.getFavourite();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Label favouriteLabel \u003d new Label();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" Image starFilled \u003d new Image(getClass().getResource(\"/images/heart.png\").toExternalForm());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" if (favouriteStatus) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setGraphic(new ImageView(starFilled));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setStyle(\"-fx-background-color: transparent; -fx-border-color: transparent\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" cardPane.getChildren().add(favouriteLabel);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @param tag","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" * @return","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" * @param person","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" });","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" return name;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" return phone;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" return address;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" return email;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" //author","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":67,"Esilocke":2,"wangyiming1019":52,"-":84}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Panel containing the list of persons.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // Set new font size","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New person font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for person cards","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * @param event","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" private void handlePersonCardChangeFontSizeEvent (ChangeFontSizeEvent event) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" case 0:","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" case 1:","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" case 2:","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" * Listens for change of font size events","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" * @param event","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" setText(null);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":92,"jeffreygohkw":7,"Esilocke":14,"-":86}},{"path":"src/main/java/seedu/address/ui/StatusBarFooter.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.time.Clock;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.controlsfx.control.StatusBar;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A ui for the status bar that is displayed at the footer of the application.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class StatusBarFooter extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_INITIAL \u003d \"Not updated yet in this session\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_UPDATED \u003d \"Last Updated: %s\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Used to generate time stamps.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * TODO: change clock to an instance variable.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * We leave it as a static variable because manual dependency injection","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * will require passing down the clock reference all the way from MainApp,","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * but it should be easier once we have factories/DI frameworks.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static Clock clock \u003d Clock.systemDefaultZone();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StatusBarFooter.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"StatusBarFooter.fxml\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private StatusBar syncStatus;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private StatusBar totalPersons;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private StatusBar saveLocationStatus;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public StatusBarFooter(String saveLocation, int initialTotalPersons) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" setSyncStatus(SYNC_STATUS_INITIAL);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" setSaveLocation(\"./\" + saveLocation);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" setTotalPersons(initialTotalPersons);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the clock used to determine the current time.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static void setClock(Clock clock) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" StatusBarFooter.clock \u003d clock;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Returns the clock currently in use.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static Clock getClock() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return clock;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void setSaveLocation(String location) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.saveLocationStatus.setText(location));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" private void setSyncStatus(String status) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.syncStatus.setText(status));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent abce) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" long now \u003d clock.millis();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" String lastUpdated \u003d new Date(now).toString();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(abce, \"Setting last updated status to \" + lastUpdated));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" setSyncStatus(String.format(SYNC_STATUS_UPDATED, lastUpdated));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" this.setTotalPersons(abce.data.getPersonList().size());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" private void setTotalPersons(int totalPersons) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.totalPersons.setText(totalPersons + \" person(s) listed\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":9,"-":79}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private Label taskAddress;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" taskAddress.textProperty().bind(Bindings.convert(task.taskAddressProperty()));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" taskAddress.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" assignCount.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" state.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof TaskCard)) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" TaskCard card \u003d (TaskCard) other;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 task.equals(card.task);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return taskName;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return description;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return deadline;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" return priority;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public Label getTaskAddress() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":47,"jeffreygohkw":4,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map(","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set new font size","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New task font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for task cards","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" * @param event","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" private void handleTaskCardChangeFontSizeEvent (ChangeFontSizeEvent event) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" case 0:","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" case 1:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" case 2:","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestTaskEvent(JumpToListRequestTaskEvent event) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in task list view\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" setText(null);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":1,"Esilocke":114}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private static UserPrefs prefs;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" //Set the application icon.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" prefs.setTheme(mainWindow.getTheme());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" mainWindow.hide();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" String contentText) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" alert.getDialogPane().getStylesheets().add(String.format(\"view/\", prefs.getTheme()));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setTitle(title);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" alert.showAndWait();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" System.exit(1);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" event.exception);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"-":118}},{"path":"src/main/java/seedu/address/ui/ViewPersonPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.Random;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.ImageView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.VBox;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Contains the details of a person.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewPersonPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewPersonPanel.fxml\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" * Preset values for random selection later.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private enum Colours {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private static Random randomNumber \u003d new Random();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private VBox personPanel;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private Label name;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" private Label address;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private ImageView avatarImage;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Label email;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel(ReadOnlyPerson person, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" initializeAvatar();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private void initializeWithPerson(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" //author charlesgoh","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" * Sets avatar to a URL or filepath and falls back to the placeholder avatar if specified path fits in","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * neither categories","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" private void initializeAvatar() {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String avatarPath \u003d person.getAvatar().value;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to set avatar to image at specified URL or filepath\");","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" Image newImage \u003d new Image(avatarPath);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(newImage);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException ex) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" logger.warning(\"Saved path is not a valid filepath or URL path. Setting avatar to placeholder\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" Image imagePlaceholder \u003d new Image(\"file:docs/images/Avatar.png\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(imagePlaceholder);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof ViewPersonPanel)) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" ViewPersonPanel card \u003d (ViewPersonPanel) other;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" return person.equals(card.person);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" public Label getName() {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return name;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public Label getPhone() {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return phone;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" public Label getAddress() {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" return address;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public Label getRemark() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" return remark;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public Label getEmail() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" return email;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.person \u003d event.getNewSelection().person;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":28,"Esilocke":155}},{"path":"src/main/java/seedu/address/ui/ViewTaskPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Contains details of a Task.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class ViewTaskPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewTaskPanel.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Label description;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Label priority;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Label state;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyTask task;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (task !\u003d null) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(task);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private void initializeWithTask(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(event.getNewSelection().task);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":67}},{"path":"src/test/data/ManualTesting/[W09-B2][Address++]TestScript.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++ - Test Script","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":":experimental:","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Getting Started","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"Ensure that you have the [W09-B2][Address++].jar file and the [W09-B2][Address++]SampleData.xml available on your computer and a working internet connection.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Importing the test data","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":". Launch [W09-B2][Address++].jar.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":". On initial launch, it should contain sample data of 6 different persons and 0 tasks.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":". Type `open` to open a pop up window.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":". Navigate to the location of the [W09-B2][Address++]SampleData.xml file and click Open to open it.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":". The sample data containing 20 different persons and 7 different tasks should be loaded.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":". You are now ready to begin testing.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d User Interface","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"* The Menu on the top of the screen contains 3 buttons: `File`, `Help` and `Font Size`.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"* Below the menu is the command line, you can type your commands in here.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"* The box below the command line will show feedback when you type in commands, such as if the command is successful or if you have typed an erroneous command.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"* The leftmost panel contains the list of persons in the address book.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* The middle panel contains the list of tasks in the address book.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"* The rightmost panel contains either the details of the selected task or person, or the in-application browser.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"* The bottom bar contains miscellaneous information about the address book, such as the file where the save data will be stored and the number of persons in the address book.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"Unless explicitly stated, each test section for each command is assumed to be carried out continuously. +","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"This means that you *should carry out the tests in the given order*. +","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"Each test section is carried out independently. This means that you are recommended to `undo` to restore the address book after each test section.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d HelpCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"*Opening the help window*","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"help","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"The User Guide appears in a separate window.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"Opened help window.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddPersonCommand","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"*Adding a person with all details*","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"add n/Svea Lisenhower p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"A person named Svea Lisenhower, with the details as stated above is added to the address book at index 21. +","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"New person added: +","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"Svea Lisenhower Phone: 98009621 Email: svea_li@example.com Address: Jurong West Street 65 Blk 667A Remark: Russian Exchange Student Avatar: https://example.com/image.png Tags:","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing compulsory details*","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"add p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"add: Adds a person to the address book. Parameters: n/NAME [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]... +","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"Example: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 r/Sells sea shells on the sea shore v/avatar-filepath.pngt/friends t/owesMoney","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing optional details*","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"add n/Kent Seethis","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"A person named Kent Seethis, but with no other details is added to the address book at index 22. +","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"New person added: +","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"Kent Seethis Phone: Email: Address: Remark: Avatar: Tags:","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid phones*","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl p/@","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid emails*","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl e/here","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid tags*","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl t/@","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified tag is invalid.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTaskCommand","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"*Adding a task with all details*","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":"add task/ n/Buy pencils d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"A task named \"Buy pencils\", with a description of \"Buy 4 pencils from Popular\", with a deadline of \"Sat Nov 18 19:00:00 SGT 2017\",","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"a priority of \"Low\", and an address of \"West Point\" is added to the addresss book at index 8 in the task list. +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"New task added: +","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"Buy pencils Description: Buy 4 pencils from Popular Deadline: Sat Nov 18 19:00:00 SGT 2017 Priority: Low Address: West Point \u003cIncomplete\u003e +","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing compulsory details*","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"add task/ d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing.","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"add task/: Adds a task to the address book. Parameters: n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS] +","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Example: add task/ n/Buy pencil d/Buy a new pencil from ABS by/10-10-2017 p/4 a/12 Kent Ridge Crescent, 119275","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing optional details*","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"A task with the name \"Create better task\", and no other details present is added to the address book at index 9 in the task list. +","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"New task added:","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"Create better task Description: Deadline: Priority: Address: \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid deadlines*","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task by/AAAAAAAAAAAAA","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified deadline is invalid.","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid priority*","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task p/99999999","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified priority is invalid.","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTagCommand","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":"*Adding tags to persons in Address++*","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 2 t/friends","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":"The first two person in the person list will have the tag `friends` but it will not show in the person panel.","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"add tag/ t/friends","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will have the tag `friends`.","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons if all of them having the input tags*","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 3 t/friends","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since all of them have the tag `friends` already.","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"This tag already exists in all target persons in the current list.","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with invalid index*","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"add tag/ 23 t/friends","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list.","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid.","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with no input tags*","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 t/","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags.","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ListCommand","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":"*List all entries*","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"list","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"All tasks and persons in the address book are listed.","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Listed all entries","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditPersonCommand","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"*Editing a person for all entries*","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Laura Edelweiss p/1111111 a/House of Edelweiss e/laura@example.com r/Heiress to the House of Edelweiss t/Heiress v/https://example.com/validimage2.png","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"The person at index 7 (Elizabeth Edelweiss) is updated and now has new details matching the command.","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":"Edited Person: +","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"Laura Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":"*Editing a person with only 1 entry*","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Elizabath Edelweiss","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":"Only the name of the person at index 7 (Now named Laura Edelweiss) is changed to Elizabeth Edelweiss. All other details remain the same.","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":"Edited Person: +","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":"Elizabath Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":"edit 7 n/","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid.","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"Person names should only contain alphanumeric characters and spaces, and it should not be blank","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"edit 7 p/ppp","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid.","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"edit 7 e/ppp","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid.","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":"edit 7 t/@@@@@@","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid.","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"*Editing a private person*","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"edit 11 n/Unhide me","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person\u0027s name is private.","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"At least one field to be edited must be public.","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid person*","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"edit 19999 n/Unhide me","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid.","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTaskCommand","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"*Editing a task for all entries*","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Paper Castle d/Castle Garde by/9 December 2017 8pm p/1 a/NUS","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The task at index 7 is updated and now has new details matching the command.","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"Edited Task: +","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"Paper Castle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"*Editing a task with only 1 entry*","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Sandcastle","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"Only the name of the task at index 7 (Now named Paper Castle) is changed to Sandcastle. All other details remain the same.","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"Edited Task: +","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"Sandcastle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid.","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"Task names can be in any format, and should not be blank","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 by/AAAAAAAA","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid.","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid.","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 e/ppp","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid.","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid task*","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"edit task/ 19999 n/Tiny, tiny house","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid.","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTagCommand","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag in the address book*","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends goodFriends","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"All instances of \"friends\" tags are replaced with \"goodFriends\" tags (at indexes 1, 3, 10, 11, 12, 17). +","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Replaced tag friends with goodFriends","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"*Renaming a non-existant tag in the address book*","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends nemesis","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"As \"friends\" were renamed to \"goodFriends\", there are no more \"friends\" tags. +","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the tag \"friends\" is not in any of the contacts.","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"No such tag was found in the address book.","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with the exact same name*","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends goodFriends","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the two tag names are exactly the same. +","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"The new name of the tag cannot be the same as the old name.","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ChangePrivacyCommand","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of public fields*","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/true p/true e/true a/true r/true","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as private, and the original data is hidden in the UI.","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: \u003cPrivate Name\u003e Phone: \u003cPrivate Phone\u003e Email: \u003cPrivate Email\u003e Address: \u003cPrivate Address\u003e Remark: \u003cPrivate Remark\u003e Avatar: Tags: [project]","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 n/false","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s name, being originally public, remains public.","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of private fields*","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/false p/false e/false a/false r/false","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as public, revealing all the original data in the UI.","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 a/true","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s address, being originally private, remains private.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of empty fields*","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/true","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to private.","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: \u003cPrivate Remark\u003e Avatar: Tags: [GEQ2000]","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/false","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to public, but since it is empty, it does not display any data.","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d PrivacyLevelCommand","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy level*","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"Esilocke"},"content":"privacylevel 1","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"Esilocke"},"content":"All persons are listed with any private data revealed.","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 1.","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"Esilocke"},"content":"privacylevel 3","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"Esilocke"},"content":"Lists all persons except those that have at least one private field.","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 3.","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"Esilocke"},"content":"privacylevel 2","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"Esilocke"},"content":"List all persons. Fields that are private will have their data hidden.","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 2.","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteCommand","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"Esilocke"},"content":"*Setting a person in the Address++ to be the favourite person*","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"Esilocke"},"content":"list +","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"Esilocke"},"content":"favourite 2","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"Esilocke"},"content":"The 2nd person in the Address++ will be favoured and a heart picture will be shown next to his name.","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"Favourited Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person if he has been favoured*","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"list +","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"favourite 1","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"Esilocke"},"content":"An error message will display since the first person in the Address++ has been favoured.","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"Esilocke"},"content":"Person is already favourited.","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person with invalid index*","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"Esilocke"},"content":"favourite 56","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"An error message will display since there is no 56th person in the current list.","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteListCommand","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":"*Listing all favoured persons in the Address++*","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"Esilocke"},"content":"showfavourite","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"List all the favoured persons.","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons.","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"Esilocke"},"content":"*Listing empty list with no favoured person in the Address++*","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"showfavourite","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"Esilocke"},"content":"An empty list but with successful message.","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons.","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindPersonCommand","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":"find plumley","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\", case insensitive, in their name are displayed. +","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"Esilocke"},"content":"2 persons listed!","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"Esilocke"},"content":"find plumley edelweiss","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\" or \"edelweiss\", case insensitive, in their name are displayed. +","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":"4 persons listed!","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindTaskCommand","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":"find task/ on","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\", case insensitive, in their name or description are displayed. +","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"find task/ on stew","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description are displayed. +","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"3 tasks listed!","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with priority search*","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"find task/ on stew p/4","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and have a priority of \"High\" or above are displayed. +","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state search*","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and are currently complete are displayed. +","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state and priority search*","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true p/3","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, with a priority of at least \"medium\", and are currently complete are displayed. +","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d TagListCommand","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"*Listing all the tag in the Address++*","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"showtag","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"Tags contain capital letter will displayed in front. All the tags (with or without capital letter) will be displayed in alphabetical order.","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":"All the tags are here: \u003cGEQ2000\u003e \u003cacquaintance\u003e \u003cclassmates\u003e \u003cenemy\u003e \u003cfamily\u003e \u003cfriends\u003e \u003cneighbours\u003e \u003cproject\u003e \u003csecretive\u003e \u003ctutee\u003e","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":"*Listing empty tag list with no tags in Address++*","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"showtag","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"There is no tag list.","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"There is no tag!","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d FindTagCommand","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with specific tags*","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"find tag/ friends","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"List all the persons who have tag `friends`.","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"6 persons listed!","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"*Finding person in the Address++ without specific tags*","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"find tag/ /friends","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":"List all the persons without tag `friends`.","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"14 persons listed!","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with \"TAGA\" but without \"TAGB\"*","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"find tag/ friends /classmates","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"Persons have tag `friends` but do not have tag `classmates` will be listed.","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"5 persons listed!","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"*Failing to find persons in the Address++ with valid tags*","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"find tag/ fff","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"Although it is a valid tag, there is no person with tag `fff`. Hence, no person will be listed.","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":"0 persons listed!","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeletePersonCommand","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"delete 20","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":"The contact at index 20, Myuria Plumley is deleted from the address book. +","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"Deleted Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"delete 2000","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTaskCommand","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"delete task/ 7","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is deleted from the address book. +","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"Deleted Task: Paper Model for project Description: Paper model of Himeji castle for project. Myucel/Myuria twins in charge Deadline: Wed Dec 13 17:00:00 SGT 2017 Priority: Medium Address: \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"delete task/ 7000","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTagCommand","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"*Deleting tags from persons in the Address++*","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/friends","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"The tag `friends` for the first person will be deleted. The rest tags remain no change.","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"delete tag/ t/friends","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will not have the tag `friends`.","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons if none of them have the input tags*","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/neighbour","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"An error message will display since target persons do not have tag `neighbour`.","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"The target persons do not have input tags.","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with invalid index*","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":"delete tag/ 23 t/friends","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list.","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with no input tags*","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 t/","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags.","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectPersonCommand","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"*Selecting a person*","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"select 19","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"Esilocke"},"content":"The person at index 19, \"Myucel Plumley\" is selected, and her details are listed in the UI panel. +","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"Esilocke"},"content":"Selected Person: 19","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"Esilocke"},"content":"*Selecting a person with an invalid index*","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"Esilocke"},"content":"select 19999","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectTaskCommand","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"Esilocke"},"content":"*Selecting a task*","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"select task/ 7","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is selected and its details are shown in the UI panel. +","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Selected Task: 7","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"*Selecting a task with an invalid index*","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"select task/ 7000","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d LocateCommand","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":"*Locating a person\u0027s address on Google Maps*","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":"locate 1","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and searches for the first person\u0027s address. +","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"Searching for Person at Index: 1","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":"*Failing to locate a person with no address*","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":"locate 2","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":"An error message is printed, as the person at index 2 has no address. +","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":"Person 2 has no Address","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"*Failing to locate a person with a private address*","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"locate 6","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"Esilocke"},"content":"Person 6 has a Private Address","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d NavigateCommand","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Person*","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"navigate fp/1 tp/3","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first person\u0027s address to the third person\u0027s address. +","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 30 Geylang Street 29, #06-40 to Blk 30 Lorong 3 Serangoon Gardens, #07-18","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Task*","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 tt/1","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to the first task\u0027s address. +","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to Blk 45 Aljunied Street 85, #11-31","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Address*","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 ta/NUS","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to NUS. +","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to NUS","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Person*","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tp/3","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the third person\u0027s address. +","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to Blk 30 Lorong 3 Serangoon Gardens, #07-18","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Task*","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tt/4","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the fourth task\u0027s address. +","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to SR-1, COM-1 NUS","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Address*","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 ta/NUS","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to NUS. +","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to NUS","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Person*","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":"navigate fa/NUS tp/3","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NUS to the third person\u0027s address. +","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":"Navigating from NUS to Blk 30 Lorong 3 Serangoon Gardens, #07-18","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Task*","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":"navigate fa/NTU tt/4","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NTU to the fourth task\u0027s address. +","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"Esilocke"},"content":"Navigating from NTU to SR-1, COM-1 NUS","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Address*","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"Esilocke"},"content":"navigate fa/SMU ta/NUS","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from SMU to NUS. +","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":"Navigating from SMU to NUS","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has a private address*","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"Esilocke"},"content":"navigate fp/6 ta/Changi Airport","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"Esilocke"},"content":"Address of the Person at index 6 is private.","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has no address*","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"Esilocke"},"content":"navigate fp/8 ta/Changi Airport","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 8 has no address. +","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"Person at index 8 does not have an address.","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a task has no address*","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"navigate ft/2 ta/Changi Airport","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the task at index 2 has no address. +","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"Task at index 2 does not have an address.","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"navigate","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"Esilocke"},"content":"navigate: Get directions from one address to another. +","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"Esilocke"},"content":"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three) AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three) +","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"Esilocke"},"content":"Example: navigate fp/2 ta/University Town","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"*Error when no address after a fa/ or ta/ prefix is entered*","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"navigate fa/ tp/1","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"Esilocke"},"content":"Location can take any value, and it should not be blank","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"*Error when no integer after a fp/, tp/, ft/ or tt/ prefix is entered*","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"Esilocke"},"content":"navigate ft/ tp/1","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"Index is not a non-zero unsigned integer.","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetCompleteCommand","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as complete*","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":"setcomplete 3","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"Esilocke"},"content":"The task at index 3, \"Visit David\u0027s house\" is marked as completed. +","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"Marked Task as completed: Visit David\u0027s house Description: Visit to David Li\u0027s house next Saturday Deadline: Sat Nov 18 12:00:00 SGT 2017 Priority: Low Address: Blk 436 Serangoon Gardens Street 26, #16-43 \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"Esilocke"},"content":"*Marking an already complete task as complete*","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"Esilocke"},"content":"setcomplete 3","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already complete +","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"The specified task is already completed","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"Esilocke"},"content":"setcomplete 7000","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetInompleteCommand","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as incomplete*","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"Esilocke"},"content":"setincomplete 1","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"The task at index 1, \"Tuition\" is marked as incomplete. +","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"Esilocke"},"content":"Marked Task as incomplete: Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"Esilocke"},"content":"*Marking an already incomplete task as incomplete*","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"setincomplete 1","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already incomplete +","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"Esilocke"},"content":"The specified task is already incomplete","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"Esilocke"},"content":"setincomplete 7000","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1469,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1470,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AssignCommand","isFullCredit":true},{"lineNumber":1471,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1472,"author":{"gitId":"Esilocke"},"content":"*Assigning 1 contact to a task*","isFullCredit":true},{"lineNumber":1473,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1474,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1475,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1476,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1","isFullCredit":true},{"lineNumber":1477,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1478,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1479,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Myucel Plumley is assigned to the first task, Tuition. The task now has 4 people assigned to it instead of 3. +","isFullCredit":true},{"lineNumber":1480,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1481,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1482,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1483,"author":{"gitId":"Esilocke"},"content":"Assigned 1 people to +","isFullCredit":true},{"lineNumber":1484,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1485,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1486,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1487,"author":{"gitId":"Esilocke"},"content":"*Assigning multiple contacts to a task*","isFullCredit":true},{"lineNumber":1488,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1489,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1490,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1491,"author":{"gitId":"Esilocke"},"content":"assign 18 20 to/1","isFullCredit":true},{"lineNumber":1492,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1493,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1494,"author":{"gitId":"Esilocke"},"content":"The contacts at index 18 and 20, Myuria Plumley and Clarissa Liselotte are assigned to the first task, Tuition. The task now has 6 people assigned to it instead of 4. +","isFullCredit":true},{"lineNumber":1495,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1496,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1497,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1498,"author":{"gitId":"Esilocke"},"content":"Assigned 2 people to +","isFullCredit":true},{"lineNumber":1499,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1500,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1501,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1502,"author":{"gitId":"Esilocke"},"content":"*Assigning contacts who are already assigned to a task*","isFullCredit":true},{"lineNumber":1503,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1504,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1505,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1506,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1","isFullCredit":true},{"lineNumber":1507,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1508,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1509,"author":{"gitId":"Esilocke"},"content":"Myucel Plumley was already assigned to the task Tuition. An error message is printed out as she is already assigned to the task. +","isFullCredit":true},{"lineNumber":1510,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1511,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1512,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1513,"author":{"gitId":"Esilocke"},"content":"All the specified persons are already assigned to this task","isFullCredit":true},{"lineNumber":1514,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1515,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1516,"author":{"gitId":"Esilocke"},"content":"*Assigning no contacts to a task*","isFullCredit":true},{"lineNumber":1517,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1518,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1519,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1520,"author":{"gitId":"Esilocke"},"content":"assign to/1","isFullCredit":true},{"lineNumber":1521,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1522,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1523,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified.","isFullCredit":true},{"lineNumber":1524,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1525,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1526,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1527,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified","isFullCredit":true},{"lineNumber":1528,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1529,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1530,"author":{"gitId":"Esilocke"},"content":"*Assigning to a task with an invalid index*","isFullCredit":true},{"lineNumber":1531,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1532,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1533,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1534,"author":{"gitId":"Esilocke"},"content":"assign 5 to/7000","isFullCredit":true},{"lineNumber":1535,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1536,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1537,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1538,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1539,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1540,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1541,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1542,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1543,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DismissCommand","isFullCredit":true},{"lineNumber":1545,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1546,"author":{"gitId":"Esilocke"},"content":"*Dismissing 1 contact from a task*","isFullCredit":true},{"lineNumber":1547,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1548,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1549,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1550,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1","isFullCredit":true},{"lineNumber":1551,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1552,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1553,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Alex Yeoh is assigned to the first task, Tuition. The task now has 2 people assigned to it instead of 3. +","isFullCredit":true},{"lineNumber":1554,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1555,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1556,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1557,"author":{"gitId":"Esilocke"},"content":"Dismissed 1 people from task +","isFullCredit":true},{"lineNumber":1558,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1559,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1560,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1561,"author":{"gitId":"Esilocke"},"content":"*Dismissing multiple contacts from a task*","isFullCredit":true},{"lineNumber":1562,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1563,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1564,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1565,"author":{"gitId":"Esilocke"},"content":"dismiss 6 8 from/1","isFullCredit":true},{"lineNumber":1566,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1567,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1568,"author":{"gitId":"Esilocke"},"content":"The contacts at index 6 and 8, David Ng and Ima Hidearu are assigned to the first task, Tuition. The task now has 0 people assigned to it instead of 2. +","isFullCredit":true},{"lineNumber":1569,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1570,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1571,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1572,"author":{"gitId":"Esilocke"},"content":"Dismissed 2 people from task +","isFullCredit":true},{"lineNumber":1573,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1574,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1575,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1576,"author":{"gitId":"Esilocke"},"content":"*Dismissing contacts who are already assigned from a task*","isFullCredit":true},{"lineNumber":1577,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1578,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1579,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1580,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1","isFullCredit":true},{"lineNumber":1581,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1582,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1583,"author":{"gitId":"Esilocke"},"content":"There are no contacts assigned to the task Tuition.","isFullCredit":true},{"lineNumber":1584,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as none of the specified contacts were assigned to the task.","isFullCredit":true},{"lineNumber":1585,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1586,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1587,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1588,"author":{"gitId":"Esilocke"},"content":"None of the specified persons are assigned to this task","isFullCredit":true},{"lineNumber":1589,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1590,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1591,"author":{"gitId":"Esilocke"},"content":"*Dismissing no contacts from a task*","isFullCredit":true},{"lineNumber":1592,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1593,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1594,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1595,"author":{"gitId":"Esilocke"},"content":"dismiss from/1","isFullCredit":true},{"lineNumber":1596,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1597,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1598,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified.","isFullCredit":true},{"lineNumber":1599,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1600,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1601,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1602,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified","isFullCredit":true},{"lineNumber":1603,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1604,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1605,"author":{"gitId":"Esilocke"},"content":"*Dismissing from a task with an invalid index*","isFullCredit":true},{"lineNumber":1606,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1607,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1608,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1609,"author":{"gitId":"Esilocke"},"content":"dismiss 5 from/7000","isFullCredit":true},{"lineNumber":1610,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1611,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1612,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1613,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1614,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1615,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1616,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1617,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1618,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1619,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ViewAssignCommand","isFullCredit":true},{"lineNumber":1620,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1621,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with no persons assigned to it*","isFullCredit":true},{"lineNumber":1622,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1623,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1624,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1625,"author":{"gitId":"Esilocke"},"content":"viewassign 2","isFullCredit":true},{"lineNumber":1626,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1627,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1628,"author":{"gitId":"Esilocke"},"content":"No contacts are listed +","isFullCredit":true},{"lineNumber":1629,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1630,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1631,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1632,"author":{"gitId":"-"},"content":"0 persons listed!","isFullCredit":true},{"lineNumber":1633,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1634,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1635,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with some persons assigned to it*","isFullCredit":true},{"lineNumber":1636,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1637,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1638,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1639,"author":{"gitId":"Esilocke"},"content":"viewassign 1","isFullCredit":true},{"lineNumber":1640,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1641,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1642,"author":{"gitId":"Esilocke"},"content":"3 contacts are listed, Alex Yeoh, David Ng, Ima Hidearu +","isFullCredit":true},{"lineNumber":1643,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1644,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1645,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1646,"author":{"gitId":"Esilocke"},"content":"3 persons listed!","isFullCredit":true},{"lineNumber":1647,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1648,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1649,"author":{"gitId":"Esilocke"},"content":"*Viewing from a task with an invalid index*","isFullCredit":true},{"lineNumber":1650,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1651,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1652,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1653,"author":{"gitId":"Esilocke"},"content":"viewassign 99999","isFullCredit":true},{"lineNumber":1654,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1655,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1656,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1657,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1658,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1659,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1660,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1661,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1662,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1663,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ThemeCommand","isFullCredit":true},{"lineNumber":1664,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1665,"author":{"gitId":"Esilocke"},"content":"*Changing the theme of the address book*","isFullCredit":true},{"lineNumber":1666,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1667,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1668,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1669,"author":{"gitId":"Esilocke"},"content":"theme light","isFullCredit":true},{"lineNumber":1670,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1671,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1672,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a bright colour. +","isFullCredit":true},{"lineNumber":1673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1674,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1675,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1676,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: light","isFullCredit":true},{"lineNumber":1677,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1678,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1679,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1680,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1681,"author":{"gitId":"Esilocke"},"content":"theme dark","isFullCredit":true},{"lineNumber":1682,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1683,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1684,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a dark colour.+","isFullCredit":true},{"lineNumber":1685,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1686,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1687,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: dark","isFullCredit":true},{"lineNumber":1688,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1689,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1690,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*","isFullCredit":true},{"lineNumber":1691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1692,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1693,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1694,"author":{"gitId":"Esilocke"},"content":"theme","isFullCredit":true},{"lineNumber":1695,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1696,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1697,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1698,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1699,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1700,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1701,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":1702,"author":{"gitId":"Esilocke"},"content":"theme: Sets the theme based on the specified style. +","isFullCredit":true},{"lineNumber":1703,"author":{"gitId":"Esilocke"},"content":"Parameters: STYLE +","isFullCredit":true},{"lineNumber":1704,"author":{"gitId":"Esilocke"},"content":"Example: theme dark","isFullCredit":true},{"lineNumber":1705,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1706,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1707,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d HistoryCommand","isFullCredit":true},{"lineNumber":1708,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1709,"author":{"gitId":"Esilocke"},"content":"*Lists all commands done in reverser chronological order*","isFullCredit":true},{"lineNumber":1710,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1711,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1712,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1713,"author":{"gitId":"Esilocke"},"content":"notacommand +","isFullCredit":true},{"lineNumber":1714,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +","isFullCredit":true},{"lineNumber":1715,"author":{"gitId":"Esilocke"},"content":"history","isFullCredit":true},{"lineNumber":1716,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1717,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1718,"author":{"gitId":"Esilocke"},"content":"The two previous commands are listed in the box below the command line in reverse chronological order from top to bottom. +","isFullCredit":true},{"lineNumber":1719,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1720,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1721,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1722,"author":{"gitId":"Esilocke"},"content":"Entered commands (from most recent to earliest): +","isFullCredit":true},{"lineNumber":1723,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +","isFullCredit":true},{"lineNumber":1724,"author":{"gitId":"Esilocke"},"content":"notacommand","isFullCredit":true},{"lineNumber":1725,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1726,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1727,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d UndoCommand","isFullCredit":true},{"lineNumber":1728,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1729,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1730,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1731,"author":{"gitId":"Esilocke"},"content":"delete 1 +","isFullCredit":true},{"lineNumber":1732,"author":{"gitId":"Esilocke"},"content":"undo","isFullCredit":true},{"lineNumber":1733,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1734,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1735,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo. +","isFullCredit":true},{"lineNumber":1736,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1737,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1738,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1739,"author":{"gitId":"Esilocke"},"content":"Undo success!","isFullCredit":true},{"lineNumber":1740,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1741,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1742,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1743,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1744,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1745,"author":{"gitId":"Esilocke"},"content":"add n/Reed Richards p/94444444 e/reed@futurefoundation.com a/Baxter Building r/Loves to stretch +","isFullCredit":true},{"lineNumber":1746,"author":{"gitId":"Esilocke"},"content":"undo","isFullCredit":true},{"lineNumber":1747,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1748,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1749,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo.","isFullCredit":true},{"lineNumber":1750,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1751,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1752,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1753,"author":{"gitId":"Esilocke"},"content":"Undo success!","isFullCredit":true},{"lineNumber":1754,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1755,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1756,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UnfavouriteCommand","isFullCredit":true},{"lineNumber":1757,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1758,"author":{"gitId":"-"},"content":"*Setting a favoured person in the Address++ to be the unfavoured person*","isFullCredit":true},{"lineNumber":1759,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1760,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1761,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1762,"author":{"gitId":"-"},"content":"list +","isFullCredit":true},{"lineNumber":1763,"author":{"gitId":"-"},"content":"unfavourite 1","isFullCredit":true},{"lineNumber":1764,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1765,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1766,"author":{"gitId":"-"},"content":"The 1st person in the Address++ will be unfavoured and the heart picture will disappear.","isFullCredit":true},{"lineNumber":1767,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1768,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1769,"author":{"gitId":"-"},"content":"Unfavourited Person: Alex Yeoh Phone: 87438807 Email: alexyeoh@example.com Address: Blk 30 Geylang Street 29, #06-40 Remark: Cheerful lad Avatar: Tags: [friends]","isFullCredit":true},{"lineNumber":1770,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1771,"author":{"gitId":"-"},"content":"*Failing to set a unfavored person if he has not been favoured*","isFullCredit":true},{"lineNumber":1772,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1773,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1774,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1775,"author":{"gitId":"-"},"content":"list +","isFullCredit":true},{"lineNumber":1776,"author":{"gitId":"-"},"content":"unfavourite 2","isFullCredit":true},{"lineNumber":1777,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1778,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1779,"author":{"gitId":"-"},"content":"An error message will display since the second person in the Address++ has bot been favoured.","isFullCredit":true},{"lineNumber":1780,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1782,"author":{"gitId":"-"},"content":"Person is not favourited yet.","isFullCredit":true},{"lineNumber":1783,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1784,"author":{"gitId":"-"},"content":"*Failing to set a unfavoured person with invalid index*","isFullCredit":true},{"lineNumber":1785,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1786,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1787,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1788,"author":{"gitId":"-"},"content":"unfavourite 56","isFullCredit":true},{"lineNumber":1789,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1790,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1791,"author":{"gitId":"-"},"content":"An error message will display since there is no 56th person in the current list.","isFullCredit":true},{"lineNumber":1792,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1793,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1794,"author":{"gitId":"-"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":1795,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1796,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d RedoCommand","isFullCredit":true},{"lineNumber":1797,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1798,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1799,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1800,"author":{"gitId":"Esilocke"},"content":"delete 1 +","isFullCredit":true},{"lineNumber":1801,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1802,"author":{"gitId":"Esilocke"},"content":"redo","isFullCredit":true},{"lineNumber":1803,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo and deleted again after a redo. +","isFullCredit":true},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1809,"author":{"gitId":"Esilocke"},"content":"Redo success!","isFullCredit":true},{"lineNumber":1810,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1811,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1812,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1813,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1814,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1815,"author":{"gitId":"Esilocke"},"content":"add n/Peter Parker p/92241783 e/ceo@parkerindustries.com a/New York City r/Top 10 smartest people in the world +","isFullCredit":true},{"lineNumber":1816,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1817,"author":{"gitId":"Esilocke"},"content":"redo","isFullCredit":true},{"lineNumber":1818,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1819,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo and added again with a redo.","isFullCredit":true},{"lineNumber":1821,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1822,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1823,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1824,"author":{"gitId":"Esilocke"},"content":"Redo success!","isFullCredit":true},{"lineNumber":1825,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1826,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1827,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1828,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book to its original state before continuing with testing.","isFullCredit":true},{"lineNumber":1829,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1830,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ClearCommand","isFullCredit":true},{"lineNumber":1831,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1832,"author":{"gitId":"Esilocke"},"content":"*Clearing all entries*","isFullCredit":true},{"lineNumber":1833,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1834,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1835,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1836,"author":{"gitId":"Esilocke"},"content":"clear","isFullCredit":true},{"lineNumber":1837,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1838,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1839,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +","isFullCredit":true},{"lineNumber":1840,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1841,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1843,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!","isFullCredit":true},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1845,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1846,"author":{"gitId":"Esilocke"},"content":"*Clearing persons only*","isFullCredit":true},{"lineNumber":1847,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1848,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1849,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1850,"author":{"gitId":"Esilocke"},"content":"clear person/","isFullCredit":true},{"lineNumber":1851,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1853,"author":{"gitId":"Esilocke"},"content":"All persons vanish from the leftmost column, leaving them empty. +","isFullCredit":true},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1855,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1856,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1857,"author":{"gitId":"Esilocke"},"content":"All contacts have been cleared!","isFullCredit":true},{"lineNumber":1858,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1859,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1860,"author":{"gitId":"Esilocke"},"content":"*Clearing tasks only*","isFullCredit":true},{"lineNumber":1861,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1862,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1863,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1864,"author":{"gitId":"Esilocke"},"content":"clear task/","isFullCredit":true},{"lineNumber":1865,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1866,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1867,"author":{"gitId":"Esilocke"},"content":"All tasks vanish from the middle columns, leaving them empty. +","isFullCredit":true},{"lineNumber":1868,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1869,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1870,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1871,"author":{"gitId":"Esilocke"},"content":"All tasks have been cleared!","isFullCredit":true},{"lineNumber":1872,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1873,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1874,"author":{"gitId":"Esilocke"},"content":"*Both person and task specified*","isFullCredit":true},{"lineNumber":1875,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1876,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1877,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1878,"author":{"gitId":"Esilocke"},"content":"clear task/ person/ task/ task/ person/","isFullCredit":true},{"lineNumber":1879,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1880,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1881,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +","isFullCredit":true},{"lineNumber":1882,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1883,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1884,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1885,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!","isFullCredit":true},{"lineNumber":1886,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1887,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1888,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1889,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book before continuing with testing.","isFullCredit":true},{"lineNumber":1890,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1891,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d OpenCommand and SaveAsCommand","isFullCredit":true},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"*Saves data as a new .xml file and switches to that file*","isFullCredit":true},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"save +","isFullCredit":true},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"Save the new save file as test.xml. +","isFullCredit":true},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Click save.","isFullCredit":true},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the file followed by test.xml. +","isFullCredit":true},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Successfully saved file.","isFullCredit":true},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"*Opens and switches to a new .xml save file*","isFullCredit":true},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"Following the above save command:","isFullCredit":true},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":"clear","isFullCredit":true},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"To differentiate the test.xml with the [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"The address book contains no more persons or tasks.","isFullCredit":true},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"open +","isFullCredit":true},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml and select [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":"Click open.","isFullCredit":true},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the [W09-B2][Address++]SampleData.xml followed by the name [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"The original data is restored in the address book. +","isFullCredit":true},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":"Successfully opened file.","isFullCredit":true},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ExitCommand","isFullCredit":true},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"*Exits Address++*","isFullCredit":true},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":"Input Command:","isFullCredit":true},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"exit","isFullCredit":true},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"Expected Result: Address++ closes.","isFullCredit":true},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1957,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":1958,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1959,"author":{"gitId":"charlesgoh"},"content":"*Sorts persons by name in ascending order*","isFullCredit":true},{"lineNumber":1960,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1961,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1962,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1963,"author":{"gitId":"charlesgoh"},"content":"sort person name asc","isFullCredit":true},{"lineNumber":1964,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1965,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1966,"author":{"gitId":"charlesgoh"},"content":"Person list panel will sort all persons by their names in ascending order +","isFullCredit":true},{"lineNumber":1967,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1968,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1969,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1970,"author":{"gitId":"charlesgoh"},"content":"All persons in address book successfully sorted","isFullCredit":true},{"lineNumber":1971,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1972,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1973,"author":{"gitId":"charlesgoh"},"content":"*Sorts tasks by priority in descending order*","isFullCredit":true},{"lineNumber":1974,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1975,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1976,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1977,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +","isFullCredit":true},{"lineNumber":1978,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1979,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1980,"author":{"gitId":"charlesgoh"},"content":"Task list panel will sort all tasks by their priorities in descending order +","isFullCredit":true},{"lineNumber":1981,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1982,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1983,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1984,"author":{"gitId":"charlesgoh"},"content":"All tasks in address book successfully sorted","isFullCredit":true},{"lineNumber":1985,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1986,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1987,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*","isFullCredit":true},{"lineNumber":1988,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1989,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1990,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1991,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +","isFullCredit":true},{"lineNumber":1992,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1993,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1994,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +","isFullCredit":true},{"lineNumber":1995,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1996,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1997,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1998,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":1999,"author":{"gitId":"charlesgoh"},"content":"sort: Sorts all persons or all tasks by chosen field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive +","isFullCredit":true},{"lineNumber":2000,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [LIST] [FIELD] [ORDER] +","isFullCredit":true},{"lineNumber":2001,"author":{"gitId":"charlesgoh"},"content":"Example: sort person email desc +","isFullCredit":true},{"lineNumber":2002,"author":{"gitId":"charlesgoh"},"content":"Example 2: sort task deadline desc +","isFullCredit":true},{"lineNumber":2003,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2004,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2005,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":2006,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2007,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2008,"author":{"gitId":"charlesgoh"},"content":"Currently supports mac relative file paths. No guarantee of support for other operating system.","isFullCredit":true},{"lineNumber":2009,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2010,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*","isFullCredit":true},{"lineNumber":2011,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2012,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2013,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2014,"author":{"gitId":"charlesgoh"},"content":"backup +","isFullCredit":true},{"lineNumber":2015,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2016,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2017,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +","isFullCredit":true},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":2022,"author":{"gitId":"charlesgoh"},"content":"backup: Backs up data to a user input location field [FILEPATH] +","isFullCredit":true},{"lineNumber":2023,"author":{"gitId":"charlesgoh"},"content":"Parameter: KEYWORD [FILEPATH] +","isFullCredit":true},{"lineNumber":2024,"author":{"gitId":"charlesgoh"},"content":"Example: backupMyBackUpFile +","isFullCredit":true},{"lineNumber":2025,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2026,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2027,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to same file path*","isFullCredit":true},{"lineNumber":2028,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2029,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2030,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2031,"author":{"gitId":"charlesgoh"},"content":"backup filename.xml","isFullCredit":true},{"lineNumber":2032,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the same directory as the jar file +","isFullCredit":true},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully.","isFullCredit":true},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2040,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2041,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to relative file path*","isFullCredit":true},{"lineNumber":2042,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2043,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2044,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2045,"author":{"gitId":"charlesgoh"},"content":"backup ./../filename.xml +","isFullCredit":true},{"lineNumber":2046,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2047,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2048,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the directory preceding one level above the jar file +","isFullCredit":true},{"lineNumber":2049,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2050,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2051,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2052,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully.","isFullCredit":true},{"lineNumber":2053,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2054,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2055,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Change Password Command","isFullCredit":true},{"lineNumber":2056,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2057,"author":{"gitId":"charlesgoh"},"content":"*Invalid Command Format Input*","isFullCredit":true},{"lineNumber":2058,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2059,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2060,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2061,"author":{"gitId":"charlesgoh"},"content":"changepassword +","isFullCredit":true},{"lineNumber":2062,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2063,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2064,"author":{"gitId":"charlesgoh"},"content":"Invalid command format error message with usage message +","isFullCredit":true},{"lineNumber":2065,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2066,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2067,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2068,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":2069,"author":{"gitId":"charlesgoh"},"content":"changepassword: Changes user password. +","isFullCredit":true},{"lineNumber":2070,"author":{"gitId":"charlesgoh"},"content":"pw/PASSWORD np/NEWPASSWORD cfp/CONFIRMPASSWORD +","isFullCredit":true},{"lineNumber":2071,"author":{"gitId":"charlesgoh"},"content":"Example: changepassword pw/password np/mynewpassword111 cfp/mynewpassword111 +","isFullCredit":true},{"lineNumber":2072,"author":{"gitId":"charlesgoh"},"content":"Example 2: cpw pw/password np/mynewpassword111 cfp/mynewpassword111 +","isFullCredit":true},{"lineNumber":2073,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2074,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2075,"author":{"gitId":"charlesgoh"},"content":"*Change Password with valid inputs*","isFullCredit":true},{"lineNumber":2076,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2077,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2078,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2079,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +","isFullCredit":true},{"lineNumber":2080,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2081,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2082,"author":{"gitId":"charlesgoh"},"content":"Application password will change to `newpassword` +","isFullCredit":true},{"lineNumber":2083,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2084,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2085,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2086,"author":{"gitId":"charlesgoh"},"content":"Password changed successfully","isFullCredit":true},{"lineNumber":2087,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2088,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2089,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Password entered*","isFullCredit":true},{"lineNumber":2090,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2091,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2092,"author":{"gitId":"charlesgoh"},"content":"Run this after running the previous command. Otherwise change the password to something incorrect. Default password","isFullCredit":true},{"lineNumber":2093,"author":{"gitId":"charlesgoh"},"content":"is `password`","isFullCredit":true},{"lineNumber":2094,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2095,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2096,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2097,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +","isFullCredit":true},{"lineNumber":2098,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2099,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2100,"author":{"gitId":"charlesgoh"},"content":"Application password will remain as `newpassword` and reject input +","isFullCredit":true},{"lineNumber":2101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2102,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2103,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2104,"author":{"gitId":"charlesgoh"},"content":"Your password is incorrect. Please try again.","isFullCredit":true},{"lineNumber":2105,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2107,"author":{"gitId":"charlesgoh"},"content":"*Old and new passwords are the same*","isFullCredit":true},{"lineNumber":2108,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2109,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2110,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2111,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/newpassword cfp/newpassword +","isFullCredit":true},{"lineNumber":2112,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2113,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2114,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +","isFullCredit":true},{"lineNumber":2115,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2116,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2117,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2118,"author":{"gitId":"charlesgoh"},"content":"New password must be different from your old password","isFullCredit":true},{"lineNumber":2119,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2121,"author":{"gitId":"charlesgoh"},"content":"*New password and confirmation passwords do not match*","isFullCredit":true},{"lineNumber":2122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2123,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2124,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2125,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/evennewerpassword cfp/wutwutWUUUUUT? +","isFullCredit":true},{"lineNumber":2126,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2127,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2128,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +","isFullCredit":true},{"lineNumber":2129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2130,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2131,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2132,"author":{"gitId":"charlesgoh"},"content":"Your new password and confirmation password do not match. Please try again","isFullCredit":true},{"lineNumber":2133,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2135,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock Command","isFullCredit":true},{"lineNumber":2136,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2137,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2138,"author":{"gitId":"charlesgoh"},"content":"The following tests assume that the password has been set to `newpassword` from the above tests. If you opened the application","isFullCredit":true},{"lineNumber":2139,"author":{"gitId":"charlesgoh"},"content":"for the first time, use the default password `password`.","isFullCredit":true},{"lineNumber":2140,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2141,"author":{"gitId":"charlesgoh"},"content":"*Lock Application failure with incorrect password*","isFullCredit":true},{"lineNumber":2142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2143,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2144,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2145,"author":{"gitId":"charlesgoh"},"content":"lock pw/wrongpasswordlol +","isFullCredit":true},{"lineNumber":2146,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2147,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2148,"author":{"gitId":"charlesgoh"},"content":"Application will fail to lock +","isFullCredit":true},{"lineNumber":2149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2150,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2151,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2152,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again","isFullCredit":true},{"lineNumber":2153,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2154,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2155,"author":{"gitId":"charlesgoh"},"content":"*Lock Application with correct password*","isFullCredit":true},{"lineNumber":2156,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2157,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2158,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2159,"author":{"gitId":"charlesgoh"},"content":"lock pw/newpassword","isFullCredit":true},{"lineNumber":2160,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2161,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2162,"author":{"gitId":"charlesgoh"},"content":"Locks application. Try performing any CRUD statements after locking (i.e. add or edit. It will fail) +","isFullCredit":true},{"lineNumber":2163,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2164,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2165,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2166,"author":{"gitId":"charlesgoh"},"content":"Address++ locked successfully","isFullCredit":true},{"lineNumber":2167,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2168,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2169,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Unlock Command","isFullCredit":true},{"lineNumber":2170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2171,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2172,"author":{"gitId":"charlesgoh"},"content":"This section is a continuation of the previous section on the Lock Command","isFullCredit":true},{"lineNumber":2173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2174,"author":{"gitId":"charlesgoh"},"content":"*Fail to unlock application with incorrect password*","isFullCredit":true},{"lineNumber":2175,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2176,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2177,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2178,"author":{"gitId":"charlesgoh"},"content":"unlock pw/wrongpassword:P","isFullCredit":true},{"lineNumber":2179,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2180,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2181,"author":{"gitId":"charlesgoh"},"content":"Fails to unlock application. You will still not be able to execute CRUD commands +","isFullCredit":true},{"lineNumber":2182,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2183,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2184,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2185,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again","isFullCredit":true},{"lineNumber":2186,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2188,"author":{"gitId":"charlesgoh"},"content":"*Unlock application with correct password*","isFullCredit":true},{"lineNumber":2189,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2190,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2191,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2192,"author":{"gitId":"charlesgoh"},"content":"unlock pw/newpassword:P","isFullCredit":true},{"lineNumber":2193,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2194,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2195,"author":{"gitId":"charlesgoh"},"content":"Unlocks application. You can now execute CRUD commands +","isFullCredit":true},{"lineNumber":2196,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2197,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2198,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2199,"author":{"gitId":"charlesgoh"},"content":"Address++ unlocked successfully","isFullCredit":true},{"lineNumber":2200,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2201,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2202,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command","isFullCredit":true},{"lineNumber":2203,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2204,"author":{"gitId":"charlesgoh"},"content":"*Increase font size*","isFullCredit":true},{"lineNumber":2205,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2206,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2207,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2208,"author":{"gitId":"charlesgoh"},"content":"fontsize increase","isFullCredit":true},{"lineNumber":2209,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2210,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2211,"author":{"gitId":"charlesgoh"},"content":"Increases font size by 1 level +","isFullCredit":true},{"lineNumber":2212,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2213,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2214,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2215,"author":{"gitId":"charlesgoh"},"content":"Font size increased successfully","isFullCredit":true},{"lineNumber":2216,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2217,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2218,"author":{"gitId":"charlesgoh"},"content":"*Decrease font size*","isFullCredit":true},{"lineNumber":2219,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2220,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2221,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2222,"author":{"gitId":"charlesgoh"},"content":"fs decrease","isFullCredit":true},{"lineNumber":2223,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2224,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2225,"author":{"gitId":"charlesgoh"},"content":"Decrease font size by 1 level +","isFullCredit":true},{"lineNumber":2226,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2227,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2228,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2229,"author":{"gitId":"charlesgoh"},"content":"Font size decreased successfully","isFullCredit":true},{"lineNumber":2230,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2231,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2232,"author":{"gitId":"charlesgoh"},"content":"*Reset font size*","isFullCredit":true},{"lineNumber":2233,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2234,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2235,"author":{"gitId":"charlesgoh"},"content":"You can try increasing the font size a few more times. There will be a max font size to prevent you from","isFullCredit":true},{"lineNumber":2236,"author":{"gitId":"charlesgoh"},"content":"increasing too much.","isFullCredit":true},{"lineNumber":2237,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2238,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2239,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2240,"author":{"gitId":"charlesgoh"},"content":"fontsize reset +","isFullCredit":true},{"lineNumber":2241,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2242,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2243,"author":{"gitId":"charlesgoh"},"content":"Resets font size in the application +","isFullCredit":true},{"lineNumber":2244,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2245,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2246,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2247,"author":{"gitId":"charlesgoh"},"content":"Font size reset successfully","isFullCredit":true},{"lineNumber":2248,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2249,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2250,"author":{"gitId":"charlesgoh"},"content":"*Incorrect input format*","isFullCredit":true},{"lineNumber":2251,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2252,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2253,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2254,"author":{"gitId":"charlesgoh"},"content":"fontsize +","isFullCredit":true},{"lineNumber":2255,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2256,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2257,"author":{"gitId":"charlesgoh"},"content":"Displays invalid command format error and the usage message +","isFullCredit":true},{"lineNumber":2258,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2259,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2260,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2261,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":2262,"author":{"gitId":"charlesgoh"},"content":"fontsize: Increases, decreases or resets font sizes +","isFullCredit":true},{"lineNumber":2263,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [OPTION] +","isFullCredit":true},{"lineNumber":2264,"author":{"gitId":"charlesgoh"},"content":"Example: fontsize increase +","isFullCredit":true},{"lineNumber":2265,"author":{"gitId":"charlesgoh"},"content":"Example 2: fs reset +","isFullCredit":true},{"lineNumber":2266,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2267,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2268,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatars","isFullCredit":true},{"lineNumber":2269,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2270,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2271,"author":{"gitId":"charlesgoh"},"content":"There is full support for URLs. No guarantee for local file paths. Local file paths must add a local prefix `file:`","isFullCredit":true},{"lineNumber":2272,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2273,"author":{"gitId":"charlesgoh"},"content":"*Add avatar URL*","isFullCredit":true},{"lineNumber":2274,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2275,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2276,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2277,"author":{"gitId":"charlesgoh"},"content":"edit 1 v/[URL] +","isFullCredit":true},{"lineNumber":2278,"author":{"gitId":"charlesgoh"},"content":"Replace [URL] with a valid image online.","isFullCredit":true},{"lineNumber":2279,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2280,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2281,"author":{"gitId":"charlesgoh"},"content":"Replaces placeholder avatar with the online image +","isFullCredit":true}],"authorContributionMap":{"charlesgoh":324,"jeffreygohkw":186,"Esilocke":1500,"-":271}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" String defaultConfigAsString \u003d \"App title : Address++\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code AddPersonCommand}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandIntegrationTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), expectedModel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code AddPersonCommand} which upon execution, adds {@code person} into the {@code model}.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand prepareCommand(Person person, Model model) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":9,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandTest {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommand \u003d new AddPersonCommand(alice);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addBobCommand \u003d new AddPersonCommand(bob);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommandCopy \u003d new AddPersonCommand(alice);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddPersonCommand with the details of the given person.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand getAddCommandForPerson(Person person, Model model) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person or task.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":2,"-":100}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AddTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" AddTaskCommandTest.ModelStubAcceptingTaskAdded modelStub \u003d new AddTaskCommandTest.ModelStubAcceptingTaskAdded();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d prepareCommand(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddTaskCommand.MESSAGE_SUCCESS, validTask), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new AddTaskCommandTest.ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddTaskCommand.MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" prepareCommand(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommand \u003d new AddTaskCommand(paper);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPencilCommand \u003d new AddTaskCommand(pencil);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommandCopy \u003d new AddTaskCommand(paper);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddTaskCommand with the details of the given task.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" private AddTaskCommand prepareCommand(Task task, Model model) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand command \u003d new AddTaskCommand(task);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateTaskException when trying to add a task.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the task being added.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingTaskAdded extends ModelStub {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":119}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_success() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_success() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_success() throws Exception {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void execute_allPersonsAlreadyAssigned_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assignCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, expectedModel, AssignCommand.MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index taskIndex) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, taskIndex);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":156}},{"path":"src/test/java/seedu/address/logic/commands/ChangePasswordCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.ChangePasswordCommandParser;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_PASSWORD \u003d \"password\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_SECOND_PASSWORD \u003d \"password2\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ChangePasswordCommandParser parser;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" parser \u003d new ChangePasswordCommandParser();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void parseWrongArgumentsFailure() {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" // No arguments failure","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Wrong number of arguments","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"one two?\", String","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // No prefixes","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"password password2 password3\", String","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void testUserPrefsPasswords() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Check original password","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" String expectedPassword \u003d getHashed256(DEFAULT_PASSWORD);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // Lock address book and check if state has changed","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(DEFAULT_SECOND_PASSWORD);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" expectedPassword \u003d getHashed256(DEFAULT_SECOND_PASSWORD);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Helps to convert string to SHA256 counterpart","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" private String getHashed256(String password) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":74}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" .setRemarkPrivate(\"false\").build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getRemarkIsPrivate(), pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsCopy \u003d new PersonPrivacySettings(pps);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getAddressIsPrivate(), pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getEmailIsPrivate(), pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getNameIsPrivate(), pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getRemarkIsPrivate(), pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").setRemarkPrivate(\"true\")","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").setRemarkPrivate(\"false\")","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":149}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class ClearCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/ClearPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearPersonCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ClearPersonCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ClearPersonCommand command \u003d new ClearPersonCommand();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/commands/ClearTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommandTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // Verify that only the tasks are cleared","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearTaskCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ClearTaskCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ClearTaskCommand command \u003d new ClearTaskCommand();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":39}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_NAME_CHRIS \u003d \"Chris Chan\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_PHONE_CHRIS \u003d \"33333333\";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_EMAIL_CHRIS \u003d \"chris@example.com\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_ADDRESS_CHRIS \u003d \"Block 132, Chris Street 5\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_REMARK_CHRIS \u003d \"He likes swimming\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_AMY \u003d \"amyavatar\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_BOB \u003d \"bobavatar\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_CHRIS \u003d \"chirsavatar\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_ALICE \u003d \"false\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_BOB \u003d \"true\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_TAG_CHRISTAG \u003d \"special\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017 12pm\";","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017 12pm\";","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PENCIL \u003d \"12 Kent Ridge Cres\";","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PAPER \u003d \"Bedok Mall\";","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final String NAME_DESC_CHRIS \u003d \" \" + PREFIX_NAME + VALID_NAME_CHRIS;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public static final String PHONE_DESC_CHRIS \u003d \" \" + PREFIX_PHONE + VALID_PHONE_CHRIS;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" public static final String EMAIL_DESC_CHRIS \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_CHRIS;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" public static final String ADDRESS_DESC_CHRIS \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_CHRIS;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" public static final String REMARK_DESC_CHRIS \u003d \" \" + PREFIX_REMARK + VALID_REMARK_CHRIS;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_AMY \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_AMY;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_BOB \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_BOB;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_CHRIS \u003d \" \" + PREFIX_AVATAR + VALID_REMARK_CHRIS;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PENCIL \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PAPER \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_TASK_NAME_DESC \u003d \" \" + PREFIX_NAME + \" \"; // task name cannot be blank","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"TIMELESS AGES\"; // not a date","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_ADDRESS_DESC \u003d \" \" + PREFIX_ADDRESS + \" \"; // priority is out of bounds","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_AMY;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_BOB;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PENCIL;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PAPER;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" static {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //TODO: Change avatar filename to a real filename","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_AMY).withAvatar(VALID_AVATAR_AMY).withFavourite(VALID_FAVOURITE_ALICE)","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_BOB).withAvatar(VALID_AVATAR_BOB).withFavourite(VALID_FAVOURITE_ALICE)","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" // only do so by copying its components.","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" command.execute();","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (CommandException e) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" final String[] splitName \u003d person.getName().value.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public static void showFirstTaskOnly(Model model) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(0);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" public static void showSecondTaskOnly(Model model) {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(1);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * Deletes the first task in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public static void deleteFirstTask(Model model) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask firstTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(firstTask);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Task in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":15,"jeffreygohkw":5,"Esilocke":81,"wangyiming1019":25,"-":124}},{"path":"src/test/java/seedu/address/logic/commands/DeletePersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeletePersonCommand}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommand \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteSecondCommand \u003d new DeletePersonCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommandCopy \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeletePersonCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" private DeletePersonCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d new DeletePersonCommand(index);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" deletePersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" return deletePersonCommand;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":22,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" showNoTask(expectedModel);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommand \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteSecondCommand \u003d new DeleteTaskCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommandCopy \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeleteTaskCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private DeleteTaskCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d new DeleteTaskCommand(index);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" deleteTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return deleteTaskCommand;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show no tasks.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" private void showNoTask(Model model) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(p -\u003e false);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().isEmpty();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":115}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_success() throws Exception {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_success() throws Exception {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_success() throws Exception {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void execute_noneDismissed_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, DismissCommand.MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index taskIndex) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, taskIndex);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":151}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditPersonCommand.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandTest {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(indexLastPerson, descriptor);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex,","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" final EditPersonCommand standardCommand \u003d new EditPersonCommand(INDEX_FIRST_PERSON, DESC_AMY);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand commandWithSameValues \u003d new EditPersonCommand(INDEX_FIRST_PERSON, copyDescriptor);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_SECOND_PERSON, DESC_AMY)));","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_FIRST_PERSON, DESC_BOB)));","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditPersonCommand} with parameters {@code index} and {@code descriptor}","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" private EditPersonCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d new EditPersonCommand(index, descriptor);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" editPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return editPersonCommand;","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":31,"-":140}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_BOB;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptorWithSameValues \u003d new EditPersonDescriptor(DESC_AMY);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(descriptorWithSameValues));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(DESC_AMY));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(null));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(5));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different values -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(DESC_BOB));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different name -\u003e returns false","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" EditPersonDescriptor editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // different phone -\u003e returns false","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withPhone(VALID_PHONE_BOB).build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // different email -\u003e returns false","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withEmail(VALID_EMAIL_BOB).build();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // different address -\u003e returns false","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAddress(VALID_ADDRESS_BOB).build();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // different tags -\u003e returns false","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // different remarks -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // different avatar -\u003e returns false","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAvatar(VALID_AVATAR_BOB).build();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // different favourite status -\u003e returns false","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withFavourite(VALID_FAVOURITE_BOB).build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":16,"-":57}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent_throwsCommandException() throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset_success() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll_success() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" private AddressBook prepareAddressBook() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditTaskCommand.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder(editedTask).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(Index.fromZeroBased(3), descriptor);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(3), editedTask);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Index indexLastTask \u003d Index.fromOneBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask lastTask \u003d model.getFilteredTaskList().get(indexLastTask.getZeroBased());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" TaskBuilder taskInList \u003d new TaskBuilder(lastTask);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d taskInList.withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(indexLastTask, descriptor);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(lastTask, editedTask);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskInFilteredList \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder(taskInFilteredList).withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(0), editedTask);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" * Edit filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex,","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" final EditTaskCommand standardCommand \u003d new EditTaskCommand(INDEX_FIRST_TASK, DESC_PENCIL);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor copyDescriptor \u003d new EditTaskCommand.EditTaskDescriptor(DESC_PENCIL);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand commandWithSameValues \u003d new EditTaskCommand(INDEX_FIRST_TASK, copyDescriptor);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_SECOND_TASK, DESC_PENCIL)));","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // different descriptor -\u003e returns false","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_FIRST_TASK, DESC_PAPER)));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskCommand} with parameters {@code index} and {@code descriptor}","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private EditTaskCommand prepareCommand(Index index, EditTaskCommand.EditTaskDescriptor descriptor) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d new EditTaskCommand(index, descriptor);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" editTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return editTaskCommand;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":152}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" // different task address -\u003e returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code FindPersonCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommand \u003d new FindPersonCommand(firstPredicate);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findSecondCommand \u003d new FindPersonCommand(secondPredicate);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommandCopy \u003d new FindPersonCommand(firstPredicate);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindPersonCommand}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" private FindPersonCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindPersonCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"-":84}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/FindTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_TASKS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.ACCEPT;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.DATE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.GRADLE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommand \u003d new FindTaskCommand(firstPredicate);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findSecondCommand \u003d new FindTaskCommand(secondPredicate);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommandCopy \u003d new FindTaskCommand(firstPredicate);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void execute_zeroKeywords_noTaskFound() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public void execute_multipleKeywords_multipleTasksFound() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\"Resolve Acceptance Date\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ACCEPT, DATE, GRADLE));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindTaskCommand}.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" private FindTaskCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * - the {@code FilteredList\u003cReadOnlyTask\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindTaskCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e expectedList) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedList, model.getFilteredTaskList());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":97}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code BrowserPanelLocateEvent}","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/NavigateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code NavigateCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromAddress_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to, null, null, false, false);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromPersons_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromTasks_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidArgs_failure() throws IllegalValueException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to,","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand naviOne \u003d prepareCommand(from, to,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_SECOND_PERSON, false, false);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Executes the input (@code NavigateCommand) and checks that (@code BrowserPanelNavigateEvent) is raised with","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * the correct locations","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(NavigateCommand navi) throws IllegalValueException {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" Location from;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Location to;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationFrom() !\u003d null) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d navi.getLocationFrom();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isFromIsTask()) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredTaskList().get(navi.getFromIndex().getZeroBased())","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredPersonList().get(navi.getFromIndex().getZeroBased())","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationTo() !\u003d null) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d navi.getLocationTo();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isToIsTask()) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredTaskList().get(navi.getToIndex().getZeroBased())","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredPersonList().get(navi.getToIndex().getZeroBased())","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d navi.execute();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(NavigateCommand.MESSAGE_NAVIGATE_SUCCESS,","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" from, to),","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelNavigateEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelNavigateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(from, lastEvent.getFromLocation());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(to, lastEvent.getToLocation());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code NavigateCommand} based on input parameters.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommand prepareCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d new NavigateCommand(locationFrom, locationTo, fromIndex, toIndex, fromIsTask, toIsTask);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" navi.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return navi;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":135}},{"path":"src/test/java/seedu/address/logic/commands/OpenCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.OpenCommand.OPEN_COMMAND_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new OpenCommand().execute();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(OPEN_COMMAND_SUCCESS, result.feedbackToUser);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof OpenRequestEvent);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/PrivacyLevelCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Assert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code PrivacyLevelCommand}.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndex_success() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //valid levels","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand onePlc \u003d prepareCommand(1);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand twoPlc \u003d prepareCommand(2);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand threePlc \u003d prepareCommand(3);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(onePlc);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(twoPlc);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(threePlc);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndex_failure() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //Negative level","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand negativePlc \u003d prepareCommand(-1);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //Zero level","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand zeroPlc \u003d prepareCommand(0);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //Level greater than the maximum level allowed","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand tooBigPlc \u003d prepareCommand(5);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(negativePlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(zeroPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(tooBigPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that the privacy level of the model and each person has been","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * changed to that of the level as specified in the input (@code PrivacyLevelCommand)","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(PrivacyLevelCommand plc) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" commandResult \u003d plc.execute();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(PrivacyLevelCommand.CHANGE_PRIVACY_LEVEL_SUCCESS, plc.getLevel()),","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //Check the model\u0027s privacy level","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(model.getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //Iterate through the list of persons in the model","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" //Check the person\u0027s Privacy Level","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getAddressBook().getPersonList().get(i);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" //Check Privacy Level of all fields of each person that can be private","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getName().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getPhone().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getEmail().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getAddress().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getRemark().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(PrivacyLevelCommand plc, String expectedMessage) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" plc.execute();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Assert.assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommand prepareCommand(int level) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand privacyLevelCommand \u003d new PrivacyLevelCommand(level);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" privacyLevelCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return privacyLevelCommand;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":116}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RedoCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Collections.emptyList(), Arrays.asList(deletePersonCommandTwo, deletePersonCommandOne));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // multiple commands in redoStack","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" // single command in redoStack","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" // no command in redoStack","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8,"-":47}},{"path":"src/test/java/seedu/address/logic/commands/SaveAsCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SaveAsCommand.SAVE_AS_COMMAND_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new SaveAsCommand().execute();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(SAVE_AS_COMMAND_SUCCESS, result.feedbackToUser);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof SaveAsRequestEvent);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/SelectPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectPersonCommand}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandTest {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Rule","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" @Before","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommand \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectSecondCommand \u003d new SelectPersonCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommandCopy \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestEvent} is raised with the correct index.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectPersonCommand.MESSAGE_SUCCESS, index.getOneBased());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectPersonCommand.execute();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" * is thrown with the .","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.execute();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectPersonCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" private SelectPersonCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d new SelectPersonCommand(index);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" return selectPersonCommand;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":139}},{"path":"src/test/java/seedu/address/logic/commands/SelectTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Before","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index lastTaskIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_TASK);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastTaskIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommand \u003d new SelectTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectSecondCommand \u003d new SelectTaskCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommandCopy \u003d new SelectTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestTaskEvent} is raised with the correct index.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectTaskCommand.MESSAGE_SUCCESS, index.getOneBased());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectTaskCommand.execute();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestTaskEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" * is thrown with the .","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.execute();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectTaskCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" private SelectTaskCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d new SelectTaskCommand(index);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" return selectTaskCommand;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":136}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListValidIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListInvalidIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, SetCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":118}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showSecondTaskOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_changeIncompleteTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, SetIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(model);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(expectedModel);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":117}},{"path":"src/test/java/seedu/address/logic/commands/TagListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS_WITH_NEW_TAG;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommandTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" private TagListCommand listTagsCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String expectedMessage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Before","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cTag\u003e tagList \u003d new ArrayList\u003cTag\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand \u003d new TagListCommand();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder expectedMessageString \u003d new StringBuilder(listTagsCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (!tagList.contains(tag)) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" tagList.add(tag);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageString.append(\"\u003c\").append(tag.getTagName()).append(\"\u003e \");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" expectedMessage \u003d expectedMessageString.toString().trim();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void executeTagListNotEmpty() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyTagListShowNothing() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModelWithNoTags \u003d new ModelManager();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessageWithNoTags \u003d listTagsCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" TagListCommand tagListCommandWithNoTags \u003d new TagListCommand();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" tagListCommandWithNoTags.setData(expectedModelWithNoTags, new CommandHistory(),","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" new UndoRedoStack());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(tagListCommandWithNoTags, expectedModelWithNoTags,","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageWithNoTags, expectedModelWithNoTags);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithPersonAdd() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithTagEdited() throws","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" PersonNotFoundException, DuplicatePersonException {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":88}},{"path":"src/test/java/seedu/address/logic/commands/ThemeCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_CHANGE_SUCCESS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_IN_USE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_NOT_AVAILABLE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommand \u003d new ThemeCommand(\"light\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkThemeCommand \u003d new ThemeCommand(\"Dark\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommand));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommandCopy \u003d new ThemeCommand(\"light\");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommandCopy));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(1));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(null));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" // different theme -\u003e returns false","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(darkThemeCommand));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_correctTheme_success() throws CommandException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"light\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(command, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"light\"));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkCommand \u003d prepareCommand(\"dark\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(darkCommand, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"dark\"));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"notATheme\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_NOT_AVAILABLE, \"notATheme\"));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_themeAlreadyLoaded_failure() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"dark\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_IN_USE, \"dark\"));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightCommand \u003d prepareCommand(\"light\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(lightCommand, model, String.format(MESSAGE_THEME_IN_USE, \"light\"));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses {@code userInput} into a {@code ThemeCommand}.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d new ThemeCommand(userInput);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return command;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Asserts that {@code command} is successfully executed","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void assertCommandSuccess(ThemeCommand command, String expectedMessage) throws CommandException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getTheme());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getUserPrefs().getTheme());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":98}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class UndoCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() throws Exception {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Arrays.asList(deletePersonCommandOne, deletePersonCommandTwo), Collections.emptyList());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.execute();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.execute();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in undoStack","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // single command in undoStack","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" // no command in undoStack","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":11,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/commands/UnlockLockCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class UnlockLockCommandTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private Model model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public void checkLockFunctionality() throws Exception {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Check initial state is unlocked","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Check that lock works","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Check double lock","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Check that unlock works","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // Check double unlock","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":46}},{"path":"src/test/java/seedu/address/logic/commands/ViewAssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToShow \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.viewAssignees(taskToShow);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(viewAssignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommand \u003d new ViewAssignCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewSecondCommand \u003d new ViewAssignCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommand));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommandCopy \u003d new ViewAssignCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommandCopy));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(viewSecondCommand));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code ViewAssignCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d new ViewAssignCommand(index);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" viewAssignCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return viewAssignCommand;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":90}},{"path":"src/test/java/seedu/address/logic/parser/AddPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandParserTest {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // multiple tags - all accepted","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPersonMultipleTags));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // zero tags","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY,","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" // missing name prefix","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" // invalid phone","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" // invalid email","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" // invalid tag","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":28,"Esilocke":22,"-":86}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParserTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // multiple addresses - last address accepted","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + TASK_ADDRESS_DESC_PAPER + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // invalid deadline","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" // invalid priority","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Priority.MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" private static final boolean DEFAULT_STATE_LOCK \u003d false;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" AddCommand command \u003d (AddPersonCommand) parser","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(PersonUtil.getAddCommand(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddPersonCommand(person), command);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(TaskUtil.getAddCommand(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddTaskCommand(task), command);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddPersonCommand) parser.parseCommand(AddPersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(new AddPersonCommand(person), command);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(AddTaskCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(new AddTaskCommand(task), command);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandPrivacyLevel() throws Exception {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 1\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 2\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasPrivacyLevel() throws Exception {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 1\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 2\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandTheme() throws Exception {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" dark\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" light\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasTheme() throws Exception {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" dark\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" light\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandOpen() throws Exception {","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(OpenCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof OpenCommand);","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(OpenCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof OpenCommand);","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandSaveAs() throws Exception {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(SaveAsCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof SaveAsCommand);","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(SaveAsCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof SaveAsCommand);","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + keywords.stream()","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate(keywords,","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" DEFAULT_STATE_LOCK, DEFAULT_STATE_LOCK, false, 0)), command);","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + keywords","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"charlesgoh"},"content":" .stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate(","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" keywords, DEFAULT_STATE_LOCK, false, false, 0)), command);","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAddTag() throws Exception {","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasAddTag() throws Exception {","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDeleteTag() throws Exception {","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDeleteTag() throws Exception {","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandTagList() throws Exception {","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasTagList() throws Exception {","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_ALIAS,","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavourite() throws Exception {","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavourite() throws Exception {","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnfavourite() throws Exception {","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasUnfavourite() throws Exception {","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavouriteList() throws Exception {","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavouriteList() throws Exception {","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_ALIAS,","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandNavigate() throws Exception {","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" command);","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasNavigate() throws Exception {","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_ALIAS + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"jeffreygohkw"},"content":" command);","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandWord() throws Exception {","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandAlias() throws Exception {","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackup() throws Exception {","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeWord() throws Exception {","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeAlias() throws Exception {","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandValid() throws Exception {","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandWordInvalid() throws Exception {","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandAliasInvalid() throws Exception {","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandValid() throws Exception {","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"charlesgoh"},"content":" + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandWordInvalid() throws Exception {","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandAliasInvalid() throws Exception {","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":" public void parseChangePasswordCommand() throws Exception {","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are correct and valid","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are wrong but valid","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that have the wrong order (i.e. fields are in the wrong order)","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \"","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":" // Do the same thing for alias counterparts","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \"","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_STATE_LOCK) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_STATE_LOCK) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":223,"jeffreygohkw":156,"Esilocke":164,"wangyiming1019":201,"-":110}},{"path":"src/test/java/seedu/address/logic/parser/AssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private AssignTaskCommandParser parser \u003d new AssignTaskCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new AssignCommand(indexes, INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + \"aaaaa\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" AssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/ClearCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ClearCommandParser parser \u003d new ClearCommandParser();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidType_failure() throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" some invalid value\",","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void parseValidTypes_success() throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ClearCommand expectedClearAll \u003d new ClearCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_PERSON.getPrefix()) instanceof ClearPersonCommand);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_TASK.getPrefix()) instanceof ClearTaskCommand);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ClearCommand multipleTypesSpecified \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearPersonCommand);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearTaskCommand);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ClearCommand repeatedTypes \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix() + PREFIX_PERSON.getPrefix() + \" \" + PREFIX_TASK.getPrefix() + \" \");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearPersonCommand);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearTaskCommand);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":43}},{"path":"src/test/java/seedu/address/logic/parser/DeletePersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * outside of the DeletePersonCommand code. For example, inputs \"1\" and \"1 abc\" take the","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * same path through the DeletePersonCommand, and therefore we test only one of them.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParserTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeletePersonCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8,"-":25}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\",","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new DeleteTaskCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\",","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/DismissCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private DismissTaskCommandParser parser \u003d new DismissTaskCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new DismissCommand(indexes, INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + \"aaaaa\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" DismissCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/EditPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParserTest {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final String TAG_EMPTY \u003d \" \" + PREFIX_TAG;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private EditCommandParser parser \u003d new EditCommandParser();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no index specified","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" // no field specified","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"1\", EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" // negative index","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" // zero index","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS); // invalid name","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS); // invalid phone","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS); // invalid email","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS); // invalid tag","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" // invalid phone followed by valid email","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC + EMAIL_DESC_AMY, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + PHONE_DESC_BOB + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // while parsing {@code PREFIX_TAG} alone will reset the tags of the {@code Person} being edited,","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" // parsing it together with a valid tag results in error","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + TAG_EMPTY, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_EMPTY + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_EMPTY + TAG_DESC_FRIEND + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" // multiple invalid values, but only the first invalid value is captured","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC + INVALID_EMAIL_DESC + VALID_ADDRESS_AMY + VALID_PHONE_AMY,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void parse_allFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + NAME_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void parse_someFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).build();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" public void parse_oneFieldSpecified_success() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // name","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY).build();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" // phone","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_AMY).build();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // email","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withEmail(VALID_EMAIL_AMY).build();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // address","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withAddress(VALID_ADDRESS_AMY).build();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" // tags","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND)","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" .build();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" public void parse_invalidValueFollowedByValidValue_success() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" // no other valid values specified","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + INVALID_PHONE_DESC + PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).build();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" // other valid values specified","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_BOB + INVALID_PHONE_DESC + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).build();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" public void parse_resetTags_success() {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + TAG_EMPTY;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withTags().build();","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":16,"-":192}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/EditTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TASK_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParserTest {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private EditCommandParser parser \u003d new EditCommandParser();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no index specified","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + VALID_TASK_NAME_PAPER, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no field specified","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\", EditTaskCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" // negative index","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"-5\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // zero index","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"0\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC,","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" TaskName.MESSAGE_NAME_CONSTRAINTS); // invalid name","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC,","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE); // invalid deadline","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_PRIORITY_DESC,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Priority.MESSAGE_PRIORITY_CONSTRAINTS); // invalid priority","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // invalid phone followed by valid email","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC + PRIORITY_DESC_PAPER,","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + DEADLINE_DESC_PAPER + INVALID_DEADLINE_DESC,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // multiple invalid values, but only the first invalid value is captured","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC + INVALID_PRIORITY_DESC","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + VALID_DEADLINE_PAPER + VALID_DESCRIPTION_PAPER, TaskName.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public void parse_allFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER + DESCRIPTION_DESC_PAPER","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" + DEADLINE_DESC_PAPER + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void parse_someFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER).withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void parse_oneFieldSpecified_success() {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" // name","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // phone","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER).build();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // email","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" // address","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" // tags","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValueFollowedByValidValue_success() {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" // no other valid values specified","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + INVALID_DEADLINE_DESC + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" // other valid values specified","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":194}},{"path":"src/test/java/seedu/address/logic/parser/FIndTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class FIndTaskCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private FindCommandParser parser \u003d new FindCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void parse_emptyArg_throwsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsFindCommand() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand expectedFindTaskCommand \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(\"Lucy\", \"Date\")));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"Lucy Date\", expectedFindTaskCommand);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \" \\n Lucy \\n \\t Date \\t\", expectedFindTaskCommand);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParserTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private FindCommandParser parser \u003d new FindCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void parse_emptyArg_throwsParseException() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsFindCommand() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand expectedFindPersonCommand \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(\"Alice\", \"Bob\")));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"Alice Bob\", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \\n Alice \\n \\t Bob \\t\", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8,"-":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \",","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/FontSizeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.ACCEPTED_PARAMETERS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" private FontSizeCommandParser parser \u003d new FontSizeCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void parse_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" // No arguments specified","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" // Wrong arguments specified","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"random input\",","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand expectedCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand actualCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" for (String arg: ACCEPTED_PARAMETERS) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new FontSizeCommand(arg);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" // Check for command word","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" // Check for command alias","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectPersonCommandParserTest}.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectPersonCommandParserTest","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/NavigateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@autho jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParserTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommandParser parser \u003d new NavigateCommandParser();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsPresent_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //From address to address","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fata \u003d new NavigateCommand(new Location(\"NUS\"), new Location(\"Sentosa\"),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" null, null, false, false);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fata);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //From address to person","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatp \u003d new NavigateCommand(new Location(\"NUS\"), null,","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_PERSON, false, false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\", fatp);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //From address to task","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatt \u003d new NavigateCommand(new Location(\"NUS\"), null,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_TASK, false, true);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fatt);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //From person to address","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fpta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, null, false, false);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fpta);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //From person to person","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptp \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON, false, false);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fptp);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" //From person to task","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptt \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_SECOND_TASK, false, true);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\", fptt);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //From task to address","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand ftta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, null, true, false);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", ftta);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" //From task to person","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttp \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_THIRD_PERSON, true, false);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fttp);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //From task to task","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttt \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fttt);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_repeatedFromAndTos_failure() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Froms","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Tos","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\",","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingFromOrTo_failure() {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" //No To","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\",","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" //No From","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"NUS\",","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_failure() {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" //Non positive indices","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"-1\", ParserUtil.MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":139}},{"path":"src/test/java/seedu/address/logic/parser/ParserUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtilTest {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static final boolean PRIVATE_FIELD \u003d true;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String INVALID_NAME \u003d \"R@chel\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"+651234\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String INVALID_ADDRESS \u003d \" \";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final String INVALID_EMAIL \u003d \"example.com\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_REMARK \u003d \" \";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_AVATAR \u003d \" \";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final String INVALID_TAG \u003d \"#friend\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_NAME \u003d \" \";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_DEADLINE \u003d \"The distant, distant past\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_PRIORITY \u003d \"99\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_ADDRESS \u003d \" \";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Rachel Walker\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"123456\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"123 Main Street #0505\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"rachel@example.com\";","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_REMARK \u003d \"Thinks that P\u003dNP\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_AVATAR \u003d \"valid_file.png\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_1 \u003d \"friend\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_2 \u003d \"neighbour\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_NAME \u003d \"Launcher\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DESCRIPTION \u003d \"An arbitrary decision\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DEADLINE \u003d \"2 weeks later\";","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_PRIORITY \u003d \"3\";","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_ADDRESS \u003d \"NUS\";","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public final ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void parseIndex_invalidInput_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(\"10 a\");","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void parseIndex_outOfRangeInput_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(Long.toString(Integer.MAX_VALUE + 1));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void parseIndex_validInput_success() throws Exception {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // No whitespaces","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\"1\"));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // Leading and trailing whitespaces","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\" 1 \"));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void parseName_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" ParserUtil.parseName(null);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseName_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(INVALID_NAME));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public void parseName_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseName(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void parseName_validValue_returnsName() throws Exception {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" Name expectedName \u003d new Name(VALID_NAME);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" Optional\u003cName\u003e actualName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" Name expectedPrivateName \u003d new Name(VALID_NAME, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" Optional\u003cName\u003e actualPrivateName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertEquals(expectedName, actualName.get());","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateName, actualPrivateName.get());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void parsePhone_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(null);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void parsePhone_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(INVALID_PHONE));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parsePhone_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parsePhone(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void parsePhone_validValue_returnsPhone() throws Exception {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" Phone expectedPhone \u003d new Phone(VALID_PHONE);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" Optional\u003cPhone\u003e actualPhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Phone expectedPrivatePhone \u003d new Phone(VALID_PHONE, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPhone\u003e actualPrivatePhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(expectedPhone, actualPhone.get());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivatePhone, actualPrivatePhone.get());","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void parseAddress_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(null);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" public void parseAddress_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(INVALID_ADDRESS));","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" public void parseAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseAddress(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parseAddress_validValue_returnsAddress() throws Exception {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" Address expectedAddress \u003d new Address(VALID_ADDRESS);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" Optional\u003cAddress\u003e actualAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" Address expectedPrivateAddress \u003d new Address(VALID_ADDRESS, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAddress\u003e actualPrivateAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertEquals(expectedAddress, actualAddress.get());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateAddress, actualPrivateAddress.get());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void parseEmail_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(null);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" public void parseEmail_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(INVALID_EMAIL));","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void parseEmail_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseEmail(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void parseEmail_validValue_returnsEmail() throws Exception {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" Email expectedEmail \u003d new Email(VALID_EMAIL);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" Optional\u003cEmail\u003e actualEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" Email expectedPrivateEmail \u003d new Email(VALID_EMAIL, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" Optional\u003cEmail\u003e actualPrivateEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertEquals(expectedEmail, actualEmail.get());","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateEmail, actualPrivateEmail.get());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(null);","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(Optional.of(INVALID_REMARK));","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseRemark(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_validValue_returnsRemark() throws Exception {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" Remark expectedRemark \u003d new Remark(VALID_REMARK);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" Remark expectedPrivateRemark \u003d new Remark(VALID_REMARK, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualPrivateRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedRemark, actualRemark.get());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateRemark, actualPrivateRemark.get());","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(null);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(Optional.of(INVALID_AVATAR));","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseAvatar(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_validValue_returnsAvatar() throws Exception {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" Avatar expectedAvatar \u003d new Avatar(VALID_AVATAR);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAvatar\u003e actualAvatar \u003d ParserUtil.parseAvatar(Optional.of(VALID_AVATAR));","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAvatar, actualAvatar.get());","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void parseTags_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(null);","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithInvalidTags_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, INVALID_TAG));","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" public void parseTags_emptyCollection_returnsEmptySet() throws Exception {","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertTrue(ParserUtil.parseTags(Collections.emptyList()).isEmpty());","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithValidTags_returnsTagSet() throws Exception {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e actualTagSet \u003d ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, VALID_TAG_2));","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e expectedTagSet \u003d new HashSet\u003c\u003e(Arrays.asList(new Tag(VALID_TAG_1), new Tag(VALID_TAG_2)));","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTagSet, actualTagSet);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(null);","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(INVALID_TASK_NAME));","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskName(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_validValue_returnsTaskName() throws Exception {","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" TaskName expectedTaskName \u003d new TaskName(VALID_TASK_NAME);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskName\u003e actualTaskName \u003d ParserUtil.parseTaskName(Optional.of(VALID_TASK_NAME));","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskName, actualTaskName.get());","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(null);","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDescription(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_validValue_returnsDescription() throws Exception {","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Description expectedDescription \u003d new Description(VALID_DESCRIPTION);","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDescription\u003e actualDescription \u003d ParserUtil.parseDescription(Optional.of(VALID_DESCRIPTION));","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDescription, actualDescription.get());","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(null);","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(INVALID_DEADLINE));","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDeadline(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_validValue_returnsDeadline() throws Exception {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" Deadline expectedDeadline \u003d new Deadline(VALID_DEADLINE);","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDeadline\u003e actualDeadline \u003d ParserUtil.parseDeadline(Optional.of(VALID_DEADLINE));","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDeadline, actualDeadline.get());","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(null);","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(INVALID_PRIORITY));","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parsePriority(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_validValue_returnsPriority() throws Exception {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" Priority expectedPriority \u003d new Priority(VALID_PRIORITY);","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPriority\u003e actualPriority \u003d ParserUtil.parsePriority(Optional.of(VALID_PRIORITY));","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPriority, actualPriority.get());","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(null);","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(INVALID_TASK_ADDRESS));","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskAddress(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_validValue_returnsTaskAddress() throws Exception {","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" TaskAddress expectedTaskAddress \u003d new TaskAddress(VALID_TASK_ADDRESS);","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskAddress\u003e actualTaskAddress \u003d ParserUtil.parseTaskAddress(Optional.of(VALID_TASK_ADDRESS));","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskAddress, actualTaskAddress.get());","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(null);","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_invalidValue_throwsParseException() throws Exception {","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(\"1 2 a b c\");","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_validValue_returnsIndexes() throws Exception {","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e expectedIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON,","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\"1 2 3\"));","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\" 1 2 3 \"));","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":260,"-":162}},{"path":"src/test/java/seedu/address/logic/parser/PrivacyLevelCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParserTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommandParser parser \u003d new PrivacyLevelCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new PrivacyLevelCommand(INDEX_FIRST_PERSON.getOneBased()));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"2\", new PrivacyLevelCommand(INDEX_SECOND_PERSON.getOneBased()));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"3\", new PrivacyLevelCommand(INDEX_THIRD_PERSON.getOneBased()));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"???\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/test/java/seedu/address/logic/parser/SelectPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Test scope: similar to {@code DeletePersonCommandParserTest}.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandParserTest","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParserTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new SelectPersonCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":23}},{"path":"src/test/java/seedu/address/logic/parser/SelectTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \" + PREFIX_TASK.getPrefix() + \" 1\",","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new SelectTaskCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \" + PREFIX_TASK.getPrefix() + \" -1\",","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/SetCompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskCompleteCommandParser parser \u003d new SetTaskCompleteCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\",","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetCompleteCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\",","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SetIncompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskIncompleteCommandParser parser \u003d new SetTaskIncompleteCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\",","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetIncompleteCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\",","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_ORDER_PARAMETERS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" // no list specified","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_FIELD_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0),","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // list is person but field is for tasks","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(5)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" // list is task but field is for person","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(1) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0)","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // Incorrect test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\",","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" SortCommand expectedCommand;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" SortCommand actualCommand;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // For person sorts","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" String list \u003d ACCEPTED_LIST_PARAMETERS.get(0);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" String field \u003d ACCEPTED_FIELD_PARAMETERS.get(0);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" String order \u003d ACCEPTED_ORDER_PARAMETERS.get(0);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // For task sorts","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" list \u003d ACCEPTED_LIST_PARAMETERS.get(1);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" field \u003d ACCEPTED_FIELD_PARAMETERS.get(5);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" order \u003d ACCEPTED_ORDER_PARAMETERS.get(1);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":26,"jeffreygohkw":53}},{"path":"src/test/java/seedu/address/logic/parser/ThemeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParserTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommandParser parser \u003d new ThemeCommandParser();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_emptyArg_throwsParseException() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsFindCommand() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand expectedFindPersonCommand \u003d","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" new ThemeCommand(\"light\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"light\", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \" light \", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/ViewAssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommandParser parser \u003d new ViewAssignCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new ViewAssignCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":111,"Esilocke":18,"-":88}},{"path":"src/test/java/seedu/address/model/ModelManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class ModelManagerTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void getFilteredPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" modelManager.getFilteredPersonList().remove(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /*","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of deleteTag is equals to the expected","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to delete.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTagValidIndexesAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"someTag\", \"friends\").build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(\"someTag\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(toDelete, indexes);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" /*","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of addTag is equals to the expected","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to add.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void addTagValidIndexesAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\").build();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(\"newTag\");","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(toAdd, indexes);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\", \"newTag\").build();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\", \"newTag\").build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBookBuilder().withPerson(ALICE).withPerson(BENSON).build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" AddressBook differentAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" ModelManager modelManagerCopy \u003d new ModelManager(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManagerCopy));","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManager));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(null));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(5));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // different addressBook -\u003e returns false","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(differentAddressBook, userPrefs)));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // different filteredList -\u003e returns false","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String[] keywords \u003d ALICE.getName().value.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(keywords)));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(addressBook, userPrefs)));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" // resets modelManager to initial state for upcoming tests","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" // different userPrefs -\u003e returns true","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" UserPrefs differentUserPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" differentUserPrefs.setAddressBookName(\"differentName\");","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(new ModelManager(addressBook, differentUserPrefs)));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":1,"wangyiming1019":82,"-":64}},{"path":"src/test/java/seedu/address/model/UniquePersonListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class UniquePersonListTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" UniquePersonList uniquePersonList \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" uniquePersonList.asObservableList().remove(0);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byName_bothOrders() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e nameComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, nameComparator);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(nameComparator));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byPhone_bothOrders() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e phoneComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, phoneComparator);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(phoneComparator));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byEmail_bothOrders() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e emailComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, emailComparator);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(emailComparator));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byAddress_bothOrders() {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e addressComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, addressComparator);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(addressComparator));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":136,"-":19}},{"path":"src/test/java/seedu/address/model/UniqueTaskListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.UniqueTaskList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalTasks;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class UniqueTaskListTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Rule","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" UniqueTaskList uniquePersonList \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" uniquePersonList.asObservableList().remove(0);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byDeadline_bothOrders() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"asc\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"desc\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byPriority_bothOrders() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return Integer.compare(o1.getPriority().value, o2.getPriority().value);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"asc\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"desc\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.getIsPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":19}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.getIsPrivate());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":38}},{"path":"src/test/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicateTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(secondPredicateKeywordList);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicate));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicateCopy \u003d","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(1));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(null));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(secondPredicate));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameContainsKeywords_returnsTrue() throws IllegalValueException {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // One keyword","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.singletonList(\"Alice\"));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(testee));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" testee.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // Multiple keywords","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Alice\", \"Bob\"));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Carol\").build();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // Only one matching keyword","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Bob\", \"Carol\"));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Carol\").build()));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" testee.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // Mixed-case keywords","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"aLIce\", \"bOB\"));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // Zero keywords","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.emptyList());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" // Non-matching keyword","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Carol\"));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" testee.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice\").withPhone(\"12345\")","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" .withEmail(\"alice@email.com\").withAddress(\"Main Street\").build();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" // Keywords match phone, email and address, but does not match name","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" \"12345\", \"alice@email.com\", \"Main\", \"Street\"));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":113}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.getIsPrivate());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":24}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getIsPrivate());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":23}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" // valid deadlines","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"the day after tomorrow\")); // slashes","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"4-11\"));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":25}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"-1\")); // priority out of range","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskContainsKeywordPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicateTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d new TaskContainsKeywordPredicate(secondPredicateKeywordList);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate thirdPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicate));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicateCopy \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(1));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(null));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different keywords -\u003e returns false","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(secondPredicate));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(thirdPredicate));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void test_nameContainsKeywords_returnsTrue() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // One keyword","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pen\").build()));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // Zero keywords","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.emptyList());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy\").build()));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // Non-matching keyword","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pen\"));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void test_descriptionContainsKeywords_returnsTrue() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // One keyword","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy 3 Pencil\").build()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pen\").build()));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void priorityMatches() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // Priority level equal to required level","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // Priority level greater than required level","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"4\").build()));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // Priority level less than required level","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" // Name matches, priority check not required, even though priority level does not match","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" false, false, false, 3);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Priority matches, but name does not match","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" public void stateMatches() {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" // States are equivalent","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // States are different","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" // Name matches, state check not required, even though state does not match","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // State matches, but name does not match","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" public void combinationTests() {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" // At most 1 invalid input per test case","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" // Matches all","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencil now\")","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" // Name does not match, but description does","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Get something\").withDescription(\"Get 3 Pencil now\")","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" // Description does not match, but name does","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy 3 Pencil\").withDescription(\"Get something\")","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but priority does not","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"2\").withState(true).build()));","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but state does not","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(false).build()));","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":182}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" descriptor.setAvatar(person.getAvatar());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"remark is expected to be unique.\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Avatar} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withAvatar(String avatar) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseAvatar(Optional.of(avatar)).ifPresent(descriptor::setAvatar);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"avatar is expected to be unique.\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" //@author","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * that we are building.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":40,"Esilocke":1,"wangyiming1019":9,"-":88}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskAddress(task.getTaskAddress());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskAddress(String address) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(address)).ifPresent(descriptor::setTaskAddress);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":101}},{"path":"src/test/java/seedu/address/testutil/ModelStub.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * A default model stub that have all of the methods failing.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class ModelStub implements Model {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public void setMainWindow(MainWindow mainWindow) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public void sortTasks(String field, String order) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" return 0;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" return null;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return null;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" return null;","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public void lockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void unlockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called\");","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":17,"jeffreygohkw":37,"Esilocke":153,"wangyiming1019":24,"-":1}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class PersonBuilder {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_AVATAR \u003d \"\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private Person person;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public PersonBuilder() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Avatar defaultAvatar \u003d new Avatar(DEFAULT_AVATAR);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" defaultRemark, defaultAvatar, defaultTags);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withAvatar(String filepath) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.person.setAvatar(new Avatar(filepath));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Avatar is invalid\");","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" public Person build() {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" return this.person;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":34,"wangyiming1019":12,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().getIsPrivate());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().getIsPrivate());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().getIsPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().getIsPrivate());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(person.getRemark().getIsPrivate());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code remarkIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setRemarkPrivate(String remark) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":106}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * A utility class for Person.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonUtil {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand.COMMAND_WORD + \" \" + getPersonDetails(person);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" sb.append(PREFIX_NAME + person.getName().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_AVATAR + person.getAvatar().value + \" \");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach(","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" );","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":1,"Esilocke":2,"-":35}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_ADDRESS \u003d \"12 Kent Ridge Crescent, 119275\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Task task;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" TaskAddress defaultAddress \u003d new TaskAddress(DEFAULT_ADDRESS);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState, defaultAddress);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskAddress(String address) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskAddress(new TaskAddress(address));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Assignees} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withAssignees(String... args) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" for (String s : args) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromOneBased(Integer.parseInt(s)));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" this.task.setAssignees(new Assignees(indexes));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public Task build() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return this.task;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":135}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + Integer.toString(task.getPriority().value) + \" \");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_ADDRESS + task.getTaskAddress().taskAddress + \" \");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_CHRIS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_CHRIS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_ALICE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_CHRIS;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_CHRIS;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_CHRIS;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"public class TypicalPersons {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS).withEmail(VALID_EMAIL_CHRIS)","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" .withAddress(VALID_ADDRESS_CHRIS).withFavourite(VALID_FAVOURITE_ALICE)","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_CHRIS)","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_CHRISTAG).build();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS_WITH_NEW_TAG \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS)","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_CHRIS).withAddress(VALID_ADDRESS_CHRIS)","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_CHRIS)","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" .withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" return ab;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":18,"wangyiming1019":32,"-":64}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").withAssignees(\"4\")","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"21 Heng Mui Keng Terrace, #02-01-01 I-Cube Building\").build();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\").withState(true)","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").withTaskAddress(\"Tampines Mall\").build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).withTaskAddress(\"27 Prince George\u0027s Park\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").withTaskAddress(\"Central Park\").build();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").withTaskAddress(\"16 Gemmill Ln\").build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).withAssignees(\"1\", \"2\", \"3\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"NUS School of Computing, COM1, 13 Computing Drive, 117417\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"Changi Airport\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL)","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String KEYWORD_MATCHING_LUCY \u003d \"Lucy\"; // A keyword that matches LUCY","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_PREFIX;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_SUFFIX;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelNavigateEvent panelNavigateEventStub;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() throws IllegalValueException {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" panelNavigateEventStub \u003d new BrowserPanelNavigateEvent(new Location(\"NUS\"),","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" new Location(BENSON.getAddress().toString()));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // default web page","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelNavigateEventStub);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDirUrl \u003d new URL(GOOGLE_MAPS_DIRECTIONS_PREFIX","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026origin\u003d\"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getFromLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getToLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDirUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":47,"-":31}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultiplier());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // no tags","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":89,"Esilocke":1}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final JumpToListRequestTaskEvent JUMP_TO_SECOND_EVENT \u003d new","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void handleJumpToListRequestTaskEvent() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true}],"authorContributionMap":{"charlesgoh":57,"Esilocke":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"-":80}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPerson.getName().value, actualCard.getName());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTask.getPriority().toString(), actualCard.getPriority());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":1,"Esilocke":1,"-":71}},{"path":"src/test/java/systemtests/AddPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * -\u003e added","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + AddPersonCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void addSecondTest() throws Exception {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void addThirdTest() throws Exception {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public void addFourthTest() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" 1\");","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Executes the {@code AddPersonCommand} that adds {@code toAdd} to the model and verifies that the command box","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * displays an empty string, the result display box displays the success message of executing","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * {@code AddPersonCommand} with the details of {@code toAdd}, and the model related components equal to the","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" * current model added with {@code toAdd}.","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged.","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" * instead.","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(AddPersonCommand.MESSAGE_SUCCESS, toAdd);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * {@code expectedModel}.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":50,"Esilocke":30,"-":192}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * for test verification.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @ClassRule","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initializeStage();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public BrowserPanelHandle getBrowserPanel() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" rememberStates();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * Displays all persons in the address book.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" protected void showAllPersons() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d getModel().getFilteredPersonList().size();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive).","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + keyword);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" \" + index.getOneBased());","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getPersonListPanel().getSelectedCardIndex() \u003d\u003d index.getZeroBased();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * their current state.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" private void rememberStates() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" getBrowserPanel().rememberUrl();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" * of the previously selected person.","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" String selectedCardName \u003d getPersonListPanel().getHandleToSelectedCard().getName();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" URL expectedUrl;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" expectedUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX + selectedCardName.replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" } catch (MalformedURLException mue) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" throw new AssertionError(\"URL expected to be valid.\");","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" //TODO Might need to remove this as the person panel no longer involves google search.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //assertEquals(expectedUrl, getBrowserPanel().getLoadedUrl());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style.","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same.","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertEquals(MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE), getBrowserPanel().getLoadedUrl());","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model.","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":260}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void clear() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void clearTestTwo() throws Exception {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"Esilocke":5,"-":97}},{"path":"src/test/java/systemtests/DeletePersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeletePersonCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getLastIndex;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getMidIndex;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_DELETE_COMMAND_FORMAT \u003d","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void delete() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /* ----------------- Performing delete operation while an unfiltered list is being shown -------------------- */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: delete the first person in the list, command with leading spaces and trailing spaces -\u003e deleted */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + DeletePersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: delete the last person in the list -\u003e deleted */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" Model modelBeforeDeletingLast \u003d getModel();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d getLastIndex(modelBeforeDeletingLast);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /* Case: undo deleting the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: redo deleting the last person in the list -\u003e last person deleted again */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" removePerson(modelBeforeDeletingLast, lastPersonIndex);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: delete the middle person in the list -\u003e deleted */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" Index middlePersonIndex \u003d getMidIndex(getModel());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(middlePersonIndex);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ------------------ Performing delete operation while a filtered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book and person list -\u003e deleted */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" assertCommandSuccess(index);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + invalidIndex;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /* --------------------- Performing delete operation while a person card is selected ------------------------ */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: delete the selected person -\u003e person list panel selects the person before the deleted person */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Index selectedIndex \u003d getLastIndex(expectedModel);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" Index expectedIndex \u003d Index.fromZeroBased(selectedIndex.getZeroBased() - 1);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" selectPerson(selectedIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + selectedIndex.getOneBased();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" deletedPerson \u003d removePerson(expectedModel, selectedIndex);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, expectedIndex);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid delete operation ------------------------------------ */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" 0\";","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" -1\";","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" getModel().getAddressBook().getPersonList().size() + 1);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + outOfBoundsIndex.getOneBased();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" 1 abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertCommandFailure(\"DelETE 1\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Removes the {@code ReadOnlyPerson} at the specified {@code index} in {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * @return the removed person","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" private ReadOnlyPerson removePerson(Model model, Index index) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" ReadOnlyPerson targetPerson \u003d getPerson(model, index);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" model.deletePerson(targetPerson);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new AssertionError(\"targetPerson is retrieved from model.\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return targetPerson;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" * Deletes the person at {@code toDelete} by creating a default {@code DeletePersonCommand} using","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" * {@code toDelete} and performs the same verification as {@code assertCommandSuccess(String, Model, String)}.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Index toDelete) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, toDelete);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertCommandSuccess(","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand.COMMAND_WORD + \" \" + toDelete.getOneBased(),","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card remains unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String)} except that the browser url","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * and selected card are expected to update accordingly depending on the card at {@code expectedSelectedCardIndex}.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":21,"-":180}},{"path":"src/test/java/systemtests/EditPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson(","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public void editThree() throws Exception {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" public void editFourth() throws Exception {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" int invalidIndex;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * browser url changes","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" selectPerson(index);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" //TODO rewrite GUI check for this as select no longer displays google searches","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public void editFive() throws Exception {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" public void editSix() throws Exception {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditPersonCommand}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson), expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":49,"Esilocke":40,"-":233}},{"path":"src/test/java/systemtests/FindPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void find() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER + \" \";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL); // first names of Benson and Daniel are \"Meier\"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" /* Case: repeat previous find command where person list is displaying the persons we are finding","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /* Case: find person where person list is not displaying the person we are finding -\u003e 1 person found */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Carl\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, CARL);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords -\u003e 2 persons found */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Benson Daniel\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords in reversed order -\u003e 2 persons found */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords with 1 repeat -\u003e 2 persons found */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson Daniel\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 matching keywords and 1 non-matching keyword","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson NonMatchingKeyWord\";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo previous find command -\u003e rejected */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo previous find command -\u003e rejected */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: find same persons in address book after deleting 1 of them -\u003e 1 person found */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" executeCommand(DeletePersonCommand.COMMAND_WORD + \" 1\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert !getModel().getAddressBook().getPersonList().contains(BENSON);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is same as name but of different case -\u003e 1 person found */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" MeIeR\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is substring of name -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mei\";","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: find person in address book, name is substring of keyword -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Meiers\";","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: find person not in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mark\";","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /* Case: find phone number of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getPhone().value;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: find address of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getAddress().value;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" /* Case: find email of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getEmail().value;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /* Case: find tags of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cTag\u003e tags \u003d new ArrayList\u003c\u003e(DANIEL.getTags());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + tags.get(0).tagName;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: find while a person is selected -\u003e selected card deselected */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" assert !getPersonListPanel().getHandleToSelectedCard().getName().equals(DANIEL.getName().value);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel\";","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: find person in empty address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" command \u003d \"FiNd Meier\";","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * box displays {@code Messages#MESSAGE_PERSONS_LISTED_OVERVIEW} with the number of people in the filtered list,","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the model related components equal to {@code expectedModel}.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Also verifies that the status bar remains unchanged, and the command box has the default style class, and the","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" * selected card updated accordingly, depending on {@code cardStatus}.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" MESSAGE_PERSONS_LISTED_OVERVIEW, expectedModel.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":1,"Esilocke":22,"-":173}},{"path":"src/test/java/systemtests/SelectPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.SelectPersonCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void select() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /* Case: select the first card in the person list, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * -\u003e selected","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /* Case: select the last card in the person list -\u003e selected */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + personCount.getOneBased();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, personCount);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: undo previous selection -\u003e rejected */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /* Case: redo selecting last card in the list -\u003e rejected */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public void selectSecondTest() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: select the middle card in the person list -\u003e selected */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Index middleIndex \u003d Index.fromOneBased(personCount.getOneBased() / 2);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + middleIndex.getOneBased();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* Case: select the current selected card -\u003e selected */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" public void selectThirdTest() throws Exception {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book and person list -\u003e selected */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Index validIndex \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assert validIndex.getZeroBased() \u003c getModel().getFilteredPersonList().size();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + validIndex.getOneBased();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, validIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + 0,","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + -1,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" abc\",","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void selectFourthTest() throws Exception {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" 1 abc\",","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandFailure(\"SeLeCt 1\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: select from empty address book -\u003e rejected */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * box displays the success message of executing select command with the {@code expectedSelectedCardIndex}","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * of the selected person, and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar remain unchanged. The resulting","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * browser url and selected card will be verified if the current selected card and the card at","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex} are different.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" MESSAGE_SUCCESS, expectedSelectedCardIndex.getOneBased());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" int preExecutionSelectedCardIndex \u003d getPersonListPanel().getSelectedCardIndex();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" if (preExecutionSelectedCardIndex \u003d\u003d expectedSelectedCardIndex.getZeroBased()) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18,"Esilocke":21,"-":125}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":70}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Delta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Delta_master/authorship.json index 80092d24be..19367193b4 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Delta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRange/expected/reposense_testrepo-Delta_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager"},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]"},{"lineNumber":3,"author":{"gitId":"-"},"content":""},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":"https://travis-ci.org/CS2103JAN2018-F14-B1/main[image:https://travis-ci.org/CS2103JAN2018-F14-B1/main.svg?branch\u003dmaster[Build Status]]"},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"https://ci.appveyor.com/project/lithiumlkid/main/branch/master[image:https://ci.appveyor.com/api/projects/status/2itvfqp2b8xnaqqn/branch/master?svg\u003dtrue[Build status]]"},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"https://coveralls.io/github/CS2103JAN2018-F14-B1/main?branch\u003dmaster[image:https://coveralls.io/repos/github/CS2103JAN2018-F14-B1/main/badge.svg?branch\u003dmaster[Coverage Status]]"},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"image:https://circleci.com/gh/CS2103JAN2018-F14-B1/main.svg?style\u003dsvg[\"CircleCI\", link\u003d\"https://circleci.com/gh/CS2103JAN2018-F14-B1/main\"]"},{"lineNumber":8,"author":{"gitId":"-"},"content":"https://gitter.im/se-edu/Lobby[image:https://badges.gitter.im/se-edu/Lobby.svg[Gitter chat]]"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"image::docs/images/MyTeamManagerLogo.png[width\u003d\"100\", align\u003d\"center\"]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]"},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/MyTeamManagerLogo.png[width\u003d\"600\", align\u003d\"center\"]"},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":19,"author":{"gitId":"-"},"content":"image::docs/images/Ui.png[width\u003d\"600\", align\u003d\"center\"]"},{"lineNumber":20,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"ifndef::env-github[]"},{"lineNumber":23,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\", align\u003d\"center\"]"},{"lineNumber":24,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction to MTM"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop based team managing application for football team managers. +"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"It uses a Command Line Interface (CLI)."},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"MTM is equipped with multiple features in helping you efficiently"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"and effectively manage your players, while keeping track of the team\u0027s schedule. +"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"With MTM\u0027s aesthetically pleasing graphical user interface, viewing critical information will be quick and painless."},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"Never lose track of your training schedule again! +"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"Say goodbye to manual tracking of information on excel sheet after excel sheet!"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"\u003d\u003d What MTM Can Do - Key Features"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"* Set up Teams"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"* Add Players to Teams"},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":"* Add Player\u0027s personal details, position, rating, avatar etc."},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"* View, Edit and Delete Players"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"* Sort players by field of choice"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":"Come and take a look at our \u003c\u003cUserGuide#, User Guide\u003e\u003e to get started with MTM now."},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":"* My Team Manager is morphed from https://github.com/se-edu/addressbook-level4[AddressBook-Level4] application, a project created by SE-EDU initiative."},{"lineNumber":58,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by"},{"lineNumber":59,"author":{"gitId":"-"},"content":"_Marco Jakob_."},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Libraries used: https://github.com/TomasMikula/EasyBind[EasyBind], https://github.com/TestFX/TestFX[TextFX], https://bitbucket.org/controlsfx/controlsfx/[ControlsFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/google/guava[Guava], https://github.com/junit-team/junit4[JUnit4]"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]"}],"authorContributionMap":{"lithiumlkid":5,"codeeong":16,"-":41}},{"path":"docs/DeveloperGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - Developer Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3"},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full"},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":12,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":13,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main/tree/master"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"By: `F14-B1`      Since: `Mar 2018`      Licence: `MIT`"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"// tag::overview[]"},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d Overview"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a team managing application for football coaches. MTM is designed to be quick and easy for you to manage a team of players without the need of a mouse."},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"This developer\u0027s guide provides information that will not only show the design principles of the project, but allow you to understand the different implementations, and give you the opportunity to get started with being a contributor or as a reference for experienced developer."},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"This developer\u0027s guide consist of the following sections:"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cSetting up, Setting up\u003e\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign, Design\u003e\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":"* \u003c\u003cImplementation, Implementation\u003e\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":"* \u003c\u003cDocumentation, Documentation\u003e\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":"* \u003c\u003cTesting, Testing\u003e\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* \u003c\u003cDev Ops, Dev Ops\u003e\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":"// end::overview[]"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"The following pointers teach you how to get started with developing on our application. You’ll learn how to prepare yourself with the project on IntelliJ and run it. Then, you’ll update configurations in IntelliJ to easily match the coding standards and you’ll be ready to start coding."},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"But before you start, there are two fundamental prerequisites you should know about MTM:"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":"MTM is written in Java 8 and with the use of an integrated development environment (IDE) such as IntelliJ, it provides you as a developer with a better environment suited for developing MTM to maintain coding standards and provide continuous integration."},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":". You are required to have *JDK `1.8.0_60`* or later,"},{"lineNumber":46,"author":{"gitId":"-"},"content":"+"},{"lineNumber":47,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":48,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":49,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8. +"},{"lineNumber":50,"author":{"gitId":"-"},"content":"You can download Java 8 from link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151[here]."},{"lineNumber":51,"author":{"gitId":"-"},"content":"+"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":". and *IntelliJ* IDE."},{"lineNumber":54,"author":{"gitId":"-"},"content":"+"},{"lineNumber":55,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":56,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +"},{"lineNumber":57,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them. +"},{"lineNumber":58,"author":{"gitId":"-"},"content":"You can download IntelliJ from link:https://www.jetbrains.com/idea/download/#section\u003dwindows[here]."},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up the project on your computer"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":"Before you begin setting up the project, please ensure that you’ve done the following on our GitHub repository (repo)."},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":"Upon completion of forking from our GitHub repo, you can proceed to set up your project on IntelliJ."},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)"},{"lineNumber":70,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle"},{"lineNumber":71,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`"},{"lineNumber":72,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK"},{"lineNumber":73,"author":{"gitId":"-"},"content":". Click `Import Project`"},{"lineNumber":74,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`"},{"lineNumber":75,"author":{"gitId":"-"},"content":". Click `Open as Project`"},{"lineNumber":76,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings"},{"lineNumber":77,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message which will generate all resources required by the application and tests."},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":"Now that you’ve properly setup your project, you can verify that you have done everything properly."},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands"},{"lineNumber":84,"author":{"gitId":"-"},"content":". \u003c\u003cTesting,Run the tests\u003e\u003e to ensure they all pass."},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":"You have verified the setup and you’re all ready to dive into the code, but before you do, check out the following configurations that will help you make your coding more integrated and accurate."},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.adoc[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)"},{"lineNumber":95,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`"},{"lineNumber":96,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements"},{"lineNumber":99,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code."},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `se-edu/addressbook-level4` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `se-edu/addressbook-level4`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork."},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up."},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":"After setting up Travis, you can optionally set up coverage reporting for your team fork (see \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e)."},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":114,"author":{"gitId":"-"},"content":"Coverage reporting could be useful for a team repository that hosts the final version but it is not that useful for your personal fork."},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e)."},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":119,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Getting started with coding"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":"When you are ready to start coding,"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading \u003c\u003cDesign-Architecture\u003e\u003e."},{"lineNumber":126,"author":{"gitId":"-"},"content":"2. Dive right in and get started with programming."},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"\u003d\u003d Design"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"After you have successfully configured MTM, you are encouraged to read through the following section to understand the design of the software. The design section covers a high level overview the architecture and components of the software, as well as how common classes, configuration and logging throughout development are being used."},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":"[[Design-Architecture]]"},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Software Architecture"},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"The *_Architecture Diagram_* given below (Figure 1) explains the high-level design of the App."},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":".Architecture Diagram"},{"lineNumber":138,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"Given below is a quick overview of each component."},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":143,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`."},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,"},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other."},{"lineNumber":148,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary."},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":"\u003c\u003cDesign-Commons,*`Commons`*\u003e\u003e represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level."},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)"},{"lineNumber":153,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file."},{"lineNumber":154,"author":{"gitId":"-"},"content":""},{"lineNumber":155,"author":{"gitId":"-"},"content":"The rest of the App consists of four components."},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Ui,*`UI`*\u003e\u003e: The UI of the App."},{"lineNumber":158,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Logic,*`Logic`*\u003e\u003e: The command executor."},{"lineNumber":159,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Model,*`Model`*\u003e\u003e: Holds the data of the App in-memory."},{"lineNumber":160,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Storage,*`Storage`*\u003e\u003e: Reads data from, and writes data to, the hard disk."},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":"Each of the four components"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component."},{"lineNumber":165,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class."},{"lineNumber":166,"author":{"gitId":"-"},"content":""},{"lineNumber":167,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class."},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":".Class Diagram of the Logic Component"},{"lineNumber":170,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":173,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`."},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 1)"},{"lineNumber":178,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":181,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk."},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time."},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 2)"},{"lineNumber":186,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":189,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components."},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":"The sections below give more details of each component."},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":"[[Design-Ui]]"},{"lineNumber":194,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":"The UI Component contains a MainWindow that consists of various parts e.g. CommandBox, ResultDisplayer, TeamDetails, PersonListPanel, PlayerDetails etc. The UI classes are all child classes of the abstract UiPart class."},{"lineNumber":197,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":198,"author":{"gitId":"lithiumlkid"},"content":"The structure of the UI component is shown in the figure below:"},{"lineNumber":199,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":".Structure of the UI Component"},{"lineNumber":201,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `PlayerDetails` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class."},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `UI` component,"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component."},{"lineNumber":212,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change."},{"lineNumber":213,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly."},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":"[[Design-Logic]]"},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"lithiumlkid"},"content":"The Logic Component handles how each command would be parsed and executed. The class diagrams below illustrates the structure of the Logic Component and the structure of each individual commands."},{"lineNumber":219,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":"[[fig-LogicClassDiagram]]"},{"lineNumber":221,"author":{"gitId":"-"},"content":".Structure of the Logic Component"},{"lineNumber":222,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":".Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in \u003c\u003cfig-LogicClassDiagram\u003e\u003e"},{"lineNumber":225,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":226,"author":{"gitId":"-"},"content":""},{"lineNumber":227,"author":{"gitId":"-"},"content":"*API* :"},{"lineNumber":228,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command."},{"lineNumber":231,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`."},{"lineNumber":232,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events."},{"lineNumber":233,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`."},{"lineNumber":234,"author":{"gitId":"-"},"content":""},{"lineNumber":235,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call."},{"lineNumber":236,"author":{"gitId":"-"},"content":""},{"lineNumber":237,"author":{"gitId":"-"},"content":".Interactions Inside the Logic Component for the `delete 1` Command"},{"lineNumber":238,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":"[[Design-Model]]"},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component"},{"lineNumber":242,"author":{"gitId":"-"},"content":""},{"lineNumber":243,"author":{"gitId":"lithiumlkid"},"content":"The Model Component handles the players and teams data structures in My Team Manager. These structures also provide APIs to create, read, update and delete the details of these objects. The class diagram below shows the structure of the Model Component."},{"lineNumber":244,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":245,"author":{"gitId":"-"},"content":".Structure of the Model Component"},{"lineNumber":246,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"-"},"content":"The `Model`,"},{"lineNumber":251,"author":{"gitId":"-"},"content":""},{"lineNumber":252,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences."},{"lineNumber":253,"author":{"gitId":"-"},"content":"* stores the Address Book data."},{"lineNumber":254,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change."},{"lineNumber":255,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components."},{"lineNumber":256,"author":{"gitId":"-"},"content":""},{"lineNumber":257,"author":{"gitId":"-"},"content":"[[Design-Storage]]"},{"lineNumber":258,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"lithiumlkid"},"content":"Any changes made to the data is retained and handled by the Storage Component. The structure of this component is shown in Figure 10 below."},{"lineNumber":261,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":".Structure of the Storage Component"},{"lineNumber":263,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]"},{"lineNumber":266,"author":{"gitId":"-"},"content":""},{"lineNumber":267,"author":{"gitId":"-"},"content":"The `Storage` component,"},{"lineNumber":268,"author":{"gitId":"-"},"content":""},{"lineNumber":269,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back."},{"lineNumber":270,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back."},{"lineNumber":271,"author":{"gitId":"-"},"content":""},{"lineNumber":272,"author":{"gitId":"-"},"content":"[[Design-Commons]]"},{"lineNumber":273,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"lithiumlkid"},"content":"All classes used by the different components can be found in the `seedu.addressbook.commons` package."},{"lineNumber":276,"author":{"gitId":"-"},"content":""},{"lineNumber":277,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration"},{"lineNumber":278,"author":{"gitId":"-"},"content":""},{"lineNumber":279,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`)."},{"lineNumber":280,"author":{"gitId":"-"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":"// tag::logging[]"},{"lineNumber":282,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging"},{"lineNumber":283,"author":{"gitId":"-"},"content":""},{"lineNumber":284,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations."},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"lithiumlkid"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See \u003c\u003cConfiguration,Configuration\u003e\u003e)"},{"lineNumber":287,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level"},{"lineNumber":288,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file."},{"lineNumber":289,"author":{"gitId":"-"},"content":""},{"lineNumber":290,"author":{"gitId":"-"},"content":"*Logging Levels*"},{"lineNumber":291,"author":{"gitId":"-"},"content":""},{"lineNumber":292,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application"},{"lineNumber":293,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution"},{"lineNumber":294,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App"},{"lineNumber":295,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size"},{"lineNumber":296,"author":{"gitId":"-"},"content":""},{"lineNumber":297,"author":{"gitId":"-"},"content":"[[Implementation-Configuration]]"},{"lineNumber":298,"author":{"gitId":"-"},"content":"// end::logging[]"},{"lineNumber":299,"author":{"gitId":"-"},"content":""},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented."},{"lineNumber":303,"author":{"gitId":"-"},"content":""},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Pre-existing"},{"lineNumber":305,"author":{"gitId":"-"},"content":""},{"lineNumber":306,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":307,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undo/Redo feature"},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`."},{"lineNumber":311,"author":{"gitId":"-"},"content":""},{"lineNumber":312,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:"},{"lineNumber":313,"author":{"gitId":"-"},"content":""},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":".Logic Class Diagram"},{"lineNumber":315,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern]."},{"lineNumber":318,"author":{"gitId":"-"},"content":""},{"lineNumber":319,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:"},{"lineNumber":320,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":321,"author":{"gitId":"-"},"content":"----"},{"lineNumber":322,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":323,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":324,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":325,"author":{"gitId":"-"},"content":" // ... list logic ..."},{"lineNumber":326,"author":{"gitId":"-"},"content":" }"},{"lineNumber":327,"author":{"gitId":"-"},"content":"}"},{"lineNumber":328,"author":{"gitId":"-"},"content":"----"},{"lineNumber":329,"author":{"gitId":"-"},"content":""},{"lineNumber":330,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:"},{"lineNumber":331,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":332,"author":{"gitId":"-"},"content":"----"},{"lineNumber":333,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {"},{"lineNumber":334,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":335,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":336,"author":{"gitId":"-"},"content":" // ... undo logic ..."},{"lineNumber":337,"author":{"gitId":"-"},"content":""},{"lineNumber":338,"author":{"gitId":"-"},"content":" executeUndoableCommand();"},{"lineNumber":339,"author":{"gitId":"-"},"content":" }"},{"lineNumber":340,"author":{"gitId":"-"},"content":"}"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":344,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":345,"author":{"gitId":"-"},"content":" // ... delete logic ..."},{"lineNumber":346,"author":{"gitId":"-"},"content":" }"},{"lineNumber":347,"author":{"gitId":"-"},"content":"}"},{"lineNumber":348,"author":{"gitId":"-"},"content":"----"},{"lineNumber":349,"author":{"gitId":"-"},"content":""},{"lineNumber":350,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning."},{"lineNumber":351,"author":{"gitId":"-"},"content":""},{"lineNumber":352,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command)."},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 1)"},{"lineNumber":355,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":356,"author":{"gitId":"-"},"content":""},{"lineNumber":357,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person."},{"lineNumber":358,"author":{"gitId":"-"},"content":""},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 1)"},{"lineNumber":360,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":361,"author":{"gitId":"-"},"content":""},{"lineNumber":362,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":363,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all."},{"lineNumber":364,"author":{"gitId":"-"},"content":""},{"lineNumber":365,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`."},{"lineNumber":366,"author":{"gitId":"-"},"content":""},{"lineNumber":367,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed."},{"lineNumber":368,"author":{"gitId":"-"},"content":""},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 2)"},{"lineNumber":370,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":371,"author":{"gitId":"-"},"content":""},{"lineNumber":372,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":373,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`."},{"lineNumber":374,"author":{"gitId":"-"},"content":""},{"lineNumber":375,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:"},{"lineNumber":376,"author":{"gitId":"-"},"content":""},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Sequence Diagram"},{"lineNumber":378,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":379,"author":{"gitId":"-"},"content":""},{"lineNumber":380,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed)."},{"lineNumber":381,"author":{"gitId":"-"},"content":""},{"lineNumber":382,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":383,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`."},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow)."},{"lineNumber":386,"author":{"gitId":"-"},"content":""},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 2)"},{"lineNumber":388,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":389,"author":{"gitId":"-"},"content":""},{"lineNumber":390,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:"},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 3)"},{"lineNumber":393,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":394,"author":{"gitId":"-"},"content":""},{"lineNumber":395,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:"},{"lineNumber":396,"author":{"gitId":"-"},"content":""},{"lineNumber":397,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Activity Diagram"},{"lineNumber":398,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"650\"]"},{"lineNumber":399,"author":{"gitId":"-"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":401,"author":{"gitId":"-"},"content":""},{"lineNumber":402,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `UndoableCommand`"},{"lineNumber":403,"author":{"gitId":"-"},"content":""},{"lineNumber":404,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()`."},{"lineNumber":405,"author":{"gitId":"-"},"content":"** Pros: We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist."},{"lineNumber":406,"author":{"gitId":"-"},"content":"** Cons: Hard for new developers to understand the template pattern."},{"lineNumber":407,"author":{"gitId":"-"},"content":"* **Alternative 2:** Just override `execute()`."},{"lineNumber":408,"author":{"gitId":"-"},"content":"** Pros: Does not involve the template pattern, easier for new developers to understand."},{"lineNumber":409,"author":{"gitId":"-"},"content":"** Cons: Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo."},{"lineNumber":410,"author":{"gitId":"-"},"content":""},{"lineNumber":411,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How undo \u0026 redo executes"},{"lineNumber":412,"author":{"gitId":"-"},"content":""},{"lineNumber":413,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Saves the entire address book."},{"lineNumber":414,"author":{"gitId":"-"},"content":"** Pros: Easy to implement."},{"lineNumber":415,"author":{"gitId":"-"},"content":"** Cons: May have performance issues in terms of memory usage."},{"lineNumber":416,"author":{"gitId":"-"},"content":"* **Alternative 2:** Individual command knows how to undo/redo by itself."},{"lineNumber":417,"author":{"gitId":"-"},"content":"** Pros: Will use less memory (e.g. for `delete`, just save the person being deleted)."},{"lineNumber":418,"author":{"gitId":"-"},"content":"** Cons: We must ensure that the implementation of each individual command are correct."},{"lineNumber":419,"author":{"gitId":"-"},"content":""},{"lineNumber":420,"author":{"gitId":"-"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Type of commands that can be undone/redone"},{"lineNumber":422,"author":{"gitId":"-"},"content":""},{"lineNumber":423,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`)."},{"lineNumber":424,"author":{"gitId":"-"},"content":"** Pros: We only revert changes that are hard to change back (the view can easily be re-modified as no data are * lost)."},{"lineNumber":425,"author":{"gitId":"-"},"content":"** Cons: User might think that undo also applies when the list is modified (undoing filtering for example), * only to realize that it does not do that, after executing `undo`."},{"lineNumber":426,"author":{"gitId":"-"},"content":"* **Alternative 2:** Include all commands."},{"lineNumber":427,"author":{"gitId":"-"},"content":"** Pros: Might be more intuitive for the user."},{"lineNumber":428,"author":{"gitId":"-"},"content":"** Cons: User have no way of skipping such commands if he or she just want to reset the state of the address * book and not the view."},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Additional Info:** See our discussion https://github.com/se-edu/addressbook-level4/issues/390#issuecomment-298936672[here]."},{"lineNumber":430,"author":{"gitId":"-"},"content":""},{"lineNumber":431,"author":{"gitId":"-"},"content":""},{"lineNumber":432,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Aspect: Data structure to support the undo/redo commands"},{"lineNumber":433,"author":{"gitId":"-"},"content":""},{"lineNumber":434,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Use separate stack for undo and redo."},{"lineNumber":435,"author":{"gitId":"-"},"content":"** Pros: Easy to understand for new Computer Science student undergraduates to understand, who are likely to be * the new incoming developers of our project."},{"lineNumber":436,"author":{"gitId":"-"},"content":"** Cons: Logic is duplicated twice. For example, when a new command is executed, we must remember to update * both `HistoryManager` and `UndoRedoStack`."},{"lineNumber":437,"author":{"gitId":"-"},"content":"* **Alternative 2:** Use `HistoryManager` for undo/redo."},{"lineNumber":438,"author":{"gitId":"-"},"content":"** Pros: We do not need to maintain a separate stack, and just reuse what is already in the codebase."},{"lineNumber":439,"author":{"gitId":"-"},"content":"** Cons: Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two * different things."},{"lineNumber":440,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Player-Related Enhancements"},{"lineNumber":443,"author":{"gitId":"-"},"content":""},{"lineNumber":444,"author":{"gitId":"lithiumlkid"},"content":"// tag::player[]"},{"lineNumber":445,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Player Component `[since v1.3]`"},{"lineNumber":446,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":447,"author":{"gitId":"lithiumlkid"},"content":"`Player` is one of the core components of MTM. To implement it, we used the same `Person` object and added additional attributes to it. Shown below is the"},{"lineNumber":448,"author":{"gitId":"lithiumlkid"},"content":"new constructor for the Person object followed by the class diagram."},{"lineNumber":449,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":450,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":451,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":452,"author":{"gitId":"lithiumlkid"},"content":"public Person(Name name, Phone phone, Email email, Address address, Remark remark, TeamName teamName,"},{"lineNumber":453,"author":{"gitId":"lithiumlkid"},"content":" Set\u003cTag\u003e tags, Rating rating, Position position, JerseyNumber jerseyNumber, Avatar avatar) {"},{"lineNumber":454,"author":{"gitId":"lithiumlkid"},"content":" ..."},{"lineNumber":455,"author":{"gitId":"lithiumlkid"},"content":" this.remark \u003d remark;"},{"lineNumber":456,"author":{"gitId":"lithiumlkid"},"content":" this.teamName \u003d teamName;"},{"lineNumber":457,"author":{"gitId":"lithiumlkid"},"content":" this.rating \u003d rating;"},{"lineNumber":458,"author":{"gitId":"lithiumlkid"},"content":" this.position \u003d position;"},{"lineNumber":459,"author":{"gitId":"lithiumlkid"},"content":" this.jerseyNumber \u003d jerseyNumber;"},{"lineNumber":460,"author":{"gitId":"lithiumlkid"},"content":" this.avatar \u003d avatar;"},{"lineNumber":461,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":462,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":463,"author":{"gitId":"lithiumlkid"},"content":".Person Class Diagram"},{"lineNumber":464,"author":{"gitId":"lithiumlkid"},"content":"image::PlayerClassDiagram.png[width\u003d\"300\"]"},{"lineNumber":465,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":466,"author":{"gitId":"lithiumlkid"},"content":"The additional attributes are: \u003c\u003cteam,teamName\u003e\u003e, \u003c\u003cremark,Remark\u003e\u003e, \u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e."},{"lineNumber":467,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":468,"author":{"gitId":"lithiumlkid"},"content":"The add and edit command has also been updated to include \u003c\u003cteam,teamName\u003e\u003e,\u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e."},{"lineNumber":469,"author":{"gitId":"lithiumlkid"},"content":"One thing to note is that in `executeUndoableCommand()`"},{"lineNumber":470,"author":{"gitId":"lithiumlkid"},"content":"in both add and edit commands now does two additional things, setting the file path for players avatar, and assigning a player to a team"},{"lineNumber":471,"author":{"gitId":"lithiumlkid"},"content":"and adding person to current filtered list. Shown below is the code snippet of the new `executeUndoableCommand()` and sequence diagram"},{"lineNumber":472,"author":{"gitId":"lithiumlkid"},"content":"of the new add command as an example."},{"lineNumber":473,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":474,"author":{"gitId":"lithiumlkid"},"content":"[[AddSequence]]"},{"lineNumber":475,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":476,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":477,"author":{"gitId":"lithiumlkid"},"content":" @Override"},{"lineNumber":478,"author":{"gitId":"lithiumlkid"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":479,"author":{"gitId":"lithiumlkid"},"content":" requireNonNull(model);"},{"lineNumber":480,"author":{"gitId":"lithiumlkid"},"content":" try {"},{"lineNumber":481,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":482,"author":{"gitId":"lithiumlkid"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);"},{"lineNumber":483,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":484,"author":{"gitId":"lithiumlkid"},"content":" model.addPerson(toAdd);"},{"lineNumber":485,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":486,"author":{"gitId":"lithiumlkid"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());"},{"lineNumber":487,"author":{"gitId":"lithiumlkid"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());"},{"lineNumber":488,"author":{"gitId":"lithiumlkid"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));"},{"lineNumber":489,"author":{"gitId":"lithiumlkid"},"content":" } else { ..."},{"lineNumber":490,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":491,"author":{"gitId":"lithiumlkid"},"content":".Add Sequence Diagram"},{"lineNumber":492,"author":{"gitId":"lithiumlkid"},"content":"image::AddSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":493,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":494,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":495,"author":{"gitId":"lithiumlkid"},"content":"[[rating]]"},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Rating Class"},{"lineNumber":497,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":498,"author":{"gitId":"lithiumlkid"},"content":"The `Rating` class contains a `String value`. `value` holds the players rating, an integer from 0 to 5. It uses a validation regex `[0-5]`"},{"lineNumber":499,"author":{"gitId":"lithiumlkid"},"content":"to ensure valid input."},{"lineNumber":500,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":501,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Rating` is `ra/`"},{"lineNumber":502,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":503,"author":{"gitId":"lithiumlkid"},"content":"[[position]]"},{"lineNumber":504,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Position Class"},{"lineNumber":505,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":506,"author":{"gitId":"lithiumlkid"},"content":"The`Position` class contains a `String value`. `value` here holds the players position, an integer from 1 to 4. It uses a validation regex `[1-4]` to ensure valid input."},{"lineNumber":507,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":508,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `po/`."},{"lineNumber":509,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":510,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":511,"author":{"gitId":"lithiumlkid"},"content":"A static hashmap is used to store and retrieve the corresponding position names of the position values. The position name can be called using the method `getPositionName()` which returns `myMap.get(value)`."},{"lineNumber":512,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for the `hashmap` and `getPositionName()` is shown below."},{"lineNumber":513,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":514,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":515,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":516,"author":{"gitId":"lithiumlkid"},"content":"private static final Map\u003cString, String\u003e myMap;"},{"lineNumber":517,"author":{"gitId":"lithiumlkid"},"content":"static {"},{"lineNumber":518,"author":{"gitId":"lithiumlkid"},"content":" Map\u003cString, String\u003e aMap \u003d new HashMap\u003c\u003e();"},{"lineNumber":519,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"1\", \"Striker\");"},{"lineNumber":520,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"2\", \"Midfielder\");"},{"lineNumber":521,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"3\", \"Defender\");"},{"lineNumber":522,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"4\", \"Goalkeeper\");"},{"lineNumber":523,"author":{"gitId":"lithiumlkid"},"content":" myMap \u003d Collections.unmodifiableMap(aMap);"},{"lineNumber":524,"author":{"gitId":"lithiumlkid"},"content":"}"},{"lineNumber":525,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":526,"author":{"gitId":"lithiumlkid"},"content":"public String getPositionName() {"},{"lineNumber":527,"author":{"gitId":"lithiumlkid"},"content":" return myMap.get(value);"},{"lineNumber":528,"author":{"gitId":"lithiumlkid"},"content":"}"},{"lineNumber":529,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":530,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":531,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":532,"author":{"gitId":"lithiumlkid"},"content":"[[jersey]]"},{"lineNumber":533,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d JerseyNumber Class"},{"lineNumber":534,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":535,"author":{"gitId":"lithiumlkid"},"content":"The`JerseyNumber` class contains a `String value`. `value` here holds the players jersey number, an integer from 0 to 99. It uses a validation regex `[0-9]|[1-8][0-9]|9[0-9]` to ensure valid input."},{"lineNumber":536,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":537,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `j/`."},{"lineNumber":538,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":539,"author":{"gitId":"lithiumlkid"},"content":"[[avatar]]"},{"lineNumber":540,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Avatar Class"},{"lineNumber":541,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":542,"author":{"gitId":"lithiumlkid"},"content":"The`Avatar` class contains a `String value`. `value` here holds the absolute filepath to the players avatar image file, a png of jpeg file. It uses a validation regex `([^\\s]+(\\.(?i)(jpg|png))$)` to ensure valid input."},{"lineNumber":543,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":544,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Avatar` is `av/`."},{"lineNumber":545,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":546,"author":{"gitId":"lithiumlkid"},"content":"When the class is created, the `value` stores the original location of the players avatar image file eg. `C:\\image.png` or if not specified, stores \"\u003cUNSPECIFIED\u003e\"."},{"lineNumber":547,"author":{"gitId":"lithiumlkid"},"content":"Thereafter, if the avatar is specified when \u003c\u003cAddSequence,adding\u003e\u003e or editing a player, `setFilePath()` is called which will attempt to copy the image file to a `/image` folder that is in the same directory as the `MTM.jar` file."},{"lineNumber":548,"author":{"gitId":"lithiumlkid"},"content":"`value` is then updated to the new file path."},{"lineNumber":549,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":550,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for setFilePath() is shown below."},{"lineNumber":551,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":552,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":553,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":554,"author":{"gitId":"lithiumlkid"},"content":"public void setFilePath(String player) throws IOException {"},{"lineNumber":555,"author":{"gitId":"lithiumlkid"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {"},{"lineNumber":556,"author":{"gitId":"lithiumlkid"},"content":" return;"},{"lineNumber":557,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":558,"author":{"gitId":"lithiumlkid"},"content":" final File file \u003d new File(value);"},{"lineNumber":559,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":560,"author":{"gitId":"lithiumlkid"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();"},{"lineNumber":561,"author":{"gitId":"lithiumlkid"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any"},{"lineNumber":562,"author":{"gitId":"lithiumlkid"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);"},{"lineNumber":563,"author":{"gitId":"lithiumlkid"},"content":" this.value \u003d dest.toString();"},{"lineNumber":564,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":565,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":566,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":567,"author":{"gitId":"lithiumlkid"},"content":"// end::player[]"},{"lineNumber":568,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":569,"author":{"gitId":"-"},"content":"// tag::remark[]"},{"lineNumber":570,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Remark a Player `[since v1.1]`"},{"lineNumber":571,"author":{"gitId":"-"},"content":""},{"lineNumber":572,"author":{"gitId":"-"},"content":"Leaving a remark would be ideal for the user to note down any important detail of a player that is useful in the future."},{"lineNumber":573,"author":{"gitId":"-"},"content":"Remarks given can be in any format and therefore would not look good if it was done using tags instead, as tags are used with minimal words."},{"lineNumber":574,"author":{"gitId":"-"},"content":""},{"lineNumber":575,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":576,"author":{"gitId":"-"},"content":"The remark mechanism is facilitated by `RemarkCommand` and it inherits from `UndoableCommand`, making it undoable. The mechanism allows user to perform the adding, editing, and deleting of a single remark to a specified `Person` via the `INDEX` from the list shown in the `UI`. The field `remark` is similar to the other fields of `Person`, hence some of its logic in `AddCommand.java` and `EditCommand.java` are updated."},{"lineNumber":577,"author":{"gitId":"-"},"content":""},{"lineNumber":578,"author":{"gitId":"-"},"content":"The mechanism uses the command `remark` and a `r/` prefix to add, edit, and delete a single remark of a `Person`. When the user leaves the remark as empty after the `r/` prefix, it is an indication to delete the remark, and when it is valid, it either create a new remark for that `Person` or overwrites the current existing remark. Only one `remark` is saved at a time. If the user `remark` on the same person, it will be overwritten."},{"lineNumber":579,"author":{"gitId":"-"},"content":""},{"lineNumber":580,"author":{"gitId":"-"},"content":"The field `remark` is found in `Person`, and it is not modified via `add` or `edit` commands. All functions related to `remark` is done strictly via the `remark` command."},{"lineNumber":581,"author":{"gitId":"-"},"content":""},{"lineNumber":582,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remark` command:"},{"lineNumber":583,"author":{"gitId":"-"},"content":""},{"lineNumber":584,"author":{"gitId":"-"},"content":".Remark Activity Diagram"},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::RemarkActivityDiagram.png[width\u003d\"100%\"]"},{"lineNumber":586,"author":{"gitId":"-"},"content":""},{"lineNumber":587,"author":{"gitId":"-"},"content":"The `remark` field is not required when adding or editing a `Person`, and it will be initialized to an empty string or retrieved to fit the implementation of the other fields."},{"lineNumber":588,"author":{"gitId":"-"},"content":""},{"lineNumber":589,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows how remark is initialized as empty."},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":592,"author":{"gitId":"-"},"content":"----"},{"lineNumber":593,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":594,"author":{"gitId":"-"},"content":" //...AddCommandParser code..."},{"lineNumber":595,"author":{"gitId":"-"},"content":" Remark remark \u003d new Remark(\"\");"},{"lineNumber":596,"author":{"gitId":"-"},"content":""},{"lineNumber":597,"author":{"gitId":"-"},"content":" Person person \u003d new Person(name, phone, email, address, remark, teamName, tagList, rating,"},{"lineNumber":598,"author":{"gitId":"-"},"content":" position, jerseyNumber, avatar);"},{"lineNumber":599,"author":{"gitId":"-"},"content":" //...AddCommandParser code..."},{"lineNumber":600,"author":{"gitId":"lithiumlkid"},"content":"}"},{"lineNumber":601,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":602,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":603,"author":{"gitId":"-"},"content":"Code snippet from `EditCommand.java` that shows how remark is being retrieved."},{"lineNumber":604,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":605,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":606,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":607,"author":{"gitId":"-"},"content":"private static Person createEditedPerson(Person personToEdit,"},{"lineNumber":608,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":609,"author":{"gitId":"-"},"content":" //...EditCommand code..."},{"lineNumber":610,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate()) ? personToEdit.getRemark()"},{"lineNumber":611,"author":{"gitId":"-"},"content":" : personToEdit.getRemark();"},{"lineNumber":612,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":613,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":614,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber,"},{"lineNumber":615,"author":{"gitId":"-"},"content":" updatedAvatar);"},{"lineNumber":616,"author":{"gitId":"-"},"content":"}"},{"lineNumber":617,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":618,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":619,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` field"},{"lineNumber":621,"author":{"gitId":"-"},"content":""},{"lineNumber":622,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Creates an additional `remark` field in `Person`."},{"lineNumber":623,"author":{"gitId":"-"},"content":"** Pros: Follows the existing style of similar fields, making implementation easier."},{"lineNumber":624,"author":{"gitId":"-"},"content":"** Cons: Could only have 1 remark per person, unless `remark` mechanism follows the `tag` mechanism to have multiple remarks."},{"lineNumber":625,"author":{"gitId":"-"},"content":"* **Alternative 2:** Have a list of remarks that associates with the specified `Person`."},{"lineNumber":626,"author":{"gitId":"-"},"content":"** Pros: Can have multiple remarks associating with a specific `Person`."},{"lineNumber":627,"author":{"gitId":"-"},"content":"** Cons: Harder to maintain, more complicated."},{"lineNumber":628,"author":{"gitId":"-"},"content":""},{"lineNumber":629,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` command"},{"lineNumber":630,"author":{"gitId":"-"},"content":""},{"lineNumber":631,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Create a specific command for remarking `Person`."},{"lineNumber":632,"author":{"gitId":"-"},"content":"** Pros: Optional for user to enter remark during add, and have an isolated command to give remarks to a player that works as an add and edit command for remark."},{"lineNumber":633,"author":{"gitId":"-"},"content":"** Cons: Increases the number of commands available for the user, and could mistaken that remark can be done using add/edit command."},{"lineNumber":634,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make it similar to how other fields are implemented in `Person`."},{"lineNumber":635,"author":{"gitId":"-"},"content":"** Pros: Quick and easy implementation as it uses the same format as other fields, and can be added and modified through `add` and `edit` commands."},{"lineNumber":636,"author":{"gitId":"-"},"content":"** Cons: An additional field that can be input when adding a player, making the process longer to execute the command."},{"lineNumber":637,"author":{"gitId":"-"},"content":"// end::remark[]"},{"lineNumber":638,"author":{"gitId":"-"},"content":""},{"lineNumber":639,"author":{"gitId":"-"},"content":"// tag::privatefield[]"},{"lineNumber":640,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Setting various player fields to private `[since v1.4]`"},{"lineNumber":641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":642,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":643,"author":{"gitId":"lohtianwei"},"content":"`Phone`, `Email`, `Remark`, `Rating` and `Address` of a player has an additional boolean attribute"},{"lineNumber":644,"author":{"gitId":"lohtianwei"},"content":"`isPrivate` which tracks the privacy of the particular field. When a player is added into MTM, `isPrivate` of these"},{"lineNumber":645,"author":{"gitId":"lohtianwei"},"content":"fields are set to \u0027false\u0027 by default."},{"lineNumber":646,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":647,"author":{"gitId":"lohtianwei"},"content":"Each of these fields have a different `toString` method which would return `\u003cPrivate \u0027FIELD\u0027\u003e` if privacy of"},{"lineNumber":648,"author":{"gitId":"lohtianwei"},"content":"the field is set to \u0027true\u0027, as shown in the following code snippet:"},{"lineNumber":649,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":650,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":651,"author":{"gitId":"lohtianwei"},"content":"@Override"},{"lineNumber":652,"author":{"gitId":"lohtianwei"},"content":" public String toString() {"},{"lineNumber":653,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {"},{"lineNumber":654,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":655,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":656,"author":{"gitId":"lohtianwei"},"content":" return value;"},{"lineNumber":657,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":658,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":659,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":660,"author":{"gitId":"lohtianwei"},"content":"`XmlAdaptedPerson` under the storage portion has been edited to save the `isPrivate` value for the fields:"},{"lineNumber":661,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":662,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":663,"author":{"gitId":"lohtianwei"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":664,"author":{"gitId":"lohtianwei"},"content":" private Boolean phonePrivacy;"},{"lineNumber":665,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":666,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":667,"author":{"gitId":"lohtianwei"},"content":"Toggling of privacy works in a similar way to `Edit`. New fields will be created with privacy settings of `EditPersonPrivacy`"},{"lineNumber":668,"author":{"gitId":"lohtianwei"},"content":" based on user input. This is done by first detecting if a particular prefix is present when command is"},{"lineNumber":669,"author":{"gitId":"lohtianwei"},"content":"entered in `TogglePrivacyCommandParser`:"},{"lineNumber":670,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":671,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":672,"author":{"gitId":"lohtianwei"},"content":"if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":673,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);"},{"lineNumber":674,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":675,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":676,"author":{"gitId":"lohtianwei"},"content":"If prefix of a field is not present, the privacy setting of that particular field in `EditPersonPrivacy` would be null."},{"lineNumber":677,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":678,"author":{"gitId":"lohtianwei"},"content":"In `TogglePrivacyCommand`, the new fields are created with this:"},{"lineNumber":679,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":680,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":681,"author":{"gitId":"lohtianwei"},"content":"private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":682,"author":{"gitId":"lohtianwei"},"content":" Phone phone;"},{"lineNumber":683,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":684,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {"},{"lineNumber":685,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":686,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":687,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":688,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":689,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":690,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":691,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":692,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");"},{"lineNumber":693,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":694,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {"},{"lineNumber":695,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":696,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();"},{"lineNumber":697,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":698,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":699,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":700,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":701,"author":{"gitId":"lohtianwei"},"content":" return phone;"},{"lineNumber":702,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":703,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":704,"author":{"gitId":"lohtianwei"},"content":"Note that in the second portion of the code, if `epp.getPrivatePhone()` is null, this would mean that it\u0027s privacy"},{"lineNumber":705,"author":{"gitId":"lohtianwei"},"content":"setting was not toggled and thus is set to the same as it was before. Else, it would be toggled:"},{"lineNumber":706,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":707,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":708,"author":{"gitId":"lohtianwei"},"content":"public void togglePrivacy() {"},{"lineNumber":709,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":710,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":711,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":712,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":713,"author":{"gitId":"lohtianwei"},"content":"A new person object is then created:"},{"lineNumber":714,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":715,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":716,"author":{"gitId":"lohtianwei"},"content":"private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)"},{"lineNumber":717,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {"},{"lineNumber":718,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":719,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":720,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();"},{"lineNumber":721,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);"},{"lineNumber":722,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);"},{"lineNumber":723,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);"},{"lineNumber":724,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);"},{"lineNumber":725,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();"},{"lineNumber":726,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();"},{"lineNumber":727,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);"},{"lineNumber":728,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();"},{"lineNumber":729,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();"},{"lineNumber":730,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();"},{"lineNumber":731,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":732,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":733,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);"},{"lineNumber":734,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":735,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":736,"author":{"gitId":"lohtianwei"},"content":"and is used to update current person:"},{"lineNumber":737,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":738,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":739,"author":{"gitId":"lohtianwei"},"content":"model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":740,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":741,"author":{"gitId":"-"},"content":""},{"lineNumber":742,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":743,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How field privacy is implemented"},{"lineNumber":744,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":745,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Boolean `isPrivate` added to field classes."},{"lineNumber":746,"author":{"gitId":"lohtianwei"},"content":"** Pros: Privacy settings can be obtained straight from class by calling getter method."},{"lineNumber":747,"author":{"gitId":"lohtianwei"},"content":"** Cons: Adddtional methods are needed to set and get value of `isPrivate`."},{"lineNumber":748,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Field privacy settings stored in `Person` in a HashMap."},{"lineNumber":749,"author":{"gitId":"lohtianwei"},"content":"** Pros: Field privacy can be accessed and modified easily"},{"lineNumber":750,"author":{"gitId":"lohtianwei"},"content":"** Cons: `Person` has to be accessed every time field privacy needs to be checked"},{"lineNumber":751,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":752,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Privacy of fields upon adding of player"},{"lineNumber":753,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":754,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** All newly added players\u0027 fields are not private by default."},{"lineNumber":755,"author":{"gitId":"lohtianwei"},"content":"** Pros: `Add` command does not need to be tweaked to allow adding player with private fields."},{"lineNumber":756,"author":{"gitId":"lohtianwei"},"content":"** Cons: After adding players, user has to do additional command to toggle privacy of fields."},{"lineNumber":757,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Include implementation of prefixes that denotes private field during `Add`."},{"lineNumber":758,"author":{"gitId":"lohtianwei"},"content":"** Pros: Newly added players can have private fields right away."},{"lineNumber":759,"author":{"gitId":"lohtianwei"},"content":"** Cons: Addtional changes has to be made to `Add` command."},{"lineNumber":760,"author":{"gitId":"-"},"content":"// end::privatefield[]"},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":762,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]"},{"lineNumber":763,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Sorting players by fields `[since v1.2]`"},{"lineNumber":764,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":765,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":766,"author":{"gitId":"lohtianwei"},"content":"The `sort` command is currently able to sort players by name, email, address, rating, jersey and postition in either ascending or descending order. Support for more fields will be added in subsequent updates."},{"lineNumber":767,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":768,"author":{"gitId":"lohtianwei"},"content":"* The `sort` command is parsed through `SortCommandParser` which hands control to the `SortCommand` class."},{"lineNumber":769,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":770,"author":{"gitId":"lohtianwei"},"content":"* Java Collections Sort API is used together with a custom `Comparator` in this implementation"},{"lineNumber":771,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":772,"author":{"gitId":"lohtianwei"},"content":"Sorting is facilitated by the `SortCommand` which uses method `sortPlayers` to ultimately call method `sortBy` in UniquePersonList for the actual sorting as shown in this code snippet:"},{"lineNumber":773,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":774,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":775,"author":{"gitId":"lohtianwei"},"content":" switch (field) {"},{"lineNumber":776,"author":{"gitId":"lohtianwei"},"content":" case \"name\":"},{"lineNumber":777,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;"},{"lineNumber":778,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":779,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":780,"author":{"gitId":"lohtianwei"},"content":" //... code for other switch cases..."},{"lineNumber":781,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":782,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":783,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":784,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":785,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":786,"author":{"gitId":"lohtianwei"},"content":" switch (order) {"},{"lineNumber":787,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":"},{"lineNumber":788,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":789,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":790,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":791,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":"},{"lineNumber":792,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":793,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":794,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":795,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":796,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":797,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":798,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":799,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":800,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":801,"author":{"gitId":"lohtianwei"},"content":"The code above utilises a custom `Comparator` defined in the sample code below:"},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":803,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":804,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":805,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);"},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":809,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":810,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":811,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":812,"author":{"gitId":"lohtianwei"},"content":"The following sequence diagram shows the program flow when `sort` is used:"},{"lineNumber":813,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":".Sort Sequence Diagram"},{"lineNumber":815,"author":{"gitId":"lohtianwei"},"content":"image::sortSeq.png[width\u003d\"900\"]"},{"lineNumber":816,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":817,"author":{"gitId":"lohtianwei"},"content":"[NOTE]"},{"lineNumber":818,"author":{"gitId":"lohtianwei"},"content":"If address book is empty, a `NoPlayerException` will be thrown by `sortBy` method in UniquePlayerList."},{"lineNumber":819,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":820,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":821,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `sort`"},{"lineNumber":822,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":823,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sorting is done in `UniquePersonList`."},{"lineNumber":824,"author":{"gitId":"lohtianwei"},"content":"** Pros: Sorting methods resides in class that handles most operations done to list. Future changes to implementation would be easier."},{"lineNumber":825,"author":{"gitId":"-"},"content":"** Cons: Complicated flow of control passed between classes."},{"lineNumber":826,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sorting is done in `SortCommand`."},{"lineNumber":827,"author":{"gitId":"-"},"content":"** Pros: Easier to trace flow of control as lesser passing between classes."},{"lineNumber":828,"author":{"gitId":"-"},"content":"** Cons: Unnecessary coupling if `UniquePersonList` has to rely on `SortCommand`."},{"lineNumber":829,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":830,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort by multiple fields"},{"lineNumber":831,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":832,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sort can only be done by 1 field."},{"lineNumber":833,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and input is straightforward."},{"lineNumber":834,"author":{"gitId":"-"},"content":"** Cons: Unable to fine tune to great detail how teams are sorted and displayed."},{"lineNumber":835,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sort can be done by multiple fields."},{"lineNumber":836,"author":{"gitId":"-"},"content":"** Pros: Able to fine tune to great detail how teams are sorted and displayed."},{"lineNumber":837,"author":{"gitId":"-"},"content":"** Cons: Unnecessary as team managers would not need to sort players by multiple fields."},{"lineNumber":838,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":839,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort Persistence"},{"lineNumber":840,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Address book is saved after sorting."},{"lineNumber":842,"author":{"gitId":"lohtianwei"},"content":"** Pros: Easy to implement. Allows team managers to use preferred sort pattern in every session."},{"lineNumber":843,"author":{"gitId":"lohtianwei"},"content":"** Cons: Previous order of players will be lost."},{"lineNumber":844,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Address book is not saved after sorting."},{"lineNumber":845,"author":{"gitId":"-"},"content":"** Pros: Good if team manager wants to sort players for current session only."},{"lineNumber":846,"author":{"gitId":"lohtianwei"},"content":"** Cons: Sort order is lost when program exits. More memory is used to sort a list and reverse it after."},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]"},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":849,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Team-Related Enhancements"},{"lineNumber":850,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":851,"author":{"gitId":"-"},"content":"// tag::team[]"},{"lineNumber":852,"author":{"gitId":"lithiumlkid"},"content":"[[team]]"},{"lineNumber":853,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Component `[since v1.2]`"},{"lineNumber":854,"author":{"gitId":"-"},"content":""},{"lineNumber":855,"author":{"gitId":"-"},"content":"One of the core components to MTM is `Team`, and it is the base to creating more commands for the user to access capability on team management. The `Team` component provides user with better organizational methods for organizing their players and interact with multiple teams to manage them effectively."},{"lineNumber":856,"author":{"gitId":"-"},"content":""},{"lineNumber":857,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":858,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":859,"author":{"gitId":"-"},"content":"We achieved the implementation of `Team` component by introducing a `UniqueTeamList` into the application which consists of a list of `Team` objects. `UniqueTeamList` is similar in context to `UniquePersonList` in which it keeps a unique list of all the `Team` objects. `Team` objects consist of `TeamName` object, which is used to uniquely identify the team. `Team` inherits `UniquePersonList` object which stores the a list of unique `Person` objects, containing information of the player."},{"lineNumber":860,"author":{"gitId":"-"},"content":""},{"lineNumber":861,"author":{"gitId":"-"},"content":"The class diagrams below shoes the relationship between the related classes. The Team Class Diagrams are an extension to the current existing Designs of \u003c\u003cDesign-Model, `Model`\u003e\u003e, \u003c\u003cDesign-Storage, `Storage`\u003e\u003e, and \u003c\u003cDesign-Ui, `UI`\u003e\u003e."},{"lineNumber":862,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":863,"author":{"gitId":"-"},"content":".Model Component: Team Class Diagram"},{"lineNumber":864,"author":{"gitId":"-"},"content":"image::TeamModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":865,"author":{"gitId":"-"},"content":""},{"lineNumber":866,"author":{"gitId":"-"},"content":".Storage Component: Team Class Diagram"},{"lineNumber":867,"author":{"gitId":"-"},"content":"image::TeamStorageClassDiagram.png[width\u003d\"400\"]"},{"lineNumber":868,"author":{"gitId":"-"},"content":""},{"lineNumber":869,"author":{"gitId":"-"},"content":".UI Component: Team Class Diagram"},{"lineNumber":870,"author":{"gitId":"-"},"content":"image::TeamUiClassDiagram.png[width\u003d\"400\"]"},{"lineNumber":871,"author":{"gitId":"-"},"content":""},{"lineNumber":872,"author":{"gitId":"-"},"content":"Code snippet from `Team.java` that shows the constructor for `Team`."},{"lineNumber":873,"author":{"gitId":"-"},"content":""},{"lineNumber":874,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":875,"author":{"gitId":"-"},"content":"----"},{"lineNumber":876,"author":{"gitId":"-"},"content":"public class Team {"},{"lineNumber":877,"author":{"gitId":"-"},"content":" private final TeamName teamName;"},{"lineNumber":878,"author":{"gitId":"-"},"content":""},{"lineNumber":879,"author":{"gitId":"-"},"content":" public Team(TeamName teamName) {"},{"lineNumber":880,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;"},{"lineNumber":881,"author":{"gitId":"-"},"content":" }"},{"lineNumber":882,"author":{"gitId":"-"},"content":"}"},{"lineNumber":883,"author":{"gitId":"-"},"content":"----"},{"lineNumber":884,"author":{"gitId":"-"},"content":""},{"lineNumber":885,"author":{"gitId":"-"},"content":"For the application to store the information of `Team` into a list, we will need to introduce a new `UniqueTeamList` variable into the `AddressBook.java`, so that it will have a container for all the new `Team` objects that is going to be created in MTM."},{"lineNumber":886,"author":{"gitId":"-"},"content":""},{"lineNumber":887,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the declaration and initialization of `UniqueTeamList`."},{"lineNumber":888,"author":{"gitId":"-"},"content":""},{"lineNumber":889,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":890,"author":{"gitId":"-"},"content":"----"},{"lineNumber":891,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":892,"author":{"gitId":"-"},"content":" //...AddressBook code..."},{"lineNumber":893,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;"},{"lineNumber":894,"author":{"gitId":"-"},"content":""},{"lineNumber":895,"author":{"gitId":"-"},"content":" {"},{"lineNumber":896,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList;"},{"lineNumber":897,"author":{"gitId":"-"},"content":" }"},{"lineNumber":898,"author":{"gitId":"-"},"content":""},{"lineNumber":899,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {"},{"lineNumber":900,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);"},{"lineNumber":901,"author":{"gitId":"-"},"content":" }"},{"lineNumber":902,"author":{"gitId":"-"},"content":""},{"lineNumber":903,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":904,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {"},{"lineNumber":905,"author":{"gitId":"-"},"content":" return teams.asObservableList();"},{"lineNumber":906,"author":{"gitId":"-"},"content":" }"},{"lineNumber":907,"author":{"gitId":"-"},"content":" //...AddressBook code..."},{"lineNumber":908,"author":{"gitId":"-"},"content":"}"},{"lineNumber":909,"author":{"gitId":"-"},"content":"----"},{"lineNumber":910,"author":{"gitId":"-"},"content":""},{"lineNumber":911,"author":{"gitId":"-"},"content":"Since `Team` inherits the `UniquePersonList` class, we are able to store `Person` object into `Team` by using the super class method `add` in `UniquePersonList`. By storing a list of players inside `Team` object, future enhancements can easily make use of the data to perform functions that requires quick access to all players in a team. However, this have created a coupling in which data made to the `changes made to `AddressBook.persons` needs to be updated in `Team` to maintain synchronicity."},{"lineNumber":912,"author":{"gitId":"-"},"content":""},{"lineNumber":913,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the propagation of details updated in `Person` from the full player list to the `Person` objects in `Team`."},{"lineNumber":914,"author":{"gitId":"-"},"content":""},{"lineNumber":915,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":916,"author":{"gitId":"-"},"content":"----"},{"lineNumber":917,"author":{"gitId":"-"},"content":"public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":918,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":919,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":920,"author":{"gitId":"-"},"content":" //...syncEditedPerson initialisation..."},{"lineNumber":921,"author":{"gitId":"-"},"content":""},{"lineNumber":922,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":923,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);"},{"lineNumber":924,"author":{"gitId":"-"},"content":" }"},{"lineNumber":925,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);"},{"lineNumber":926,"author":{"gitId":"-"},"content":"}"},{"lineNumber":927,"author":{"gitId":"-"},"content":"----"},{"lineNumber":928,"author":{"gitId":"-"},"content":""},{"lineNumber":929,"author":{"gitId":"-"},"content":"An additional `TeamName` field is also added to `Person` so that the user can quickly determine the team the player is in through the use of `PREDICATE`."},{"lineNumber":930,"author":{"gitId":"-"},"content":""},{"lineNumber":931,"author":{"gitId":"-"},"content":"Code snippet from `Person.java` that shows the `TeamName` field."},{"lineNumber":932,"author":{"gitId":"-"},"content":""},{"lineNumber":933,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":934,"author":{"gitId":"-"},"content":"----"},{"lineNumber":935,"author":{"gitId":"-"},"content":"public class Person {"},{"lineNumber":936,"author":{"gitId":"-"},"content":""},{"lineNumber":937,"author":{"gitId":"-"},"content":" private final TeamName teamName;"},{"lineNumber":938,"author":{"gitId":"-"},"content":""},{"lineNumber":939,"author":{"gitId":"-"},"content":" public Person(Name name, Phone phone, Email email, Address address, Remark remark,"},{"lineNumber":940,"author":{"gitId":"-"},"content":" TeamName teamName, Set\u003cTag\u003e tags, Rating rating, Position position,"},{"lineNumber":941,"author":{"gitId":"-"},"content":" JerseyNumber jerseyNumber, Avatar avatar) {"},{"lineNumber":942,"author":{"gitId":"-"},"content":" //...attributes initialisation..."},{"lineNumber":943,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;"},{"lineNumber":944,"author":{"gitId":"-"},"content":" }"},{"lineNumber":945,"author":{"gitId":"-"},"content":""},{"lineNumber":946,"author":{"gitId":"-"},"content":" public TeamName getTeamName() {"},{"lineNumber":947,"author":{"gitId":"-"},"content":" return teamName;"},{"lineNumber":948,"author":{"gitId":"-"},"content":" }"},{"lineNumber":949,"author":{"gitId":"-"},"content":"}"},{"lineNumber":950,"author":{"gitId":"-"},"content":"----"},{"lineNumber":951,"author":{"gitId":"-"},"content":""},{"lineNumber":952,"author":{"gitId":"-"},"content":"Code snippet from `ModelManager.java` that shows the use of filtering the person list using the `TeamName` field in `Person`."},{"lineNumber":953,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":954,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":955,"author":{"gitId":"-"},"content":"----"},{"lineNumber":956,"author":{"gitId":"-"},"content":"@Override"},{"lineNumber":957,"author":{"gitId":"-"},"content":"public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {"},{"lineNumber":958,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);"},{"lineNumber":959,"author":{"gitId":"-"},"content":""},{"lineNumber":960,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();"},{"lineNumber":961,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":962,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {"},{"lineNumber":963,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));"},{"lineNumber":964,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":965,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();"},{"lineNumber":966,"author":{"gitId":"-"},"content":" }"},{"lineNumber":967,"author":{"gitId":"-"},"content":"}"},{"lineNumber":968,"author":{"gitId":"-"},"content":"----"},{"lineNumber":969,"author":{"gitId":"-"},"content":""},{"lineNumber":970,"author":{"gitId":"-"},"content":"Additional exception classes are also created so that these new exceptions can be thrown during the program, such that when these exceptions are thrown, the code is easily comprehensible."},{"lineNumber":971,"author":{"gitId":"-"},"content":""},{"lineNumber":972,"author":{"gitId":"-"},"content":".`TeamNotFoundException.java`"},{"lineNumber":973,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":974,"author":{"gitId":"-"},"content":"----"},{"lineNumber":975,"author":{"gitId":"-"},"content":"public class TeamNotFoundException extends Exception {"},{"lineNumber":976,"author":{"gitId":"-"},"content":" //...TeamNotFoundException..."},{"lineNumber":977,"author":{"gitId":"-"},"content":"}"},{"lineNumber":978,"author":{"gitId":"-"},"content":"----"},{"lineNumber":979,"author":{"gitId":"-"},"content":""},{"lineNumber":980,"author":{"gitId":"-"},"content":".`DupliecateTeamException.java`"},{"lineNumber":981,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":982,"author":{"gitId":"-"},"content":"----"},{"lineNumber":983,"author":{"gitId":"-"},"content":"public class DuplicateTeamException extends DuplicateDataException {"},{"lineNumber":984,"author":{"gitId":"-"},"content":" //...DuplicateTeamException..."},{"lineNumber":985,"author":{"gitId":"-"},"content":"}"},{"lineNumber":986,"author":{"gitId":"-"},"content":"----"},{"lineNumber":987,"author":{"gitId":"-"},"content":""},{"lineNumber":988,"author":{"gitId":"-"},"content":"Implementing a new component into MTM, the data consisting of `Team` is also stored into storage using `XmlAdaptedTeam.java` to format the output."},{"lineNumber":989,"author":{"gitId":"-"},"content":""},{"lineNumber":990,"author":{"gitId":"-"},"content":"Code snippet from `XmlAdaptedTeam.java` that shows the elements that will be stored into storage."},{"lineNumber":991,"author":{"gitId":"-"},"content":""},{"lineNumber":992,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":993,"author":{"gitId":"-"},"content":"----"},{"lineNumber":994,"author":{"gitId":"-"},"content":"public class XmlAdaptedTeam {"},{"lineNumber":995,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":996,"author":{"gitId":"-"},"content":" private String teamName;"},{"lineNumber":997,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":998,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();"},{"lineNumber":999,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1001,"author":{"gitId":"-"},"content":""},{"lineNumber":1002,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Team`"},{"lineNumber":1004,"author":{"gitId":"-"},"content":""},{"lineNumber":1005,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `Team` object stores a `Person` object that is also in `UniquePersonList` and `TeamName` is also an attribute of `Person`."},{"lineNumber":1006,"author":{"gitId":"-"},"content":"** Pros: Provides an easier lookup of person belonging in which team without the need of iterating through the `UniqueTeamList` for a specific `Person`, and provide ease of access to data for future enhancements."},{"lineNumber":1007,"author":{"gitId":"-"},"content":"** Cons: Checks to ensure synchronicity need to be done thoroughly to ensure that player information is in sync between Team and full player list"},{"lineNumber":1008,"author":{"gitId":"-"},"content":"* **Alternative 2:** `Team` object is stored in `Person` object as an attribute."},{"lineNumber":1009,"author":{"gitId":"-"},"content":"** Pros: Logical thought process to include `Team` as an attribute."},{"lineNumber":1010,"author":{"gitId":"-"},"content":"** Cons: Excess storage wasted due to duplicated data of `Team` in every `Person`."},{"lineNumber":1011,"author":{"gitId":"-"},"content":"// end::team[]"},{"lineNumber":1012,"author":{"gitId":"-"},"content":""},{"lineNumber":1013,"author":{"gitId":"-"},"content":"// tag::teamfunction[]"},{"lineNumber":1014,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Functions `[since v1.4]`"},{"lineNumber":1015,"author":{"gitId":"-"},"content":""},{"lineNumber":1016,"author":{"gitId":"-"},"content":"To assist the user with manging teams, we have decided to use the design concept of Create-Read-Update-Delete (CRUD) to implement commands related to `Team`."},{"lineNumber":1017,"author":{"gitId":"-"},"content":"This set of commands provide the basic necessities for the user to efficiently use our application."},{"lineNumber":1018,"author":{"gitId":"-"},"content":""},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1020,"author":{"gitId":"-"},"content":""},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Based on the principles of CRUD, we have created the commands that corresponds to each principles, namely, `create`, `view`, `rename` and `assign`, `remove`."},{"lineNumber":1022,"author":{"gitId":"-"},"content":"With these commands, the application is ready to support the features that the application is designed to be used."},{"lineNumber":1023,"author":{"gitId":"-"},"content":""},{"lineNumber":1024,"author":{"gitId":"-"},"content":"Team-related commands that modifies the data in the application, such as `create`, `rename`, `assign`, and `remove`, inherits from `UndoableCommand` class which makes all these commands undoable. Each command has its own `Parser` to uniquely parse user input arguments for the commands, so that it is validated and the command understand what it should be doing."},{"lineNumber":1025,"author":{"gitId":"-"},"content":""},{"lineNumber":1026,"author":{"gitId":"-"},"content":"For each feature, new functions are created in `AddressBook.java` and `ModelManager.java` so that the commands executed are able to manipulate the data accordingly."},{"lineNumber":1027,"author":{"gitId":"-"},"content":""},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `create`: Creates a `Team`, so that other team-related commands can be executed."},{"lineNumber":1029,"author":{"gitId":"-"},"content":"After the creation of a new team, the user will then be able to perform a new set of commands that performs team management functionality. Moreover, the `add` command can be used with the prefix `tm/` to immediately add the user into MTM and into the team specified."},{"lineNumber":1030,"author":{"gitId":"-"},"content":""},{"lineNumber":1031,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `create` command:"},{"lineNumber":1032,"author":{"gitId":"-"},"content":""},{"lineNumber":1033,"author":{"gitId":"-"},"content":".Logic Component: Create Sequence Diagram"},{"lineNumber":1034,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram1.png[width\u003d\"100%\"]"},{"lineNumber":1035,"author":{"gitId":"-"},"content":""},{"lineNumber":1036,"author":{"gitId":"-"},"content":".Model Component: Create Sequence Diagram"},{"lineNumber":1037,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram2.png[width\u003d\"70%\"]"},{"lineNumber":1038,"author":{"gitId":"-"},"content":""},{"lineNumber":1039,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `view`: Views a `Team`, which shows all players in the team."},{"lineNumber":1040,"author":{"gitId":"-"},"content":"The command uses the `filteredPersons` list, and an overloaded `updateFilteredPersonList` method that sets a predicate that filters the list based on a `TeamName`, in `ModelManager.java` so that it can be displayed via the UI."},{"lineNumber":1041,"author":{"gitId":"-"},"content":""},{"lineNumber":1042,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `view` command:"},{"lineNumber":1043,"author":{"gitId":"-"},"content":""},{"lineNumber":1044,"author":{"gitId":"-"},"content":".View Sequence Diagram"},{"lineNumber":1045,"author":{"gitId":"-"},"content":"image::TeamViewSequenceDiagram.png[width\u003d\"100%\"]"},{"lineNumber":1046,"author":{"gitId":"-"},"content":""},{"lineNumber":1047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `rename`: Renames a given `Team`."},{"lineNumber":1048,"author":{"gitId":"-"},"content":"The user can rename a specified team to a new team name only if the current team name does not existing in MTM. On a side note, it prevents the user from renaming the team to the same name that it currently have."},{"lineNumber":1049,"author":{"gitId":"-"},"content":""},{"lineNumber":1050,"author":{"gitId":"-"},"content":"This command will update the name of the teams that are in `teams` in `AddressBook.java` and will update all the players `TeamName` field in `persons` and `Team` with the new team name."},{"lineNumber":1051,"author":{"gitId":"-"},"content":""},{"lineNumber":1052,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `rename` command:"},{"lineNumber":1053,"author":{"gitId":"-"},"content":""},{"lineNumber":1054,"author":{"gitId":"-"},"content":".Logic Component: Rename Sequence Diagram"},{"lineNumber":1055,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram1.png[width\u003d\"100%\"]"},{"lineNumber":1056,"author":{"gitId":"-"},"content":""},{"lineNumber":1057,"author":{"gitId":"-"},"content":".Model Component: Rename Sequence Diagram"},{"lineNumber":1058,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram2.png[width\u003d\"70%\"]"},{"lineNumber":1059,"author":{"gitId":"-"},"content":""},{"lineNumber":1060,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `assign`: Assign a set of `Person` to a specified `Team`."},{"lineNumber":1061,"author":{"gitId":"-"},"content":"The core feature that organizes the player into teams so that the user can easily view the desired team players quickly. The command have 2 functions, firstly it is able to assign an individual or a set of players to a specified team, and secondly, it is able to unassign an individual or a set of players from any team."},{"lineNumber":1062,"author":{"gitId":"-"},"content":""},{"lineNumber":1063,"author":{"gitId":"-"},"content":"The command takes in a set of indexes that corresponds to the player in the current list, and will perform the assign operation in ascending index order. If the command is unable to process an index given, it will process all the valid index until the index that causes an issue."},{"lineNumber":1064,"author":{"gitId":"-"},"content":""},{"lineNumber":1065,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1066,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Typical issues that the command handles are,"},{"lineNumber":1068,"author":{"gitId":"-"},"content":""},{"lineNumber":1069,"author":{"gitId":"-"},"content":"* Assigning a player to the same team that it is currently in."},{"lineNumber":1070,"author":{"gitId":"-"},"content":"* Assigning a player to team that does not exist."},{"lineNumber":1071,"author":{"gitId":"-"},"content":"* Unassigning a player that does not exist in any team."},{"lineNumber":1072,"author":{"gitId":"-"},"content":"* Process index starting from 1."},{"lineNumber":1073,"author":{"gitId":"-"},"content":"* Removes all index that exceeds the current number of player listed."},{"lineNumber":1074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"-"},"content":"This command will update and synchronise all affected players in `persons` and in the specified `Team` object, such that their `TeamName` field in `Person` are updated with the new assigned or unassigned team. At the same time, the list of players in `Team` gets update if new player are assigned or unassigned."},{"lineNumber":1077,"author":{"gitId":"-"},"content":""},{"lineNumber":1078,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `assign` command:"},{"lineNumber":1079,"author":{"gitId":"-"},"content":""},{"lineNumber":1080,"author":{"gitId":"-"},"content":".Assign Sequence Diagram"},{"lineNumber":1081,"author":{"gitId":"-"},"content":"image::TeamAssignSequenceDiagram.png[width\u003d\"100%\"]"},{"lineNumber":1082,"author":{"gitId":"-"},"content":""},{"lineNumber":1083,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `remove`: Removes the given `Team`."},{"lineNumber":1084,"author":{"gitId":"-"},"content":"The final step in completing the CRUD design is the removal of team. It will delete the `Team` from `teams` list in `AddressBook.java` and will update all affected players in the team to be unassigned from the team by having their `TeamName` field updated with an unspecifed field."},{"lineNumber":1085,"author":{"gitId":"-"},"content":""},{"lineNumber":1086,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remove` command:"},{"lineNumber":1087,"author":{"gitId":"-"},"content":""},{"lineNumber":1088,"author":{"gitId":"-"},"content":".Logic Component: Remove Sequence Diagram"},{"lineNumber":1089,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram1.png[width\u003d\"100%\"]"},{"lineNumber":1090,"author":{"gitId":"-"},"content":""},{"lineNumber":1091,"author":{"gitId":"-"},"content":".Model Component: Remove Sequence Diagram"},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram2.png[width\u003d\"70%\"]"},{"lineNumber":1093,"author":{"gitId":"-"},"content":""},{"lineNumber":1094,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Team Functions"},{"lineNumber":1096,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Uses CRUD design concept to create new commands."},{"lineNumber":1097,"author":{"gitId":"-"},"content":"** Pros: Systematic approach in dealing with what functions should be created to ensure that the product has the features required to perform team management, and provides a platform to work on ideal features that target the needs of the audience."},{"lineNumber":1098,"author":{"gitId":"-"},"content":"** Cons: Simple and only captures the basic requirements of the product."},{"lineNumber":1099,"author":{"gitId":"-"},"content":"* **Alternative 2:** Implement commands based on suggested features."},{"lineNumber":1100,"author":{"gitId":"-"},"content":"** Pros: End product will have features that targets the need of the audiences."},{"lineNumber":1101,"author":{"gitId":"-"},"content":"** Cons: Possible to miss out basic and core features of a team management application."},{"lineNumber":1102,"author":{"gitId":"-"},"content":""},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Undoable commands for Team Functions"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Make all functions that modifies data to be undoable."},{"lineNumber":1105,"author":{"gitId":"-"},"content":"** Pros: Follows the current implementation of `undo` such that if data are modified in MTM, it will be an undoable command."},{"lineNumber":1106,"author":{"gitId":"-"},"content":"** Cons: Need to ensure that regression bugs are squashed when the new commands are executed, and time consuming in identifying regression."},{"lineNumber":1107,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make all functions not undoable."},{"lineNumber":1108,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and will produce lesser regression bugs."},{"lineNumber":1109,"author":{"gitId":"-"},"content":"** Cons: Does not align with the current implementation of `undo` \u0026 `redo`, and the user would require more steps to revert any changes made."},{"lineNumber":1110,"author":{"gitId":"-"},"content":"// end::teamfunction[]"},{"lineNumber":1111,"author":{"gitId":"-"},"content":""},{"lineNumber":1112,"author":{"gitId":"-"},"content":"// tag::showbestxi[]"},{"lineNumber":1113,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Show Best XI `[coming in v2.0]`"},{"lineNumber":1114,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1115,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1116,"author":{"gitId":"lohtianwei"},"content":"The `showBest` command is able to show the current team\u0027s best 11 players. There is however no functional implementation for this feature yet. Coming soon!"},{"lineNumber":1117,"author":{"gitId":"-"},"content":"// end::showbestxi[]"},{"lineNumber":1118,"author":{"gitId":"-"},"content":""},{"lineNumber":1119,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Usability Enhancements"},{"lineNumber":1120,"author":{"gitId":"-"},"content":""},{"lineNumber":1121,"author":{"gitId":"-"},"content":"// tag::key[]"},{"lineNumber":1122,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Toggle lock on MTM `[since v1.5]`"},{"lineNumber":1123,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1124,"author":{"gitId":"-"},"content":"Locking mechanism of MTM can be toggled on and off using the `Key` command. It utilises the Model to access"},{"lineNumber":1125,"author":{"gitId":"-"},"content":"user preferences of MTM. Current lock state and password is stored in `UserPrefs` in the Storage component."},{"lineNumber":1126,"author":{"gitId":"-"},"content":""},{"lineNumber":1127,"author":{"gitId":"lohtianwei"},"content":"This activity diagram shows the logic behind the `Key` command:"},{"lineNumber":1128,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1129,"author":{"gitId":"lohtianwei"},"content":".Key Activity Diagram"},{"lineNumber":1130,"author":{"gitId":"lohtianwei"},"content":"image::Keyactdiag.png[width\u003d\"900\"]"},{"lineNumber":1131,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1132,"author":{"gitId":"-"},"content":"Password checking done in `Key` command:"},{"lineNumber":1133,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1134,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1135,"author":{"gitId":"-"},"content":"private boolean correctPassword() {"},{"lineNumber":1136,"author":{"gitId":"-"},"content":" UserPrefs up \u003d model.getUserPrefs();"},{"lineNumber":1137,"author":{"gitId":"-"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":1138,"author":{"gitId":"-"},"content":" return hash.equals(up.getAddressBookHashedPass());"},{"lineNumber":1139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1140,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1141,"author":{"gitId":"-"},"content":"When password check is done, the lock on MTM is toggled to the state opposite of the current:"},{"lineNumber":1142,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1143,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1144,"author":{"gitId":"-"},"content":"if (correctPassword()) {"},{"lineNumber":1145,"author":{"gitId":"-"},"content":" if (model.getLockState()) {"},{"lineNumber":1146,"author":{"gitId":"-"},"content":" model.unlockAddressBookModel();"},{"lineNumber":1147,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1148,"author":{"gitId":"-"},"content":" model.lockAddressBookModel();"},{"lineNumber":1149,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1150,"author":{"gitId":"-"},"content":""},{"lineNumber":1151,"author":{"gitId":"-"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":1152,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":1153,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1154,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1155,"author":{"gitId":"-"},"content":""},{"lineNumber":1156,"author":{"gitId":"-"},"content":"In a locked state, only certain functions of MTM can be used. This is to prevent unauthorised tampering with the details"},{"lineNumber":1157,"author":{"gitId":"-"},"content":"stored on MTM."},{"lineNumber":1158,"author":{"gitId":"-"},"content":""},{"lineNumber":1159,"author":{"gitId":"-"},"content":"This is done in `AddressBookParser`. Commands are split into low level or not. When a command is"},{"lineNumber":1160,"author":{"gitId":"-"},"content":"being executed, it is checked if it falls under the low level category. If so, it would execute. When adding new features,"},{"lineNumber":1161,"author":{"gitId":"-"},"content":"add them to this list should you feel it is \u0027low level\u0027:"},{"lineNumber":1162,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1163,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1164,"author":{"gitId":"-"},"content":"private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {"},{"lineNumber":1165,"author":{"gitId":"-"},"content":" switch(commandWord) {"},{"lineNumber":1166,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_WORD:"},{"lineNumber":1167,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:"},{"lineNumber":1168,"author":{"gitId":"-"},"content":" return new ChangeThemeCommandParser().parse(arguments);"},{"lineNumber":1169,"author":{"gitId":"-"},"content":""},{"lineNumber":1170,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":1171,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":1172,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":1173,"author":{"gitId":"-"},"content":""},{"lineNumber":1174,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":1175,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":1176,"author":{"gitId":"-"},"content":" return new ListCommand();"},{"lineNumber":1177,"author":{"gitId":"-"},"content":""},{"lineNumber":1178,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_WORD:"},{"lineNumber":1179,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_ALIAS:"},{"lineNumber":1180,"author":{"gitId":"-"},"content":" return new KeyCommandParser().parse(arguments);"},{"lineNumber":1181,"author":{"gitId":"-"},"content":""},{"lineNumber":1182,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_WORD:"},{"lineNumber":1183,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_ALIAS:"},{"lineNumber":1184,"author":{"gitId":"-"},"content":" return new ViewCommandParser().parse(arguments);"},{"lineNumber":1185,"author":{"gitId":"-"},"content":""},{"lineNumber":1186,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":1187,"author":{"gitId":"-"},"content":" return new ExitCommand();"},{"lineNumber":1188,"author":{"gitId":"-"},"content":""},{"lineNumber":1189,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":1190,"author":{"gitId":"-"},"content":" return new HelpCommand();"},{"lineNumber":1191,"author":{"gitId":"-"},"content":""},{"lineNumber":1192,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":1193,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":1194,"author":{"gitId":"-"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":1195,"author":{"gitId":"-"},"content":""},{"lineNumber":1196,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":1197,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":1198,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1200,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1201,"author":{"gitId":"-"},"content":"If command being executed does not fall into the category of \u0027low level\u0027, a check on the lock state of MTM is done"},{"lineNumber":1202,"author":{"gitId":"-"},"content":"before allowing or restricting access:"},{"lineNumber":1203,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1204,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1205,"author":{"gitId":"-"},"content":"if (lockState) {"},{"lineNumber":1206,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_RESTRICTED);"},{"lineNumber":1207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1208,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1209,"author":{"gitId":"-"},"content":""},{"lineNumber":1210,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1211,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of locking MTM"},{"lineNumber":1212,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Lock is toggled with only a single command `Key`."},{"lineNumber":1213,"author":{"gitId":"-"},"content":"** Pros: Easy to implement, just check current lock state and switch it."},{"lineNumber":1214,"author":{"gitId":"-"},"content":"** Cons: With a toggle, user might unlock MTM thinking he/she is locking it."},{"lineNumber":1215,"author":{"gitId":"-"},"content":"* **Alternative 2:** Locking and unlocking of MTM is done with two separate commands."},{"lineNumber":1216,"author":{"gitId":"-"},"content":"** Pros: Ensures that when a lock is done, MTM is truly locked."},{"lineNumber":1217,"author":{"gitId":"-"},"content":"** Cons: Addtional command needs to be created, along with its command parser and implementations."},{"lineNumber":1218,"author":{"gitId":"-"},"content":"// end::key[]"},{"lineNumber":1219,"author":{"gitId":"-"},"content":""},{"lineNumber":1220,"author":{"gitId":"-"},"content":"// tag::changepass[]"},{"lineNumber":1221,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change Password `[coming in v2.0]`"},{"lineNumber":1222,"author":{"gitId":"-"},"content":""},{"lineNumber":1223,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1224,"author":{"gitId":"-"},"content":"Default password used for toggling lock on MTM is currently \u0027ilikesports\u0027. In an upcoming update, user would be able"},{"lineNumber":1225,"author":{"gitId":"-"},"content":"to change this password to one of his choosing. There is currently no functional implementation for this feature yet."},{"lineNumber":1226,"author":{"gitId":"-"},"content":"Coming soon!"},{"lineNumber":1227,"author":{"gitId":"-"},"content":"// end::changepass[]"},{"lineNumber":1228,"author":{"gitId":"-"},"content":""},{"lineNumber":1229,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d User Experience Enhancements"},{"lineNumber":1230,"author":{"gitId":"-"},"content":""},{"lineNumber":1231,"author":{"gitId":"-"},"content":"// tag::autocomplete[]"},{"lineNumber":1232,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Tab Autocomplete"},{"lineNumber":1233,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1234,"author":{"gitId":"-"},"content":""},{"lineNumber":1235,"author":{"gitId":"-"},"content":"The tab autocomplete feature works by handling the Tab key pressed event, searching for any commands with matching prefix and returns one if found."},{"lineNumber":1236,"author":{"gitId":"-"},"content":"The command strings are stored in a Trie data structure, named `CommandTrie`, for optimal search."},{"lineNumber":1237,"author":{"gitId":"-"},"content":""},{"lineNumber":1238,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1239,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1240,"author":{"gitId":"-"},"content":"public class CommandTrie {"},{"lineNumber":1241,"author":{"gitId":"-"},"content":" String attemptAutoComplete (String input);"},{"lineNumber":1242,"author":{"gitId":"-"},"content":" void insert (String input);"},{"lineNumber":1243,"author":{"gitId":"-"},"content":" Set\u003cString\u003e getCommandSet();"},{"lineNumber":1244,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1245,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1246,"author":{"gitId":"-"},"content":""},{"lineNumber":1247,"author":{"gitId":"-"},"content":"The trie is made up of `TrieNode` objects which contains three objects. The `TrieNode sibling` represents a character on the same level as the current one. The `TrieNode child` represents a next possible letter."},{"lineNumber":1248,"author":{"gitId":"-"},"content":"For example in the words `edit` and `exit`, the node for `d` would have a child `i` and a sibling `x`. `x` would have a child `i`."},{"lineNumber":1249,"author":{"gitId":"-"},"content":""},{"lineNumber":1250,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1251,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1252,"author":{"gitId":"-"},"content":"public class TrieNode {"},{"lineNumber":1253,"author":{"gitId":"-"},"content":""},{"lineNumber":1254,"author":{"gitId":"-"},"content":" private TrieNode sibling;"},{"lineNumber":1255,"author":{"gitId":"-"},"content":" private TrieNode child;"},{"lineNumber":1256,"author":{"gitId":"-"},"content":" private char key;"},{"lineNumber":1257,"author":{"gitId":"-"},"content":" ..."},{"lineNumber":1258,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1259,"author":{"gitId":"-"},"content":""},{"lineNumber":1260,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1261,"author":{"gitId":"-"},"content":"Upon the pressing of the tab key, the command box calls `attemptAutoComplete`, in the `commandTrie` class. With the content of the command box as the query, attemptAutoComplete searches for the query using the standard Trie search algortihm."},{"lineNumber":1262,"author":{"gitId":"-"},"content":"If the query prefix itself is not present in the trie, then the attempt fails. If the query reaches a `TrieNode` with a `sibling` or `child` `TrieNode`,"},{"lineNumber":1263,"author":{"gitId":"-"},"content":"it will provide the user with possible commands for a given input. In this case, a dropdown box will appear in the UI that lists the possible commands for the user."},{"lineNumber":1264,"author":{"gitId":"-"},"content":""},{"lineNumber":1265,"author":{"gitId":"-"},"content":"Upon finding a matching command, `attemptAutoComplete` returns it and replaces the text in the Command Line. If the no matching command is found, the text is turned red."},{"lineNumber":1266,"author":{"gitId":"-"},"content":"// end::autocomplete[]"},{"lineNumber":1267,"author":{"gitId":"-"},"content":""},{"lineNumber":1268,"author":{"gitId":"-"},"content":"// tag::enhancedadd[]"},{"lineNumber":1269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Optional Field Add Command `[since v1.1]`"},{"lineNumber":1270,"author":{"gitId":"-"},"content":""},{"lineNumber":1271,"author":{"gitId":"-"},"content":"MTM is designed to manage a multitude of players and the main function that would be used repetitively is the `add` command, hence it would alleviate the cumbersomeness of entering every detail of the players when you want the command to be executed quickly."},{"lineNumber":1272,"author":{"gitId":"-"},"content":"Having the option to only entering the mandatory fields and leaving the optional ones empty will make the process of adding players more efficient."},{"lineNumber":1273,"author":{"gitId":"-"},"content":""},{"lineNumber":1274,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1275,"author":{"gitId":"-"},"content":"This mechanism enhances the original implementation of the `add` command."},{"lineNumber":1276,"author":{"gitId":"-"},"content":"The required fields that are mandatory to be filled by the user are `n/NAME` and `e/EMAIL`."},{"lineNumber":1277,"author":{"gitId":"-"},"content":"This implementation of making fields optional for `AddCommand` allows user to add players without their full information, and can be updated accordingly when the user retrieves their full information."},{"lineNumber":1278,"author":{"gitId":"-"},"content":""},{"lineNumber":1279,"author":{"gitId":"-"},"content":"Code snippet from `ParserUtil.java` that shows the implementation of when a field is left empty."},{"lineNumber":1280,"author":{"gitId":"-"},"content":"\"\u003cUNSPECIFIED\u003e\" string will be return when the value passed in is empty."},{"lineNumber":1281,"author":{"gitId":"-"},"content":""},{"lineNumber":1282,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1283,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1284,"author":{"gitId":"-"},"content":"public class ParserUtil {"},{"lineNumber":1285,"author":{"gitId":"-"},"content":" public static final String UNSPECIFIED_FIELD \u003d \"\u003cUNSPECIFIED\u003e\";"},{"lineNumber":1286,"author":{"gitId":"-"},"content":" //...ParserUtil code..."},{"lineNumber":1287,"author":{"gitId":"-"},"content":""},{"lineNumber":1288,"author":{"gitId":"-"},"content":" public static Optional\u003cString\u003e parseValue(Optional\u003cString\u003e value, String messageConstraints)"},{"lineNumber":1289,"author":{"gitId":"-"},"content":" throws IllegalValueException {"},{"lineNumber":1290,"author":{"gitId":"-"},"content":" if (value.isPresent() \u0026\u0026 value.get().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":1291,"author":{"gitId":"-"},"content":" throw new IllegalValueException(messageConstraints);"},{"lineNumber":1292,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1293,"author":{"gitId":"-"},"content":" return Optional.of(value.orElse(UNSPECIFIED_FIELD));"},{"lineNumber":1294,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1295,"author":{"gitId":"-"},"content":" //...ParserUtil code ..."},{"lineNumber":1296,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1297,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1298,"author":{"gitId":"-"},"content":""},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows the usage of parsing fields that are set as optional."},{"lineNumber":1300,"author":{"gitId":"-"},"content":""},{"lineNumber":1301,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1302,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1303,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":1304,"author":{"gitId":"-"},"content":" //...tokenize arguments..."},{"lineNumber":1305,"author":{"gitId":"-"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_EMAIL)"},{"lineNumber":1306,"author":{"gitId":"-"},"content":" || !argMultimap.getPreamble().isEmpty()) {"},{"lineNumber":1307,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":1308,"author":{"gitId":"-"},"content":" AddCommand.MESSAGE_USAGE));"},{"lineNumber":1309,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1310,"author":{"gitId":"-"},"content":""},{"lineNumber":1311,"author":{"gitId":"-"},"content":" //...get person details from arguments..."},{"lineNumber":1312,"author":{"gitId":"-"},"content":" Address address \u003d ParserUtil.parseAddress(ParserUtil.parseValue(argMultimap"},{"lineNumber":1313,"author":{"gitId":"-"},"content":" .getValue(PREFIX_ADDRESS), Address.MESSAGE_ADDRESS_CONSTRAINTS)).get();"},{"lineNumber":1314,"author":{"gitId":"-"},"content":""},{"lineNumber":1315,"author":{"gitId":"-"},"content":" return new AddCommand(person);"},{"lineNumber":1316,"author":{"gitId":"-"},"content":" //...AddCommandParser code..."},{"lineNumber":1317,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1318,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1319,"author":{"gitId":"-"},"content":""},{"lineNumber":1320,"author":{"gitId":"-"},"content":"Code snippet from `Address.java` that shows an example of an optional field being valid when not specified."},{"lineNumber":1321,"author":{"gitId":"-"},"content":""},{"lineNumber":1322,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1323,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1324,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":1325,"author":{"gitId":"-"},"content":" //...Address code..."},{"lineNumber":1326,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":1327,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":1328,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1329,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1330,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1331,"author":{"gitId":"-"},"content":""},{"lineNumber":1332,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":1333,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Optional fields"},{"lineNumber":1334,"author":{"gitId":"-"},"content":""},{"lineNumber":1335,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Set a default value for unspecified fields and parse fields that are mandatory."},{"lineNumber":1336,"author":{"gitId":"-"},"content":"** Pros: Easy to implement as fields are still filled with information even though user did not specify."},{"lineNumber":1337,"author":{"gitId":"-"},"content":"** Cons: Unattractive display of fields when it is unspecified."},{"lineNumber":1338,"author":{"gitId":"-"},"content":"* **Alternative 2:** Require users to input all fields."},{"lineNumber":1339,"author":{"gitId":"-"},"content":"** Pros: The current implementation is used, hence there is no additional code to ensure validity of unspecified input."},{"lineNumber":1340,"author":{"gitId":"-"},"content":"** Cons: Less flexibility is given to the user when adding a player into the application."},{"lineNumber":1341,"author":{"gitId":"-"},"content":"// end::enhancedadd[]"},{"lineNumber":1342,"author":{"gitId":"-"},"content":""},{"lineNumber":1343,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI Enhancements"},{"lineNumber":1344,"author":{"gitId":"-"},"content":""},{"lineNumber":1345,"author":{"gitId":"-"},"content":"// tag::teamDisplay[]"},{"lineNumber":1346,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Team Display Bar `[since v1.3]`"},{"lineNumber":1347,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1348,"author":{"gitId":"-"},"content":""},{"lineNumber":1349,"author":{"gitId":"codeeong"},"content":"The Team Display Bar is implemented as `TeamDisplay` in the UI Component and renders `TeamDisplay.fxml`."},{"lineNumber":1350,"author":{"gitId":"codeeong"},"content":"It is called from `MainWindow` and highlights"},{"lineNumber":1351,"author":{"gitId":"codeeong"},"content":"the current team that has been selected in the Command Line Interface by the user. +"},{"lineNumber":1352,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1353,"author":{"gitId":"codeeong"},"content":"It calls the `Team` model and displays the `Player` cards associated with that `Team`."},{"lineNumber":1354,"author":{"gitId":"codeeong"},"content":"It contains event handler methods such as handleShowNewTeamEvent(), handleHighlightSelectedTeamEvent(),"},{"lineNumber":1355,"author":{"gitId":"codeeong"},"content":"and handleDeselectTeamEvent(), which update the UI accordingly. +"},{"lineNumber":1356,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1357,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `TeamDisplay` below, using the example of a `create` command:"},{"lineNumber":1358,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1359,"author":{"gitId":"codeeong"},"content":".Component interactions for `create Team` command"},{"lineNumber":1360,"author":{"gitId":"codeeong"},"content":"image::ShowNewTeamDiagram.png[width\u003d\"800\"]"},{"lineNumber":1361,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1362,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1363,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027TeamDisplay\u0027 to show initialisation of UI component and event handlers:"},{"lineNumber":1364,"author":{"gitId":"-"},"content":""},{"lineNumber":1365,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1366,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1367,"author":{"gitId":"-"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {"},{"lineNumber":1368,"author":{"gitId":"-"},"content":""},{"lineNumber":1369,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";"},{"lineNumber":1370,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1371,"author":{"gitId":"-"},"content":" public TeamDisplay() {"},{"lineNumber":1372,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":1373,"author":{"gitId":"codeeong"},"content":" //...initialise Teams code..."},{"lineNumber":1374,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":1375,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1376,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1377,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1378,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {"},{"lineNumber":1379,"author":{"gitId":"codeeong"},"content":" //...handleShowNewTeamEvent code..."},{"lineNumber":1380,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1381,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1382,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1383,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {"},{"lineNumber":1384,"author":{"gitId":"codeeong"},"content":" //...handleHighlightSelectedTeamEvent code..."},{"lineNumber":1385,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1386,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1387,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1388,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {"},{"lineNumber":1389,"author":{"gitId":"codeeong"},"content":" //...handleDeselectTeamEvent code..."},{"lineNumber":1390,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1391,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1392,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1393,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1394,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1395,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience"},{"lineNumber":1396,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1397,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `TeamDisplay` is placed underneath the `ResultDisplay` and above the `PersonListPanel`."},{"lineNumber":1398,"author":{"gitId":"-"},"content":"** Pros: Located at an obvious location for the user to view the team currently selected."},{"lineNumber":1399,"author":{"gitId":"-"},"content":"** Cons: There will be less space for the `ResultDisplay` and `CommandBox`."},{"lineNumber":1400,"author":{"gitId":"-"},"content":"* **Alternative 2:** `TeamDisplay` is placed on the left of the `PersonListPanel` as a vertical bar."},{"lineNumber":1401,"author":{"gitId":"-"},"content":"** Pros: There will be more space for the `ResultDisplay` and `CommandBox`."},{"lineNumber":1402,"author":{"gitId":"-"},"content":"** Cons: It is less obvious to the user as it is at the side."},{"lineNumber":1403,"author":{"gitId":"-"},"content":"// end::teamDisplay[]"},{"lineNumber":1404,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1405,"author":{"gitId":"-"},"content":"// tag::PlayerDetails[]"},{"lineNumber":1406,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Player Details Pane `[since v1.4]`"},{"lineNumber":1407,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1408,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1409,"author":{"gitId":"codeeong"},"content":"The `Player Details` pane is implemented as `PlayerDetails` in the UI Component."},{"lineNumber":1410,"author":{"gitId":"codeeong"},"content":"It is called from `PlayerListPanel`. It renders `PlayerDetails.fxml` and displays the selected `PersonCard`."},{"lineNumber":1411,"author":{"gitId":"codeeong"},"content":"It calls the `Person` model and displays the fields in the `Person` model that are not displayed in the left panel."},{"lineNumber":1412,"author":{"gitId":"codeeong"},"content":"It contains the event handler method handlePersonDetailsChangedEvent(), which updates the UI component when the `edit `"},{"lineNumber":1413,"author":{"gitId":"codeeong"},"content":"or `remark` commands are entered. +"},{"lineNumber":1414,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1415,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `PlayerDetails` below, using the example of a `remark` command:"},{"lineNumber":1416,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1417,"author":{"gitId":"codeeong"},"content":".Component interactions for `remark 1 r/test` command"},{"lineNumber":1418,"author":{"gitId":"codeeong"},"content":"image::PlayerDetailsDiagram.png[width\u003d\"800\"]"},{"lineNumber":1419,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1420,"author":{"gitId":"-"},"content":"Code snippet from \u0027PlayerDetails\u0027 to show initialisation of UI component:"},{"lineNumber":1421,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1422,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1423,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1424,"author":{"gitId":"-"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {"},{"lineNumber":1425,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1426,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";"},{"lineNumber":1427,"author":{"gitId":"-"},"content":" public final Person person;"},{"lineNumber":1428,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1429,"author":{"gitId":"-"},"content":" public PlayerDetails(Person person) {"},{"lineNumber":1430,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":1431,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":1432,"author":{"gitId":"-"},"content":" //....player details code..."},{"lineNumber":1433,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1434,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1435,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1436,"author":{"gitId":"codeeong"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {"},{"lineNumber":1437,"author":{"gitId":"codeeong"},"content":" ...handlePersonDetailsChangedEvent code..."},{"lineNumber":1438,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1439,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1440,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1441,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1442,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1443,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1444,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience"},{"lineNumber":1445,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1446,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `PlayerDetails` is placed on the right of `Person List Panel`, replacing the `BrowserPanel`."},{"lineNumber":1447,"author":{"gitId":"-"},"content":"** Pros: It is the only large unused space in the software left and is right beside the `Person List Panel`, thus is the logical"},{"lineNumber":1448,"author":{"gitId":"-"},"content":"place to look at after selection of a person card."},{"lineNumber":1449,"author":{"gitId":"-"},"content":"** Cons: This is a lot of whitespace in the pane as are not many fields."},{"lineNumber":1450,"author":{"gitId":"-"},"content":"* **Alternative 2:** `PlayerDetails` pane size is reduced and the extra space is repurposed."},{"lineNumber":1451,"author":{"gitId":"-"},"content":"** Pros: There will be more space for another new feature e.g. calendar."},{"lineNumber":1452,"author":{"gitId":"-"},"content":"** Cons: It can only be implemented in v2.0 due to time constraints in development."},{"lineNumber":1453,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1454,"author":{"gitId":"codeeong"},"content":"// end::PlayerDetails[]"},{"lineNumber":1455,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1456,"author":{"gitId":"codeeong"},"content":"// tag::changeThemeCommand[]"},{"lineNumber":1457,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Change Theme Command `[since v1.5]`"},{"lineNumber":1458,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1459,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1460,"author":{"gitId":"codeeong"},"content":"The `ChangeThemeCommand` is a new feature that allows user to change the current theme to another theme. A new css class is implemented to accommodate the new theme, LightTheme."},{"lineNumber":1461,"author":{"gitId":"codeeong"},"content":"The `MainWindow` class is also changed to contain a handleChangeThemeRequestEvent() method which is an event handler to `setAddressBookTheme`,"},{"lineNumber":1462,"author":{"gitId":"codeeong"},"content":"which is a method in `UserPrefs`. +"},{"lineNumber":1463,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1464,"author":{"gitId":"codeeong"},"content":"Below is the sequence diagram for how the `ChangeThemeCommand` works:"},{"lineNumber":1465,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1466,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `changeTheme` Command"},{"lineNumber":1467,"author":{"gitId":"codeeong"},"content":"image::ChangeThemeDiagram.png[width\u003d\"800\"]"},{"lineNumber":1468,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1469,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1470,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027ChangeThemeCommand\u0027:"},{"lineNumber":1471,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1472,"author":{"gitId":"codeeong"},"content":"[source, java]"},{"lineNumber":1473,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1474,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {"},{"lineNumber":1475,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1476,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {"},{"lineNumber":1477,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();"},{"lineNumber":1478,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1479,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1480,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":1481,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":1482,"author":{"gitId":"codeeong"},"content":" //...check for valid theme code..."},{"lineNumber":1483,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));"},{"lineNumber":1484,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));"},{"lineNumber":1485,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1486,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":1487,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1488,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1489,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1490,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Command Syntax"},{"lineNumber":1491,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1492,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** The command syntax is in the form \"changeTheme Dark\" or \"changeTheme Light\"."},{"lineNumber":1493,"author":{"gitId":"codeeong"},"content":"** Pros: This supports future implementation of more themes, so that the developer can easily add the new themes without"},{"lineNumber":1494,"author":{"gitId":"codeeong"},"content":"having to change the execution."},{"lineNumber":1495,"author":{"gitId":"codeeong"},"content":"** Cons: The command is longer than it could be. (see alternative 2)"},{"lineNumber":1496,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** The command syntax in the form \"changeTheme\", which would automatically toggle the theme."},{"lineNumber":1497,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly."},{"lineNumber":1498,"author":{"gitId":"codeeong"},"content":"** Cons: Future implementation of more themes would be harder for the developer as the toggle function would have to be"},{"lineNumber":1499,"author":{"gitId":"codeeong"},"content":"changed quite drastically to become a command for selecting a theme out of multiple themes."},{"lineNumber":1500,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1501,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience"},{"lineNumber":1502,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1503,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** `ChangeThemeCommand` is implemented as a CLI command."},{"lineNumber":1504,"author":{"gitId":"codeeong"},"content":"** Pros: Consistent with the rest of the application, of which all changes are made by the CLI."},{"lineNumber":1505,"author":{"gitId":"codeeong"},"content":"** Cons: User has yet another command to remember the syntax of."},{"lineNumber":1506,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** Change of theme is implemented as a button to change onClick."},{"lineNumber":1507,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly."},{"lineNumber":1508,"author":{"gitId":"codeeong"},"content":"** Cons: Inconsistent with the rest of the application, which is CLI-based."},{"lineNumber":1509,"author":{"gitId":"codeeong"},"content":"// end::changeThemeCommand[]"},{"lineNumber":1510,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1511,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1512,"author":{"gitId":"codeeong"},"content":"// tag::settagcolour[]"},{"lineNumber":1513,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Set Tag Colour feature `[since v1.1]`"},{"lineNumber":1514,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1515,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1516,"author":{"gitId":"codeeong"},"content":"The `Set` Command is an entirely new command that allows the user to assign a colour to a specific tag."},{"lineNumber":1517,"author":{"gitId":"codeeong"},"content":"This mechanism is facilitated by the `SetCommandParser`, which creates and returns a new `SetCommand`."},{"lineNumber":1518,"author":{"gitId":"codeeong"},"content":"In `SetCommandParser`, which implements the `Parser` interface, it parses the arguments inputted into the CLI, and checks whether the arguments are valid."},{"lineNumber":1519,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1520,"author":{"gitId":"codeeong"},"content":"`SetCommandParser` is implemented as such:"},{"lineNumber":1521,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1522,"author":{"gitId":"codeeong"},"content":"[source, java]"},{"lineNumber":1523,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1524,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {"},{"lineNumber":1525,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1526,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {"},{"lineNumber":1527,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1528,"author":{"gitId":"codeeong"},"content":" // ...parse arguments and check for invalid arguments..."},{"lineNumber":1529,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1530,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":1531,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1532,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1533,"author":{"gitId":"codeeong"},"content":"`SetCommand` inherits the abstract `Command` class. After `execute()` is called in `SetCommand`, the tag colour is set through the logic portions of `ModelManager` and `AddressBook`, then"},{"lineNumber":1534,"author":{"gitId":"codeeong"},"content":"lastly changes `tagColour` attribute within the `Tag` object itself. It also posts an event in `SetCommand`, to which"},{"lineNumber":1535,"author":{"gitId":"codeeong"},"content":"its handler in `PersonCard` responds and performs the UI update. +"},{"lineNumber":1536,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1537,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1538,"author":{"gitId":"codeeong"},"content":"`SetCommand` is implemented in this way:"},{"lineNumber":1539,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1540,"author":{"gitId":"codeeong"},"content":"[source, java]"},{"lineNumber":1541,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1542,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {"},{"lineNumber":1543,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1544,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;"},{"lineNumber":1545,"author":{"gitId":"codeeong"},"content":" private final String tagColour;"},{"lineNumber":1546,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1547,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {"},{"lineNumber":1548,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);"},{"lineNumber":1549,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;"},{"lineNumber":1550,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;"},{"lineNumber":1551,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1552,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1553,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":1554,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {"},{"lineNumber":1555,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);"},{"lineNumber":1556,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);"},{"lineNumber":1557,"author":{"gitId":"codeeong"},"content":" //...check for valid tagName code...."},{"lineNumber":1558,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));"},{"lineNumber":1559,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));"},{"lineNumber":1560,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1561,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":1562,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1563,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1564,"author":{"gitId":"codeeong"},"content":"The following sequence diagram shows how the set command operation works:"},{"lineNumber":1565,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1566,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `setTagColour` Command"},{"lineNumber":1567,"author":{"gitId":"codeeong"},"content":"image::SetTagCommandDiagram.png[width\u003d\"800\"]"},{"lineNumber":1568,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1569,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1570,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Command` vs `UndoableCommand`"},{"lineNumber":1571,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1572,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** Inherit from `Command`."},{"lineNumber":1573,"author":{"gitId":"codeeong"},"content":"** Pros: Does not involve complicated undo/redo tests, simple and quicker implementation,"},{"lineNumber":1574,"author":{"gitId":"codeeong"},"content":"lessen chances of mistakes made in implementation."},{"lineNumber":1575,"author":{"gitId":"codeeong"},"content":"** Cons: User cannot use the `undo/redo` command."},{"lineNumber":1576,"author":{"gitId":"codeeong"},"content":"* **Alternative 2 :** Inherit from `UndoableCommand`."},{"lineNumber":1577,"author":{"gitId":"codeeong"},"content":"** Pros: User can utilise the `undo/redo` command."},{"lineNumber":1578,"author":{"gitId":"codeeong"},"content":"** Cons: Hard for developers to implement extra tests, not very necessary as users can just as easily type"},{"lineNumber":1579,"author":{"gitId":"codeeong"},"content":"out the colour they would like to change their tag to; it is a short command, especially with the `stc` alias."},{"lineNumber":1580,"author":{"gitId":"codeeong"},"content":"// end::settagcolour[]"},{"lineNumber":1581,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1582,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation"},{"lineNumber":1583,"author":{"gitId":"-"},"content":""},{"lineNumber":1584,"author":{"gitId":"-"},"content":"We use https://asciidoctor.org[asciidoc] for writing documentation."},{"lineNumber":1585,"author":{"gitId":"-"},"content":""},{"lineNumber":1586,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1587,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting."},{"lineNumber":1588,"author":{"gitId":"-"},"content":""},{"lineNumber":1589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation"},{"lineNumber":1590,"author":{"gitId":"-"},"content":""},{"lineNumber":1591,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits."},{"lineNumber":1592,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time."},{"lineNumber":1593,"author":{"gitId":"-"},"content":""},{"lineNumber":1594,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation"},{"lineNumber":1595,"author":{"gitId":"-"},"content":""},{"lineNumber":1596,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis."},{"lineNumber":1597,"author":{"gitId":"-"},"content":""},{"lineNumber":1598,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format"},{"lineNumber":1599,"author":{"gitId":"-"},"content":""},{"lineNumber":1600,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages."},{"lineNumber":1601,"author":{"gitId":"-"},"content":""},{"lineNumber":1602,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format."},{"lineNumber":1603,"author":{"gitId":"-"},"content":""},{"lineNumber":1604,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format."},{"lineNumber":1605,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`."},{"lineNumber":1606,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu."},{"lineNumber":1607,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below."},{"lineNumber":1608,"author":{"gitId":"-"},"content":""},{"lineNumber":1609,"author":{"gitId":"-"},"content":".Saving documentation as PDF files in Chrome"},{"lineNumber":1610,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]"},{"lineNumber":1611,"author":{"gitId":"-"},"content":""},{"lineNumber":1612,"author":{"gitId":"-"},"content":"[[Testing]]"},{"lineNumber":1613,"author":{"gitId":"-"},"content":"\u003d\u003d Testing"},{"lineNumber":1614,"author":{"gitId":"codeeong"},"content":"If you are intending to develop our software further, it is highly recommended that you run tests in the ways listed below."},{"lineNumber":1615,"author":{"gitId":"-"},"content":""},{"lineNumber":1616,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests"},{"lineNumber":1617,"author":{"gitId":"-"},"content":""},{"lineNumber":1618,"author":{"gitId":"-"},"content":"There are three ways to run tests."},{"lineNumber":1619,"author":{"gitId":"-"},"content":""},{"lineNumber":1620,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":1621,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies."},{"lineNumber":1622,"author":{"gitId":"-"},"content":""},{"lineNumber":1623,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*"},{"lineNumber":1624,"author":{"gitId":"-"},"content":""},{"lineNumber":1625,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`"},{"lineNumber":1626,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`"},{"lineNumber":1627,"author":{"gitId":"-"},"content":""},{"lineNumber":1628,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*"},{"lineNumber":1629,"author":{"gitId":"-"},"content":""},{"lineNumber":1630,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)"},{"lineNumber":1631,"author":{"gitId":"-"},"content":""},{"lineNumber":1632,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1633,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle."},{"lineNumber":1634,"author":{"gitId":"-"},"content":""},{"lineNumber":1635,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*"},{"lineNumber":1636,"author":{"gitId":"-"},"content":""},{"lineNumber":1637,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running."},{"lineNumber":1638,"author":{"gitId":"-"},"content":""},{"lineNumber":1639,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)"},{"lineNumber":1640,"author":{"gitId":"-"},"content":""},{"lineNumber":1641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests"},{"lineNumber":1642,"author":{"gitId":"-"},"content":""},{"lineNumber":1643,"author":{"gitId":"-"},"content":"We have two types of tests:"},{"lineNumber":1644,"author":{"gitId":"-"},"content":""},{"lineNumber":1645,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,"},{"lineNumber":1646,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package."},{"lineNumber":1647,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package."},{"lineNumber":1648,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,"},{"lineNumber":1649,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +"},{"lineNumber":1650,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`"},{"lineNumber":1651,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +"},{"lineNumber":1652,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`"},{"lineNumber":1653,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +"},{"lineNumber":1654,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`"},{"lineNumber":1655,"author":{"gitId":"-"},"content":""},{"lineNumber":1656,"author":{"gitId":"-"},"content":""},{"lineNumber":1657,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing"},{"lineNumber":1658,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**"},{"lineNumber":1659,"author":{"gitId":"-"},"content":""},{"lineNumber":1660,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing."},{"lineNumber":1661,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`."},{"lineNumber":1662,"author":{"gitId":"-"},"content":""},{"lineNumber":1663,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops"},{"lineNumber":1664,"author":{"gitId":"codeeong"},"content":"This section covers resources for you to develop this software with good practices and prepare it for release."},{"lineNumber":1665,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation"},{"lineNumber":1667,"author":{"gitId":"-"},"content":""},{"lineNumber":1668,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation."},{"lineNumber":1669,"author":{"gitId":"-"},"content":""},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration"},{"lineNumber":1671,"author":{"gitId":"-"},"content":""},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details."},{"lineNumber":1673,"author":{"gitId":"-"},"content":""},{"lineNumber":1674,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coverage Reporting"},{"lineNumber":1675,"author":{"gitId":"-"},"content":""},{"lineNumber":1676,"author":{"gitId":"-"},"content":"We use https://coveralls.io/[Coveralls] to track the code coverage of our projects. See \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e for more details."},{"lineNumber":1677,"author":{"gitId":"-"},"content":""},{"lineNumber":1678,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Documentation Previews"},{"lineNumber":1679,"author":{"gitId":"-"},"content":"When a pull request has changes to asciidoc files, you can use https://www.netlify.com/[Netlify] to see a preview of how the HTML version of those asciidoc files will look like when the pull request is merged. See \u003c\u003cUsingNetlify#, UsingNetlify.adoc\u003e\u003e for more details."},{"lineNumber":1680,"author":{"gitId":"-"},"content":""},{"lineNumber":1681,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release"},{"lineNumber":1682,"author":{"gitId":"-"},"content":""},{"lineNumber":1683,"author":{"gitId":"-"},"content":"Here are the steps to create a new release."},{"lineNumber":1684,"author":{"gitId":"-"},"content":""},{"lineNumber":1685,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]."},{"lineNumber":1686,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e."},{"lineNumber":1687,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`"},{"lineNumber":1688,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created."},{"lineNumber":1689,"author":{"gitId":"-"},"content":""},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies"},{"lineNumber":1691,"author":{"gitId":"-"},"content":""},{"lineNumber":1692,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +"},{"lineNumber":1693,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +"},{"lineNumber":1694,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)"},{"lineNumber":1695,"author":{"gitId":"-"},"content":""},{"lineNumber":1696,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d Product Scope"},{"lineNumber":1698,"author":{"gitId":"-"},"content":""},{"lineNumber":1699,"author":{"gitId":"codeeong"},"content":"This section tells you more details of our software, our target users, the user stories, and gives you a sneak peak into our development process."},{"lineNumber":1700,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1701,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Target user profile:"},{"lineNumber":1702,"author":{"gitId":"-"},"content":""},{"lineNumber":1703,"author":{"gitId":"lohtianwei"},"content":"* football team managers"},{"lineNumber":1704,"author":{"gitId":"-"},"content":"* has a need to manage a significant number of contacts"},{"lineNumber":1705,"author":{"gitId":"-"},"content":"* prefer desktop apps over other types"},{"lineNumber":1706,"author":{"gitId":"-"},"content":"* can type fast"},{"lineNumber":1707,"author":{"gitId":"-"},"content":"* prefers typing over mouse input"},{"lineNumber":1708,"author":{"gitId":"-"},"content":"* is reasonably comfortable using CLI apps"},{"lineNumber":1709,"author":{"gitId":"-"},"content":""},{"lineNumber":1710,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Value proposition:"},{"lineNumber":1711,"author":{"gitId":"codeeong"},"content":"Exclusive application for management of footballers and football teams that provides an enhanced listing of footballers and convenient lookup on updated information of players."},{"lineNumber":1712,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1713,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Feature Contribution"},{"lineNumber":1714,"author":{"gitId":"codeeong"},"content":"* Codee +"},{"lineNumber":1715,"author":{"gitId":"-"},"content":"** Major - Revamp MTM’s whole GUI for ease of viewing teams and players’ details."},{"lineNumber":1716,"author":{"gitId":"-"},"content":"*** e.g. remove browser panel, add player details panel, change person card."},{"lineNumber":1717,"author":{"gitId":"-"},"content":"** Minor - Command to set the colour of tags to colour of choice."},{"lineNumber":1718,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1719,"author":{"gitId":"codeeong"},"content":"* Jordan"},{"lineNumber":1720,"author":{"gitId":"-"},"content":"** Major - Implementation of Team Component and Related Functions."},{"lineNumber":1721,"author":{"gitId":"-"},"content":"*** e.g. creation of team, assignment of players, viewing of teams, removal of team, renaming of team."},{"lineNumber":1722,"author":{"gitId":"codeeong"},"content":"** Minor"},{"lineNumber":1723,"author":{"gitId":"-"},"content":"*** Introduce `remark` command and `remark` field."},{"lineNumber":1724,"author":{"gitId":"-"},"content":"*** Enhanced add functionality to allow optional fields."},{"lineNumber":1725,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1726,"author":{"gitId":"codeeong"},"content":"* Syafiq"},{"lineNumber":1727,"author":{"gitId":"-"},"content":"** Major - Create a new player class that contains more information about the players."},{"lineNumber":1728,"author":{"gitId":"-"},"content":"*** e.g. Position, Rating (0 - 5 Star), Remarks"},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*** Update add, edit ,list, sort to include these fields accordingly."},{"lineNumber":1730,"author":{"gitId":"codeeong"},"content":"** Minor - Autocomplete command"},{"lineNumber":1731,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1732,"author":{"gitId":"codeeong"},"content":"* Tianwei"},{"lineNumber":1733,"author":{"gitId":"codeeong"},"content":"** Major - privacy"},{"lineNumber":1734,"author":{"gitId":"codeeong"},"content":"*** Set private field and passwords"},{"lineNumber":1735,"author":{"gitId":"codeeong"},"content":"*** Make accounts"},{"lineNumber":1736,"author":{"gitId":"codeeong"},"content":"** Minor - Sorting players by different fields"},{"lineNumber":1737,"author":{"gitId":"-"},"content":""},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1739,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories"},{"lineNumber":1740,"author":{"gitId":"-"},"content":""},{"lineNumber":1741,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`"},{"lineNumber":1742,"author":{"gitId":"-"},"content":""},{"lineNumber":1743,"author":{"gitId":"-"},"content":"[width\u003d\"75%\",cols\u003d\"^8%,^23%,\u003c25%,\u003c30%\",options\u003d\"header\",]"},{"lineNumber":1744,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1745,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can..."},{"lineNumber":1746,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1747,"author":{"gitId":"-"},"content":"4.1+^s|First Time User Stories"},{"lineNumber":1748,"author":{"gitId":"-"},"content":""},{"lineNumber":1749,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App"},{"lineNumber":1750,"author":{"gitId":"-"},"content":""},{"lineNumber":1751,"author":{"gitId":"-"},"content":"|`* * *` |new user |access the user guide |find out how to use fancy features of the application"},{"lineNumber":1752,"author":{"gitId":"-"},"content":""},{"lineNumber":1753,"author":{"gitId":"-"},"content":"|`* * *` |new user |see a list of instructions available |navigate and use the application easily"},{"lineNumber":1754,"author":{"gitId":"-"},"content":""},{"lineNumber":1755,"author":{"gitId":"-"},"content":"4.1+^s|Player Related User Stories"},{"lineNumber":1756,"author":{"gitId":"-"},"content":""},{"lineNumber":1757,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add a new player|"},{"lineNumber":1758,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1759,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s address |mail him important documents"},{"lineNumber":1760,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1761,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s contact number |contact him when needed"},{"lineNumber":1762,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1763,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s email |email him when needed"},{"lineNumber":1764,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1765,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s jersey number |easily identify them during the game"},{"lineNumber":1766,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1767,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s position |easily pick my lineup for match"},{"lineNumber":1768,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1769,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player\u0027s ratings |easily identify the better players"},{"lineNumber":1770,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1771,"author":{"gitId":"-"},"content":"|`* * *` |team manager |delete a player |remove him if I kick him out from the team or he quits"},{"lineNumber":1772,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1773,"author":{"gitId":"-"},"content":"|`* * *` |team manager |find a player by name |locate details of players without having to go through the entire list"},{"lineNumber":1774,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1775,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s contact number |"},{"lineNumber":1776,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1777,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s email |"},{"lineNumber":1778,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1779,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s jersey number |"},{"lineNumber":1780,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1781,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s match stats (e.g. goals scored) |decide the lineup, give award"},{"lineNumber":1782,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1783,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player remarks |for self note"},{"lineNumber":1784,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1785,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s avatar |for facial recognition"},{"lineNumber":1786,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1787,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s position |easily pick my lineup for match"},{"lineNumber":1788,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1789,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s address |"},{"lineNumber":1790,"author":{"gitId":"-"},"content":""},{"lineNumber":1791,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s avatar |"},{"lineNumber":1792,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1793,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player remarks |for self note"},{"lineNumber":1794,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1795,"author":{"gitId":"-"},"content":"|`* *` |team manager |hide \u003c\u003cprivate-contact-detail,private contact details\u003e\u003e by default |minimize chance of someone else seeing them by accident"},{"lineNumber":1796,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1797,"author":{"gitId":"-"},"content":"|`*` |team manager |edit player’s name |"},{"lineNumber":1798,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1799,"author":{"gitId":"-"},"content":"|`*` |team manager with many players in the team managing application |sort by player name |locate a person easily"},{"lineNumber":1800,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1801,"author":{"gitId":"-"},"content":"4.1+^s|Team Related User Stories"},{"lineNumber":1802,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1803,"author":{"gitId":"-"},"content":"|`* * *` |team manager |create teams |organize and manage my players through their respective team"},{"lineNumber":1804,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1805,"author":{"gitId":"-"},"content":"|`* * *` |team manager |assign player to teams |identify the team that the player is playing for"},{"lineNumber":1806,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1807,"author":{"gitId":"-"},"content":"|`* * *` |team manager |view players in specified team |identify the lineup of the team and which player belongs to which team"},{"lineNumber":1808,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1809,"author":{"gitId":"-"},"content":"|`* * *` |team manager |remove teams |remove teams that I no longer managed"},{"lineNumber":1810,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1811,"author":{"gitId":"-"},"content":"|`* *` |team manager |set match with competing team |acknowledge and plan training session for the team"},{"lineNumber":1812,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1813,"author":{"gitId":"-"},"content":"|`* *` |team manager |view upcoming match |keep track of the upcoming matches with opponent teams"},{"lineNumber":1814,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1815,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s allocated team |move players between teams"},{"lineNumber":1816,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1817,"author":{"gitId":"-"},"content":"|`* *` |team manager |schedule training programs for team |I do not have any conflicting schedule between different teams"},{"lineNumber":1818,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1819,"author":{"gitId":"-"},"content":"|`* *` |team manager |send reminder to team of schedule |my players does not forget about training session"},{"lineNumber":1820,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1821,"author":{"gitId":"-"},"content":"|`*` |team manager |sort by team name |identify group lineup easily"},{"lineNumber":1822,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1823,"author":{"gitId":"-"},"content":"4.1+^s|Additional User Stories"},{"lineNumber":1824,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1825,"author":{"gitId":"-"},"content":"|`* *` |team manager who remembers better with visual |set colours to tags |easily identify the tag that I have set to players"},{"lineNumber":1826,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1827,"author":{"gitId":"-"},"content":"|`* *` |team manager |autofill command |perform task quickly"},{"lineNumber":1828,"author":{"gitId":"-"},"content":""},{"lineNumber":1829,"author":{"gitId":"-"},"content":"|`* *` |team manager |password login |if team manager wants to protect certain information"},{"lineNumber":1830,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1831,"author":{"gitId":"-"},"content":"|`* *` |team manager |submit feedback to developers |developers can improve the application constantly"},{"lineNumber":1832,"author":{"gitId":"-"},"content":""},{"lineNumber":1833,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1834,"author":{"gitId":"-"},"content":""},{"lineNumber":1835,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1836,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases"},{"lineNumber":1837,"author":{"gitId":"-"},"content":""},{"lineNumber":1838,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `MTM` and the *Team Manager* is the `user`, unless specified otherwise)"},{"lineNumber":1839,"author":{"gitId":"-"},"content":""},{"lineNumber":1840,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1841,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Add player"},{"lineNumber":1842,"author":{"gitId":"-"},"content":""},{"lineNumber":1843,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1844,"author":{"gitId":"-"},"content":""},{"lineNumber":1845,"author":{"gitId":"-"},"content":"1. User enter command to add"},{"lineNumber":1846,"author":{"gitId":"-"},"content":"2. MTM prompt user of format to enter player\u0027s name and details"},{"lineNumber":1847,"author":{"gitId":"-"},"content":"3. User enter player\u0027s name and details in required format"},{"lineNumber":1848,"author":{"gitId":"-"},"content":"4. User press enter to insert person into storage"},{"lineNumber":1849,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1850,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1851,"author":{"gitId":"-"},"content":""},{"lineNumber":1852,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1853,"author":{"gitId":"-"},"content":""},{"lineNumber":1854,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1855,"author":{"gitId":"-"},"content":"* 4a. User did not enter any details."},{"lineNumber":1856,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1857,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1858,"author":{"gitId":"-"},"content":"** 4a1. MTM inform user that it is an invalid add command."},{"lineNumber":1859,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1860,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1861,"author":{"gitId":"-"},"content":""},{"lineNumber":1862,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1863,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Edit player\u0027s team"},{"lineNumber":1864,"author":{"gitId":"-"},"content":""},{"lineNumber":1865,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1866,"author":{"gitId":"-"},"content":""},{"lineNumber":1867,"author":{"gitId":"-"},"content":"1. User enter command to find"},{"lineNumber":1868,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name"},{"lineNumber":1869,"author":{"gitId":"-"},"content":"3. MTM display list of players found"},{"lineNumber":1870,"author":{"gitId":"-"},"content":"4. User enter command to edit player\u0027s team using index of displayed list"},{"lineNumber":1871,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1872,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1873,"author":{"gitId":"-"},"content":""},{"lineNumber":1874,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1875,"author":{"gitId":"-"},"content":""},{"lineNumber":1876,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1877,"author":{"gitId":"-"},"content":"* 2a. Player name does not exist."},{"lineNumber":1878,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1879,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1880,"author":{"gitId":"-"},"content":"** 2a1. MTM inform user that player does not exist."},{"lineNumber":1881,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1882,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1883,"author":{"gitId":"-"},"content":""},{"lineNumber":1884,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Find player by team name"},{"lineNumber":1886,"author":{"gitId":"-"},"content":""},{"lineNumber":1887,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1888,"author":{"gitId":"-"},"content":""},{"lineNumber":1889,"author":{"gitId":"-"},"content":"1. User enter command to find team"},{"lineNumber":1890,"author":{"gitId":"-"},"content":"2. User enter team name"},{"lineNumber":1891,"author":{"gitId":"-"},"content":"3. MTM display list of players in team"},{"lineNumber":1892,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1893,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1894,"author":{"gitId":"-"},"content":""},{"lineNumber":1895,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1896,"author":{"gitId":"-"},"content":""},{"lineNumber":1897,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1898,"author":{"gitId":"-"},"content":"* 2a. Team name does not exist."},{"lineNumber":1899,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1900,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1901,"author":{"gitId":"-"},"content":"** 2a1. MTM informs user that team name does not exist"},{"lineNumber":1902,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1903,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1904,"author":{"gitId":"-"},"content":""},{"lineNumber":1905,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1906,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Remove player from team"},{"lineNumber":1907,"author":{"gitId":"-"},"content":""},{"lineNumber":1908,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1909,"author":{"gitId":"-"},"content":""},{"lineNumber":1910,"author":{"gitId":"-"},"content":"1. User enter command to find"},{"lineNumber":1911,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name"},{"lineNumber":1912,"author":{"gitId":"-"},"content":"3. MTM display list of players found"},{"lineNumber":1913,"author":{"gitId":"-"},"content":"4. User enter remove command and index associated with player"},{"lineNumber":1914,"author":{"gitId":"-"},"content":"5. MTM displays player that is removed and updated list of players"},{"lineNumber":1915,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1916,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1917,"author":{"gitId":"-"},"content":""},{"lineNumber":1918,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1919,"author":{"gitId":"-"},"content":""},{"lineNumber":1920,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1921,"author":{"gitId":"-"},"content":"* 4a. Invalid index entered."},{"lineNumber":1922,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1923,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1924,"author":{"gitId":"-"},"content":"** 4a1. MTM informs user that index is invalid."},{"lineNumber":1925,"author":{"gitId":"-"},"content":"** 4a2. User enters valid index."},{"lineNumber":1926,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1927,"author":{"gitId":"-"},"content":"Use case resumes at step 5."},{"lineNumber":1928,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1929,"author":{"gitId":"-"},"content":"* 4b. User removes wrong index unintentionally."},{"lineNumber":1930,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1931,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1932,"author":{"gitId":"-"},"content":"** 4b1. User undo remove by entering command to undo."},{"lineNumber":1933,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1934,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1935,"author":{"gitId":"-"},"content":""},{"lineNumber":1936,"author":{"gitId":"-"},"content":"_{More to be added}_"},{"lineNumber":1937,"author":{"gitId":"-"},"content":""},{"lineNumber":1938,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1939,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements"},{"lineNumber":1940,"author":{"gitId":"-"},"content":""},{"lineNumber":1941,"author":{"gitId":"codeeong"},"content":". Should work on any mainstream OS as long as it has Java 1.8.0_60 or higher installed."},{"lineNumber":1942,"author":{"gitId":"-"},"content":". Should be able to hold up to 150 players without a noticeable sluggishness in performance for typical usage."},{"lineNumber":1943,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse."},{"lineNumber":1944,"author":{"gitId":"codeeong"},"content":". Works on both 32-bit and 64-bit machines"},{"lineNumber":1945,"author":{"gitId":"codeeong"},"content":". Should respond within 1 second of query"},{"lineNumber":1946,"author":{"gitId":"codeeong"},"content":". Should be intuitive and easy to use for a first-time user."},{"lineNumber":1947,"author":{"gitId":"codeeong"},"content":". Should be able to handle any sort of input, i.e. should recover from invalid input."},{"lineNumber":1948,"author":{"gitId":"codeeong"},"content":". Should have audience-focused user guides and developer guides."},{"lineNumber":1949,"author":{"gitId":"codeeong"},"content":". Should have command names that concisely describe their function."},{"lineNumber":1950,"author":{"gitId":"codeeong"},"content":". Should be an open-source project."},{"lineNumber":1951,"author":{"gitId":"codeeong"},"content":". Development be cost effective or free."},{"lineNumber":1952,"author":{"gitId":"codeeong"},"content":". App should be able to work offline."},{"lineNumber":1953,"author":{"gitId":"-"},"content":". Should save and backup the state of the team managing application regularly."},{"lineNumber":1954,"author":{"gitId":"codeeong"},"content":". Current versions must be backward compatible with older versions to support undo."},{"lineNumber":1955,"author":{"gitId":"codeeong"},"content":". The user interface should be simple and minimise distractions so that user can continue with their work in a focused manner."},{"lineNumber":1956,"author":{"gitId":"-"},"content":""},{"lineNumber":1957,"author":{"gitId":"-"},"content":""},{"lineNumber":1958,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1959,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary"},{"lineNumber":1960,"author":{"gitId":"-"},"content":""},{"lineNumber":1961,"author":{"gitId":"-"},"content":"[[mainstream-os]] Mainstream OS::"},{"lineNumber":1962,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X"},{"lineNumber":1963,"author":{"gitId":"-"},"content":""},{"lineNumber":1964,"author":{"gitId":"-"},"content":"[[private-contact-detail]] Private contact detail::"},{"lineNumber":1965,"author":{"gitId":"-"},"content":"A contact detail that is not meant to be shared with others"},{"lineNumber":1966,"author":{"gitId":"-"},"content":""},{"lineNumber":1967,"author":{"gitId":"-"},"content":"[[lineuo]] Lineup::"},{"lineNumber":1968,"author":{"gitId":"-"},"content":"A list of players that are playing for a match, with their positions specified"},{"lineNumber":1969,"author":{"gitId":"-"},"content":""},{"lineNumber":1970,"author":{"gitId":"-"},"content":"[[user-guide]] User Guide::"},{"lineNumber":1971,"author":{"gitId":"-"},"content":"A documentation on the functionality and usability of MTM"},{"lineNumber":1972,"author":{"gitId":"-"},"content":""},{"lineNumber":1973,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1974,"author":{"gitId":"-"},"content":"\u003d\u003d Instructions for Manual Testing"},{"lineNumber":1975,"author":{"gitId":"-"},"content":""},{"lineNumber":1976,"author":{"gitId":"-"},"content":"Given below are instructions to test the app manually."},{"lineNumber":1977,"author":{"gitId":"-"},"content":""},{"lineNumber":1978,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1979,"author":{"gitId":"-"},"content":"These instructions only provide a starting point for testers to work on; testers are expected to do more _exploratory_ testing."},{"lineNumber":1980,"author":{"gitId":"-"},"content":""},{"lineNumber":1981,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Launch and Shutdown"},{"lineNumber":1982,"author":{"gitId":"-"},"content":""},{"lineNumber":1983,"author":{"gitId":"-"},"content":". Initial launch"},{"lineNumber":1984,"author":{"gitId":"-"},"content":""},{"lineNumber":1985,"author":{"gitId":"-"},"content":".. Download the jar file and copy into an empty folder"},{"lineNumber":1986,"author":{"gitId":"-"},"content":".. Double-click the jar file +"},{"lineNumber":1987,"author":{"gitId":"-"},"content":" Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum."},{"lineNumber":1988,"author":{"gitId":"-"},"content":""},{"lineNumber":1989,"author":{"gitId":"-"},"content":". Saving window preferences"},{"lineNumber":1990,"author":{"gitId":"-"},"content":""},{"lineNumber":1991,"author":{"gitId":"-"},"content":".. Resize the window to an optimum size. Move the window to a different location. Close the window."},{"lineNumber":1992,"author":{"gitId":"-"},"content":".. Re-launch the app by double-clicking the jar file. +"},{"lineNumber":1993,"author":{"gitId":"-"},"content":" Expected: The most recent window size and location is retained."},{"lineNumber":1994,"author":{"gitId":"-"},"content":""},{"lineNumber":1995,"author":{"gitId":"-"},"content":"_{ more test cases ... }_"},{"lineNumber":1996,"author":{"gitId":"-"},"content":""},{"lineNumber":1997,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Deleting a player"},{"lineNumber":1998,"author":{"gitId":"-"},"content":""},{"lineNumber":1999,"author":{"gitId":"codeeong"},"content":". Deleting a player while all players are listed"},{"lineNumber":2000,"author":{"gitId":"-"},"content":""},{"lineNumber":2001,"author":{"gitId":"codeeong"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list."},{"lineNumber":2002,"author":{"gitId":"-"},"content":".. Test case: `delete 1` +"},{"lineNumber":2003,"author":{"gitId":"codeeong"},"content":" Expected: First player is deleted from the list. Details of the deleted player shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2004,"author":{"gitId":"-"},"content":".. Test case: `delete 0` +"},{"lineNumber":2005,"author":{"gitId":"-"},"content":" Expected: No person is deleted. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2006,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `delete`, `delete x` (where x is larger than the list size) _{give more}_ +"},{"lineNumber":2007,"author":{"gitId":"-"},"content":" Expected: Similar to previous."},{"lineNumber":2008,"author":{"gitId":"-"},"content":""},{"lineNumber":2009,"author":{"gitId":"-"},"content":"_{ more test cases ... }_"},{"lineNumber":2010,"author":{"gitId":"-"},"content":""},{"lineNumber":2011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving data"},{"lineNumber":2012,"author":{"gitId":"-"},"content":""},{"lineNumber":2013,"author":{"gitId":"-"},"content":". Dealing with missing/corrupted data files"},{"lineNumber":2014,"author":{"gitId":"-"},"content":""},{"lineNumber":2015,"author":{"gitId":"-"},"content":".. _{explain how to simulate a missing/corrupted file and the expected behavior}_"},{"lineNumber":2016,"author":{"gitId":"-"},"content":""},{"lineNumber":2017,"author":{"gitId":"-"},"content":"_{ more test cases ... }_"},{"lineNumber":2018,"author":{"gitId":"-"},"content":""},{"lineNumber":2019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Remarking a player"},{"lineNumber":2020,"author":{"gitId":"-"},"content":""},{"lineNumber":2021,"author":{"gitId":"-"},"content":". Remarking a player while all players are listed"},{"lineNumber":2022,"author":{"gitId":"-"},"content":""},{"lineNumber":2023,"author":{"gitId":"-"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list."},{"lineNumber":2024,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/This is my remark to you.` +"},{"lineNumber":2025,"author":{"gitId":"-"},"content":"Expected: First player is remarked from the list. Details of the remarked player shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2026,"author":{"gitId":"-"},"content":".. Test case: `remark 0` +"},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Expected: No person is remarked. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2028,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `remark`, `remark x` (where x is larger than the list size), `remark -1`, `remark 2 x/` (where x is not the prefix for remark) +"},{"lineNumber":2029,"author":{"gitId":"-"},"content":"Expected: Similar to previous."},{"lineNumber":2030,"author":{"gitId":"-"},"content":".. Test case: `remark 1` +"},{"lineNumber":2031,"author":{"gitId":"-"},"content":"Expected: First player has its remark removed. Details of the remarked player shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2032,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/I want to delete this.` -\u003e `remark 1 r/` +"},{"lineNumber":2033,"author":{"gitId":"-"},"content":"Expected: Similar to previous."},{"lineNumber":2034,"author":{"gitId":"-"},"content":""},{"lineNumber":2035,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a player without all fields"},{"lineNumber":2036,"author":{"gitId":"-"},"content":""},{"lineNumber":2037,"author":{"gitId":"-"},"content":". Adding a player where player is unique"},{"lineNumber":2038,"author":{"gitId":"-"},"content":""},{"lineNumber":2039,"author":{"gitId":"-"},"content":".. Prerequisites: Newly added player must not exist in MTM."},{"lineNumber":2040,"author":{"gitId":"-"},"content":".. Test case: `add n/Tumeric Turner e/tt@tuner.com` +"},{"lineNumber":2041,"author":{"gitId":"-"},"content":"Expected: Player added into MTM and will be on the list. Details of the newly added player shown in the status message. Fields that are not input during addition are replaced with `\u003cUNSPECIFIED\u003e` Timestamp in the status bar is updated."},{"lineNumber":2042,"author":{"gitId":"-"},"content":".. Test case: `add n/Guavi Hollae` +"},{"lineNumber":2043,"author":{"gitId":"-"},"content":"Expected: Player is not added into MTM. Errors details shown in status message. Name and email are compulsory fields that need to be entered for `add` to work."},{"lineNumber":2044,"author":{"gitId":"-"},"content":""},{"lineNumber":2045,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Functions"},{"lineNumber":2046,"author":{"gitId":"-"},"content":""},{"lineNumber":2047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a Team"},{"lineNumber":2048,"author":{"gitId":"-"},"content":""},{"lineNumber":2049,"author":{"gitId":"-"},"content":". Creating a Team with current existing data in MTM"},{"lineNumber":2050,"author":{"gitId":"-"},"content":""},{"lineNumber":2051,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently does not exist in MTM."},{"lineNumber":2052,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +"},{"lineNumber":2053,"author":{"gitId":"-"},"content":"Expected: Team is created and displayed in Team Display Panel. Team name will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2054,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +"},{"lineNumber":2055,"author":{"gitId":"-"},"content":"Expected: Team is not created due to team already existing in MTM. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2056,"author":{"gitId":"-"},"content":".. Test case: `create \u0026-Team-\u0026` +"},{"lineNumber":2057,"author":{"gitId":"-"},"content":"Expected: Team does not allow names with special characters, only alphanumeric, can consist of all numbers and can contain space in name. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2058,"author":{"gitId":"-"},"content":""},{"lineNumber":2059,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a Team"},{"lineNumber":2060,"author":{"gitId":"-"},"content":""},{"lineNumber":2061,"author":{"gitId":"-"},"content":". Viewing a Team with current existing data in MTM"},{"lineNumber":2062,"author":{"gitId":"-"},"content":""},{"lineNumber":2063,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM."},{"lineNumber":2064,"author":{"gitId":"-"},"content":"... Test case: `view Arsenal` +"},{"lineNumber":2065,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be updated with list of players that are in the Team. Team name will be shown in the status message."},{"lineNumber":2066,"author":{"gitId":"-"},"content":"... Test case: `view NonExistingTeam` +"},{"lineNumber":2067,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM. Error details shown in the status message."},{"lineNumber":2068,"author":{"gitId":"-"},"content":"... Test case: `view chelsea` +"},{"lineNumber":2069,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM, as team names are case sensitive. Error details shown in the status message."},{"lineNumber":2070,"author":{"gitId":"-"},"content":".. Prerequisites: The command `create NUSTeam` was executed right before executing this test case."},{"lineNumber":2071,"author":{"gitId":"-"},"content":"... Test case: `view NUSTeam` +"},{"lineNumber":2072,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be empty as no players are in the team yet. Team name will be shown in the status message."},{"lineNumber":2073,"author":{"gitId":"-"},"content":""},{"lineNumber":2074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning Players to Team"},{"lineNumber":2075,"author":{"gitId":"-"},"content":""},{"lineNumber":2076,"author":{"gitId":"-"},"content":". Assigning players to a Team after executing `create NUSTeam`"},{"lineNumber":2077,"author":{"gitId":"-"},"content":""},{"lineNumber":2078,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/1 3 5` +"},{"lineNumber":2079,"author":{"gitId":"-"},"content":"Expected: Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2080,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/3` +"},{"lineNumber":2081,"author":{"gitId":"-"},"content":"Expected: No player is assigned as player already exist in the team. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2082,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/2 3 4` +"},{"lineNumber":2083,"author":{"gitId":"-"},"content":"Expected: Only the player at index 2 is assigned. Assign command will stop once it detects that a player cannot be assigned. Team Display Panel will not be updated. Person Card of index 2 will be updated with assigned team. Timestamp in the status bar is updated."},{"lineNumber":2084,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/9 6 4` +"},{"lineNumber":2085,"author":{"gitId":"-"},"content":"Expected: All players will be assigned by ascending index order. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2086,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/7 40` +"},{"lineNumber":2087,"author":{"gitId":"-"},"content":"Expected: Index exceeding the number of players listed in the Player List Panel will be ignored. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2088,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/-1` +"},{"lineNumber":2089,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message. Team is not viewed."},{"lineNumber":2090,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam` +"},{"lineNumber":2091,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Invalid command format as no index is given. Team is not viewed."},{"lineNumber":2092,"author":{"gitId":"-"},"content":".. Test case: `assign NoTeam` +"},{"lineNumber":2093,"author":{"gitId":"-"},"content":"Expected: Error deatils shown in the status message. No such team found in MTM. Team is not viewed, player list not updated."},{"lineNumber":2094,"author":{"gitId":"-"},"content":".. Test case: `add n/Barry Putter e/bp@hotwot.com tm/NUSTeam` +"},{"lineNumber":2095,"author":{"gitId":"-"},"content":"Expected: New person is added into MTM. Team in Team Display Panel will be selected. Player list will be updated with the new added person. Timestamp in the status bar is updated."},{"lineNumber":2096,"author":{"gitId":"-"},"content":".. Test case: `add n/Himonie Branger e/hb@notwot.com tm/MissingTeam` +"},{"lineNumber":2097,"author":{"gitId":"-"},"content":"Expected: Person is not added into MTM. Team does not exist in MTM. Error details shown in the status message."},{"lineNumber":2098,"author":{"gitId":"-"},"content":""},{"lineNumber":2099,"author":{"gitId":"-"},"content":". Unassigning players from a Team"},{"lineNumber":2100,"author":{"gitId":"-"},"content":""},{"lineNumber":2101,"author":{"gitId":"-"},"content":".. Prerequisites: Players are already existing in the team"},{"lineNumber":2102,"author":{"gitId":"-"},"content":".. Test case: `view NUSTeam` -\u003e `assign i/1 2 3` +"},{"lineNumber":2103,"author":{"gitId":"-"},"content":"Expected: Player list will be updated as the specified players to be unassigned will be removed from the team. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2104,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/10 11` +"},{"lineNumber":2105,"author":{"gitId":"-"},"content":"Expected: Player list will be updated with the specified players to be unassigned will have their team name updated to `\u003cUNSPECIFIED\u003e`. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2106,"author":{"gitId":"-"},"content":".. Test case: `assign i/NUS` +"},{"lineNumber":2107,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message."},{"lineNumber":2108,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/1` +"},{"lineNumber":2109,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Player already has no team and can\u0027t be unassigned."},{"lineNumber":2110,"author":{"gitId":"-"},"content":""},{"lineNumber":2111,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Renaming a Team"},{"lineNumber":2112,"author":{"gitId":"-"},"content":""},{"lineNumber":2113,"author":{"gitId":"-"},"content":". Renaming a Team after assigning players above"},{"lineNumber":2114,"author":{"gitId":"-"},"content":""},{"lineNumber":2115,"author":{"gitId":"-"},"content":".. Prerequisites: Ensure that the team to be renamed into does not exist"},{"lineNumber":2116,"author":{"gitId":"-"},"content":".. Test case: `rename NUSTeam tm/SUNTeam` +"},{"lineNumber":2117,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be renamed to the new team name. New team name will be selected in the Team Display Panel. Player list of all the players in the new team name will be displayed. All players in the team will have their team name updated to the new team name. Team rename will be shown in the result status message. Timestamp in the status bar is updated."},{"lineNumber":2118,"author":{"gitId":"-"},"content":".. Test case: `rename NewTeam tm/MooTeam` +"},{"lineNumber":2119,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename does not exist in MTM."},{"lineNumber":2120,"author":{"gitId":"-"},"content":".. Test case: `rename SUNTeam tm/\u0026-Team` +"},{"lineNumber":2121,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename into is invalid and should only contains alphanumeric characters."},{"lineNumber":2122,"author":{"gitId":"-"},"content":".. Test case: `rename tm/SmoovTeam` +"},{"lineNumber":2123,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Did not specify which team to rename and will indicate invalid command format."},{"lineNumber":2124,"author":{"gitId":"-"},"content":""},{"lineNumber":2125,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a Team"},{"lineNumber":2126,"author":{"gitId":"-"},"content":""},{"lineNumber":2127,"author":{"gitId":"-"},"content":". Removing a Team after renaming the team above"},{"lineNumber":2128,"author":{"gitId":"-"},"content":""},{"lineNumber":2129,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM."},{"lineNumber":2130,"author":{"gitId":"-"},"content":".. Test case: `view SUNTeam` -\u003e `remove SUNTeam` +"},{"lineNumber":2131,"author":{"gitId":"-"},"content":"Expected: Team is removed and Team Display Panel is updated to reflect that the team has been removed. Team name that is being removed will be shown in the status message. All players in the team will have their team name updated in the Player List Panel. Player List Panel will show the full list of players in MTM. Timestamp in the status bar is updated."},{"lineNumber":2132,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `remove Arsenal` +"},{"lineNumber":2133,"author":{"gitId":"-"},"content":"Expected: Similar to above, will be displaying full list of players before and after `remove` command."},{"lineNumber":2134,"author":{"gitId":"-"},"content":".. Test case: `remove SUNTeam` +"},{"lineNumber":2135,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team does not exist in MTM."},{"lineNumber":2136,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2137,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Appearance Related Functions"},{"lineNumber":2138,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2139,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Changing a Theme"},{"lineNumber":2140,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2141,"author":{"gitId":"codeeong"},"content":". Changing the theme that MTM is currently on"},{"lineNumber":2142,"author":{"gitId":"codeeong"},"content":".. Test case: `cte Dark` (if current theme is Light) or `cte Light` (if current theme is Dark) +"},{"lineNumber":2143,"author":{"gitId":"codeeong"},"content":"Expected: MTM colour scheme will change to the respective themes as shown below:"},{"lineNumber":2144,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2145,"author":{"gitId":"codeeong"},"content":"image::DarkTheme.png[width\u003d\"300\"]"},{"lineNumber":2146,"author":{"gitId":"codeeong"},"content":"image::LightTheme.png[width\u003d\"300\"]"},{"lineNumber":2147,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2148,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2149,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Setting Tag Colours"},{"lineNumber":2150,"author":{"gitId":"codeeong"},"content":". Setting the tags to colour of choice"},{"lineNumber":2151,"author":{"gitId":"codeeong"},"content":".. Prerequisites: Player has tags"},{"lineNumber":2152,"author":{"gitId":"codeeong"},"content":".. Test case: `setTagColour t/redCard tc/blue`"},{"lineNumber":2153,"author":{"gitId":"codeeong"},"content":"Expected: All tags with the name `redCard` would become blue"}],"authorContributionMap":{"lithiumlkid":189,"lohtianwei":210,"codeeong":253,"-":1501}},{"path":"docs/UserGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - User Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":toc-title: Table Of Contents"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3"},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full"},{"lineNumber":10,"author":{"gitId":"-"},"content":":experimental:"},{"lineNumber":11,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":12,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":13,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":14,"author":{"gitId":"-"},"content":":important-caption: :white_check_mark:"},{"lineNumber":15,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"By: `F14-B1` Since: `Mar 2018` Licence: `MIT`"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"// tag::introduction[]"},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction"},{"lineNumber":22,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a link:https://en.wikipedia.org/wiki/Command-line_interface[Command-Line Interface] (CLI) based address book application for *football team managers*."},{"lineNumber":23,"author":{"gitId":"-"},"content":"It is a one-stop solution to help you manage your player\u0027s contact details in an efficient and convenient manner."},{"lineNumber":24,"author":{"gitId":"-"},"content":"Using MTM, you can organize players into teams, view player statistics, and, generate player line-ups."},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"Head to \u003c\u003cQuick Start\u003e\u003e to get started with My Team Manager!"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"\u003d\u003d Quick Start"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"Welcome! If you want to learn more about using My Team Manager, you\u0027ve come to the right place. My Team Manager is the easiest"},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"way for you to manage your team efficiently, and this quick start section will help you learn the basics so you can get going."},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"Your teams, their players, and all the relevant information is organized clearly in My Team Manager. Teams can be created and"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"players can be assigned to teams."},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Before we begin"},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer."},{"lineNumber":39,"author":{"gitId":"-"},"content":". You can download Java 8 link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[here]."},{"lineNumber":40,"author":{"gitId":"-"},"content":"+"},{"lineNumber":41,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* Having any Java 8 version is not enough. +"},{"lineNumber":44,"author":{"gitId":"-"},"content":"* This app will not work with *earlier* or *later* versions of Java 8."},{"lineNumber":45,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":46,"author":{"gitId":"-"},"content":"+"},{"lineNumber":47,"author":{"gitId":"-"},"content":". Download the latest `MyTeamManager.jar` link:{repoURL}/releases[here]."},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":". Copy the file to the folder you want to use as the home folder for your MTM."},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":". Double-click the file to start the app. The software interface should appear in a few seconds as shown below."},{"lineNumber":50,"author":{"gitId":"-"},"content":"+"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"image::UiNew.png[width\u003d\"790\"]"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Navigating the interface"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"The figure below shows the different components in My Team Manager and the list below explains their purpose."},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"image::UIGuide.png[width\u003d\"790\"]"},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":". *Command Box*: This is where you _key in the commands_ to use My Team Manager."},{"lineNumber":61,"author":{"gitId":"-"},"content":". *Display Box*: The display box _displays results_ to any command you input."},{"lineNumber":62,"author":{"gitId":"-"},"content":". *Team List* : This _displays the teams_ you have created in My Team Manager. +"},{"lineNumber":63,"author":{"gitId":"-"},"content":"* If a team is being viewed, it would be highlighted."},{"lineNumber":64,"author":{"gitId":"-"},"content":". *Details Panel*: This _displays details of the player_ that is currently selected. +"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* Here, the player\u0027s _name_, _phone number_, _address_, _email_, _jersey number_ followed by _remarks_ are shown."},{"lineNumber":66,"author":{"gitId":"-"},"content":". *Systems Panel*: This displays information regarding modification to MTM\u0027s data."},{"lineNumber":67,"author":{"gitId":"-"},"content":"* On the left, it displays the time and date when MTM is last updated."},{"lineNumber":68,"author":{"gitId":"-"},"content":"* On the right, is the location of the data."},{"lineNumber":69,"author":{"gitId":"-"},"content":". *Player List*: This is the list of player cards. In each player card, +"},{"lineNumber":70,"author":{"gitId":"-"},"content":"* The player\u0027s _name_, _tags_, _team_, _rating_, followed by _position_ is displayed."},{"lineNumber":71,"author":{"gitId":"-"},"content":"* The player\u0027s _avatar_ is also shown on the right column."},{"lineNumber":72,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":73,"author":{"gitId":"lithiumlkid"},"content":"[[Using_Commands]]"},{"lineNumber":74,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Using Commands"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":".*Getting started with Commands*"},{"lineNumber":77,"author":{"gitId":"-"},"content":"****"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":80,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user."},{"lineNumber":81,"author":{"gitId":"-"},"content":"** An example in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`."},{"lineNumber":82,"author":{"gitId":"-"},"content":"* Fields that are in enclosed with `[ ]` are optional."},{"lineNumber":83,"author":{"gitId":"-"},"content":"** An example, `n/NAME [t/TAG]`, can be used as, `n/John Doe t/friend`, or as, `n/John Doe`."},{"lineNumber":84,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times."},{"lineNumber":85,"author":{"gitId":"-"},"content":"** In this example, `[t/TAG]...`, these parameters are valid, `t/friend`, `t/friend t/family`, and even `{nbsp}` (no parameter)."},{"lineNumber":86,"author":{"gitId":"-"},"content":"* Parameters can be entered in any order."},{"lineNumber":87,"author":{"gitId":"-"},"content":"** For example, if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable."},{"lineNumber":88,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":89,"author":{"gitId":"-"},"content":"****"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":".*The Use of Alias*"},{"lineNumber":92,"author":{"gitId":"-"},"content":"****"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":95,"author":{"gitId":"-"},"content":"* Some commands have an alias that you can use to execute the command. This alias acts as a shortcut to execute the commands you want without typing the full command out."},{"lineNumber":96,"author":{"gitId":"-"},"content":"** For example, you can type the alias `a` instead of the `add` command word to add a player into MTM."},{"lineNumber":97,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":98,"author":{"gitId":"-"},"content":"****"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":".*Lookout for Tips, Notes, and Expected Outcomes*"},{"lineNumber":101,"author":{"gitId":"-"},"content":"****"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":104,"author":{"gitId":"-"},"content":"TIP: This box give _tips_ that *might be useful*."},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":"NOTE: This box _notes_ down *important details* regarding a feature."},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":"IMPORTANT: This box will let you know the _outcome_ and what MTM should be *expected to do*."},{"lineNumber":109,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":110,"author":{"gitId":"-"},"content":"****"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"lithiumlkid"},"content":"Now that you are familiar with the interface and using commands, you are now ready to begin using My Team Manager!"},{"lineNumber":113,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":114,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Three steps to get started"},{"lineNumber":115,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":116,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Add your first player"},{"lineNumber":117,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":118,"author":{"gitId":"lithiumlkid"},"content":". Add your first player, `Ronaldo` by typing the command `add n/Ronaldo e/Ronaldo@arsenal.com` in the command box and pressing kbd:[Enter] to execute it."},{"lineNumber":119,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":120,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":121,"author":{"gitId":"lithiumlkid"},"content":"image::add.png[width\u003d\"400\"]"},{"lineNumber":122,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":123,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":124,"author":{"gitId":"lithiumlkid"},"content":". Your new player, `Ronaldo` should appear in the player list as shown in the white box above."},{"lineNumber":125,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":126,"author":{"gitId":"lithiumlkid"},"content":"TIP: The `Add` command has additional optional parameters for you to include more information. For the full list,"},{"lineNumber":127,"author":{"gitId":"-"},"content":"refer to \u003c\u003cadd, Adding a player\u003e\u003e."},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Create your first team"},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"Now that you have a player, let\u0027s explore teams. Teams allow you to manage and group your players together according to"},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":"the teams they belong to."},{"lineNumber":132,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":". Create your first team, `NUS` by typing the command `create NUS` in the command box and pressing kbd:[Enter] to execute it."},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"image::create.PNG[width\u003d\"300\"]"},{"lineNumber":136,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":137,"author":{"gitId":"lithiumlkid"},"content":". Your new team, `NUS` should appear in the team list."},{"lineNumber":138,"author":{"gitId":"lithiumlkid"},"content":". You can now assign `Ronaldo` to `NUS` by typing the command `assign tm/NUS i/1` in the command box and pressing kbd:[Enter] to execute it."},{"lineNumber":139,"author":{"gitId":"lithiumlkid"},"content":"- The Team List should now show NUS highlighted as shown in the white box labeled 1 above."},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"- `Ronaldo` \u0027s player card should now show NUS in the team field as shown in the white box labeled 2 above."},{"lineNumber":141,"author":{"gitId":"lithiumlkid"},"content":"- The player list shows only players assigned to the team `NUS`"},{"lineNumber":142,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":143,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Viewing more details"},{"lineNumber":144,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":". View more details about a player, by entering `select` followed by the \u003c\u003cIndex, `INDEX`\u003e\u003e of the player. For example, to view"},{"lineNumber":146,"author":{"gitId":"lithiumlkid"},"content":"`Ronaldo` \u0027s details, enter `select 1`."},{"lineNumber":147,"author":{"gitId":"lithiumlkid"},"content":". The details panel should now show the player\u0027s details."},{"lineNumber":148,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":149,"author":{"gitId":"lithiumlkid"},"content":"image::select.png[width\u003d\"790\"]"},{"lineNumber":150,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":151,"author":{"gitId":"lithiumlkid"},"content":". You may notice that there are fields that show `\u003cUNSPECIFIED\u003e`. These are optional fields that you can edit later on."},{"lineNumber":152,"author":{"gitId":"lithiumlkid"},"content":"There are also many ways you can customize and add to My Team Manager. Here are a few ways to start:"},{"lineNumber":153,"author":{"gitId":"-"},"content":".. \u003c\u003cedit, Editing a player\u003e\u003e"},{"lineNumber":154,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003cchangeTheme, Changing MTM theme\u003e\u003e"},{"lineNumber":155,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csetTagColour, Setting Tag Colour\u003e\u003e"},{"lineNumber":156,"author":{"gitId":"-"},"content":".. \u003c\u003ctoggleprivacy, Setting privacy\u003e\u003e"},{"lineNumber":157,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csort, Sorting players in the list\u003e\u003e"},{"lineNumber":158,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":159,"author":{"gitId":"lithiumlkid"},"content":"// end::introduction[]"},{"lineNumber":160,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":161,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Commands in My Team Manager"},{"lineNumber":162,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":163,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful information regarding all the commands in My Team Manager."},{"lineNumber":164,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":165,"author":{"gitId":"lithiumlkid"},"content":"If you are not familiar on how to use commands yet, you can refer to \u003c\u003cUsing_Commands\u003e\u003e"},{"lineNumber":166,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":167,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Fundamentals"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"lithiumlkid"},"content":"MTM provides tools that gives you the power to use MTM more efficiently and teach you how to navigate through MTM with ease."},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"lithiumlkid"},"content":"Enter commands more quickly with \u003c\u003cautocomplete,kbd:[tab] autocomplete\u003e\u003e, get \u003c\u003chelp,help\u003e\u003e or find out how to \u003c\u003cundo,undo\u003e\u003e and \u003c\u003credo,redo\u003e\u003e commands."},{"lineNumber":172,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":173,"author":{"gitId":"lithiumlkid"},"content":"You can also find information to secure your information in My Team Manger by \u003c\u003ctogglePrivacy, toggling privacy\u003e\u003e or \u003c\u003ckey,set a key to prevent tampering\u003e\u003e"},{"lineNumber":174,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Saving the data"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":"There is no need to save anything manually as My Team Manager will save"},{"lineNumber":178,"author":{"gitId":"-"},"content":"any data entered directly to the hard drive."},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":"// tag::autocomplete[]"},{"lineNumber":181,"author":{"gitId":"-"},"content":"[[autocomplete]]"},{"lineNumber":182,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Using kbd:[tab] Autocomplete"},{"lineNumber":183,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":"After typing in the first few characters of a command, pressing kbd:[tab] will fill in the rest of the item."},{"lineNumber":185,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":"To view the parameters for a command, press tab after the whole command is typed in. Pressing tab again will remove the parameters."},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":189,"author":{"gitId":"-"},"content":"You can use the autocompleted parameters as a template after viewing them."},{"lineNumber":190,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":191,"author":{"gitId":"lithiumlkid"},"content":"Text will turn red if the input has no parameters or if no matching command exists."},{"lineNumber":192,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":193,"author":{"gitId":"lithiumlkid"},"content":"If there are multiple possible commands for a given input, i.e. \u0027e\u0027 could be \u0027edit\u0027 or \u0027exit\u0027,"},{"lineNumber":194,"author":{"gitId":"-"},"content":"then a dropdown box will appear with the possible commands. These can be navigated using mouse or arrow keys. Press enter to select the desired command."},{"lineNumber":195,"author":{"gitId":"-"},"content":"// end::autocomplete[]"},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":"[[help]]"},{"lineNumber":198,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing help : `help`"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":"Feeling lost? Not sure what to do? Don\u0027t worry, our friendly guide will help you! All you have to do is just type the `help` command, and you will get all the information you require."},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":"Format: `help` +"},{"lineNumber":203,"author":{"gitId":"-"},"content":"Alias: kbd:[F1]"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"-"},"content":"[[history]]"},{"lineNumber":206,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing entered commands : `history`"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":"Have you been extensively using MTM and in the midst of entering more commands, you could not remember what commands you have entered? MTM allows you to look at all your past commands that you have entered in reverse chronological order."},{"lineNumber":209,"author":{"gitId":"-"},"content":""},{"lineNumber":210,"author":{"gitId":"-"},"content":"Format: `history` +"},{"lineNumber":211,"author":{"gitId":"-"},"content":"Alias: `h`"},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":215,"author":{"gitId":"-"},"content":"* Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box."},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":219,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":220,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":221,"author":{"gitId":"-"},"content":"A list of your previously entered command will be shown to you."},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":225,"author":{"gitId":"-"},"content":"[[undo]]"},{"lineNumber":226,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undoing previous command : `undo`"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":"Have you entered a wrong command or might have accidentally entered the wrong values to the specified fields to a command? +"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":"You don\u0027t have to worry, as MTM provides you with the command to undo most mistakes that you might have made. MTM will restore itself to the state before the previous command was executed."},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":"Format: `undo` +"},{"lineNumber":233,"author":{"gitId":"-"},"content":"Alias: `u`"},{"lineNumber":234,"author":{"gitId":"-"},"content":""},{"lineNumber":235,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":236,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":237,"author":{"gitId":"-"},"content":"* There are a few commands that can be undoable: commands that modify MTM\u0027s content that are related to players or teams."},{"lineNumber":238,"author":{"gitId":"-"},"content":"** Player related commands: `add`, `delete`, `edit`, `clear`, `remark` +"},{"lineNumber":239,"author":{"gitId":"-"},"content":"** Team related commands: `create`, `assign`, `remove`, `rename`"},{"lineNumber":240,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":243,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":244,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":245,"author":{"gitId":"-"},"content":"Commands that are _undoAble_ will be reversed and MTM will be in the state before the command was executed."},{"lineNumber":246,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"-"},"content":"[[redo]]"},{"lineNumber":249,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Redoing the previously undone command : `redo`"},{"lineNumber":250,"author":{"gitId":"codeeong"},"content":"If you accidentally call the `undo` command too many times and need a way to quickly reverse that, MTM allows you to redo the most recent `undo` command."},{"lineNumber":251,"author":{"gitId":"-"},"content":""},{"lineNumber":252,"author":{"gitId":"-"},"content":"Format: `redo` +"},{"lineNumber":253,"author":{"gitId":"-"},"content":"Alias: `r`"},{"lineNumber":254,"author":{"gitId":"-"},"content":""},{"lineNumber":255,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":256,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":257,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":258,"author":{"gitId":"-"},"content":"Previously executed `undo` command will be reversed and MTM will be in its previous state."},{"lineNumber":259,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":260,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":"// tag::togglePrivacy[]"},{"lineNumber":263,"author":{"gitId":"-"},"content":"[[toggleprivacy]]"},{"lineNumber":264,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling various fields to private: `toggleprivacy` `[Since v1.4]`"},{"lineNumber":265,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":"You can toggle the privacy of various fields of players in MTM."},{"lineNumber":267,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":268,"author":{"gitId":"-"},"content":"Format: `toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]` +"},{"lineNumber":269,"author":{"gitId":"-"},"content":"Alias: `tp`"},{"lineNumber":270,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":271,"author":{"gitId":"codeeong"},"content":"[NOTE]"},{"lineNumber":272,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":273,"author":{"gitId":"-"},"content":"* Current version of `toggleprivacy` supports the field to be privated: +"},{"lineNumber":274,"author":{"gitId":"-"},"content":"** `p/`: PHONE, `e/`: EMAIL, `r/`: REMARK, `ra/`:RATING \u0026 `a/`: ADDRESS."},{"lineNumber":275,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":276,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":277,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":278,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":279,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":280,"author":{"gitId":"-"},"content":"Privacy of field will be toggled between private or public. +"},{"lineNumber":281,"author":{"gitId":"-"},"content":"If Phone: `p/` of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1 is private, running command: `tp 1 p/` would change phone field to public. +"},{"lineNumber":282,"author":{"gitId":"-"},"content":"Private fields are shown as \u003cPrivate `FIELD`\u003e."},{"lineNumber":283,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":284,"author":{"gitId":"-"},"content":""},{"lineNumber":285,"author":{"gitId":"-"},"content":"Here are some examples on how you can use the `toggleprivacy` command:"},{"lineNumber":286,"author":{"gitId":"-"},"content":""},{"lineNumber":287,"author":{"gitId":"-"},"content":"* `tp 1 p/ ra/`"},{"lineNumber":288,"author":{"gitId":"-"},"content":""},{"lineNumber":289,"author":{"gitId":"-"},"content":"Toggles privacy of phone and rating of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1."},{"lineNumber":290,"author":{"gitId":"-"},"content":"// end::togglePrivacy[]"},{"lineNumber":291,"author":{"gitId":"-"},"content":""},{"lineNumber":292,"author":{"gitId":"-"},"content":"// tag::key[]"},{"lineNumber":293,"author":{"gitId":"-"},"content":"[[key]]"},{"lineNumber":294,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling lock on MTM: `key` `[Since v1.5]`"},{"lineNumber":295,"author":{"gitId":"-"},"content":""},{"lineNumber":296,"author":{"gitId":"-"},"content":"You can toggle a lock on MTM to prevent unauthorised changes to your details in MTM. When MTM is in a locked state, functionality will be limited."},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"-"},"content":"Format: `key PASSWORD` +"},{"lineNumber":299,"author":{"gitId":"-"},"content":"Alias: `k`"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":302,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":303,"author":{"gitId":"-"},"content":"* Current version of `key` uses a fixed default `PASSWORD`: *ilikesports*"},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":305,"author":{"gitId":"-"},"content":""},{"lineNumber":306,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":307,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":309,"author":{"gitId":"-"},"content":"When MTM is locked, only the following commands can be executed: +"},{"lineNumber":310,"author":{"gitId":"-"},"content":"`changeTheme`, `exit`, `find`, `help`, `key`, `list`, `sort` and `view`"},{"lineNumber":311,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":312,"author":{"gitId":"-"},"content":""},{"lineNumber":313,"author":{"gitId":"-"},"content":"Here are examples on how to use `key`:"},{"lineNumber":314,"author":{"gitId":"-"},"content":""},{"lineNumber":315,"author":{"gitId":"-"},"content":"* `key ilikesports`"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":"If MTM is in a lock state, use this command to unlock it."},{"lineNumber":318,"author":{"gitId":"-"},"content":""},{"lineNumber":319,"author":{"gitId":"-"},"content":""},{"lineNumber":320,"author":{"gitId":"-"},"content":"* `key ilikesports`"},{"lineNumber":321,"author":{"gitId":"-"},"content":""},{"lineNumber":322,"author":{"gitId":"-"},"content":"To lock MTM, use this command to lock."},{"lineNumber":323,"author":{"gitId":"-"},"content":""},{"lineNumber":324,"author":{"gitId":"-"},"content":"// end::key[]"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":"[[clear]]"},{"lineNumber":327,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Clearing all entries : `clear`"},{"lineNumber":328,"author":{"gitId":"-"},"content":""},{"lineNumber":329,"author":{"gitId":"-"},"content":"You can clear all entries from MTM with the \u0027clear\u0027 command."},{"lineNumber":330,"author":{"gitId":"-"},"content":""},{"lineNumber":331,"author":{"gitId":"-"},"content":"Format: `clear` +"},{"lineNumber":332,"author":{"gitId":"-"},"content":"Alias: `c`"},{"lineNumber":333,"author":{"gitId":"-"},"content":""},{"lineNumber":334,"author":{"gitId":"-"},"content":"[[exit]]"},{"lineNumber":335,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Exiting the program : `exit`"},{"lineNumber":336,"author":{"gitId":"-"},"content":""},{"lineNumber":337,"author":{"gitId":"-"},"content":"You can exit the program by entering the \u0027exit\u0027 command."},{"lineNumber":338,"author":{"gitId":"-"},"content":""},{"lineNumber":339,"author":{"gitId":"-"},"content":"Format: `exit`"},{"lineNumber":340,"author":{"gitId":"-"},"content":""},{"lineNumber":341,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands"},{"lineNumber":342,"author":{"gitId":"-"},"content":""},{"lineNumber":343,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your players and their information in My Team Manager +"},{"lineNumber":344,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003cadd,adding a player\u003e\u003e, \u003c\u003cedit,editing a player\u003e\u003e or \u003c\u003cremark,adding a remark\u003e\u003e."},{"lineNumber":345,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools to \u003c\u003cfind,find\u003e\u003e a player or \u003c\u003csort,sort\u003e\u003e players in your list."},{"lineNumber":346,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":347,"author":{"gitId":"lithiumlkid"},"content":"// tag::addplayer[]"},{"lineNumber":348,"author":{"gitId":"-"},"content":"[[add]]"},{"lineNumber":349,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Adding a player: `add`"},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"lithiumlkid"},"content":"This is the command that you will be using most frequently, especially when dealing with new players. You will be able to add new players with the details that you have obtained into MTM by using the `add` command."},{"lineNumber":352,"author":{"gitId":"-"},"content":""},{"lineNumber":353,"author":{"gitId":"lithiumlkid"},"content":"Format: `add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]...` +"},{"lineNumber":354,"author":{"gitId":"-"},"content":"Alias: `a`"},{"lineNumber":355,"author":{"gitId":"-"},"content":""},{"lineNumber":356,"author":{"gitId":"-"},"content":"The table below explains the correct inputs for the parameters."},{"lineNumber":357,"author":{"gitId":"-"},"content":""},{"lineNumber":358,"author":{"gitId":"-"},"content":"[width\u003d\"80%\",cols\u003d\"1,2,2\",options\u003d\"header\"]"},{"lineNumber":359,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":360,"author":{"gitId":"-"},"content":"|Parameter |Input type |Example"},{"lineNumber":361,"author":{"gitId":"-"},"content":"|n/NAME |Player name | n/Ronaldo"},{"lineNumber":362,"author":{"gitId":"-"},"content":"|e/EMAIL |Player\u0027s email address | a/ronaldo@soccer.com"},{"lineNumber":363,"author":{"gitId":"-"},"content":"|tm/TEAM |Player\u0027s Team | tm/Real Madrid"},{"lineNumber":364,"author":{"gitId":"-"},"content":"|a/ADDRESS |Player\u0027s address| a/Blk 123 Bukit Batok St 21"},{"lineNumber":365,"author":{"gitId":"-"},"content":"|p/PHONE_NUMBER| Player\u0027s phone number| p/92343433"},{"lineNumber":366,"author":{"gitId":"-"},"content":"|j/JERSEY_NUMBER| Player\u0027s jersey number| j/17"},{"lineNumber":367,"author":{"gitId":"-"},"content":"|ra/RATING| Player\u0027s performance rating (From 1 to 5)| ra/5"},{"lineNumber":368,"author":{"gitId":"-"},"content":"|po/POSITION| Player\u0027s postion +"},{"lineNumber":369,"author":{"gitId":"-"},"content":"(1 for Striker, +"},{"lineNumber":370,"author":{"gitId":"-"},"content":"2 for Midfiled, +"},{"lineNumber":371,"author":{"gitId":"-"},"content":"3 for Defender, +"},{"lineNumber":372,"author":{"gitId":"-"},"content":"4 for Goalkeeper)| po/1"},{"lineNumber":373,"author":{"gitId":"-"},"content":"|av/AVATAR| Absolute filepath to player\u0027s avatar image file| av/C:\\avatar.png (for Windows) av//User/username/path/to/image.jpg (for MacOS)"},{"lineNumber":374,"author":{"gitId":"-"},"content":"|t/TAG| Your tag for the player| t/Injured"},{"lineNumber":375,"author":{"gitId":"-"},"content":""},{"lineNumber":376,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":377,"author":{"gitId":"-"},"content":""},{"lineNumber":378,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":379,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":380,"author":{"gitId":"-"},"content":"* A player can only be added to an existing team."},{"lineNumber":381,"author":{"gitId":"-"},"content":"* If you have not created the team yet, you can create one first using the \u003c\u003cCreating a team: `create` `[Since v1.2]`, `create`\u003e\u003e command."},{"lineNumber":382,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":383,"author":{"gitId":"-"},"content":""},{"lineNumber":384,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":385,"author":{"gitId":"-"},"content":"A player can have any number of tags (including 0)."},{"lineNumber":386,"author":{"gitId":"-"},"content":""},{"lineNumber":387,"author":{"gitId":"-"},"content":"Output: The added player should appear in the player list panel."},{"lineNumber":388,"author":{"gitId":"-"},"content":""},{"lineNumber":389,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":390,"author":{"gitId":"-"},"content":""},{"lineNumber":391,"author":{"gitId":"-"},"content":"* `add n/Mo Salah e/mo@soccer.com`"},{"lineNumber":392,"author":{"gitId":"-"},"content":""},{"lineNumber":393,"author":{"gitId":"-"},"content":"Adds a player named `Mo Salah` with email `mo@soccer.com`."},{"lineNumber":394,"author":{"gitId":"-"},"content":""},{"lineNumber":395,"author":{"gitId":"-"},"content":"* `add n/Ronaldo p/92331322 e/ronaldo@soccer.com a/Portugal tm/Real Madrid j/17 ra/5 po/1`"},{"lineNumber":396,"author":{"gitId":"-"},"content":""},{"lineNumber":397,"author":{"gitId":"-"},"content":"Adds a player named Ronaldo with phone number `92331322`, email `ronaldo@soccer.com`, address `Portugal`,"},{"lineNumber":398,"author":{"gitId":"-"},"content":"team `Real Madrid`, jersey number `17`, rating `5`, and position `1` corresponding to `Striker`."},{"lineNumber":399,"author":{"gitId":"-"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":"[[edit]]"},{"lineNumber":401,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Editing a player : `edit`"},{"lineNumber":402,"author":{"gitId":"-"},"content":""},{"lineNumber":403,"author":{"gitId":"lithiumlkid"},"content":"If you made a mistake when adding a player, or if there\u0027s player information that needs updating, you may edit an existing player in MTM with the \u0027edit\u0027 command."},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"-"},"content":"Format: `edit INDEX [n/NAME] [e/EMAIL] [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]...` +"},{"lineNumber":406,"author":{"gitId":"-"},"content":"Alias: `e`"},{"lineNumber":407,"author":{"gitId":"-"},"content":""},{"lineNumber":408,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":409,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":410,"author":{"gitId":"-"},"content":"* Edits the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e."},{"lineNumber":411,"author":{"gitId":"-"},"content":"* Please only edit the player that is currently being selected. If you were to edit a player who is not selected, the player\u0027s details will be updated, but the selection will remain at the currently selected player."},{"lineNumber":412,"author":{"gitId":"-"},"content":"* At least one of the optional fields must be provided."},{"lineNumber":413,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values."},{"lineNumber":414,"author":{"gitId":"-"},"content":"* When you edit tags, the existing tags of the player will be removed i.e adding of tags is not cumulative."},{"lineNumber":415,"author":{"gitId":"-"},"content":"* You can remove all the player\u0027s tags by typing `t/` without specifying any tags after it."},{"lineNumber":416,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":417,"author":{"gitId":"-"},"content":""},{"lineNumber":418,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":419,"author":{"gitId":"-"},"content":""},{"lineNumber":420,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com`"},{"lineNumber":421,"author":{"gitId":"-"},"content":""},{"lineNumber":422,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st player to be `91234567` and `johndoe@example.com` respectively."},{"lineNumber":423,"author":{"gitId":"-"},"content":""},{"lineNumber":424,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/`"},{"lineNumber":425,"author":{"gitId":"-"},"content":""},{"lineNumber":426,"author":{"gitId":"-"},"content":"Edits the name of the 2nd player to be `Betsy Crower` and clears all existing tags."},{"lineNumber":427,"author":{"gitId":"lithiumlkid"},"content":"// end::addplayer[]"},{"lineNumber":428,"author":{"gitId":"-"},"content":""},{"lineNumber":429,"author":{"gitId":"-"},"content":"[[delete]]"},{"lineNumber":430,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Deleting a player : `delete`"},{"lineNumber":431,"author":{"gitId":"-"},"content":""},{"lineNumber":432,"author":{"gitId":"codeeong"},"content":"If you want to remove a player from MTM, you may use this command to delete the player."},{"lineNumber":433,"author":{"gitId":"-"},"content":""},{"lineNumber":434,"author":{"gitId":"-"},"content":"Format: `delete INDEX` +"},{"lineNumber":435,"author":{"gitId":"-"},"content":"Alias: `d`"},{"lineNumber":436,"author":{"gitId":"-"},"content":""},{"lineNumber":437,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":438,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":439,"author":{"gitId":"-"},"content":"* Deletes the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e."},{"lineNumber":440,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":443,"author":{"gitId":"-"},"content":""},{"lineNumber":444,"author":{"gitId":"-"},"content":"* `list`"},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `delete 2`"},{"lineNumber":446,"author":{"gitId":"-"},"content":""},{"lineNumber":447,"author":{"gitId":"-"},"content":"Deletes the 2nd player in the MTM."},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"-"},"content":"* `find Betsy`"},{"lineNumber":450,"author":{"gitId":"-"},"content":"* `delete 1`"},{"lineNumber":451,"author":{"gitId":"-"},"content":""},{"lineNumber":452,"author":{"gitId":"lohtianwei"},"content":"Deletes the 1st player in the results of the `find` command."},{"lineNumber":453,"author":{"gitId":"-"},"content":""},{"lineNumber":454,"author":{"gitId":"-"},"content":"[[remark]]"},{"lineNumber":455,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Noting down a remark for player: `remark` `[Since v1.1]`"},{"lineNumber":456,"author":{"gitId":"-"},"content":""},{"lineNumber":457,"author":{"gitId":"-"},"content":"When you need to drop yourself a self-note with regards to a specific player you\u0027re managing, you can make a self-note"},{"lineNumber":458,"author":{"gitId":"-"},"content":"of a specific player easily by giving the player a remark for you to remember by."},{"lineNumber":459,"author":{"gitId":"-"},"content":""},{"lineNumber":460,"author":{"gitId":"-"},"content":"Format: `remark INDEX [r/[REMARK]]` +"},{"lineNumber":461,"author":{"gitId":"-"},"content":"Alias: `rm`"},{"lineNumber":462,"author":{"gitId":"-"},"content":""},{"lineNumber":463,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":464,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":465,"author":{"gitId":"-"},"content":"* By leaving out `r/REMARK` or `REMARK`, the command acts as a remark removal."},{"lineNumber":466,"author":{"gitId":"-"},"content":"* Only use the `remark` command when you want to leave a remark, `add` or `edit` does not allow you to create a remark for the player."},{"lineNumber":467,"author":{"gitId":"-"},"content":"* Please only add remarks to the player that is currently being selected. If you were to add remarks to a player who is not selected, the player\u0027s remarks will be updated, but the selection will remain at the currently selected player."},{"lineNumber":468,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":469,"author":{"gitId":"-"},"content":""},{"lineNumber":470,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":471,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":472,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":473,"author":{"gitId":"-"},"content":"Your specified player will either be given a new remark or have its existing remark removed."},{"lineNumber":474,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":475,"author":{"gitId":"-"},"content":""},{"lineNumber":476,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `remark` command:"},{"lineNumber":477,"author":{"gitId":"-"},"content":""},{"lineNumber":478,"author":{"gitId":"-"},"content":"* `remark 1`"},{"lineNumber":479,"author":{"gitId":"-"},"content":""},{"lineNumber":480,"author":{"gitId":"-"},"content":"Removes the remark from the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1."},{"lineNumber":481,"author":{"gitId":"-"},"content":""},{"lineNumber":482,"author":{"gitId":"-"},"content":"* `remark 5 r/MVP Player`"},{"lineNumber":483,"author":{"gitId":"-"},"content":""},{"lineNumber":484,"author":{"gitId":"-"},"content":"Give a remark to the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 5 with the remark \"MVP Player\"."},{"lineNumber":485,"author":{"gitId":"-"},"content":""},{"lineNumber":486,"author":{"gitId":"-"},"content":"[[list]]"},{"lineNumber":487,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing all players : `list`"},{"lineNumber":488,"author":{"gitId":"-"},"content":""},{"lineNumber":489,"author":{"gitId":"-"},"content":"To view a list of all the players you are managing, you can use the `list` command to see all of your players."},{"lineNumber":490,"author":{"gitId":"-"},"content":""},{"lineNumber":491,"author":{"gitId":"-"},"content":"Format: `list` +"},{"lineNumber":492,"author":{"gitId":"-"},"content":"Alias: `l`"},{"lineNumber":493,"author":{"gitId":"-"},"content":""},{"lineNumber":494,"author":{"gitId":"-"},"content":""},{"lineNumber":495,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]"},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"[[sort]]"},{"lineNumber":497,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sorting players by field: `sort` `[Since v1.2]`"},{"lineNumber":498,"author":{"gitId":"-"},"content":""},{"lineNumber":499,"author":{"gitId":"-"},"content":"You can sort the players by fields with the \u0027sort\u0027 command. Players can be sorted in both ascending or descending order."},{"lineNumber":500,"author":{"gitId":"-"},"content":""},{"lineNumber":501,"author":{"gitId":"-"},"content":"Format: `sort FIELD ORDER` +"},{"lineNumber":502,"author":{"gitId":"-"},"content":"Alias: `so`"},{"lineNumber":503,"author":{"gitId":"-"},"content":""},{"lineNumber":504,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":505,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":506,"author":{"gitId":"-"},"content":"* Current version of `sort` supports the following fields and order:"},{"lineNumber":507,"author":{"gitId":"-"},"content":"** `FIELD`: `name`, `email`, `address`, `rating`, `jersey` \u0026 `position`"},{"lineNumber":508,"author":{"gitId":"-"},"content":"** `ORDER`: `asc` \u0026 `desc`"},{"lineNumber":509,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":510,"author":{"gitId":"-"},"content":""},{"lineNumber":511,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `sort` command:"},{"lineNumber":512,"author":{"gitId":"-"},"content":""},{"lineNumber":513,"author":{"gitId":"-"},"content":"* `sort name asc`"},{"lineNumber":514,"author":{"gitId":"-"},"content":""},{"lineNumber":515,"author":{"gitId":"-"},"content":"This will sort MTM by names, in alphabetical order."},{"lineNumber":516,"author":{"gitId":"-"},"content":""},{"lineNumber":517,"author":{"gitId":"-"},"content":"* `sort name desc`"},{"lineNumber":518,"author":{"gitId":"-"},"content":""},{"lineNumber":519,"author":{"gitId":"-"},"content":"This will sort MTM by names, in reverse alphabetical order."},{"lineNumber":520,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]"},{"lineNumber":521,"author":{"gitId":"-"},"content":""},{"lineNumber":522,"author":{"gitId":"-"},"content":"[[find]]"},{"lineNumber":523,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Locating players by name: `find`"},{"lineNumber":524,"author":{"gitId":"-"},"content":""},{"lineNumber":525,"author":{"gitId":"-"},"content":"You can find a player whose name contain any of the given keywords with this command within the full player listing of MTM."},{"lineNumber":526,"author":{"gitId":"-"},"content":""},{"lineNumber":527,"author":{"gitId":"-"},"content":"Format: `find KEYWORD [KEYWORD]...` +"},{"lineNumber":528,"author":{"gitId":"-"},"content":"Alias: `f`"},{"lineNumber":529,"author":{"gitId":"-"},"content":""},{"lineNumber":530,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":531,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":532,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`."},{"lineNumber":533,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`."},{"lineNumber":534,"author":{"gitId":"-"},"content":"* Only the name is searched."},{"lineNumber":535,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`."},{"lineNumber":536,"author":{"gitId":"-"},"content":"* Players matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`."},{"lineNumber":537,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":538,"author":{"gitId":"-"},"content":""},{"lineNumber":539,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":540,"author":{"gitId":"-"},"content":""},{"lineNumber":541,"author":{"gitId":"-"},"content":"* `find John`"},{"lineNumber":542,"author":{"gitId":"-"},"content":""},{"lineNumber":543,"author":{"gitId":"-"},"content":"MTM will find all players with the name `john` with uppercase/lowercase characters in it."},{"lineNumber":544,"author":{"gitId":"-"},"content":""},{"lineNumber":545,"author":{"gitId":"-"},"content":"* `find Betsy Tim John`"},{"lineNumber":546,"author":{"gitId":"-"},"content":""},{"lineNumber":547,"author":{"gitId":"-"},"content":"Display all players that have the name `betsy`, `tim`, or `john`."},{"lineNumber":548,"author":{"gitId":"-"},"content":""},{"lineNumber":549,"author":{"gitId":"-"},"content":"[[select]]"},{"lineNumber":550,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Selecting a player : `select`"},{"lineNumber":551,"author":{"gitId":"-"},"content":""},{"lineNumber":552,"author":{"gitId":"-"},"content":"Identified the player you\u0027re looking for and want to see more details about the player?"},{"lineNumber":553,"author":{"gitId":"-"},"content":"MTM offers you the ability to view details of your specified player via an \u003c\u003cIndex, `INDEX`\u003e\u003e shown in the current listing of players."},{"lineNumber":554,"author":{"gitId":"-"},"content":"Alternatively, you can just scroll to the player you want, click their card,"},{"lineNumber":555,"author":{"gitId":"-"},"content":"and their details will be displayed on the right hand side of the screen."},{"lineNumber":556,"author":{"gitId":"-"},"content":""},{"lineNumber":557,"author":{"gitId":"-"},"content":"Format: `select INDEX` +"},{"lineNumber":558,"author":{"gitId":"-"},"content":"Alias: `s`"},{"lineNumber":559,"author":{"gitId":"-"},"content":""},{"lineNumber":560,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":561,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":562,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":563,"author":{"gitId":"codeeong"},"content":"The details panel will display your selected player\u0027s name, phone number, address, email address,"},{"lineNumber":564,"author":{"gitId":"codeeong"},"content":"jersey number, and remarks on the right side of the screen."},{"lineNumber":565,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":566,"author":{"gitId":"-"},"content":""},{"lineNumber":567,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `select` command:"},{"lineNumber":568,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":569,"author":{"gitId":"-"},"content":"* `list`"},{"lineNumber":570,"author":{"gitId":"-"},"content":"* `select 2`"},{"lineNumber":571,"author":{"gitId":"-"},"content":""},{"lineNumber":572,"author":{"gitId":"-"},"content":"Displays the list of all players and selects the 2nd player in that list."},{"lineNumber":573,"author":{"gitId":"-"},"content":""},{"lineNumber":574,"author":{"gitId":"-"},"content":"* `find Betsy`"},{"lineNumber":575,"author":{"gitId":"-"},"content":"* `select 1`"},{"lineNumber":576,"author":{"gitId":"-"},"content":""},{"lineNumber":577,"author":{"gitId":"-"},"content":"Finds a player named `betsy` and selects the 1st player in the results of the `find` command."},{"lineNumber":578,"author":{"gitId":"-"},"content":""},{"lineNumber":579,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands"},{"lineNumber":580,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":581,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your teams and their players in My Team Manager +"},{"lineNumber":582,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003ccreate,creating a team\u003e\u003e, \u003c\u003cassign,assigning players to a team\u003e\u003e or \u003c\u003crename,renaming a team\u003e\u003e."},{"lineNumber":583,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools like \u003c\u003cview,viewing a team\u003e\u003e."},{"lineNumber":584,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":585,"author":{"gitId":"-"},"content":"// tag::create[]"},{"lineNumber":586,"author":{"gitId":"-"},"content":"[[create]]"},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a team: `create` `[Since v1.2]`"},{"lineNumber":588,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":589,"author":{"gitId":"-"},"content":"What is a team management application without the functionality of creating a team? When you use this command, it allows you to create a team that can be assigned to players later on."},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"-"},"content":"Format: `create TEAM_NAME` +"},{"lineNumber":592,"author":{"gitId":"-"},"content":"Alias: `ct`"},{"lineNumber":593,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":594,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":595,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":596,"author":{"gitId":"-"},"content":"* You can\u0027t create a team that already exist in MTM."},{"lineNumber":597,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":598,"author":{"gitId":"-"},"content":""},{"lineNumber":599,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":600,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":601,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":602,"author":{"gitId":"-"},"content":"Your newly specified team will be created with the name you have given without any players in it, and your team name will appear in the team bar below."},{"lineNumber":603,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":604,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":605,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:"},{"lineNumber":606,"author":{"gitId":"-"},"content":""},{"lineNumber":607,"author":{"gitId":"-"},"content":"* `create Liverpool`"},{"lineNumber":608,"author":{"gitId":"-"},"content":""},{"lineNumber":609,"author":{"gitId":"-"},"content":"Creates another new team with the name \"Liverpool\" by entering `create Liverpool` into the Command Box and pressing kbd:[Enter]."},{"lineNumber":610,"author":{"gitId":"-"},"content":""},{"lineNumber":611,"author":{"gitId":"-"},"content":"image::TeamCreateExampleBefore.png[width\u003d\"200\"]"},{"lineNumber":612,"author":{"gitId":"-"},"content":""},{"lineNumber":613,"author":{"gitId":"-"},"content":"\"Liverpool\" will be shown in the Team List."},{"lineNumber":614,"author":{"gitId":"-"},"content":""},{"lineNumber":615,"author":{"gitId":"-"},"content":"image::TeamCreateExampleAfter.png[width\u003d\"350\"]"},{"lineNumber":616,"author":{"gitId":"-"},"content":"// end::create[]"},{"lineNumber":617,"author":{"gitId":"-"},"content":""},{"lineNumber":618,"author":{"gitId":"-"},"content":"// tag::view[]"},{"lineNumber":619,"author":{"gitId":"-"},"content":"[[view]]"},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a team: `view` `[Since v1.3]`"},{"lineNumber":621,"author":{"gitId":"-"},"content":""},{"lineNumber":622,"author":{"gitId":"-"},"content":"With the ability to manage different teams, you will be able to identify all players in a team easily with the `view` command."},{"lineNumber":623,"author":{"gitId":"-"},"content":""},{"lineNumber":624,"author":{"gitId":"-"},"content":"`Coming in v2.0` +"},{"lineNumber":625,"author":{"gitId":"-"},"content":"Details of your team will be displayed on the right panel when `view` command is executed."},{"lineNumber":626,"author":{"gitId":"-"},"content":""},{"lineNumber":627,"author":{"gitId":"-"},"content":"Format: `view TEAM_NAME` +"},{"lineNumber":628,"author":{"gitId":"-"},"content":"Alias: `vt`"},{"lineNumber":629,"author":{"gitId":"-"},"content":""},{"lineNumber":630,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":631,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":632,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":633,"author":{"gitId":"-"},"content":"Displays the list of players on the left panel that are in the team specified."},{"lineNumber":634,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":635,"author":{"gitId":"-"},"content":""},{"lineNumber":636,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `view` command:"},{"lineNumber":637,"author":{"gitId":"-"},"content":""},{"lineNumber":638,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":639,"author":{"gitId":"-"},"content":""},{"lineNumber":640,"author":{"gitId":"-"},"content":"You can use the command above to easily view all the players that exist in \"Arsenal\"."},{"lineNumber":641,"author":{"gitId":"-"},"content":""},{"lineNumber":642,"author":{"gitId":"-"},"content":"image::TeamViewExampleBefore.png[width\u003d\"350\"]"},{"lineNumber":643,"author":{"gitId":"-"},"content":""},{"lineNumber":644,"author":{"gitId":"-"},"content":"The Player List will be updated with all players in the specified team, \"Arsenal\"."},{"lineNumber":645,"author":{"gitId":"-"},"content":""},{"lineNumber":646,"author":{"gitId":"-"},"content":"image::TeamViewExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":647,"author":{"gitId":"-"},"content":"// end::view[]"},{"lineNumber":648,"author":{"gitId":"-"},"content":""},{"lineNumber":649,"author":{"gitId":"-"},"content":"// tag::assign[]"},{"lineNumber":650,"author":{"gitId":"-"},"content":"[[assign]]"},{"lineNumber":651,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning player to teams: `assign` `[Since v1.3]`"},{"lineNumber":652,"author":{"gitId":"-"},"content":""},{"lineNumber":653,"author":{"gitId":"-"},"content":"Have a player without a team, or have yet to assigned one during the addition of player into MTM, you can call `assign` command to assign that player to a particular team of your choice."},{"lineNumber":654,"author":{"gitId":"-"},"content":""},{"lineNumber":655,"author":{"gitId":"-"},"content":"Format: `assign [TEAM_NAME] i/INDEX [INDEX]...` +"},{"lineNumber":656,"author":{"gitId":"-"},"content":"Alias: `at`"},{"lineNumber":657,"author":{"gitId":"-"},"content":""},{"lineNumber":658,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":659,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":660,"author":{"gitId":"-"},"content":"* You can assign multiple players to a team by including more than one valid \u003c\u003cIndex, `INDEX`\u003e\u003e."},{"lineNumber":661,"author":{"gitId":"-"},"content":"* A player can only consist of 1 team, assigning a player that have an existing team, will be re-assigned the new team."},{"lineNumber":662,"author":{"gitId":"-"},"content":"* Assigning a player without a given team will unassign the player from its current team."},{"lineNumber":663,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":664,"author":{"gitId":"-"},"content":""},{"lineNumber":665,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":666,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":667,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":668,"author":{"gitId":"-"},"content":"Your specified player, via \u003c\u003cIndex, `INDEX`\u003e\u003e, will be assigned to the specified team or unassigned from any team."},{"lineNumber":669,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":670,"author":{"gitId":"-"},"content":""},{"lineNumber":671,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:"},{"lineNumber":672,"author":{"gitId":"-"},"content":""},{"lineNumber":673,"author":{"gitId":"-"},"content":"* `list`"},{"lineNumber":674,"author":{"gitId":"-"},"content":""},{"lineNumber":675,"author":{"gitId":"-"},"content":"View the full list of players in MTM so that you can determine which player you want to assign a team."},{"lineNumber":676,"author":{"gitId":"-"},"content":""},{"lineNumber":677,"author":{"gitId":"-"},"content":"image::TeamAssignListExample.png[width\u003d\"700\"]"},{"lineNumber":678,"author":{"gitId":"-"},"content":""},{"lineNumber":679,"author":{"gitId":"-"},"content":"* `assign Liverpool i/1 2`"},{"lineNumber":680,"author":{"gitId":"-"},"content":""},{"lineNumber":681,"author":{"gitId":"-"},"content":"Enter the command into the Command Box which will assign the player with \u003c\u003cIndex, `INDEX`\u003e\u003e 1 and 2 to team \"Liverpool\"."},{"lineNumber":682,"author":{"gitId":"-"},"content":""},{"lineNumber":683,"author":{"gitId":"-"},"content":"image::TeamAssignExampleBefore.png[width\u003d\"200\"]"},{"lineNumber":684,"author":{"gitId":"-"},"content":""},{"lineNumber":685,"author":{"gitId":"-"},"content":"image::TeamAssignExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":686,"author":{"gitId":"-"},"content":""},{"lineNumber":687,"author":{"gitId":"-"},"content":"* `add n/Rembart Loeri e/remlo@tam.com tm/Liverpool`"},{"lineNumber":688,"author":{"gitId":"-"},"content":""},{"lineNumber":689,"author":{"gitId":"-"},"content":"Add a player with the prefix `tm/` for `Team` will automatically be assigned to the team specified."},{"lineNumber":690,"author":{"gitId":"-"},"content":""},{"lineNumber":691,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleBefore.png[width\u003d\"350\"]"},{"lineNumber":692,"author":{"gitId":"-"},"content":""},{"lineNumber":693,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::assign[]"},{"lineNumber":695,"author":{"gitId":"-"},"content":""},{"lineNumber":696,"author":{"gitId":"-"},"content":"// tag::rename[]"},{"lineNumber":697,"author":{"gitId":"-"},"content":"[[rename]]"},{"lineNumber":698,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Rename a team: `rename` `[Since v1.4]`"},{"lineNumber":699,"author":{"gitId":"-"},"content":""},{"lineNumber":700,"author":{"gitId":"-"},"content":"Entered your team name wrongly or you need to update it to accordingly, you can use the `rename` command to help you make that change."},{"lineNumber":701,"author":{"gitId":"-"},"content":""},{"lineNumber":702,"author":{"gitId":"-"},"content":"Format: `rename TEAM_NAME tm/RENAME_TEAM_NAME` +"},{"lineNumber":703,"author":{"gitId":"-"},"content":"Alias: `rnt`"},{"lineNumber":704,"author":{"gitId":"-"},"content":""},{"lineNumber":705,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":706,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":708,"author":{"gitId":"-"},"content":"Your specified team will be updated with the new team name along with the affected players in the existing team."},{"lineNumber":709,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":710,"author":{"gitId":"-"},"content":""},{"lineNumber":711,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `rename` command:"},{"lineNumber":712,"author":{"gitId":"-"},"content":""},{"lineNumber":713,"author":{"gitId":"-"},"content":"* `rename Liverpool tm/Tello Mello`"},{"lineNumber":714,"author":{"gitId":"-"},"content":""},{"lineNumber":715,"author":{"gitId":"-"},"content":"You can rename a `Team` easily by entering a similar command above, which will rename \"Liverpool\" into \"Tello Mello\"."},{"lineNumber":716,"author":{"gitId":"-"},"content":""},{"lineNumber":717,"author":{"gitId":"-"},"content":"image::TeamRenameExampleBefore.png[width\u003d\"700\"]"},{"lineNumber":718,"author":{"gitId":"-"},"content":""},{"lineNumber":719,"author":{"gitId":"-"},"content":"After renaming, the team name will be updated in the Team List and will be update for each individual player."},{"lineNumber":720,"author":{"gitId":"-"},"content":""},{"lineNumber":721,"author":{"gitId":"-"},"content":"image::TeamRenameExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":722,"author":{"gitId":"-"},"content":"// end::rename[]"},{"lineNumber":723,"author":{"gitId":"-"},"content":""},{"lineNumber":724,"author":{"gitId":"-"},"content":"// tag::remove[]"},{"lineNumber":725,"author":{"gitId":"-"},"content":"[[remove]]"},{"lineNumber":726,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a team: `remove` `[Since v1.4]`"},{"lineNumber":727,"author":{"gitId":"-"},"content":""},{"lineNumber":728,"author":{"gitId":"-"},"content":"No longer managing the team or the team has been disbanded, you can easily remove the team from MTM."},{"lineNumber":729,"author":{"gitId":"-"},"content":""},{"lineNumber":730,"author":{"gitId":"-"},"content":"Format: `remove TEAM_NAME` +"},{"lineNumber":731,"author":{"gitId":"-"},"content":"Alias: `rt`"},{"lineNumber":732,"author":{"gitId":"-"},"content":""},{"lineNumber":733,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":734,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":735,"author":{"gitId":"-"},"content":"* Removing a team will automatically update all affected players\u0027 `Team` field."},{"lineNumber":736,"author":{"gitId":"-"},"content":"* Players without a team will need to be re-assigned."},{"lineNumber":737,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":738,"author":{"gitId":"-"},"content":""},{"lineNumber":739,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":740,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":741,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":742,"author":{"gitId":"-"},"content":"Remove the specified team and update all affected players."},{"lineNumber":743,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":744,"author":{"gitId":"-"},"content":""},{"lineNumber":745,"author":{"gitId":"-"},"content":"Here are a few valid examples of how you can use the `remove` command:"},{"lineNumber":746,"author":{"gitId":"-"},"content":""},{"lineNumber":747,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":748,"author":{"gitId":"-"},"content":""},{"lineNumber":749,"author":{"gitId":"-"},"content":"Here we show you what it would be like before the removal of \"Arsenal\"."},{"lineNumber":750,"author":{"gitId":"-"},"content":""},{"lineNumber":751,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleBefore.png[width\u003d\"700\"]"},{"lineNumber":752,"author":{"gitId":"-"},"content":""},{"lineNumber":753,"author":{"gitId":"-"},"content":"* `remove Arsenal`"},{"lineNumber":754,"author":{"gitId":"-"},"content":""},{"lineNumber":755,"author":{"gitId":"-"},"content":"After typing the command, you will remove the the team from MTM and will be taken off the Team Display as well as updating each individual player affected to be without a team."},{"lineNumber":756,"author":{"gitId":"-"},"content":""},{"lineNumber":757,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":758,"author":{"gitId":"-"},"content":"// end::remove[]"},{"lineNumber":759,"author":{"gitId":"-"},"content":""},{"lineNumber":760,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands"},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":762,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful commands to change the look of My Team Manager to \u003c\u003csetTagColour, set the colour of your tags\u003e\u003e and \u003c\u003cchangeTeam,change the theme\u003e\u003e."},{"lineNumber":763,"author":{"gitId":"-"},"content":""},{"lineNumber":764,"author":{"gitId":"-"},"content":"// tag::setTagColour[]"},{"lineNumber":765,"author":{"gitId":"lithiumlkid"},"content":"[[setTagColour]]"},{"lineNumber":766,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting colour of tags : `setTagColour` `[Since v1.2]`"},{"lineNumber":767,"author":{"gitId":"-"},"content":""},{"lineNumber":768,"author":{"gitId":"-"},"content":"You can set the tags to a colour of your choice with the \u0027setColourTag\u0027 command."},{"lineNumber":769,"author":{"gitId":"-"},"content":""},{"lineNumber":770,"author":{"gitId":"-"},"content":"Format: `setTagColour t/TAG tc/COLOUR` +"},{"lineNumber":771,"author":{"gitId":"-"},"content":"Alias: `stc`"},{"lineNumber":772,"author":{"gitId":"-"},"content":""},{"lineNumber":773,"author":{"gitId":"codeeong"},"content":"[NOTE]"},{"lineNumber":774,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":775,"author":{"gitId":"-"},"content":"* The tag must currently be in used in MTM for this command to work."},{"lineNumber":776,"author":{"gitId":"-"},"content":"* Current version of `setTagColour` supports only this list of preset `COLOUR`:"},{"lineNumber":777,"author":{"gitId":"-"},"content":"** `teal`, `red`, `yellow`, `blue`, `orange`, `brown`, `green`, `pink`, `black`, `grey`"},{"lineNumber":778,"author":{"gitId":"-"},"content":"* The current version of `setTagColour` is *NOT* an UndoableCommand."},{"lineNumber":779,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a setTagCommand."},{"lineNumber":780,"author":{"gitId":"-"},"content":"* Instead, just enter `stc t/TAG tc/COLOUR` to change the colour back!"},{"lineNumber":781,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":782,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":783,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]"},{"lineNumber":784,"author":{"gitId":"codeeong"},"content":".*What to expect*"},{"lineNumber":785,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":786,"author":{"gitId":"codeeong"},"content":"You will see the specified tags in the left panel change to the colour of your choice."},{"lineNumber":787,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":788,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":789,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `setTagColour` command:"},{"lineNumber":790,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":791,"author":{"gitId":"codeeong"},"content":"* `stc t/redCard t/red`"},{"lineNumber":792,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":793,"author":{"gitId":"codeeong"},"content":"All the tags that say \"redCard\" in the left panel will now turn red."},{"lineNumber":794,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":795,"author":{"gitId":"-"},"content":"// end::setTagColour[]"},{"lineNumber":796,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":797,"author":{"gitId":"-"},"content":"// tag::changeTheme[]"},{"lineNumber":798,"author":{"gitId":"-"},"content":"[[changeTheme]]"},{"lineNumber":799,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Changing theme : `changeTheme` `[Since v1.5]`"},{"lineNumber":800,"author":{"gitId":"codeeong"},"content":"If you feel that the dark theme is not for you, and you prefer to work on a brighter interface,"},{"lineNumber":801,"author":{"gitId":"codeeong"},"content":"you can change the theme from the default Dark Theme to Light Theme with the \u0027changeTheme\u0027 command."},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":803,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":804,"author":{"gitId":"-"},"content":"Format: `changeTheme THEME` +"},{"lineNumber":805,"author":{"gitId":"codeeong"},"content":"Alias: `cte`"},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":"[NOTE]"},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":809,"author":{"gitId":"-"},"content":"* Current version of `changeTheme` only supports this 2 `THEME`:"},{"lineNumber":810,"author":{"gitId":"-"},"content":"** `Light` or `Dark`"},{"lineNumber":811,"author":{"gitId":"-"},"content":"* The current version of `changTheme` is *NOT* an UndoableCommand."},{"lineNumber":812,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a `changeTheme` command."},{"lineNumber":813,"author":{"gitId":"-"},"content":"* Instead, just enter `cte THEME` to change the colour back!"},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":815,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":816,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `changeTheme` command:"},{"lineNumber":817,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":818,"author":{"gitId":"codeeong"},"content":"* `cte Light`"},{"lineNumber":819,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":820,"author":{"gitId":"codeeong"},"content":"You will see the whole interface change from a dark-coloured theme to become light-coloured."},{"lineNumber":821,"author":{"gitId":"-"},"content":"// end::changeTheme[]"},{"lineNumber":822,"author":{"gitId":"-"},"content":""},{"lineNumber":823,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coming Soon"},{"lineNumber":824,"author":{"gitId":"-"},"content":""},{"lineNumber":825,"author":{"gitId":"lohtianwei"},"content":"There is more to come with the next upcoming update! Keep a lookout for these newly implemented features soon!"},{"lineNumber":826,"author":{"gitId":"-"},"content":""},{"lineNumber":827,"author":{"gitId":"-"},"content":"// tag::changePass2.0[]"},{"lineNumber":828,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change password: `changepass` `[Coming in v2.0]`"},{"lineNumber":829,"author":{"gitId":"-"},"content":""},{"lineNumber":830,"author":{"gitId":"-"},"content":"Should you feel that the default password used in `key` could be more secure, you may change it to a password of your"},{"lineNumber":831,"author":{"gitId":"-"},"content":"choosing with this command."},{"lineNumber":832,"author":{"gitId":"-"},"content":""},{"lineNumber":833,"author":{"gitId":"-"},"content":"Format: `changepass CURRENT_PASSWORD NEW_PASSWORD CONFIRM_PASSWORD` +"},{"lineNumber":834,"author":{"gitId":"-"},"content":"Alias: `cpw`"},{"lineNumber":835,"author":{"gitId":"-"},"content":""},{"lineNumber":836,"author":{"gitId":"-"},"content":"Here is how you can change the your password:"},{"lineNumber":837,"author":{"gitId":"-"},"content":""},{"lineNumber":838,"author":{"gitId":"-"},"content":"* `changepass ilikesports Securep@ssword1 Securep@ssword1`"},{"lineNumber":839,"author":{"gitId":"-"},"content":"// end::changePass2.0[]"},{"lineNumber":840,"author":{"gitId":"-"},"content":""},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"// tag::showBest2.0[]"},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Showing Best XI players: `showBest` `[Coming in v2.0]`"},{"lineNumber":843,"author":{"gitId":"-"},"content":""},{"lineNumber":844,"author":{"gitId":"-"},"content":"If you went to see your current best 11 players in your team based on their respective stats, this command"},{"lineNumber":845,"author":{"gitId":"-"},"content":"is for you."},{"lineNumber":846,"author":{"gitId":"-"},"content":""},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"Format: `showBest` +"},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":"Alias: `sb`"},{"lineNumber":849,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":850,"author":{"gitId":"lohtianwei"},"content":"[IMPORTANT]"},{"lineNumber":851,"author":{"gitId":"lohtianwei"},"content":".*What to expect*"},{"lineNumber":852,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":853,"author":{"gitId":"lohtianwei"},"content":"A lineup of the best 11 players would be displayed. It would consist of 1 Goalkeeper,"},{"lineNumber":854,"author":{"gitId":"lohtianwei"},"content":"4 Defenders, 4 Midfielders and 2 Strikers."},{"lineNumber":855,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":856,"author":{"gitId":"lohtianwei"},"content":"// end::showBest2.0[]"},{"lineNumber":857,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":858,"author":{"gitId":"-"},"content":"// tag::team2.0[]"},{"lineNumber":859,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting an upcoming match with an opposing team: `setmatch` `[Coming in v2.0]`"},{"lineNumber":860,"author":{"gitId":"-"},"content":""},{"lineNumber":861,"author":{"gitId":"-"},"content":"With this command, it gives you a convenient way to keep track of the upcoming match of a team."},{"lineNumber":862,"author":{"gitId":"-"},"content":""},{"lineNumber":863,"author":{"gitId":"-"},"content":"Format: `setmatch TEAM_NAME OPPONENT_TEAM_NAME DATE` +"},{"lineNumber":864,"author":{"gitId":"-"},"content":"Alias: `sm`"},{"lineNumber":865,"author":{"gitId":"-"},"content":""},{"lineNumber":866,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":868,"author":{"gitId":"-"},"content":"* Date format to be entered is in `DD/MM/YYYY`. +"},{"lineNumber":869,"author":{"gitId":"-"},"content":"* Opponent team does not need to exist in MTM."},{"lineNumber":870,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":871,"author":{"gitId":"-"},"content":""},{"lineNumber":872,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":873,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":874,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":875,"author":{"gitId":"-"},"content":"The upcoming match of the team will be captured and displayed to you."},{"lineNumber":876,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":877,"author":{"gitId":"-"},"content":""},{"lineNumber":878,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:"},{"lineNumber":879,"author":{"gitId":"-"},"content":""},{"lineNumber":880,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":881,"author":{"gitId":"-"},"content":"* `setmatch Arsenal Liverpool 14/03/2018`"},{"lineNumber":882,"author":{"gitId":"-"},"content":""},{"lineNumber":883,"author":{"gitId":"-"},"content":"Display the list of players in team \"Arsenal\" and set an upcoming match for Arsenal with Liverpool on 14/03/2018."},{"lineNumber":884,"author":{"gitId":"-"},"content":""},{"lineNumber":885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing the team\u0027s next upcoming match: `nextmatch` `[Coming in v2.0]`"},{"lineNumber":886,"author":{"gitId":"-"},"content":""},{"lineNumber":887,"author":{"gitId":"codeeong"},"content":"You can easily determine the up and coming match with the team so that you never miss an important date."},{"lineNumber":888,"author":{"gitId":"-"},"content":""},{"lineNumber":889,"author":{"gitId":"-"},"content":"Format: `nextmatch TEAM_NAME` +"},{"lineNumber":890,"author":{"gitId":"-"},"content":"Alias: `nm`"},{"lineNumber":891,"author":{"gitId":"-"},"content":""},{"lineNumber":892,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":893,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":894,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":895,"author":{"gitId":"-"},"content":"Displays the date and opponent for the upcoming match of the team specified."},{"lineNumber":896,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":897,"author":{"gitId":"-"},"content":""},{"lineNumber":898,"author":{"gitId":"codeeong"},"content":"Here are a few valid examples on how you can use the `nextmatch` command:"},{"lineNumber":899,"author":{"gitId":"-"},"content":""},{"lineNumber":900,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":901,"author":{"gitId":"-"},"content":"* `nextmatch Arsenal`"},{"lineNumber":902,"author":{"gitId":"-"},"content":""},{"lineNumber":903,"author":{"gitId":"-"},"content":"Displays the list of players in team \"Arsenal\" and view the next upcoming match for \"Arsenal\"."},{"lineNumber":904,"author":{"gitId":"-"},"content":"// end::team2.0[]"},{"lineNumber":905,"author":{"gitId":"-"},"content":""},{"lineNumber":906,"author":{"gitId":"codeeong"},"content":"// tag::showlineup[]"},{"lineNumber":907,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Displaying lineup for next match: `showLineup` `[Coming in v2.0]`"},{"lineNumber":908,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":909,"author":{"gitId":"codeeong"},"content":"You can view the lineup for the current best 11 players."},{"lineNumber":910,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":911,"author":{"gitId":"-"},"content":"Format: `showLineup TEAM_NAME` +"},{"lineNumber":912,"author":{"gitId":"codeeong"},"content":"Alias: `sl`"},{"lineNumber":913,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":914,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]"},{"lineNumber":915,"author":{"gitId":"codeeong"},"content":".*What to expect*"},{"lineNumber":916,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":917,"author":{"gitId":"codeeong"},"content":"The panel on the right will show the avatars of the 11 players that will be playing for the next match."},{"lineNumber":918,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":919,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":920,"author":{"gitId":"codeeong"},"content":"Here is an valid example on how you can use the `showLineup` command:"},{"lineNumber":921,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `showLineup Arsenal`"},{"lineNumber":923,"author":{"gitId":"-"},"content":""},{"lineNumber":924,"author":{"gitId":"codeeong"},"content":"Displays the 11 main players that will be playing for the next match."},{"lineNumber":925,"author":{"gitId":"codeeong"},"content":"// end::showlineup[]"},{"lineNumber":926,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":927,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Scheduling trainings for team `schedule` `[Coming in v2.0]`"},{"lineNumber":928,"author":{"gitId":"-"},"content":""},{"lineNumber":929,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sending reminder emails to players: `send` `[Coming in v2.0]`"},{"lineNumber":930,"author":{"gitId":"-"},"content":""},{"lineNumber":931,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving feedback to developers: `feedback` `[Coming in v2.0]`"},{"lineNumber":932,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":933,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving demerit to players based on performance: `demerit` `[Coming in v2.0]`"},{"lineNumber":934,"author":{"gitId":"-"},"content":""},{"lineNumber":935,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ"},{"lineNumber":936,"author":{"gitId":"-"},"content":""},{"lineNumber":937,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +"},{"lineNumber":938,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous MTM folder."},{"lineNumber":939,"author":{"gitId":"-"},"content":""},{"lineNumber":940,"author":{"gitId":"-"},"content":"// tag::commandsummary[]"},{"lineNumber":941,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":942,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Glossary"},{"lineNumber":943,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":944,"author":{"gitId":"-"},"content":"[[Index]]`INDEX` - The `INDEX` refers to the index number shown in the last player listing. The `INDEX` must be a positive integer 1, 2, 3, …"},{"lineNumber":945,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d Command Summary"},{"lineNumber":947,"author":{"gitId":"-"},"content":""},{"lineNumber":948,"author":{"gitId":"-"},"content":"Just a quick reference sheet for all your needs. Never forget how to use MTM ever again."},{"lineNumber":949,"author":{"gitId":"-"},"content":""},{"lineNumber":950,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Basic Commands and Features"},{"lineNumber":951,"author":{"gitId":"-"},"content":""},{"lineNumber":952,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":953,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":954,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":955,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":956,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":957,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":958,"author":{"gitId":"-"},"content":""},{"lineNumber":959,"author":{"gitId":"-"},"content":"|\u003c\u003cautocomplete, `Autocomplete`\u003e\u003e"},{"lineNumber":960,"author":{"gitId":"-"},"content":"|kbd:[tab]"},{"lineNumber":961,"author":{"gitId":"-"},"content":"|kbd:[tab] kbd:[space] kbd:[\u0026uarr;] kbd:[\u0026darr;]"},{"lineNumber":962,"author":{"gitId":"-"},"content":"d|Fills in your command for you"},{"lineNumber":963,"author":{"gitId":"-"},"content":""},{"lineNumber":964,"author":{"gitId":"-"},"content":"|\u003c\u003chelp, `help`\u003e\u003e"},{"lineNumber":965,"author":{"gitId":"-"},"content":"|kbd:[F1]"},{"lineNumber":966,"author":{"gitId":"-"},"content":"|help"},{"lineNumber":967,"author":{"gitId":"-"},"content":"d|Shows the user guide"},{"lineNumber":968,"author":{"gitId":"-"},"content":""},{"lineNumber":969,"author":{"gitId":"-"},"content":"|\u003c\u003chistory, `history`\u003e\u003e"},{"lineNumber":970,"author":{"gitId":"-"},"content":"|`h`"},{"lineNumber":971,"author":{"gitId":"-"},"content":"|history"},{"lineNumber":972,"author":{"gitId":"-"},"content":"d|Displays the list of commands entered previously"},{"lineNumber":973,"author":{"gitId":"-"},"content":""},{"lineNumber":974,"author":{"gitId":"-"},"content":"|\u003c\u003cundo, `undo`\u003e\u003e"},{"lineNumber":975,"author":{"gitId":"-"},"content":"|`u`"},{"lineNumber":976,"author":{"gitId":"-"},"content":"|undo"},{"lineNumber":977,"author":{"gitId":"-"},"content":"d|Undo the previous command"},{"lineNumber":978,"author":{"gitId":"-"},"content":""},{"lineNumber":979,"author":{"gitId":"-"},"content":"|\u003c\u003credo, `redo`\u003e\u003e"},{"lineNumber":980,"author":{"gitId":"-"},"content":"|`r`"},{"lineNumber":981,"author":{"gitId":"-"},"content":"|redo"},{"lineNumber":982,"author":{"gitId":"-"},"content":"d|Redo the previous command"},{"lineNumber":983,"author":{"gitId":"-"},"content":""},{"lineNumber":984,"author":{"gitId":"-"},"content":"|\u003c\u003ctoggleprivacy, `toggleprivacy`\u003e\u003e"},{"lineNumber":985,"author":{"gitId":"-"},"content":"|`tp`"},{"lineNumber":986,"author":{"gitId":"-"},"content":"|toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]"},{"lineNumber":987,"author":{"gitId":"-"},"content":"|toggleprivacy 2 a/"},{"lineNumber":988,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":989,"author":{"gitId":"-"},"content":"|\u003c\u003ckey, `key`\u003e\u003e"},{"lineNumber":990,"author":{"gitId":"-"},"content":"|`k`"},{"lineNumber":991,"author":{"gitId":"-"},"content":"|key PASSWORD"},{"lineNumber":992,"author":{"gitId":"-"},"content":"|key ilikesports"},{"lineNumber":993,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":994,"author":{"gitId":"-"},"content":"|\u003c\u003cclear, `clear`\u003e\u003e"},{"lineNumber":995,"author":{"gitId":"-"},"content":"|`c`"},{"lineNumber":996,"author":{"gitId":"-"},"content":"|clear"},{"lineNumber":997,"author":{"gitId":"-"},"content":"d|Removes all information in the application"},{"lineNumber":998,"author":{"gitId":"-"},"content":""},{"lineNumber":999,"author":{"gitId":"-"},"content":"|\u003c\u003cexit, `exit`\u003e\u003e"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"|`NONE`"},{"lineNumber":1001,"author":{"gitId":"-"},"content":"|exit"},{"lineNumber":1002,"author":{"gitId":"-"},"content":"d|Exits the application"},{"lineNumber":1003,"author":{"gitId":"-"},"content":""},{"lineNumber":1004,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1005,"author":{"gitId":"-"},"content":""},{"lineNumber":1006,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands"},{"lineNumber":1007,"author":{"gitId":"-"},"content":""},{"lineNumber":1008,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":1009,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1010,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":1011,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":1012,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":1013,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":1014,"author":{"gitId":"-"},"content":""},{"lineNumber":1015,"author":{"gitId":"-"},"content":"|\u003c\u003cadd, `add`\u003e\u003e"},{"lineNumber":1016,"author":{"gitId":"-"},"content":"|`a`"},{"lineNumber":1017,"author":{"gitId":"lithiumlkid"},"content":"|add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]..."},{"lineNumber":1018,"author":{"gitId":"lithiumlkid"},"content":"|add n/Ospina e/Ospina@arsenal.com tm/Arsenal a/70 Jurong Central Circle p/90722998 j/1 ra/2 po/4 av/Capture.png t/redCard"},{"lineNumber":1019,"author":{"gitId":"-"},"content":""},{"lineNumber":1020,"author":{"gitId":"-"},"content":"|\u003c\u003cedit, `edit`\u003e\u003e"},{"lineNumber":1021,"author":{"gitId":"-"},"content":"|`e`"},{"lineNumber":1022,"author":{"gitId":"-"},"content":"|edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]..."},{"lineNumber":1023,"author":{"gitId":"-"},"content":"|edit 2 n/James Lee e/jameslee@example.com"},{"lineNumber":1024,"author":{"gitId":"-"},"content":""},{"lineNumber":1025,"author":{"gitId":"-"},"content":"|\u003c\u003cdelete, `delete`\u003e\u003e"},{"lineNumber":1026,"author":{"gitId":"-"},"content":"|`d`"},{"lineNumber":1027,"author":{"gitId":"-"},"content":"|delete INDEX"},{"lineNumber":1028,"author":{"gitId":"-"},"content":"|delete 3"},{"lineNumber":1029,"author":{"gitId":"-"},"content":""},{"lineNumber":1030,"author":{"gitId":"-"},"content":"|\u003c\u003cremark, `remark`\u003e\u003e"},{"lineNumber":1031,"author":{"gitId":"-"},"content":"|`rm`"},{"lineNumber":1032,"author":{"gitId":"-"},"content":"|remark INDEX [r/[REMARK]]"},{"lineNumber":1033,"author":{"gitId":"-"},"content":"|remark 4 r/Gotta go faster"},{"lineNumber":1034,"author":{"gitId":"-"},"content":""},{"lineNumber":1035,"author":{"gitId":"-"},"content":"|\u003c\u003clist, `list`\u003e\u003e"},{"lineNumber":1036,"author":{"gitId":"-"},"content":"|`l`"},{"lineNumber":1037,"author":{"gitId":"-"},"content":"|list"},{"lineNumber":1038,"author":{"gitId":"-"},"content":"d|List all the players"},{"lineNumber":1039,"author":{"gitId":"-"},"content":""},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003c\u003csort, `sort`\u003e\u003e"},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|`so`"},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|sort FIELD ORDER"},{"lineNumber":1043,"author":{"gitId":"-"},"content":"|sort name asc"},{"lineNumber":1044,"author":{"gitId":"-"},"content":""},{"lineNumber":1045,"author":{"gitId":"-"},"content":"|\u003c\u003cfind, `find`\u003e\u003e"},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`f`"},{"lineNumber":1047,"author":{"gitId":"-"},"content":"|find KEYWORD [KEYWORD]..."},{"lineNumber":1048,"author":{"gitId":"-"},"content":"|find James Jake"},{"lineNumber":1049,"author":{"gitId":"-"},"content":""},{"lineNumber":1050,"author":{"gitId":"-"},"content":"|\u003c\u003cselect, `select`\u003e\u003e"},{"lineNumber":1051,"author":{"gitId":"-"},"content":"|`s`"},{"lineNumber":1052,"author":{"gitId":"-"},"content":"|select INDEX"},{"lineNumber":1053,"author":{"gitId":"-"},"content":"|select 2"},{"lineNumber":1054,"author":{"gitId":"-"},"content":""},{"lineNumber":1055,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1056,"author":{"gitId":"-"},"content":""},{"lineNumber":1057,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands"},{"lineNumber":1058,"author":{"gitId":"-"},"content":""},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":1060,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1061,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":1062,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":1063,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":1064,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":1065,"author":{"gitId":"-"},"content":""},{"lineNumber":1066,"author":{"gitId":"-"},"content":"|\u003c\u003ccreate, `create`\u003e\u003e"},{"lineNumber":1067,"author":{"gitId":"-"},"content":"|`ct`"},{"lineNumber":1068,"author":{"gitId":"-"},"content":"|create TEAM_NAME"},{"lineNumber":1069,"author":{"gitId":"-"},"content":"|create Arsenal"},{"lineNumber":1070,"author":{"gitId":"-"},"content":""},{"lineNumber":1071,"author":{"gitId":"-"},"content":"|\u003c\u003cview, `view`\u003e\u003e"},{"lineNumber":1072,"author":{"gitId":"-"},"content":"|`vt`"},{"lineNumber":1073,"author":{"gitId":"-"},"content":"|view TEAM_NAME"},{"lineNumber":1074,"author":{"gitId":"-"},"content":"|view Liverpool"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"-"},"content":"|\u003c\u003cassign, `assign`\u003e\u003e"},{"lineNumber":1077,"author":{"gitId":"-"},"content":"|`at`"},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|assign [TEAM_NAME] i/INDEX [INDEX]..."},{"lineNumber":1079,"author":{"gitId":"-"},"content":"|assign Barcelona i/1 2 3"},{"lineNumber":1080,"author":{"gitId":"-"},"content":""},{"lineNumber":1081,"author":{"gitId":"-"},"content":"|\u003c\u003crename, `rename`\u003e\u003e"},{"lineNumber":1082,"author":{"gitId":"-"},"content":"|`rnt`"},{"lineNumber":1083,"author":{"gitId":"-"},"content":"|rename TEAM_NAME tm/RENAME_TEAM_NAME"},{"lineNumber":1084,"author":{"gitId":"-"},"content":"|rename Arsenal tm/Neo Arsenal"},{"lineNumber":1085,"author":{"gitId":"-"},"content":""},{"lineNumber":1086,"author":{"gitId":"-"},"content":"|\u003c\u003cremove, `remove`\u003e\u003e"},{"lineNumber":1087,"author":{"gitId":"-"},"content":"|`rt`"},{"lineNumber":1088,"author":{"gitId":"-"},"content":"|remove TEAM_NAME"},{"lineNumber":1089,"author":{"gitId":"-"},"content":"|remove Real Madrid"},{"lineNumber":1090,"author":{"gitId":"-"},"content":""},{"lineNumber":1091,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1092,"author":{"gitId":"-"},"content":""},{"lineNumber":1093,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands"},{"lineNumber":1094,"author":{"gitId":"-"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":1096,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1097,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":1098,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":1099,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":1100,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":1101,"author":{"gitId":"-"},"content":""},{"lineNumber":1102,"author":{"gitId":"-"},"content":"|\u003c\u003csetTagColour, `setTagColour`\u003e\u003e"},{"lineNumber":1103,"author":{"gitId":"-"},"content":"|`stc`"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"|setTagColour t/TAG tc/COLOUR"},{"lineNumber":1105,"author":{"gitId":"-"},"content":"|setTagColour t/friends tc/yellow"},{"lineNumber":1106,"author":{"gitId":"-"},"content":""},{"lineNumber":1107,"author":{"gitId":"-"},"content":"|\u003c\u003cchangeTheme, `changeTheme`\u003e\u003e"},{"lineNumber":1108,"author":{"gitId":"-"},"content":"|`cte`"},{"lineNumber":1109,"author":{"gitId":"-"},"content":"|changeTheme THEME"},{"lineNumber":1110,"author":{"gitId":"-"},"content":"|changeTheme Dark"},{"lineNumber":1111,"author":{"gitId":"-"},"content":""},{"lineNumber":1112,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1113,"author":{"gitId":"-"},"content":"// end::commandsummary[]"}],"authorContributionMap":{"lithiumlkid":106,"lohtianwei":26,"codeeong":64,"-":917}},{"path":"docs/team/ahmadsyafiq.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lithiumlkid"},"content":"\u003d Ahmad Syafiq - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"lithiumlkid"},"content":":imagesDir: ../images"},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":stylesDir: ../stylesheets"},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d PROJECT: My Team Manager"},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"---"},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Overview"},{"lineNumber":8,"author":{"gitId":"lithiumlkid"},"content":"My Team Manager is a desktop address book application developed as part of a Software Engineering module requirement. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 6 kLoC."},{"lineNumber":9,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":10,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":11,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Summary of contributions"},{"lineNumber":12,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":13,"author":{"gitId":"lithiumlkid"},"content":"* *Major enhancement*: added *replaced person object with player object*"},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to add and edit players that contain more attributes/information such as jersey, position, rating and avatar"},{"lineNumber":15,"author":{"gitId":"lithiumlkid"},"content":"** Justification: This feature improves the product significantly because a user can fill the address book with more important information which can be used for other utility functions such as sort."},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":"It is accompanied with improved GUI to increase usability. Eg. the user can see player\u0027s avatar for better identification."},{"lineNumber":17,"author":{"gitId":"lithiumlkid"},"content":"** Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands."},{"lineNumber":18,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":19,"author":{"gitId":"lithiumlkid"},"content":"* *Minor enhancement*: added a *tab - autocomplete function*"},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to enter command lines more quickly by helping them complete commands by pressing the tab key. It also allows them to view suggested command and command parameters in case"},{"lineNumber":21,"author":{"gitId":"lithiumlkid"},"content":"the forget."},{"lineNumber":22,"author":{"gitId":"lithiumlkid"},"content":"** Credits: To make the search optimal, I used Tries as suggested on geek-for-geeks."},{"lineNumber":23,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lithiumlkid.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lithiumlkid.md[Test code]]"},{"lineNumber":25,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":26,"author":{"gitId":"lithiumlkid"},"content":"* *Other contributions*:"},{"lineNumber":27,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":28,"author":{"gitId":"lithiumlkid"},"content":"** Project management:"},{"lineNumber":29,"author":{"gitId":"lithiumlkid"},"content":"*** Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub"},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"** Enhancements to existing features:"},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"*** Enhanced the help function to only allow one help window at a time. (Pull request https://github.com/CS2103JAN2018-F14-B1/main/pull/169[#169])"},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":"** Documentation:"},{"lineNumber":33,"author":{"gitId":"lithiumlkid"},"content":"*** Did cosmetic tweaks to existing contents of the User Guide: https://github.com/CS2103JAN2018-F14-B1/main/pull/53[#53]"},{"lineNumber":34,"author":{"gitId":"lithiumlkid"},"content":"** Community:"},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":"*** PRs reviewed (with non-trivial review comments): https://github.com/CS2103JAN2018-F14-B1/main/pull/172[#172]"},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"*** Contributed to forum discussions (examples: https://github.com/nus-cs2103-AY1718S2/forum/issues/39[39], https://github.com/nus-cs2103-AY1718S2/forum/issues/47[#47])"},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":"*** Reported bugs and suggestions for other teams in the class (example: https://github.com/CS2103JAN2018-F14-B3/main/issues/228[#228])"},{"lineNumber":38,"author":{"gitId":"lithiumlkid"},"content":"** Tools:"},{"lineNumber":39,"author":{"gitId":"lithiumlkid"},"content":"*** Integrated a new Github plugin (CircleCI) to the team repo"},{"lineNumber":40,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":41,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the User Guide"},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":43,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":44,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":45,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._"},{"lineNumber":46,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":47,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":48,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003daddplayer]"},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":50,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003dautocomplete]"},{"lineNumber":51,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the Developer Guide"},{"lineNumber":53,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":55,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._"},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":57,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dplayer]"},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":60,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dautocomplete]"},{"lineNumber":61,"author":{"gitId":"lithiumlkid"},"content":""}],"authorContributionMap":{"lithiumlkid":60,"-":1}},{"path":"docs/team/codeeong.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"\u003d Codee Ong - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":":imagesDir: ../images"},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":":stylesDir: ../stylesheets"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"---"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Overview"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop application for *football team managers* to organise the information of players they are in charge of."},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"The primary usage of this application is to add and assign players to teams, and then edit and remove information related to"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"the players as and when it is required. MTM is value added with usability features that help the team manager manage his/her"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"teams and players efficiently."},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"The user interacts with MTM using a *Command Line Interface*, and it has a GUI created with JavaFX."},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Summary of contributions"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"* *Major enhancement*: Revamped the original user interface to one that suits the usage of an application for *team managers*."},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"** What it does: The change in UI allows the user to *keep track* of which team he/she is looking at, to *view his/her players\u0027 details*,"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"and even perform some *customisation* of the application theme."},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"** Justification: The overhaul of the UI is absolutely necessary to ensure the *best user experience* for users of My Team Manager. Previously,"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"the existing UI components were neither sufficient nor suitable for management of sports teams."},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"** Highlights: Addition of the *team display bar*, the *player details pane* when a player is selected, addition of *MTM logo*,"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"and *changeTheme* command."},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"* *Minor enhancement*: addition of a *setTagCommand* that allows the user to change existing tags to a colour of their choice."},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/Codee.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/Codee.md[Test code]]"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"* *Other contributions*:"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"** Project management:"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"*** Generated release files (.jar) in `v1.4` and `v1.5rc` (2 releases), and contributed release descriptions on GitHub."},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"** Enhancements to existing features:"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"*** changed the original GUI colour scheme [https://github.com/CS2103JAN2018-F14-B1/main/pull/89[PR #89]]"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"** Documentation:"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"*** changed the project name in all the relevant files so that it will be \"My Team Manager\" and not \"Address Book App\", including the data files. [https://github.com/CS2103JAN2018-F14-B1/main/pull/120[PR #120]]"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"*** Constantly updated the README and UserGuide\u0027s application preview image. [https://github.com/CS2103JAN2018-F14-B1/main/pull/99[PR #99]][https://github.com/CS2103JAN2018-F14-B1/main/pull/160[PR #160]]"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"** Community:"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"*** PRs Reviewed (with non trivial comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/95[PR #95]][https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR #169]][https://github.com/CS2103JAN2018-F14-B1/main/pull/175[PR #175]]"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the User Guide"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting the users of MTM._"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dchangeTheme]"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dsetTagColour]"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dshowlineup]"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the Developer Guide"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dsettagcolour]"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dteamDisplay]"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dPlayerDetails]"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dchangeThemeCommand]"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":72}},{"path":"docs/team/lohtianwei.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"\u003d Loh Tian Wei - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":":imagesDir: ../images"},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":":stylesDir: ../stylesheets"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"---"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Overview"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"My Team Manager (MTM) is a dekstop address book application for *football team managers*."},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"It can also be personalised to be used for other sports team management too such as basketball."},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"With the features it provides, management of your players\u0027 contact details and team information is made easy. While"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"interactions between user and application is mainly by a *Command Line Interface (CLI)*, it features a JavaFx GUI display."},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Summary of contributions"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"* *Major enhancement*: Added *security and privacy features*"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"** *What it does*: Ensures the information stored in MTM is *secured and kept private* when needed"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"** *Justification*: This feature is crucial for protecting the *confidentiality and integrity* of the details stored in MTM."},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"It prevents unauthorised tampering of information while also maintaining confidentiality."},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"** *Highlights*: Addition of a *locking mechanism* to limit functionality of MTM and changing *privacy of fields* that would maintain"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"confidentiality of certain information"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"* *Minor enhancement*:"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"** Added a sort function that allows the list to be sorted by fields for quick viewing of relevant information"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lohtianwei.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lohtianwei.md[Test code]]"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"* *Other contributions*:"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"** Project management:"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"*** Documented issues of project using GitHub\u0027s Issue Tracker and address the issues accordingly."},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"** Enhancements to existing features:"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"*** Changes are mentioned in \u003c\u003cMinor Enhancement, Minor enhancement\u003e\u003e."},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"** Documentation:"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"** Community:"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":"*** PRs reviewed (with non-trivial review comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR#169]]"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"*** Reported bugs and suggestions for other teams in the class (https://github.com/CS2103JAN2018-W09-B2/main/issues/198[1],"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/194[2],"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/182[3],"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/174[4])"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the User Guide"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dtogglePrivacy]"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dkey]"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the Developer Guide"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dkey]"}],"authorContributionMap":{"lohtianwei":68,"-":1}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * The main entry point to the application."},{"lineNumber":40,"author":{"gitId":"-"},"content":" */"},{"lineNumber":41,"author":{"gitId":"-"},"content":"public class MainApp extends Application {"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" public static final Version VERSION \u003d new Version(1, 1, 0, true);"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" protected Ui ui;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Logic logic;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Storage storage;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Config config;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void init() throws Exception {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":" super.init();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" initLogging(config);"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" logic \u003d new LogicManager(model);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" initEventsCenter();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book."},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();"},{"lineNumber":93,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");"},{"lineNumber":99,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":100,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":102,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" LogsCenter.init(config);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null."},{"lineNumber":116,"author":{"gitId":"-"},"content":" */"},{"lineNumber":117,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" Config initializedConfig;"},{"lineNumber":119,"author":{"gitId":"-"},"content":" String configFilePathUsed;"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":131,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());"},{"lineNumber":133,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \""},{"lineNumber":135,"author":{"gitId":"-"},"content":" + \"Using default config properties\");"},{"lineNumber":136,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":140,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":141,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);"},{"lineNumber":142,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":143,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":144,"author":{"gitId":"-"},"content":" }"},{"lineNumber":145,"author":{"gitId":"-"},"content":" return initializedConfig;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":149,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * reading from the file."},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();"},{"lineNumber":155,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;"},{"lineNumber":158,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();"},{"lineNumber":160,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());"},{"lineNumber":161,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":162,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \""},{"lineNumber":163,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");"},{"lineNumber":164,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":165,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":166,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":167,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":168,"author":{"gitId":"-"},"content":" }"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":171,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" return initializedPrefs;"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" private void initEventsCenter() {"},{"lineNumber":181,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);"},{"lineNumber":182,"author":{"gitId":"-"},"content":" }"},{"lineNumber":183,"author":{"gitId":"-"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":186,"author":{"gitId":"-"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);"},{"lineNumber":187,"author":{"gitId":"-"},"content":" ui.start(primaryStage);"},{"lineNumber":188,"author":{"gitId":"-"},"content":" }"},{"lineNumber":189,"author":{"gitId":"-"},"content":""},{"lineNumber":190,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":191,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":193,"author":{"gitId":"-"},"content":" ui.stop();"},{"lineNumber":194,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(userPrefs);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));"},{"lineNumber":198,"author":{"gitId":"-"},"content":" }"},{"lineNumber":199,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":200,"author":{"gitId":"-"},"content":" System.exit(0);"},{"lineNumber":201,"author":{"gitId":"-"},"content":" }"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {"},{"lineNumber":205,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":206,"author":{"gitId":"-"},"content":" this.stop();"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" public static void main(String[] args) {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" launch(args);"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":211}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private String appTitle \u003d \"My Team Manager\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well."},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_THEME \u003d \"This theme does not exist!\\n\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TEAM_NOT_FOUND \u003d \"Team does not exist or is not specified!\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_ALL_INDEX \u003d \"All person index provided is invalid\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":15}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeTagColourEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to change tag colour"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeTagColourEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String tagColour;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public final String tagName;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public ChangeTagColourEvent(String tagName, String tagColour) {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":23}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**@@author Codee */"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Indicates a request for theme change."},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String theme;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ChangeThemeEvent(String theme) {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().toString();"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/ClearTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for clearing of all teams."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ClearTeamsEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public ClearTeamsEvent() {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" }"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" }"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"}"},{"lineNumber":20,"author":{"gitId":"-"},"content":""}],"authorContributionMap":{"codeeong":7,"-":13}},{"path":"src/main/java/seedu/address/commons/events/ui/DeselectTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to deselected selected teams."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"public class DeselectTeamEvent extends BaseEvent {"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" public DeselectTeamEvent() {"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/HighlightSelectedTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to highlight selected team name."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class HighlightSelectedTeamEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public HighlightSelectedTeamEvent(String teamName) {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel."},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedEvent extends BaseEvent {"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" private final Person editedPerson;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private final Index index;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedEvent(Person editedPerson, Index index) {"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" this.editedPerson \u003d editedPerson;"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" this.index \u003d index;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" public Person getPerson() {"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" return this.editedPerson;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" public Index getIndex() {"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" return this.index;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":34}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedNoParamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel, but no paramaters."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedNoParamEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedNoParamEvent() { }"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/ShowNewTeamNameEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to show new team name."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ShowNewTeamNameEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ShowNewTeamNameEvent(String teamName) {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":22}},{"path":"src/main/java/seedu/address/commons/events/ui/UndoTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for undoing clearing of all teams."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class UndoTeamsEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public UndoTeamsEvent() {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" }"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" }"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":7,"-":11}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * API of the Logic component"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public interface Logic {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Executes the command and returns the result."},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user."},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @return the result of the command execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of list of teams */"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /** Returns the command trie. */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" CommandTrie getCommandTrie();"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":4,"-":32}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final CommandHistory history;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final CommandTrie commandTrie;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" history \u003d new CommandHistory();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" addressBookParser \u003d new AddressBookParser();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" commandTrie \u003d new CommandTrie();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");"},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" return result;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" } finally {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" history.add(commandText);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return model.getInitTeamList();"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public CommandTrie getCommandTrie() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return commandTrie;"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":6,"-":64}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TEAM_NAME;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Adds a player to the address book."},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a player to the address book. \""},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"Parameters: \""},{"lineNumber":39,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \""},{"lineNumber":41,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TEAM_NAME + \"TEAMNAME] \""},{"lineNumber":42,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":43,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":44,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":45,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":46,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":47,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":48,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":49,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":50,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \""},{"lineNumber":51,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \""},{"lineNumber":52,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \""},{"lineNumber":53,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \""},{"lineNumber":54,"author":{"gitId":"-"},"content":" + PREFIX_RATING + \"0 \""},{"lineNumber":55,"author":{"gitId":"-"},"content":" + PREFIX_POSITION + \"1 \""},{"lineNumber":56,"author":{"gitId":"-"},"content":" + PREFIX_JERSEY_NUMBER + \"17 \""},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"goodAttitude\";"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_NAME + \"NAME \""},{"lineNumber":60,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \""},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New player added: %1$s\";"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book\";"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" private final Person toAdd;"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code Person}"},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public AddCommand(Person person) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" requireNonNull(person);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" toAdd \u003d person;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());"},{"lineNumber":94,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));"},{"lineNumber":95,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));"},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException e) {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);"},{"lineNumber":105,"author":{"gitId":"-"},"content":" }"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" TeamName teamName \u003d toAdd.getTeamName();"},{"lineNumber":111,"author":{"gitId":"-"},"content":" if (!model.getAddressBook().getTeamList().stream().anyMatch(t -\u003e t.getTeamName().equals(teamName))) {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (!teamName.toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" throw new CommandException((Messages.MESSAGE_TEAM_NOT_FOUND));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":" }"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":119,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":121,"author":{"gitId":"-"},"content":" || (other instanceof AddCommand // instanceof handles nulls"},{"lineNumber":122,"author":{"gitId":"-"},"content":" \u0026\u0026 toAdd.equals(((AddCommand) other).toAdd));"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":122}},{"path":"src/main/java/seedu/address/logic/commands/ChangeThemeCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Changes the theme of the Address Book."},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"changeTheme\";"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"cte\";"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" + \": Changes the theme of MTM.\\n\""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" + \"Parameters: THEME (must be either Light, or Dark)\\n\""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Examples: changeTheme Light, cte Dark\";"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_THEME_SUCCESS \u003d \"Theme updated to: %1$s\";"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final String theme;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" if (!isValidTheme(this.theme)) {"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_THEME);"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" if ((MainWindow.getCurrentTheme()).contains(this.theme)) {"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" throw new CommandException(\"Theme is already set to \" + this.theme + \"!\");"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private boolean isValidTheme(String theme) {"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" return theme.equals(\"Light\") || theme.equals(\"Dark\");"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" || (other instanceof ChangeThemeCommand // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.theme.equals(((ChangeThemeCommand) other).theme)); // state check"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":54}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Clears the address book."},{"lineNumber":11,"author":{"gitId":"-"},"content":" */"},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" model.resetData(new AddressBook());"},{"lineNumber":23,"author":{"gitId":"-"},"content":" // @@author Codee"},{"lineNumber":24,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new ClearTeamsEvent());"},{"lineNumber":25,"author":{"gitId":"-"},"content":" // @@author"},{"lineNumber":26,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":2,"-":25}},{"path":"src/main/java/seedu/address/logic/commands/CreateCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Creates a team to the application"},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class CreateCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"create\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"ct\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \"Creates a team in MTM. \""},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \"Parameters: \""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"TEAM_NAME\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Arsenal\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New team created: %1$s\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_TEAM \u003d \"This team already exist in the manager\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Team toCreate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Creates a CreateCommand to add the specified (@code Team)"},{"lineNumber":35,"author":{"gitId":"-"},"content":" *"},{"lineNumber":36,"author":{"gitId":"-"},"content":" */"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CreateCommand(Team team) {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" requireNonNull(team);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.toCreate \u003d team;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" model.createTeam(toCreate);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TEAM);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ShowNewTeamNameEvent(toCreate.getTeamName().toString()));"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toCreate.getTeamName().toString()));"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof CreateCommand // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 toCreate.equals(((CreateCommand) other).toCreate));"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":3,"-":57}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Deletes a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \": Deletes the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" private Person personToDelete;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public DeleteCommand(Index targetIndex) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" requireNonNull(personToDelete);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" personToDelete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls"},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex) // state check"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(this.personToDelete, ((DeleteCommand) other).personToDelete));"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":69}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":47,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Edits the details of an existing player in the address book."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the player identified \""},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \""},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":60,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":68,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":69,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \""},{"lineNumber":70,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \""},{"lineNumber":73,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":74,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":75,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":76,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":77,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":78,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":79,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":80,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":81,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: %1$s\";"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book.\";"},{"lineNumber":86,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" private final Index index;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" private Person personToEdit;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" private Person editedPerson;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * @param index of the player in the filtered player list to edit"},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the player with"},{"lineNumber":97,"author":{"gitId":"-"},"content":" */"},{"lineNumber":98,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" requireNonNull(index);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" this.index \u003d index;"},{"lineNumber":103,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" if (!editedPerson.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" editedPerson.getAvatar().setFilePath(editedPerson.getName().fullName);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":115,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":116,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");"},{"lineNumber":117,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":121,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));"},{"lineNumber":122,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":123,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());"},{"lineNumber":124,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":137,"author":{"gitId":"-"},"content":" editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * edited with {@code editPersonDescriptor}."},{"lineNumber":143,"author":{"gitId":"-"},"content":" * NOTE: Private fields will not be edited."},{"lineNumber":144,"author":{"gitId":"-"},"content":" */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static Person createEditedPerson(Person personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" Name updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":149,"author":{"gitId":"-"},"content":" Phone updatedPhone \u003d (personToEdit.getPhone().isPrivate())"},{"lineNumber":150,"author":{"gitId":"-"},"content":" ? personToEdit.getPhone() : editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());"},{"lineNumber":151,"author":{"gitId":"-"},"content":" Email updatedEmail \u003d (personToEdit.getEmail().isPrivate())"},{"lineNumber":152,"author":{"gitId":"-"},"content":" ? personToEdit.getEmail() : editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());"},{"lineNumber":153,"author":{"gitId":"-"},"content":" Address updatedAddress \u003d (personToEdit.getAddress().isPrivate())"},{"lineNumber":154,"author":{"gitId":"-"},"content":" ? personToEdit.getAddress() : editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());"},{"lineNumber":155,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate())"},{"lineNumber":156,"author":{"gitId":"-"},"content":" ? personToEdit.getRemark() : personToEdit.getRemark();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();"},{"lineNumber":158,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());"},{"lineNumber":159,"author":{"gitId":"-"},"content":" Rating updatedRating \u003d editPersonDescriptor.getRating().orElse(personToEdit.getRating());"},{"lineNumber":160,"author":{"gitId":"-"},"content":" JerseyNumber updatedJerseyNumber \u003d editPersonDescriptor.getJerseyNumber()"},{"lineNumber":161,"author":{"gitId":"-"},"content":" .orElse(personToEdit.getJerseyNumber());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" Position updatedPosition \u003d editPersonDescriptor.getPosition().orElse(personToEdit.getPosition());"},{"lineNumber":163,"author":{"gitId":"-"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":167,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" }"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":171,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":178,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {"},{"lineNumber":179,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":183,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;"},{"lineNumber":184,"author":{"gitId":"-"},"content":" return index.equals(e.index)"},{"lineNumber":185,"author":{"gitId":"-"},"content":" \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor)"},{"lineNumber":186,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(personToEdit, e.personToEdit);"},{"lineNumber":187,"author":{"gitId":"-"},"content":" }"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":190,"author":{"gitId":"-"},"content":" * Stores the details to edit the player with. Each non-empty field value will replace the"},{"lineNumber":191,"author":{"gitId":"-"},"content":" * corresponding field value of the player."},{"lineNumber":192,"author":{"gitId":"-"},"content":" */"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" private Name name;"},{"lineNumber":195,"author":{"gitId":"-"},"content":" private Phone phone;"},{"lineNumber":196,"author":{"gitId":"-"},"content":" private Email email;"},{"lineNumber":197,"author":{"gitId":"-"},"content":" private Address address;"},{"lineNumber":198,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;"},{"lineNumber":199,"author":{"gitId":"-"},"content":" private Rating rating;"},{"lineNumber":200,"author":{"gitId":"-"},"content":" private Position position;"},{"lineNumber":201,"author":{"gitId":"-"},"content":" private JerseyNumber jerseyNumber;"},{"lineNumber":202,"author":{"gitId":"-"},"content":" private Avatar avatar;"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Copy constructor."},{"lineNumber":208,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally."},{"lineNumber":209,"author":{"gitId":"-"},"content":" */"},{"lineNumber":210,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {"},{"lineNumber":211,"author":{"gitId":"-"},"content":" setName(toCopy.name);"},{"lineNumber":212,"author":{"gitId":"-"},"content":" setPhone(toCopy.phone);"},{"lineNumber":213,"author":{"gitId":"-"},"content":" setEmail(toCopy.email);"},{"lineNumber":214,"author":{"gitId":"-"},"content":" setAddress(toCopy.address);"},{"lineNumber":215,"author":{"gitId":"-"},"content":" setTags(toCopy.tags);"},{"lineNumber":216,"author":{"gitId":"-"},"content":" setRating(toCopy.rating);"},{"lineNumber":217,"author":{"gitId":"-"},"content":" setPosition(toCopy.position);"},{"lineNumber":218,"author":{"gitId":"-"},"content":" setJerseyNumber(toCopy.jerseyNumber);"},{"lineNumber":219,"author":{"gitId":"-"},"content":" setAvatar(toCopy.avatar);"},{"lineNumber":220,"author":{"gitId":"-"},"content":" }"},{"lineNumber":221,"author":{"gitId":"-"},"content":""},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited."},{"lineNumber":224,"author":{"gitId":"-"},"content":" */"},{"lineNumber":225,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":226,"author":{"gitId":"-"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.tags,"},{"lineNumber":227,"author":{"gitId":"-"},"content":" this.rating, this.position, this.jerseyNumber, this.avatar);"},{"lineNumber":228,"author":{"gitId":"-"},"content":" }"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" this.name \u003d name;"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {"},{"lineNumber":235,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);"},{"lineNumber":236,"author":{"gitId":"-"},"content":" }"},{"lineNumber":237,"author":{"gitId":"-"},"content":""},{"lineNumber":238,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":239,"author":{"gitId":"-"},"content":" this.phone \u003d phone;"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {"},{"lineNumber":243,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);"},{"lineNumber":244,"author":{"gitId":"-"},"content":" }"},{"lineNumber":245,"author":{"gitId":"-"},"content":""},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":247,"author":{"gitId":"-"},"content":" this.email \u003d email;"},{"lineNumber":248,"author":{"gitId":"-"},"content":" }"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {"},{"lineNumber":251,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" this.address \u003d address;"},{"lineNumber":256,"author":{"gitId":"-"},"content":" }"},{"lineNumber":257,"author":{"gitId":"-"},"content":""},{"lineNumber":258,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {"},{"lineNumber":259,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Sets {@code tags} to this object\u0027s {@code tags}."},{"lineNumber":264,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally."},{"lineNumber":265,"author":{"gitId":"-"},"content":" */"},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":267,"author":{"gitId":"-"},"content":" this.tags \u003d (tags !\u003d null) ? new HashSet\u003c\u003e(tags) : null;"},{"lineNumber":268,"author":{"gitId":"-"},"content":" }"},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * Returns an unmodifiable tag set, which throws {@code UnsupportedOperationException}"},{"lineNumber":272,"author":{"gitId":"-"},"content":" * if modification is attempted."},{"lineNumber":273,"author":{"gitId":"-"},"content":" * Returns {@code Optional#empty()} if {@code tags} is null."},{"lineNumber":274,"author":{"gitId":"-"},"content":" */"},{"lineNumber":275,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {"},{"lineNumber":276,"author":{"gitId":"-"},"content":" return (tags !\u003d null) ? Optional.of(Collections.unmodifiableSet(tags)) : Optional.empty();"},{"lineNumber":277,"author":{"gitId":"-"},"content":" }"},{"lineNumber":278,"author":{"gitId":"-"},"content":""},{"lineNumber":279,"author":{"gitId":"-"},"content":" public void setRating(Rating rating) {"},{"lineNumber":280,"author":{"gitId":"-"},"content":" this.rating \u003d rating;"},{"lineNumber":281,"author":{"gitId":"-"},"content":" }"},{"lineNumber":282,"author":{"gitId":"-"},"content":""},{"lineNumber":283,"author":{"gitId":"-"},"content":" public Optional\u003cRating\u003e getRating() {"},{"lineNumber":284,"author":{"gitId":"-"},"content":" return Optional.ofNullable(rating);"},{"lineNumber":285,"author":{"gitId":"-"},"content":" }"},{"lineNumber":286,"author":{"gitId":"-"},"content":""},{"lineNumber":287,"author":{"gitId":"-"},"content":" public void setPosition(Position position) {"},{"lineNumber":288,"author":{"gitId":"-"},"content":" this.position \u003d position;"},{"lineNumber":289,"author":{"gitId":"-"},"content":" }"},{"lineNumber":290,"author":{"gitId":"-"},"content":""},{"lineNumber":291,"author":{"gitId":"-"},"content":" public Optional\u003cPosition\u003e getPosition() {"},{"lineNumber":292,"author":{"gitId":"-"},"content":" return Optional.ofNullable(position);"},{"lineNumber":293,"author":{"gitId":"-"},"content":" }"},{"lineNumber":294,"author":{"gitId":"-"},"content":""},{"lineNumber":295,"author":{"gitId":"-"},"content":" public void setJerseyNumber(JerseyNumber jerseyNumber) {"},{"lineNumber":296,"author":{"gitId":"-"},"content":" this.jerseyNumber \u003d jerseyNumber;"},{"lineNumber":297,"author":{"gitId":"-"},"content":" }"},{"lineNumber":298,"author":{"gitId":"-"},"content":""},{"lineNumber":299,"author":{"gitId":"-"},"content":" public Optional\u003cJerseyNumber\u003e getJerseyNumber() {"},{"lineNumber":300,"author":{"gitId":"-"},"content":" return Optional.ofNullable(jerseyNumber);"},{"lineNumber":301,"author":{"gitId":"-"},"content":" }"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" public void setAvatar(Avatar avatar) {"},{"lineNumber":304,"author":{"gitId":"-"},"content":" this.avatar \u003d avatar;"},{"lineNumber":305,"author":{"gitId":"-"},"content":" }"},{"lineNumber":306,"author":{"gitId":"-"},"content":""},{"lineNumber":307,"author":{"gitId":"-"},"content":" public Optional\u003cAvatar\u003e getAvatar() {"},{"lineNumber":308,"author":{"gitId":"-"},"content":" return Optional.ofNullable(avatar);"},{"lineNumber":309,"author":{"gitId":"-"},"content":" }"},{"lineNumber":310,"author":{"gitId":"-"},"content":""},{"lineNumber":311,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":312,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":313,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":314,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":315,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":316,"author":{"gitId":"-"},"content":" }"},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":319,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {"},{"lineNumber":320,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":321,"author":{"gitId":"-"},"content":" }"},{"lineNumber":322,"author":{"gitId":"-"},"content":""},{"lineNumber":323,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":324,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())"},{"lineNumber":327,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())"},{"lineNumber":328,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())"},{"lineNumber":329,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())"},{"lineNumber":330,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags())"},{"lineNumber":331,"author":{"gitId":"-"},"content":" \u0026\u0026 getRating().equals(e.getRating())"},{"lineNumber":332,"author":{"gitId":"-"},"content":" \u0026\u0026 getPosition().equals(e.getPosition())"},{"lineNumber":333,"author":{"gitId":"-"},"content":" \u0026\u0026 getJerseyNumber().equals(e.getJerseyNumber())"},{"lineNumber":334,"author":{"gitId":"-"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar());"},{"lineNumber":335,"author":{"gitId":"-"},"content":" }"},{"lineNumber":336,"author":{"gitId":"-"},"content":" }"},{"lineNumber":337,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":335}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Finds and lists all persons in address book whose name contains any of the argument keywords."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive."},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \""},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"KEYWORD [MORE KEYWORD]\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final NameContainsKeywordsPredicate predicate;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" this.predicate \u003d predicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":36,"author":{"gitId":"-"},"content":" || (other instanceof FindCommand // instanceof handles nulls"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 this.predicate.equals(((FindCommand) other).predicate)); // state check"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/KeyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Sets lock in model to true/false depending on current state"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"key\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"k\";"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the lock on MTM. \""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"Functionality of MTM reduced\\n\""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Input empty password to see current lock state\\n\""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: [PASSWORD]\\n\""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \" myPassword\";"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"MTM lock toggled!\";"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_WRONG_PASS \u003d \"Password entered is incorrect. Please try again.\";"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"[PASSWORD]\";"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" private String password;"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final Logger logger \u003d LogsCenter.getLogger(KeyCommand.class);"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand(String password) {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" this.password \u003d password;"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" * Checks if input password is correct."},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" private boolean correctPassword() {"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" UserPrefs up \u003d model.getUserPrefs();"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" return hash.equals(up.getAddressBookHashedPass());"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" private boolean emptyPass() {"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" return password.isEmpty();"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (emptyPass()) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_USAGE + \"\\nLock state is now: \""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" if (correctPassword()) {"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (model.getLockState()) {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS + \"\\nLock state is now: \""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_WRONG_PASS);"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":74}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user."},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all persons\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());"},{"lineNumber":23,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":4,"-":20}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Redo the previously undone command."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee"},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/RemarkCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Updates the remark of an existing player in the address book."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RemarkCommand extends UndoableCommand {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"remark\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"rm\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Updates the remark of the player identified \""},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \""},{"lineNumber":29,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":30,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":31,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"[REMARK]\\n\""},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"Must put on field\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADD_REMARK_SUCCESS \u003d \"Remark added to: %1$s\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_REMARK_SUCCESS \u003d \"Remark removed from: %1$s\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" private final Index index;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Remark remark;"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" private Person personToEdit;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Person editedPerson;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public RemarkCommand(Index index, Remark remark) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" requireNonNull(index);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" requireNonNull(remark);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" this.index \u003d index;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.remark \u003d remark;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" requireNonNull(personToEdit);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Updating remark should not result in duplicate\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new CommandResult(getSuccessMessage(editedPerson));"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":80,"author":{"gitId":"-"},"content":" editedPerson \u003d new Person(personToEdit.getName(), personToEdit.getPhone(), personToEdit.getEmail(),"},{"lineNumber":81,"author":{"gitId":"-"},"content":" personToEdit.getAddress(), remark, personToEdit.getTeamName(), personToEdit.getTags(),"},{"lineNumber":82,"author":{"gitId":"-"},"content":" personToEdit.getRating(), personToEdit.getPosition(), personToEdit.getJerseyNumber(),"},{"lineNumber":83,"author":{"gitId":"-"},"content":" personToEdit.getAvatar());"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":89,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!(other instanceof RemarkCommand)) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":99,"author":{"gitId":"-"},"content":" RemarkCommand e \u003d (RemarkCommand) other;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return index.equals(e.index)"},{"lineNumber":101,"author":{"gitId":"-"},"content":" \u0026\u0026 remark.equals(e.remark);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Gets the corresponding success message based on the remark field from {@code personToEdit} after editing."},{"lineNumber":106,"author":{"gitId":"-"},"content":" */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" private String getSuccessMessage(Person person) {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" String message \u003d remark.value.isEmpty() ? MESSAGE_DELETE_REMARK_SUCCESS : MESSAGE_ADD_REMARK_SUCCESS;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return String.format(message, personToEdit);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":4,"-":107}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":52,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":54}},{"path":"src/main/java/seedu/address/logic/commands/SetCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" * Adds a colour to a tag in address book."},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/** @@author Codee Ong Ong */"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"setTagColour\";"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sets the colour of tags to the colour of choice \""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Parameters: \""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"TAG \""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\\n\""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"friends \""},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG_COLOUR + \"green\\n\""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" + \"Colours to choose from are : teal, red, yellow, blue, orange, brown, \\n\""},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" + \"green, pink, black, grey\\n\";"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_TAG + \"TAG \" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_TAG \u003d \"tag is invalid! Please input a valid tag name!\";"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_SUCCESS \u003d \"tag %1$s colour changed to %2$s\";"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private final String tagColour;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" * Creates an AddCommand to add the specified {@code Person}"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" if (!tagToSet.isValidTagName(tagToSet.getTagName()) || !isTagValid) {"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_INVALID_TAG));"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // Check if"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" // (a) Object is the same object"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" // (b) Object is an instance of the object and that toSet, tag and color are the same"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" || (other instanceof SetCommand // instanceof handles nulls"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagToSet.getTagName().equals(((SetCommand) other).tagToSet.getTagName()))"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagColour.equals(((SetCommand) other).tagColour);"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Sorts all players in address book by field. Can be done in asc or desc order."},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class SortCommand extends UndoableCommand {"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"sort\";"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_ASCENDING \u003d \"asc\";"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_DESCENDING \u003d \"desc\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts players in address book \""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"by fields in either ascending or descending order.\\n\""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: FIELD ORDER\\n\""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted fields for sort: name, email, address, rating, jersey, pos\\n\""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted orders: asc \u0026 desc\\n\""},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" + \" name \" + BY_ASCENDING;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"FIELD ORDER\";"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Players in address book have been sorted.\";"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_EMPTY_BOOK \u003d \"No player(s) to sort.\";"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private final String field;"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final String order;"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public SortCommand(String field, String order) {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(field);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(order);"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" this.field \u003d field;"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" this.order \u003d order;"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public String getField() {"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" return this.field;"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public String getOrder() {"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return this.order;"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" model.sortPlayers(getField(), getOrder());"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" } catch (NoPlayerException npe) {"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_EMPTY_BOOK);"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":62}},{"path":"src/main/java/seedu/address/logic/commands/TogglePrivacyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import java.util.Set;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" * Toggles privacy of fields of player identified using it\u0027s last displayed index from the address book."},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommand extends UndoableCommand {"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"toggleprivacy\";"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"tp\";"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the field privacy of the person\""},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" + \" identified by the index number used in the last person listing.\\n\""},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"]\""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_EMAIL + \"]\""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_REMARK + \"]\""},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_RATING + \"]\""},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_ADDRESS + \"]\\n\""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE + \" \""},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_EMAIL + \" \""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_ADDRESS;"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"No prefixes were specified!\";"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \""},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE]\""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_EMAIL + \"EMAIL]\""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_REMARK + \"REMARK]\""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_RATING + \"RATING]\""},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_ADDRESS + \"ADDRESS]\";"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" private final Index index;"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" private final EditPersonPrivacy epp;"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" private Person personToEdit;"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" private Person editedPerson;"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" * @param index of the person in the filtered person list to edit privacy"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand(Index index, EditPersonPrivacy epp) {"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(index);"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(epp);"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.index \u003d index;"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d epp;"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" editedPerson \u003d createEditedPrivacyPerson(personToEdit, epp);"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Person must have all fields!\");"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));"},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" * edited with {@code editPersonPrivacy}."},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" * NOTE: Private fields will not be edited."},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);"},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();"},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();"},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" Phone phone;"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {"},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" return phone;"},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" private static Email createEmailPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" Email email;"},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {"},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();"},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();"},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Email\");"},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateEmail() !\u003d null) {"},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());"},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" email.togglePrivacy();"},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());"},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" return email;"},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" private static Address createAddressPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" Address address;"},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();"},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();"},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Address\");"},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateAddress() !\u003d null) {"},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());"},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":" address.togglePrivacy();"},{"lineNumber":214,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":215,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());"},{"lineNumber":216,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" return address;"},{"lineNumber":218,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":219,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":220,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" private static Remark createRemarkPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" Remark remark;"},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":228,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {"},{"lineNumber":229,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();"},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();"},{"lineNumber":232,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":233,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Remark\");"},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRemark() !\u003d null) {"},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());"},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":" remark.togglePrivacy();"},{"lineNumber":241,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":242,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());"},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" return remark;"},{"lineNumber":245,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":246,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Rating) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Rating) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" private static Rating createRatingPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":" Rating rating;"},{"lineNumber":254,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":255,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {"},{"lineNumber":256,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();"},{"lineNumber":257,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());"},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();"},{"lineNumber":259,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":260,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());"},{"lineNumber":261,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":262,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":263,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Rating\");"},{"lineNumber":264,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRating() !\u003d null) {"},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());"},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":" rating.togglePrivacy();"},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());"},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" return rating;"},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" public Index getIndex() {"},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":" return index;"},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy getEpp() {"},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" return epp;"},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {"},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object"},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" return true;"},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls"},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof TogglePrivacyCommand)) {"},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" return false;"},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":293,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":294,"author":{"gitId":"lohtianwei"},"content":" // state check"},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand e \u003d (TogglePrivacyCommand) other;"},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" return index.equals(e.index)"},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 epp.equals(e.epp);"},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the"},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" * corresponding field value of the person."},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" public static class EditPersonPrivacy {"},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" private Boolean privatePhone;"},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateEmail;"},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateAddress;"},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRemark;"},{"lineNumber":309,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRating;"},{"lineNumber":310,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":311,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy() {}"},{"lineNumber":312,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":313,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":" * Copy constructor."},{"lineNumber":315,"author":{"gitId":"lohtianwei"},"content":" * A defensive copy of {@code tags} is used internally."},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":317,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy (EditPersonPrivacy toCopy) {"},{"lineNumber":318,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d toCopy.privateAddress;"},{"lineNumber":319,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d toCopy.privateEmail;"},{"lineNumber":320,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d toCopy.privatePhone;"},{"lineNumber":321,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d toCopy.privateRemark;"},{"lineNumber":322,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d toCopy.privateRating;"},{"lineNumber":323,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":324,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":325,"author":{"gitId":"lohtianwei"},"content":" public void setPrivatePhone(boolean privatePhone) {"},{"lineNumber":326,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d privatePhone;"},{"lineNumber":327,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":328,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":329,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivatePhone() {"},{"lineNumber":330,"author":{"gitId":"lohtianwei"},"content":" return privatePhone;"},{"lineNumber":331,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":332,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":333,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateEmail(boolean privateEmail) {"},{"lineNumber":334,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d privateEmail;"},{"lineNumber":335,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":336,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":337,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateEmail() {"},{"lineNumber":338,"author":{"gitId":"lohtianwei"},"content":" return privateEmail;"},{"lineNumber":339,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":340,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":341,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateAddress(boolean privateAddress) {"},{"lineNumber":342,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d privateAddress;"},{"lineNumber":343,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":344,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":345,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateAddress() {"},{"lineNumber":346,"author":{"gitId":"lohtianwei"},"content":" return privateAddress;"},{"lineNumber":347,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":348,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":349,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRemark(boolean privateRemark) {"},{"lineNumber":350,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d privateRemark;"},{"lineNumber":351,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":352,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":353,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRemark() {"},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":" return privateRemark;"},{"lineNumber":355,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":356,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":357,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRating(boolean privateRating) {"},{"lineNumber":358,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d privateRating;"},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":360,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":361,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRating() {"},{"lineNumber":362,"author":{"gitId":"lohtianwei"},"content":" return privateRating;"},{"lineNumber":363,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":364,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":365,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":366,"author":{"gitId":"lohtianwei"},"content":" *"},{"lineNumber":367,"author":{"gitId":"lohtianwei"},"content":" * @return true if at least one field is not null"},{"lineNumber":368,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":" public boolean anyNonNullField() {"},{"lineNumber":370,"author":{"gitId":"lohtianwei"},"content":" return CollectionUtil.isAnyNonNull(this.privateAddress, this.privateEmail, this.privatePhone,"},{"lineNumber":371,"author":{"gitId":"lohtianwei"},"content":" this.privateRating, this.privateRemark);"},{"lineNumber":372,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":373,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":374,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":375,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {"},{"lineNumber":376,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object"},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":378,"author":{"gitId":"lohtianwei"},"content":" return true;"},{"lineNumber":379,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":380,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":381,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls"},{"lineNumber":382,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof EditPersonPrivacy)) {"},{"lineNumber":383,"author":{"gitId":"lohtianwei"},"content":" return false;"},{"lineNumber":384,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":385,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":386,"author":{"gitId":"lohtianwei"},"content":" // state check"},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy e \u003d (EditPersonPrivacy) other;"},{"lineNumber":388,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":389,"author":{"gitId":"lohtianwei"},"content":" return getPrivatePhone().equals(e.getPrivatePhone())"},{"lineNumber":390,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateAddress().equals(e.getPrivateAddress())"},{"lineNumber":391,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateEmail().equals(e.getPrivateEmail())"},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRemark().equals(e.getPrivateRemark())"},{"lineNumber":393,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRating().equals(e.getPrivateRating());"},{"lineNumber":394,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":395,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":396,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":394,"-":2}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee"},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/ViewCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * View a team identified using it\u0027s team name from the address book."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ViewCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"view\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"vt\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \": Views the team identified by the team name.\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: TEAM_NAME\\n\""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" Arsenal\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_VIEW_TEAM_SUCCESS \u003d \"Viewing Team: %1$s\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final TeamName targetTeam;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public ViewCommand(TeamName targetTeam) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.targetTeam \u003d targetTeam;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(targetTeam.toString()));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(targetTeam);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_VIEW_TEAM_SUCCESS, targetTeam.toString()));"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof ViewCommand // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetTeam.equals(((ViewCommand) other).targetTeam)); // state check"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":51}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemoveCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RenameCommand;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ViewCommand;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Parses user input."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddressBookParser {"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_RESTRICTED \u003d \"Not allowed! Please unlock MTM before execution.\\n\""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" + KeyCommand.MESSAGE_USAGE;"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input into command for execution."},{"lineNumber":50,"author":{"gitId":"-"},"content":" *"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * @param userInput full user input string"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @return the command based on the user input"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":54,"author":{"gitId":"-"},"content":" */"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());"},{"lineNumber":57,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");"},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Command res \u003d lowLevelCommand(commandWord, arguments);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" if (res !\u003d null) {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return res;"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" if (lockState) {"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(MESSAGE_RESTRICTED);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" switch (commandWord) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" case AddCommand.COMMAND_ALIAS:"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" case EditCommand.COMMAND_ALIAS:"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" case SelectCommand.COMMAND_ALIAS:"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" case DeleteCommand.COMMAND_ALIAS:"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" case ClearCommand.COMMAND_ALIAS:"},{"lineNumber":93,"author":{"gitId":"-"},"content":" return new ClearCommand();"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_WORD:"},{"lineNumber":96,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_ALIAS:"},{"lineNumber":97,"author":{"gitId":"-"},"content":" return new RemarkCommandParser().parse(arguments);"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:"},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" case HistoryCommand.COMMAND_ALIAS:"},{"lineNumber":101,"author":{"gitId":"-"},"content":" return new HistoryCommand();"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_WORD:"},{"lineNumber":104,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_ALIAS:"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new CreateCommandParser().parse(arguments);"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_WORD:"},{"lineNumber":108,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_ALIAS:"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return new RemoveCommandParser().parse(arguments);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_WORD:"},{"lineNumber":112,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_ALIAS:"},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new AssignCommandParser().parse(arguments);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_WORD:"},{"lineNumber":116,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_ALIAS:"},{"lineNumber":117,"author":{"gitId":"-"},"content":" return new RenameCommandParser().parse(arguments);"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" case UndoCommand.COMMAND_ALIAS:"},{"lineNumber":121,"author":{"gitId":"-"},"content":" return new UndoCommand();"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case RedoCommand.COMMAND_ALIAS:"},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new RedoCommand();"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_WORD:"},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_ALIAS:"},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" return new SetCommandParser().parse(arguments);"},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_WORD:"},{"lineNumber":132,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_ALIAS:"},{"lineNumber":133,"author":{"gitId":"-"},"content":" return new TogglePrivacyCommandParser().parse(arguments);"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * Checks for low level command words or aliases that do not violate restriction of a locked MTM."},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" * Else, control is returned back to original parseCommand method."},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" * @param commandWord"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" * @param arguments"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" switch(commandWord) {"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_WORD:"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" return new ChangeThemeCommandParser().parse(arguments);"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" return new ListCommand();"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_WORD:"},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_ALIAS:"},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommandParser().parse(arguments);"},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_WORD:"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_ALIAS:"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" return new ViewCommandParser().parse(arguments);"},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" return new ExitCommand();"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" return new HelpCommand();"},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" return null;"},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":82,"codeeong":6,"-":95}},{"path":"src/main/java/seedu/address/logic/parser/ChangeThemeCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.ChangeThemeCommand.MESSAGE_USAGE;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Parses input arguments and creates a new ThemeCommand object."},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParser implements Parser\u003cChangeThemeCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" * Parses the given (@code String) in the context of a ThemeCommand."},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" * @return ThemeCommand Object for execution"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand parse(String userInput) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" if (userInput.length() \u003d\u003d 0) {"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" return new ChangeThemeCommand(userInput);"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":26}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final Prefix PREFIX_TAG_COLOUR \u003d new Prefix(\"tc/\");"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TEAM_NAME \u003d new Prefix(\"tm/\");"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_INDEX \u003d new Prefix(\"i/\");"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_RATING \u003d new Prefix(\"ra/\");"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_JERSEY_NUMBER \u003d new Prefix(\"j/\");"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_POSITION \u003d new Prefix(\"po/\");"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"av/\");"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":21}},{"path":"src/main/java/seedu/address/logic/parser/KeyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Parses input and creates KeyCommand object with password provided"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandParser implements Parser\u003cKeyCommand\u003e {"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the KeyCommand"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" * and returns a KeyCommand object for execution."},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand parse(String args) throws ParseException {"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" /*if (trimmedArgs.isEmpty()) {"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }*/"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length \u003e 1) {"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommand(argKeywords[0]);"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":31}},{"path":"src/main/java/seedu/address/logic/parser/SetCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Stream;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" * This class is to check whether Set Command was input correctly"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" * Parses the given {@code String} of arguments in the context of the SetCommand"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * and returns an SetCommand object for execution."},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG, PREFIX_TAG_COLOUR);"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG, PREFIX_TAG_COLOUR)"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" || !argMultimap.getPreamble().isEmpty()) {"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d ParserUtil.parseTag(argMultimap.getValue(PREFIX_TAG).get());"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" String colour \u003d ParserUtil.parseTagColour(argMultimap.getValue(PREFIX_TAG_COLOUR).get());"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" if (!tag.isValidTagColour(colour)) {"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" throw new ParseException("},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" return new SetCommand(tag, colour);"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" throw new ParseException("},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":56}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Arrays;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new SortCommand object with field and order parameters provided"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_FIELDS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" \"name\", \"email\", \"address\", \"rating\", \"jersey\", \"pos\"));"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_ORDERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" \"asc\", \"desc\"));"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public SortCommand parse(String args) throws ParseException {"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" //eliminates spaces"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" //accounts for caps entries"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length !\u003d 2) {"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_FIELDS.contains(argKeywords[0])) {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_ORDERS.contains(argKeywords[1])) {"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return new SortCommand(argKeywords[0], argKeywords[1]);"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":51}},{"path":"src/main/java/seedu/address/logic/parser/TogglePrivacyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new TogglePrivacyCommand object"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParser implements Parser\u003cTogglePrivacyCommand\u003e {"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the TogglePrivacyCommand"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" * and returns an TogglePrivacyCommand object for execution."},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand parse(String args) throws ParseException {"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(args);"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" ArgumentTokenizer.tokenize(args,"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" PREFIX_REMARK, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_RATING);"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" Index index;"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_RATING).isPresent()) {"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" if (!epp.anyNonNullField()) {"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(TogglePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" return new TogglePrivacyCommand(index, epp);"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":67,"-":2}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.UniqueTeamList;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"},{"lineNumber":42,"author":{"gitId":"-"},"content":" *"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}"},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e syncedPersonList \u003d newData.getPersonList().stream()"},{"lineNumber":83,"author":{"gitId":"-"},"content":" .map(this::syncWithMasterTagList)"},{"lineNumber":84,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());"},{"lineNumber":85,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e syncedTeamList \u003d newData.getTeamList();"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(syncedPersonList);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" setTeams(syncedTeamList);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBooks should not have duplicate persons\");"},{"lineNumber":92,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" throw new AssertionError(\"MTM should not have duplicate teams\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" //// person-level operations"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Adds a person to the address book."},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}."},{"lineNumber":103,"author":{"gitId":"-"},"content":" *"},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists."},{"lineNumber":105,"author":{"gitId":"-"},"content":" */"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person p) throws DuplicatePersonException {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person person \u003d syncWithMasterTagList(p);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":109,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":110,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":111,"author":{"gitId":"-"},"content":" persons.add(person);"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedPerson}."},{"lineNumber":116,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedPerson}."},{"lineNumber":117,"author":{"gitId":"-"},"content":" *"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":119,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":120,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":121,"author":{"gitId":"-"},"content":" *"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * @see #syncWithMasterTagList(Person)"},{"lineNumber":123,"author":{"gitId":"-"},"content":" */"},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":125,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":126,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person syncedEditedPerson \u003d syncWithMasterTagList(editedPerson);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":130,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":131,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" removeUnusedTags();"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayersBy(String field, String order) throws NoPlayerException {"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" persons.sortBy(field, order);"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" //@@author"},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Updates the master tag list to include tags in {@code person} that are not in the list."},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @return a copy of this {@code person} such that every tag in this person points to a Tag object in the master"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * list."},{"lineNumber":149,"author":{"gitId":"-"},"content":" */"},{"lineNumber":150,"author":{"gitId":"-"},"content":" private Person syncWithMasterTagList(Person person) {"},{"lineNumber":151,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());"},{"lineNumber":152,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list"},{"lineNumber":155,"author":{"gitId":"-"},"content":" // used for checking person tag references"},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list."},{"lineNumber":160,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));"},{"lineNumber":162,"author":{"gitId":"-"},"content":" return new Person("},{"lineNumber":163,"author":{"gitId":"-"},"content":" person.getName(), person.getPhone(), person.getEmail(), person.getAddress(), person.getRemark(),"},{"lineNumber":164,"author":{"gitId":"-"},"content":" person.getTeamName(), correctTagReferences, person.getRating(), person.getPosition(),"},{"lineNumber":165,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":166,"author":{"gitId":"-"},"content":" }"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":170,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":171,"author":{"gitId":"-"},"content":" */"},{"lineNumber":172,"author":{"gitId":"-"},"content":" public boolean removePerson(Person key) throws PersonNotFoundException {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":175,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":176,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" }"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" //// tag-level operations"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {"},{"lineNumber":183,"author":{"gitId":"-"},"content":" tags.add(t);"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }"},{"lineNumber":185,"author":{"gitId":"-"},"content":""},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" * Sets the colour of {@code tag}."},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" public void setTagColour(Tag tag, String colour) {"},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" for (Tag t : tags) {"},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" if (t.getTagName().equals(tag.getTagName())) {"},{"lineNumber":194,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(colour);"},{"lineNumber":195,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":196,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":197,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":198,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":200,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":201,"author":{"gitId":"-"},"content":" *"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Removes {@code tag} from all persons in this {@code AddressBook}."},{"lineNumber":203,"author":{"gitId":"-"},"content":" */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void removeTag(Tag tag) {"},{"lineNumber":205,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":206,"author":{"gitId":"-"},"content":" for (Person person : persons) {"},{"lineNumber":207,"author":{"gitId":"-"},"content":" removeTagFromPerson(tag, person);"},{"lineNumber":208,"author":{"gitId":"-"},"content":" }"},{"lineNumber":209,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":" }"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Removes {@code tag} from {@code person} in this {@code AddressBook}."},{"lineNumber":216,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code person} is not in this {@code AddressBook}."},{"lineNumber":217,"author":{"gitId":"-"},"content":" */"},{"lineNumber":218,"author":{"gitId":"-"},"content":" private void removeTagFromPerson(Tag tag, Person person) throws PersonNotFoundException {"},{"lineNumber":219,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003c\u003e(person.getTags());"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (!newTags.remove(tag)) {"},{"lineNumber":222,"author":{"gitId":"-"},"content":" return;"},{"lineNumber":223,"author":{"gitId":"-"},"content":" }"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" Person newPerson \u003d"},{"lineNumber":226,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":227,"author":{"gitId":"-"},"content":" person.getRemark(), person.getTeamName(), newTags, person.getRating(), person.getPosition(),"},{"lineNumber":228,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" updatePerson(person, newPerson);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person \""},{"lineNumber":234,"author":{"gitId":"-"},"content":" + \"after updating person\u0027s tag.\");"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }"},{"lineNumber":236,"author":{"gitId":"-"},"content":" }"},{"lineNumber":237,"author":{"gitId":"-"},"content":""},{"lineNumber":238,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":239,"author":{"gitId":"-"},"content":" * Removes all {@code tag} that are not in used by any {@code Person} in this {@code AddressBook}."},{"lineNumber":240,"author":{"gitId":"-"},"content":" */"},{"lineNumber":241,"author":{"gitId":"-"},"content":" private void removeUnusedTags() {"},{"lineNumber":242,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e tagsInPersons \u003d persons.asObservableList().stream()"},{"lineNumber":243,"author":{"gitId":"-"},"content":" .map(Person::getTags)"},{"lineNumber":244,"author":{"gitId":"-"},"content":" .flatMap(Set::stream)"},{"lineNumber":245,"author":{"gitId":"-"},"content":" .collect(Collectors.toSet());"},{"lineNumber":246,"author":{"gitId":"-"},"content":" tags.setTags(tagsInPersons);"},{"lineNumber":247,"author":{"gitId":"-"},"content":" }"},{"lineNumber":248,"author":{"gitId":"-"},"content":""},{"lineNumber":249,"author":{"gitId":"-"},"content":" //@@author jordancjq"},{"lineNumber":250,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":251,"author":{"gitId":"-"},"content":" * Creates a team in the manager."},{"lineNumber":252,"author":{"gitId":"-"},"content":" * @throws DuplicateTeamException if an equivalent team already exists."},{"lineNumber":253,"author":{"gitId":"-"},"content":" */"},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void createTeam(Team t) throws DuplicateTeamException {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" teams.add(t);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" }"},{"lineNumber":257,"author":{"gitId":"-"},"content":""},{"lineNumber":258,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Assigns a {@code person} to a {@code team}."},{"lineNumber":260,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}."},{"lineNumber":261,"author":{"gitId":"-"},"content":" */"},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":263,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":" if (!person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":266,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":267,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());"},{"lineNumber":268,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":269,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");"},{"lineNumber":270,"author":{"gitId":"-"},"content":" }"},{"lineNumber":271,"author":{"gitId":"-"},"content":" }"},{"lineNumber":272,"author":{"gitId":"-"},"content":""},{"lineNumber":273,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d"},{"lineNumber":274,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":275,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(), person.getPosition(),"},{"lineNumber":276,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":277,"author":{"gitId":"-"},"content":""},{"lineNumber":278,"author":{"gitId":"-"},"content":" if (!person.getTeamName().equals(newPersonWithTeam.getTeamName())) {"},{"lineNumber":279,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":280,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);"},{"lineNumber":281,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":282,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":283,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":284,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":285,"author":{"gitId":"-"},"content":" }"},{"lineNumber":286,"author":{"gitId":"-"},"content":" }"},{"lineNumber":287,"author":{"gitId":"-"},"content":" }"},{"lineNumber":288,"author":{"gitId":"-"},"content":""},{"lineNumber":289,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":290,"author":{"gitId":"-"},"content":" * Unassigns a {@code person} from team."},{"lineNumber":291,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code teamName} in {@code person} is {@code UNSPECIFIED_FIELD}."},{"lineNumber":292,"author":{"gitId":"-"},"content":" */"},{"lineNumber":293,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {"},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException(person.getName().toString());"},{"lineNumber":296,"author":{"gitId":"-"},"content":" }"},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d"},{"lineNumber":299,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":300,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),"},{"lineNumber":301,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":304,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());"},{"lineNumber":305,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":306,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");"},{"lineNumber":307,"author":{"gitId":"-"},"content":" }"},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":310,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);"},{"lineNumber":311,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":312,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":313,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":314,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":315,"author":{"gitId":"-"},"content":" }"},{"lineNumber":316,"author":{"gitId":"-"},"content":" }"},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":319,"author":{"gitId":"-"},"content":" * Immediately add a {@code person} to a {@code team}."},{"lineNumber":320,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}."},{"lineNumber":321,"author":{"gitId":"-"},"content":" */"},{"lineNumber":322,"author":{"gitId":"-"},"content":" public void addPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":323,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":327,"author":{"gitId":"-"},"content":" * Removes a {@code person} from a {@code team}."},{"lineNumber":328,"author":{"gitId":"-"},"content":" */"},{"lineNumber":329,"author":{"gitId":"-"},"content":" private void removePersonFromTeam(Person person, TeamName teamName) throws PersonNotFoundException {"},{"lineNumber":330,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":331,"author":{"gitId":"-"},"content":" teams.removePersonFromTeam(person, teams.getTeam(teamName));"},{"lineNumber":332,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":333,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":334,"author":{"gitId":"-"},"content":" }"},{"lineNumber":335,"author":{"gitId":"-"},"content":" }"},{"lineNumber":336,"author":{"gitId":"-"},"content":""},{"lineNumber":337,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":338,"author":{"gitId":"-"},"content":" * Removes a {@code team} from {@code teams}."},{"lineNumber":339,"author":{"gitId":"-"},"content":" */"},{"lineNumber":340,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {"},{"lineNumber":341,"author":{"gitId":"-"},"content":" if (!teams.contains(teamName)) {"},{"lineNumber":342,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();"},{"lineNumber":343,"author":{"gitId":"-"},"content":" }"},{"lineNumber":344,"author":{"gitId":"-"},"content":""},{"lineNumber":345,"author":{"gitId":"-"},"content":" Team teamToRemove \u003d teams.getTeam(teamName);"},{"lineNumber":346,"author":{"gitId":"-"},"content":""},{"lineNumber":347,"author":{"gitId":"-"},"content":" for (Person person : teamToRemove) {"},{"lineNumber":348,"author":{"gitId":"-"},"content":" removeTeamFromPerson(person);"},{"lineNumber":349,"author":{"gitId":"-"},"content":" }"},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":" teams.remove(teamToRemove);"},{"lineNumber":352,"author":{"gitId":"-"},"content":" }"},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":355,"author":{"gitId":"-"},"content":" * Removes {@code teamName} from {@code person} in this {@code Team}."},{"lineNumber":356,"author":{"gitId":"-"},"content":" */"},{"lineNumber":357,"author":{"gitId":"-"},"content":" private void removeTeamFromPerson(Person person) {"},{"lineNumber":358,"author":{"gitId":"-"},"content":" Person personWithRemoveTeam \u003d"},{"lineNumber":359,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":360,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),"},{"lineNumber":361,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":362,"author":{"gitId":"-"},"content":""},{"lineNumber":363,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":364,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRemoveTeam);"},{"lineNumber":365,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":366,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":367,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":368,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":369,"author":{"gitId":"-"},"content":" }"},{"lineNumber":370,"author":{"gitId":"-"},"content":" }"},{"lineNumber":371,"author":{"gitId":"-"},"content":""},{"lineNumber":372,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":373,"author":{"gitId":"-"},"content":" * Renames {@code Team} with {@code updatedTeamName}."},{"lineNumber":374,"author":{"gitId":"-"},"content":" * @return"},{"lineNumber":375,"author":{"gitId":"-"},"content":" */"},{"lineNumber":376,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {"},{"lineNumber":377,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":378,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e renameTeamPersonList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":379,"author":{"gitId":"-"},"content":""},{"lineNumber":380,"author":{"gitId":"-"},"content":" for (Person person : persons) {"},{"lineNumber":381,"author":{"gitId":"-"},"content":" if (person.getTeamName().equals(targetTeam.getTeamName())) {"},{"lineNumber":382,"author":{"gitId":"-"},"content":" renameTeamPersonList.add(renameTeamInPerson(person, updatedTeamName, targetTeam));"},{"lineNumber":383,"author":{"gitId":"-"},"content":" }"},{"lineNumber":384,"author":{"gitId":"-"},"content":" }"},{"lineNumber":385,"author":{"gitId":"-"},"content":""},{"lineNumber":386,"author":{"gitId":"-"},"content":" Team updatedTeam \u003d new Team(updatedTeamName, renameTeamPersonList);"},{"lineNumber":387,"author":{"gitId":"-"},"content":""},{"lineNumber":388,"author":{"gitId":"-"},"content":" teams.setTeam(targetTeam, updatedTeam);"},{"lineNumber":389,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException dte) {"},{"lineNumber":390,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate team after renaming\");"},{"lineNumber":391,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {"},{"lineNumber":392,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Teams should contain this team\");"},{"lineNumber":393,"author":{"gitId":"-"},"content":" }"},{"lineNumber":394,"author":{"gitId":"-"},"content":" }"},{"lineNumber":395,"author":{"gitId":"-"},"content":""},{"lineNumber":396,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":397,"author":{"gitId":"-"},"content":" * Renames {@code teamName} in {@code person} with {@code teamName}."},{"lineNumber":398,"author":{"gitId":"-"},"content":" */"},{"lineNumber":399,"author":{"gitId":"-"},"content":" private Person renameTeamInPerson(Person person, TeamName teamName, Team targetTeam) {"},{"lineNumber":400,"author":{"gitId":"-"},"content":" Person personWithRenameTeam \u003d"},{"lineNumber":401,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":402,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(),"},{"lineNumber":403,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":406,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRenameTeam);"},{"lineNumber":407,"author":{"gitId":"-"},"content":" return personWithRenameTeam;"},{"lineNumber":408,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":409,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":410,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":411,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":412,"author":{"gitId":"-"},"content":" }"},{"lineNumber":413,"author":{"gitId":"-"},"content":" }"},{"lineNumber":414,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":415,"author":{"gitId":"-"},"content":" //// util methods"},{"lineNumber":416,"author":{"gitId":"-"},"content":""},{"lineNumber":417,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":418,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":419,"author":{"gitId":"-"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\";"},{"lineNumber":420,"author":{"gitId":"-"},"content":" // TODO: refine later"},{"lineNumber":421,"author":{"gitId":"-"},"content":" }"},{"lineNumber":422,"author":{"gitId":"-"},"content":""},{"lineNumber":423,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":424,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getPersonList() {"},{"lineNumber":425,"author":{"gitId":"-"},"content":" return persons.asObservableList();"},{"lineNumber":426,"author":{"gitId":"-"},"content":" }"},{"lineNumber":427,"author":{"gitId":"-"},"content":""},{"lineNumber":428,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":429,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":430,"author":{"gitId":"-"},"content":" return tags.asObservableList();"},{"lineNumber":431,"author":{"gitId":"-"},"content":" }"},{"lineNumber":432,"author":{"gitId":"-"},"content":""},{"lineNumber":433,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":434,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {"},{"lineNumber":435,"author":{"gitId":"-"},"content":" return teams.asObservableList();"},{"lineNumber":436,"author":{"gitId":"-"},"content":" }"},{"lineNumber":437,"author":{"gitId":"-"},"content":""},{"lineNumber":438,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":439,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":440,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":441,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls"},{"lineNumber":442,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)"},{"lineNumber":443,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags));"},{"lineNumber":444,"author":{"gitId":"-"},"content":" }"},{"lineNumber":445,"author":{"gitId":"-"},"content":""},{"lineNumber":446,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":447,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":448,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":449,"author":{"gitId":"-"},"content":" return Objects.hash(persons, tags);"},{"lineNumber":450,"author":{"gitId":"-"},"content":" }"},{"lineNumber":451,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":7,"codeeong":13,"-":431}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The API of the Model component."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public interface Model {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" Predicate\u003cPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Deletes the given person. */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" void deletePerson(Person target) throws PersonNotFoundException;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Adds the given person */"},{"lineNumber":33,"author":{"gitId":"-"},"content":" void addPerson(Person person) throws DuplicatePersonException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}."},{"lineNumber":37,"author":{"gitId":"-"},"content":" *"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":40,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":" void updatePerson(Person target, Person editedPerson)"},{"lineNumber":43,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}."},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code teamName}."},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException;"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" * Sorts players in address book by field in asc or desc order"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" * @param field"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" * @param order"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" void sortPlayers(String field, String order) throws NoPlayerException;"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" boolean getLockState();"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" UserPrefs getUserPrefs();"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" /** Locks address book from model*/"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" void lockAddressBookModel();"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /** Unlocks address book from model*/"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" void unlockAddressBookModel();"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" /** Removes the given {@code tag} from all {@code Person}s. */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" void deleteTag(Tag tag);"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" /** Create the given team */"},{"lineNumber":81,"author":{"gitId":"-"},"content":" void createTeam(Team team) throws DuplicateTeamException;"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /** Assign person to team */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" void assignPersonToTeam(Person person, TeamName teamName)"},{"lineNumber":85,"author":{"gitId":"-"},"content":" throws DuplicatePersonException;"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /** Unassign person from team */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" void unassignPersonFromTeam(Person person) throws TeamNotFoundException;"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /** Removes the given team */"},{"lineNumber":91,"author":{"gitId":"-"},"content":" void removeTeam(TeamName teamName) throws TeamNotFoundException;"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Renames the given team */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" void renameTeam(Team targetTeam, TeamName teamName);"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" /** sets the given {@code tag} to color. */"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" boolean setTagColour(Tag tag, String colour);"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of the team list */"},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();"},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":18,"codeeong":5,"-":78}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data."},{"lineNumber":29,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final FilteredList\u003cPerson\u003e filteredPersons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private final UserPrefs userPrefs;"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" this.userPrefs \u003d userPrefs;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager() {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(Person target) throws PersonNotFoundException {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);"},{"lineNumber":76,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public synchronized void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" addressBook.sortPlayersBy(field, order);"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" indicateAddressBookChanged();"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" return userPrefs;"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().lockAddressBook();"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {"},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().unlockAddressBook();"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" return getUserPrefs().getAddressBookLockState();"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" //@@author"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":119,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" addressBook.removeTag(tag);"},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" indicateAddressBookChanged();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" //@@author jordancjq"},{"lineNumber":125,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"-"},"content":" public synchronized void createTeam(Team team) throws DuplicateTeamException {"},{"lineNumber":127,"author":{"gitId":"-"},"content":" addressBook.createTeam(team);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" }"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"-"},"content":" public synchronized void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" addressBook.assignPersonToTeam(person, teamName);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public synchronized void unassignPersonFromTeam(Person person) throws TeamNotFoundException {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" addressBook.unassignPersonFromTeam(person);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":141,"author":{"gitId":"-"},"content":" }"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":144,"author":{"gitId":"-"},"content":" public synchronized void removeTeam(TeamName teamName) throws TeamNotFoundException {"},{"lineNumber":145,"author":{"gitId":"-"},"content":" requireNonNull(teamName);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" raise(new RemoveSelectedTeamEvent(teamName));"},{"lineNumber":147,"author":{"gitId":"-"},"content":" addressBook.removeTeam(teamName);"},{"lineNumber":148,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":149,"author":{"gitId":"-"},"content":" }"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":152,"author":{"gitId":"-"},"content":" public synchronized void renameTeam(Team targetTeam, TeamName updatedTeamName) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" requireAllNonNull(targetTeam, updatedTeamName);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" addressBook.renameTeam(targetTeam, updatedTeamName);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public boolean setTagColour(Tag tag, String colour) {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e allTags \u003d addressBook.getTagList();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" boolean isTagValid \u003d false;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" for (Tag t : allTags) {"},{"lineNumber":164,"author":{"gitId":"-"},"content":" if (t.getTagName().equals(tag.getTagName())) {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" isTagValid \u003d true;"},{"lineNumber":166,"author":{"gitId":"-"},"content":" break;"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }"},{"lineNumber":168,"author":{"gitId":"-"},"content":" }"},{"lineNumber":169,"author":{"gitId":"-"},"content":" if (!isTagValid) {"},{"lineNumber":170,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":" addressBook.setTagColour(tag, colour);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":174,"author":{"gitId":"-"},"content":" return isTagValid;"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {"},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" return addressBook.getTeamList();"},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code Person} backed by the internal list of"},{"lineNumber":186,"author":{"gitId":"-"},"content":" * {@code addressBook}"},{"lineNumber":187,"author":{"gitId":"-"},"content":" */"},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" requireNonNull(predicate);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author jordancjq"},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {"},{"lineNumber":202,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {"},{"lineNumber":207,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));"},{"lineNumber":208,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":209,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":215,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":217,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {"},{"lineNumber":218,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":222,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {"},{"lineNumber":223,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":224,"author":{"gitId":"-"},"content":" }"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":227,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;"},{"lineNumber":228,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)"},{"lineNumber":229,"author":{"gitId":"-"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons);"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":28,"codeeong":7,"-":197}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String addressBookFilePath \u003d \"data/myteammanager.xml\";"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private String addressBookName \u003d \"MyTeamManager\";"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private String addressBookTheme \u003d \"DarkTheme.css\";"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean addressBookLockState \u003d false;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" private String addressBookHashedPass \u003d Hashing.sha256()"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" .hashString(\"ilikesports\", StandardCharsets.UTF_8).toString();"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" public UserPrefs() {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.setGuiSettings(500, 500, 0, 0);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return addressBookFilePath;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddressBookName() {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressBookName;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBook() {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d true;"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBook() {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d false;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public String getAddressBookHashedPass() {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" return addressBookHashedPass;"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean getAddressBookLockState() {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return this.addressBookLockState;"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" public String getAddressBookTheme() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return addressBookTheme;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" public void setAddressBookTheme(String addressBookTheme) {"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" this.addressBookTheme \u003d addressBookTheme;"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well."},{"lineNumber":89,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)"},{"lineNumber":95,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookHashedPass, o.addressBookHashedPass)"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());"},{"lineNumber":110,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nPassword: \" + addressBookHashedPass);"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":28,"codeeong":9,"-":80}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs an {@code Address}."},{"lineNumber":27,"author":{"gitId":"-"},"content":" *"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @param address A valid address."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Address(String address) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(address);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" checkArgument(isValidAddress(address), MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d address;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" public Address(String address, boolean isPrivate) {"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" this(address);"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":73}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.nio.file.Files;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.nio.file.Path;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.nio.file.Paths;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.nio.file.StandardCopyOption;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s avatar in the address book. Contains filepath to avatar image file."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAvatar(String)}"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class Avatar {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \"Please specify the absolute filepath for the avatar image eg. av/C:\\\\image.png\\n (for Windows), \""},{"lineNumber":27,"author":{"gitId":"-"},"content":" + \"av//User/username/path/to/image.jpg (for MacOS). \""},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"Image file should be 200x200 and in jpg or png format\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String AVATAR_VALIDATION_PATTERN \u003d \"([^\\\\s]+(\\\\.(?i)(jpg|png))$)\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private String value;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Constructs an {@code Avatar}."},{"lineNumber":36,"author":{"gitId":"-"},"content":" *"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @param avatar A valid avatar."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public Avatar(String avatar) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(avatar);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" checkArgument(isValidAvatar(avatar), MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.value \u003d avatar;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s avatar."},{"lineNumber":47,"author":{"gitId":"-"},"content":" */"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidAvatar(String test) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" Pattern pattern \u003d Pattern.compile(AVATAR_VALIDATION_PATTERN);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" Matcher matcher \u003d pattern.matcher(test);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return matcher.matches() || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" */"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Copies the image file from file path entered into images/ and renames it as [name].png"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * and saves the file path in value"},{"lineNumber":71,"author":{"gitId":"-"},"content":" * @param player player\u0027s avatar image filepath string"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * @throws IOException thrown when file not found"},{"lineNumber":73,"author":{"gitId":"-"},"content":" */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setFilePath(String player) throws IOException {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":" final File file \u003d new File(value);"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any"},{"lineNumber":82,"author":{"gitId":"-"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.value \u003d dest.toString();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" public String getValue() {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public static void setUpPlaceholderForTest() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" Files.copy(Avatar.class.getResourceAsStream(\"/images/placeholder_test.png\"),"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" Paths.get(\"images/placeholder_test.png\"), StandardCopyOption.REPLACE_EXISTING);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" LogsCenter.getLogger(Avatar.class).warning(\"placeholder image file missing\");"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":100,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":102,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls"},{"lineNumber":103,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":108}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s email in the address book."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Email {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" private static final String SPECIAL_CHARACTERS \u003d \"!#$%\u0026\u0027*+/\u003d?`{|}~^.-\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d \"Person emails should be of the format local-part@domain \""},{"lineNumber":14,"author":{"gitId":"-"},"content":" + \"and adhere to the following constraints:\\n\""},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"1. The local-part should only contain alphanumeric characters and these special characters, excluding \""},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the parentheses, (\" + SPECIAL_CHARACTERS + \") .\\n\""},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"2. This is followed by a \u0027@\u0027 and then a domain name. \""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"The domain name must:\\n\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \" - be at least 2 characters long\\n\""},{"lineNumber":20,"author":{"gitId":"-"},"content":" + \" - start and end with alphanumeric characters\\n\""},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \" - consist of alphanumeric characters, a period or a hyphen for the characters in between, if any.\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" // alphanumeric and special characters"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String LOCAL_PART_REGEX \u003d \"^[\\\\w\" + SPECIAL_CHARACTERS + \"]+\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String DOMAIN_FIRST_CHARACTER_REGEX \u003d \"[^\\\\W_]\"; // alphanumeric characters except underscore"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String DOMAIN_MIDDLE_REGEX \u003d \"[a-zA-Z0-9.-]*\"; // alphanumeric, period and hyphen"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String DOMAIN_LAST_CHARACTER_REGEX \u003d \"[^\\\\W_]$\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d LOCAL_PART_REGEX + \"@\""},{"lineNumber":28,"author":{"gitId":"-"},"content":" + DOMAIN_FIRST_CHARACTER_REGEX + DOMAIN_MIDDLE_REGEX + DOMAIN_LAST_CHARACTER_REGEX;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Constructs an {@code Email}."},{"lineNumber":35,"author":{"gitId":"-"},"content":" *"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @param email A valid email address."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public Email(String email) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" requireNonNull(email);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" checkArgument(isValidEmail(email), MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.value \u003d email;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" public Email(String email, boolean isPrivate) {"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" this(email);"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return test.matches(EMAIL_VALIDATION_REGEX);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Email\u003e\";"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":80,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls"},{"lineNumber":81,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":81}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Phone {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":18,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Constructs a {@code Phone}."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @param phone A valid phone number."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" requireNonNull(phone);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" checkArgument(isValidPhone(phone), MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" this.value \u003d phone;"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" public Phone(String phone, boolean isPrivate) {"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" this(phone);"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number."},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Phone\u003e\";"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":68}},{"path":"src/main/java/seedu/address/model/person/Rating.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s rating in the address book."},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRating(String)}"},{"lineNumber":11,"author":{"gitId":"-"},"content":" */"},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class Rating {"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_RATING_CONSTRAINTS \u003d"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Player\u0027s rating should be an integer from 0 - 5.\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String RATING_VALIDATION_REGEX \u003d \"[0-5]\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean isPrivate;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs an {@code Rating}."},{"lineNumber":24,"author":{"gitId":"-"},"content":" *"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param rating A valid rating."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Rating(String rating) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(rating);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidRating(rating), MESSAGE_RATING_CONSTRAINTS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.value \u003d rating;"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public Rating(String rating, boolean isPrivate) {"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this(rating);"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s rating."},{"lineNumber":40,"author":{"gitId":"-"},"content":" */"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static boolean isValidRating(String test) {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" return test.matches(RATING_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Rating\u003e\";"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void togglePrivacy() {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":68,"author":{"gitId":"-"},"content":" || (other instanceof Rating // instanceof handles nulls"},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Rating) other).value)); // state check"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":21,"-":56}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s remark in the address book."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is always valid}"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Remark {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_REMARK_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Remark can contain any values, can even be blank\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Constructs a {@code Remark}"},{"lineNumber":20,"author":{"gitId":"-"},"content":" *"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @param remark Any remark"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Remark(String remark) {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(remark);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.value \u003d remark;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" public Remark(String remark, boolean isPrivate) {"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" this(remark);"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Remarks\u003e\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof Remark // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":57}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collection;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.Comparator;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import java.util.Iterator;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations."},{"lineNumber":24,"author":{"gitId":"-"},"content":" *"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public boolean contains(Person toCheck) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Adds a person to the list."},{"lineNumber":42,"author":{"gitId":"-"},"content":" *"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void add(Person toAdd) throws DuplicatePersonException {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":" internalList.add(toAdd);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}."},{"lineNumber":55,"author":{"gitId":"-"},"content":" *"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list."},{"lineNumber":57,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":58,"author":{"gitId":"-"},"content":" */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void setPerson(Person target, Person editedPerson)"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" internalList.set(index, editedPerson);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list."},{"lineNumber":77,"author":{"gitId":"-"},"content":" *"},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":79,"author":{"gitId":"-"},"content":" */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public boolean remove(Person toRemove) throws PersonNotFoundException {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" requireAllNonNull(persons);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" for (final Person person : persons) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" replacement.add(person);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":" setPersons(replacement);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e asObservableList() {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(internalList);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" * Sorts players by selected field in asc or desc order."},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" * @return"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" public void sortBy(String field, String order) throws NoPlayerException {"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" if (internalList.size() \u003c 1) {"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" throw new NoPlayerException();"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);"},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e jerseyComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" return p1.getJerseyNumber().value.compareTo(p2.getJerseyNumber().value);"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e ratingComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" return p1.getRating().toString().compareTo(p2.getRating().toString());"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e posComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" return p1.getPosition().value.compareTo(p2.getPosition().value);"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e emailComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" return p1.getEmail().toString().compareTo(p2.getEmail().toString());"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e addressComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" return p1.getAddress().toString().compareTo(p2.getAddress().toString());"},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" switch (field) {"},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case \"name\":"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case \"jersey\":"},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d jerseyComparator;"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" case \"pos\":"},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d posComparator;"},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" case \"rating\":"},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d ratingComparator;"},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" case \"email\":"},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d emailComparator;"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" case \"address\":"},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d addressComparator;"},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":" switch (order) {"},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":"},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":"},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" //@@author"},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":208,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {"},{"lineNumber":209,"author":{"gitId":"-"},"content":" return internalList.iterator();"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":213,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":214,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":215,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls"},{"lineNumber":216,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":220,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":221,"author":{"gitId":"-"},"content":" return internalList.hashCode();"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":105,"-":118}},{"path":"src/main/java/seedu/address/model/person/exceptions/NoPlayerException.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.model.person.exceptions;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":" * Singals that the operation is unable to sort due to no players in book."},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"public class NoPlayerException extends Exception {"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":7}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Tag {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be a string\";"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_COLOUR_CONSTRAINTS \u003d \"Tag colours should be one of these colours:\""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" + \"teal, red, yellow, blue, orange, brown, green, pink, black, grey\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private static final String[] TAG_COLOR_STYLES \u003d"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" { \"teal\", \"red\", \"yellow\", \"blue\", \"orange\", \"brown\", \"green\", \"pink\", \"black\", \"grey\" };"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String tagName;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" private String tagColour;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs a {@code Tag}."},{"lineNumber":24,"author":{"gitId":"-"},"content":" *"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param tagName A valid tag name."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Tag(String tagName) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(tagName);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Overloaded constructor for a {@code Tag}."},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" * @param tagName A valid tag name"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" * @param tagColour A valid tag colour."},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" public Tag(String tagName, String tagColour) {"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" requireNonNull(tagName);"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" public String getTagName() {"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" return this.tagName;"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag name."},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagName(String test) {"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return test.matches(TAG_VALIDATION_REGEX);"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public String getTagColour() {"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" return this.tagColour;"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" * Changes the {@code tagColour} for {@code tagName}\u0027s label"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" public void changeTagColour(String colour) {"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d colour;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag colour."},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagColour(String testColour) {"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (String tcs : TAG_COLOR_STYLES) {"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (testColour.equals(tcs)) {"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" return true;"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" return false;"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":87,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls"},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":92,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" return tagName.hashCode();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"-"},"content":" * Format state as text for viewing."},{"lineNumber":98,"author":{"gitId":"-"},"content":" */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":54,"-":49}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class SampleDataUtil {"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new Person[] {"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Aaron Ramsey\"), new Phone(\"87438807\"), new Email(\"aramsey@example.com\"),"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), new Remark(\"Sign him for one more year\"),"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"),"},{"lineNumber":34,"author":{"gitId":"-"},"content":" getTagSet(\"redCard\"), new Rating(\"3\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":35,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Hector Moruno\"), new Phone(\"99272758\"), new Email(\"hectorm@example.com\"),"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cesc Fabregas\"), new Phone(\"93210283\"), new Email(\"cescfabregas@example.com\"),"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":42,"author":{"gitId":"-"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":43,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ospina\"), new Phone(\"99272758\"), new Email(\"Ospina@arsenal.com\"),"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"22\"),"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cech\"), new Phone(\"93210283\"), new Email(\"cech@arsenal.com\"),"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mertesacker\"), new Phone(\"95432223\"), new Email(\"mertesacker@arsenal.com\"),"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Koscielny\"), new Phone(\"92352021\"), new Email(\"koscielny@example.com\"),"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Holding\"), new Phone(\"92624417\"), new Email(\"holding@example.com\"),"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Monreal\"), new Phone(\"99272758\"), new Email(\"monreal@arsenal.com\"),"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mustafi\"), new Phone(\"93215483\"), new Email(\"mustafi@arsenal.com\"),"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"4\"),"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"91031282\"), new Email(\"chambers@arsenal.com\"),"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"92492021\"), new Email(\"chambers@arsenal.com\"),"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),"},{"lineNumber":89,"author":{"gitId":"-"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),"},{"lineNumber":90,"author":{"gitId":"-"},"content":" new TeamName(\"Chelsea\"), getTagSet(\"injured\"),"},{"lineNumber":91,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":92,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Irfan Fandi\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":96,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":97,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mavropanos\"), new Phone(\"92624417\"), new Email(\"mavropanos@arsenal.com\"),"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"98\"),"},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Kolasinac\"), new Phone(\"99272758\"), new Email(\"kolasinac@arsenal.com\"),"},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"2\"), new JerseyNumber(\"52\"),"},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mkhitaryan\"), new Phone(\"93210283\"), new Email(\"mkhitaryan@arsenal.com\"),"},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Wilshere\"), new Phone(\"95432223\"), new Email(\"wilshere@arsenal.com\"),"},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),"},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),"},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),"},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ozil\"), new Phone(\"92352021\"), new Email(\"ozil@example.com\"),"},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Xhaka\"), new Phone(\"92624417\"), new Email(\"xhaka@example.com\"),"},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),"},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" };"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":129,"author":{"gitId":"-"},"content":" public static Team[] getSampleTeams() {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" return new Team[] {"},{"lineNumber":131,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Arsenal\")),"},{"lineNumber":132,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Chelsea\"))"},{"lineNumber":133,"author":{"gitId":"-"},"content":" };"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {"},{"lineNumber":138,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();"},{"lineNumber":140,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":141,"author":{"gitId":"-"},"content":" for (Team sampleTeam : getSampleTeams()) {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" sampleAb.createTeam(sampleTeam);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":145,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);"},{"lineNumber":147,"author":{"gitId":"-"},"content":" sampleAb.addPersonToTeam(samplePerson, samplePerson.getTeamName());"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }"},{"lineNumber":149,"author":{"gitId":"-"},"content":" return sampleAb;"},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);"},{"lineNumber":152,"author":{"gitId":"codeeong"},"content":" } catch (DuplicateTeamException e) {"},{"lineNumber":153,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\" sample data cannot contain duplicate teams\", e);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given."},{"lineNumber":159,"author":{"gitId":"-"},"content":" */"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" for (String s : strings) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));"},{"lineNumber":164,"author":{"gitId":"-"},"content":" }"},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":86,"-":83}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Person\u0027s %s field is missing!\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String name;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private String phone;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Boolean phonePrivacy;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private String email;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Boolean emailPrivacy;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private String address;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Boolean addressPrivacy;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private String remark;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Boolean remarkPrivacy;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private String teamName;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private String rating;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" private Boolean ratingPrivacy;"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":57,"author":{"gitId":"-"},"content":" private String position;"},{"lineNumber":58,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private String jerseyNumber;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private String avatar;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":64,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson."},{"lineNumber":68,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"-"},"content":" * Constructs an {@code XmlAdaptedPerson} with the given person details."},{"lineNumber":74,"author":{"gitId":"-"},"content":" */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(String name, String phone, String email, String address, List\u003cXmlAdaptedTag\u003e tagged) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" this.name \u003d name;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.phone \u003d phone;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.email \u003d email;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.address \u003d address;"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.remarkPrivacy \u003d false;"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.phonePrivacy \u003d false;"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" this.addressPrivacy \u003d false;"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" this.emailPrivacy \u003d false;"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" if (tagged !\u003d null) {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" this.tagged \u003d new ArrayList\u003c\u003e(tagged);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Converts a given Person into this class for JAXB use."},{"lineNumber":93,"author":{"gitId":"-"},"content":" *"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson"},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(Person source) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" name \u003d source.getName().fullName;"},{"lineNumber":98,"author":{"gitId":"-"},"content":" phone \u003d source.getPhone().value;"},{"lineNumber":99,"author":{"gitId":"-"},"content":" email \u003d source.getEmail().value;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" address \u003d source.getAddress().value;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" remark \u003d source.getRemark().value;"},{"lineNumber":102,"author":{"gitId":"-"},"content":" teamName \u003d source.getTeamName().fullName;"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" phonePrivacy \u003d source.getPhone().isPrivate();"},{"lineNumber":105,"author":{"gitId":"-"},"content":" emailPrivacy \u003d source.getEmail().isPrivate();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" addressPrivacy \u003d source.getAddress().isPrivate();"},{"lineNumber":107,"author":{"gitId":"-"},"content":" remarkPrivacy \u003d source.getRemark().isPrivate();"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d source.getRating().isPrivate();"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":111,"author":{"gitId":"-"},"content":" rating \u003d source.getRating().value;"},{"lineNumber":112,"author":{"gitId":"-"},"content":" position \u003d source.getPosition().value;"},{"lineNumber":113,"author":{"gitId":"-"},"content":" jerseyNumber \u003d source.getJerseyNumber().value;"},{"lineNumber":114,"author":{"gitId":"-"},"content":" avatar \u003d source.getAvatar().getValue();"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" for (Tag tag : source.getTags()) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" tagged.add(new XmlAdaptedTag(tag));"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object."},{"lineNumber":123,"author":{"gitId":"-"},"content":" *"},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":125,"author":{"gitId":"-"},"content":" */"},{"lineNumber":126,"author":{"gitId":"-"},"content":" public Person toModelType() throws IllegalValueException {"},{"lineNumber":127,"author":{"gitId":"-"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":128,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag tag : tagged) {"},{"lineNumber":129,"author":{"gitId":"-"},"content":" personTags.add(tag.toModelType());"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" if (phonePrivacy \u003d\u003d null) {"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" phonePrivacy \u003d false;"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" if (emailPrivacy \u003d\u003d null) {"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" emailPrivacy \u003d false;"},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" if (addressPrivacy \u003d\u003d null) {"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" addressPrivacy \u003d false;"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" if (remarkPrivacy \u003d\u003d null) {"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" remarkPrivacy \u003d false;"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" if (ratingPrivacy \u003d\u003d null) {"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d false;"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" if (this.name \u003d\u003d null) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName()));"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":" if (!Name.isValidName(this.name)) {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":" final Name name \u003d new Name(this.name);"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" if (this.phone \u003d\u003d null) {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName()));"},{"lineNumber":162,"author":{"gitId":"-"},"content":" }"},{"lineNumber":163,"author":{"gitId":"-"},"content":" if (!Phone.isValidPhone(this.phone)) {"},{"lineNumber":164,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" final Phone phone \u003d new Phone(this.phone, this.phonePrivacy);"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" if (this.email \u003d\u003d null) {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName()));"},{"lineNumber":170,"author":{"gitId":"-"},"content":" }"},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (!Email.isValidEmail(this.email)) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" final Email email \u003d new Email(this.email, this.emailPrivacy);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" if (this.address \u003d\u003d null) {"},{"lineNumber":177,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName()));"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":" if (!Address.isValidAddress(this.address)) {"},{"lineNumber":180,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Address.MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" final Address address \u003d new Address(this.address, this.addressPrivacy);"},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkPrivacy);"},{"lineNumber":185,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" if (this.rating \u003d\u003d null) {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Rating.class.getSimpleName()));"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":" if (!Rating.isValidRating(this.rating)) {"},{"lineNumber":193,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Rating.MESSAGE_RATING_CONSTRAINTS);"},{"lineNumber":194,"author":{"gitId":"-"},"content":" }"},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" final Rating rating \u003d new Rating(this.rating, this.ratingPrivacy);"},{"lineNumber":196,"author":{"gitId":"-"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":" if (this.position \u003d\u003d null) {"},{"lineNumber":198,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":199,"author":{"gitId":"-"},"content":" Position.class.getSimpleName()));"},{"lineNumber":200,"author":{"gitId":"-"},"content":" }"},{"lineNumber":201,"author":{"gitId":"-"},"content":" if (!Position.isValidPosition(this.position)) {"},{"lineNumber":202,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Position.MESSAGE_POSITION_CONSTRAINTS);"},{"lineNumber":203,"author":{"gitId":"-"},"content":" }"},{"lineNumber":204,"author":{"gitId":"-"},"content":" final Position position \u003d new Position(this.position);"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (this.jerseyNumber \u003d\u003d null) {"},{"lineNumber":207,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":208,"author":{"gitId":"-"},"content":" JerseyNumber.class.getSimpleName()));"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"-"},"content":" if (!JerseyNumber.isValidJerseyNumber(this.jerseyNumber)) {"},{"lineNumber":211,"author":{"gitId":"-"},"content":" throw new IllegalValueException(JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);"},{"lineNumber":212,"author":{"gitId":"-"},"content":" }"},{"lineNumber":213,"author":{"gitId":"-"},"content":" final JerseyNumber jerseyNumber \u003d new JerseyNumber(this.jerseyNumber);"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" if (this.avatar \u003d\u003d null) {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":217,"author":{"gitId":"-"},"content":" Avatar.class.getSimpleName()));"},{"lineNumber":218,"author":{"gitId":"-"},"content":" }"},{"lineNumber":219,"author":{"gitId":"-"},"content":" if (!Avatar.isValidAvatar(this.avatar)) {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Avatar.MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);"},{"lineNumber":223,"author":{"gitId":"-"},"content":" return new Person(name, phone, email, address, remark, teamName, tags, rating, position, jerseyNumber, avatar);"},{"lineNumber":224,"author":{"gitId":"-"},"content":" }"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":227,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":228,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":229,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedPerson)) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }"},{"lineNumber":235,"author":{"gitId":"-"},"content":""},{"lineNumber":236,"author":{"gitId":"-"},"content":" XmlAdaptedPerson otherPerson \u003d (XmlAdaptedPerson) other;"},{"lineNumber":237,"author":{"gitId":"-"},"content":" return Objects.equals(name, otherPerson.name)"},{"lineNumber":238,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(phone, otherPerson.phone)"},{"lineNumber":239,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(email, otherPerson.email)"},{"lineNumber":240,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(address, otherPerson.address)"},{"lineNumber":241,"author":{"gitId":"-"},"content":" \u0026\u0026 tagged.equals(otherPerson.tagged);"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }"},{"lineNumber":243,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":34,"-":209}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Tag."},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class XmlAdaptedTag {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @XmlElement"},{"lineNumber":14,"author":{"gitId":"-"},"content":" private String tagName;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" @XmlElement"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String tagColour;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedTag."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public XmlAdaptedTag() {}"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName}."},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(String tagName) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName} and {@code tagColour}."},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTag(String tagName, String tagColour) {"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Converts a given Tag into this class for JAXB use."},{"lineNumber":45,"author":{"gitId":"-"},"content":" *"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created"},{"lineNumber":47,"author":{"gitId":"-"},"content":" */"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(Tag source) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" tagName \u003d source.tagName;"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" tagColour \u003d source.getTagColour();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Tag object."},{"lineNumber":55,"author":{"gitId":"-"},"content":" *"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public Tag toModelType() throws IllegalValueException {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (!Tag.isValidTagName(tagName)) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" if (!Tag.isValidTagColour(tagColour)) {"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_COLOUR_CONSTRAINTS);"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" return new Tag(tagName, tagColour);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedTag)) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" return tagName.equals(((XmlAdaptedTag) other).tagName);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":22,"-":59}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTeam.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Team"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class XmlAdaptedTeam {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Team\u0027s %s field is missing!\";"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private String teamName;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" * Constructs an XmlAdaptedTeam."},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam() {}"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTeam} with the given {@code teamName}."},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public XmlAdaptedTeam(String teamName, List\u003cXmlAdaptedPerson\u003e persons) {"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (persons !\u003d null) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.players \u003d new ArrayList\u003c\u003e(persons);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" * Converts a given Team into this class for JAXB use."},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTeam"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam(Team source) {"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" teamName \u003d source.getTeamName().toString();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" players \u003d new ArrayList\u003c\u003e();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" for (Person person : source.getTeamPlayers()) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" players.add(new XmlAdaptedPerson(person));"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Team object."},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" public Team toModelType() throws IllegalValueException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" if (this.teamName \u003d\u003d null) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new IllegalValueException((String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":64,"author":{"gitId":"-"},"content":" TeamName.class.getSimpleName())));"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" if (!TeamName.isValidName(this.teamName)) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" throw new IllegalValueException(TeamName.MESSAGE_TEAM_NAME_CONSTRAINTS);"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" final List\u003cPerson\u003e teamPlayers \u003d new ArrayList\u003c\u003e();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson player : players) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" teamPlayers.add(player.toModelType());"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" return new Team(teamName, teamPlayers);"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" return true;"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" if (!(other instanceof XmlAdaptedTeam)) {"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" return false;"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":" XmlAdaptedTeam otherTeam \u003d (XmlAdaptedTeam) other;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return Objects.equals(teamName, otherTeam.teamName)"},{"lineNumber":90,"author":{"gitId":"-"},"content":" \u0026\u0026 players.equals(otherTeam.players);"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":60,"-":33}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":3,"author":{"gitId":"-"},"content":""},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format"},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTeam\u003e teams;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":27,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook."},{"lineNumber":32,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling."},{"lineNumber":33,"author":{"gitId":"-"},"content":" */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":37,"author":{"gitId":"-"},"content":" teams \u003d new ArrayList\u003c\u003e();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Conversion"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" /** @@author Codee */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));"},{"lineNumber":48,"author":{"gitId":"-"},"content":" teams.addAll(src.getTeamList().stream().map(XmlAdaptedTeam::new).collect(Collectors.toList()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Converts this addressbook into the model\u0027s {@code AddressBook} object."},{"lineNumber":53,"author":{"gitId":"-"},"content":" *"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated or duplicates in the"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * {@code XmlAdaptedPerson} or {@code XmlAdaptedTag}."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook toModelType() throws IllegalValueException {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBook();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag t : tags) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" addressBook.addTag(t.toModelType());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson p : persons) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" addressBook.addPerson(p.toModelType());"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":" for (XmlAdaptedTeam tm : teams) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" addressBook.createTeam(tm.toModelType());"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlSerializableAddressBook)) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook otherAb \u003d (XmlSerializableAddressBook) other;"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return persons.equals(otherAb.persons) \u0026\u0026 tags.equals(otherAb.tags) \u0026\u0026 teams.equals(otherAb.teams);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":83}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Menu;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.Image;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.ImageView;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.VBox;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed."},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cStage\u003e {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private static String currentTheme \u003d \"view/DarkTheme.css\";"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" private Stage primaryStage;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HelpWindow helpWindow;"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" private Menu mtmLogo;"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":62,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" private StackPane teamDisplayPlaceholder;"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" private VBox mainWindow;"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" super(FXML, primaryStage);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // Set dependencies"},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // Configure the UI"},{"lineNumber":83,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());"},{"lineNumber":84,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" setAccelerators();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return primaryStage;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void setAccelerators() {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem."},{"lineNumber":100,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator"},{"lineNumber":101,"author":{"gitId":"-"},"content":" */"},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":106,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666"},{"lineNumber":108,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK."},{"lineNumber":109,"author":{"gitId":"-"},"content":" *"},{"lineNumber":110,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and"},{"lineNumber":112,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * the TextInputControl(s)."},{"lineNumber":115,"author":{"gitId":"-"},"content":" *"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay."},{"lineNumber":119,"author":{"gitId":"-"},"content":" */"},{"lineNumber":120,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());"},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.consume();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":" });"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window."},{"lineNumber":130,"author":{"gitId":"-"},"content":" */"},{"lineNumber":131,"author":{"gitId":"-"},"content":" void fillInnerParts() {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":133,"author":{"gitId":"-"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();"},{"lineNumber":134,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(currentTheme);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(\"view/Extensions.css\");"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" final Image image \u003d new Image(\"images/MyTeamManagerLogo.png\", true);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" mtmLogo.setGraphic(new ImageView(image));"},{"lineNumber":139,"author":{"gitId":"-"},"content":" mtmLogo.setDisable(true);"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":142,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());"},{"lineNumber":143,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();"},{"lineNumber":146,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"codeeong"},"content":" TeamDisplay teamDisplay \u003d new TeamDisplay(logic.getInitTeamList());"},{"lineNumber":149,"author":{"gitId":"codeeong"},"content":" teamDisplayPlaceholder.getChildren().add(teamDisplay.getRoot());"},{"lineNumber":150,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(prefs.getAddressBookFilePath());"},{"lineNumber":152,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" void hide() {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" primaryStage.hide();"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);"},{"lineNumber":164,"author":{"gitId":"-"},"content":" }"},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":167,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences."},{"lineNumber":168,"author":{"gitId":"-"},"content":" */"},{"lineNumber":169,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {"},{"lineNumber":170,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());"},{"lineNumber":171,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());"},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" * @returns the {@code currentTheme}."},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":" public static String getCurrentTheme() {"},{"lineNumber":183,"author":{"gitId":"codeeong"},"content":" return currentTheme;"},{"lineNumber":184,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" public void handleChangeThemeRequestEvent(ChangeThemeEvent event) throws CommandException {"},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().remove(currentTheme);"},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" prefs.setAddressBookTheme(event.theme + \"Theme.css\");"},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();"},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().add(currentTheme);"},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":194,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":197,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window."},{"lineNumber":198,"author":{"gitId":"-"},"content":" */"},{"lineNumber":199,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {"},{"lineNumber":200,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),"},{"lineNumber":201,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());"},{"lineNumber":202,"author":{"gitId":"-"},"content":" }"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":205,"author":{"gitId":"-"},"content":" * Opens the help window."},{"lineNumber":206,"author":{"gitId":"-"},"content":" */"},{"lineNumber":207,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":208,"author":{"gitId":"-"},"content":" public void handleHelp() {"},{"lineNumber":209,"author":{"gitId":"-"},"content":" if (helpWindow \u003d\u003d null) {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" helpWindow \u003d new HelpWindow();"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":" helpWindow.show();"},{"lineNumber":213,"author":{"gitId":"-"},"content":" }"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" void show() {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" primaryStage.show();"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":220,"author":{"gitId":"-"},"content":" * Closes the application."},{"lineNumber":221,"author":{"gitId":"-"},"content":" */"},{"lineNumber":222,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":223,"author":{"gitId":"-"},"content":" private void handleExit() {"},{"lineNumber":224,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());"},{"lineNumber":225,"author":{"gitId":"-"},"content":" }"},{"lineNumber":226,"author":{"gitId":"-"},"content":""},{"lineNumber":227,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {"},{"lineNumber":228,"author":{"gitId":"-"},"content":" return this.personListPanel;"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":232,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":234,"author":{"gitId":"-"},"content":" handleHelp();"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }"},{"lineNumber":236,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":35,"-":201}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.Iterator;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.logging.Logger;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.scene.paint.ImagePattern;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.scene.shape.Circle;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":34,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":36,"author":{"gitId":"-"},"content":" *"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public final Person person;"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonCard.class);"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private HBox cardPane;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private Label name;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private Label id;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"-"},"content":" private Label teamName;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":52,"author":{"gitId":"-"},"content":" private FlowPane tags;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Label rating;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private Label position;"},{"lineNumber":57,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":58,"author":{"gitId":"-"},"content":" private Label jerseyNumber;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Circle avatar;"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" public PersonCard(Person person, int displayedIndex) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":66,"author":{"gitId":"-"},"content":" name.setText(person.getName().fullName);"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" rating.setText(person.getRating().toString());"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" rating.setText(person.getRating().value);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" teamName.setText(person.getTeamName().fullName);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" position.setText(person.getPosition().getPositionName());"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" initTags(person);"},{"lineNumber":75,"author":{"gitId":"-"},"content":" setContactImage(person.getAvatar().getValue());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void setContactImage(String path) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" Image img \u003d null;"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (new File(path).isFile()) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" img \u003d new Image(new File(path).toURI().toURL().toString());"},{"lineNumber":86,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":" } catch (MalformedURLException e) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":" avatar.setVisible(true);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" avatar.setFill(new ImagePattern(img));"},{"lineNumber":94,"author":{"gitId":"-"},"content":" avatar.setVisible(true);"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}."},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" private void initTags(Person person) {"},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" person.getTags().forEach(tag -\u003e {"},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" Label tagLabel \u003d new Label(tag.getTagName());"},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" tagLabel.getStyleClass().add(tag.getTagColour());"},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(tagLabel);"},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" });"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":117,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":122,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":124,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" public void handleColourChangeEvent(ChangeTagColourEvent event) {"},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":131,"author":{"gitId":"codeeong"},"content":" Set\u003cTag\u003e tagSet \u003d person.getTags();"},{"lineNumber":132,"author":{"gitId":"codeeong"},"content":" int i \u003d 0;"},{"lineNumber":133,"author":{"gitId":"codeeong"},"content":" for (Iterator\u003cTag\u003e it \u003d tagSet.iterator(); it.hasNext();) {"},{"lineNumber":134,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d it.next();"},{"lineNumber":135,"author":{"gitId":"codeeong"},"content":" if (tag.getTagName().equals(event.tagName)) {"},{"lineNumber":136,"author":{"gitId":"codeeong"},"content":" tags.getChildren().remove(i);"},{"lineNumber":137,"author":{"gitId":"codeeong"},"content":" Label newTagLabel \u003d new Label(event.tagName);"},{"lineNumber":138,"author":{"gitId":"codeeong"},"content":" newTagLabel.getStyleClass().add(event.tagColour);"},{"lineNumber":139,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(i, newTagLabel);"},{"lineNumber":140,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":141,"author":{"gitId":"codeeong"},"content":" i++;"},{"lineNumber":142,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":143,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":5,"codeeong":42,"-":97}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Panel containing the list of persons."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private PlayerDetails playerDetails;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Integer selectedCardIndex;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private StackPane playerDetailsPlaceholder;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cPerson\u003e personList) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" setConnections(personList);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cPerson\u003e personList) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map("},{"lineNumber":46,"author":{"gitId":"-"},"content":" personList, (person) -\u003e new PersonCard(person, personList.indexOf(person) + 1));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());"},{"lineNumber":49,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().clear();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" playerDetails \u003d new PlayerDetails(newValue.person);"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" });"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it."},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" this.selectedCardIndex \u003d index;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" });"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":79,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":84,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedNoParamEvent(PersonDetailsChangedNoParamEvent event) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":86,"author":{"gitId":"-"},"content":" PersonCard newPersonCard \u003d personListView.getItems().get(selectedCardIndex);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().clear();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" playerDetails \u003d new PlayerDetails(newPersonCard.person);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":" //@author"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}."},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" setGraphic(null);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" setText(null);"},{"lineNumber":105,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":12,"-":98}},{"path":"src/main/java/seedu/address/ui/PlayerDetails.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" * The Browser Panel of the App."},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public final Person person;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Person personBeforeChange;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private HBox cardPane;"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private Label name;"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" private Label phone;"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" private Label address;"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private Label email;"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private Label jerseyNumber;"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" private Label remark;"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public PlayerDetails(Person person) {"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" super(FXML);"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" this.person \u003d person;"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" name.setText(person.getName().fullName);"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" jerseyNumber.setText(\"Jersey Number: \" + person.getJerseyNumber().value);"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().toString());"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().value);"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().toString());"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().value);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().toString());"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().value);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().toString());"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().value);"},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" personBeforeChange \u003d this.person;"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":83,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (event.getPerson().getName().fullName.equals(person.getName().fullName)) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" name.setText((event.getPerson().getName().toString()));"},{"lineNumber":86,"author":{"gitId":"-"},"content":" phone.setText(event.getPerson().getPhone().toString());"},{"lineNumber":87,"author":{"gitId":"-"},"content":" jerseyNumber.setText(\"Jersey Number: \" + event.getPerson().getJerseyNumber().toString());"},{"lineNumber":88,"author":{"gitId":"-"},"content":" address.setText(event.getPerson().getAddress().toString());"},{"lineNumber":89,"author":{"gitId":"-"},"content":" email.setText(event.getPerson().getEmail().toString());"},{"lineNumber":90,"author":{"gitId":"-"},"content":" remark.setText(\"Remarks: \" + event.getPerson().getRemark().toString());"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":"}"},{"lineNumber":94,"author":{"gitId":"-"},"content":""}],"authorContributionMap":{"lohtianwei":34,"codeeong":46,"-":14}},{"path":"src/main/java/seedu/address/ui/TeamDisplay.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * A ui for displaying the team currently chosen"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(TeamDisplay.class);"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private FlowPane teams;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public TeamDisplay(ObservableList\u003cTeam\u003e teamList) {"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" super(FXML);"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.teamList \u003d teamList;"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" initTeams();"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" getTeams();"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}."},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void initTeams() {"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" for (Team t: this.teamList) {"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" Label teamLabel \u003d new Label(t.getTeamName().toString());"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" teamLabel.setStyle(\"-fx-text-fill: #3f7bbf\");"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(teamLabel);"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" teams.setHgap(10);"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e listOfTeams \u003d FXCollections.observableArrayList();"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" for (Team t: teamList) {"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" listOfTeams.add(t.getTeamName().toString());"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return listOfTeams;"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(newTeamLabel);"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (event.teamName.equals(teamList.get(i).getTeamName().toString())) {"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass().add(\"selected\");"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleRemoveSelectedTeamEvent(RemoveSelectedTeamEvent event) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":103,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c teams.getChildren().size(); i++) {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" if (teamList.get(i).getTeamName().equals(event.teamName)) {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" teams.getChildren().remove(i);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" private void handleClearTeamsEvent(ClearTeamsEvent event) {"},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();"},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" private void handleUndoTeamsEvent(UndoTeamsEvent event) {"},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();"},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" initTeams();"},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" getTeams();"},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":109,"-":15}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private static final String ICON_APPLICATION \u003d \"/images/football.png\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" //Set the application icon."},{"lineNumber":52,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (Throwable e) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));"},{"lineNumber":61,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" mainWindow.hide();"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters."},{"lineNumber":86,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog."},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,"},{"lineNumber":89,"author":{"gitId":"-"},"content":" String contentText) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");"},{"lineNumber":92,"author":{"gitId":"-"},"content":" alert.initOwner(owner);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" alert.setTitle(title);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.showAndWait();"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));"},{"lineNumber":106,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":108,"author":{"gitId":"-"},"content":" System.exit(1);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":116,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,"},{"lineNumber":117,"author":{"gitId":"-"},"content":" event.exception);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/guitests/guihandles/MainWindowHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Provides a handle for {@code MainWindow}."},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class MainWindowHandle extends StageHandle {"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":" private final PersonListPanelHandle personListPanel;"},{"lineNumber":11,"author":{"gitId":"-"},"content":" private final ResultDisplayHandle resultDisplay;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" private final TeamDisplayHandle teamDisplayBar;"},{"lineNumber":13,"author":{"gitId":"-"},"content":" private final CommandBoxHandle commandBox;"},{"lineNumber":14,"author":{"gitId":"-"},"content":" private final StatusBarFooterHandle statusBarFooter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private final MainMenuHandle mainMenu;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public MainWindowHandle(Stage stage) {"},{"lineNumber":18,"author":{"gitId":"-"},"content":" super(stage);"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanelHandle(getChildNode(PersonListPanelHandle.PERSON_LIST_VIEW_ID));"},{"lineNumber":21,"author":{"gitId":"-"},"content":" resultDisplay \u003d new ResultDisplayHandle(getChildNode(ResultDisplayHandle.RESULT_DISPLAY_ID));"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" teamDisplayBar \u003d new TeamDisplayHandle(getChildNode(TeamDisplayHandle.TEAM_DISPLAY_ID));"},{"lineNumber":23,"author":{"gitId":"-"},"content":" commandBox \u003d new CommandBoxHandle(getChildNode(CommandBoxHandle.COMMAND_INPUT_FIELD_ID));"},{"lineNumber":24,"author":{"gitId":"-"},"content":" statusBarFooter \u003d new StatusBarFooterHandle(getChildNode(StatusBarFooterHandle.STATUS_BAR_PLACEHOLDER));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" mainMenu \u003d new MainMenuHandle(getChildNode(MainMenuHandle.MENU_BAR_ID));"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return personListPanel;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return resultDisplay;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return commandBox;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return statusBarFooter;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return mainMenu;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":46}},{"path":"src/test/java/guitests/guihandles/PersonCardHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.scene.Node;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Provides a handle to a person card in the person list panel."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class PersonCardHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String TAGS_FIELD_ID \u003d \"#tags\";"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private static final String RATING_FIELD_ID \u003d \"#rating\";"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private static final String POSITION_FIELD_ID \u003d \"#position\";"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String TEAMNAME_FIELD_ID \u003d \"#teamName\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label idLabel;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label nameLabel;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private final Label positionLabel;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private final Label ratingLabel;"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final Label teamNameLabel;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final List\u003cLabel\u003e tagLabels;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public PersonCardHandle(Node cardNode) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super(cardNode);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" this.positionLabel \u003d getChildNode(POSITION_FIELD_ID);"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" this.ratingLabel \u003d getChildNode(RATING_FIELD_ID);"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" this.teamNameLabel \u003d getChildNode(TEAMNAME_FIELD_ID);"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" Region tagsContainer \u003d getChildNode(TAGS_FIELD_ID);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.tagLabels \u003d tagsContainer"},{"lineNumber":40,"author":{"gitId":"-"},"content":" .getChildrenUnmodifiable()"},{"lineNumber":41,"author":{"gitId":"-"},"content":" .stream()"},{"lineNumber":42,"author":{"gitId":"-"},"content":" .map(Label.class::cast)"},{"lineNumber":43,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String getId() {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" return idLabel.getText();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String getName() {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return nameLabel.getText();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public String getPosition() {"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return positionLabel.getText();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public String getRating() {"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return ratingLabel.getText();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" public String getTeamName() {"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return teamNameLabel.getText();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" public List\u003cString\u003e getTags() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" return tagLabels"},{"lineNumber":68,"author":{"gitId":"-"},"content":" .stream()"},{"lineNumber":69,"author":{"gitId":"-"},"content":" .map(Label::getText)"},{"lineNumber":70,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTagStyleClasses(String tag) {"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" return tagLabels"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" .stream()"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" .filter(label -\u003e label.getText().equals(tag))"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" .map(Label::getStyleClass)"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" .findFirst()"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" .orElseThrow(() -\u003e new IllegalArgumentException(\"No such tag.\"));"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":25,"-":56}},{"path":"src/test/java/guitests/guihandles/PlayerDetailsHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Provides a handle to a player details pane."},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class PlayerDetailsHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String PLAYER_DETAILS_DISPLAY_ID \u003d \"#playerDetails\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String JERSEY_FIELD_ID \u003d \"#jerseyNumber\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String PHONE_FIELD_ID \u003d \"#phone\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" private static final String EMAIL_FIELD_ID \u003d \"#email\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String ADDRESS_FIELD_ID \u003d \"#address\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String REMARK_FIELD_ID \u003d \"#remark\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label nameLabel;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label jerseyLabel;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private final Label addressLabel;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Label phoneLabel;"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final Label emailLabel;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final Label remarkLabel;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PlayerDetailsHandle(Node cardNode) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" super(cardNode);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.phoneLabel \u003d getChildNode(PHONE_FIELD_ID);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.addressLabel \u003d getChildNode(ADDRESS_FIELD_ID);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.emailLabel \u003d getChildNode(EMAIL_FIELD_ID);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.remarkLabel \u003d getChildNode(REMARK_FIELD_ID);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.jerseyLabel \u003d getChildNode(JERSEY_FIELD_ID);"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getPhone() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return phoneLabel.getText();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public String getName() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return nameLabel.getText();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddress() {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressLabel.getText();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public String getJerseyNumber() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return jerseyLabel.getText().substring(15);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getRemarks() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return remarkLabel.getText().substring(9);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" public String getEmail() {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return emailLabel.getText();"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":8,"-":56}},{"path":"src/test/java/guitests/guihandles/TeamDisplayHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Collectors;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" * Provides a handle for {@code TeamDisplayHandle} containing the list of {@code Teams}."},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String TEAM_DISPLAY_ID \u003d \"#teams\";"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private final List\u003cLabel\u003e teamLabels;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public TeamDisplayHandle(Node teamDisplayNode) {"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" super(teamDisplayNode);"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" Region teamContainer \u003d getChildNode(TEAM_DISPLAY_ID);"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" this.teamLabels \u003d teamContainer"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" .getChildrenUnmodifiable()"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" .stream()"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" .map(Label.class::cast)"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" return teamLabels"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" .stream()"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" .map(Label::getText)"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":37}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" String defaultConfigAsString \u003d \"App title : My Team Manager\\n\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/XmlUtilTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javax.xml.bind.JAXBException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedTag;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlSerializableAddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TestUtil;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class XmlUtilTest {"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"src/test/data/XmlUtilTest/\");"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private static final File EMPTY_FILE \u003d new File(TEST_DATA_FOLDER + \"empty.xml\");"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final File MISSING_FILE \u003d new File(TEST_DATA_FOLDER + \"missing.xml\");"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final File VALID_FILE \u003d new File(TEST_DATA_FOLDER + \"validAddressBook.xml\");"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final File MISSING_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"missingPersonField.xml\");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final File INVALID_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"invalidPersonField.xml\");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private static final File VALID_PERSON_FILE \u003d new File(TEST_DATA_FOLDER + \"validPerson.xml\");"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final File TEMP_FILE \u003d new File(TestUtil.getFilePathInSandboxFolder(\"tempAddressBook.xml\"));"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"9482asf424\";"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Hans Muster\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"9482424\";"},{"lineNumber":40,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"hans@example\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"4th street\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final List\u003cXmlAdaptedTag\u003e VALID_TAGS \u003d Collections.singletonList(new XmlAdaptedTag(\"friends\"));"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullFile_throwsNullPointerException() throws Exception {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(null, AddressBook.class);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullClass_throwsNullPointerException() throws Exception {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(VALID_FILE, null);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void getDataFromFile_missingFile_fileNotFoundException() throws Exception {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(MISSING_FILE, AddressBook.class);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void getDataFromFile_emptyFile_dataFormatMismatchException() throws Exception {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" thrown.expect(JAXBException.class);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(EMPTY_FILE, AddressBook.class);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void getDataFromFile_validFile_validResult() throws Exception {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook dataFromFile \u003d XmlUtil.getDataFromFile(VALID_FILE, XmlSerializableAddressBook.class).toModelType();"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" assertEquals(0, dataFromFile.getTeamList().size());"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertEquals(0, dataFromFile.getTagList().size());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithMissingPersonField_validResult() throws Exception {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile("},{"lineNumber":81,"author":{"gitId":"-"},"content":" MISSING_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson("},{"lineNumber":83,"author":{"gitId":"-"},"content":" null, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithInvalidPersonField_validResult() throws Exception {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile("},{"lineNumber":90,"author":{"gitId":"-"},"content":" INVALID_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson("},{"lineNumber":92,"author":{"gitId":"-"},"content":" VALID_NAME, INVALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithValidPerson_validResult() throws Exception {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile("},{"lineNumber":99,"author":{"gitId":"-"},"content":" VALID_PERSON_FILE, XmlAdaptedPersonWithRootElement.class);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson("},{"lineNumber":101,"author":{"gitId":"-"},"content":" VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullFile_throwsNullPointerException() throws Exception {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(null, new AddressBook());"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullClass_throwsNullPointerException() throws Exception {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":114,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(VALID_FILE, null);"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":118,"author":{"gitId":"-"},"content":" public void saveDataToFile_missingFile_fileNotFoundException() throws Exception {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(MISSING_FILE, new AddressBook());"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void saveDataToFile_validFile_dataSaved() throws Exception {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" TEMP_FILE.createNewFile();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataToWrite \u003d new XmlSerializableAddressBook(new AddressBook());"},{"lineNumber":127,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" AddressBookBuilder builder \u003d new AddressBookBuilder(new AddressBook());"},{"lineNumber":132,"author":{"gitId":"-"},"content":" dataToWrite \u003d new XmlSerializableAddressBook("},{"lineNumber":133,"author":{"gitId":"-"},"content":" builder.withPerson(new PersonBuilder().build()).withTag(\"Friends\").build());"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);"},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Test class annotated with {@code XmlRootElement} to allow unmarshalling of .xml data to {@code XmlAdaptedPerson}"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * objects."},{"lineNumber":143,"author":{"gitId":"-"},"content":" */"},{"lineNumber":144,"author":{"gitId":"-"},"content":" @XmlRootElement(name \u003d \"person\")"},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static class XmlAdaptedPersonWithRootElement extends XmlAdaptedPerson {}"},{"lineNumber":146,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":145}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddCommandTest {"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void constructor_nullPerson_throwsNullPointerException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" new AddCommand(null);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" ModelStub modelStub \u003d new ModelStubThrowingDuplicatePersonException();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person."},{"lineNumber":94,"author":{"gitId":"-"},"content":" */"},{"lineNumber":95,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":98,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {"},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" return false;"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return null;"},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":143,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":145,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void deletePerson(Person target) throws PersonNotFoundException {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":151,"author":{"gitId":"-"},"content":" }"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":154,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":155,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":162,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":166,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {"},{"lineNumber":167,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":168,"author":{"gitId":"codeeong"},"content":" return null;"},{"lineNumber":169,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":170,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":172,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" fail(\"This method should not be called\");"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {"},{"lineNumber":183,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }"},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void createTeam(Team team) {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" fail(\"This method should not be be called.\");"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":192,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":193,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":194,"author":{"gitId":"-"},"content":" }"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":197,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {"},{"lineNumber":198,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"codeeong"},"content":" public boolean setTagColour(Tag tag, String colour) {"},{"lineNumber":213,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":214,"author":{"gitId":"codeeong"},"content":" return false;"},{"lineNumber":215,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":216,"author":{"gitId":"-"},"content":" }"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":219,"author":{"gitId":"-"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person."},{"lineNumber":220,"author":{"gitId":"-"},"content":" */"},{"lineNumber":221,"author":{"gitId":"-"},"content":" private class ModelStubThrowingDuplicatePersonException extends ModelStub {"},{"lineNumber":222,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":223,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":225,"author":{"gitId":"-"},"content":" }"},{"lineNumber":226,"author":{"gitId":"-"},"content":""},{"lineNumber":227,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":228,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":229,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":" }"},{"lineNumber":232,"author":{"gitId":"-"},"content":""},{"lineNumber":233,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * A Model stub that always accept the person being added."},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":238,"author":{"gitId":"-"},"content":""},{"lineNumber":239,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":240,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":241,"author":{"gitId":"-"},"content":" requireNonNull(person);"},{"lineNumber":242,"author":{"gitId":"-"},"content":" personsAdded.add(person);"},{"lineNumber":243,"author":{"gitId":"-"},"content":" }"},{"lineNumber":244,"author":{"gitId":"-"},"content":""},{"lineNumber":245,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName)"},{"lineNumber":247,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":249,"author":{"gitId":"-"},"content":" }"},{"lineNumber":250,"author":{"gitId":"-"},"content":""},{"lineNumber":251,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":252,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":253,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":254,"author":{"gitId":"-"},"content":" }"},{"lineNumber":255,"author":{"gitId":"-"},"content":" }"},{"lineNumber":256,"author":{"gitId":"-"},"content":""},{"lineNumber":257,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":29,"codeeong":12,"-":216}},{"path":"src/test/java/seedu/address/logic/commands/ChangeThemeCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandTest {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public void execute_validTheme_success() {"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertExecutionSuccess(listThemes[0]);"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" public void execute_invalidTheme_failure() {"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" assertExecutionFailure(\"FakeTheme\", Messages.MESSAGE_INVALID_THEME);"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public void equals() {"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand[] listThemeCommands \u003d new ChangeThemeCommand[2];"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" listThemeCommands[i] \u003d new ChangeThemeCommand(listThemes[i]);"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" // same object -\u003e returns true"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertTrue(listThemeCommands[i].equals(new ChangeThemeCommand(listThemes[i])));"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" // different types -\u003e returns false"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(1));"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" // null -\u003e returns false"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(null));"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" // different theme -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" int j \u003d 1;"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" if (i !\u003d j) {"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(listThemeCommands[j]));"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" j--;"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}."},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" private void assertExecutionSuccess(String theme) {"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" CommandResult commandResult \u003d changethemeCommand.execute();"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" assertEquals(String.format(ChangeThemeCommand.MESSAGE_THEME_SUCCESS, theme),"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" commandResult.feedbackToUser);"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}."},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" private void assertExecutionFailure(String theme, String expectedMessage) {"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" changethemeCommand.execute();"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":89}},{"path":"src/test/java/seedu/address/logic/commands/KeyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandTest {"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" private Model model;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" @Before"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public void start() {"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" model \u003d new ModelManager();"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public void checkKey() throws Exception {"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" //checks that default lock state is false"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" //checks that key can lock MTM"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" //checks that key can unlock MTM"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" //checks that toggling works"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":44}},{"path":"src/test/java/seedu/address/logic/commands/RemarkCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_EMPTY;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareRedoCommand;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareUndoCommand;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for RemarkCommand."},{"lineNumber":35,"author":{"gitId":"-"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class RemarkCommandTest {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void execute_addRemarkUnfilteredList_success() throws Exception {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_AMY).build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_deleteRemarkUnfilteredList_success() throws Exception {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_EMPTY).build();"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_DELETE_REMARK_SUCCESS, remarkedPerson);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personInFilteredList).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, remarkedPerson.getRemark().toString());"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":88,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personInFilteredList, remarkedPerson);"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Remark filtered list where index is larger than size of filtered list,"},{"lineNumber":105,"author":{"gitId":"-"},"content":" * but smaller than size of address book"},{"lineNumber":106,"author":{"gitId":"-"},"content":" */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":108,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":111,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":125,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_AMY).build();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" // remark -\u003e first person remarked"},{"lineNumber":130,"author":{"gitId":"-"},"content":" remarkCommand.execute();"},{"lineNumber":131,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" // redo -\u003e same first person remarked again"},{"lineNumber":137,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":142,"author":{"gitId":"-"},"content":" public void executeUndoRedo_invalidIndexUnfilteredList_failure() {"},{"lineNumber":143,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":144,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);"},{"lineNumber":145,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":147,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_EMPTY);"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" // execution failed -\u003e remarkCommand not pushed into undoRedoStack"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" // no commands in undoRedoStack -\u003e undoCommand and redoCommand fail"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * 1. Updates {@code Person#remark} from a filtered list."},{"lineNumber":159,"author":{"gitId":"-"},"content":" * 2. Undo the update."},{"lineNumber":160,"author":{"gitId":"-"},"content":" * 3. The unfiltered list should be shown now. Verify that the index of the previously updated person in the"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * unfiltered list is different from the index at the filtered list."},{"lineNumber":162,"author":{"gitId":"-"},"content":" * 4. Redo the update. This ensures {@code RedoCommand} updates the person object regardless of indexing."},{"lineNumber":163,"author":{"gitId":"-"},"content":" */"},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":165,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexFilteredList_samePersonRemarked() throws Exception {"},{"lineNumber":166,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":167,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);"},{"lineNumber":169,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_BOB);"},{"lineNumber":170,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_SECOND_PERSON);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" // remark -\u003e remarks second person in unfiltered person list / first person in filtered person list"},{"lineNumber":176,"author":{"gitId":"-"},"content":" remarkCommand.execute();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons"},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertNotEquals(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), personToRemark);"},{"lineNumber":184,"author":{"gitId":"-"},"content":" // redo -\u003e remarks same second person in unfiltered person list"},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":186,"author":{"gitId":"-"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" final RemarkCommand standardCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":193,"author":{"gitId":"-"},"content":" RemarkCommand commandWithSameValues \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":203,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"-"},"content":" // different index -\u003e returns false"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_SECOND_PERSON, new Remark(VALID_REMARK_AMY))));"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" // different remark -\u003e returns false"},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_FIRST_PERSON, new Remark(VALID_REMARK_BOB))));"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Returns an {@code RemarkCommand} with parameters {@code index} and {@code remark}."},{"lineNumber":214,"author":{"gitId":"-"},"content":" */"},{"lineNumber":215,"author":{"gitId":"-"},"content":" private RemarkCommand prepareCommand(Index index, String remark) {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d new RemarkCommand(index, new Remark(remark));"},{"lineNumber":217,"author":{"gitId":"-"},"content":" remarkCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":218,"author":{"gitId":"-"},"content":" return remarkCommand;"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":218}},{"path":"src/test/java/seedu/address/logic/commands/SetCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * This is the unit test for {@code SetCommand}."},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"public class SetCommandTest {"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private Model model;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Tag tagOne \u003d new Tag(\"testTagOne\");"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private Tag tagTwo \u003d new Tag(\"testTagTwo\");"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" @Before"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" public void setUp() {"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public void equals() {"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" SetCommand testCommand \u003d new SetCommand(tagOne, \"teal\");"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" SetCommand testCommandTwo \u003d new SetCommand(tagOne, \"teal\");"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" //Test to ensure command is strictly a SetCommand"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new AddCommand(CARL)));"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ClearCommand()));"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new DeleteCommand(INDEX_FIRST_PERSON)));"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HistoryCommand()));"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HelpCommand()));"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new RedoCommand()));"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new UndoCommand()));"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ListCommand()));"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_AMY)));"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" //Test to check that different tag string returns false"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagTwo, \"teal\")));"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"teal\")));"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" //Test to check that different color strings returns false"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagOne, \"red\")));"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"red\")));"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" public void checkCommandResult() throws CommandException {"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" //Check if the result message is correct when there is no tags found"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" SetCommand command \u003d new SetCommand(new Tag(\"blablabla\"), \"teal\");"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag is invalid! Please input a valid tag name!\"));"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" //When tags is present"},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"red\");"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" assertFalse(command.execute().feedbackToUser.equals(\"No such tag\"));"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to red\"));"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" //Check if friends tags are set to color"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"teal\");"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to teal\"));"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" for (Tag tag : model.getAddressBook().getTagList()) {"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" if (\"friends\".equals(tag.tagName)) {"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" assertTrue(tag.getTagColour().equals(\"teal\"));"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" assertFalse(tag.getTagColour().equals(\"pink\"));"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" resetAllTagsToDefault();"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" * This method allows all tags to be set to the default colour \"teal\""},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" public void resetAllTagsToDefault() {"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTag\u003e allTags \u003d model.getAddressBook().getTagList();"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" for (Tag t : allTags) {"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(\"teal\");"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":100}},{"path":"src/test/java/seedu/address/logic/commands/SortCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_SUCCESS;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getEmptyAddressBook;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getSortedAddressBook;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandTest {"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public ExpectedException error \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" private Model emptyModel \u003d new ModelManager(getEmptyAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByNameDesc \u003d new ModelManager("},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"name\", \"desc\"), new UserPrefs());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAdd \u003d new ModelManager("},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"asc\"), new UserPrefs());"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAddDesc \u003d new ModelManager("},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"desc\"), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmail \u003d new ModelManager(getSortedAddressBook(\"email\", \"asc\"), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmailDesc \u003d new ModelManager("},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"email\", \"desc\"), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void noPlayers() throws CommandException {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" error.expect(CommandException.class);"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" prepareCommand(\"name\", \"asc\", emptyModel).execute();"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" public void emptySortField_throwsNullPointerEx() {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", null);"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void emptySortOrder_throwsNullPointerEx() {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(null, \"asc\");"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public void sortByName_success() throws Exception {"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"asc\", model);"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"asc\");"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, model);"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public void sortByNameDesc_success() throws Exception {"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"desc\", model);"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"desc\");"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByNameDesc);"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" public void sortByAdd_success() throws Exception {"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"asc\", model);"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"asc\");"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAdd);"},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" public void sortByAddDesc_success() throws Exception {"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"desc\", model);"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"desc\");"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAddDesc);"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmail_success() throws Exception {"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"asc\", model);"},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"asc\");"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmail);"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmailDesc_success() throws Exception {"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"desc\", model);"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"desc\");"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmailDesc);"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" * Returns a {@code sortCommand} with the parameters {@code field and @code order}."},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" private SortCommand prepareCommand(String field, String order, Model model) {"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" SortCommand sortCommand \u003d new SortCommand(field, order);"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" sortCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" return sortCommand;"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":108}},{"path":"src/test/java/seedu/address/logic/commands/TogglePrivacyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandTest {"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" public void editPersonPrivacyTest() {"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertFalse(epp.anyNonNullField());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy eppBuilder \u003d new EditPersonPrivacyBuilder().setAddressPrivate(\"false\")"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" .setEmailPrivate(\"false\").setPhonePrivate(\"true\").setRatingPrivate(\"false\")"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" .setRemarkPrivate(\"true\").build();"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateAddress(), epp.getPrivateAddress());"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateEmail(), epp.getPrivateEmail());"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivatePhone(), epp.getPrivatePhone());"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRating(), epp.getPrivateRating());"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRemark(), epp.getPrivateRemark());"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" public void oneFieldToggledSuccess() throws Exception {"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" Index indexLast \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLast.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" Person listedPerson \u003d new PersonBuilder().withName(lastPerson.getName().toString())"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" .withEmail(lastPerson.getEmail().toString()).withRating(lastPerson.getRating().toString())"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" .withPhone(lastPerson.getPhone().toString()).build();"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" listedPerson.getPhone().setPrivate(true);"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder(listedPerson).setPhonePrivate(\"true\").build();"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand togglePrivacyCommand \u003d new TogglePrivacyCommand(indexLast, epp);"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" togglePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(TogglePrivacyCommand.MESSAGE_SUCCESS, listedPerson);"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" expectedModel.updatePerson(lastPerson, listedPerson);"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":67}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TEAM_ARSENAL;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" private static final boolean DEFAULT_LOCK_STATE \u003d false;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void parseCommand_add() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person), DEFAULT_LOCK_STATE);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_addAlias() throws Exception {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \""},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void parseCommand_clear() throws Exception {"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_clearAlias() throws Exception {"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void parseCommand_delete() throws Exception {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_deleteAlias() throws Exception {"},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseCommand_edit() throws Exception {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \""},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_editAlias() throws Exception {"},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \""},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":117,"author":{"gitId":"-"},"content":" public void parseCommand_exit() throws Exception {"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ExitCommand);"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ExitCommand);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" }"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void parseCommand_remark() throws Exception {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");"},{"lineNumber":125,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_WORD + \" \""},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" }"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":131,"author":{"gitId":"-"},"content":" public void parseCommand_remarkAlias() throws Exception {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");"},{"lineNumber":133,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_ALIAS + \" \""},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" }"},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":139,"author":{"gitId":"-"},"content":" public void parseCommand_find() throws Exception {"},{"lineNumber":140,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":141,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream()"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }"},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_findAlias() throws Exception {"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream()"},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":157,"author":{"gitId":"-"},"content":" public void parseCommand_help() throws Exception {"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HelpCommand);"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\","},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HelpCommand);"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public void parseCommand_history() throws Exception {"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\","},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"histories\", DEFAULT_LOCK_STATE);"},{"lineNumber":171,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":172,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_historyAlias() throws Exception {"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\","},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void parseCommand_create() throws Exception {"},{"lineNumber":186,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));"},{"lineNumber":187,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_WORD + \" \""},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);"},{"lineNumber":190,"author":{"gitId":"-"},"content":" }"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parseCommand_createAlias() throws Exception {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));"},{"lineNumber":195,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_ALIAS + \" \""},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" }"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void parseCommand_list() throws Exception {"},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\","},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":205,"author":{"gitId":"-"},"content":" }"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_listAlias() throws Exception {"},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\","},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":215,"author":{"gitId":"-"},"content":" public void parseCommand_select() throws Exception {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_selectAlias() throws Exception {"},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":229,"author":{"gitId":"-"},"content":" public void parseCommand_redoCommandWord_returnsRedoCommand() throws Exception {"},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_redoCommandAlias_returnsRedoCommand() throws Exception {"},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS + \" 1\","},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":241,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":242,"author":{"gitId":"-"},"content":" public void parseCommand_undoCommandWord_returnsUndoCommand() throws Exception {"},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":245,"author":{"gitId":"-"},"content":" }"},{"lineNumber":246,"author":{"gitId":"-"},"content":""},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_undoCommandAlias_returnsUndoCommand() throws Exception {"},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS + \" 3\","},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":255,"author":{"gitId":"-"},"content":" public void parseCommand_unrecognisedInput_throwsParseException() throws Exception {"},{"lineNumber":256,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":257,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"\", DEFAULT_LOCK_STATE);"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }"},{"lineNumber":260,"author":{"gitId":"-"},"content":""},{"lineNumber":261,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void parseCommand_unknownCommand_throwsParseException() throws Exception {"},{"lineNumber":263,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":264,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_LOCK_STATE);"},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" /** @lohtianwei */"},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sort() throws Exception {"},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \""},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \""},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);"},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sortAlias() throws Exception {"},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \""},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \""},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);"},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_key() throws Exception {"},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD"},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);"},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_keyAlias() throws Exception {"},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD"},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);"},{"lineNumber":293,"author":{"gitId":"-"},"content":" }"},{"lineNumber":294,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacy() throws Exception {"},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_WORD + \" \""},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);"},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacyAlias() throws Exception {"},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_ALIAS + \" \""},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);"},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":309,"author":{"gitId":"codeeong"},"content":" /** @@Codee */"},{"lineNumber":310,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":311,"author":{"gitId":"codeeong"},"content":" public void parseCommand_theme() throws Exception {"},{"lineNumber":312,"author":{"gitId":"codeeong"},"content":" String[] listThemes \u003d { \"Light\", \"Dark\" };"},{"lineNumber":313,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":314,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":315,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand command \u003d (ChangeThemeCommand) parser.parseCommand("},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" ChangeThemeCommand.COMMAND_WORD + \" \" + listThemes[i], DEFAULT_LOCK_STATE);"},{"lineNumber":317,"author":{"gitId":"codeeong"},"content":" assertEquals(new ChangeThemeCommand(listThemes[i]), command);"},{"lineNumber":318,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":319,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":320,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":321,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":150,"codeeong":12,"-":159}},{"path":"src/test/java/seedu/address/logic/parser/ChangeThemeCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private ChangeThemeCommandParser parser \u003d new ChangeThemeCommandParser();"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsThemeCommand() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, listThemes[i], new ChangeThemeCommand(listThemes[i]));"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" // Empty Argument"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" assertParseFailure(parser, \"\","},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangeThemeCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":30}},{"path":"src/test/java/seedu/address/logic/parser/SetCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalTags.FRIEND;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class SetCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private SetCommandParser parser \u003d new SetCommandParser();"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsSetCommand() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" String userInput \u003d \" \" + PREFIX_TAG + FRIEND.getTagName() + \" \" + PREFIX_TAG_COLOUR + \"green\";"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, userInput, new SetCommand(FRIEND, \"green\"));"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":23}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_ASCENDING;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_DESCENDING;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"//import seedu.address.logic.commands.SortCommand;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" private SortCommandParser parser \u003d new SortCommandParser();"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public void noArguments_throwsParseException() {"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" public void parse_invalidArguments_failure() {"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" //more than 1 field entered"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"address\" + \" \" + \"asc\","},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" //invalid field entered"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"invalid\" + \"asc\","},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //invalid sort order entered"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"invalid\","},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" //no field entered"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"asc\","},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" //no order entered"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\","},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" /*"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public void parse_validArguments_success() {"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in asc order"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_ASCENDING,"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_ASCENDING));"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in desc order"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_DESCENDING,"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_DESCENDING));"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in asc order"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_ASCENDING,"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_ASCENDING));"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in desc order"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_DESCENDING,"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_DESCENDING));"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in asc order"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_ASCENDING,"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_ASCENDING));"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in desc order"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_DESCENDING,"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_DESCENDING));"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in asc order"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_ASCENDING,"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_ASCENDING));"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in desc order"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_DESCENDING,"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_DESCENDING));"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":82}},{"path":"src/test/java/seedu/address/logic/parser/TogglePrivacyCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParserTest {"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d String.format"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" (MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE);"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_NO_FIELDS \u003d String.format(TogglePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private TogglePrivacyCommandParser parser \u003d new TogglePrivacyCommandParser();"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidIndex() {"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" // zero index"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //negative index"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" //invalid index"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1 random\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void parseMissingField_fail() {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" // no prefix specified"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\", MESSAGE_NO_FIELDS);"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" //no index specified"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" //nothing specified after command word"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidPrefix_fail() {"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME,"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void parseOneField_success() throws ParseException {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE;"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" public void parseValidFollowedbyInvalid_success() throws ParseException {"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE + \" \" + PREFIX_NAME;"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" * Checks if two TP commands are equal"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" * @param expected"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" * @param actual"},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" private void compareTpCommand(TogglePrivacyCommand expected, TogglePrivacyCommand actual) {"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getIndex(), actual.getIndex());"},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRemark(), actual.getEpp().getPrivateRemark());"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateAddress(), actual.getEpp().getPrivateAddress());"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRating(), actual.getEpp().getPrivateRating());"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivatePhone(), actual.getEpp().getPrivatePhone());"},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateEmail(), actual.getEpp().getPrivateEmail());"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":95}},{"path":"src/test/java/seedu/address/model/tag/TagTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class TagTest {"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public void constructor_null_throwsNullPointerException() {"},{"lineNumber":11,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new Tag(null));"},{"lineNumber":12,"author":{"gitId":"-"},"content":" }"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public void constructor_invalidTagName_throwsIllegalArgumentException() {"},{"lineNumber":16,"author":{"gitId":"-"},"content":" String invalidTagName \u003d \"\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagName));"},{"lineNumber":18,"author":{"gitId":"-"},"content":" }"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" public void constructor_invalidTagColourName_throwsIllegalArgumentException() {"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" String invalidTagColourName \u003d \"\";"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagColourName));"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void isValidTagName() {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" // null tag name"},{"lineNumber":29,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagName(null));"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public void isValidTagColour() {"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" // null tag name"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagColour(null));"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":12,"-":26}},{"path":"src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class JsonUserPrefsStorageTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/JsonUserPrefsStorageTest/\");"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void readUserPrefs_nullFilePath_throwsNullPointerException() throws DataConversionException {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" readUserPrefs(null);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Optional\u003cUserPrefs\u003e readUserPrefs(String userPrefsFileInTestDataFolder) throws DataConversionException {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d addToTestDataPathIfNotNull(userPrefsFileInTestDataFolder);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new JsonUserPrefsStorage(prefsFilePath).readUserPrefs(prefsFilePath);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void readUserPrefs_missingFile_emptyResult() throws DataConversionException {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertFalse(readUserPrefs(\"NonExistentFile.json\").isPresent());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void readUserPrefs_notJsonFormat_exceptionThrown() throws DataConversionException {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" readUserPrefs(\"NotJsonFormatUserPrefs.json\");"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored."},{"lineNumber":51,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method"},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String userPrefsFileInTestDataFolder) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return userPrefsFileInTestDataFolder !\u003d null"},{"lineNumber":57,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + userPrefsFileInTestDataFolder"},{"lineNumber":58,"author":{"gitId":"-"},"content":" : null;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void readUserPrefs_fileInOrder_successfullyRead() throws DataConversionException {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"TypicalUserPref.json\").get();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void readUserPrefs_valuesMissingFromFile_defaultValuesUsed() throws DataConversionException {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"EmptyUserPrefs.json\").get();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(new UserPrefs(), actual);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public void readUserPrefs_extraValuesInFile_extraValuesIgnored() throws DataConversionException {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"ExtraValuesUserPref.json\").get();"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" private UserPrefs getTypicalUserPrefs() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" userPrefs.setGuiSettings(1000, 500, 300, 100);"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" userPrefs.setAddressBookFilePath(\"myteammanager.xml\");"},{"lineNumber":86,"author":{"gitId":"-"},"content":" userPrefs.setAddressBookName(\"TypicalAddressBookName\");"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return userPrefs;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void savePrefs_nullPrefs_throwsNullPointerException() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveUserPrefs(null, \"SomeFile.json\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void saveUserPrefs_nullFilePath_throwsNullPointerException() {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" saveUserPrefs(new UserPrefs(), null);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Saves {@code userPrefs} at the specified {@code prefsFileInTestDataFolder} filepath."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" private void saveUserPrefs(UserPrefs userPrefs, String prefsFileInTestDataFolder) {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(addToTestDataPathIfNotNull(prefsFileInTestDataFolder))"},{"lineNumber":108,"author":{"gitId":"-"},"content":" .saveUserPrefs(userPrefs);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file\", ioe);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":115,"author":{"gitId":"-"},"content":" public void saveUserPrefs_allInOrder_success() throws DataConversionException, IOException {"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();"},{"lineNumber":118,"author":{"gitId":"-"},"content":" original.setGuiSettings(1200, 200, 0, 2);"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" String pefsFilePath \u003d testFolder.getRoot() + File.separator + \"TempPrefs.json\";"},{"lineNumber":121,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage jsonUserPrefsStorage \u003d new JsonUserPrefsStorage(pefsFilePath);"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" //Try writing when the file doesn\u0027t exist"},{"lineNumber":124,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" UserPrefs readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" //Try saving when the file exists"},{"lineNumber":129,"author":{"gitId":"-"},"content":" original.setGuiSettings(5, 5, 5, 5);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();"},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" }"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":134}},{"path":"src/test/java/seedu/address/testutil/EditPersonPrivacyBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":" * A utility class to help with building EditPersonPrivacy objects."},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"public class EditPersonPrivacyBuilder {"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" private EditPersonPrivacy epp;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder() {"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(EditPersonPrivacy epp) {"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d new EditPersonPrivacy(epp);"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" * Returns an {@code EditPersonPrivacy} with fields containing {@code person}\u0027s privacy details"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(Person p) {"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(p.getAddress().isPrivate());"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(p.getEmail().isPrivate());"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(p.getPhone().isPrivate());"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(p.getRemark().isPrivate());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(p.getRating().isPrivate());"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setPhonePrivate(String phone) {"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setEmailPrivate(String email) {"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(true);"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setAddressPrivate(String address) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(true);"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRatingPrivate(String rating) {"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (rating.equals(\"Optional[true]\") || rating.equals(\"true\")) {"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(true);"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else if (rating.equals(\"Optional[false]\") || rating.equals(\"false\")) {"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of rating should be true or false\");"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRemarkPrivate(String remark) {"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy build() {"},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" return epp;"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":89,"-":2}},{"path":"src/test/java/seedu/address/testutil/TeamBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * A utility class to help with building a TeamList."},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class TeamBuilder {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TEAM_NAME \u003d \"Arsenal\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" private TeamName teamName;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public TeamBuilder() {"},{"lineNumber":18,"author":{"gitId":"-"},"content":" teamName \u003d new TeamName(DEFAULT_TEAM_NAME);"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Initializes the TeamBuilder with the data of {@code teamToCopy}."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public TeamBuilder(Team teamToCopy) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" teamName \u003d teamToCopy.getTeamName();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Sets the {@code TeamName} of the {@code Team} that we are building."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public TeamBuilder withTeamName(String teamName) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.teamName \u003d new TeamName(teamName);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public Team build() {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new Team(teamName);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":8,"-":31}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests."},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class TypicalPersons {"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final Person ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")"},{"lineNumber":36,"author":{"gitId":"-"},"content":" .withPhone(\"85355255\").withTags(\"friends\").withRating(\"0\")"},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"1\").build();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final Person BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")"},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")"},{"lineNumber":40,"author":{"gitId":"-"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\")"},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withTags(\"owesMoney\", \"friends\").withRating(\"1\")"},{"lineNumber":42,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"2\").build();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final Person CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")"},{"lineNumber":44,"author":{"gitId":"-"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withRating(\"2\")"},{"lineNumber":45,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"3\").build();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final Person DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")"},{"lineNumber":47,"author":{"gitId":"-"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withRating(\"3\")"},{"lineNumber":48,"author":{"gitId":"-"},"content":" .withPosition(\"4\").withJerseyNumber(\"4\").build();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final Person ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")"},{"lineNumber":50,"author":{"gitId":"-"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withRating(\"4\")"},{"lineNumber":51,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"5\").build();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final Person FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withRating(\"5\")"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"6\").build();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final Person GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")"},{"lineNumber":56,"author":{"gitId":"-"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withRemark(\"Could be famous\").withRating(\"0\")"},{"lineNumber":57,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"7\").build();"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" // Manually added"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final Person HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")"},{"lineNumber":61,"author":{"gitId":"-"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").build();"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final Person IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")"},{"lineNumber":63,"author":{"gitId":"-"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").build();"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final Person AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRating(VALID_RATING_0)"},{"lineNumber":68,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2)"},{"lineNumber":69,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final Person BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRating(VALID_RATING_1)"},{"lineNumber":72,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_MIDFIELD).withJerseyNumber(VALID_JERSEY_NUMBER_17)"},{"lineNumber":73,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":81,"author":{"gitId":"-"},"content":" */"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" for (Person person : getTypicalPersons()) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" ab.addPerson(person);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new AssertionError(\"not possible\");"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return ab;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersons() {"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByAddress() {"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(DANIEL, ALICE, BENSON, GEORGE, FIONA, ELLE, CARL));"},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByEmail() {"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, GEORGE, DANIEL, CARL, BENSON, FIONA, ELLE));"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByPhone() {"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, DANIEL, ELLE, FIONA, GEORGE, CARL, BENSON));"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getSortedAddressBook(String field, String order) {"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e personList;"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" switch(field) {"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" case \"name\":"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" case \"phone\":"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByPhone();"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" case \"email\":"},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByEmail();"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case \"address\":"},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByAddress();"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" if (order.equals(\"desc\")) {"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Collections.reverse(personList);"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" for (Person person : personList) {"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" ab.addPerson(person);"},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" assert false : \"not possible\";"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" return ab;"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getEmptyAddressBook() {"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" return ab;"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":59,"-":91}},{"path":"src/test/java/seedu/address/testutil/TypicalTags.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" * A utility class containing a list of {@code Tag} objects to be used in tests."},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"public class TypicalTags {"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final Tag GOOD_ATTITUDE \u003d new Tag(\"goodAttitude\", \"teal\");"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public static final Tag FRIEND \u003d new Tag(\"friends\", \"teal\");"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" private TypicalTags() {} //prevents instantiation"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * Returns an {@code AddressBook} with all the typical teams."},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" for (Tag tag : getTypicalTags()) {"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" ab.addTag(tag);"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" } catch (UniqueTagList.DuplicateTagException e) {"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\"not possible\");"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" return ab;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public static List\u003cTag\u003e getTypicalTags() {"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(GOOD_ATTITUDE, FRIEND));"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":43}},{"path":"src/test/java/seedu/address/ui/PlayerDetailsTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertPlayerDetailsDisplaysPerson;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"//@@author Codee"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class PlayerDetailsTest extends GuiUnitTest {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" // no tags"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();"},{"lineNumber":21,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(personWithNoTags);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(playerDetails);"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertCardDisplay(playerDetails, personWithNoTags);"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(person);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(playerDetails.equals(playerDetails));"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(null));"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(0));"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(new PlayerDetails(differentPerson)));"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Asserts that {@code playerDetails} displays the details of {@code expectedPerson} correctly"},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PlayerDetails playerDetails, Person expectedPerson) {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" PlayerDetailsHandle playerDetailsHandle \u003d new PlayerDetailsHandle(playerDetails.getRoot());"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" // verify player details are displayed correctly"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertPlayerDetailsDisplaysPerson(expectedPerson, playerDetailsHandle);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":13,"-":44}},{"path":"src/test/java/seedu/address/ui/TeamDisplayTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertTeamDisplayEquals;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.TeamBuilder;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * tests for TeamDisplay UI Component."},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayTest extends GuiUnitTest {"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private static final String NEW_TEAM_NAME \u003d \"myTeam\";"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private static final ShowNewTeamNameEvent SHOW_NEW_TEAM_NAME_EVENT \u003d new ShowNewTeamNameEvent(NEW_TEAM_NAME);"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" private TeamDisplay teamDisplay;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" private TeamDisplayHandle teamDisplayHandle;"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" teamList \u003d FXCollections.observableArrayList();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Arsenal\").build());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Chelsea\").build());"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" teamDisplay \u003d new TeamDisplay(teamList);"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" uiPartRule.setUiPart(teamDisplay);"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" public void display() {"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" assertTeamDisplay(teamDisplay, teamList);"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * {@code expectedId}."},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void assertTeamDisplay(TeamDisplay teamDisplay, ObservableList\u003cTeam\u003e teamlist) {"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(teamDisplay, teamDisplayHandle);"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" public void handleShowNewTeamNameEvent() {"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" postNow(SHOW_NEW_TEAM_NAME_EVENT);"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly after event"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" teamList.add(new Team(new TeamName(NEW_TEAM_NAME)));"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" TeamDisplay expectedTeamDisplay \u003d new TeamDisplay(teamList);"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(expectedTeamDisplay, teamDisplayHandle);"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class UiPartTest {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_WITH_FX_ROOT_PATH \u003d \"UiPartTest/validFileWithFxRoot.fxml\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void constructor_nullFileUrl_throwsNullPointerException() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null, new Object()));"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void constructor_missingFileUrl_throwsAssertionError() throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl));"},{"lineNumber":41,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl, new Object()));"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void constructor_invalidFileUrl_throwsAssertionError() {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl));"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl, new Object()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void constructor_validFileUrl_loadsFile() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void constructor_validFileWithFxRootUrl_loadsFile() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_WITH_FX_ROOT_PATH);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" TestFxmlObject root \u003d new TestFxmlObject();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl, root).getRoot());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void constructor_nullFileName_throwsNullPointerException() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null));"},{"lineNumber":67,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null, new Object()));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void constructor_missingFileName_throwsNullPointerException() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH));"},{"lineNumber":73,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH, new Object()));"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void constructor_invalidFileName_throwsAssertionError() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH));"},{"lineNumber":79,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH, new Object()));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;"},{"lineNumber":84,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return testFileUrl;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * UiPart used for testing."},{"lineNumber":91,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":96,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl, T root) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" super(fxmlFileUrl, root);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName, T root) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" super(fxmlFileName, root);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" super(fxmlFileName);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" }"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"}"},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.PersonCard;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.TeamDisplay;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class GuiTestAssert {"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private static final String LABEL_DEFAULT_STYLE \u003d \"label\";"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard}."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getPosition(), actualCard.getPosition());"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getRating(), actualCard.getRating());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTeamName(), actualCard.getTeamName());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" expectedCard.getTags().forEach(tag -\u003e"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTagStyleClasses(tag), actualCard.getTagStyleClasses(tag)));"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualTeamDisplay} displays the details of {@code expectedTeamDisplay}."},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static void assertTeamDisplayEquals(TeamDisplay expectedTeamDisplay, TeamDisplayHandle actualTeamDisplay) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" expectedTeamDisplay.getTeams().forEach(team -\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedTeamDisplay.getTeams().toString(), actualTeamDisplay.getTeams().toString()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(Person expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getTeamName().toString(), actualCard.getTeamName());"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getRating().value, actualCard.getRating());"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getPosition().getPositionName(), actualCard.getPosition());"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" assertTagsEqual(expectedPerson, actualCard);"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualPlayerDetails} displays the details of {@code expectedPerson}."},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static void assertPlayerDetailsDisplaysPerson(Person expectedPerson, PlayerDetailsHandle actualPlayerPanel) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualPlayerPanel.getName());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().toString(), actualPlayerPanel.getAddress());"},{"lineNumber":69,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualPlayerPanel.getEmail());"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getJerseyNumber().value, actualPlayerPanel.getJerseyNumber());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualPlayerPanel.getPhone());"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getRemark().toString(), actualPlayerPanel.getRemarks());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Returns the color style for {@code tagName}\u0027s label. The tag\u0027s color is determined by looking up the color"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" * of {@tagColour}"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" * @see PersonCard getTagColorStyleFor(String)"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" private static String getTagColorStyleFor(String tagName) {"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" switch (tagName) {"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" case \"classmates\":"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" case \"owesMoney\":"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" case \"colleagues\":"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" case \"neighbours\":"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" case \"family\":"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" case \"friend\":"},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" case \"friends\":"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" case \"husband\":"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" case \"redCard\":"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" case \"yellowCard\":"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" case \"goodAttitude\":"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" case \"badAttitude\":"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" case \"injured\":"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" case \"fastRunner\":"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" return \"teal\";"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" default:"},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" fail(tagName + \" does not have a color assigned.\");"},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" return \"\";"},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" * Asserts that the tags in {@code actualCard} matches all the tags in {@code expectedPerson} with the correct"},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" * color."},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" private static void assertTagsEqual(Person expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e expectedTags \u003d expectedPerson.getTags().stream()"},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" .map(tag -\u003e tag.tagName).collect(Collectors.toList());"},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedTags, actualCard.getTags());"},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" expectedTags.forEach(tag -\u003e"},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" assertEquals(Arrays.asList(LABEL_DEFAULT_STYLE, getTagColorStyleFor(tag)),"},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" actualCard.getTagStyleClasses(tag)));"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":120,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":122,"author":{"gitId":"-"},"content":" */"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, Person... persons) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":131,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":132,"author":{"gitId":"-"},"content":" */"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cPerson\u003e persons) {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new Person[0]));"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":138,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}."},{"lineNumber":139,"author":{"gitId":"-"},"content":" */"},{"lineNumber":140,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {"},{"lineNumber":141,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();"},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}."},{"lineNumber":147,"author":{"gitId":"-"},"content":" */"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());"},{"lineNumber":150,"author":{"gitId":"-"},"content":" }"},{"lineNumber":151,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":70,"-":81}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_MAC_LINUX;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_WINDOWS;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_JERSEY_NUMBER_DESC;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_POSITION_DESC;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_RATING_DESC;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_MAC_LINUX;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_WINDOWS;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"import com.sun.javafx.PlatformUtil;"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":68,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":69,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":70,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":71,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":72,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":74,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":75,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":76,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":77,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":78,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":79,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void add() throws Exception {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operations on the shown unfiltered list ----------------------------- */"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * -\u003e added"},{"lineNumber":91,"author":{"gitId":"-"},"content":" */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();"},{"lineNumber":93,"author":{"gitId":"-"},"content":" Person toAdd \u003d AMY;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" String command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":95,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":105,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */"},{"lineNumber":110,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":111,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":114,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \""},{"lineNumber":115,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":120,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":121,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */"},{"lineNumber":127,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":128,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":130,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY"},{"lineNumber":131,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \""},{"lineNumber":132,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":137,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":138,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":139,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB"},{"lineNumber":140,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \""},{"lineNumber":141,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" deleteAllPersons();"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */"},{"lineNumber":149,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;"},{"lineNumber":150,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB"},{"lineNumber":151,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_HUSBAND + EMAIL_DESC_BOB + POSITION_DESC_MIDFILED + JERSEY_NUMBER_DESC_17 + RATING_DESC_1;"},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e added */"},{"lineNumber":158,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":159,"author":{"gitId":"-"},"content":" .withPhone(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)"},{"lineNumber":160,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0"},{"lineNumber":162,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e added */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":167,"author":{"gitId":"-"},"content":" .withAddress(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)"},{"lineNumber":168,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":169,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + RATING_DESC_0"},{"lineNumber":170,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":171,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: missing rating -\u003e added */"},{"lineNumber":174,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":175,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags().withRating(UNSPECIFIED_FIELD)"},{"lineNumber":176,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":178,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" if (PlatformUtil.isWindows()) {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":183,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_WINDOWS)"},{"lineNumber":184,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)"},{"lineNumber":185,"author":{"gitId":"-"},"content":" .build();"},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_WINDOWS"},{"lineNumber":187,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER"},{"lineNumber":188,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":190,"author":{"gitId":"-"},"content":" } else if (PlatformUtil.isMac() || PlatformUtil.isLinux()) {"},{"lineNumber":191,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":192,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_MAC_LINUX)"},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)"},{"lineNumber":194,"author":{"gitId":"-"},"content":" .build();"},{"lineNumber":195,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_MAC_LINUX"},{"lineNumber":196,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER"},{"lineNumber":197,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" /* -------------------------- Perform add operation on the shown filtered list ------------------------------ */"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operation while a person card is selected --------------------------- */"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */"},{"lineNumber":210,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":211,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);"},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":" /* ----------------------------------- Perform invalid add operations --------------------------------------- */"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */"},{"lineNumber":216,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON);"},{"lineNumber":217,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */"},{"lineNumber":220,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE"},{"lineNumber":221,"author":{"gitId":"-"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in"},{"lineNumber":222,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(Person)"},{"lineNumber":223,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON) + \" \" + PREFIX_TAG.getPrefix() + \"friends\";"},{"lineNumber":224,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */"},{"lineNumber":227,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0"},{"lineNumber":228,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */"},{"lineNumber":232,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0"},{"lineNumber":233,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":234,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":235,"author":{"gitId":"-"},"content":""},{"lineNumber":236,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */"},{"lineNumber":237,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":241,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":242,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":243,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":244,"author":{"gitId":"-"},"content":""},{"lineNumber":245,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":246,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":247,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":251,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC + ADDRESS_DESC_AMY"},{"lineNumber":252,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":254,"author":{"gitId":"-"},"content":""},{"lineNumber":255,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */"},{"lineNumber":256,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + INVALID_ADDRESS_DESC"},{"lineNumber":257,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Address.MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":261,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":262,"author":{"gitId":"-"},"content":" + INVALID_TAG_DESC + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":263,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":" //@@author lithiumlkid"},{"lineNumber":266,"author":{"gitId":"-"},"content":" /* Case: invalid rating -\u003e rejected */"},{"lineNumber":267,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":268,"author":{"gitId":"-"},"content":" + INVALID_RATING_DESC + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Rating.MESSAGE_RATING_CONSTRAINTS);"},{"lineNumber":270,"author":{"gitId":"-"},"content":""},{"lineNumber":271,"author":{"gitId":"-"},"content":" /* Case: invalid position -\u003e rejected */"},{"lineNumber":272,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":273,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + INVALID_POSITION_DESC + JERSEY_NUMBER_DESC_2;"},{"lineNumber":274,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Position.MESSAGE_POSITION_CONSTRAINTS);"},{"lineNumber":275,"author":{"gitId":"-"},"content":""},{"lineNumber":276,"author":{"gitId":"-"},"content":" /* Case: invalid jersey number -\u003e rejected */"},{"lineNumber":277,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":278,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + INVALID_JERSEY_NUMBER_DESC;"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandFailure(command, JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);"},{"lineNumber":280,"author":{"gitId":"-"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */"},{"lineNumber":282,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":283,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_NO_FILE;"},{"lineNumber":284,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */"},{"lineNumber":287,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":288,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_TYPE;"},{"lineNumber":289,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Avatar.MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":290,"author":{"gitId":"-"},"content":" }"},{"lineNumber":291,"author":{"gitId":"-"},"content":""},{"lineNumber":292,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":293,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and asserts that the,\u003cbr\u003e"},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 1. Command box displays an empty string.\u003cbr\u003e"},{"lineNumber":295,"author":{"gitId":"-"},"content":" * 2. Command box has the default style class.\u003cbr\u003e"},{"lineNumber":296,"author":{"gitId":"-"},"content":" * 3. Result display box displays the success message of executing {@code AddCommand} with the details of"},{"lineNumber":297,"author":{"gitId":"-"},"content":" * {@code toAdd}.\u003cbr\u003e"},{"lineNumber":298,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in"},{"lineNumber":299,"author":{"gitId":"-"},"content":" * the current model added with {@code toAdd}.\u003cbr\u003e"},{"lineNumber":300,"author":{"gitId":"-"},"content":" * 5. Browser url and selected card remain unchanged.\u003cbr\u003e"},{"lineNumber":301,"author":{"gitId":"-"},"content":" * 6. Status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":302,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by"},{"lineNumber":303,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":304,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":305,"author":{"gitId":"-"},"content":" */"},{"lineNumber":306,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Person toAdd) {"},{"lineNumber":307,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);"},{"lineNumber":308,"author":{"gitId":"-"},"content":" }"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":311,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(Person)}. Executes {@code command}"},{"lineNumber":312,"author":{"gitId":"-"},"content":" * instead."},{"lineNumber":313,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(Person)"},{"lineNumber":314,"author":{"gitId":"-"},"content":" */"},{"lineNumber":315,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Person toAdd) {"},{"lineNumber":316,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":318,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);"},{"lineNumber":319,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":320,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");"},{"lineNumber":321,"author":{"gitId":"-"},"content":" }"},{"lineNumber":322,"author":{"gitId":"-"},"content":" // TODO: place holder for success message, change to proper assert method"},{"lineNumber":323,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);"},{"lineNumber":324,"author":{"gitId":"-"},"content":""},{"lineNumber":325,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":326,"author":{"gitId":"-"},"content":" }"},{"lineNumber":327,"author":{"gitId":"-"},"content":""},{"lineNumber":328,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":329,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Person)} except asserts that"},{"lineNumber":330,"author":{"gitId":"-"},"content":" * the,\u003cbr\u003e"},{"lineNumber":331,"author":{"gitId":"-"},"content":" * 1. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":332,"author":{"gitId":"-"},"content":" * 2. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in"},{"lineNumber":333,"author":{"gitId":"-"},"content":" * {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":334,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, Person)"},{"lineNumber":335,"author":{"gitId":"-"},"content":" */"},{"lineNumber":336,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":337,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":338,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":339,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":342,"author":{"gitId":"-"},"content":" }"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":345,"author":{"gitId":"-"},"content":" * Executes {@code command} and asserts that the,\u003cbr\u003e"},{"lineNumber":346,"author":{"gitId":"-"},"content":" * 1. Command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":347,"author":{"gitId":"-"},"content":" * 2. Command box has the error style class.\u003cbr\u003e"},{"lineNumber":348,"author":{"gitId":"-"},"content":" * 3. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":349,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} remain unchanged.\u003cbr\u003e"},{"lineNumber":350,"author":{"gitId":"-"},"content":" * 5. Browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":351,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by"},{"lineNumber":352,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":353,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":354,"author":{"gitId":"-"},"content":" */"},{"lineNumber":355,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":356,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":357,"author":{"gitId":"-"},"content":""},{"lineNumber":358,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":359,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":360,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":361,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":362,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":363,"author":{"gitId":"-"},"content":" }"},{"lineNumber":364,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":5,"-":359}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * for test verification."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" @ClassRule"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initialize();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();"},{"lineNumber":62,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication(this::getInitialData, getDataFileLocation());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Returns the data to be loaded into the file in {@link #getDataFileLocation()}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" */"},{"lineNumber":77,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return TypicalPersons.getTypicalAddressBook();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Returns the directory of the data file."},{"lineNumber":83,"author":{"gitId":"-"},"content":" */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" public MainWindowHandle getMainWindowHandle() {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return mainWindowHandle;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated."},{"lineNumber":115,"author":{"gitId":"-"},"content":" */"},{"lineNumber":116,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" rememberStates();"},{"lineNumber":118,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar"},{"lineNumber":119,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command."},{"lineNumber":120,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons in the address book."},{"lineNumber":128,"author":{"gitId":"-"},"content":" */"},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showAllPersons() {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(getModel().getAddressBook().getPersonList().size(), getModel().getFilteredPersonList().size());"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive)."},{"lineNumber":136,"author":{"gitId":"-"},"content":" */"},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {"},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + keyword);"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertTrue(getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size());"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list."},{"lineNumber":144,"author":{"gitId":"-"},"content":" */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + index.getOneBased());"},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertEquals(index.getZeroBased(), getPersonListPanel().getSelectedCardIndex());"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Deletes all persons in the address book."},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected void deleteAllPersons() {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertEquals(0, getModel().getAddressBook().getPersonList().size());"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays"},{"lineNumber":160,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly."},{"lineNumber":162,"author":{"gitId":"-"},"content":" */"},{"lineNumber":163,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,"},{"lineNumber":164,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());"},{"lineNumber":167,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());"},{"lineNumber":168,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());"},{"lineNumber":170,"author":{"gitId":"-"},"content":" }"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":173,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember"},{"lineNumber":174,"author":{"gitId":"-"},"content":" * their current state."},{"lineNumber":175,"author":{"gitId":"-"},"content":" */"},{"lineNumber":176,"author":{"gitId":"-"},"content":" private void rememberStates() {"},{"lineNumber":177,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();"},{"lineNumber":178,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();"},{"lineNumber":179,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();"},{"lineNumber":180,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * of the previously selected person."},{"lineNumber":186,"author":{"gitId":"-"},"content":" */"},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at"},{"lineNumber":193,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected."},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":195,"author":{"gitId":"-"},"content":" */"},{"lineNumber":196,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":""},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged."},{"lineNumber":203,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":204,"author":{"gitId":"-"},"content":" */"},{"lineNumber":205,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style."},{"lineNumber":211,"author":{"gitId":"-"},"content":" */"},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style."},{"lineNumber":218,"author":{"gitId":"-"},"content":" */"},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":""},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same."},{"lineNumber":225,"author":{"gitId":"-"},"content":" */"},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {"},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same."},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);"},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());"},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }"},{"lineNumber":243,"author":{"gitId":"-"},"content":""},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct."},{"lineNumber":246,"author":{"gitId":"-"},"content":" */"},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());"},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());"},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());"},{"lineNumber":252,"author":{"gitId":"codeeong"},"content":" //assertEquals that the detail card is correct"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());"},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());"},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {"},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model."},{"lineNumber":262,"author":{"gitId":"-"},"content":" */"},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();"},{"lineNumber":265,"author":{"gitId":"-"},"content":" }"},{"lineNumber":266,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":264}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":59,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void edit() throws Exception {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field"},{"lineNumber":74,"author":{"gitId":"-"},"content":" * -\u003e edited"},{"lineNumber":75,"author":{"gitId":"-"},"content":" */"},{"lineNumber":76,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \""},{"lineNumber":78,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + TAG_DESC_HUSBAND + \" \""},{"lineNumber":79,"author":{"gitId":"-"},"content":" + RATING_DESC_1 + \" \" + POSITION_DESC_MIDFILED + \" \" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND)"},{"lineNumber":82,"author":{"gitId":"-"},"content":" .withRating(VALID_RATING_1).withPosition(VALID_POSITION_MIDFIELD)"},{"lineNumber":83,"author":{"gitId":"-"},"content":" .withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */"},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" model.updatePerson("},{"lineNumber":95,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":100,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + POSITION_DESC_MIDFILED + RATING_DESC_1"},{"lineNumber":101,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_17;"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":108,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().build();"},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */"},{"lineNumber":120,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":121,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":123,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;"},{"lineNumber":124,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":125,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list"},{"lineNumber":129,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":130,"author":{"gitId":"-"},"content":" */"},{"lineNumber":131,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":134,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */"},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but"},{"lineNumber":139,"author":{"gitId":"-"},"content":" * browser url changes"},{"lineNumber":140,"author":{"gitId":"-"},"content":" */"},{"lineNumber":141,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":142,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":143,"author":{"gitId":"-"},"content":" selectPerson(index);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":145,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_AMY + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the"},{"lineNumber":147,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name"},{"lineNumber":148,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,"},{"lineNumber":158,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":161,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":163,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,"},{"lineNumber":167,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */"},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":171,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,"},{"lineNumber":175,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,"},{"lineNumber":179,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":182,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,"},{"lineNumber":183,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_ADDRESS_DESC,"},{"lineNumber":187,"author":{"gitId":"-"},"content":" Address.MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,"},{"lineNumber":193,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */"},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_NO_FILE,"},{"lineNumber":197,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_TYPE,"},{"lineNumber":201,"author":{"gitId":"-"},"content":" Avatar.MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));"},{"lineNumber":206,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":207,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));"},{"lineNumber":208,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":209,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":210,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */"},{"lineNumber":213,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":214,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":216,"author":{"gitId":"-"},"content":" }"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":219,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, Person, Index)} except that"},{"lineNumber":220,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged."},{"lineNumber":221,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list"},{"lineNumber":222,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, Person, Index)"},{"lineNumber":223,"author":{"gitId":"-"},"content":" */"},{"lineNumber":224,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson) {"},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e"},{"lineNumber":230,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e"},{"lineNumber":231,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being"},{"lineNumber":232,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list."},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson,"},{"lineNumber":237,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":238,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":240,"author":{"gitId":"-"},"content":" expectedModel.updatePerson("},{"lineNumber":241,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);"},{"lineNumber":242,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":243,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {"},{"lineNumber":244,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException("},{"lineNumber":245,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }"},{"lineNumber":247,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,"},{"lineNumber":248,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);"},{"lineNumber":249,"author":{"gitId":"-"},"content":" }"},{"lineNumber":250,"author":{"gitId":"-"},"content":""},{"lineNumber":251,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":252,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the"},{"lineNumber":253,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged."},{"lineNumber":254,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":255,"author":{"gitId":"-"},"content":" */"},{"lineNumber":256,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":262,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":272,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":273,"author":{"gitId":"-"},"content":" */"},{"lineNumber":274,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":275,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":277,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":280,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":281,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":282,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":283,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":284,"author":{"gitId":"-"},"content":" }"},{"lineNumber":285,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":286,"author":{"gitId":"-"},"content":" }"},{"lineNumber":287,"author":{"gitId":"-"},"content":""},{"lineNumber":288,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":289,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":290,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":291,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":292,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":293,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":296,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":297,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":298,"author":{"gitId":"-"},"content":" */"},{"lineNumber":299,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":300,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":303,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":304,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":305,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":306,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":307,"author":{"gitId":"-"},"content":" }"},{"lineNumber":308,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":6,"-":302}},{"path":"src/test/java/systemtests/HelpCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.GuiRobot;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.HelpWindowHandle;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.ui.StatusBarFooter;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A system test class for the help window, which contains interaction with other UI components."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class HelpCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String ERROR_MESSAGE \u003d \"ATTENTION!!!! : On some computers, this test may fail when run on \""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"non-headless mode as FxRobot#clickOn(Node, MouseButton...) clicks on the wrong location. We suspect \""},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"that this is a bug with TestFX library that we are using. If this test fails, you have to run your \""},{"lineNumber":26,"author":{"gitId":"-"},"content":" + \"tests on headless mode. See UsingGradle.adoc on how to do so.\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final GuiRobot guiRobot \u003d new GuiRobot();"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void openHelpWindow() {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" //use accelerator"},{"lineNumber":33,"author":{"gitId":"-"},"content":" getCommandBox().click();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" getResultDisplay().click();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" getPersonListPanel().click();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" //use menu button"},{"lineNumber":46,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingMenu();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" //use command box"},{"lineNumber":50,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // open help window and give it focus"},{"lineNumber":54,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" // assert that while the help window is open the UI updates correctly for a command execution"},{"lineNumber":58,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertNotEquals(HelpCommand.SHOWING_HELP_MESSAGE, getResultDisplay().getText());"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" //assertNotEquals(BrowserPanel.DEFAULT_PAGE, getBrowserPanel().getLoadedUrl());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" // assert that the status bar too is updated correctly while the help window is open"},{"lineNumber":66,"author":{"gitId":"-"},"content":" // note: the select command tested above does not update the status bar"},{"lineNumber":67,"author":{"gitId":"-"},"content":" executeCommand(DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertNotEquals(StatusBarFooter.SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Asserts that the help window is open, and closes it after checking."},{"lineNumber":73,"author":{"gitId":"-"},"content":" */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" private void assertHelpWindowOpen() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertTrue(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" new HelpWindowHandle(guiRobot.getStage(HelpWindowHandle.HELP_WINDOW_TITLE)).close();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts that the help window isn\u0027t open."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private void assertHelpWindowNotOpen() {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":88}}] +[{"path":"README.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":"https://travis-ci.org/CS2103JAN2018-F14-B1/main[image:https://travis-ci.org/CS2103JAN2018-F14-B1/main.svg?branch\u003dmaster[Build Status]]","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"https://ci.appveyor.com/project/lithiumlkid/main/branch/master[image:https://ci.appveyor.com/api/projects/status/2itvfqp2b8xnaqqn/branch/master?svg\u003dtrue[Build status]]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"https://coveralls.io/github/CS2103JAN2018-F14-B1/main?branch\u003dmaster[image:https://coveralls.io/repos/github/CS2103JAN2018-F14-B1/main/badge.svg?branch\u003dmaster[Coverage Status]]","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"image:https://circleci.com/gh/CS2103JAN2018-F14-B1/main.svg?style\u003dsvg[\"CircleCI\", link\u003d\"https://circleci.com/gh/CS2103JAN2018-F14-B1/main\"]","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"https://gitter.im/se-edu/Lobby[image:https://badges.gitter.im/se-edu/Lobby.svg[Gitter chat]]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"image::docs/images/MyTeamManagerLogo.png[width\u003d\"100\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/MyTeamManagerLogo.png[width\u003d\"600\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"image::docs/images/Ui.png[width\u003d\"600\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction to MTM","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop based team managing application for football team managers. +","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"It uses a Command Line Interface (CLI).","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"MTM is equipped with multiple features in helping you efficiently","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"and effectively manage your players, while keeping track of the team\u0027s schedule. +","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"With MTM\u0027s aesthetically pleasing graphical user interface, viewing critical information will be quick and painless.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"Never lose track of your training schedule again! +","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"Say goodbye to manual tracking of information on excel sheet after excel sheet!","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"\u003d\u003d What MTM Can Do - Key Features","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"* Set up Teams","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"* Add Players to Teams","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":"* Add Player\u0027s personal details, position, rating, avatar etc.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"* View, Edit and Delete Players","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"* Sort players by field of choice","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"Come and take a look at our \u003c\u003cUserGuide#, User Guide\u003e\u003e to get started with MTM now.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"* My Team Manager is morphed from https://github.com/se-edu/addressbook-level4[AddressBook-Level4] application, a project created by SE-EDU initiative.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"_Marco Jakob_.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Libraries used: https://github.com/TomasMikula/EasyBind[EasyBind], https://github.com/TestFX/TestFX[TextFX], https://bitbucket.org/controlsfx/controlsfx/[ControlsFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/google/guava[Guava], https://github.com/junit-team/junit4[JUnit4]","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":5,"codeeong":16,"-":41}},{"path":"docs/DeveloperGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - Developer Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main/tree/master","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"By: `F14-B1`      Since: `Mar 2018`      Licence: `MIT`","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"// tag::overview[]","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a team managing application for football coaches. MTM is designed to be quick and easy for you to manage a team of players without the need of a mouse.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"This developer\u0027s guide provides information that will not only show the design principles of the project, but allow you to understand the different implementations, and give you the opportunity to get started with being a contributor or as a reference for experienced developer.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This developer\u0027s guide consist of the following sections:","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cSetting up, Setting up\u003e\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign, Design\u003e\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"* \u003c\u003cImplementation, Implementation\u003e\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"* \u003c\u003cDocumentation, Documentation\u003e\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"* \u003c\u003cTesting, Testing\u003e\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"* \u003c\u003cDev Ops, Dev Ops\u003e\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"// end::overview[]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"The following pointers teach you how to get started with developing on our application. You’ll learn how to prepare yourself with the project on IntelliJ and run it. Then, you’ll update configurations in IntelliJ to easily match the coding standards and you’ll be ready to start coding.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"But before you start, there are two fundamental prerequisites you should know about MTM:","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"MTM is written in Java 8 and with the use of an integrated development environment (IDE) such as IntelliJ, it provides you as a developer with a better environment suited for developing MTM to maintain coding standards and provide continuous integration.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". You are required to have *JDK `1.8.0_60`* or later,","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8. +","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"You can download Java 8 from link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151[here].","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":". and *IntelliJ* IDE.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them. +","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"You can download IntelliJ from link:https://www.jetbrains.com/idea/download/#section\u003dwindows[here].","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up the project on your computer","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"Before you begin setting up the project, please ensure that you’ve done the following on our GitHub repository (repo).","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Upon completion of forking from our GitHub repo, you can proceed to set up your project on IntelliJ.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":". Click `Import Project`","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":". Click `Open as Project`","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message which will generate all resources required by the application and tests.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"Now that you’ve properly setup your project, you can verify that you have done everything properly.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":". \u003c\u003cTesting,Run the tests\u003e\u003e to ensure they all pass.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"You have verified the setup and you’re all ready to dive into the code, but before you do, check out the following configurations that will help you make your coding more integrated and accurate.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.adoc[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `se-edu/addressbook-level4` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `se-edu/addressbook-level4`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"After setting up Travis, you can optionally set up coverage reporting for your team fork (see \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"Coverage reporting could be useful for a team repository that hosts the final version but it is not that useful for your personal fork.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Getting started with coding","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"When you are ready to start coding,","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading \u003c\u003cDesign-Architecture\u003e\u003e.","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"2. Dive right in and get started with programming.","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"\u003d\u003d Design","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"After you have successfully configured MTM, you are encouraged to read through the following section to understand the design of the software. The design section covers a high level overview the architecture and components of the software, as well as how common classes, configuration and logging throughout development are being used.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"[[Design-Architecture]]","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Software Architecture","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"The *_Architecture Diagram_* given below (Figure 1) explains the high-level design of the App.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":".Architecture Diagram","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"Given below is a quick overview of each component.","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"\u003c\u003cDesign-Commons,*`Commons`*\u003e\u003e represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Ui,*`UI`*\u003e\u003e: The UI of the App.","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Logic,*`Logic`*\u003e\u003e: The command executor.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Model,*`Model`*\u003e\u003e: Holds the data of the App in-memory.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Storage,*`Storage`*\u003e\u003e: Reads data from, and writes data to, the hard disk.","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"Each of the four components","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":".Class Diagram of the Logic Component","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 1)","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 2)","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"[[Design-Ui]]","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":"The UI Component contains a MainWindow that consists of various parts e.g. CommandBox, ResultDisplayer, TeamDetails, PersonListPanel, PlayerDetails etc. The UI classes are all child classes of the abstract UiPart class.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"lithiumlkid"},"content":"The structure of the UI component is shown in the figure below:","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":".Structure of the UI Component","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `PlayerDetails` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `UI` component,","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"[[Design-Logic]]","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"lithiumlkid"},"content":"The Logic Component handles how each command would be parsed and executed. The class diagrams below illustrates the structure of the Logic Component and the structure of each individual commands.","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"[[fig-LogicClassDiagram]]","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":".Structure of the Logic Component","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":".Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in \u003c\u003cfig-LogicClassDiagram\u003e\u003e","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"*API* :","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":".Interactions Inside the Logic Component for the `delete 1` Command","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"[[Design-Model]]","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"lithiumlkid"},"content":"The Model Component handles the players and teams data structures in My Team Manager. These structures also provide APIs to create, read, update and delete the details of these objects. The class diagram below shows the structure of the Model Component.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":".Structure of the Model Component","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"The `Model`,","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"* stores the Address Book data.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"[[Design-Storage]]","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"lithiumlkid"},"content":"Any changes made to the data is retained and handled by the Storage Component. The structure of this component is shown in Figure 10 below.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":".Structure of the Storage Component","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"The `Storage` component,","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"[[Design-Commons]]","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"lithiumlkid"},"content":"All classes used by the different components can be found in the `seedu.addressbook.commons` package.","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"// tag::logging[]","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"lithiumlkid"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See \u003c\u003cConfiguration,Configuration\u003e\u003e)","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"*Logging Levels*","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"[[Implementation-Configuration]]","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"// end::logging[]","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Pre-existing","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undo/Redo feature","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":".Logic Class Diagram","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" // ... list logic ...","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" // ... undo logic ...","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" executeUndoableCommand();","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" // ... delete logic ...","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 1)","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 1)","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 2)","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Sequence Diagram","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 2)","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 3)","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Activity Diagram","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"650\"]","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `UndoableCommand`","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()`.","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"** Pros: We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist.","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"** Cons: Hard for new developers to understand the template pattern.","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"* **Alternative 2:** Just override `execute()`.","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"** Pros: Does not involve the template pattern, easier for new developers to understand.","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"** Cons: Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How undo \u0026 redo executes","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Saves the entire address book.","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"** Pros: Easy to implement.","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":"** Cons: May have performance issues in terms of memory usage.","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"* **Alternative 2:** Individual command knows how to undo/redo by itself.","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"** Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"** Cons: We must ensure that the implementation of each individual command are correct.","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Type of commands that can be undone/redone","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`).","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"** Pros: We only revert changes that are hard to change back (the view can easily be re-modified as no data are * lost).","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"** Cons: User might think that undo also applies when the list is modified (undoing filtering for example), * only to realize that it does not do that, after executing `undo`.","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"* **Alternative 2:** Include all commands.","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"** Pros: Might be more intuitive for the user.","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"** Cons: User have no way of skipping such commands if he or she just want to reset the state of the address * book and not the view.","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Additional Info:** See our discussion https://github.com/se-edu/addressbook-level4/issues/390#issuecomment-298936672[here].","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Aspect: Data structure to support the undo/redo commands","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Use separate stack for undo and redo.","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"** Pros: Easy to understand for new Computer Science student undergraduates to understand, who are likely to be * the new incoming developers of our project.","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"** Cons: Logic is duplicated twice. For example, when a new command is executed, we must remember to update * both `HistoryManager` and `UndoRedoStack`.","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"* **Alternative 2:** Use `HistoryManager` for undo/redo.","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"** Pros: We do not need to maintain a separate stack, and just reuse what is already in the codebase.","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"** Cons: Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two * different things.","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Player-Related Enhancements","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"lithiumlkid"},"content":"// tag::player[]","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Player Component `[since v1.3]`","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"lithiumlkid"},"content":"`Player` is one of the core components of MTM. To implement it, we used the same `Person` object and added additional attributes to it. Shown below is the","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"lithiumlkid"},"content":"new constructor for the Person object followed by the class diagram.","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"lithiumlkid"},"content":"public Person(Name name, Phone phone, Email email, Address address, Remark remark, TeamName teamName,","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"lithiumlkid"},"content":" Set\u003cTag\u003e tags, Rating rating, Position position, JerseyNumber jerseyNumber, Avatar avatar) {","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"lithiumlkid"},"content":" ...","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"lithiumlkid"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"lithiumlkid"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"lithiumlkid"},"content":" this.rating \u003d rating;","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"lithiumlkid"},"content":" this.position \u003d position;","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"lithiumlkid"},"content":" this.jerseyNumber \u003d jerseyNumber;","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"lithiumlkid"},"content":" this.avatar \u003d avatar;","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"lithiumlkid"},"content":".Person Class Diagram","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"lithiumlkid"},"content":"image::PlayerClassDiagram.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"lithiumlkid"},"content":"The additional attributes are: \u003c\u003cteam,teamName\u003e\u003e, \u003c\u003cremark,Remark\u003e\u003e, \u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e.","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"lithiumlkid"},"content":"The add and edit command has also been updated to include \u003c\u003cteam,teamName\u003e\u003e,\u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e.","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"lithiumlkid"},"content":"One thing to note is that in `executeUndoableCommand()`","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"lithiumlkid"},"content":"in both add and edit commands now does two additional things, setting the file path for players avatar, and assigning a player to a team","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"lithiumlkid"},"content":"and adding person to current filtered list. Shown below is the code snippet of the new `executeUndoableCommand()` and sequence diagram","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"lithiumlkid"},"content":"of the new add command as an example.","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"lithiumlkid"},"content":"[[AddSequence]]","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"lithiumlkid"},"content":" @Override","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"lithiumlkid"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"lithiumlkid"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"lithiumlkid"},"content":" try {","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"lithiumlkid"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"lithiumlkid"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"lithiumlkid"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"lithiumlkid"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"lithiumlkid"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"lithiumlkid"},"content":" } else { ...","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"lithiumlkid"},"content":".Add Sequence Diagram","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"lithiumlkid"},"content":"image::AddSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"lithiumlkid"},"content":"[[rating]]","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Rating Class","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"lithiumlkid"},"content":"The `Rating` class contains a `String value`. `value` holds the players rating, an integer from 0 to 5. It uses a validation regex `[0-5]`","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"lithiumlkid"},"content":"to ensure valid input.","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Rating` is `ra/`","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"lithiumlkid"},"content":"[[position]]","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Position Class","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"lithiumlkid"},"content":"The`Position` class contains a `String value`. `value` here holds the players position, an integer from 1 to 4. It uses a validation regex `[1-4]` to ensure valid input.","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `po/`.","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"lithiumlkid"},"content":"A static hashmap is used to store and retrieve the corresponding position names of the position values. The position name can be called using the method `getPositionName()` which returns `myMap.get(value)`.","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for the `hashmap` and `getPositionName()` is shown below.","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"lithiumlkid"},"content":"private static final Map\u003cString, String\u003e myMap;","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"lithiumlkid"},"content":"static {","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"lithiumlkid"},"content":" Map\u003cString, String\u003e aMap \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"1\", \"Striker\");","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"2\", \"Midfielder\");","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"3\", \"Defender\");","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"4\", \"Goalkeeper\");","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"lithiumlkid"},"content":" myMap \u003d Collections.unmodifiableMap(aMap);","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"lithiumlkid"},"content":"}","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"lithiumlkid"},"content":"public String getPositionName() {","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"lithiumlkid"},"content":" return myMap.get(value);","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"lithiumlkid"},"content":"}","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"lithiumlkid"},"content":"[[jersey]]","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d JerseyNumber Class","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"lithiumlkid"},"content":"The`JerseyNumber` class contains a `String value`. `value` here holds the players jersey number, an integer from 0 to 99. It uses a validation regex `[0-9]|[1-8][0-9]|9[0-9]` to ensure valid input.","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `j/`.","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"lithiumlkid"},"content":"[[avatar]]","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Avatar Class","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"lithiumlkid"},"content":"The`Avatar` class contains a `String value`. `value` here holds the absolute filepath to the players avatar image file, a png of jpeg file. It uses a validation regex `([^\\s]+(\\.(?i)(jpg|png))$)` to ensure valid input.","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Avatar` is `av/`.","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"lithiumlkid"},"content":"When the class is created, the `value` stores the original location of the players avatar image file eg. `C:\\image.png` or if not specified, stores \"\u003cUNSPECIFIED\u003e\".","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"lithiumlkid"},"content":"Thereafter, if the avatar is specified when \u003c\u003cAddSequence,adding\u003e\u003e or editing a player, `setFilePath()` is called which will attempt to copy the image file to a `/image` folder that is in the same directory as the `MTM.jar` file.","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"lithiumlkid"},"content":"`value` is then updated to the new file path.","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for setFilePath() is shown below.","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"lithiumlkid"},"content":"public void setFilePath(String player) throws IOException {","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"lithiumlkid"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"lithiumlkid"},"content":" return;","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"lithiumlkid"},"content":" final File file \u003d new File(value);","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"lithiumlkid"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"lithiumlkid"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"lithiumlkid"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"lithiumlkid"},"content":" this.value \u003d dest.toString();","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"lithiumlkid"},"content":"// end::player[]","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"// tag::remark[]","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Remark a Player `[since v1.1]`","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"Leaving a remark would be ideal for the user to note down any important detail of a player that is useful in the future.","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"-"},"content":"Remarks given can be in any format and therefore would not look good if it was done using tags instead, as tags are used with minimal words.","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"-"},"content":"The remark mechanism is facilitated by `RemarkCommand` and it inherits from `UndoableCommand`, making it undoable. The mechanism allows user to perform the adding, editing, and deleting of a single remark to a specified `Person` via the `INDEX` from the list shown in the `UI`. The field `remark` is similar to the other fields of `Person`, hence some of its logic in `AddCommand.java` and `EditCommand.java` are updated.","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"The mechanism uses the command `remark` and a `r/` prefix to add, edit, and delete a single remark of a `Person`. When the user leaves the remark as empty after the `r/` prefix, it is an indication to delete the remark, and when it is valid, it either create a new remark for that `Person` or overwrites the current existing remark. Only one `remark` is saved at a time. If the user `remark` on the same person, it will be overwritten.","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"-"},"content":"The field `remark` is found in `Person`, and it is not modified via `add` or `edit` commands. All functions related to `remark` is done strictly via the `remark` command.","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remark` command:","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":".Remark Activity Diagram","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::RemarkActivityDiagram.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"The `remark` field is not required when adding or editing a `Person`, and it will be initialized to an empty string or retrieved to fit the implementation of the other fields.","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows how remark is initialized as empty.","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"-"},"content":" //...AddCommandParser code...","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"-"},"content":" Remark remark \u003d new Remark(\"\");","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":" Person person \u003d new Person(name, phone, email, address, remark, teamName, tagList, rating,","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":" position, jerseyNumber, avatar);","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":" //...AddCommandParser code...","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"lithiumlkid"},"content":"}","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"-"},"content":"Code snippet from `EditCommand.java` that shows how remark is being retrieved.","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"private static Person createEditedPerson(Person personToEdit,","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":" //...EditCommand code...","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate()) ? personToEdit.getRemark()","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":" : personToEdit.getRemark();","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber,","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":" updatedAvatar);","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` field","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Creates an additional `remark` field in `Person`.","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"** Pros: Follows the existing style of similar fields, making implementation easier.","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"** Cons: Could only have 1 remark per person, unless `remark` mechanism follows the `tag` mechanism to have multiple remarks.","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"* **Alternative 2:** Have a list of remarks that associates with the specified `Person`.","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"** Pros: Can have multiple remarks associating with a specific `Person`.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"** Cons: Harder to maintain, more complicated.","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` command","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Create a specific command for remarking `Person`.","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"** Pros: Optional for user to enter remark during add, and have an isolated command to give remarks to a player that works as an add and edit command for remark.","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"** Cons: Increases the number of commands available for the user, and could mistaken that remark can be done using add/edit command.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make it similar to how other fields are implemented in `Person`.","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"** Pros: Quick and easy implementation as it uses the same format as other fields, and can be added and modified through `add` and `edit` commands.","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"** Cons: An additional field that can be input when adding a player, making the process longer to execute the command.","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"// end::remark[]","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"// tag::privatefield[]","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Setting various player fields to private `[since v1.4]`","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"lohtianwei"},"content":"`Phone`, `Email`, `Remark`, `Rating` and `Address` of a player has an additional boolean attribute","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"lohtianwei"},"content":"`isPrivate` which tracks the privacy of the particular field. When a player is added into MTM, `isPrivate` of these","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"lohtianwei"},"content":"fields are set to \u0027false\u0027 by default.","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"lohtianwei"},"content":"Each of these fields have a different `toString` method which would return `\u003cPrivate \u0027FIELD\u0027\u003e` if privacy of","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"lohtianwei"},"content":"the field is set to \u0027true\u0027, as shown in the following code snippet:","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"lohtianwei"},"content":"@Override","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"lohtianwei"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"lohtianwei"},"content":" return value;","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"lohtianwei"},"content":"`XmlAdaptedPerson` under the storage portion has been edited to save the `isPrivate` value for the fields:","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"lohtianwei"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"lohtianwei"},"content":" private Boolean phonePrivacy;","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"lohtianwei"},"content":"Toggling of privacy works in a similar way to `Edit`. New fields will be created with privacy settings of `EditPersonPrivacy`","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"lohtianwei"},"content":" based on user input. This is done by first detecting if a particular prefix is present when command is","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"lohtianwei"},"content":"entered in `TogglePrivacyCommandParser`:","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"lohtianwei"},"content":"if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"lohtianwei"},"content":"If prefix of a field is not present, the privacy setting of that particular field in `EditPersonPrivacy` would be null.","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"lohtianwei"},"content":"In `TogglePrivacyCommand`, the new fields are created with this:","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"lohtianwei"},"content":"private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"lohtianwei"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"lohtianwei"},"content":" return phone;","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"lohtianwei"},"content":"Note that in the second portion of the code, if `epp.getPrivatePhone()` is null, this would mean that it\u0027s privacy","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"lohtianwei"},"content":"setting was not toggled and thus is set to the same as it was before. Else, it would be toggled:","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"lohtianwei"},"content":"public void togglePrivacy() {","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"lohtianwei"},"content":"A new person object is then created:","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"lohtianwei"},"content":"private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"lohtianwei"},"content":"and is used to update current person:","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"lohtianwei"},"content":"model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How field privacy is implemented","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Boolean `isPrivate` added to field classes.","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"lohtianwei"},"content":"** Pros: Privacy settings can be obtained straight from class by calling getter method.","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"lohtianwei"},"content":"** Cons: Adddtional methods are needed to set and get value of `isPrivate`.","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Field privacy settings stored in `Person` in a HashMap.","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"lohtianwei"},"content":"** Pros: Field privacy can be accessed and modified easily","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"lohtianwei"},"content":"** Cons: `Person` has to be accessed every time field privacy needs to be checked","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Privacy of fields upon adding of player","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** All newly added players\u0027 fields are not private by default.","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"lohtianwei"},"content":"** Pros: `Add` command does not need to be tweaked to allow adding player with private fields.","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"lohtianwei"},"content":"** Cons: After adding players, user has to do additional command to toggle privacy of fields.","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Include implementation of prefixes that denotes private field during `Add`.","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"lohtianwei"},"content":"** Pros: Newly added players can have private fields right away.","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"lohtianwei"},"content":"** Cons: Addtional changes has to be made to `Add` command.","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"// end::privatefield[]","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Sorting players by fields `[since v1.2]`","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"lohtianwei"},"content":"The `sort` command is currently able to sort players by name, email, address, rating, jersey and postition in either ascending or descending order. Support for more fields will be added in subsequent updates.","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"lohtianwei"},"content":"* The `sort` command is parsed through `SortCommandParser` which hands control to the `SortCommand` class.","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"lohtianwei"},"content":"* Java Collections Sort API is used together with a custom `Comparator` in this implementation","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"lohtianwei"},"content":"Sorting is facilitated by the `SortCommand` which uses method `sortPlayers` to ultimately call method `sortBy` in UniquePersonList for the actual sorting as shown in this code snippet:","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"lohtianwei"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"lohtianwei"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"lohtianwei"},"content":" //... code for other switch cases...","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"lohtianwei"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"lohtianwei"},"content":"The code above utilises a custom `Comparator` defined in the sample code below:","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"lohtianwei"},"content":"The following sequence diagram shows the program flow when `sort` is used:","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":".Sort Sequence Diagram","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"lohtianwei"},"content":"image::sortSeq.png[width\u003d\"900\"]","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"lohtianwei"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"lohtianwei"},"content":"If address book is empty, a `NoPlayerException` will be thrown by `sortBy` method in UniquePlayerList.","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `sort`","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sorting is done in `UniquePersonList`.","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"lohtianwei"},"content":"** Pros: Sorting methods resides in class that handles most operations done to list. Future changes to implementation would be easier.","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":"** Cons: Complicated flow of control passed between classes.","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sorting is done in `SortCommand`.","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":"** Pros: Easier to trace flow of control as lesser passing between classes.","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":"** Cons: Unnecessary coupling if `UniquePersonList` has to rely on `SortCommand`.","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort by multiple fields","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sort can only be done by 1 field.","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and input is straightforward.","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"** Cons: Unable to fine tune to great detail how teams are sorted and displayed.","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sort can be done by multiple fields.","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":"** Pros: Able to fine tune to great detail how teams are sorted and displayed.","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":"** Cons: Unnecessary as team managers would not need to sort players by multiple fields.","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort Persistence","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Address book is saved after sorting.","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"lohtianwei"},"content":"** Pros: Easy to implement. Allows team managers to use preferred sort pattern in every session.","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"lohtianwei"},"content":"** Cons: Previous order of players will be lost.","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Address book is not saved after sorting.","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"** Pros: Good if team manager wants to sort players for current session only.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"lohtianwei"},"content":"** Cons: Sort order is lost when program exits. More memory is used to sort a list and reverse it after.","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Team-Related Enhancements","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"// tag::team[]","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"lithiumlkid"},"content":"[[team]]","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Component `[since v1.2]`","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":"One of the core components to MTM is `Team`, and it is the base to creating more commands for the user to access capability on team management. The `Team` component provides user with better organizational methods for organizing their players and interact with multiple teams to manage them effectively.","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"We achieved the implementation of `Team` component by introducing a `UniqueTeamList` into the application which consists of a list of `Team` objects. `UniqueTeamList` is similar in context to `UniquePersonList` in which it keeps a unique list of all the `Team` objects. `Team` objects consist of `TeamName` object, which is used to uniquely identify the team. `Team` inherits `UniquePersonList` object which stores the a list of unique `Person` objects, containing information of the player.","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":"The class diagrams below shoes the relationship between the related classes. The Team Class Diagrams are an extension to the current existing Designs of \u003c\u003cDesign-Model, `Model`\u003e\u003e, \u003c\u003cDesign-Storage, `Storage`\u003e\u003e, and \u003c\u003cDesign-Ui, `UI`\u003e\u003e.","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":".Model Component: Team Class Diagram","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"image::TeamModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":".Storage Component: Team Class Diagram","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"image::TeamStorageClassDiagram.png[width\u003d\"400\"]","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":".UI Component: Team Class Diagram","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"image::TeamUiClassDiagram.png[width\u003d\"400\"]","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"Code snippet from `Team.java` that shows the constructor for `Team`.","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"public class Team {","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":" private final TeamName teamName;","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":" public Team(TeamName teamName) {","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"For the application to store the information of `Team` into a list, we will need to introduce a new `UniqueTeamList` variable into the `AddressBook.java`, so that it will have a container for all the new `Team` objects that is going to be created in MTM.","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the declaration and initialization of `UniqueTeamList`.","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":" //...AddressBook code...","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList;","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":" return teams.asObservableList();","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":" //...AddressBook code...","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"Since `Team` inherits the `UniquePersonList` class, we are able to store `Person` object into `Team` by using the super class method `add` in `UniquePersonList`. By storing a list of players inside `Team` object, future enhancements can easily make use of the data to perform functions that requires quick access to all players in a team. However, this have created a coupling in which data made to the `changes made to `AddressBook.persons` needs to be updated in `Team` to maintain synchronicity.","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the propagation of details updated in `Person` from the full player list to the `Person` objects in `Team`.","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"-"},"content":" //...syncEditedPerson initialisation...","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"An additional `TeamName` field is also added to `Person` so that the user can quickly determine the team the player is in through the use of `PREDICATE`.","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"Code snippet from `Person.java` that shows the `TeamName` field.","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"public class Person {","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":" private final TeamName teamName;","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":" public Person(Name name, Phone phone, Email email, Address address, Remark remark,","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":" TeamName teamName, Set\u003cTag\u003e tags, Rating rating, Position position,","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":" JerseyNumber jerseyNumber, Avatar avatar) {","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":" //...attributes initialisation...","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":" public TeamName getTeamName() {","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":" return teamName;","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":"Code snippet from `ModelManager.java` that shows the use of filtering the person list using the `TeamName` field in `Person`.","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"@Override","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"Additional exception classes are also created so that these new exceptions can be thrown during the program, such that when these exceptions are thrown, the code is easily comprehensible.","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":".`TeamNotFoundException.java`","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"public class TeamNotFoundException extends Exception {","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":" //...TeamNotFoundException...","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":".`DupliecateTeamException.java`","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"public class DuplicateTeamException extends DuplicateDataException {","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":" //...DuplicateTeamException...","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"-"},"content":"Implementing a new component into MTM, the data consisting of `Team` is also stored into storage using `XmlAdaptedTeam.java` to format the output.","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"Code snippet from `XmlAdaptedTeam.java` that shows the elements that will be stored into storage.","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":"public class XmlAdaptedTeam {","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":" private String teamName;","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Team`","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `Team` object stores a `Person` object that is also in `UniquePersonList` and `TeamName` is also an attribute of `Person`.","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"** Pros: Provides an easier lookup of person belonging in which team without the need of iterating through the `UniqueTeamList` for a specific `Person`, and provide ease of access to data for future enhancements.","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"** Cons: Checks to ensure synchronicity need to be done thoroughly to ensure that player information is in sync between Team and full player list","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"* **Alternative 2:** `Team` object is stored in `Person` object as an attribute.","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"-"},"content":"** Pros: Logical thought process to include `Team` as an attribute.","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"-"},"content":"** Cons: Excess storage wasted due to duplicated data of `Team` in every `Person`.","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"-"},"content":"// end::team[]","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"-"},"content":"// tag::teamfunction[]","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Functions `[since v1.4]`","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"To assist the user with manging teams, we have decided to use the design concept of Create-Read-Update-Delete (CRUD) to implement commands related to `Team`.","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"-"},"content":"This set of commands provide the basic necessities for the user to efficiently use our application.","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Based on the principles of CRUD, we have created the commands that corresponds to each principles, namely, `create`, `view`, `rename` and `assign`, `remove`.","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"-"},"content":"With these commands, the application is ready to support the features that the application is designed to be used.","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"-"},"content":"Team-related commands that modifies the data in the application, such as `create`, `rename`, `assign`, and `remove`, inherits from `UndoableCommand` class which makes all these commands undoable. Each command has its own `Parser` to uniquely parse user input arguments for the commands, so that it is validated and the command understand what it should be doing.","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"-"},"content":"For each feature, new functions are created in `AddressBook.java` and `ModelManager.java` so that the commands executed are able to manipulate the data accordingly.","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `create`: Creates a `Team`, so that other team-related commands can be executed.","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"-"},"content":"After the creation of a new team, the user will then be able to perform a new set of commands that performs team management functionality. Moreover, the `add` command can be used with the prefix `tm/` to immediately add the user into MTM and into the team specified.","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `create` command:","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":".Logic Component: Create Sequence Diagram","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram1.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"-"},"content":".Model Component: Create Sequence Diagram","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram2.png[width\u003d\"70%\"]","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `view`: Views a `Team`, which shows all players in the team.","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"The command uses the `filteredPersons` list, and an overloaded `updateFilteredPersonList` method that sets a predicate that filters the list based on a `TeamName`, in `ModelManager.java` so that it can be displayed via the UI.","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `view` command:","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":".View Sequence Diagram","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"image::TeamViewSequenceDiagram.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `rename`: Renames a given `Team`.","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":"The user can rename a specified team to a new team name only if the current team name does not existing in MTM. On a side note, it prevents the user from renaming the team to the same name that it currently have.","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"This command will update the name of the teams that are in `teams` in `AddressBook.java` and will update all the players `TeamName` field in `persons` and `Team` with the new team name.","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `rename` command:","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"-"},"content":".Logic Component: Rename Sequence Diagram","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram1.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":".Model Component: Rename Sequence Diagram","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram2.png[width\u003d\"70%\"]","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `assign`: Assign a set of `Person` to a specified `Team`.","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"The core feature that organizes the player into teams so that the user can easily view the desired team players quickly. The command have 2 functions, firstly it is able to assign an individual or a set of players to a specified team, and secondly, it is able to unassign an individual or a set of players from any team.","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"The command takes in a set of indexes that corresponds to the player in the current list, and will perform the assign operation in ascending index order. If the command is unable to process an index given, it will process all the valid index until the index that causes an issue.","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Typical issues that the command handles are,","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"* Assigning a player to the same team that it is currently in.","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":"* Assigning a player to team that does not exist.","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"* Unassigning a player that does not exist in any team.","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"* Process index starting from 1.","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"* Removes all index that exceeds the current number of player listed.","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"This command will update and synchronise all affected players in `persons` and in the specified `Team` object, such that their `TeamName` field in `Person` are updated with the new assigned or unassigned team. At the same time, the list of players in `Team` gets update if new player are assigned or unassigned.","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `assign` command:","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":".Assign Sequence Diagram","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"image::TeamAssignSequenceDiagram.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `remove`: Removes the given `Team`.","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":"The final step in completing the CRUD design is the removal of team. It will delete the `Team` from `teams` list in `AddressBook.java` and will update all affected players in the team to be unassigned from the team by having their `TeamName` field updated with an unspecifed field.","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remove` command:","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":".Logic Component: Remove Sequence Diagram","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram1.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":".Model Component: Remove Sequence Diagram","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram2.png[width\u003d\"70%\"]","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Team Functions","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Uses CRUD design concept to create new commands.","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"** Pros: Systematic approach in dealing with what functions should be created to ensure that the product has the features required to perform team management, and provides a platform to work on ideal features that target the needs of the audience.","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"-"},"content":"** Cons: Simple and only captures the basic requirements of the product.","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"-"},"content":"* **Alternative 2:** Implement commands based on suggested features.","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"** Pros: End product will have features that targets the need of the audiences.","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"** Cons: Possible to miss out basic and core features of a team management application.","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Undoable commands for Team Functions","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Make all functions that modifies data to be undoable.","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"** Pros: Follows the current implementation of `undo` such that if data are modified in MTM, it will be an undoable command.","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"-"},"content":"** Cons: Need to ensure that regression bugs are squashed when the new commands are executed, and time consuming in identifying regression.","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make all functions not undoable.","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and will produce lesser regression bugs.","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"-"},"content":"** Cons: Does not align with the current implementation of `undo` \u0026 `redo`, and the user would require more steps to revert any changes made.","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"// end::teamfunction[]","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"-"},"content":"// tag::showbestxi[]","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Show Best XI `[coming in v2.0]`","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"lohtianwei"},"content":"The `showBest` command is able to show the current team\u0027s best 11 players. There is however no functional implementation for this feature yet. Coming soon!","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"-"},"content":"// end::showbestxi[]","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Usability Enhancements","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"-"},"content":"// tag::key[]","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Toggle lock on MTM `[since v1.5]`","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"-"},"content":"Locking mechanism of MTM can be toggled on and off using the `Key` command. It utilises the Model to access","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"-"},"content":"user preferences of MTM. Current lock state and password is stored in `UserPrefs` in the Storage component.","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"lohtianwei"},"content":"This activity diagram shows the logic behind the `Key` command:","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"lohtianwei"},"content":".Key Activity Diagram","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"lohtianwei"},"content":"image::Keyactdiag.png[width\u003d\"900\"]","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"-"},"content":"Password checking done in `Key` command:","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"-"},"content":"private boolean correctPassword() {","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"-"},"content":" UserPrefs up \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"-"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"-"},"content":" return hash.equals(up.getAddressBookHashedPass());","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"-"},"content":"When password check is done, the lock on MTM is toggled to the state opposite of the current:","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"-"},"content":"if (correctPassword()) {","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"-"},"content":" if (model.getLockState()) {","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"-"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"-"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"-"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"-"},"content":"In a locked state, only certain functions of MTM can be used. This is to prevent unauthorised tampering with the details","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"-"},"content":"stored on MTM.","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"-"},"content":"This is done in `AddressBookParser`. Commands are split into low level or not. When a command is","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"-"},"content":"being executed, it is checked if it falls under the low level category. If so, it would execute. When adding new features,","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"-"},"content":"add them to this list should you feel it is \u0027low level\u0027:","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"-"},"content":"private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"-"},"content":" switch(commandWord) {","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"-"},"content":" return new ChangeThemeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"-"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"-"},"content":" return new KeyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"-"},"content":" return new ViewCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"-"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"-"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"-"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"-"},"content":"If command being executed does not fall into the category of \u0027low level\u0027, a check on the lock state of MTM is done","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"-"},"content":"before allowing or restricting access:","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"-"},"content":"if (lockState) {","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_RESTRICTED);","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of locking MTM","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Lock is toggled with only a single command `Key`.","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"-"},"content":"** Pros: Easy to implement, just check current lock state and switch it.","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"-"},"content":"** Cons: With a toggle, user might unlock MTM thinking he/she is locking it.","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"-"},"content":"* **Alternative 2:** Locking and unlocking of MTM is done with two separate commands.","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"-"},"content":"** Pros: Ensures that when a lock is done, MTM is truly locked.","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"-"},"content":"** Cons: Addtional command needs to be created, along with its command parser and implementations.","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"-"},"content":"// end::key[]","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"-"},"content":"// tag::changepass[]","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change Password `[coming in v2.0]`","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"-"},"content":"Default password used for toggling lock on MTM is currently \u0027ilikesports\u0027. In an upcoming update, user would be able","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"-"},"content":"to change this password to one of his choosing. There is currently no functional implementation for this feature yet.","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"Coming soon!","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"-"},"content":"// end::changepass[]","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d User Experience Enhancements","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"-"},"content":"// tag::autocomplete[]","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Tab Autocomplete","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"-"},"content":"The tab autocomplete feature works by handling the Tab key pressed event, searching for any commands with matching prefix and returns one if found.","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"The command strings are stored in a Trie data structure, named `CommandTrie`, for optimal search.","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"public class CommandTrie {","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"-"},"content":" String attemptAutoComplete (String input);","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":" void insert (String input);","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":" Set\u003cString\u003e getCommandSet();","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"-"},"content":"The trie is made up of `TrieNode` objects which contains three objects. The `TrieNode sibling` represents a character on the same level as the current one. The `TrieNode child` represents a next possible letter.","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"-"},"content":"For example in the words `edit` and `exit`, the node for `d` would have a child `i` and a sibling `x`. `x` would have a child `i`.","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"-"},"content":"public class TrieNode {","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"-"},"content":" private TrieNode sibling;","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"-"},"content":" private TrieNode child;","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"-"},"content":" private char key;","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"-"},"content":" ...","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"-"},"content":"Upon the pressing of the tab key, the command box calls `attemptAutoComplete`, in the `commandTrie` class. With the content of the command box as the query, attemptAutoComplete searches for the query using the standard Trie search algortihm.","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"-"},"content":"If the query prefix itself is not present in the trie, then the attempt fails. If the query reaches a `TrieNode` with a `sibling` or `child` `TrieNode`,","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"-"},"content":"it will provide the user with possible commands for a given input. In this case, a dropdown box will appear in the UI that lists the possible commands for the user.","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"-"},"content":"Upon finding a matching command, `attemptAutoComplete` returns it and replaces the text in the Command Line. If the no matching command is found, the text is turned red.","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"-"},"content":"// end::autocomplete[]","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"-"},"content":"// tag::enhancedadd[]","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Optional Field Add Command `[since v1.1]`","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"-"},"content":"MTM is designed to manage a multitude of players and the main function that would be used repetitively is the `add` command, hence it would alleviate the cumbersomeness of entering every detail of the players when you want the command to be executed quickly.","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"-"},"content":"Having the option to only entering the mandatory fields and leaving the optional ones empty will make the process of adding players more efficient.","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"-"},"content":"This mechanism enhances the original implementation of the `add` command.","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"-"},"content":"The required fields that are mandatory to be filled by the user are `n/NAME` and `e/EMAIL`.","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"-"},"content":"This implementation of making fields optional for `AddCommand` allows user to add players without their full information, and can be updated accordingly when the user retrieves their full information.","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"-"},"content":"Code snippet from `ParserUtil.java` that shows the implementation of when a field is left empty.","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"-"},"content":"\"\u003cUNSPECIFIED\u003e\" string will be return when the value passed in is empty.","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"-"},"content":"public class ParserUtil {","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"-"},"content":" public static final String UNSPECIFIED_FIELD \u003d \"\u003cUNSPECIFIED\u003e\";","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"-"},"content":" //...ParserUtil code...","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"-"},"content":" public static Optional\u003cString\u003e parseValue(Optional\u003cString\u003e value, String messageConstraints)","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"-"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"-"},"content":" if (value.isPresent() \u0026\u0026 value.get().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"-"},"content":" throw new IllegalValueException(messageConstraints);","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"-"},"content":" return Optional.of(value.orElse(UNSPECIFIED_FIELD));","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"-"},"content":" //...ParserUtil code ...","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows the usage of parsing fields that are set as optional.","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"-"},"content":" //...tokenize arguments...","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"-"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_EMAIL)","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"-"},"content":" || !argMultimap.getPreamble().isEmpty()) {","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"-"},"content":" AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"-"},"content":" //...get person details from arguments...","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"-"},"content":" Address address \u003d ParserUtil.parseAddress(ParserUtil.parseValue(argMultimap","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"-"},"content":" .getValue(PREFIX_ADDRESS), Address.MESSAGE_ADDRESS_CONSTRAINTS)).get();","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"-"},"content":" return new AddCommand(person);","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"-"},"content":" //...AddCommandParser code...","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"-"},"content":"Code snippet from `Address.java` that shows an example of an optional field being valid when not specified.","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"-"},"content":" //...Address code...","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Optional fields","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Set a default value for unspecified fields and parse fields that are mandatory.","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"-"},"content":"** Pros: Easy to implement as fields are still filled with information even though user did not specify.","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"-"},"content":"** Cons: Unattractive display of fields when it is unspecified.","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"-"},"content":"* **Alternative 2:** Require users to input all fields.","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"-"},"content":"** Pros: The current implementation is used, hence there is no additional code to ensure validity of unspecified input.","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"-"},"content":"** Cons: Less flexibility is given to the user when adding a player into the application.","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"-"},"content":"// end::enhancedadd[]","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI Enhancements","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"-"},"content":"// tag::teamDisplay[]","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Team Display Bar `[since v1.3]`","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"codeeong"},"content":"The Team Display Bar is implemented as `TeamDisplay` in the UI Component and renders `TeamDisplay.fxml`.","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"codeeong"},"content":"It is called from `MainWindow` and highlights","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"codeeong"},"content":"the current team that has been selected in the Command Line Interface by the user. +","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"codeeong"},"content":"It calls the `Team` model and displays the `Player` cards associated with that `Team`.","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"codeeong"},"content":"It contains event handler methods such as handleShowNewTeamEvent(), handleHighlightSelectedTeamEvent(),","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"codeeong"},"content":"and handleDeselectTeamEvent(), which update the UI accordingly. +","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `TeamDisplay` below, using the example of a `create` command:","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"codeeong"},"content":".Component interactions for `create Team` command","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"codeeong"},"content":"image::ShowNewTeamDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027TeamDisplay\u0027 to show initialisation of UI component and event handlers:","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"-"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"-"},"content":" public TeamDisplay() {","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"codeeong"},"content":" //...initialise Teams code...","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"codeeong"},"content":" //...handleShowNewTeamEvent code...","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"codeeong"},"content":" //...handleHighlightSelectedTeamEvent code...","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"codeeong"},"content":" //...handleDeselectTeamEvent code...","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `TeamDisplay` is placed underneath the `ResultDisplay` and above the `PersonListPanel`.","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"-"},"content":"** Pros: Located at an obvious location for the user to view the team currently selected.","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"-"},"content":"** Cons: There will be less space for the `ResultDisplay` and `CommandBox`.","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"-"},"content":"* **Alternative 2:** `TeamDisplay` is placed on the left of the `PersonListPanel` as a vertical bar.","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"-"},"content":"** Pros: There will be more space for the `ResultDisplay` and `CommandBox`.","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"-"},"content":"** Cons: It is less obvious to the user as it is at the side.","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"-"},"content":"// end::teamDisplay[]","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"-"},"content":"// tag::PlayerDetails[]","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Player Details Pane `[since v1.4]`","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"codeeong"},"content":"The `Player Details` pane is implemented as `PlayerDetails` in the UI Component.","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"codeeong"},"content":"It is called from `PlayerListPanel`. It renders `PlayerDetails.fxml` and displays the selected `PersonCard`.","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"codeeong"},"content":"It calls the `Person` model and displays the fields in the `Person` model that are not displayed in the left panel.","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"codeeong"},"content":"It contains the event handler method handlePersonDetailsChangedEvent(), which updates the UI component when the `edit `","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"codeeong"},"content":"or `remark` commands are entered. +","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `PlayerDetails` below, using the example of a `remark` command:","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"codeeong"},"content":".Component interactions for `remark 1 r/test` command","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"codeeong"},"content":"image::PlayerDetailsDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"-"},"content":"Code snippet from \u0027PlayerDetails\u0027 to show initialisation of UI component:","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"-"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"-"},"content":" public final Person person;","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"-"},"content":" public PlayerDetails(Person person) {","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"-"},"content":" //....player details code...","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"codeeong"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"codeeong"},"content":" ...handlePersonDetailsChangedEvent code...","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `PlayerDetails` is placed on the right of `Person List Panel`, replacing the `BrowserPanel`.","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"-"},"content":"** Pros: It is the only large unused space in the software left and is right beside the `Person List Panel`, thus is the logical","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"-"},"content":"place to look at after selection of a person card.","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"-"},"content":"** Cons: This is a lot of whitespace in the pane as are not many fields.","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"-"},"content":"* **Alternative 2:** `PlayerDetails` pane size is reduced and the extra space is repurposed.","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"-"},"content":"** Pros: There will be more space for another new feature e.g. calendar.","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"-"},"content":"** Cons: It can only be implemented in v2.0 due to time constraints in development.","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"codeeong"},"content":"// end::PlayerDetails[]","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"codeeong"},"content":"// tag::changeThemeCommand[]","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Change Theme Command `[since v1.5]`","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"codeeong"},"content":"The `ChangeThemeCommand` is a new feature that allows user to change the current theme to another theme. A new css class is implemented to accommodate the new theme, LightTheme.","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"codeeong"},"content":"The `MainWindow` class is also changed to contain a handleChangeThemeRequestEvent() method which is an event handler to `setAddressBookTheme`,","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"codeeong"},"content":"which is a method in `UserPrefs`. +","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"codeeong"},"content":"Below is the sequence diagram for how the `ChangeThemeCommand` works:","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `changeTheme` Command","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"codeeong"},"content":"image::ChangeThemeDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1469,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1470,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027ChangeThemeCommand\u0027:","isFullCredit":true},{"lineNumber":1471,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1472,"author":{"gitId":"codeeong"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1473,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1474,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {","isFullCredit":true},{"lineNumber":1475,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1476,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {","isFullCredit":true},{"lineNumber":1477,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();","isFullCredit":true},{"lineNumber":1478,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1479,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1480,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":1481,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":1482,"author":{"gitId":"codeeong"},"content":" //...check for valid theme code...","isFullCredit":true},{"lineNumber":1483,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));","isFullCredit":true},{"lineNumber":1484,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));","isFullCredit":true},{"lineNumber":1485,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1486,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":1487,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1488,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1489,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1490,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Command Syntax","isFullCredit":true},{"lineNumber":1491,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1492,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** The command syntax is in the form \"changeTheme Dark\" or \"changeTheme Light\".","isFullCredit":true},{"lineNumber":1493,"author":{"gitId":"codeeong"},"content":"** Pros: This supports future implementation of more themes, so that the developer can easily add the new themes without","isFullCredit":true},{"lineNumber":1494,"author":{"gitId":"codeeong"},"content":"having to change the execution.","isFullCredit":true},{"lineNumber":1495,"author":{"gitId":"codeeong"},"content":"** Cons: The command is longer than it could be. (see alternative 2)","isFullCredit":true},{"lineNumber":1496,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** The command syntax in the form \"changeTheme\", which would automatically toggle the theme.","isFullCredit":true},{"lineNumber":1497,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly.","isFullCredit":true},{"lineNumber":1498,"author":{"gitId":"codeeong"},"content":"** Cons: Future implementation of more themes would be harder for the developer as the toggle function would have to be","isFullCredit":true},{"lineNumber":1499,"author":{"gitId":"codeeong"},"content":"changed quite drastically to become a command for selecting a theme out of multiple themes.","isFullCredit":true},{"lineNumber":1500,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1501,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience","isFullCredit":true},{"lineNumber":1502,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1503,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** `ChangeThemeCommand` is implemented as a CLI command.","isFullCredit":true},{"lineNumber":1504,"author":{"gitId":"codeeong"},"content":"** Pros: Consistent with the rest of the application, of which all changes are made by the CLI.","isFullCredit":true},{"lineNumber":1505,"author":{"gitId":"codeeong"},"content":"** Cons: User has yet another command to remember the syntax of.","isFullCredit":true},{"lineNumber":1506,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** Change of theme is implemented as a button to change onClick.","isFullCredit":true},{"lineNumber":1507,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly.","isFullCredit":true},{"lineNumber":1508,"author":{"gitId":"codeeong"},"content":"** Cons: Inconsistent with the rest of the application, which is CLI-based.","isFullCredit":true},{"lineNumber":1509,"author":{"gitId":"codeeong"},"content":"// end::changeThemeCommand[]","isFullCredit":true},{"lineNumber":1510,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1511,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1512,"author":{"gitId":"codeeong"},"content":"// tag::settagcolour[]","isFullCredit":true},{"lineNumber":1513,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Set Tag Colour feature `[since v1.1]`","isFullCredit":true},{"lineNumber":1514,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1515,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1516,"author":{"gitId":"codeeong"},"content":"The `Set` Command is an entirely new command that allows the user to assign a colour to a specific tag.","isFullCredit":true},{"lineNumber":1517,"author":{"gitId":"codeeong"},"content":"This mechanism is facilitated by the `SetCommandParser`, which creates and returns a new `SetCommand`.","isFullCredit":true},{"lineNumber":1518,"author":{"gitId":"codeeong"},"content":"In `SetCommandParser`, which implements the `Parser` interface, it parses the arguments inputted into the CLI, and checks whether the arguments are valid.","isFullCredit":true},{"lineNumber":1519,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1520,"author":{"gitId":"codeeong"},"content":"`SetCommandParser` is implemented as such:","isFullCredit":true},{"lineNumber":1521,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1522,"author":{"gitId":"codeeong"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1523,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1524,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {","isFullCredit":true},{"lineNumber":1525,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1526,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1527,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1528,"author":{"gitId":"codeeong"},"content":" // ...parse arguments and check for invalid arguments...","isFullCredit":true},{"lineNumber":1529,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1530,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":1531,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1532,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1533,"author":{"gitId":"codeeong"},"content":"`SetCommand` inherits the abstract `Command` class. After `execute()` is called in `SetCommand`, the tag colour is set through the logic portions of `ModelManager` and `AddressBook`, then","isFullCredit":true},{"lineNumber":1534,"author":{"gitId":"codeeong"},"content":"lastly changes `tagColour` attribute within the `Tag` object itself. It also posts an event in `SetCommand`, to which","isFullCredit":true},{"lineNumber":1535,"author":{"gitId":"codeeong"},"content":"its handler in `PersonCard` responds and performs the UI update. +","isFullCredit":true},{"lineNumber":1536,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1537,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1538,"author":{"gitId":"codeeong"},"content":"`SetCommand` is implemented in this way:","isFullCredit":true},{"lineNumber":1539,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1540,"author":{"gitId":"codeeong"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1541,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1542,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {","isFullCredit":true},{"lineNumber":1543,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1544,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;","isFullCredit":true},{"lineNumber":1545,"author":{"gitId":"codeeong"},"content":" private final String tagColour;","isFullCredit":true},{"lineNumber":1546,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1547,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":1548,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);","isFullCredit":true},{"lineNumber":1549,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;","isFullCredit":true},{"lineNumber":1550,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;","isFullCredit":true},{"lineNumber":1551,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1552,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1553,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":1554,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":1555,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":1556,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);","isFullCredit":true},{"lineNumber":1557,"author":{"gitId":"codeeong"},"content":" //...check for valid tagName code....","isFullCredit":true},{"lineNumber":1558,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));","isFullCredit":true},{"lineNumber":1559,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));","isFullCredit":true},{"lineNumber":1560,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1561,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":1562,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1563,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1564,"author":{"gitId":"codeeong"},"content":"The following sequence diagram shows how the set command operation works:","isFullCredit":true},{"lineNumber":1565,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1566,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `setTagColour` Command","isFullCredit":true},{"lineNumber":1567,"author":{"gitId":"codeeong"},"content":"image::SetTagCommandDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1568,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1569,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1570,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Command` vs `UndoableCommand`","isFullCredit":true},{"lineNumber":1571,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1572,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** Inherit from `Command`.","isFullCredit":true},{"lineNumber":1573,"author":{"gitId":"codeeong"},"content":"** Pros: Does not involve complicated undo/redo tests, simple and quicker implementation,","isFullCredit":true},{"lineNumber":1574,"author":{"gitId":"codeeong"},"content":"lessen chances of mistakes made in implementation.","isFullCredit":true},{"lineNumber":1575,"author":{"gitId":"codeeong"},"content":"** Cons: User cannot use the `undo/redo` command.","isFullCredit":true},{"lineNumber":1576,"author":{"gitId":"codeeong"},"content":"* **Alternative 2 :** Inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":1577,"author":{"gitId":"codeeong"},"content":"** Pros: User can utilise the `undo/redo` command.","isFullCredit":true},{"lineNumber":1578,"author":{"gitId":"codeeong"},"content":"** Cons: Hard for developers to implement extra tests, not very necessary as users can just as easily type","isFullCredit":true},{"lineNumber":1579,"author":{"gitId":"codeeong"},"content":"out the colour they would like to change their tag to; it is a short command, especially with the `stc` alias.","isFullCredit":true},{"lineNumber":1580,"author":{"gitId":"codeeong"},"content":"// end::settagcolour[]","isFullCredit":true},{"lineNumber":1581,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1582,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","isFullCredit":true},{"lineNumber":1583,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1584,"author":{"gitId":"-"},"content":"We use https://asciidoctor.org[asciidoc] for writing documentation.","isFullCredit":true},{"lineNumber":1585,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1586,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1587,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","isFullCredit":true},{"lineNumber":1588,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","isFullCredit":true},{"lineNumber":1590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1591,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","isFullCredit":true},{"lineNumber":1592,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","isFullCredit":true},{"lineNumber":1593,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1594,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","isFullCredit":true},{"lineNumber":1595,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1596,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","isFullCredit":true},{"lineNumber":1597,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1598,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","isFullCredit":true},{"lineNumber":1599,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1600,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","isFullCredit":true},{"lineNumber":1601,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1602,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","isFullCredit":true},{"lineNumber":1603,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1604,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","isFullCredit":true},{"lineNumber":1605,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","isFullCredit":true},{"lineNumber":1606,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","isFullCredit":true},{"lineNumber":1607,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","isFullCredit":true},{"lineNumber":1608,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1609,"author":{"gitId":"-"},"content":".Saving documentation as PDF files in Chrome","isFullCredit":true},{"lineNumber":1610,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":1611,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1612,"author":{"gitId":"-"},"content":"[[Testing]]","isFullCredit":true},{"lineNumber":1613,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":1614,"author":{"gitId":"codeeong"},"content":"If you are intending to develop our software further, it is highly recommended that you run tests in the ways listed below.","isFullCredit":true},{"lineNumber":1615,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1616,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","isFullCredit":true},{"lineNumber":1617,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1618,"author":{"gitId":"-"},"content":"There are three ways to run tests.","isFullCredit":true},{"lineNumber":1619,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1620,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":1621,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","isFullCredit":true},{"lineNumber":1622,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1623,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","isFullCredit":true},{"lineNumber":1624,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1625,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","isFullCredit":true},{"lineNumber":1626,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","isFullCredit":true},{"lineNumber":1627,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1628,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","isFullCredit":true},{"lineNumber":1629,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1630,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","isFullCredit":true},{"lineNumber":1631,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1632,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1633,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","isFullCredit":true},{"lineNumber":1634,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1635,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","isFullCredit":true},{"lineNumber":1636,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1637,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","isFullCredit":true},{"lineNumber":1638,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1639,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","isFullCredit":true},{"lineNumber":1640,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","isFullCredit":true},{"lineNumber":1642,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1643,"author":{"gitId":"-"},"content":"We have two types of tests:","isFullCredit":true},{"lineNumber":1644,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1645,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","isFullCredit":true},{"lineNumber":1646,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","isFullCredit":true},{"lineNumber":1647,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","isFullCredit":true},{"lineNumber":1648,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","isFullCredit":true},{"lineNumber":1649,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","isFullCredit":true},{"lineNumber":1650,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","isFullCredit":true},{"lineNumber":1651,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","isFullCredit":true},{"lineNumber":1652,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","isFullCredit":true},{"lineNumber":1653,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","isFullCredit":true},{"lineNumber":1654,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","isFullCredit":true},{"lineNumber":1655,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1656,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1657,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","isFullCredit":true},{"lineNumber":1658,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","isFullCredit":true},{"lineNumber":1659,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1660,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","isFullCredit":true},{"lineNumber":1661,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","isFullCredit":true},{"lineNumber":1662,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1663,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","isFullCredit":true},{"lineNumber":1664,"author":{"gitId":"codeeong"},"content":"This section covers resources for you to develop this software with good practices and prepare it for release.","isFullCredit":true},{"lineNumber":1665,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","isFullCredit":true},{"lineNumber":1667,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1668,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","isFullCredit":true},{"lineNumber":1669,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","isFullCredit":true},{"lineNumber":1671,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1674,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coverage Reporting","isFullCredit":true},{"lineNumber":1675,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1676,"author":{"gitId":"-"},"content":"We use https://coveralls.io/[Coveralls] to track the code coverage of our projects. See \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1677,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1678,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Documentation Previews","isFullCredit":true},{"lineNumber":1679,"author":{"gitId":"-"},"content":"When a pull request has changes to asciidoc files, you can use https://www.netlify.com/[Netlify] to see a preview of how the HTML version of those asciidoc files will look like when the pull request is merged. See \u003c\u003cUsingNetlify#, UsingNetlify.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1681,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","isFullCredit":true},{"lineNumber":1682,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1683,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","isFullCredit":true},{"lineNumber":1684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1685,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","isFullCredit":true},{"lineNumber":1686,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","isFullCredit":true},{"lineNumber":1687,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","isFullCredit":true},{"lineNumber":1688,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","isFullCredit":true},{"lineNumber":1689,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","isFullCredit":true},{"lineNumber":1691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1692,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","isFullCredit":true},{"lineNumber":1693,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","isFullCredit":true},{"lineNumber":1694,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","isFullCredit":true},{"lineNumber":1695,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1696,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d Product Scope","isFullCredit":true},{"lineNumber":1698,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1699,"author":{"gitId":"codeeong"},"content":"This section tells you more details of our software, our target users, the user stories, and gives you a sneak peak into our development process.","isFullCredit":true},{"lineNumber":1700,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1701,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Target user profile:","isFullCredit":true},{"lineNumber":1702,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1703,"author":{"gitId":"lohtianwei"},"content":"* football team managers","isFullCredit":true},{"lineNumber":1704,"author":{"gitId":"-"},"content":"* has a need to manage a significant number of contacts","isFullCredit":true},{"lineNumber":1705,"author":{"gitId":"-"},"content":"* prefer desktop apps over other types","isFullCredit":true},{"lineNumber":1706,"author":{"gitId":"-"},"content":"* can type fast","isFullCredit":true},{"lineNumber":1707,"author":{"gitId":"-"},"content":"* prefers typing over mouse input","isFullCredit":true},{"lineNumber":1708,"author":{"gitId":"-"},"content":"* is reasonably comfortable using CLI apps","isFullCredit":true},{"lineNumber":1709,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1710,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Value proposition:","isFullCredit":true},{"lineNumber":1711,"author":{"gitId":"codeeong"},"content":"Exclusive application for management of footballers and football teams that provides an enhanced listing of footballers and convenient lookup on updated information of players.","isFullCredit":true},{"lineNumber":1712,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1713,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Feature Contribution","isFullCredit":true},{"lineNumber":1714,"author":{"gitId":"codeeong"},"content":"* Codee +","isFullCredit":true},{"lineNumber":1715,"author":{"gitId":"-"},"content":"** Major - Revamp MTM’s whole GUI for ease of viewing teams and players’ details.","isFullCredit":true},{"lineNumber":1716,"author":{"gitId":"-"},"content":"*** e.g. remove browser panel, add player details panel, change person card.","isFullCredit":true},{"lineNumber":1717,"author":{"gitId":"-"},"content":"** Minor - Command to set the colour of tags to colour of choice.","isFullCredit":true},{"lineNumber":1718,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1719,"author":{"gitId":"codeeong"},"content":"* Jordan","isFullCredit":true},{"lineNumber":1720,"author":{"gitId":"-"},"content":"** Major - Implementation of Team Component and Related Functions.","isFullCredit":true},{"lineNumber":1721,"author":{"gitId":"-"},"content":"*** e.g. creation of team, assignment of players, viewing of teams, removal of team, renaming of team.","isFullCredit":true},{"lineNumber":1722,"author":{"gitId":"codeeong"},"content":"** Minor","isFullCredit":true},{"lineNumber":1723,"author":{"gitId":"-"},"content":"*** Introduce `remark` command and `remark` field.","isFullCredit":true},{"lineNumber":1724,"author":{"gitId":"-"},"content":"*** Enhanced add functionality to allow optional fields.","isFullCredit":true},{"lineNumber":1725,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1726,"author":{"gitId":"codeeong"},"content":"* Syafiq","isFullCredit":true},{"lineNumber":1727,"author":{"gitId":"-"},"content":"** Major - Create a new player class that contains more information about the players.","isFullCredit":true},{"lineNumber":1728,"author":{"gitId":"-"},"content":"*** e.g. Position, Rating (0 - 5 Star), Remarks","isFullCredit":true},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*** Update add, edit ,list, sort to include these fields accordingly.","isFullCredit":true},{"lineNumber":1730,"author":{"gitId":"codeeong"},"content":"** Minor - Autocomplete command","isFullCredit":true},{"lineNumber":1731,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1732,"author":{"gitId":"codeeong"},"content":"* Tianwei","isFullCredit":true},{"lineNumber":1733,"author":{"gitId":"codeeong"},"content":"** Major - privacy","isFullCredit":true},{"lineNumber":1734,"author":{"gitId":"codeeong"},"content":"*** Set private field and passwords","isFullCredit":true},{"lineNumber":1735,"author":{"gitId":"codeeong"},"content":"*** Make accounts","isFullCredit":true},{"lineNumber":1736,"author":{"gitId":"codeeong"},"content":"** Minor - Sorting players by different fields","isFullCredit":true},{"lineNumber":1737,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1739,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","isFullCredit":true},{"lineNumber":1740,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1741,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","isFullCredit":true},{"lineNumber":1742,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1743,"author":{"gitId":"-"},"content":"[width\u003d\"75%\",cols\u003d\"^8%,^23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","isFullCredit":true},{"lineNumber":1744,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1745,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","isFullCredit":true},{"lineNumber":1746,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1747,"author":{"gitId":"-"},"content":"4.1+^s|First Time User Stories","isFullCredit":true},{"lineNumber":1748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1749,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","isFullCredit":true},{"lineNumber":1750,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1751,"author":{"gitId":"-"},"content":"|`* * *` |new user |access the user guide |find out how to use fancy features of the application","isFullCredit":true},{"lineNumber":1752,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1753,"author":{"gitId":"-"},"content":"|`* * *` |new user |see a list of instructions available |navigate and use the application easily","isFullCredit":true},{"lineNumber":1754,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1755,"author":{"gitId":"-"},"content":"4.1+^s|Player Related User Stories","isFullCredit":true},{"lineNumber":1756,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1757,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add a new player|","isFullCredit":true},{"lineNumber":1758,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1759,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s address |mail him important documents","isFullCredit":true},{"lineNumber":1760,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1761,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s contact number |contact him when needed","isFullCredit":true},{"lineNumber":1762,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1763,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s email |email him when needed","isFullCredit":true},{"lineNumber":1764,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1765,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s jersey number |easily identify them during the game","isFullCredit":true},{"lineNumber":1766,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1767,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s position |easily pick my lineup for match","isFullCredit":true},{"lineNumber":1768,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1769,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player\u0027s ratings |easily identify the better players","isFullCredit":true},{"lineNumber":1770,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1771,"author":{"gitId":"-"},"content":"|`* * *` |team manager |delete a player |remove him if I kick him out from the team or he quits","isFullCredit":true},{"lineNumber":1772,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1773,"author":{"gitId":"-"},"content":"|`* * *` |team manager |find a player by name |locate details of players without having to go through the entire list","isFullCredit":true},{"lineNumber":1774,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1775,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s contact number |","isFullCredit":true},{"lineNumber":1776,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1777,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s email |","isFullCredit":true},{"lineNumber":1778,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1779,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s jersey number |","isFullCredit":true},{"lineNumber":1780,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1781,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s match stats (e.g. goals scored) |decide the lineup, give award","isFullCredit":true},{"lineNumber":1782,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1783,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player remarks |for self note","isFullCredit":true},{"lineNumber":1784,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1785,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s avatar |for facial recognition","isFullCredit":true},{"lineNumber":1786,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1787,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s position |easily pick my lineup for match","isFullCredit":true},{"lineNumber":1788,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1789,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s address |","isFullCredit":true},{"lineNumber":1790,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1791,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s avatar |","isFullCredit":true},{"lineNumber":1792,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1793,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player remarks |for self note","isFullCredit":true},{"lineNumber":1794,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1795,"author":{"gitId":"-"},"content":"|`* *` |team manager |hide \u003c\u003cprivate-contact-detail,private contact details\u003e\u003e by default |minimize chance of someone else seeing them by accident","isFullCredit":true},{"lineNumber":1796,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1797,"author":{"gitId":"-"},"content":"|`*` |team manager |edit player’s name |","isFullCredit":true},{"lineNumber":1798,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1799,"author":{"gitId":"-"},"content":"|`*` |team manager with many players in the team managing application |sort by player name |locate a person easily","isFullCredit":true},{"lineNumber":1800,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1801,"author":{"gitId":"-"},"content":"4.1+^s|Team Related User Stories","isFullCredit":true},{"lineNumber":1802,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1803,"author":{"gitId":"-"},"content":"|`* * *` |team manager |create teams |organize and manage my players through their respective team","isFullCredit":true},{"lineNumber":1804,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1805,"author":{"gitId":"-"},"content":"|`* * *` |team manager |assign player to teams |identify the team that the player is playing for","isFullCredit":true},{"lineNumber":1806,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1807,"author":{"gitId":"-"},"content":"|`* * *` |team manager |view players in specified team |identify the lineup of the team and which player belongs to which team","isFullCredit":true},{"lineNumber":1808,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1809,"author":{"gitId":"-"},"content":"|`* * *` |team manager |remove teams |remove teams that I no longer managed","isFullCredit":true},{"lineNumber":1810,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1811,"author":{"gitId":"-"},"content":"|`* *` |team manager |set match with competing team |acknowledge and plan training session for the team","isFullCredit":true},{"lineNumber":1812,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1813,"author":{"gitId":"-"},"content":"|`* *` |team manager |view upcoming match |keep track of the upcoming matches with opponent teams","isFullCredit":true},{"lineNumber":1814,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1815,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s allocated team |move players between teams","isFullCredit":true},{"lineNumber":1816,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1817,"author":{"gitId":"-"},"content":"|`* *` |team manager |schedule training programs for team |I do not have any conflicting schedule between different teams","isFullCredit":true},{"lineNumber":1818,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1819,"author":{"gitId":"-"},"content":"|`* *` |team manager |send reminder to team of schedule |my players does not forget about training session","isFullCredit":true},{"lineNumber":1820,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1821,"author":{"gitId":"-"},"content":"|`*` |team manager |sort by team name |identify group lineup easily","isFullCredit":true},{"lineNumber":1822,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1823,"author":{"gitId":"-"},"content":"4.1+^s|Additional User Stories","isFullCredit":true},{"lineNumber":1824,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1825,"author":{"gitId":"-"},"content":"|`* *` |team manager who remembers better with visual |set colours to tags |easily identify the tag that I have set to players","isFullCredit":true},{"lineNumber":1826,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1827,"author":{"gitId":"-"},"content":"|`* *` |team manager |autofill command |perform task quickly","isFullCredit":true},{"lineNumber":1828,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1829,"author":{"gitId":"-"},"content":"|`* *` |team manager |password login |if team manager wants to protect certain information","isFullCredit":true},{"lineNumber":1830,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1831,"author":{"gitId":"-"},"content":"|`* *` |team manager |submit feedback to developers |developers can improve the application constantly","isFullCredit":true},{"lineNumber":1832,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1833,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1834,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1835,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1836,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","isFullCredit":true},{"lineNumber":1837,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1838,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `MTM` and the *Team Manager* is the `user`, unless specified otherwise)","isFullCredit":true},{"lineNumber":1839,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1840,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1841,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Add player","isFullCredit":true},{"lineNumber":1842,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1843,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1844,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1845,"author":{"gitId":"-"},"content":"1. User enter command to add","isFullCredit":true},{"lineNumber":1846,"author":{"gitId":"-"},"content":"2. MTM prompt user of format to enter player\u0027s name and details","isFullCredit":true},{"lineNumber":1847,"author":{"gitId":"-"},"content":"3. User enter player\u0027s name and details in required format","isFullCredit":true},{"lineNumber":1848,"author":{"gitId":"-"},"content":"4. User press enter to insert person into storage","isFullCredit":true},{"lineNumber":1849,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1850,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1851,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1852,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1853,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1854,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1855,"author":{"gitId":"-"},"content":"* 4a. User did not enter any details.","isFullCredit":true},{"lineNumber":1856,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1857,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1858,"author":{"gitId":"-"},"content":"** 4a1. MTM inform user that it is an invalid add command.","isFullCredit":true},{"lineNumber":1859,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1860,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1861,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1862,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1863,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Edit player\u0027s team","isFullCredit":true},{"lineNumber":1864,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1865,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1866,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1867,"author":{"gitId":"-"},"content":"1. User enter command to find","isFullCredit":true},{"lineNumber":1868,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name","isFullCredit":true},{"lineNumber":1869,"author":{"gitId":"-"},"content":"3. MTM display list of players found","isFullCredit":true},{"lineNumber":1870,"author":{"gitId":"-"},"content":"4. User enter command to edit player\u0027s team using index of displayed list","isFullCredit":true},{"lineNumber":1871,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1872,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1873,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1874,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1875,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1876,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1877,"author":{"gitId":"-"},"content":"* 2a. Player name does not exist.","isFullCredit":true},{"lineNumber":1878,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1879,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1880,"author":{"gitId":"-"},"content":"** 2a1. MTM inform user that player does not exist.","isFullCredit":true},{"lineNumber":1881,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1882,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1883,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1884,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Find player by team name","isFullCredit":true},{"lineNumber":1886,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1887,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1888,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1889,"author":{"gitId":"-"},"content":"1. User enter command to find team","isFullCredit":true},{"lineNumber":1890,"author":{"gitId":"-"},"content":"2. User enter team name","isFullCredit":true},{"lineNumber":1891,"author":{"gitId":"-"},"content":"3. MTM display list of players in team","isFullCredit":true},{"lineNumber":1892,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1893,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1894,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1895,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1896,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1897,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1898,"author":{"gitId":"-"},"content":"* 2a. Team name does not exist.","isFullCredit":true},{"lineNumber":1899,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1900,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1901,"author":{"gitId":"-"},"content":"** 2a1. MTM informs user that team name does not exist","isFullCredit":true},{"lineNumber":1902,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1903,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1904,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1905,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1906,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Remove player from team","isFullCredit":true},{"lineNumber":1907,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1908,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1909,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1910,"author":{"gitId":"-"},"content":"1. User enter command to find","isFullCredit":true},{"lineNumber":1911,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name","isFullCredit":true},{"lineNumber":1912,"author":{"gitId":"-"},"content":"3. MTM display list of players found","isFullCredit":true},{"lineNumber":1913,"author":{"gitId":"-"},"content":"4. User enter remove command and index associated with player","isFullCredit":true},{"lineNumber":1914,"author":{"gitId":"-"},"content":"5. MTM displays player that is removed and updated list of players","isFullCredit":true},{"lineNumber":1915,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1916,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1917,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1918,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1919,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1920,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1921,"author":{"gitId":"-"},"content":"* 4a. Invalid index entered.","isFullCredit":true},{"lineNumber":1922,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1923,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1924,"author":{"gitId":"-"},"content":"** 4a1. MTM informs user that index is invalid.","isFullCredit":true},{"lineNumber":1925,"author":{"gitId":"-"},"content":"** 4a2. User enters valid index.","isFullCredit":true},{"lineNumber":1926,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1927,"author":{"gitId":"-"},"content":"Use case resumes at step 5.","isFullCredit":true},{"lineNumber":1928,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1929,"author":{"gitId":"-"},"content":"* 4b. User removes wrong index unintentionally.","isFullCredit":true},{"lineNumber":1930,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1931,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1932,"author":{"gitId":"-"},"content":"** 4b1. User undo remove by entering command to undo.","isFullCredit":true},{"lineNumber":1933,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1934,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1935,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1936,"author":{"gitId":"-"},"content":"_{More to be added}_","isFullCredit":true},{"lineNumber":1937,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1938,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1939,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","isFullCredit":true},{"lineNumber":1940,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1941,"author":{"gitId":"codeeong"},"content":". Should work on any mainstream OS as long as it has Java 1.8.0_60 or higher installed.","isFullCredit":true},{"lineNumber":1942,"author":{"gitId":"-"},"content":". Should be able to hold up to 150 players without a noticeable sluggishness in performance for typical usage.","isFullCredit":true},{"lineNumber":1943,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","isFullCredit":true},{"lineNumber":1944,"author":{"gitId":"codeeong"},"content":". Works on both 32-bit and 64-bit machines","isFullCredit":true},{"lineNumber":1945,"author":{"gitId":"codeeong"},"content":". Should respond within 1 second of query","isFullCredit":true},{"lineNumber":1946,"author":{"gitId":"codeeong"},"content":". Should be intuitive and easy to use for a first-time user.","isFullCredit":true},{"lineNumber":1947,"author":{"gitId":"codeeong"},"content":". Should be able to handle any sort of input, i.e. should recover from invalid input.","isFullCredit":true},{"lineNumber":1948,"author":{"gitId":"codeeong"},"content":". Should have audience-focused user guides and developer guides.","isFullCredit":true},{"lineNumber":1949,"author":{"gitId":"codeeong"},"content":". Should have command names that concisely describe their function.","isFullCredit":true},{"lineNumber":1950,"author":{"gitId":"codeeong"},"content":". Should be an open-source project.","isFullCredit":true},{"lineNumber":1951,"author":{"gitId":"codeeong"},"content":". Development be cost effective or free.","isFullCredit":true},{"lineNumber":1952,"author":{"gitId":"codeeong"},"content":". App should be able to work offline.","isFullCredit":true},{"lineNumber":1953,"author":{"gitId":"-"},"content":". Should save and backup the state of the team managing application regularly.","isFullCredit":true},{"lineNumber":1954,"author":{"gitId":"codeeong"},"content":". Current versions must be backward compatible with older versions to support undo.","isFullCredit":true},{"lineNumber":1955,"author":{"gitId":"codeeong"},"content":". The user interface should be simple and minimise distractions so that user can continue with their work in a focused manner.","isFullCredit":true},{"lineNumber":1956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1957,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1958,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1959,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":1960,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1961,"author":{"gitId":"-"},"content":"[[mainstream-os]] Mainstream OS::","isFullCredit":true},{"lineNumber":1962,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","isFullCredit":true},{"lineNumber":1963,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1964,"author":{"gitId":"-"},"content":"[[private-contact-detail]] Private contact detail::","isFullCredit":true},{"lineNumber":1965,"author":{"gitId":"-"},"content":"A contact detail that is not meant to be shared with others","isFullCredit":true},{"lineNumber":1966,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1967,"author":{"gitId":"-"},"content":"[[lineuo]] Lineup::","isFullCredit":true},{"lineNumber":1968,"author":{"gitId":"-"},"content":"A list of players that are playing for a match, with their positions specified","isFullCredit":true},{"lineNumber":1969,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1970,"author":{"gitId":"-"},"content":"[[user-guide]] User Guide::","isFullCredit":true},{"lineNumber":1971,"author":{"gitId":"-"},"content":"A documentation on the functionality and usability of MTM","isFullCredit":true},{"lineNumber":1972,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1973,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1974,"author":{"gitId":"-"},"content":"\u003d\u003d Instructions for Manual Testing","isFullCredit":true},{"lineNumber":1975,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1976,"author":{"gitId":"-"},"content":"Given below are instructions to test the app manually.","isFullCredit":true},{"lineNumber":1977,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1978,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1979,"author":{"gitId":"-"},"content":"These instructions only provide a starting point for testers to work on; testers are expected to do more _exploratory_ testing.","isFullCredit":true},{"lineNumber":1980,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1981,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Launch and Shutdown","isFullCredit":true},{"lineNumber":1982,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1983,"author":{"gitId":"-"},"content":". Initial launch","isFullCredit":true},{"lineNumber":1984,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1985,"author":{"gitId":"-"},"content":".. Download the jar file and copy into an empty folder","isFullCredit":true},{"lineNumber":1986,"author":{"gitId":"-"},"content":".. Double-click the jar file +","isFullCredit":true},{"lineNumber":1987,"author":{"gitId":"-"},"content":" Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.","isFullCredit":true},{"lineNumber":1988,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1989,"author":{"gitId":"-"},"content":". Saving window preferences","isFullCredit":true},{"lineNumber":1990,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1991,"author":{"gitId":"-"},"content":".. Resize the window to an optimum size. Move the window to a different location. Close the window.","isFullCredit":true},{"lineNumber":1992,"author":{"gitId":"-"},"content":".. Re-launch the app by double-clicking the jar file. +","isFullCredit":true},{"lineNumber":1993,"author":{"gitId":"-"},"content":" Expected: The most recent window size and location is retained.","isFullCredit":true},{"lineNumber":1994,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1995,"author":{"gitId":"-"},"content":"_{ more test cases ... }_","isFullCredit":true},{"lineNumber":1996,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1997,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Deleting a player","isFullCredit":true},{"lineNumber":1998,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1999,"author":{"gitId":"codeeong"},"content":". Deleting a player while all players are listed","isFullCredit":true},{"lineNumber":2000,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2001,"author":{"gitId":"codeeong"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list.","isFullCredit":true},{"lineNumber":2002,"author":{"gitId":"-"},"content":".. Test case: `delete 1` +","isFullCredit":true},{"lineNumber":2003,"author":{"gitId":"codeeong"},"content":" Expected: First player is deleted from the list. Details of the deleted player shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2004,"author":{"gitId":"-"},"content":".. Test case: `delete 0` +","isFullCredit":true},{"lineNumber":2005,"author":{"gitId":"-"},"content":" Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2006,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `delete`, `delete x` (where x is larger than the list size) _{give more}_ +","isFullCredit":true},{"lineNumber":2007,"author":{"gitId":"-"},"content":" Expected: Similar to previous.","isFullCredit":true},{"lineNumber":2008,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2009,"author":{"gitId":"-"},"content":"_{ more test cases ... }_","isFullCredit":true},{"lineNumber":2010,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving data","isFullCredit":true},{"lineNumber":2012,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2013,"author":{"gitId":"-"},"content":". Dealing with missing/corrupted data files","isFullCredit":true},{"lineNumber":2014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2015,"author":{"gitId":"-"},"content":".. _{explain how to simulate a missing/corrupted file and the expected behavior}_","isFullCredit":true},{"lineNumber":2016,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2017,"author":{"gitId":"-"},"content":"_{ more test cases ... }_","isFullCredit":true},{"lineNumber":2018,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Remarking a player","isFullCredit":true},{"lineNumber":2020,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2021,"author":{"gitId":"-"},"content":". Remarking a player while all players are listed","isFullCredit":true},{"lineNumber":2022,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2023,"author":{"gitId":"-"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list.","isFullCredit":true},{"lineNumber":2024,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/This is my remark to you.` +","isFullCredit":true},{"lineNumber":2025,"author":{"gitId":"-"},"content":"Expected: First player is remarked from the list. Details of the remarked player shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2026,"author":{"gitId":"-"},"content":".. Test case: `remark 0` +","isFullCredit":true},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Expected: No person is remarked. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2028,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `remark`, `remark x` (where x is larger than the list size), `remark -1`, `remark 2 x/` (where x is not the prefix for remark) +","isFullCredit":true},{"lineNumber":2029,"author":{"gitId":"-"},"content":"Expected: Similar to previous.","isFullCredit":true},{"lineNumber":2030,"author":{"gitId":"-"},"content":".. Test case: `remark 1` +","isFullCredit":true},{"lineNumber":2031,"author":{"gitId":"-"},"content":"Expected: First player has its remark removed. Details of the remarked player shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2032,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/I want to delete this.` -\u003e `remark 1 r/` +","isFullCredit":true},{"lineNumber":2033,"author":{"gitId":"-"},"content":"Expected: Similar to previous.","isFullCredit":true},{"lineNumber":2034,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2035,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a player without all fields","isFullCredit":true},{"lineNumber":2036,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2037,"author":{"gitId":"-"},"content":". Adding a player where player is unique","isFullCredit":true},{"lineNumber":2038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2039,"author":{"gitId":"-"},"content":".. Prerequisites: Newly added player must not exist in MTM.","isFullCredit":true},{"lineNumber":2040,"author":{"gitId":"-"},"content":".. Test case: `add n/Tumeric Turner e/tt@tuner.com` +","isFullCredit":true},{"lineNumber":2041,"author":{"gitId":"-"},"content":"Expected: Player added into MTM and will be on the list. Details of the newly added player shown in the status message. Fields that are not input during addition are replaced with `\u003cUNSPECIFIED\u003e` Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2042,"author":{"gitId":"-"},"content":".. Test case: `add n/Guavi Hollae` +","isFullCredit":true},{"lineNumber":2043,"author":{"gitId":"-"},"content":"Expected: Player is not added into MTM. Errors details shown in status message. Name and email are compulsory fields that need to be entered for `add` to work.","isFullCredit":true},{"lineNumber":2044,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2045,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Functions","isFullCredit":true},{"lineNumber":2046,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a Team","isFullCredit":true},{"lineNumber":2048,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2049,"author":{"gitId":"-"},"content":". Creating a Team with current existing data in MTM","isFullCredit":true},{"lineNumber":2050,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2051,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently does not exist in MTM.","isFullCredit":true},{"lineNumber":2052,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +","isFullCredit":true},{"lineNumber":2053,"author":{"gitId":"-"},"content":"Expected: Team is created and displayed in Team Display Panel. Team name will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2054,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +","isFullCredit":true},{"lineNumber":2055,"author":{"gitId":"-"},"content":"Expected: Team is not created due to team already existing in MTM. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2056,"author":{"gitId":"-"},"content":".. Test case: `create \u0026-Team-\u0026` +","isFullCredit":true},{"lineNumber":2057,"author":{"gitId":"-"},"content":"Expected: Team does not allow names with special characters, only alphanumeric, can consist of all numbers and can contain space in name. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2058,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2059,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a Team","isFullCredit":true},{"lineNumber":2060,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2061,"author":{"gitId":"-"},"content":". Viewing a Team with current existing data in MTM","isFullCredit":true},{"lineNumber":2062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2063,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM.","isFullCredit":true},{"lineNumber":2064,"author":{"gitId":"-"},"content":"... Test case: `view Arsenal` +","isFullCredit":true},{"lineNumber":2065,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be updated with list of players that are in the Team. Team name will be shown in the status message.","isFullCredit":true},{"lineNumber":2066,"author":{"gitId":"-"},"content":"... Test case: `view NonExistingTeam` +","isFullCredit":true},{"lineNumber":2067,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM. Error details shown in the status message.","isFullCredit":true},{"lineNumber":2068,"author":{"gitId":"-"},"content":"... Test case: `view chelsea` +","isFullCredit":true},{"lineNumber":2069,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM, as team names are case sensitive. Error details shown in the status message.","isFullCredit":true},{"lineNumber":2070,"author":{"gitId":"-"},"content":".. Prerequisites: The command `create NUSTeam` was executed right before executing this test case.","isFullCredit":true},{"lineNumber":2071,"author":{"gitId":"-"},"content":"... Test case: `view NUSTeam` +","isFullCredit":true},{"lineNumber":2072,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be empty as no players are in the team yet. Team name will be shown in the status message.","isFullCredit":true},{"lineNumber":2073,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning Players to Team","isFullCredit":true},{"lineNumber":2075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2076,"author":{"gitId":"-"},"content":". Assigning players to a Team after executing `create NUSTeam`","isFullCredit":true},{"lineNumber":2077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2078,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/1 3 5` +","isFullCredit":true},{"lineNumber":2079,"author":{"gitId":"-"},"content":"Expected: Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2080,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/3` +","isFullCredit":true},{"lineNumber":2081,"author":{"gitId":"-"},"content":"Expected: No player is assigned as player already exist in the team. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2082,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/2 3 4` +","isFullCredit":true},{"lineNumber":2083,"author":{"gitId":"-"},"content":"Expected: Only the player at index 2 is assigned. Assign command will stop once it detects that a player cannot be assigned. Team Display Panel will not be updated. Person Card of index 2 will be updated with assigned team. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2084,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/9 6 4` +","isFullCredit":true},{"lineNumber":2085,"author":{"gitId":"-"},"content":"Expected: All players will be assigned by ascending index order. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2086,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/7 40` +","isFullCredit":true},{"lineNumber":2087,"author":{"gitId":"-"},"content":"Expected: Index exceeding the number of players listed in the Player List Panel will be ignored. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2088,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/-1` +","isFullCredit":true},{"lineNumber":2089,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message. Team is not viewed.","isFullCredit":true},{"lineNumber":2090,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam` +","isFullCredit":true},{"lineNumber":2091,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Invalid command format as no index is given. Team is not viewed.","isFullCredit":true},{"lineNumber":2092,"author":{"gitId":"-"},"content":".. Test case: `assign NoTeam` +","isFullCredit":true},{"lineNumber":2093,"author":{"gitId":"-"},"content":"Expected: Error deatils shown in the status message. No such team found in MTM. Team is not viewed, player list not updated.","isFullCredit":true},{"lineNumber":2094,"author":{"gitId":"-"},"content":".. Test case: `add n/Barry Putter e/bp@hotwot.com tm/NUSTeam` +","isFullCredit":true},{"lineNumber":2095,"author":{"gitId":"-"},"content":"Expected: New person is added into MTM. Team in Team Display Panel will be selected. Player list will be updated with the new added person. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2096,"author":{"gitId":"-"},"content":".. Test case: `add n/Himonie Branger e/hb@notwot.com tm/MissingTeam` +","isFullCredit":true},{"lineNumber":2097,"author":{"gitId":"-"},"content":"Expected: Person is not added into MTM. Team does not exist in MTM. Error details shown in the status message.","isFullCredit":true},{"lineNumber":2098,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2099,"author":{"gitId":"-"},"content":". Unassigning players from a Team","isFullCredit":true},{"lineNumber":2100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2101,"author":{"gitId":"-"},"content":".. Prerequisites: Players are already existing in the team","isFullCredit":true},{"lineNumber":2102,"author":{"gitId":"-"},"content":".. Test case: `view NUSTeam` -\u003e `assign i/1 2 3` +","isFullCredit":true},{"lineNumber":2103,"author":{"gitId":"-"},"content":"Expected: Player list will be updated as the specified players to be unassigned will be removed from the team. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2104,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/10 11` +","isFullCredit":true},{"lineNumber":2105,"author":{"gitId":"-"},"content":"Expected: Player list will be updated with the specified players to be unassigned will have their team name updated to `\u003cUNSPECIFIED\u003e`. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2106,"author":{"gitId":"-"},"content":".. Test case: `assign i/NUS` +","isFullCredit":true},{"lineNumber":2107,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message.","isFullCredit":true},{"lineNumber":2108,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/1` +","isFullCredit":true},{"lineNumber":2109,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Player already has no team and can\u0027t be unassigned.","isFullCredit":true},{"lineNumber":2110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2111,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Renaming a Team","isFullCredit":true},{"lineNumber":2112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2113,"author":{"gitId":"-"},"content":". Renaming a Team after assigning players above","isFullCredit":true},{"lineNumber":2114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2115,"author":{"gitId":"-"},"content":".. Prerequisites: Ensure that the team to be renamed into does not exist","isFullCredit":true},{"lineNumber":2116,"author":{"gitId":"-"},"content":".. Test case: `rename NUSTeam tm/SUNTeam` +","isFullCredit":true},{"lineNumber":2117,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be renamed to the new team name. New team name will be selected in the Team Display Panel. Player list of all the players in the new team name will be displayed. All players in the team will have their team name updated to the new team name. Team rename will be shown in the result status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2118,"author":{"gitId":"-"},"content":".. Test case: `rename NewTeam tm/MooTeam` +","isFullCredit":true},{"lineNumber":2119,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename does not exist in MTM.","isFullCredit":true},{"lineNumber":2120,"author":{"gitId":"-"},"content":".. Test case: `rename SUNTeam tm/\u0026-Team` +","isFullCredit":true},{"lineNumber":2121,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename into is invalid and should only contains alphanumeric characters.","isFullCredit":true},{"lineNumber":2122,"author":{"gitId":"-"},"content":".. Test case: `rename tm/SmoovTeam` +","isFullCredit":true},{"lineNumber":2123,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Did not specify which team to rename and will indicate invalid command format.","isFullCredit":true},{"lineNumber":2124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2125,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a Team","isFullCredit":true},{"lineNumber":2126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2127,"author":{"gitId":"-"},"content":". Removing a Team after renaming the team above","isFullCredit":true},{"lineNumber":2128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2129,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM.","isFullCredit":true},{"lineNumber":2130,"author":{"gitId":"-"},"content":".. Test case: `view SUNTeam` -\u003e `remove SUNTeam` +","isFullCredit":true},{"lineNumber":2131,"author":{"gitId":"-"},"content":"Expected: Team is removed and Team Display Panel is updated to reflect that the team has been removed. Team name that is being removed will be shown in the status message. All players in the team will have their team name updated in the Player List Panel. Player List Panel will show the full list of players in MTM. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2132,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `remove Arsenal` +","isFullCredit":true},{"lineNumber":2133,"author":{"gitId":"-"},"content":"Expected: Similar to above, will be displaying full list of players before and after `remove` command.","isFullCredit":true},{"lineNumber":2134,"author":{"gitId":"-"},"content":".. Test case: `remove SUNTeam` +","isFullCredit":true},{"lineNumber":2135,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team does not exist in MTM.","isFullCredit":true},{"lineNumber":2136,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2137,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Appearance Related Functions","isFullCredit":true},{"lineNumber":2138,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2139,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Changing a Theme","isFullCredit":true},{"lineNumber":2140,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2141,"author":{"gitId":"codeeong"},"content":". Changing the theme that MTM is currently on","isFullCredit":true},{"lineNumber":2142,"author":{"gitId":"codeeong"},"content":".. Test case: `cte Dark` (if current theme is Light) or `cte Light` (if current theme is Dark) +","isFullCredit":true},{"lineNumber":2143,"author":{"gitId":"codeeong"},"content":"Expected: MTM colour scheme will change to the respective themes as shown below:","isFullCredit":true},{"lineNumber":2144,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2145,"author":{"gitId":"codeeong"},"content":"image::DarkTheme.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":2146,"author":{"gitId":"codeeong"},"content":"image::LightTheme.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":2147,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2148,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2149,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Setting Tag Colours","isFullCredit":true},{"lineNumber":2150,"author":{"gitId":"codeeong"},"content":". Setting the tags to colour of choice","isFullCredit":true},{"lineNumber":2151,"author":{"gitId":"codeeong"},"content":".. Prerequisites: Player has tags","isFullCredit":true},{"lineNumber":2152,"author":{"gitId":"codeeong"},"content":".. Test case: `setTagColour t/redCard tc/blue`","isFullCredit":true},{"lineNumber":2153,"author":{"gitId":"codeeong"},"content":"Expected: All tags with the name `redCard` would become blue","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":189,"lohtianwei":210,"codeeong":253,"-":1501}},{"path":"docs/UserGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - User Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":toc-title: Table Of Contents","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":experimental:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":":important-caption: :white_check_mark:","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"By: `F14-B1` Since: `Mar 2018` Licence: `MIT`","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"// tag::introduction[]","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a link:https://en.wikipedia.org/wiki/Command-line_interface[Command-Line Interface] (CLI) based address book application for *football team managers*.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"It is a one-stop solution to help you manage your player\u0027s contact details in an efficient and convenient manner.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Using MTM, you can organize players into teams, view player statistics, and, generate player line-ups.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"Head to \u003c\u003cQuick Start\u003e\u003e to get started with My Team Manager!","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"\u003d\u003d Quick Start","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"Welcome! If you want to learn more about using My Team Manager, you\u0027ve come to the right place. My Team Manager is the easiest","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"way for you to manage your team efficiently, and this quick start section will help you learn the basics so you can get going.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"Your teams, their players, and all the relevant information is organized clearly in My Team Manager. Teams can be created and","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"players can be assigned to teams.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Before we begin","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". You can download Java 8 link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[here].","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"* Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"* This app will not work with *earlier* or *later* versions of Java 8.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":". Download the latest `MyTeamManager.jar` link:{repoURL}/releases[here].","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":". Copy the file to the folder you want to use as the home folder for your MTM.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":". Double-click the file to start the app. The software interface should appear in a few seconds as shown below.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"image::UiNew.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Navigating the interface","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"The figure below shows the different components in My Team Manager and the list below explains their purpose.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"image::UIGuide.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". *Command Box*: This is where you _key in the commands_ to use My Team Manager.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". *Display Box*: The display box _displays results_ to any command you input.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". *Team List* : This _displays the teams_ you have created in My Team Manager. +","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"* If a team is being viewed, it would be highlighted.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":". *Details Panel*: This _displays details of the player_ that is currently selected. +","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* Here, the player\u0027s _name_, _phone number_, _address_, _email_, _jersey number_ followed by _remarks_ are shown.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":". *Systems Panel*: This displays information regarding modification to MTM\u0027s data.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"* On the left, it displays the time and date when MTM is last updated.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"* On the right, is the location of the data.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":". *Player List*: This is the list of player cards. In each player card, +","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"* The player\u0027s _name_, _tags_, _team_, _rating_, followed by _position_ is displayed.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"* The player\u0027s _avatar_ is also shown on the right column.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lithiumlkid"},"content":"[[Using_Commands]]","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Using Commands","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":".*Getting started with Commands*","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"** An example in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"* Fields that are in enclosed with `[ ]` are optional.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"** An example, `n/NAME [t/TAG]`, can be used as, `n/John Doe t/friend`, or as, `n/John Doe`.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"** In this example, `[t/TAG]...`, these parameters are valid, `t/friend`, `t/friend t/family`, and even `{nbsp}` (no parameter).","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"* Parameters can be entered in any order.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"** For example, if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":".*The Use of Alias*","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"* Some commands have an alias that you can use to execute the command. This alias acts as a shortcut to execute the commands you want without typing the full command out.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"** For example, you can type the alias `a` instead of the `add` command word to add a player into MTM.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":".*Lookout for Tips, Notes, and Expected Outcomes*","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"TIP: This box give _tips_ that *might be useful*.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"NOTE: This box _notes_ down *important details* regarding a feature.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"IMPORTANT: This box will let you know the _outcome_ and what MTM should be *expected to do*.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lithiumlkid"},"content":"Now that you are familiar with the interface and using commands, you are now ready to begin using My Team Manager!","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Three steps to get started","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Add your first player","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lithiumlkid"},"content":". Add your first player, `Ronaldo` by typing the command `add n/Ronaldo e/Ronaldo@arsenal.com` in the command box and pressing kbd:[Enter] to execute it.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lithiumlkid"},"content":"image::add.png[width\u003d\"400\"]","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lithiumlkid"},"content":". Your new player, `Ronaldo` should appear in the player list as shown in the white box above.","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lithiumlkid"},"content":"TIP: The `Add` command has additional optional parameters for you to include more information. For the full list,","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"refer to \u003c\u003cadd, Adding a player\u003e\u003e.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Create your first team","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"Now that you have a player, let\u0027s explore teams. Teams allow you to manage and group your players together according to","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":"the teams they belong to.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":". Create your first team, `NUS` by typing the command `create NUS` in the command box and pressing kbd:[Enter] to execute it.","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"image::create.PNG[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lithiumlkid"},"content":". Your new team, `NUS` should appear in the team list.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lithiumlkid"},"content":". You can now assign `Ronaldo` to `NUS` by typing the command `assign tm/NUS i/1` in the command box and pressing kbd:[Enter] to execute it.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lithiumlkid"},"content":"- The Team List should now show NUS highlighted as shown in the white box labeled 1 above.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"- `Ronaldo` \u0027s player card should now show NUS in the team field as shown in the white box labeled 2 above.","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lithiumlkid"},"content":"- The player list shows only players assigned to the team `NUS`","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Viewing more details","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":". View more details about a player, by entering `select` followed by the \u003c\u003cIndex, `INDEX`\u003e\u003e of the player. For example, to view","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lithiumlkid"},"content":"`Ronaldo` \u0027s details, enter `select 1`.","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lithiumlkid"},"content":". The details panel should now show the player\u0027s details.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lithiumlkid"},"content":"image::select.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lithiumlkid"},"content":". You may notice that there are fields that show `\u003cUNSPECIFIED\u003e`. These are optional fields that you can edit later on.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lithiumlkid"},"content":"There are also many ways you can customize and add to My Team Manager. Here are a few ways to start:","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":".. \u003c\u003cedit, Editing a player\u003e\u003e","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003cchangeTheme, Changing MTM theme\u003e\u003e","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csetTagColour, Setting Tag Colour\u003e\u003e","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":".. \u003c\u003ctoggleprivacy, Setting privacy\u003e\u003e","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csort, Sorting players in the list\u003e\u003e","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lithiumlkid"},"content":"// end::introduction[]","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Commands in My Team Manager","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful information regarding all the commands in My Team Manager.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lithiumlkid"},"content":"If you are not familiar on how to use commands yet, you can refer to \u003c\u003cUsing_Commands\u003e\u003e","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Fundamentals","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lithiumlkid"},"content":"MTM provides tools that gives you the power to use MTM more efficiently and teach you how to navigate through MTM with ease.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lithiumlkid"},"content":"Enter commands more quickly with \u003c\u003cautocomplete,kbd:[tab] autocomplete\u003e\u003e, get \u003c\u003chelp,help\u003e\u003e or find out how to \u003c\u003cundo,undo\u003e\u003e and \u003c\u003credo,redo\u003e\u003e commands.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lithiumlkid"},"content":"You can also find information to secure your information in My Team Manger by \u003c\u003ctogglePrivacy, toggling privacy\u003e\u003e or \u003c\u003ckey,set a key to prevent tampering\u003e\u003e","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Saving the data","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"There is no need to save anything manually as My Team Manager will save","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"any data entered directly to the hard drive.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"// tag::autocomplete[]","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"[[autocomplete]]","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Using kbd:[tab] Autocomplete","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"After typing in the first few characters of a command, pressing kbd:[tab] will fill in the rest of the item.","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"To view the parameters for a command, press tab after the whole command is typed in. Pressing tab again will remove the parameters.","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"You can use the autocompleted parameters as a template after viewing them.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"lithiumlkid"},"content":"Text will turn red if the input has no parameters or if no matching command exists.","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"lithiumlkid"},"content":"If there are multiple possible commands for a given input, i.e. \u0027e\u0027 could be \u0027edit\u0027 or \u0027exit\u0027,","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"then a dropdown box will appear with the possible commands. These can be navigated using mouse or arrow keys. Press enter to select the desired command.","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"// end::autocomplete[]","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"[[help]]","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing help : `help`","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"Feeling lost? Not sure what to do? Don\u0027t worry, our friendly guide will help you! All you have to do is just type the `help` command, and you will get all the information you require.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"Format: `help` +","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"Alias: kbd:[F1]","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"[[history]]","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing entered commands : `history`","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"Have you been extensively using MTM and in the midst of entering more commands, you could not remember what commands you have entered? MTM allows you to look at all your past commands that you have entered in reverse chronological order.","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"Format: `history` +","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"Alias: `h`","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"* Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"A list of your previously entered command will be shown to you.","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"[[undo]]","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undoing previous command : `undo`","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":"Have you entered a wrong command or might have accidentally entered the wrong values to the specified fields to a command? +","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"You don\u0027t have to worry, as MTM provides you with the command to undo most mistakes that you might have made. MTM will restore itself to the state before the previous command was executed.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"Format: `undo` +","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"Alias: `u`","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"* There are a few commands that can be undoable: commands that modify MTM\u0027s content that are related to players or teams.","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"** Player related commands: `add`, `delete`, `edit`, `clear`, `remark` +","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"** Team related commands: `create`, `assign`, `remove`, `rename`","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"Commands that are _undoAble_ will be reversed and MTM will be in the state before the command was executed.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"[[redo]]","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Redoing the previously undone command : `redo`","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"codeeong"},"content":"If you accidentally call the `undo` command too many times and need a way to quickly reverse that, MTM allows you to redo the most recent `undo` command.","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"Format: `redo` +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"Alias: `r`","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"Previously executed `undo` command will be reversed and MTM will be in its previous state.","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"// tag::togglePrivacy[]","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"[[toggleprivacy]]","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling various fields to private: `toggleprivacy` `[Since v1.4]`","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"You can toggle the privacy of various fields of players in MTM.","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"Format: `toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]` +","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"Alias: `tp`","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"codeeong"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"* Current version of `toggleprivacy` supports the field to be privated: +","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"** `p/`: PHONE, `e/`: EMAIL, `r/`: REMARK, `ra/`:RATING \u0026 `a/`: ADDRESS.","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"Privacy of field will be toggled between private or public. +","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"If Phone: `p/` of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1 is private, running command: `tp 1 p/` would change phone field to public. +","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"Private fields are shown as \u003cPrivate `FIELD`\u003e.","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"Here are some examples on how you can use the `toggleprivacy` command:","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"* `tp 1 p/ ra/`","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":"Toggles privacy of phone and rating of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1.","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"// end::togglePrivacy[]","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"// tag::key[]","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"[[key]]","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling lock on MTM: `key` `[Since v1.5]`","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"You can toggle a lock on MTM to prevent unauthorised changes to your details in MTM. When MTM is in a locked state, functionality will be limited.","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"Format: `key PASSWORD` +","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"Alias: `k`","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"* Current version of `key` uses a fixed default `PASSWORD`: *ilikesports*","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"When MTM is locked, only the following commands can be executed: +","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"`changeTheme`, `exit`, `find`, `help`, `key`, `list`, `sort` and `view`","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"Here are examples on how to use `key`:","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"* `key ilikesports`","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"If MTM is in a lock state, use this command to unlock it.","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"* `key ilikesports`","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"To lock MTM, use this command to lock.","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"// end::key[]","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"[[clear]]","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Clearing all entries : `clear`","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"You can clear all entries from MTM with the \u0027clear\u0027 command.","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"Format: `clear` +","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"Alias: `c`","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"[[exit]]","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Exiting the program : `exit`","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"You can exit the program by entering the \u0027exit\u0027 command.","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"Format: `exit`","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your players and their information in My Team Manager +","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003cadd,adding a player\u003e\u003e, \u003c\u003cedit,editing a player\u003e\u003e or \u003c\u003cremark,adding a remark\u003e\u003e.","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools to \u003c\u003cfind,find\u003e\u003e a player or \u003c\u003csort,sort\u003e\u003e players in your list.","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"lithiumlkid"},"content":"// tag::addplayer[]","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"[[add]]","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Adding a player: `add`","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"lithiumlkid"},"content":"This is the command that you will be using most frequently, especially when dealing with new players. You will be able to add new players with the details that you have obtained into MTM by using the `add` command.","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"lithiumlkid"},"content":"Format: `add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"Alias: `a`","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"The table below explains the correct inputs for the parameters.","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"[width\u003d\"80%\",cols\u003d\"1,2,2\",options\u003d\"header\"]","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"|Parameter |Input type |Example","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"|n/NAME |Player name | n/Ronaldo","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"|e/EMAIL |Player\u0027s email address | a/ronaldo@soccer.com","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"|tm/TEAM |Player\u0027s Team | tm/Real Madrid","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"|a/ADDRESS |Player\u0027s address| a/Blk 123 Bukit Batok St 21","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"|p/PHONE_NUMBER| Player\u0027s phone number| p/92343433","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"|j/JERSEY_NUMBER| Player\u0027s jersey number| j/17","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"|ra/RATING| Player\u0027s performance rating (From 1 to 5)| ra/5","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"|po/POSITION| Player\u0027s postion +","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"(1 for Striker, +","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"2 for Midfiled, +","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"3 for Defender, +","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"4 for Goalkeeper)| po/1","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"|av/AVATAR| Absolute filepath to player\u0027s avatar image file| av/C:\\avatar.png (for Windows) av//User/username/path/to/image.jpg (for MacOS)","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"|t/TAG| Your tag for the player| t/Injured","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"* A player can only be added to an existing team.","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"* If you have not created the team yet, you can create one first using the \u003c\u003cCreating a team: `create` `[Since v1.2]`, `create`\u003e\u003e command.","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"A player can have any number of tags (including 0).","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"Output: The added player should appear in the player list panel.","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"* `add n/Mo Salah e/mo@soccer.com`","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"Adds a player named `Mo Salah` with email `mo@soccer.com`.","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"* `add n/Ronaldo p/92331322 e/ronaldo@soccer.com a/Portugal tm/Real Madrid j/17 ra/5 po/1`","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"Adds a player named Ronaldo with phone number `92331322`, email `ronaldo@soccer.com`, address `Portugal`,","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"team `Real Madrid`, jersey number `17`, rating `5`, and position `1` corresponding to `Striker`.","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"[[edit]]","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Editing a player : `edit`","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"lithiumlkid"},"content":"If you made a mistake when adding a player, or if there\u0027s player information that needs updating, you may edit an existing player in MTM with the \u0027edit\u0027 command.","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"Format: `edit INDEX [n/NAME] [e/EMAIL] [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]...` +","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"Alias: `e`","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"* Edits the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e.","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"* Please only edit the player that is currently being selected. If you were to edit a player who is not selected, the player\u0027s details will be updated, but the selection will remain at the currently selected player.","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"* At least one of the optional fields must be provided.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"* When you edit tags, the existing tags of the player will be removed i.e adding of tags is not cumulative.","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":"* You can remove all the player\u0027s tags by typing `t/` without specifying any tags after it.","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com`","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st player to be `91234567` and `johndoe@example.com` respectively.","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/`","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"Edits the name of the 2nd player to be `Betsy Crower` and clears all existing tags.","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"lithiumlkid"},"content":"// end::addplayer[]","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"[[delete]]","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Deleting a player : `delete`","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"codeeong"},"content":"If you want to remove a player from MTM, you may use this command to delete the player.","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"Format: `delete INDEX` +","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"Alias: `d`","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"* Deletes the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e.","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":"* `list`","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `delete 2`","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":"Deletes the 2nd player in the MTM.","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":"* `find Betsy`","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"-"},"content":"* `delete 1`","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"lohtianwei"},"content":"Deletes the 1st player in the results of the `find` command.","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"-"},"content":"[[remark]]","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Noting down a remark for player: `remark` `[Since v1.1]`","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"-"},"content":"When you need to drop yourself a self-note with regards to a specific player you\u0027re managing, you can make a self-note","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"-"},"content":"of a specific player easily by giving the player a remark for you to remember by.","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"-"},"content":"Format: `remark INDEX [r/[REMARK]]` +","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"Alias: `rm`","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"-"},"content":"* By leaving out `r/REMARK` or `REMARK`, the command acts as a remark removal.","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"-"},"content":"* Only use the `remark` command when you want to leave a remark, `add` or `edit` does not allow you to create a remark for the player.","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"-"},"content":"* Please only add remarks to the player that is currently being selected. If you were to add remarks to a player who is not selected, the player\u0027s remarks will be updated, but the selection will remain at the currently selected player.","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"-"},"content":"Your specified player will either be given a new remark or have its existing remark removed.","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `remark` command:","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"-"},"content":"* `remark 1`","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"-"},"content":"Removes the remark from the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1.","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"-"},"content":"* `remark 5 r/MVP Player`","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"-"},"content":"Give a remark to the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 5 with the remark \"MVP Player\".","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"-"},"content":"[[list]]","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing all players : `list`","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":"To view a list of all the players you are managing, you can use the `list` command to see all of your players.","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":"Format: `list` +","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"-"},"content":"Alias: `l`","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"[[sort]]","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sorting players by field: `sort` `[Since v1.2]`","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"-"},"content":"You can sort the players by fields with the \u0027sort\u0027 command. Players can be sorted in both ascending or descending order.","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"-"},"content":"Format: `sort FIELD ORDER` +","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"-"},"content":"Alias: `so`","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"-"},"content":"* Current version of `sort` supports the following fields and order:","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"-"},"content":"** `FIELD`: `name`, `email`, `address`, `rating`, `jersey` \u0026 `position`","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"-"},"content":"** `ORDER`: `asc` \u0026 `desc`","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `sort` command:","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"-"},"content":"* `sort name asc`","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"-"},"content":"This will sort MTM by names, in alphabetical order.","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"-"},"content":"* `sort name desc`","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"-"},"content":"This will sort MTM by names, in reverse alphabetical order.","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"-"},"content":"[[find]]","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Locating players by name: `find`","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"-"},"content":"You can find a player whose name contain any of the given keywords with this command within the full player listing of MTM.","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"-"},"content":"Format: `find KEYWORD [KEYWORD]...` +","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"-"},"content":"Alias: `f`","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`.","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`.","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"-"},"content":"* Only the name is searched.","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`.","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"-"},"content":"* Players matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`.","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"* `find John`","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"-"},"content":"MTM will find all players with the name `john` with uppercase/lowercase characters in it.","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"-"},"content":"* `find Betsy Tim John`","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"-"},"content":"Display all players that have the name `betsy`, `tim`, or `john`.","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"-"},"content":"[[select]]","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Selecting a player : `select`","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"-"},"content":"Identified the player you\u0027re looking for and want to see more details about the player?","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"-"},"content":"MTM offers you the ability to view details of your specified player via an \u003c\u003cIndex, `INDEX`\u003e\u003e shown in the current listing of players.","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"-"},"content":"Alternatively, you can just scroll to the player you want, click their card,","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"-"},"content":"and their details will be displayed on the right hand side of the screen.","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"-"},"content":"Format: `select INDEX` +","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"-"},"content":"Alias: `s`","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"codeeong"},"content":"The details panel will display your selected player\u0027s name, phone number, address, email address,","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"codeeong"},"content":"jersey number, and remarks on the right side of the screen.","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `select` command:","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"* `list`","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"* `select 2`","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"Displays the list of all players and selects the 2nd player in that list.","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"* `find Betsy`","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"-"},"content":"* `select 1`","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"Finds a player named `betsy` and selects the 1st player in the results of the `find` command.","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your teams and their players in My Team Manager +","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003ccreate,creating a team\u003e\u003e, \u003c\u003cassign,assigning players to a team\u003e\u003e or \u003c\u003crename,renaming a team\u003e\u003e.","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools like \u003c\u003cview,viewing a team\u003e\u003e.","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"// tag::create[]","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"[[create]]","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a team: `create` `[Since v1.2]`","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"What is a team management application without the functionality of creating a team? When you use this command, it allows you to create a team that can be assigned to players later on.","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"Format: `create TEAM_NAME` +","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"Alias: `ct`","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"* You can\u0027t create a team that already exist in MTM.","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"-"},"content":"Your newly specified team will be created with the name you have given without any players in it, and your team name will appear in the team bar below.","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"* `create Liverpool`","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":"Creates another new team with the name \"Liverpool\" by entering `create Liverpool` into the Command Box and pressing kbd:[Enter].","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":"image::TeamCreateExampleBefore.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":"\"Liverpool\" will be shown in the Team List.","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":"image::TeamCreateExampleAfter.png[width\u003d\"350\"]","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"// end::create[]","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"-"},"content":"// tag::view[]","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"[[view]]","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a team: `view` `[Since v1.3]`","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"With the ability to manage different teams, you will be able to identify all players in a team easily with the `view` command.","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"`Coming in v2.0` +","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"Details of your team will be displayed on the right panel when `view` command is executed.","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"Format: `view TEAM_NAME` +","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"Alias: `vt`","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"Displays the list of players on the left panel that are in the team specified.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `view` command:","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":"You can use the command above to easily view all the players that exist in \"Arsenal\".","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":"image::TeamViewExampleBefore.png[width\u003d\"350\"]","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"-"},"content":"The Player List will be updated with all players in the specified team, \"Arsenal\".","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"image::TeamViewExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"// end::view[]","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"-"},"content":"// tag::assign[]","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"-"},"content":"[[assign]]","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning player to teams: `assign` `[Since v1.3]`","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"-"},"content":"Have a player without a team, or have yet to assigned one during the addition of player into MTM, you can call `assign` command to assign that player to a particular team of your choice.","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"Format: `assign [TEAM_NAME] i/INDEX [INDEX]...` +","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"Alias: `at`","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"-"},"content":"* You can assign multiple players to a team by including more than one valid \u003c\u003cIndex, `INDEX`\u003e\u003e.","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"* A player can only consist of 1 team, assigning a player that have an existing team, will be re-assigned the new team.","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"-"},"content":"* Assigning a player without a given team will unassign the player from its current team.","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"Your specified player, via \u003c\u003cIndex, `INDEX`\u003e\u003e, will be assigned to the specified team or unassigned from any team.","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"* `list`","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"View the full list of players in MTM so that you can determine which player you want to assign a team.","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"-"},"content":"image::TeamAssignListExample.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"-"},"content":"* `assign Liverpool i/1 2`","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"-"},"content":"Enter the command into the Command Box which will assign the player with \u003c\u003cIndex, `INDEX`\u003e\u003e 1 and 2 to team \"Liverpool\".","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"image::TeamAssignExampleBefore.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"image::TeamAssignExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"-"},"content":"* `add n/Rembart Loeri e/remlo@tam.com tm/Liverpool`","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"Add a player with the prefix `tm/` for `Team` will automatically be assigned to the team specified.","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleBefore.png[width\u003d\"350\"]","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::assign[]","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"-"},"content":"// tag::rename[]","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"-"},"content":"[[rename]]","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Rename a team: `rename` `[Since v1.4]`","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"-"},"content":"Entered your team name wrongly or you need to update it to accordingly, you can use the `rename` command to help you make that change.","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"-"},"content":"Format: `rename TEAM_NAME tm/RENAME_TEAM_NAME` +","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"-"},"content":"Alias: `rnt`","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"Your specified team will be updated with the new team name along with the affected players in the existing team.","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `rename` command:","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"* `rename Liverpool tm/Tello Mello`","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":"You can rename a `Team` easily by entering a similar command above, which will rename \"Liverpool\" into \"Tello Mello\".","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"-"},"content":"image::TeamRenameExampleBefore.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":"After renaming, the team name will be updated in the Team List and will be update for each individual player.","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"image::TeamRenameExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":"// end::rename[]","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":"// tag::remove[]","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"[[remove]]","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a team: `remove` `[Since v1.4]`","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"No longer managing the team or the team has been disbanded, you can easily remove the team from MTM.","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"Format: `remove TEAM_NAME` +","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"Alias: `rt`","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"* Removing a team will automatically update all affected players\u0027 `Team` field.","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"* Players without a team will need to be re-assigned.","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"Remove the specified team and update all affected players.","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"Here are a few valid examples of how you can use the `remove` command:","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"-"},"content":"Here we show you what it would be like before the removal of \"Arsenal\".","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleBefore.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"-"},"content":"* `remove Arsenal`","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":"After typing the command, you will remove the the team from MTM and will be taken off the Team Display as well as updating each individual player affected to be without a team.","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":"// end::remove[]","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful commands to change the look of My Team Manager to \u003c\u003csetTagColour, set the colour of your tags\u003e\u003e and \u003c\u003cchangeTeam,change the theme\u003e\u003e.","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":"// tag::setTagColour[]","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"lithiumlkid"},"content":"[[setTagColour]]","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting colour of tags : `setTagColour` `[Since v1.2]`","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":"You can set the tags to a colour of your choice with the \u0027setColourTag\u0027 command.","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"-"},"content":"Format: `setTagColour t/TAG tc/COLOUR` +","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"-"},"content":"Alias: `stc`","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"codeeong"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"-"},"content":"* The tag must currently be in used in MTM for this command to work.","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"-"},"content":"* Current version of `setTagColour` supports only this list of preset `COLOUR`:","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"** `teal`, `red`, `yellow`, `blue`, `orange`, `brown`, `green`, `pink`, `black`, `grey`","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"-"},"content":"* The current version of `setTagColour` is *NOT* an UndoableCommand.","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a setTagCommand.","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"-"},"content":"* Instead, just enter `stc t/TAG tc/COLOUR` to change the colour back!","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"codeeong"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"codeeong"},"content":"You will see the specified tags in the left panel change to the colour of your choice.","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `setTagColour` command:","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"codeeong"},"content":"* `stc t/redCard t/red`","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"codeeong"},"content":"All the tags that say \"redCard\" in the left panel will now turn red.","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"-"},"content":"// end::setTagColour[]","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"-"},"content":"// tag::changeTheme[]","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"-"},"content":"[[changeTheme]]","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Changing theme : `changeTheme` `[Since v1.5]`","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"codeeong"},"content":"If you feel that the dark theme is not for you, and you prefer to work on a brighter interface,","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"codeeong"},"content":"you can change the theme from the default Dark Theme to Light Theme with the \u0027changeTheme\u0027 command.","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"-"},"content":"Format: `changeTheme THEME` +","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"codeeong"},"content":"Alias: `cte`","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"-"},"content":"* Current version of `changeTheme` only supports this 2 `THEME`:","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"-"},"content":"** `Light` or `Dark`","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"-"},"content":"* The current version of `changTheme` is *NOT* an UndoableCommand.","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a `changeTheme` command.","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"-"},"content":"* Instead, just enter `cte THEME` to change the colour back!","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `changeTheme` command:","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"codeeong"},"content":"* `cte Light`","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"codeeong"},"content":"You will see the whole interface change from a dark-coloured theme to become light-coloured.","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":"// end::changeTheme[]","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coming Soon","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"lohtianwei"},"content":"There is more to come with the next upcoming update! Keep a lookout for these newly implemented features soon!","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":"// tag::changePass2.0[]","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change password: `changepass` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"Should you feel that the default password used in `key` could be more secure, you may change it to a password of your","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"choosing with this command.","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"Format: `changepass CURRENT_PASSWORD NEW_PASSWORD CONFIRM_PASSWORD` +","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"Alias: `cpw`","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":"Here is how you can change the your password:","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"-"},"content":"* `changepass ilikesports Securep@ssword1 Securep@ssword1`","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":"// end::changePass2.0[]","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"// tag::showBest2.0[]","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Showing Best XI players: `showBest` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":"If you went to see your current best 11 players in your team based on their respective stats, this command","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"is for you.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"Format: `showBest` +","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":"Alias: `sb`","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"lohtianwei"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"lohtianwei"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"lohtianwei"},"content":"A lineup of the best 11 players would be displayed. It would consist of 1 Goalkeeper,","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"lohtianwei"},"content":"4 Defenders, 4 Midfielders and 2 Strikers.","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"lohtianwei"},"content":"// end::showBest2.0[]","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":"// tag::team2.0[]","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting an upcoming match with an opposing team: `setmatch` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":"With this command, it gives you a convenient way to keep track of the upcoming match of a team.","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":"Format: `setmatch TEAM_NAME OPPONENT_TEAM_NAME DATE` +","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"Alias: `sm`","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"* Date format to be entered is in `DD/MM/YYYY`. +","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"* Opponent team does not need to exist in MTM.","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":"The upcoming match of the team will be captured and displayed to you.","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":"* `setmatch Arsenal Liverpool 14/03/2018`","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":"Display the list of players in team \"Arsenal\" and set an upcoming match for Arsenal with Liverpool on 14/03/2018.","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing the team\u0027s next upcoming match: `nextmatch` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"codeeong"},"content":"You can easily determine the up and coming match with the team so that you never miss an important date.","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"Format: `nextmatch TEAM_NAME` +","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"Alias: `nm`","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"Displays the date and opponent for the upcoming match of the team specified.","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"codeeong"},"content":"Here are a few valid examples on how you can use the `nextmatch` command:","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":"* `nextmatch Arsenal`","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":"Displays the list of players in team \"Arsenal\" and view the next upcoming match for \"Arsenal\".","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":"// end::team2.0[]","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"codeeong"},"content":"// tag::showlineup[]","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Displaying lineup for next match: `showLineup` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"codeeong"},"content":"You can view the lineup for the current best 11 players.","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"Format: `showLineup TEAM_NAME` +","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"codeeong"},"content":"Alias: `sl`","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"codeeong"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"codeeong"},"content":"The panel on the right will show the avatars of the 11 players that will be playing for the next match.","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"codeeong"},"content":"Here is an valid example on how you can use the `showLineup` command:","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `showLineup Arsenal`","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"codeeong"},"content":"Displays the 11 main players that will be playing for the next match.","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"codeeong"},"content":"// end::showlineup[]","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Scheduling trainings for team `schedule` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sending reminder emails to players: `send` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving feedback to developers: `feedback` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving demerit to players based on performance: `demerit` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous MTM folder.","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"// tag::commandsummary[]","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"[[Index]]`INDEX` - The `INDEX` refers to the index number shown in the last player listing. The `INDEX` must be a positive integer 1, 2, 3, …","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d Command Summary","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":"Just a quick reference sheet for all your needs. Never forget how to use MTM ever again.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Basic Commands and Features","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"|\u003c\u003cautocomplete, `Autocomplete`\u003e\u003e","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":"|kbd:[tab]","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"-"},"content":"|kbd:[tab] kbd:[space] kbd:[\u0026uarr;] kbd:[\u0026darr;]","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":"d|Fills in your command for you","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":"|\u003c\u003chelp, `help`\u003e\u003e","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":"|kbd:[F1]","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":"|help","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"d|Shows the user guide","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"|\u003c\u003chistory, `history`\u003e\u003e","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"|`h`","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"|history","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":"d|Displays the list of commands entered previously","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"|\u003c\u003cundo, `undo`\u003e\u003e","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"|`u`","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":"|undo","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"d|Undo the previous command","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"|\u003c\u003credo, `redo`\u003e\u003e","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":"|`r`","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"|redo","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"d|Redo the previous command","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":"|\u003c\u003ctoggleprivacy, `toggleprivacy`\u003e\u003e","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":"|`tp`","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":"|toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":"|toggleprivacy 2 a/","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"|\u003c\u003ckey, `key`\u003e\u003e","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"|`k`","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":"|key PASSWORD","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":"|key ilikesports","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":"|\u003c\u003cclear, `clear`\u003e\u003e","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":"|`c`","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":"|clear","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":"d|Removes all information in the application","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":"|\u003c\u003cexit, `exit`\u003e\u003e","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"|`NONE`","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"|exit","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"d|Exits the application","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"-"},"content":"|\u003c\u003cadd, `add`\u003e\u003e","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"|`a`","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"lithiumlkid"},"content":"|add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]...","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"lithiumlkid"},"content":"|add n/Ospina e/Ospina@arsenal.com tm/Arsenal a/70 Jurong Central Circle p/90722998 j/1 ra/2 po/4 av/Capture.png t/redCard","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"-"},"content":"|\u003c\u003cedit, `edit`\u003e\u003e","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"-"},"content":"|`e`","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"-"},"content":"|edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]...","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"-"},"content":"|edit 2 n/James Lee e/jameslee@example.com","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"-"},"content":"|\u003c\u003cdelete, `delete`\u003e\u003e","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"-"},"content":"|`d`","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"-"},"content":"|delete INDEX","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"-"},"content":"|delete 3","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"-"},"content":"|\u003c\u003cremark, `remark`\u003e\u003e","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"-"},"content":"|`rm`","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"-"},"content":"|remark INDEX [r/[REMARK]]","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":"|remark 4 r/Gotta go faster","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"-"},"content":"|\u003c\u003clist, `list`\u003e\u003e","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"-"},"content":"|`l`","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"|list","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"d|List all the players","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003c\u003csort, `sort`\u003e\u003e","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|`so`","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|sort FIELD ORDER","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":"|sort name asc","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"|\u003c\u003cfind, `find`\u003e\u003e","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`f`","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":"|find KEYWORD [KEYWORD]...","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":"|find James Jake","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"|\u003c\u003cselect, `select`\u003e\u003e","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"|`s`","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"-"},"content":"|select INDEX","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"-"},"content":"|select 2","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"|\u003c\u003ccreate, `create`\u003e\u003e","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"|`ct`","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"|create TEAM_NAME","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"|create Arsenal","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"|\u003c\u003cview, `view`\u003e\u003e","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"|`vt`","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"|view TEAM_NAME","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"|view Liverpool","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"|\u003c\u003cassign, `assign`\u003e\u003e","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"|`at`","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|assign [TEAM_NAME] i/INDEX [INDEX]...","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"|assign Barcelona i/1 2 3","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"|\u003c\u003crename, `rename`\u003e\u003e","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":"|`rnt`","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"|rename TEAM_NAME tm/RENAME_TEAM_NAME","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":"|rename Arsenal tm/Neo Arsenal","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":"|\u003c\u003cremove, `remove`\u003e\u003e","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"|`rt`","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":"|remove TEAM_NAME","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"|remove Real Madrid","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"|\u003c\u003csetTagColour, `setTagColour`\u003e\u003e","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"|`stc`","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"|setTagColour t/TAG tc/COLOUR","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"|setTagColour t/friends tc/yellow","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"-"},"content":"|\u003c\u003cchangeTheme, `changeTheme`\u003e\u003e","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"-"},"content":"|`cte`","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"-"},"content":"|changeTheme THEME","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"|changeTheme Dark","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"-"},"content":"// end::commandsummary[]","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":106,"lohtianwei":26,"codeeong":64,"-":917}},{"path":"docs/team/ahmadsyafiq.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lithiumlkid"},"content":"\u003d Ahmad Syafiq - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lithiumlkid"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d PROJECT: My Team Manager","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"---","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lithiumlkid"},"content":"My Team Manager is a desktop address book application developed as part of a Software Engineering module requirement. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 6 kLoC.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Summary of contributions","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lithiumlkid"},"content":"* *Major enhancement*: added *replaced person object with player object*","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to add and edit players that contain more attributes/information such as jersey, position, rating and avatar","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lithiumlkid"},"content":"** Justification: This feature improves the product significantly because a user can fill the address book with more important information which can be used for other utility functions such as sort.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":"It is accompanied with improved GUI to increase usability. Eg. the user can see player\u0027s avatar for better identification.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lithiumlkid"},"content":"** Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lithiumlkid"},"content":"* *Minor enhancement*: added a *tab - autocomplete function*","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to enter command lines more quickly by helping them complete commands by pressing the tab key. It also allows them to view suggested command and command parameters in case","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lithiumlkid"},"content":"the forget.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lithiumlkid"},"content":"** Credits: To make the search optimal, I used Tries as suggested on geek-for-geeks.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lithiumlkid.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lithiumlkid.md[Test code]]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lithiumlkid"},"content":"* *Other contributions*:","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lithiumlkid"},"content":"** Project management:","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lithiumlkid"},"content":"*** Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"** Enhancements to existing features:","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"*** Enhanced the help function to only allow one help window at a time. (Pull request https://github.com/CS2103JAN2018-F14-B1/main/pull/169[#169])","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":"** Documentation:","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lithiumlkid"},"content":"*** Did cosmetic tweaks to existing contents of the User Guide: https://github.com/CS2103JAN2018-F14-B1/main/pull/53[#53]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lithiumlkid"},"content":"** Community:","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":"*** PRs reviewed (with non-trivial review comments): https://github.com/CS2103JAN2018-F14-B1/main/pull/172[#172]","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"*** Contributed to forum discussions (examples: https://github.com/nus-cs2103-AY1718S2/forum/issues/39[39], https://github.com/nus-cs2103-AY1718S2/forum/issues/47[#47])","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":"*** Reported bugs and suggestions for other teams in the class (example: https://github.com/CS2103JAN2018-F14-B3/main/issues/228[#228])","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lithiumlkid"},"content":"** Tools:","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lithiumlkid"},"content":"*** Integrated a new Github plugin (CircleCI) to the team repo","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the User Guide","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003daddplayer]","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003dautocomplete]","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the Developer Guide","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dplayer]","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dautocomplete]","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":60,"-":1}},{"path":"docs/team/codeeong.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"\u003d Codee Ong - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"---","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop application for *football team managers* to organise the information of players they are in charge of.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"The primary usage of this application is to add and assign players to teams, and then edit and remove information related to","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"the players as and when it is required. MTM is value added with usability features that help the team manager manage his/her","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"teams and players efficiently.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"The user interacts with MTM using a *Command Line Interface*, and it has a GUI created with JavaFX.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Summary of contributions","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"* *Major enhancement*: Revamped the original user interface to one that suits the usage of an application for *team managers*.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"** What it does: The change in UI allows the user to *keep track* of which team he/she is looking at, to *view his/her players\u0027 details*,","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"and even perform some *customisation* of the application theme.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"** Justification: The overhaul of the UI is absolutely necessary to ensure the *best user experience* for users of My Team Manager. Previously,","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"the existing UI components were neither sufficient nor suitable for management of sports teams.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"** Highlights: Addition of the *team display bar*, the *player details pane* when a player is selected, addition of *MTM logo*,","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"and *changeTheme* command.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"* *Minor enhancement*: addition of a *setTagCommand* that allows the user to change existing tags to a colour of their choice.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/Codee.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/Codee.md[Test code]]","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"* *Other contributions*:","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"** Project management:","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"*** Generated release files (.jar) in `v1.4` and `v1.5rc` (2 releases), and contributed release descriptions on GitHub.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"** Enhancements to existing features:","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"*** changed the original GUI colour scheme [https://github.com/CS2103JAN2018-F14-B1/main/pull/89[PR #89]]","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"** Documentation:","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"*** changed the project name in all the relevant files so that it will be \"My Team Manager\" and not \"Address Book App\", including the data files. [https://github.com/CS2103JAN2018-F14-B1/main/pull/120[PR #120]]","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"*** Constantly updated the README and UserGuide\u0027s application preview image. [https://github.com/CS2103JAN2018-F14-B1/main/pull/99[PR #99]][https://github.com/CS2103JAN2018-F14-B1/main/pull/160[PR #160]]","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"** Community:","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"*** PRs Reviewed (with non trivial comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/95[PR #95]][https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR #169]][https://github.com/CS2103JAN2018-F14-B1/main/pull/175[PR #175]]","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the User Guide","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting the users of MTM._","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dchangeTheme]","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dsetTagColour]","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dshowlineup]","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the Developer Guide","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dsettagcolour]","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dteamDisplay]","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dPlayerDetails]","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dchangeThemeCommand]","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":72}},{"path":"docs/team/lohtianwei.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"\u003d Loh Tian Wei - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"---","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"My Team Manager (MTM) is a dekstop address book application for *football team managers*.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"It can also be personalised to be used for other sports team management too such as basketball.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"With the features it provides, management of your players\u0027 contact details and team information is made easy. While","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"interactions between user and application is mainly by a *Command Line Interface (CLI)*, it features a JavaFx GUI display.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Summary of contributions","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"* *Major enhancement*: Added *security and privacy features*","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"** *What it does*: Ensures the information stored in MTM is *secured and kept private* when needed","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"** *Justification*: This feature is crucial for protecting the *confidentiality and integrity* of the details stored in MTM.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"It prevents unauthorised tampering of information while also maintaining confidentiality.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"** *Highlights*: Addition of a *locking mechanism* to limit functionality of MTM and changing *privacy of fields* that would maintain","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"confidentiality of certain information","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"* *Minor enhancement*:","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"** Added a sort function that allows the list to be sorted by fields for quick viewing of relevant information","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lohtianwei.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lohtianwei.md[Test code]]","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"* *Other contributions*:","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"** Project management:","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"*** Documented issues of project using GitHub\u0027s Issue Tracker and address the issues accordingly.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"** Enhancements to existing features:","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"*** Changes are mentioned in \u003c\u003cMinor Enhancement, Minor enhancement\u003e\u003e.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"** Documentation:","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"** Community:","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":"*** PRs reviewed (with non-trivial review comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR#169]]","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"*** Reported bugs and suggestions for other teams in the class (https://github.com/CS2103JAN2018-W09-B2/main/issues/198[1],","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/194[2],","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/182[3],","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/174[4])","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the User Guide","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dtogglePrivacy]","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dkey]","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the Developer Guide","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dkey]","isFullCredit":true}],"authorContributionMap":{"lohtianwei":68,"-":1}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * The main entry point to the application.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" public static final Version VERSION \u003d new Version(1, 1, 0, true);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" protected Ui ui;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Logic logic;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Config config;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void init() throws Exception {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" super.init();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" initLogging(config);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" logic \u003d new LogicManager(model);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" initEventsCenter();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" Config initializedConfig;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" String configFilePathUsed;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" return initializedConfig;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * reading from the file.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" return initializedPrefs;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" ui.start(primaryStage);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" ui.stop();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" System.exit(0);","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" this.stop();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" launch(args);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":211}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private String appTitle \u003d \"My Team Manager\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_THEME \u003d \"This theme does not exist!\\n\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TEAM_NOT_FOUND \u003d \"Team does not exist or is not specified!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_ALL_INDEX \u003d \"All person index provided is invalid\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":15}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeTagColourEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to change tag colour","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeTagColourEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String tagColour;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public ChangeTagColourEvent(String tagName, String tagColour) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":23}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**@@author Codee */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Indicates a request for theme change.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String theme;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ChangeThemeEvent(String theme) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().toString();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/ClearTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for clearing of all teams.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ClearTeamsEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public ClearTeamsEvent() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":7,"-":13}},{"path":"src/main/java/seedu/address/commons/events/ui/DeselectTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to deselected selected teams.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"public class DeselectTeamEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" public DeselectTeamEvent() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/HighlightSelectedTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to highlight selected team name.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class HighlightSelectedTeamEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public HighlightSelectedTeamEvent(String teamName) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" private final Person editedPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedEvent(Person editedPerson, Index index) {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" this.editedPerson \u003d editedPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" public Person getPerson() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" return this.editedPerson;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" return this.index;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":34}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedNoParamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel, but no paramaters.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedNoParamEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedNoParamEvent() { }","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/ShowNewTeamNameEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to show new team name.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ShowNewTeamNameEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ShowNewTeamNameEvent(String teamName) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":22}},{"path":"src/main/java/seedu/address/commons/events/ui/UndoTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for undoing clearing of all teams.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class UndoTeamsEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public UndoTeamsEvent() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":7,"-":11}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * API of the Logic component","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public interface Logic {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of list of teams */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /** Returns the command trie. */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" CommandTrie getCommandTrie();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":4,"-":32}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final CommandHistory history;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final CommandTrie commandTrie;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" commandTrie \u003d new CommandTrie();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" return result;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" } finally {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" history.add(commandText);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return model.getInitTeamList();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public CommandTrie getCommandTrie() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return commandTrie;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":6,"-":64}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TEAM_NAME;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Adds a player to the address book.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a player to the address book. \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TEAM_NAME + \"TEAMNAME] \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" + PREFIX_RATING + \"0 \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" + PREFIX_POSITION + \"1 \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + PREFIX_JERSEY_NUMBER + \"17 \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"goodAttitude\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New player added: %1$s\";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" private final Person toAdd;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code Person}","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public AddCommand(Person person) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" requireNonNull(person);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" toAdd \u003d person;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException e) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" TeamName teamName \u003d toAdd.getTeamName();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" if (!model.getAddressBook().getTeamList().stream().anyMatch(t -\u003e t.getTeamName().equals(teamName))) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (!teamName.toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" throw new CommandException((Messages.MESSAGE_TEAM_NOT_FOUND));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" || (other instanceof AddCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" \u0026\u0026 toAdd.equals(((AddCommand) other).toAdd));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":122}},{"path":"src/main/java/seedu/address/logic/commands/ChangeThemeCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Changes the theme of the Address Book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"changeTheme\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"cte\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" + \": Changes the theme of MTM.\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" + \"Parameters: THEME (must be either Light, or Dark)\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Examples: changeTheme Light, cte Dark\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_THEME_SUCCESS \u003d \"Theme updated to: %1$s\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final String theme;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" if (!isValidTheme(this.theme)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_THEME);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" if ((MainWindow.getCurrentTheme()).contains(this.theme)) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" throw new CommandException(\"Theme is already set to \" + this.theme + \"!\");","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private boolean isValidTheme(String theme) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" return theme.equals(\"Light\") || theme.equals(\"Dark\");","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" || (other instanceof ChangeThemeCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.theme.equals(((ChangeThemeCommand) other).theme)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":54}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Clears the address book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" model.resetData(new AddressBook());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // @@author Codee","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new ClearTeamsEvent());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" // @@author","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":2,"-":25}},{"path":"src/main/java/seedu/address/logic/commands/CreateCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Creates a team to the application","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class CreateCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"create\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"ct\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \"Creates a team in MTM. \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"TEAM_NAME\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Arsenal\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New team created: %1$s\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_TEAM \u003d \"This team already exist in the manager\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Team toCreate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Creates a CreateCommand to add the specified (@code Team)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CreateCommand(Team team) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" requireNonNull(team);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.toCreate \u003d team;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" model.createTeam(toCreate);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TEAM);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ShowNewTeamNameEvent(toCreate.getTeamName().toString()));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toCreate.getTeamName().toString()));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof CreateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 toCreate.equals(((CreateCommand) other).toCreate));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":3,"-":57}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Deletes a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \": Deletes the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private Person personToDelete;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public DeleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" requireNonNull(personToDelete);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" personToDelete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex) // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(this.personToDelete, ((DeleteCommand) other).personToDelete));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":69}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Edits the details of an existing player in the address book.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the player identified \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: %1$s\";","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book.\";","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" private Person personToEdit;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" private Person editedPerson;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * @param index of the player in the filtered player list to edit","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the player with","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" if (!editedPerson.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" editedPerson.getAvatar().setFilePath(editedPerson.getName().fullName);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * edited with {@code editPersonDescriptor}.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * NOTE: Private fields will not be edited.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static Person createEditedPerson(Person personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" Name updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" Phone updatedPhone \u003d (personToEdit.getPhone().isPrivate())","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" ? personToEdit.getPhone() : editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" Email updatedEmail \u003d (personToEdit.getEmail().isPrivate())","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" ? personToEdit.getEmail() : editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" Address updatedAddress \u003d (personToEdit.getAddress().isPrivate())","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" ? personToEdit.getAddress() : editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate())","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" ? personToEdit.getRemark() : personToEdit.getRemark();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" Rating updatedRating \u003d editPersonDescriptor.getRating().orElse(personToEdit.getRating());","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" JerseyNumber updatedJerseyNumber \u003d editPersonDescriptor.getJerseyNumber()","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" .orElse(personToEdit.getJerseyNumber());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" Position updatedPosition \u003d editPersonDescriptor.getPosition().orElse(personToEdit.getPosition());","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" return index.equals(e.index)","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor)","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(personToEdit, e.personToEdit);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" * Stores the details to edit the player with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" * corresponding field value of the player.","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" private Name name;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" private Phone phone;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" private Email email;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" private Address address;","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" private Rating rating;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" private Position position;","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" private JerseyNumber jerseyNumber;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" private Avatar avatar;","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Copy constructor.","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally.","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" setName(toCopy.name);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" setPhone(toCopy.phone);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" setEmail(toCopy.email);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" setAddress(toCopy.address);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" setTags(toCopy.tags);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" setRating(toCopy.rating);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" setPosition(toCopy.position);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" setJerseyNumber(toCopy.jerseyNumber);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" setAvatar(toCopy.avatar);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.tags,","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" this.rating, this.position, this.jerseyNumber, this.avatar);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Sets {@code tags} to this object\u0027s {@code tags}.","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally.","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" this.tags \u003d (tags !\u003d null) ? new HashSet\u003c\u003e(tags) : null;","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * Returns an unmodifiable tag set, which throws {@code UnsupportedOperationException}","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" * if modification is attempted.","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" * Returns {@code Optional#empty()} if {@code tags} is null.","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" return (tags !\u003d null) ? Optional.of(Collections.unmodifiableSet(tags)) : Optional.empty();","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" public void setRating(Rating rating) {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" this.rating \u003d rating;","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" public Optional\u003cRating\u003e getRating() {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" return Optional.ofNullable(rating);","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" public void setPosition(Position position) {","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" this.position \u003d position;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" public Optional\u003cPosition\u003e getPosition() {","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" return Optional.ofNullable(position);","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" public void setJerseyNumber(JerseyNumber jerseyNumber) {","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" this.jerseyNumber \u003d jerseyNumber;","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" public Optional\u003cJerseyNumber\u003e getJerseyNumber() {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" return Optional.ofNullable(jerseyNumber);","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" public void setAvatar(Avatar avatar) {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" this.avatar \u003d avatar;","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" public Optional\u003cAvatar\u003e getAvatar() {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" return Optional.ofNullable(avatar);","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags())","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" \u0026\u0026 getRating().equals(e.getRating())","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" \u0026\u0026 getPosition().equals(e.getPosition())","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":" \u0026\u0026 getJerseyNumber().equals(e.getJerseyNumber())","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar());","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":335}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Finds and lists all persons in address book whose name contains any of the argument keywords.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"KEYWORD [MORE KEYWORD]\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final NameContainsKeywordsPredicate predicate;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" this.predicate \u003d predicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" || (other instanceof FindCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 this.predicate.equals(((FindCommand) other).predicate)); // state check","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/KeyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Sets lock in model to true/false depending on current state","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"key\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"k\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the lock on MTM. \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"Functionality of MTM reduced\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Input empty password to see current lock state\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: [PASSWORD]\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \" myPassword\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"MTM lock toggled!\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_WRONG_PASS \u003d \"Password entered is incorrect. Please try again.\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"[PASSWORD]\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" private String password;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final Logger logger \u003d LogsCenter.getLogger(KeyCommand.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand(String password) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" this.password \u003d password;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" * Checks if input password is correct.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" private boolean correctPassword() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" UserPrefs up \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" return hash.equals(up.getAddressBookHashedPass());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" private boolean emptyPass() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" return password.isEmpty();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (emptyPass()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_USAGE + \"\\nLock state is now: \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" if (correctPassword()) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (model.getLockState()) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS + \"\\nLock state is now: \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_WRONG_PASS);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":74}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all persons\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":4,"-":20}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/RemarkCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Updates the remark of an existing player in the address book.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RemarkCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"remark\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"rm\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Updates the remark of the player identified \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"[REMARK]\\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"Must put on field\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADD_REMARK_SUCCESS \u003d \"Remark added to: %1$s\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_REMARK_SUCCESS \u003d \"Remark removed from: %1$s\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Remark remark;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private Person personToEdit;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Person editedPerson;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public RemarkCommand(Index index, Remark remark) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" requireNonNull(personToEdit);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Updating remark should not result in duplicate\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new CommandResult(getSuccessMessage(editedPerson));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" editedPerson \u003d new Person(personToEdit.getName(), personToEdit.getPhone(), personToEdit.getEmail(),","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" personToEdit.getAddress(), remark, personToEdit.getTeamName(), personToEdit.getTags(),","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" personToEdit.getRating(), personToEdit.getPosition(), personToEdit.getJerseyNumber(),","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" personToEdit.getAvatar());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!(other instanceof RemarkCommand)) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" RemarkCommand e \u003d (RemarkCommand) other;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return index.equals(e.index)","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" \u0026\u0026 remark.equals(e.remark);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Gets the corresponding success message based on the remark field from {@code personToEdit} after editing.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" private String getSuccessMessage(Person person) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" String message \u003d remark.value.isEmpty() ? MESSAGE_DELETE_REMARK_SUCCESS : MESSAGE_ADD_REMARK_SUCCESS;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return String.format(message, personToEdit);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":4,"-":107}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":54}},{"path":"src/main/java/seedu/address/logic/commands/SetCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" * Adds a colour to a tag in address book.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/** @@author Codee Ong Ong */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"setTagColour\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sets the colour of tags to the colour of choice \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"TAG \"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"friends \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG_COLOUR + \"green\\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" + \"Colours to choose from are : teal, red, yellow, blue, orange, brown, \\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" + \"green, pink, black, grey\\n\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_TAG + \"TAG \" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_TAG \u003d \"tag is invalid! Please input a valid tag name!\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_SUCCESS \u003d \"tag %1$s colour changed to %2$s\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private final String tagColour;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" * Creates an AddCommand to add the specified {@code Person}","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" if (!tagToSet.isValidTagName(tagToSet.getTagName()) || !isTagValid) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_INVALID_TAG));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // Check if","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" // (a) Object is the same object","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" // (b) Object is an instance of the object and that toSet, tag and color are the same","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" || (other instanceof SetCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagToSet.getTagName().equals(((SetCommand) other).tagToSet.getTagName()))","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagColour.equals(((SetCommand) other).tagColour);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Sorts all players in address book by field. Can be done in asc or desc order.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class SortCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_ASCENDING \u003d \"asc\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_DESCENDING \u003d \"desc\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts players in address book \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"by fields in either ascending or descending order.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: FIELD ORDER\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted fields for sort: name, email, address, rating, jersey, pos\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted orders: asc \u0026 desc\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" + \" name \" + BY_ASCENDING;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"FIELD ORDER\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Players in address book have been sorted.\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_EMPTY_BOOK \u003d \"No player(s) to sort.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private final String field;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final String order;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public SortCommand(String field, String order) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(field);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(order);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" this.field \u003d field;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" this.order \u003d order;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public String getField() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" return this.field;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public String getOrder() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return this.order;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" model.sortPlayers(getField(), getOrder());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" } catch (NoPlayerException npe) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_EMPTY_BOOK);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":62}},{"path":"src/main/java/seedu/address/logic/commands/TogglePrivacyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" * Toggles privacy of fields of player identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"toggleprivacy\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"tp\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the field privacy of the person\"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" + \" identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"]\"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_EMAIL + \"]\"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_REMARK + \"]\"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_RATING + \"]\"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_ADDRESS + \"]\\n\"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE + \" \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_EMAIL + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"No prefixes were specified!\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE]\"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_EMAIL + \"EMAIL]\"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_REMARK + \"REMARK]\"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_RATING + \"RATING]\"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_ADDRESS + \"ADDRESS]\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" private final EditPersonPrivacy epp;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" private Person personToEdit;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" private Person editedPerson;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" * @param index of the person in the filtered person list to edit privacy","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand(Index index, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(epp);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d epp;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" editedPerson \u003d createEditedPrivacyPerson(personToEdit, epp);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Person must have all fields!\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" * edited with {@code editPersonPrivacy}.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" * NOTE: Private fields will not be edited.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" return phone;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" private static Email createEmailPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" Email email;","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Email\");","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateEmail() !\u003d null) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" email.togglePrivacy();","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" return email;","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" private static Address createAddressPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" Address address;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Address\");","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateAddress() !\u003d null) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":" address.togglePrivacy();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" return address;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" private static Remark createRemarkPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Remark\");","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRemark() !\u003d null) {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":" remark.togglePrivacy();","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" return remark;","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Rating) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Rating) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" private static Rating createRatingPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":" Rating rating;","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Rating\");","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRating() !\u003d null) {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":" rating.togglePrivacy();","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" return rating;","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":" return index;","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy getEpp() {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" return epp;","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" return true;","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof TogglePrivacyCommand)) {","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" return false;","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"lohtianwei"},"content":" // state check","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand e \u003d (TogglePrivacyCommand) other;","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" return index.equals(e.index)","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 epp.equals(e.epp);","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" * corresponding field value of the person.","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" public static class EditPersonPrivacy {","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" private Boolean privatePhone;","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateEmail;","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateAddress;","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRemark;","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRating;","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy() {}","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":" * Copy constructor.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"lohtianwei"},"content":" * A defensive copy of {@code tags} is used internally.","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy (EditPersonPrivacy toCopy) {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d toCopy.privateAddress;","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d toCopy.privateEmail;","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d toCopy.privatePhone;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d toCopy.privateRemark;","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d toCopy.privateRating;","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"lohtianwei"},"content":" public void setPrivatePhone(boolean privatePhone) {","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d privatePhone;","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivatePhone() {","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"lohtianwei"},"content":" return privatePhone;","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateEmail(boolean privateEmail) {","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d privateEmail;","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateEmail() {","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"lohtianwei"},"content":" return privateEmail;","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateAddress(boolean privateAddress) {","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d privateAddress;","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateAddress() {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"lohtianwei"},"content":" return privateAddress;","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRemark(boolean privateRemark) {","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d privateRemark;","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRemark() {","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":" return privateRemark;","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRating(boolean privateRating) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d privateRating;","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRating() {","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"lohtianwei"},"content":" return privateRating;","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"lohtianwei"},"content":" *","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"lohtianwei"},"content":" * @return true if at least one field is not null","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":" public boolean anyNonNullField() {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"lohtianwei"},"content":" return CollectionUtil.isAnyNonNull(this.privateAddress, this.privateEmail, this.privatePhone,","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"lohtianwei"},"content":" this.privateRating, this.privateRemark);","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"lohtianwei"},"content":" return true;","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof EditPersonPrivacy)) {","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"lohtianwei"},"content":" return false;","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"lohtianwei"},"content":" // state check","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy e \u003d (EditPersonPrivacy) other;","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"lohtianwei"},"content":" return getPrivatePhone().equals(e.getPrivatePhone())","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateAddress().equals(e.getPrivateAddress())","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateEmail().equals(e.getPrivateEmail())","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRemark().equals(e.getPrivateRemark())","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRating().equals(e.getPrivateRating());","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":394,"-":2}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/ViewCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * View a team identified using it\u0027s team name from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ViewCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"view\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"vt\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \": Views the team identified by the team name.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: TEAM_NAME\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" Arsenal\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_VIEW_TEAM_SUCCESS \u003d \"Viewing Team: %1$s\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final TeamName targetTeam;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public ViewCommand(TeamName targetTeam) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.targetTeam \u003d targetTeam;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(targetTeam.toString()));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(targetTeam);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_VIEW_TEAM_SUCCESS, targetTeam.toString()));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof ViewCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetTeam.equals(((ViewCommand) other).targetTeam)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":51}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemoveCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RenameCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ViewCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Parses user input.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddressBookParser {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_RESTRICTED \u003d \"Not allowed! Please unlock MTM before execution.\\n\"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" + KeyCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * @param userInput full user input string","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @return the command based on the user input","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Command res \u003d lowLevelCommand(commandWord, arguments);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" if (res !\u003d null) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return res;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" if (lockState) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(MESSAGE_RESTRICTED);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" case AddCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" case EditCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" case SelectCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" case DeleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" case ClearCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" return new RemarkCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" case HistoryCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" return new HistoryCommand();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new CreateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return new RemoveCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new AssignCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" return new RenameCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" case UndoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" return new UndoCommand();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case RedoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new RedoCommand();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" return new SetCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" return new TogglePrivacyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * Checks for low level command words or aliases that do not violate restriction of a locked MTM.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" * Else, control is returned back to original parseCommand method.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" * @param commandWord","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" * @param arguments","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" switch(commandWord) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" return new ChangeThemeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" return new ViewCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" return null;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":82,"codeeong":6,"-":95}},{"path":"src/main/java/seedu/address/logic/parser/ChangeThemeCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.ChangeThemeCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Parses input arguments and creates a new ThemeCommand object.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParser implements Parser\u003cChangeThemeCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" * Parses the given (@code String) in the context of a ThemeCommand.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" * @return ThemeCommand Object for execution","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand parse(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" if (userInput.length() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" return new ChangeThemeCommand(userInput);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":26}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final Prefix PREFIX_TAG_COLOUR \u003d new Prefix(\"tc/\");","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TEAM_NAME \u003d new Prefix(\"tm/\");","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_INDEX \u003d new Prefix(\"i/\");","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_RATING \u003d new Prefix(\"ra/\");","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_JERSEY_NUMBER \u003d new Prefix(\"j/\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_POSITION \u003d new Prefix(\"po/\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"av/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":21}},{"path":"src/main/java/seedu/address/logic/parser/KeyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Parses input and creates KeyCommand object with password provided","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandParser implements Parser\u003cKeyCommand\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the KeyCommand","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" * and returns a KeyCommand object for execution.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" /*if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }*/","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length \u003e 1) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommand(argKeywords[0]);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":31}},{"path":"src/main/java/seedu/address/logic/parser/SetCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" * This class is to check whether Set Command was input correctly","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" * Parses the given {@code String} of arguments in the context of the SetCommand","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * and returns an SetCommand object for execution.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG, PREFIX_TAG_COLOUR);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG, PREFIX_TAG_COLOUR)","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" || !argMultimap.getPreamble().isEmpty()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d ParserUtil.parseTag(argMultimap.getValue(PREFIX_TAG).get());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" String colour \u003d ParserUtil.parseTagColour(argMultimap.getValue(PREFIX_TAG_COLOUR).get());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" if (!tag.isValidTagColour(colour)) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" return new SetCommand(tag, colour);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":56}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new SortCommand object with field and order parameters provided","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_FIELDS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" \"name\", \"email\", \"address\", \"rating\", \"jersey\", \"pos\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_ORDERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" \"asc\", \"desc\"));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public SortCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" //eliminates spaces","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" //accounts for caps entries","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length !\u003d 2) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_FIELDS.contains(argKeywords[0])) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_ORDERS.contains(argKeywords[1])) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return new SortCommand(argKeywords[0], argKeywords[1]);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":51}},{"path":"src/main/java/seedu/address/logic/parser/TogglePrivacyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new TogglePrivacyCommand object","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParser implements Parser\u003cTogglePrivacyCommand\u003e {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the TogglePrivacyCommand","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" * and returns an TogglePrivacyCommand object for execution.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" ArgumentTokenizer.tokenize(args,","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" PREFIX_REMARK, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_RATING);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" Index index;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_RATING).isPresent()) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" if (!epp.anyNonNullField()) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(TogglePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" return new TogglePrivacyCommand(index, epp);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":67,"-":2}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.UniqueTeamList;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e syncedPersonList \u003d newData.getPersonList().stream()","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" .map(this::syncWithMasterTagList)","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e syncedTeamList \u003d newData.getTeamList();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(syncedPersonList);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" setTeams(syncedTeamList);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBooks should not have duplicate persons\");","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" throw new AssertionError(\"MTM should not have duplicate teams\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" //// person-level operations","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person p) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person person \u003d syncWithMasterTagList(p);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" persons.add(person);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedPerson}.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * @see #syncWithMasterTagList(Person)","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person syncedEditedPerson \u003d syncWithMasterTagList(editedPerson);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" removeUnusedTags();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayersBy(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" persons.sortBy(field, order);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" //@@author","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Updates the master tag list to include tags in {@code person} that are not in the list.","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @return a copy of this {@code person} such that every tag in this person points to a Tag object in the master","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * list.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" private Person syncWithMasterTagList(Person person) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" // used for checking person tag references","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" return new Person(","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" person.getName(), person.getPhone(), person.getEmail(), person.getAddress(), person.getRemark(),","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" person.getTeamName(), correctTagReferences, person.getRating(), person.getPosition(),","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" public boolean removePerson(Person key) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" //// tag-level operations","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" tags.add(t);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" * Sets the colour of {@code tag}.","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" public void setTagColour(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" for (Tag t : tags) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" if (t.getTagName().equals(tag.getTagName())) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(colour);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Removes {@code tag} from all persons in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void removeTag(Tag tag) {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" for (Person person : persons) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" removeTagFromPerson(tag, person);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Removes {@code tag} from {@code person} in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code person} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" private void removeTagFromPerson(Tag tag, Person person) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003c\u003e(person.getTags());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (!newTags.remove(tag)) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" return;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" Person newPerson \u003d","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" person.getRemark(), person.getTeamName(), newTags, person.getRating(), person.getPosition(),","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" updatePerson(person, newPerson);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person \"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" + \"after updating person\u0027s tag.\");","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" * Removes all {@code tag} that are not in used by any {@code Person} in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" private void removeUnusedTags() {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e tagsInPersons \u003d persons.asObservableList().stream()","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" .map(Person::getTags)","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" .flatMap(Set::stream)","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" .collect(Collectors.toSet());","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" tags.setTags(tagsInPersons);","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" //@@author jordancjq","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" * Creates a team in the manager.","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" * @throws DuplicateTeamException if an equivalent team already exists.","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void createTeam(Team t) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" teams.add(t);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Assigns a {@code person} to a {@code team}.","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" if (!person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(), person.getPosition(),","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" if (!person.getTeamName().equals(newPersonWithTeam.getTeamName())) {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" * Unassigns a {@code person} from team.","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code teamName} in {@code person} is {@code UNSPECIFIED_FIELD}.","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException(person.getName().toString());","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" * Immediately add a {@code person} to a {@code team}.","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" public void addPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":" * Removes a {@code person} from a {@code team}.","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":" private void removePersonFromTeam(Person person, TeamName teamName) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" teams.removePersonFromTeam(person, teams.getTeam(teamName));","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" * Removes a {@code team} from {@code teams}.","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" if (!teams.contains(teamName)) {","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" Team teamToRemove \u003d teams.getTeam(teamName);","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":" for (Person person : teamToRemove) {","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":" removeTeamFromPerson(person);","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" teams.remove(teamToRemove);","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" * Removes {@code teamName} from {@code person} in this {@code Team}.","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":" private void removeTeamFromPerson(Person person) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" Person personWithRemoveTeam \u003d","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRemoveTeam);","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":" * Renames {@code Team} with {@code updatedTeamName}.","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":" * @return","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e renameTeamPersonList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" for (Person person : persons) {","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":" if (person.getTeamName().equals(targetTeam.getTeamName())) {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" renameTeamPersonList.add(renameTeamInPerson(person, updatedTeamName, targetTeam));","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" Team updatedTeam \u003d new Team(updatedTeamName, renameTeamPersonList);","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" teams.setTeam(targetTeam, updatedTeam);","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException dte) {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate team after renaming\");","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Teams should contain this team\");","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":" * Renames {@code teamName} in {@code person} with {@code teamName}.","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":" private Person renameTeamInPerson(Person person, TeamName teamName, Team targetTeam) {","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" Person personWithRenameTeam \u003d","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(),","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRenameTeam);","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" return personWithRenameTeam;","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" //// util methods","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\";","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":" // TODO: refine later","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":" return persons.asObservableList();","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":" return tags.asObservableList();","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":" return teams.asObservableList();","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags));","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":" return Objects.hash(persons, tags);","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":7,"codeeong":13,"-":431}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The API of the Model component.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public interface Model {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" Predicate\u003cPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" void deletePerson(Person target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Adds the given person */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" void addPerson(Person person) throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code teamName}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" * Sorts players in address book by field in asc or desc order","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" * @param field","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" * @param order","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" void sortPlayers(String field, String order) throws NoPlayerException;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" boolean getLockState();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" UserPrefs getUserPrefs();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" /** Locks address book from model*/","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" void lockAddressBookModel();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /** Unlocks address book from model*/","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" void unlockAddressBookModel();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /** Removes the given {@code tag} from all {@code Person}s. */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" void deleteTag(Tag tag);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" /** Create the given team */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" void createTeam(Team team) throws DuplicateTeamException;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /** Assign person to team */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" void assignPersonToTeam(Person person, TeamName teamName)","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /** Unassign person from team */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" void unassignPersonFromTeam(Person person) throws TeamNotFoundException;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /** Removes the given team */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" void removeTeam(TeamName teamName) throws TeamNotFoundException;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Renames the given team */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" void renameTeam(Team targetTeam, TeamName teamName);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" /** sets the given {@code tag} to color. */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" boolean setTagColour(Tag tag, String colour);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of the team list */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":18,"codeeong":5,"-":78}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final FilteredList\u003cPerson\u003e filteredPersons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private final UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" this.userPrefs \u003d userPrefs;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(Person target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public synchronized void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" addressBook.sortPlayersBy(field, order);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" return userPrefs;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().lockAddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().unlockAddressBook();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" return getUserPrefs().getAddressBookLockState();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" //@@author","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" addressBook.removeTag(tag);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" //@@author jordancjq","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" public synchronized void createTeam(Team team) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" addressBook.createTeam(team);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" public synchronized void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" addressBook.assignPersonToTeam(person, teamName);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public synchronized void unassignPersonFromTeam(Person person) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" addressBook.unassignPersonFromTeam(person);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" public synchronized void removeTeam(TeamName teamName) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" requireNonNull(teamName);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" raise(new RemoveSelectedTeamEvent(teamName));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" addressBook.removeTeam(teamName);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" public synchronized void renameTeam(Team targetTeam, TeamName updatedTeamName) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" requireAllNonNull(targetTeam, updatedTeamName);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" addressBook.renameTeam(targetTeam, updatedTeamName);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public boolean setTagColour(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e allTags \u003d addressBook.getTagList();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" boolean isTagValid \u003d false;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" for (Tag t : allTags) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" if (t.getTagName().equals(tag.getTagName())) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" isTagValid \u003d true;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" break;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" if (!isTagValid) {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" addressBook.setTagColour(tag, colour);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" return isTagValid;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" return addressBook.getTeamList();","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code Person} backed by the internal list of","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" * {@code addressBook}","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author jordancjq","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":28,"codeeong":7,"-":197}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String addressBookFilePath \u003d \"data/myteammanager.xml\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private String addressBookName \u003d \"MyTeamManager\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private String addressBookTheme \u003d \"DarkTheme.css\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" private String addressBookHashedPass \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" .hashString(\"ilikesports\", StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public UserPrefs() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.setGuiSettings(500, 500, 0, 0);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return addressBookFilePath;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddressBookName() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressBookName;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBook() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d true;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBook() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public String getAddressBookHashedPass() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" return addressBookHashedPass;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean getAddressBookLockState() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return this.addressBookLockState;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public String getAddressBookTheme() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return addressBookTheme;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" public void setAddressBookTheme(String addressBookTheme) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" this.addressBookTheme \u003d addressBookTheme;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookHashedPass, o.addressBookHashedPass)","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nPassword: \" + addressBookHashedPass);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":28,"codeeong":9,"-":80}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs an {@code Address}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @param address A valid address.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Address(String address) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" checkArgument(isValidAddress(address), MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" public Address(String address, boolean isPrivate) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" this(address);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":73}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.nio.file.Files;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.nio.file.Path;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.nio.file.Paths;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.nio.file.StandardCopyOption;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s avatar in the address book. Contains filepath to avatar image file.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAvatar(String)}","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class Avatar {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \"Please specify the absolute filepath for the avatar image eg. av/C:\\\\image.png\\n (for Windows), \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" + \"av//User/username/path/to/image.jpg (for MacOS). \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"Image file should be 200x200 and in jpg or png format\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String AVATAR_VALIDATION_PATTERN \u003d \"([^\\\\s]+(\\\\.(?i)(jpg|png))$)\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private String value;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Constructs an {@code Avatar}.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @param avatar A valid avatar.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public Avatar(String avatar) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(avatar);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" checkArgument(isValidAvatar(avatar), MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.value \u003d avatar;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s avatar.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidAvatar(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" Pattern pattern \u003d Pattern.compile(AVATAR_VALIDATION_PATTERN);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" Matcher matcher \u003d pattern.matcher(test);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return matcher.matches() || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Copies the image file from file path entered into images/ and renames it as [name].png","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * and saves the file path in value","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" * @param player player\u0027s avatar image filepath string","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * @throws IOException thrown when file not found","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setFilePath(String player) throws IOException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" final File file \u003d new File(value);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.value \u003d dest.toString();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" public String getValue() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public static void setUpPlaceholderForTest() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" Files.copy(Avatar.class.getResourceAsStream(\"/images/placeholder_test.png\"),","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" Paths.get(\"images/placeholder_test.png\"), StandardCopyOption.REPLACE_EXISTING);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" LogsCenter.getLogger(Avatar.class).warning(\"placeholder image file missing\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":108}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s email in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Email {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" private static final String SPECIAL_CHARACTERS \u003d \"!#$%\u0026\u0027*+/\u003d?`{|}~^.-\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d \"Person emails should be of the format local-part@domain \"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" + \"and adhere to the following constraints:\\n\"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"1. The local-part should only contain alphanumeric characters and these special characters, excluding \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the parentheses, (\" + SPECIAL_CHARACTERS + \") .\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"2. This is followed by a \u0027@\u0027 and then a domain name. \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"The domain name must:\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \" - be at least 2 characters long\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" + \" - start and end with alphanumeric characters\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \" - consist of alphanumeric characters, a period or a hyphen for the characters in between, if any.\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // alphanumeric and special characters","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String LOCAL_PART_REGEX \u003d \"^[\\\\w\" + SPECIAL_CHARACTERS + \"]+\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String DOMAIN_FIRST_CHARACTER_REGEX \u003d \"[^\\\\W_]\"; // alphanumeric characters except underscore","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String DOMAIN_MIDDLE_REGEX \u003d \"[a-zA-Z0-9.-]*\"; // alphanumeric, period and hyphen","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String DOMAIN_LAST_CHARACTER_REGEX \u003d \"[^\\\\W_]$\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d LOCAL_PART_REGEX + \"@\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" + DOMAIN_FIRST_CHARACTER_REGEX + DOMAIN_MIDDLE_REGEX + DOMAIN_LAST_CHARACTER_REGEX;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Constructs an {@code Email}.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @param email A valid email address.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public Email(String email) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" checkArgument(isValidEmail(email), MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.value \u003d email;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" public Email(String email, boolean isPrivate) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" this(email);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return test.matches(EMAIL_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Email\u003e\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":81}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Phone {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Constructs a {@code Phone}.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @param phone A valid phone number.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" checkArgument(isValidPhone(phone), MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" this.value \u003d phone;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" public Phone(String phone, boolean isPrivate) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" this(phone);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Phone\u003e\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":68}},{"path":"src/main/java/seedu/address/model/person/Rating.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s rating in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRating(String)}","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class Rating {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_RATING_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Player\u0027s rating should be an integer from 0 - 5.\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String RATING_VALIDATION_REGEX \u003d \"[0-5]\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs an {@code Rating}.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param rating A valid rating.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Rating(String rating) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(rating);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidRating(rating), MESSAGE_RATING_CONSTRAINTS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.value \u003d rating;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public Rating(String rating, boolean isPrivate) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this(rating);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s rating.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static boolean isValidRating(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" return test.matches(RATING_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Rating\u003e\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" || (other instanceof Rating // instanceof handles nulls","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Rating) other).value)); // state check","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":21,"-":56}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s remark in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is always valid}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Remark {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_REMARK_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Remark can contain any values, can even be blank\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Constructs a {@code Remark}","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @param remark Any remark","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Remark(String remark) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.value \u003d remark;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" public Remark(String remark, boolean isPrivate) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" this(remark);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Remarks\u003e\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof Remark // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":57}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public boolean contains(Person toCheck) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Adds a person to the list.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void add(Person toAdd) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" internalList.add(toAdd);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void setPerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" internalList.set(index, editedPerson);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public boolean remove(Person toRemove) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" requireAllNonNull(persons);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" for (final Person person : persons) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" replacement.add(person);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" setPersons(replacement);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e asObservableList() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(internalList);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" * Sorts players by selected field in asc or desc order.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" * @return","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" public void sortBy(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" if (internalList.size() \u003c 1) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" throw new NoPlayerException();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e jerseyComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" return p1.getJerseyNumber().value.compareTo(p2.getJerseyNumber().value);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e ratingComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" return p1.getRating().toString().compareTo(p2.getRating().toString());","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e posComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" return p1.getPosition().value.compareTo(p2.getPosition().value);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e emailComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" return p1.getEmail().toString().compareTo(p2.getEmail().toString());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e addressComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" return p1.getAddress().toString().compareTo(p2.getAddress().toString());","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case \"jersey\":","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d jerseyComparator;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" case \"pos\":","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d posComparator;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" case \"rating\":","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d ratingComparator;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d emailComparator;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d addressComparator;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" //@@author","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":105,"-":118}},{"path":"src/main/java/seedu/address/model/person/exceptions/NoPlayerException.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.model.person.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":" * Singals that the operation is unable to sort due to no players in book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"public class NoPlayerException extends Exception {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":7}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Tag {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be a string\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_COLOUR_CONSTRAINTS \u003d \"Tag colours should be one of these colours:\"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" + \"teal, red, yellow, blue, orange, brown, green, pink, black, grey\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private static final String[] TAG_COLOR_STYLES \u003d","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" { \"teal\", \"red\", \"yellow\", \"blue\", \"orange\", \"brown\", \"green\", \"pink\", \"black\", \"grey\" };","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" private String tagColour;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs a {@code Tag}.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param tagName A valid tag name.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Tag(String tagName) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(tagName);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Overloaded constructor for a {@code Tag}.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" * @param tagName A valid tag name","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" * @param tagColour A valid tag colour.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" public Tag(String tagName, String tagColour) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" requireNonNull(tagName);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" public String getTagName() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" return this.tagName;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag name.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagName(String test) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return test.matches(TAG_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public String getTagColour() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" return this.tagColour;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" * Changes the {@code tagColour} for {@code tagName}\u0027s label","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" public void changeTagColour(String colour) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d colour;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag colour.","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagColour(String testColour) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (String tcs : TAG_COLOR_STYLES) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (testColour.equals(tcs)) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" return true;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" return false;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" return tagName.hashCode();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":54,"-":49}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new Person[] {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Aaron Ramsey\"), new Phone(\"87438807\"), new Email(\"aramsey@example.com\"),","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), new Remark(\"Sign him for one more year\"),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" getTagSet(\"redCard\"), new Rating(\"3\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Hector Moruno\"), new Phone(\"99272758\"), new Email(\"hectorm@example.com\"),","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cesc Fabregas\"), new Phone(\"93210283\"), new Email(\"cescfabregas@example.com\"),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ospina\"), new Phone(\"99272758\"), new Email(\"Ospina@arsenal.com\"),","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"22\"),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cech\"), new Phone(\"93210283\"), new Email(\"cech@arsenal.com\"),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mertesacker\"), new Phone(\"95432223\"), new Email(\"mertesacker@arsenal.com\"),","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Koscielny\"), new Phone(\"92352021\"), new Email(\"koscielny@example.com\"),","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Holding\"), new Phone(\"92624417\"), new Email(\"holding@example.com\"),","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Monreal\"), new Phone(\"99272758\"), new Email(\"monreal@arsenal.com\"),","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mustafi\"), new Phone(\"93215483\"), new Email(\"mustafi@arsenal.com\"),","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"4\"),","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"91031282\"), new Email(\"chambers@arsenal.com\"),","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"92492021\"), new Email(\"chambers@arsenal.com\"),","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" new TeamName(\"Chelsea\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Irfan Fandi\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mavropanos\"), new Phone(\"92624417\"), new Email(\"mavropanos@arsenal.com\"),","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"98\"),","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Kolasinac\"), new Phone(\"99272758\"), new Email(\"kolasinac@arsenal.com\"),","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"2\"), new JerseyNumber(\"52\"),","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mkhitaryan\"), new Phone(\"93210283\"), new Email(\"mkhitaryan@arsenal.com\"),","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Wilshere\"), new Phone(\"95432223\"), new Email(\"wilshere@arsenal.com\"),","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ozil\"), new Phone(\"92352021\"), new Email(\"ozil@example.com\"),","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Xhaka\"), new Phone(\"92624417\"), new Email(\"xhaka@example.com\"),","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" public static Team[] getSampleTeams() {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" return new Team[] {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Arsenal\")),","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Chelsea\"))","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" for (Team sampleTeam : getSampleTeams()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" sampleAb.createTeam(sampleTeam);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" sampleAb.addPersonToTeam(samplePerson, samplePerson.getTeamName());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" return sampleAb;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"codeeong"},"content":" } catch (DuplicateTeamException e) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\" sample data cannot contain duplicate teams\", e);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" for (String s : strings) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":86,"-":83}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Person\u0027s %s field is missing!\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String name;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private String phone;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Boolean phonePrivacy;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private String email;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Boolean emailPrivacy;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private String address;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Boolean addressPrivacy;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private String remark;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Boolean remarkPrivacy;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private String teamName;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private String rating;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" private Boolean ratingPrivacy;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" private String position;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private String jerseyNumber;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private String avatar;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" * Constructs an {@code XmlAdaptedPerson} with the given person details.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(String name, String phone, String email, String address, List\u003cXmlAdaptedTag\u003e tagged) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.remarkPrivacy \u003d false;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.phonePrivacy \u003d false;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" this.addressPrivacy \u003d false;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" this.emailPrivacy \u003d false;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" if (tagged !\u003d null) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" this.tagged \u003d new ArrayList\u003c\u003e(tagged);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Converts a given Person into this class for JAXB use.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(Person source) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" name \u003d source.getName().fullName;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" phone \u003d source.getPhone().value;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" email \u003d source.getEmail().value;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" address \u003d source.getAddress().value;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" remark \u003d source.getRemark().value;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" teamName \u003d source.getTeamName().fullName;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" phonePrivacy \u003d source.getPhone().isPrivate();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" emailPrivacy \u003d source.getEmail().isPrivate();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" addressPrivacy \u003d source.getAddress().isPrivate();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" remarkPrivacy \u003d source.getRemark().isPrivate();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d source.getRating().isPrivate();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" rating \u003d source.getRating().value;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" position \u003d source.getPosition().value;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" jerseyNumber \u003d source.getJerseyNumber().value;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" avatar \u003d source.getAvatar().getValue();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" for (Tag tag : source.getTags()) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" tagged.add(new XmlAdaptedTag(tag));","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" public Person toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag tag : tagged) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" personTags.add(tag.toModelType());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" if (phonePrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" phonePrivacy \u003d false;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" if (emailPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" emailPrivacy \u003d false;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" if (addressPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" addressPrivacy \u003d false;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" if (remarkPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" remarkPrivacy \u003d false;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" if (ratingPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d false;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" if (this.name \u003d\u003d null) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName()));","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" if (!Name.isValidName(this.name)) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" final Name name \u003d new Name(this.name);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" if (this.phone \u003d\u003d null) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName()));","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" if (!Phone.isValidPhone(this.phone)) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" final Phone phone \u003d new Phone(this.phone, this.phonePrivacy);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" if (this.email \u003d\u003d null) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName()));","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (!Email.isValidEmail(this.email)) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" final Email email \u003d new Email(this.email, this.emailPrivacy);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" if (this.address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName()));","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" if (!Address.isValidAddress(this.address)) {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Address.MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" final Address address \u003d new Address(this.address, this.addressPrivacy);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkPrivacy);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" if (this.rating \u003d\u003d null) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Rating.class.getSimpleName()));","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" if (!Rating.isValidRating(this.rating)) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Rating.MESSAGE_RATING_CONSTRAINTS);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" final Rating rating \u003d new Rating(this.rating, this.ratingPrivacy);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" if (this.position \u003d\u003d null) {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" Position.class.getSimpleName()));","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" if (!Position.isValidPosition(this.position)) {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Position.MESSAGE_POSITION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" final Position position \u003d new Position(this.position);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (this.jerseyNumber \u003d\u003d null) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" JerseyNumber.class.getSimpleName()));","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" if (!JerseyNumber.isValidJerseyNumber(this.jerseyNumber)) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" throw new IllegalValueException(JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" final JerseyNumber jerseyNumber \u003d new JerseyNumber(this.jerseyNumber);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" if (this.avatar \u003d\u003d null) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" Avatar.class.getSimpleName()));","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" if (!Avatar.isValidAvatar(this.avatar)) {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Avatar.MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" return new Person(name, phone, email, address, remark, teamName, tags, rating, position, jerseyNumber, avatar);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedPerson)) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" XmlAdaptedPerson otherPerson \u003d (XmlAdaptedPerson) other;","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" return Objects.equals(name, otherPerson.name)","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(phone, otherPerson.phone)","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(email, otherPerson.email)","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(address, otherPerson.address)","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" \u0026\u0026 tagged.equals(otherPerson.tagged);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":34,"-":209}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Tag.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class XmlAdaptedTag {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private String tagName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String tagColour;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedTag.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public XmlAdaptedTag() {}","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(String tagName) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName} and {@code tagColour}.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTag(String tagName, String tagColour) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Converts a given Tag into this class for JAXB use.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(Tag source) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" tagName \u003d source.tagName;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" tagColour \u003d source.getTagColour();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Tag object.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public Tag toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (!Tag.isValidTagName(tagName)) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" if (!Tag.isValidTagColour(tagColour)) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_COLOUR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" return new Tag(tagName, tagColour);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedTag)) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return tagName.equals(((XmlAdaptedTag) other).tagName);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":22,"-":59}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTeam.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Team","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class XmlAdaptedTeam {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Team\u0027s %s field is missing!\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private String teamName;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" * Constructs an XmlAdaptedTeam.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam() {}","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTeam} with the given {@code teamName}.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public XmlAdaptedTeam(String teamName, List\u003cXmlAdaptedPerson\u003e persons) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (persons !\u003d null) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.players \u003d new ArrayList\u003c\u003e(persons);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" * Converts a given Team into this class for JAXB use.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTeam","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam(Team source) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" teamName \u003d source.getTeamName().toString();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" players \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" for (Person person : source.getTeamPlayers()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" players.add(new XmlAdaptedPerson(person));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Team object.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" public Team toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" if (this.teamName \u003d\u003d null) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new IllegalValueException((String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" TeamName.class.getSimpleName())));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" if (!TeamName.isValidName(this.teamName)) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" throw new IllegalValueException(TeamName.MESSAGE_TEAM_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" final List\u003cPerson\u003e teamPlayers \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson player : players) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" teamPlayers.add(player.toModelType());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return new Team(teamName, teamPlayers);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" return true;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" if (!(other instanceof XmlAdaptedTeam)) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" return false;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" XmlAdaptedTeam otherTeam \u003d (XmlAdaptedTeam) other;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return Objects.equals(teamName, otherTeam.teamName)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" \u0026\u0026 players.equals(otherTeam.players);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":60,"-":33}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTeam\u003e teams;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" teams \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Conversion","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" teams.addAll(src.getTeamList().stream().map(XmlAdaptedTeam::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Converts this addressbook into the model\u0027s {@code AddressBook} object.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated or duplicates in the","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * {@code XmlAdaptedPerson} or {@code XmlAdaptedTag}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag t : tags) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" addressBook.addTag(t.toModelType());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson p : persons) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" addressBook.addPerson(p.toModelType());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" for (XmlAdaptedTeam tm : teams) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" addressBook.createTeam(tm.toModelType());","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlSerializableAddressBook)) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook otherAb \u003d (XmlSerializableAddressBook) other;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return persons.equals(otherAb.persons) \u0026\u0026 tags.equals(otherAb.tags) \u0026\u0026 teams.equals(otherAb.teams);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":83}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Menu;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.ImageView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.VBox;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cStage\u003e {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private static String currentTheme \u003d \"view/DarkTheme.css\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private Stage primaryStage;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HelpWindow helpWindow;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" private Menu mtmLogo;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" private StackPane teamDisplayPlaceholder;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" private VBox mainWindow;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" super(FXML, primaryStage);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // Set dependencies","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // Configure the UI","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" setAccelerators();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return primaryStage;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void setAccelerators() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * the TextInputControl(s).","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.consume();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" void fillInnerParts() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(currentTheme);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(\"view/Extensions.css\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" final Image image \u003d new Image(\"images/MyTeamManagerLogo.png\", true);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" mtmLogo.setGraphic(new ImageView(image));","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" mtmLogo.setDisable(true);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"codeeong"},"content":" TeamDisplay teamDisplay \u003d new TeamDisplay(logic.getInitTeamList());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"codeeong"},"content":" teamDisplayPlaceholder.getChildren().add(teamDisplay.getRoot());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(prefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" void hide() {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" primaryStage.hide();","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" * @returns the {@code currentTheme}.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":" public static String getCurrentTheme() {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"codeeong"},"content":" return currentTheme;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" public void handleChangeThemeRequestEvent(ChangeThemeEvent event) throws CommandException {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().remove(currentTheme);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" prefs.setAddressBookTheme(event.theme + \"Theme.css\");","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().add(currentTheme);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * Opens the help window.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" public void handleHelp() {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" if (helpWindow \u003d\u003d null) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" helpWindow \u003d new HelpWindow();","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" helpWindow.show();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" void show() {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" primaryStage.show();","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" * Closes the application.","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" private void handleExit() {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" return this.personListPanel;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" handleHelp();","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":35,"-":201}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.scene.paint.ImagePattern;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.scene.shape.Circle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public final Person person;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonCard.class);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private Label name;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private Label id;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private Label teamName;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private FlowPane tags;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Label rating;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private Label position;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" private Label jerseyNumber;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Circle avatar;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public PersonCard(Person person, int displayedIndex) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" name.setText(person.getName().fullName);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" rating.setText(person.getRating().toString());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" rating.setText(person.getRating().value);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" teamName.setText(person.getTeamName().fullName);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" position.setText(person.getPosition().getPositionName());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" setContactImage(person.getAvatar().getValue());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void setContactImage(String path) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Image img \u003d null;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (new File(path).isFile()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" img \u003d new Image(new File(path).toURI().toURL().toString());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" } catch (MalformedURLException e) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" avatar.setVisible(true);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" avatar.setFill(new ImagePattern(img));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" avatar.setVisible(true);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" private void initTags(Person person) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" person.getTags().forEach(tag -\u003e {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" Label tagLabel \u003d new Label(tag.getTagName());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" tagLabel.getStyleClass().add(tag.getTagColour());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(tagLabel);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" });","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" public void handleColourChangeEvent(ChangeTagColourEvent event) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"codeeong"},"content":" Set\u003cTag\u003e tagSet \u003d person.getTags();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"codeeong"},"content":" int i \u003d 0;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"codeeong"},"content":" for (Iterator\u003cTag\u003e it \u003d tagSet.iterator(); it.hasNext();) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d it.next();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"codeeong"},"content":" if (tag.getTagName().equals(event.tagName)) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"codeeong"},"content":" tags.getChildren().remove(i);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"codeeong"},"content":" Label newTagLabel \u003d new Label(event.tagName);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"codeeong"},"content":" newTagLabel.getStyleClass().add(event.tagColour);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(i, newTagLabel);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"codeeong"},"content":" i++;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":5,"codeeong":42,"-":97}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Panel containing the list of persons.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private PlayerDetails playerDetails;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Integer selectedCardIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private StackPane playerDetailsPlaceholder;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cPerson\u003e personList) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cPerson\u003e personList) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" personList, (person) -\u003e new PersonCard(person, personList.indexOf(person) + 1));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" playerDetails \u003d new PlayerDetails(newValue.person);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" this.selectedCardIndex \u003d index;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedNoParamEvent(PersonDetailsChangedNoParamEvent event) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" PersonCard newPersonCard \u003d personListView.getItems().get(selectedCardIndex);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" playerDetails \u003d new PlayerDetails(newPersonCard.person);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" //@author","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" setText(null);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":12,"-":98}},{"path":"src/main/java/seedu/address/ui/PlayerDetails.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" * The Browser Panel of the App.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public final Person person;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Person personBeforeChange;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private Label name;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" private Label address;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private Label email;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private Label jerseyNumber;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public PlayerDetails(Person person) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" name.setText(person.getName().fullName);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" jerseyNumber.setText(\"Jersey Number: \" + person.getJerseyNumber().value);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().toString());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().value);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().toString());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().value);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().toString());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().value);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().toString());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().value);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" personBeforeChange \u003d this.person;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (event.getPerson().getName().fullName.equals(person.getName().fullName)) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" name.setText((event.getPerson().getName().toString()));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" phone.setText(event.getPerson().getPhone().toString());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" jerseyNumber.setText(\"Jersey Number: \" + event.getPerson().getJerseyNumber().toString());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" address.setText(event.getPerson().getAddress().toString());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" email.setText(event.getPerson().getEmail().toString());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" remark.setText(\"Remarks: \" + event.getPerson().getRemark().toString());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true}],"authorContributionMap":{"lohtianwei":34,"codeeong":46,"-":14}},{"path":"src/main/java/seedu/address/ui/TeamDisplay.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * A ui for displaying the team currently chosen","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(TeamDisplay.class);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private FlowPane teams;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public TeamDisplay(ObservableList\u003cTeam\u003e teamList) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.teamList \u003d teamList;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" initTeams();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" getTeams();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void initTeams() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" for (Team t: this.teamList) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" Label teamLabel \u003d new Label(t.getTeamName().toString());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" teamLabel.setStyle(\"-fx-text-fill: #3f7bbf\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(teamLabel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" teams.setHgap(10);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e listOfTeams \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" for (Team t: teamList) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" listOfTeams.add(t.getTeamName().toString());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return listOfTeams;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(newTeamLabel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (event.teamName.equals(teamList.get(i).getTeamName().toString())) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass().add(\"selected\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleRemoveSelectedTeamEvent(RemoveSelectedTeamEvent event) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c teams.getChildren().size(); i++) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" if (teamList.get(i).getTeamName().equals(event.teamName)) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" private void handleClearTeamsEvent(ClearTeamsEvent event) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" private void handleUndoTeamsEvent(UndoTeamsEvent event) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" initTeams();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" getTeams();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":109,"-":15}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private static final String ICON_APPLICATION \u003d \"/images/football.png\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" //Set the application icon.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" mainWindow.hide();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" String contentText) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" alert.setTitle(title);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.showAndWait();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" System.exit(1);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" event.exception);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/guitests/guihandles/MainWindowHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Provides a handle for {@code MainWindow}.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class MainWindowHandle extends StageHandle {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" private final PersonListPanelHandle personListPanel;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" private final ResultDisplayHandle resultDisplay;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" private final TeamDisplayHandle teamDisplayBar;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" private final CommandBoxHandle commandBox;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private final StatusBarFooterHandle statusBarFooter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private final MainMenuHandle mainMenu;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public MainWindowHandle(Stage stage) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" super(stage);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanelHandle(getChildNode(PersonListPanelHandle.PERSON_LIST_VIEW_ID));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" resultDisplay \u003d new ResultDisplayHandle(getChildNode(ResultDisplayHandle.RESULT_DISPLAY_ID));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" teamDisplayBar \u003d new TeamDisplayHandle(getChildNode(TeamDisplayHandle.TEAM_DISPLAY_ID));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" commandBox \u003d new CommandBoxHandle(getChildNode(CommandBoxHandle.COMMAND_INPUT_FIELD_ID));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" statusBarFooter \u003d new StatusBarFooterHandle(getChildNode(StatusBarFooterHandle.STATUS_BAR_PLACEHOLDER));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" mainMenu \u003d new MainMenuHandle(getChildNode(MainMenuHandle.MENU_BAR_ID));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return personListPanel;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return resultDisplay;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return commandBox;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return statusBarFooter;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return mainMenu;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":46}},{"path":"src/test/java/guitests/guihandles/PersonCardHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Provides a handle to a person card in the person list panel.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class PersonCardHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String TAGS_FIELD_ID \u003d \"#tags\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private static final String RATING_FIELD_ID \u003d \"#rating\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private static final String POSITION_FIELD_ID \u003d \"#position\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String TEAMNAME_FIELD_ID \u003d \"#teamName\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label idLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label nameLabel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private final Label positionLabel;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private final Label ratingLabel;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final Label teamNameLabel;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final List\u003cLabel\u003e tagLabels;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public PersonCardHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" this.positionLabel \u003d getChildNode(POSITION_FIELD_ID);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" this.ratingLabel \u003d getChildNode(RATING_FIELD_ID);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" this.teamNameLabel \u003d getChildNode(TEAMNAME_FIELD_ID);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" Region tagsContainer \u003d getChildNode(TAGS_FIELD_ID);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.tagLabels \u003d tagsContainer","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" .getChildrenUnmodifiable()","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" .stream()","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" .map(Label.class::cast)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String getId() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" return idLabel.getText();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String getName() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return nameLabel.getText();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public String getPosition() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return positionLabel.getText();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public String getRating() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return ratingLabel.getText();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" public String getTeamName() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return teamNameLabel.getText();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public List\u003cString\u003e getTags() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" return tagLabels","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" .stream()","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" .map(Label::getText)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTagStyleClasses(String tag) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" return tagLabels","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" .stream()","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" .filter(label -\u003e label.getText().equals(tag))","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" .map(Label::getStyleClass)","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" .findFirst()","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" .orElseThrow(() -\u003e new IllegalArgumentException(\"No such tag.\"));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":25,"-":56}},{"path":"src/test/java/guitests/guihandles/PlayerDetailsHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Provides a handle to a player details pane.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class PlayerDetailsHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String PLAYER_DETAILS_DISPLAY_ID \u003d \"#playerDetails\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String JERSEY_FIELD_ID \u003d \"#jerseyNumber\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String PHONE_FIELD_ID \u003d \"#phone\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" private static final String EMAIL_FIELD_ID \u003d \"#email\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String ADDRESS_FIELD_ID \u003d \"#address\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String REMARK_FIELD_ID \u003d \"#remark\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label nameLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label jerseyLabel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private final Label addressLabel;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Label phoneLabel;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final Label emailLabel;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final Label remarkLabel;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PlayerDetailsHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.phoneLabel \u003d getChildNode(PHONE_FIELD_ID);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.addressLabel \u003d getChildNode(ADDRESS_FIELD_ID);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.emailLabel \u003d getChildNode(EMAIL_FIELD_ID);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.remarkLabel \u003d getChildNode(REMARK_FIELD_ID);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.jerseyLabel \u003d getChildNode(JERSEY_FIELD_ID);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getPhone() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return phoneLabel.getText();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public String getName() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return nameLabel.getText();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddress() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressLabel.getText();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public String getJerseyNumber() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return jerseyLabel.getText().substring(15);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getRemarks() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return remarkLabel.getText().substring(9);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public String getEmail() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return emailLabel.getText();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":8,"-":56}},{"path":"src/test/java/guitests/guihandles/TeamDisplayHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" * Provides a handle for {@code TeamDisplayHandle} containing the list of {@code Teams}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String TEAM_DISPLAY_ID \u003d \"#teams\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private final List\u003cLabel\u003e teamLabels;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public TeamDisplayHandle(Node teamDisplayNode) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" super(teamDisplayNode);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" Region teamContainer \u003d getChildNode(TEAM_DISPLAY_ID);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" this.teamLabels \u003d teamContainer","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" .getChildrenUnmodifiable()","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" .stream()","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" .map(Label.class::cast)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" return teamLabels","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" .stream()","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" .map(Label::getText)","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":37}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" String defaultConfigAsString \u003d \"App title : My Team Manager\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/XmlUtilTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javax.xml.bind.JAXBException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedTag;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlSerializableAddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TestUtil;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class XmlUtilTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"src/test/data/XmlUtilTest/\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private static final File EMPTY_FILE \u003d new File(TEST_DATA_FOLDER + \"empty.xml\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final File MISSING_FILE \u003d new File(TEST_DATA_FOLDER + \"missing.xml\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final File VALID_FILE \u003d new File(TEST_DATA_FOLDER + \"validAddressBook.xml\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final File MISSING_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"missingPersonField.xml\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final File INVALID_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"invalidPersonField.xml\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private static final File VALID_PERSON_FILE \u003d new File(TEST_DATA_FOLDER + \"validPerson.xml\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final File TEMP_FILE \u003d new File(TestUtil.getFilePathInSandboxFolder(\"tempAddressBook.xml\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"9482asf424\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Hans Muster\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"9482424\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"hans@example\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"4th street\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final List\u003cXmlAdaptedTag\u003e VALID_TAGS \u003d Collections.singletonList(new XmlAdaptedTag(\"friends\"));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullFile_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(null, AddressBook.class);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullClass_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(VALID_FILE, null);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void getDataFromFile_missingFile_fileNotFoundException() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(MISSING_FILE, AddressBook.class);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void getDataFromFile_emptyFile_dataFormatMismatchException() throws Exception {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" thrown.expect(JAXBException.class);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(EMPTY_FILE, AddressBook.class);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void getDataFromFile_validFile_validResult() throws Exception {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook dataFromFile \u003d XmlUtil.getDataFromFile(VALID_FILE, XmlSerializableAddressBook.class).toModelType();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" assertEquals(0, dataFromFile.getTeamList().size());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertEquals(0, dataFromFile.getTagList().size());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithMissingPersonField_validResult() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile(","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" MISSING_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson(","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" null, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithInvalidPersonField_validResult() throws Exception {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile(","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" INVALID_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson(","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" VALID_NAME, INVALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithValidPerson_validResult() throws Exception {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile(","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" VALID_PERSON_FILE, XmlAdaptedPersonWithRootElement.class);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson(","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullFile_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(null, new AddressBook());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullClass_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(VALID_FILE, null);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" public void saveDataToFile_missingFile_fileNotFoundException() throws Exception {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(MISSING_FILE, new AddressBook());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void saveDataToFile_validFile_dataSaved() throws Exception {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" TEMP_FILE.createNewFile();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataToWrite \u003d new XmlSerializableAddressBook(new AddressBook());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" AddressBookBuilder builder \u003d new AddressBookBuilder(new AddressBook());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" dataToWrite \u003d new XmlSerializableAddressBook(","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" builder.withPerson(new PersonBuilder().build()).withTag(\"Friends\").build());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Test class annotated with {@code XmlRootElement} to allow unmarshalling of .xml data to {@code XmlAdaptedPerson}","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * objects.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" @XmlRootElement(name \u003d \"person\")","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static class XmlAdaptedPersonWithRootElement extends XmlAdaptedPerson {}","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":145}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void constructor_nullPerson_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" new AddCommand(null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" ModelStub modelStub \u003d new ModelStubThrowingDuplicatePersonException();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person.","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" return false;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return null;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void deletePerson(Person target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"codeeong"},"content":" return null;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" fail(\"This method should not be called\");","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void createTeam(Team team) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" fail(\"This method should not be be called.\");","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"codeeong"},"content":" public boolean setTagColour(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"codeeong"},"content":" return false;","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person.","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" private class ModelStubThrowingDuplicatePersonException extends ModelStub {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * A Model stub that always accept the person being added.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" requireNonNull(person);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" personsAdded.add(person);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName)","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":29,"codeeong":12,"-":216}},{"path":"src/test/java/seedu/address/logic/commands/ChangeThemeCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public void execute_validTheme_success() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertExecutionSuccess(listThemes[0]);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" public void execute_invalidTheme_failure() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" assertExecutionFailure(\"FakeTheme\", Messages.MESSAGE_INVALID_THEME);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand[] listThemeCommands \u003d new ChangeThemeCommand[2];","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" listThemeCommands[i] \u003d new ChangeThemeCommand(listThemes[i]);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertTrue(listThemeCommands[i].equals(new ChangeThemeCommand(listThemes[i])));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(1));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(null));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" // different theme -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" int j \u003d 1;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" if (i !\u003d j) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(listThemeCommands[j]));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" j--;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" private void assertExecutionSuccess(String theme) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" CommandResult commandResult \u003d changethemeCommand.execute();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" assertEquals(String.format(ChangeThemeCommand.MESSAGE_THEME_SUCCESS, theme),","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" private void assertExecutionFailure(String theme, String expectedMessage) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" changethemeCommand.execute();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":89}},{"path":"src/test/java/seedu/address/logic/commands/KeyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" private Model model;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" @Before","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public void start() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public void checkKey() throws Exception {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" //checks that default lock state is false","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" //checks that key can lock MTM","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" //checks that key can unlock MTM","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" //checks that toggling works","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":44}},{"path":"src/test/java/seedu/address/logic/commands/RemarkCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_EMPTY;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareRedoCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareUndoCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for RemarkCommand.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class RemarkCommandTest {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void execute_addRemarkUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_AMY).build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_deleteRemarkUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_EMPTY).build();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_DELETE_REMARK_SUCCESS, remarkedPerson);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personInFilteredList).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, remarkedPerson.getRemark().toString());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personInFilteredList, remarkedPerson);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Remark filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_AMY).build();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" // remark -\u003e first person remarked","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" remarkCommand.execute();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" // redo -\u003e same first person remarked again","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" public void executeUndoRedo_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_EMPTY);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" // execution failed -\u003e remarkCommand not pushed into undoRedoStack","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // no commands in undoRedoStack -\u003e undoCommand and redoCommand fail","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * 1. Updates {@code Person#remark} from a filtered list.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * 2. Undo the update.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * 3. The unfiltered list should be shown now. Verify that the index of the previously updated person in the","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * unfiltered list is different from the index at the filtered list.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * 4. Redo the update. This ensures {@code RedoCommand} updates the person object regardless of indexing.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexFilteredList_samePersonRemarked() throws Exception {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_BOB);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" // remark -\u003e remarks second person in unfiltered person list / first person in filtered person list","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" remarkCommand.execute();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertNotEquals(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), personToRemark);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" // redo -\u003e remarks same second person in unfiltered person list","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" final RemarkCommand standardCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" RemarkCommand commandWithSameValues \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_SECOND_PERSON, new Remark(VALID_REMARK_AMY))));","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" // different remark -\u003e returns false","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_FIRST_PERSON, new Remark(VALID_REMARK_BOB))));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Returns an {@code RemarkCommand} with parameters {@code index} and {@code remark}.","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" private RemarkCommand prepareCommand(Index index, String remark) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d new RemarkCommand(index, new Remark(remark));","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" remarkCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" return remarkCommand;","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":218}},{"path":"src/test/java/seedu/address/logic/commands/SetCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * This is the unit test for {@code SetCommand}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"public class SetCommandTest {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private Model model;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Tag tagOne \u003d new Tag(\"testTagOne\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private Tag tagTwo \u003d new Tag(\"testTagTwo\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" @Before","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" SetCommand testCommand \u003d new SetCommand(tagOne, \"teal\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" SetCommand testCommandTwo \u003d new SetCommand(tagOne, \"teal\");","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" //Test to ensure command is strictly a SetCommand","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new AddCommand(CARL)));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new DeleteCommand(INDEX_FIRST_PERSON)));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HistoryCommand()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HelpCommand()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new RedoCommand()));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new UndoCommand()));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ListCommand()));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_AMY)));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" //Test to check that different tag string returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagTwo, \"teal\")));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"teal\")));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" //Test to check that different color strings returns false","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagOne, \"red\")));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"red\")));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" public void checkCommandResult() throws CommandException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" //Check if the result message is correct when there is no tags found","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" SetCommand command \u003d new SetCommand(new Tag(\"blablabla\"), \"teal\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag is invalid! Please input a valid tag name!\"));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" //When tags is present","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"red\");","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" assertFalse(command.execute().feedbackToUser.equals(\"No such tag\"));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to red\"));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" //Check if friends tags are set to color","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"teal\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to teal\"));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" for (Tag tag : model.getAddressBook().getTagList()) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" if (\"friends\".equals(tag.tagName)) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" assertTrue(tag.getTagColour().equals(\"teal\"));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" assertFalse(tag.getTagColour().equals(\"pink\"));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" resetAllTagsToDefault();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" * This method allows all tags to be set to the default colour \"teal\"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" public void resetAllTagsToDefault() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTag\u003e allTags \u003d model.getAddressBook().getTagList();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" for (Tag t : allTags) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(\"teal\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":100}},{"path":"src/test/java/seedu/address/logic/commands/SortCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getEmptyAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getSortedAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public ExpectedException error \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" private Model emptyModel \u003d new ModelManager(getEmptyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByNameDesc \u003d new ModelManager(","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"name\", \"desc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAdd \u003d new ModelManager(","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"asc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAddDesc \u003d new ModelManager(","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"desc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmail \u003d new ModelManager(getSortedAddressBook(\"email\", \"asc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmailDesc \u003d new ModelManager(","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"email\", \"desc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void noPlayers() throws CommandException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" error.expect(CommandException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" prepareCommand(\"name\", \"asc\", emptyModel).execute();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" public void emptySortField_throwsNullPointerEx() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", null);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void emptySortOrder_throwsNullPointerEx() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(null, \"asc\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public void sortByName_success() throws Exception {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"asc\", model);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"asc\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public void sortByNameDesc_success() throws Exception {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"desc\", model);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"desc\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByNameDesc);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" public void sortByAdd_success() throws Exception {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"asc\", model);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"asc\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAdd);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" public void sortByAddDesc_success() throws Exception {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"desc\", model);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"desc\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAddDesc);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmail_success() throws Exception {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"asc\", model);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"asc\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmail);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmailDesc_success() throws Exception {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"desc\", model);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"desc\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmailDesc);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" * Returns a {@code sortCommand} with the parameters {@code field and @code order}.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" private SortCommand prepareCommand(String field, String order, Model model) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" SortCommand sortCommand \u003d new SortCommand(field, order);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" sortCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" return sortCommand;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":108}},{"path":"src/test/java/seedu/address/logic/commands/TogglePrivacyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" public void editPersonPrivacyTest() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertFalse(epp.anyNonNullField());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy eppBuilder \u003d new EditPersonPrivacyBuilder().setAddressPrivate(\"false\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" .setEmailPrivate(\"false\").setPhonePrivate(\"true\").setRatingPrivate(\"false\")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" .setRemarkPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateAddress(), epp.getPrivateAddress());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateEmail(), epp.getPrivateEmail());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivatePhone(), epp.getPrivatePhone());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRating(), epp.getPrivateRating());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRemark(), epp.getPrivateRemark());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" public void oneFieldToggledSuccess() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" Index indexLast \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLast.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" Person listedPerson \u003d new PersonBuilder().withName(lastPerson.getName().toString())","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" .withEmail(lastPerson.getEmail().toString()).withRating(lastPerson.getRating().toString())","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" .withPhone(lastPerson.getPhone().toString()).build();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" listedPerson.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder(listedPerson).setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand togglePrivacyCommand \u003d new TogglePrivacyCommand(indexLast, epp);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" togglePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(TogglePrivacyCommand.MESSAGE_SUCCESS, listedPerson);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" expectedModel.updatePerson(lastPerson, listedPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":67}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TEAM_ARSENAL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" private static final boolean DEFAULT_LOCK_STATE \u003d false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void parseCommand_add() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_addAlias() throws Exception {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void parseCommand_clear() throws Exception {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_clearAlias() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void parseCommand_delete() throws Exception {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_deleteAlias() throws Exception {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseCommand_edit() throws Exception {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_editAlias() throws Exception {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" public void parseCommand_exit() throws Exception {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void parseCommand_remark() throws Exception {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" public void parseCommand_remarkAlias() throws Exception {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" public void parseCommand_find() throws Exception {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream()","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_findAlias() throws Exception {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream()","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" public void parseCommand_help() throws Exception {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\",","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public void parseCommand_history() throws Exception {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\",","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"histories\", DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_historyAlias() throws Exception {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\",","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void parseCommand_create() throws Exception {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parseCommand_createAlias() throws Exception {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void parseCommand_list() throws Exception {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\",","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_listAlias() throws Exception {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\",","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" public void parseCommand_select() throws Exception {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_selectAlias() throws Exception {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" public void parseCommand_redoCommandWord_returnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_redoCommandAlias_returnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS + \" 1\",","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" public void parseCommand_undoCommandWord_returnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_undoCommandAlias_returnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS + \" 3\",","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" public void parseCommand_unrecognisedInput_throwsParseException() throws Exception {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"\", DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void parseCommand_unknownCommand_throwsParseException() throws Exception {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" /** @lohtianwei */","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sort() throws Exception {","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sortAlias() throws Exception {","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_key() throws Exception {","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_keyAlias() throws Exception {","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacyAlias() throws Exception {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"codeeong"},"content":" /** @@Codee */","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"codeeong"},"content":" public void parseCommand_theme() throws Exception {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"codeeong"},"content":" String[] listThemes \u003d { \"Light\", \"Dark\" };","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand command \u003d (ChangeThemeCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" ChangeThemeCommand.COMMAND_WORD + \" \" + listThemes[i], DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"codeeong"},"content":" assertEquals(new ChangeThemeCommand(listThemes[i]), command);","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":150,"codeeong":12,"-":159}},{"path":"src/test/java/seedu/address/logic/parser/ChangeThemeCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private ChangeThemeCommandParser parser \u003d new ChangeThemeCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsThemeCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, listThemes[i], new ChangeThemeCommand(listThemes[i]));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" // Empty Argument","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" assertParseFailure(parser, \"\",","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangeThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":30}},{"path":"src/test/java/seedu/address/logic/parser/SetCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalTags.FRIEND;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class SetCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private SetCommandParser parser \u003d new SetCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsSetCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" String userInput \u003d \" \" + PREFIX_TAG + FRIEND.getTagName() + \" \" + PREFIX_TAG_COLOUR + \"green\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, userInput, new SetCommand(FRIEND, \"green\"));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":23}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_ASCENDING;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_DESCENDING;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"//import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public void noArguments_throwsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" public void parse_invalidArguments_failure() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" //more than 1 field entered","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"address\" + \" \" + \"asc\",","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" //invalid field entered","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"invalid\" + \"asc\",","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //invalid sort order entered","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"invalid\",","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" //no field entered","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"asc\",","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" //no order entered","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\",","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" /*","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public void parse_validArguments_success() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in asc order","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in desc order","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in asc order","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in desc order","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in asc order","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in desc order","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in asc order","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in desc order","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":82}},{"path":"src/test/java/seedu/address/logic/parser/TogglePrivacyCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParserTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d String.format","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" (MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_NO_FIELDS \u003d String.format(TogglePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private TogglePrivacyCommandParser parser \u003d new TogglePrivacyCommandParser();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidIndex() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" // zero index","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //negative index","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" //invalid index","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1 random\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void parseMissingField_fail() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" // no prefix specified","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\", MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" //no index specified","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" //nothing specified after command word","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidPrefix_fail() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME,","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void parseOneField_success() throws ParseException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" public void parseValidFollowedbyInvalid_success() throws ParseException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE + \" \" + PREFIX_NAME;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" * Checks if two TP commands are equal","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" * @param expected","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" * @param actual","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" private void compareTpCommand(TogglePrivacyCommand expected, TogglePrivacyCommand actual) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getIndex(), actual.getIndex());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRemark(), actual.getEpp().getPrivateRemark());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateAddress(), actual.getEpp().getPrivateAddress());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRating(), actual.getEpp().getPrivateRating());","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivatePhone(), actual.getEpp().getPrivatePhone());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateEmail(), actual.getEpp().getPrivateEmail());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":95}},{"path":"src/test/java/seedu/address/model/tag/TagTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class TagTest {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public void constructor_null_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new Tag(null));","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public void constructor_invalidTagName_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" String invalidTagName \u003d \"\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagName));","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" public void constructor_invalidTagColourName_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" String invalidTagColourName \u003d \"\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagColourName));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void isValidTagName() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" // null tag name","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagName(null));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public void isValidTagColour() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" // null tag name","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagColour(null));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":12,"-":26}},{"path":"src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class JsonUserPrefsStorageTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/JsonUserPrefsStorageTest/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void readUserPrefs_nullFilePath_throwsNullPointerException() throws DataConversionException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" readUserPrefs(null);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Optional\u003cUserPrefs\u003e readUserPrefs(String userPrefsFileInTestDataFolder) throws DataConversionException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d addToTestDataPathIfNotNull(userPrefsFileInTestDataFolder);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new JsonUserPrefsStorage(prefsFilePath).readUserPrefs(prefsFilePath);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void readUserPrefs_missingFile_emptyResult() throws DataConversionException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertFalse(readUserPrefs(\"NonExistentFile.json\").isPresent());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void readUserPrefs_notJsonFormat_exceptionThrown() throws DataConversionException {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" readUserPrefs(\"NotJsonFormatUserPrefs.json\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String userPrefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return userPrefsFileInTestDataFolder !\u003d null","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + userPrefsFileInTestDataFolder","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" : null;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void readUserPrefs_fileInOrder_successfullyRead() throws DataConversionException {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"TypicalUserPref.json\").get();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void readUserPrefs_valuesMissingFromFile_defaultValuesUsed() throws DataConversionException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"EmptyUserPrefs.json\").get();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(new UserPrefs(), actual);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public void readUserPrefs_extraValuesInFile_extraValuesIgnored() throws DataConversionException {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"ExtraValuesUserPref.json\").get();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private UserPrefs getTypicalUserPrefs() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" userPrefs.setGuiSettings(1000, 500, 300, 100);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" userPrefs.setAddressBookFilePath(\"myteammanager.xml\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" userPrefs.setAddressBookName(\"TypicalAddressBookName\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return userPrefs;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void savePrefs_nullPrefs_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveUserPrefs(null, \"SomeFile.json\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void saveUserPrefs_nullFilePath_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" saveUserPrefs(new UserPrefs(), null);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Saves {@code userPrefs} at the specified {@code prefsFileInTestDataFolder} filepath.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" private void saveUserPrefs(UserPrefs userPrefs, String prefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(addToTestDataPathIfNotNull(prefsFileInTestDataFolder))","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" .saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file\", ioe);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" public void saveUserPrefs_allInOrder_success() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" original.setGuiSettings(1200, 200, 0, 2);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String pefsFilePath \u003d testFolder.getRoot() + File.separator + \"TempPrefs.json\";","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage jsonUserPrefsStorage \u003d new JsonUserPrefsStorage(pefsFilePath);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" //Try writing when the file doesn\u0027t exist","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" UserPrefs readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" //Try saving when the file exists","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" original.setGuiSettings(5, 5, 5, 5);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":134}},{"path":"src/test/java/seedu/address/testutil/EditPersonPrivacyBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":" * A utility class to help with building EditPersonPrivacy objects.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"public class EditPersonPrivacyBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" private EditPersonPrivacy epp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder() {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d new EditPersonPrivacy(epp);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" * Returns an {@code EditPersonPrivacy} with fields containing {@code person}\u0027s privacy details","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(Person p) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(p.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(p.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(p.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(p.getRemark().isPrivate());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(p.getRating().isPrivate());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setPhonePrivate(String phone) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setEmailPrivate(String email) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(true);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setAddressPrivate(String address) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(true);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRatingPrivate(String rating) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (rating.equals(\"Optional[true]\") || rating.equals(\"true\")) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(true);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else if (rating.equals(\"Optional[false]\") || rating.equals(\"false\")) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of rating should be true or false\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRemarkPrivate(String remark) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy build() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" return epp;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":89,"-":2}},{"path":"src/test/java/seedu/address/testutil/TeamBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * A utility class to help with building a TeamList.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class TeamBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TEAM_NAME \u003d \"Arsenal\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private TeamName teamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public TeamBuilder() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" teamName \u003d new TeamName(DEFAULT_TEAM_NAME);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Initializes the TeamBuilder with the data of {@code teamToCopy}.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public TeamBuilder(Team teamToCopy) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" teamName \u003d teamToCopy.getTeamName();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Sets the {@code TeamName} of the {@code Team} that we are building.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public TeamBuilder withTeamName(String teamName) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.teamName \u003d new TeamName(teamName);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public Team build() {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new Team(teamName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":8,"-":31}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class TypicalPersons {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final Person ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" .withPhone(\"85355255\").withTags(\"friends\").withRating(\"0\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"1\").build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final Person BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withTags(\"owesMoney\", \"friends\").withRating(\"1\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"2\").build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final Person CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withRating(\"2\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"3\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final Person DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withRating(\"3\")","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" .withPosition(\"4\").withJerseyNumber(\"4\").build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final Person ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withRating(\"4\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"5\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final Person FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withRating(\"5\")","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"6\").build();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final Person GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withRemark(\"Could be famous\").withRating(\"0\")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"7\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // Manually added","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final Person HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").build();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final Person IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").build();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final Person AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2)","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final Person BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRating(VALID_RATING_1)","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_MIDFIELD).withJerseyNumber(VALID_JERSEY_NUMBER_17)","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" for (Person person : getTypicalPersons()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new AssertionError(\"not possible\");","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return ab;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersons() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByAddress() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(DANIEL, ALICE, BENSON, GEORGE, FIONA, ELLE, CARL));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByEmail() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, GEORGE, DANIEL, CARL, BENSON, FIONA, ELLE));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByPhone() {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, DANIEL, ELLE, FIONA, GEORGE, CARL, BENSON));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getSortedAddressBook(String field, String order) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e personList;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" switch(field) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" case \"phone\":","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByPhone();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByEmail();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByAddress();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" if (order.equals(\"desc\")) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Collections.reverse(personList);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" for (Person person : personList) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" return ab;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getEmptyAddressBook() {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" return ab;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":59,"-":91}},{"path":"src/test/java/seedu/address/testutil/TypicalTags.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" * A utility class containing a list of {@code Tag} objects to be used in tests.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"public class TypicalTags {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final Tag GOOD_ATTITUDE \u003d new Tag(\"goodAttitude\", \"teal\");","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public static final Tag FRIEND \u003d new Tag(\"friends\", \"teal\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" private TypicalTags() {} //prevents instantiation","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * Returns an {@code AddressBook} with all the typical teams.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" for (Tag tag : getTypicalTags()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" ab.addTag(tag);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" } catch (UniqueTagList.DuplicateTagException e) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\"not possible\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" return ab;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public static List\u003cTag\u003e getTypicalTags() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(GOOD_ATTITUDE, FRIEND));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":43}},{"path":"src/test/java/seedu/address/ui/PlayerDetailsTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertPlayerDetailsDisplaysPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"//@@author Codee","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class PlayerDetailsTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" // no tags","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(personWithNoTags);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(playerDetails);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertCardDisplay(playerDetails, personWithNoTags);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(person);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(playerDetails.equals(playerDetails));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(null));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(0));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(new PlayerDetails(differentPerson)));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Asserts that {@code playerDetails} displays the details of {@code expectedPerson} correctly","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PlayerDetails playerDetails, Person expectedPerson) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" PlayerDetailsHandle playerDetailsHandle \u003d new PlayerDetailsHandle(playerDetails.getRoot());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" // verify player details are displayed correctly","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertPlayerDetailsDisplaysPerson(expectedPerson, playerDetailsHandle);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":13,"-":44}},{"path":"src/test/java/seedu/address/ui/TeamDisplayTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertTeamDisplayEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.TeamBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * tests for TeamDisplay UI Component.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private static final String NEW_TEAM_NAME \u003d \"myTeam\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private static final ShowNewTeamNameEvent SHOW_NEW_TEAM_NAME_EVENT \u003d new ShowNewTeamNameEvent(NEW_TEAM_NAME);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" private TeamDisplay teamDisplay;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" private TeamDisplayHandle teamDisplayHandle;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" teamList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Arsenal\").build());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Chelsea\").build());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" teamDisplay \u003d new TeamDisplay(teamList);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" uiPartRule.setUiPart(teamDisplay);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" public void display() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" assertTeamDisplay(teamDisplay, teamList);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void assertTeamDisplay(TeamDisplay teamDisplay, ObservableList\u003cTeam\u003e teamlist) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(teamDisplay, teamDisplayHandle);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" public void handleShowNewTeamNameEvent() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" postNow(SHOW_NEW_TEAM_NAME_EVENT);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly after event","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" teamList.add(new Team(new TeamName(NEW_TEAM_NAME)));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" TeamDisplay expectedTeamDisplay \u003d new TeamDisplay(teamList);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(expectedTeamDisplay, teamDisplayHandle);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class UiPartTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_WITH_FX_ROOT_PATH \u003d \"UiPartTest/validFileWithFxRoot.fxml\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void constructor_nullFileUrl_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null, new Object()));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void constructor_missingFileUrl_throwsAssertionError() throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl, new Object()));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void constructor_invalidFileUrl_throwsAssertionError() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl, new Object()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void constructor_validFileUrl_loadsFile() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void constructor_validFileWithFxRootUrl_loadsFile() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_WITH_FX_ROOT_PATH);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" TestFxmlObject root \u003d new TestFxmlObject();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl, root).getRoot());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void constructor_nullFileName_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null, new Object()));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void constructor_missingFileName_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH, new Object()));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void constructor_invalidFileName_throwsAssertionError() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH, new Object()));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return testFileUrl;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * UiPart used for testing.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl, T root) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" super(fxmlFileUrl, root);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName, T root) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" super(fxmlFileName, root);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" super(fxmlFileName);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.PersonCard;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.TeamDisplay;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class GuiTestAssert {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private static final String LABEL_DEFAULT_STYLE \u003d \"label\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getPosition(), actualCard.getPosition());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getRating(), actualCard.getRating());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTeamName(), actualCard.getTeamName());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" expectedCard.getTags().forEach(tag -\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTagStyleClasses(tag), actualCard.getTagStyleClasses(tag)));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualTeamDisplay} displays the details of {@code expectedTeamDisplay}.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static void assertTeamDisplayEquals(TeamDisplay expectedTeamDisplay, TeamDisplayHandle actualTeamDisplay) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" expectedTeamDisplay.getTeams().forEach(team -\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedTeamDisplay.getTeams().toString(), actualTeamDisplay.getTeams().toString()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(Person expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getTeamName().toString(), actualCard.getTeamName());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getRating().value, actualCard.getRating());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getPosition().getPositionName(), actualCard.getPosition());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" assertTagsEqual(expectedPerson, actualCard);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualPlayerDetails} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static void assertPlayerDetailsDisplaysPerson(Person expectedPerson, PlayerDetailsHandle actualPlayerPanel) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualPlayerPanel.getName());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().toString(), actualPlayerPanel.getAddress());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualPlayerPanel.getEmail());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getJerseyNumber().value, actualPlayerPanel.getJerseyNumber());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualPlayerPanel.getPhone());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getRemark().toString(), actualPlayerPanel.getRemarks());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Returns the color style for {@code tagName}\u0027s label. The tag\u0027s color is determined by looking up the color","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" * of {@tagColour}","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" * @see PersonCard getTagColorStyleFor(String)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" private static String getTagColorStyleFor(String tagName) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" switch (tagName) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" case \"classmates\":","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" case \"owesMoney\":","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" case \"colleagues\":","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" case \"neighbours\":","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" case \"family\":","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" case \"friend\":","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" case \"friends\":","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" case \"husband\":","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" case \"redCard\":","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" case \"yellowCard\":","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" case \"goodAttitude\":","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" case \"badAttitude\":","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" case \"injured\":","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" case \"fastRunner\":","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" return \"teal\";","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" default:","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" fail(tagName + \" does not have a color assigned.\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" return \"\";","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" * Asserts that the tags in {@code actualCard} matches all the tags in {@code expectedPerson} with the correct","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" * color.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" private static void assertTagsEqual(Person expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e expectedTags \u003d expectedPerson.getTags().stream()","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" .map(tag -\u003e tag.tagName).collect(Collectors.toList());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedTags, actualCard.getTags());","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" expectedTags.forEach(tag -\u003e","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" assertEquals(Arrays.asList(LABEL_DEFAULT_STYLE, getTagColorStyleFor(tag)),","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" actualCard.getTagStyleClasses(tag)));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, Person... persons) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cPerson\u003e persons) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new Person[0]));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}.","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":70,"-":81}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_MAC_LINUX;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_WINDOWS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_JERSEY_NUMBER_DESC;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_POSITION_DESC;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_RATING_DESC;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_MAC_LINUX;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_WINDOWS;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"import com.sun.javafx.PlatformUtil;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void add() throws Exception {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operations on the shown unfiltered list ----------------------------- */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * -\u003e added","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" Person toAdd \u003d AMY;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" String command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" deleteAllPersons();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_HUSBAND + EMAIL_DESC_BOB + POSITION_DESC_MIDFILED + JERSEY_NUMBER_DESC_17 + RATING_DESC_1;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e added */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" .withPhone(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e added */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" .withAddress(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: missing rating -\u003e added */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags().withRating(UNSPECIFIED_FIELD)","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" if (PlatformUtil.isWindows()) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_WINDOWS)","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" .build();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_WINDOWS","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" } else if (PlatformUtil.isMac() || PlatformUtil.isLinux()) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_MAC_LINUX)","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" .build();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_MAC_LINUX","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /* -------------------------- Perform add operation on the shown filtered list ------------------------------ */","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operation while a person card is selected --------------------------- */","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" /* ----------------------------------- Perform invalid add operations --------------------------------------- */","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(Person)","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON) + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + INVALID_ADDRESS_DESC","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Address.MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" + INVALID_TAG_DESC + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" //@@author lithiumlkid","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" /* Case: invalid rating -\u003e rejected */","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" + INVALID_RATING_DESC + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Rating.MESSAGE_RATING_CONSTRAINTS);","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" /* Case: invalid position -\u003e rejected */","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + INVALID_POSITION_DESC + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Position.MESSAGE_POSITION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" /* Case: invalid jersey number -\u003e rejected */","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + INVALID_JERSEY_NUMBER_DESC;","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandFailure(command, JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_NO_FILE;","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_TYPE;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Avatar.MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and asserts that the,\u003cbr\u003e","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 1. Command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" * 2. Command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" * 3. Result display box displays the success message of executing {@code AddCommand} with the details of","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" * {@code toAdd}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" * the current model added with {@code toAdd}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" * 5. Browser url and selected card remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" * 6. Status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Person toAdd) {","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(Person)}. Executes {@code command}","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" * instead.","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(Person)","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Person toAdd) {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" // TODO: place holder for success message, change to proper assert method","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Person)} except asserts that","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" * the,\u003cbr\u003e","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" * 1. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" * 2. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":" * {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, Person)","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" * Executes {@code command} and asserts that the,\u003cbr\u003e","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":" * 1. Command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":" * 2. Command box has the error style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":" * 3. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":" * 5. Browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":5,"-":359}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * for test verification.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @ClassRule","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initialize();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication(this::getInitialData, getDataFileLocation());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Returns the data to be loaded into the file in {@link #getDataFileLocation()}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return TypicalPersons.getTypicalAddressBook();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Returns the directory of the data file.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public MainWindowHandle getMainWindowHandle() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return mainWindowHandle;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" rememberStates();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons in the address book.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showAllPersons() {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(getModel().getAddressBook().getPersonList().size(), getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive).","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + keyword);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertTrue(getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + index.getOneBased());","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertEquals(index.getZeroBased(), getPersonListPanel().getSelectedCardIndex());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Deletes all persons in the address book.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected void deleteAllPersons() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertEquals(0, getModel().getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" * their current state.","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" private void rememberStates() {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * of the previously selected person.","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged.","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style.","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same.","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"codeeong"},"content":" //assertEquals that the detail card is correct","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model.","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":264}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" * -\u003e edited","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + TAG_DESC_HUSBAND + \" \"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" + RATING_DESC_1 + \" \" + POSITION_DESC_MIDFILED + \" \" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND)","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" .withRating(VALID_RATING_1).withPosition(VALID_POSITION_MIDFIELD)","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" .withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" model.updatePerson(","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + POSITION_DESC_MIDFILED + RATING_DESC_1","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_17;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().build();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" * browser url changes","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" selectPerson(index);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_AMY + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_ADDRESS_DESC,","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" Address.MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_NO_FILE,","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_TYPE,","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" Avatar.MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, Person, Index)} except that","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, Person, Index)","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson) {","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson,","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":6,"-":302}},{"path":"src/test/java/systemtests/HelpCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.GuiRobot;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.HelpWindowHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.ui.StatusBarFooter;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A system test class for the help window, which contains interaction with other UI components.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class HelpCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String ERROR_MESSAGE \u003d \"ATTENTION!!!! : On some computers, this test may fail when run on \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"non-headless mode as FxRobot#clickOn(Node, MouseButton...) clicks on the wrong location. We suspect \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"that this is a bug with TestFX library that we are using. If this test fails, you have to run your \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" + \"tests on headless mode. See UsingGradle.adoc on how to do so.\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final GuiRobot guiRobot \u003d new GuiRobot();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void openHelpWindow() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" //use accelerator","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" getCommandBox().click();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" getResultDisplay().click();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" getPersonListPanel().click();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" //use menu button","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingMenu();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" //use command box","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // open help window and give it focus","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // assert that while the help window is open the UI updates correctly for a command execution","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertNotEquals(HelpCommand.SHOWING_HELP_MESSAGE, getResultDisplay().getText());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" //assertNotEquals(BrowserPanel.DEFAULT_PAGE, getBrowserPanel().getLoadedUrl());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" // assert that the status bar too is updated correctly while the help window is open","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" // note: the select command tested above does not update the status bar","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" executeCommand(DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertNotEquals(StatusBarFooter.SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Asserts that the help window is open, and closes it after checking.","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private void assertHelpWindowOpen() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertTrue(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" new HelpWindowHandle(guiRobot.getStage(HelpWindowHandle.HELP_WINDOW_TITLE)).close();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts that the help window isn\u0027t open.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private void assertHelpWindowNotOpen() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":88}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Alpha_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Alpha_master/authorship.json index 4a79046f92..a23cb89368 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Alpha_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Alpha_master/authorship.json @@ -1 +1 @@ -[{"path":"annotationTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"fake all the lines in this file is writtened by fakeAuthor"},{"lineNumber":2,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg"},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author"},{"lineNumber":10,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":11,"author":{"gitId":"-"},"content":"fake"}],"authorContributionMap":{"harryggg":5,"-":6}},{"path":"blameTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3"}],"authorContributionMap":{"harryggg":3,"-":1}},{"path":"newFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4"}],"authorContributionMap":{"harryggg":4}}] +[{"path":"annotationTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"fake all the lines in this file is writtened by fakeAuthor","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"fake","isFullCredit":true}],"authorContributionMap":{"harryggg":5,"-":6}},{"path":"blameTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true}],"authorContributionMap":{"harryggg":3,"-":1}},{"path":"newFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4","isFullCredit":true}],"authorContributionMap":{"harryggg":4}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Beta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Beta_master/authorship.json index ff1d3dea45..bb035f2a14 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Beta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Beta_master/authorship.json @@ -1 +1 @@ -[{"path":"src/main/resources/view/InfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e"},{"lineNumber":4,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"700.0\" prefWidth\u003d\"800.0\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"browserPlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"timetablePlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"-":7,"nbr":1}},{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e"},{"lineNumber":4,"author":{"gitId":"April0616"},"content":""},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import java.net.URL?\u003e"},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Menu?\u003e"},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e"},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":16,"author":{"gitId":"April0616"},"content":" \u003cstylesheets\u003e"},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e"},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003c/stylesheets\u003e"},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" maxHeight\u003d\"22.0\" prefHeight\u003d\"22.0\" prefWidth\u003d\"2000.0\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e"},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e"},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e"},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e"},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e"},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e"},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003c/MenuBar\u003e"},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox\u003e"},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cVBox fx:id\u003d\"personList\"\u003e"},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" minWidth\u003d\"255.0\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane\u003e"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":""},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.26582278481012656\" orientation\u003d\"VERTICAL\" prefWidth\u003d\"2000.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":34,"author":{"gitId":"April0616"},"content":""},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4269269269269269\" maxHeight\u003d\"628.0\" minHeight\u003d\"230.0\" prefHeight\u003d\"600.0\" prefWidth\u003d\"1990.0\"\u003e"},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cVBox maxWidth\u003d\"1000.0\" minHeight\u003d\"81.0\" minWidth\u003d\"430.0\" prefHeight\u003d\"81.0\" prefWidth\u003d\"843.0\" SplitPane.resizableWithParent\u003d\"true\"\u003e"},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e"},{"lineNumber":40,"author":{"gitId":"April0616"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" alignment\u003d\"TOP_CENTER\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"10.0\" right\u003d\"10.0\" /\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personInfoPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003c!-- @@author April0616 --\u003e"},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cVBox minWidth\u003d\"200\" prefWidth\u003d\"323.0\"\u003e"},{"lineNumber":52,"author":{"gitId":"April0616"},"content":""},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"305.0\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e"},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e"},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e"},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"320.0\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e"},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e"},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e"},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e"},{"lineNumber":66,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":68,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":71,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":72,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":74,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e"},{"lineNumber":75,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e"}],"authorContributionMap":{"April0616":54,"-":20,"nbr":1}},{"path":"src/main/resources/view/PersonInfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"April0616"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"April0616"},"content":""},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e"},{"lineNumber":4,"author":{"gitId":"April0616"},"content":""},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.Image?\u003e"},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e"},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.shape.Circle?\u003e"},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.text.Font?\u003e"},{"lineNumber":16,"author":{"gitId":"April0616"},"content":"\u003cAnchorPane styleClass\u003d\"person-info-panel\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":17,"author":{"gitId":"April0616"},"content":""},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"250.0\" prefWidth\u003d\"448.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"250.0\" prefWidth\u003d\"198.0\"\u003e"},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane prefHeight\u003d\"216.0\" prefWidth\u003d\"210.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cImageView fitHeight\u003d\"210.0\" fitWidth\u003d\"221.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\"\u003e"},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003cimage\u003e"},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cImage url\u003d\"@../images/personInfoBg.jpg\" /\u003e"},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003c/image\u003e"},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e"},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003cCircle fx:id\u003d\"photoCircle\" fill\u003d\"WHITE\" layoutX\u003d\"111.0\" layoutY\u003d\"100.0\" radius\u003d\"86.0\" stroke\u003d\"floralwhite\" strokeType\u003d\"INSIDE\" strokeWidth\u003d\"10\" /\u003e"},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cVBox alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"250.0\" prefWidth\u003d\"574.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cStackPane alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"20.0\" prefWidth\u003d\"304.0\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":34,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"35.0\" prefWidth\u003d\"391.0\" styleClass\u003d\"display_big_label\" text\u003d\"\\$name\"\u003e"},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cfont\u003e"},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cFont size\u003d\"24.0\" /\u003e"},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003c/font\u003e"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003c/Label\u003e"},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":40,"author":{"gitId":"April0616"},"content":" \u003cInsets left\u003d\"15.0\" top\u003d\"20.0\" /\u003e"},{"lineNumber":41,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":42,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e"},{"lineNumber":43,"author":{"gitId":"April0616"},"content":" \u003cFlowPane fx:id\u003d\"tags\" columnHalignment\u003d\"CENTER\"\u003e"},{"lineNumber":44,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":45,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5.0\" left\u003d\"15.0\" right\u003d\"10.0\" /\u003e"},{"lineNumber":46,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":47,"author":{"gitId":"April0616"},"content":" \u003c/FlowPane\u003e"},{"lineNumber":48,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"100.0\" prefWidth\u003d\"200.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":49,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"160.0\" prefWidth\u003d\"9.0\" HBox.hgrow\u003d\"NEVER\"\u003e"},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Gender\" /\u003e"},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Matric No\" /\u003e"},{"lineNumber":52,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Phone\" /\u003e"},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Email\" /\u003e"},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Birthday\" /\u003e"},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Address\" /\u003e"},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Remark\" /\u003e"},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"200.0\" prefWidth\u003d\"100.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"phone\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"email\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"birthday\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"address\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"\u003e"},{"lineNumber":65,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":66,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":67,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e"},{"lineNumber":68,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"\u003e"},{"lineNumber":69,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":70,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":71,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e"},{"lineNumber":72,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":74,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"15.0\" /\u003e"},{"lineNumber":75,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":76,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":77,"author":{"gitId":"April0616"},"content":" \u003cHBox.margin\u003e"},{"lineNumber":78,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":79,"author":{"gitId":"April0616"},"content":" \u003c/HBox.margin\u003e"},{"lineNumber":80,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":81,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":82,"author":{"gitId":"April0616"},"content":"\u003c/AnchorPane\u003e"}],"authorContributionMap":{"April0616":82}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e"},{"lineNumber":10,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":12,"author":{"gitId":"nbr"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":19,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":21,"author":{"gitId":"nbr"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"cell_big_label\" text\u003d\"\\$first\" /\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003cFlowPane fx:id\u003d\"tags\"\u003e"},{"lineNumber":31,"author":{"gitId":"nbr"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":32,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5.0\" /\u003e"},{"lineNumber":33,"author":{"gitId":"nbr"},"content":" \u003c/VBox.margin\u003e\u003c/FlowPane\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":37,"author":{"gitId":"nbr"},"content":" \u003crowConstraints\u003e"},{"lineNumber":38,"author":{"gitId":"nbr"},"content":" \u003cRowConstraints /\u003e"},{"lineNumber":39,"author":{"gitId":"nbr"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"-":29,"nbr":12}},{"path":"src/main/resources/view/PersonListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.ListView?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":5,"author":{"gitId":"nbr"},"content":"\u003cVBox styleClass\u003d\"personListBox\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cListView fx:id\u003d\"personListView\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e"}],"authorContributionMap":{"-":6,"nbr":1}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"nbr"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"-":25,"nbr":2}},{"path":"unused/CombinedTimetableDisplay.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\" xmlns\u003d\"http://javafx.com/javafx/8\""},{"lineNumber":16,"author":{"gitId":"-"},"content":" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.2\" orientation\u003d\"VERTICAL\" prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cAnchorPane styleClass\u003d\"combined-timetable-label\"\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cGridPane layoutX\u003d\"151.0\" layoutY\u003d\"26.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\""},{"lineNumber":22,"author":{"gitId":"-"},"content":" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" maxWidth\u003d\"300\" minWidth\u003d\"300.0\" prefWidth\u003d\"300\"/\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\"/\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cRowConstraints minHeight\u003d\"10.0\" prefHeight\u003d\"30.0\" vgrow\u003d\"SOMETIMES\"/\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_RIGHT\"\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cLabel alignment\u003d\"CENTER\" styleClass\u003d\"combined-timetable-main-label\" text\u003d\"Timetables Displayed: \"\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cInsets right\u003d\"2.5\"/\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"1\"\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"names\" styleClass\u003d\"combined-timetable-names\" text\u003d\"Label\"\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cInsets left\u003d\"2.5\"/\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" prefHeight\u003d\"100.0\" prefWidth\u003d\"160.0\"/\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"zacharytang":2,"-":46}},{"path":"unused/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":""},{"lineNumber":3,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":4,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e"},{"lineNumber":6,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":7,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":8,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":9,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cchildren\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/ImageView\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"/\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e"},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e"},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"/\u003e"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"zacharytang":8,"April0616":2,"-":55}}] +[{"path":"src/main/resources/view/InfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"700.0\" prefWidth\u003d\"800.0\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"browserPlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"timetablePlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"-":7,"nbr":1}},{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import java.net.URL?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Menu?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"April0616"},"content":" \u003cstylesheets\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003c/stylesheets\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" maxHeight\u003d\"22.0\" prefHeight\u003d\"22.0\" prefWidth\u003d\"2000.0\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003c/MenuBar\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cVBox fx:id\u003d\"personList\"\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" minWidth\u003d\"255.0\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.26582278481012656\" orientation\u003d\"VERTICAL\" prefWidth\u003d\"2000.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4269269269269269\" maxHeight\u003d\"628.0\" minHeight\u003d\"230.0\" prefHeight\u003d\"600.0\" prefWidth\u003d\"1990.0\"\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cVBox maxWidth\u003d\"1000.0\" minHeight\u003d\"81.0\" minWidth\u003d\"430.0\" prefHeight\u003d\"81.0\" prefWidth\u003d\"843.0\" SplitPane.resizableWithParent\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" alignment\u003d\"TOP_CENTER\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"10.0\" right\u003d\"10.0\" /\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personInfoPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003c!-- @@author April0616 --\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cVBox minWidth\u003d\"200\" prefWidth\u003d\"323.0\"\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"305.0\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"320.0\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":54,"-":20,"nbr":1}},{"path":"src/main/resources/view/PersonInfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"April0616"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.Image?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.shape.Circle?\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.text.Font?\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"April0616"},"content":"\u003cAnchorPane styleClass\u003d\"person-info-panel\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"250.0\" prefWidth\u003d\"448.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"250.0\" prefWidth\u003d\"198.0\"\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane prefHeight\u003d\"216.0\" prefWidth\u003d\"210.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cImageView fitHeight\u003d\"210.0\" fitWidth\u003d\"221.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003cimage\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cImage url\u003d\"@../images/personInfoBg.jpg\" /\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003c/image\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003cCircle fx:id\u003d\"photoCircle\" fill\u003d\"WHITE\" layoutX\u003d\"111.0\" layoutY\u003d\"100.0\" radius\u003d\"86.0\" stroke\u003d\"floralwhite\" strokeType\u003d\"INSIDE\" strokeWidth\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cVBox alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"250.0\" prefWidth\u003d\"574.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cStackPane alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"20.0\" prefWidth\u003d\"304.0\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"35.0\" prefWidth\u003d\"391.0\" styleClass\u003d\"display_big_label\" text\u003d\"\\$name\"\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cfont\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cFont size\u003d\"24.0\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003c/font\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"April0616"},"content":" \u003cInsets left\u003d\"15.0\" top\u003d\"20.0\" /\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"April0616"},"content":" \u003cFlowPane fx:id\u003d\"tags\" columnHalignment\u003d\"CENTER\"\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5.0\" left\u003d\"15.0\" right\u003d\"10.0\" /\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"April0616"},"content":" \u003c/FlowPane\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"100.0\" prefWidth\u003d\"200.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"160.0\" prefWidth\u003d\"9.0\" HBox.hgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Gender\" /\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Matric No\" /\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Phone\" /\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Email\" /\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Birthday\" /\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Address\" /\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Remark\" /\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"200.0\" prefWidth\u003d\"100.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"phone\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"email\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"birthday\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"address\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"15.0\" /\u003e","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"April0616"},"content":" \u003cHBox.margin\u003e","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"April0616"},"content":" \u003c/HBox.margin\u003e","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"April0616"},"content":"\u003c/AnchorPane\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":82}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"nbr"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"nbr"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"cell_big_label\" text\u003d\"\\$first\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003cFlowPane fx:id\u003d\"tags\"\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"nbr"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5.0\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"nbr"},"content":" \u003c/VBox.margin\u003e\u003c/FlowPane\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"nbr"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"nbr"},"content":" \u003cRowConstraints /\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"nbr"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":29,"nbr":12}},{"path":"src/main/resources/view/PersonListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.ListView?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"nbr"},"content":"\u003cVBox styleClass\u003d\"personListBox\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cListView fx:id\u003d\"personListView\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":6,"nbr":1}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"nbr"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":25,"nbr":2}},{"path":"unused/CombinedTimetableDisplay.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\" xmlns\u003d\"http://javafx.com/javafx/8\"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.2\" orientation\u003d\"VERTICAL\" prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cAnchorPane styleClass\u003d\"combined-timetable-label\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cGridPane layoutX\u003d\"151.0\" layoutY\u003d\"26.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" maxWidth\u003d\"300\" minWidth\u003d\"300.0\" prefWidth\u003d\"300\"/\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\"/\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cRowConstraints minHeight\u003d\"10.0\" prefHeight\u003d\"30.0\" vgrow\u003d\"SOMETIMES\"/\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_RIGHT\"\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cLabel alignment\u003d\"CENTER\" styleClass\u003d\"combined-timetable-main-label\" text\u003d\"Timetables Displayed: \"\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cInsets right\u003d\"2.5\"/\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"1\"\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"names\" styleClass\u003d\"combined-timetable-names\" text\u003d\"Label\"\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cInsets left\u003d\"2.5\"/\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" prefHeight\u003d\"100.0\" prefWidth\u003d\"160.0\"/\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"zacharytang":2,"-":46}},{"path":"unused/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cchildren\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/ImageView\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"/\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"/\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"zacharytang":8,"April0616":2,"-":55}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Charlie_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Charlie_master/authorship.json index 3cf7e17c82..0452cffa7d 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Charlie_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Charlie_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"ifndef::env-github[]"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"image::images/Ui.png[width\u003d\"600\"]"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"endif::[]"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface)."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"* It is a Java application primarily targeted for students doing group projects."},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls."},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Site Map"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Acknowledgements"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"_Marco Jakob_."},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_."},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]"}],"authorContributionMap":{"charlesgoh":36}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us"},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team."},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/."},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Goh Chang Kang, Charles"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[https://github.com/charlesgoh[github]]"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert, Password Security Commands"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Jeffrey Goh Keng Wee"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Lin Ziwen Kelvin"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esilocke[github]]"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Wang Yiming"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1019[github]]"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"}],"authorContributionMap":{"charlesgoh":18,"Esilocke":4,"-":26}},{"path":"docs/ContactUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Contact Us"},{"lineNumber":2,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":3,"author":{"gitId":"-"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"* *Bug reports, Suggestions* : Post in our https://github.com/CS2103AUG2017-W09-B2/main/issues[issue tracker] if you noticed bugs or have suggestions on how to improve."},{"lineNumber":5,"author":{"gitId":"-"},"content":"* *Contributing* : We welcome pull requests. Follow the process described https://github.com/oss-generic/process[here]"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"* *Email us* : You can also reach us at `e0014961 [at] u.nus.edu`"}],"authorContributionMap":{"Esilocke":2,"-":4}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later"},{"lineNumber":22,"author":{"gitId":"-"},"content":"+"},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":26,"author":{"gitId":"-"},"content":"+"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE"},{"lineNumber":29,"author":{"gitId":"-"},"content":"+"},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them."},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer"},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)"},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle"},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`"},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK"},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`"},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`"},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`"},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings"},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +"},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests."},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands"},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)"},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`"},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code."},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork."},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up."},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e)."},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section."},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started]."},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]"},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component."},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`."},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other."},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary."},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level."},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)"},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file."},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components."},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App."},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor."},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory."},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk."},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component."},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class."},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class."},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`."},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]"},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk."},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time."},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]"},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components."},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component."},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class."},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component."},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change."},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly."},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :"},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command."},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`."},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events."},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`."},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call."},{"lineNumber":183,"author":{"gitId":"-"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]"},{"lineNumber":193,"author":{"gitId":"-"},"content":""},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences."},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data."},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change."},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyTask\u003e` that can be \u0027observed\u0027."},{"lineNumber":200,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components."},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":205,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `Storage` component,"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back."},{"lineNumber":212,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back."},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package."},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation"},{"lineNumber":219,"author":{"gitId":"-"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented."},{"lineNumber":221,"author":{"gitId":"-"},"content":""},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow"},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go."},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.1 : Using the UI to change font size_"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size:"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"1. `onAction` handlers are used to handle UI font size buttons. These handlers will post"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"new events via `ComponentManager`."},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":"2. CLI commands also post new events to handle font size changes, when the relevant command is entered (e.g. `fontsize increase`)."},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeChangeSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.2 : Sequence diagram for fontsize changing_"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"From the sequence diagram above, we can observe that the font size changes are handled by subscriber functions in PersonListPanel"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"and TaskListPanel."},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"The initial implementation required access to the model from the UI. This implementation was replaced with one that"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"standardised the handling of font size change requests through events."},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Use either UI or CLI based implementations +"},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implementing both UI and CLI functionality +"},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More options for the user. Not much increase in complexity when implementing the CLI version +"},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Cons:** This implementation required passing information between classes, which may cause unnecessary coupling. +"},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implementing only UI functionality +"},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Less tedious to implement and very intuitive for the user +"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Users who prefer typing commands will not have the option of editing their font sizes using the CLI"},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"charlesgoh"},"content":"//tag::avatar[]"},{"lineNumber":261,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatar on ViewPersonPanel"},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":"The following function allows the setting of URL for the `ImageView` attribute within the `ViewPersonPanel` class:"},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":"[source,java]"},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":"private void initializeAvatar() {"},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" String avatarPath \u003d person.getAvatar().value;"},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" if (!avatarPath.equals(\"\")) {"},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Initializing avatar to image at saved URL\");"},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" Image newImage \u003d new Image(avatarPath);"},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":" avatarImage.setImage(newImage);"},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":"The `initializeAvatar` method piggybacks on the `handlePersonPanelSelectionChangedEvent` event handler. Whenever there is"},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":"a change in the person selection panel, this function will call the `initializeAvatar` method, which will update"},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"the `ImageView` attribute."},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":"[source,java]"},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":"@Subscribe"},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":"private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" this.person \u003d event.getNewSelection().person;"},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" initializeWithPerson(person);"},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();"},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":"}"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":"As of v1.5, the avatar field supports only URLs sourced online. References to local files may work but require the"},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"prefix \"file:\""},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":299,"author":{"gitId":"-"},"content":"//tag::undoredo[]"},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`."},{"lineNumber":303,"author":{"gitId":"-"},"content":""},{"lineNumber":304,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:"},{"lineNumber":305,"author":{"gitId":"-"},"content":""},{"lineNumber":306,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.1 : Command inheritance_"},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern]."},{"lineNumber":310,"author":{"gitId":"-"},"content":""},{"lineNumber":311,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:"},{"lineNumber":312,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":313,"author":{"gitId":"-"},"content":"----"},{"lineNumber":314,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":315,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":316,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":317,"author":{"gitId":"-"},"content":" // ... list logic ..."},{"lineNumber":318,"author":{"gitId":"-"},"content":" }"},{"lineNumber":319,"author":{"gitId":"-"},"content":"}"},{"lineNumber":320,"author":{"gitId":"-"},"content":"----"},{"lineNumber":321,"author":{"gitId":"-"},"content":""},{"lineNumber":322,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:"},{"lineNumber":323,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":324,"author":{"gitId":"-"},"content":"----"},{"lineNumber":325,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {"},{"lineNumber":326,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":327,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":328,"author":{"gitId":"-"},"content":" // ... undo logic ..."},{"lineNumber":329,"author":{"gitId":"-"},"content":""},{"lineNumber":330,"author":{"gitId":"-"},"content":" executeUndoableCommand();"},{"lineNumber":331,"author":{"gitId":"-"},"content":" }"},{"lineNumber":332,"author":{"gitId":"-"},"content":"}"},{"lineNumber":333,"author":{"gitId":"-"},"content":""},{"lineNumber":334,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":335,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":336,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":337,"author":{"gitId":"-"},"content":" // ... delete logic ..."},{"lineNumber":338,"author":{"gitId":"-"},"content":" }"},{"lineNumber":339,"author":{"gitId":"-"},"content":"}"},{"lineNumber":340,"author":{"gitId":"-"},"content":"----"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning."},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command)."},{"lineNumber":345,"author":{"gitId":"-"},"content":""},{"lineNumber":346,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.2 : Initial status of undo/redo stack_"},{"lineNumber":348,"author":{"gitId":"-"},"content":""},{"lineNumber":349,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person."},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.3 : After executing `delete 5`_"},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":355,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all."},{"lineNumber":356,"author":{"gitId":"-"},"content":""},{"lineNumber":357,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`."},{"lineNumber":358,"author":{"gitId":"-"},"content":""},{"lineNumber":359,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed."},{"lineNumber":360,"author":{"gitId":"-"},"content":""},{"lineNumber":361,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.4 : Executing undo_"},{"lineNumber":363,"author":{"gitId":"-"},"content":""},{"lineNumber":364,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":365,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`."},{"lineNumber":366,"author":{"gitId":"-"},"content":""},{"lineNumber":367,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:"},{"lineNumber":368,"author":{"gitId":"-"},"content":""},{"lineNumber":369,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.5 : Undo/redo sequence diagram_"},{"lineNumber":371,"author":{"gitId":"-"},"content":""},{"lineNumber":372,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed)."},{"lineNumber":373,"author":{"gitId":"-"},"content":""},{"lineNumber":374,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":375,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`."},{"lineNumber":376,"author":{"gitId":"-"},"content":""},{"lineNumber":377,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow)."},{"lineNumber":378,"author":{"gitId":"-"},"content":""},{"lineNumber":379,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.6 : Executing `clear`_"},{"lineNumber":381,"author":{"gitId":"-"},"content":""},{"lineNumber":382,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:"},{"lineNumber":383,"author":{"gitId":"-"},"content":""},{"lineNumber":384,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.7 : Stack is not changed after `list`_"},{"lineNumber":386,"author":{"gitId":"-"},"content":""},{"lineNumber":387,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:"},{"lineNumber":388,"author":{"gitId":"-"},"content":""},{"lineNumber":389,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.8 : Undo/Redo activity diagram_"},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":393,"author":{"gitId":"-"},"content":""},{"lineNumber":394,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +"},{"lineNumber":395,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +"},{"lineNumber":396,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +"},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":398,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +"},{"lineNumber":399,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +"},{"lineNumber":400,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +"},{"lineNumber":401,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo."},{"lineNumber":402,"author":{"gitId":"-"},"content":""},{"lineNumber":403,"author":{"gitId":"-"},"content":"---"},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +"},{"lineNumber":406,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +"},{"lineNumber":407,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +"},{"lineNumber":408,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +"},{"lineNumber":409,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":410,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +"},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +"},{"lineNumber":412,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct."},{"lineNumber":413,"author":{"gitId":"-"},"content":""},{"lineNumber":414,"author":{"gitId":"-"},"content":"---"},{"lineNumber":415,"author":{"gitId":"-"},"content":""},{"lineNumber":416,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +"},{"lineNumber":417,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +"},{"lineNumber":418,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +"},{"lineNumber":419,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +"},{"lineNumber":420,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +"},{"lineNumber":422,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +"},{"lineNumber":423,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +"},{"lineNumber":424,"author":{"gitId":"-"},"content":""},{"lineNumber":425,"author":{"gitId":"-"},"content":"---"},{"lineNumber":426,"author":{"gitId":"-"},"content":""},{"lineNumber":427,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +"},{"lineNumber":428,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +"},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +"},{"lineNumber":430,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +"},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":432,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +"},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +"},{"lineNumber":434,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +"},{"lineNumber":435,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":436,"author":{"gitId":"-"},"content":""},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"// tag::task[]"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +"},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the `add`, `delete`, `find`, `select`, and `edit` commands."},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Object inheritance is thus used to create the commands that are shared with those used to handle Person objects."},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task-related Command implementation"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"An example of using inheritance to handle Person vs Task addition:"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {"},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand(toAdd);"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {"},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand(toAdd);"},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"The Parser in charge of the command will thus return either an AddPersonCommand, or an AddTaskCommand, depending on whether you specify to add a Task or not in the arguments."},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":" +"},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:"},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.1.1 : Sequence Diagram for adding a Task_"},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task structure and subclasses"},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"The Task object has several subclasses, which store information about the task. The following class diagram illustrates the structure of a Task object."},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"image::TaskClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.2.1 : Class Diagram for the Task class_"},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"Each subclass contains its own methods for input validation, and the Assignees class supports some methods for changing its assignedList."},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task Object Storage"},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"[source, xml]"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e"},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e"},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e"},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e"},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Task objects are stored in a similar manner to Person objects, and share the same level of hierarchy as Person objects. During startup, tasks are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book."},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +"},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use inheritance to implement different commands for Task and Person objects +"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"**Pros:** Can be easily extended to allow handling of other types of objects, and preserves Separation of Concerns. +"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"**Cons:** Minor code duplication occurs as the commands for Person and Tasks objects share the same structure. +"},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Use polymorphism to allow existing commands to implement task handling +"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"**Pros:** Code duplication is kept to a minimum as the Command will handle Task and Person objects in the same class. +"},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"**Cons:** Single Responsibility Principle is violated as each Command class now needs to handle 2 different types of objects. +"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +"},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +"},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes. +"},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa. +"},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage. +"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"// end::task[]"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]"},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign and Dismiss Commands"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"The `assign` and `dismiss` command allows you to assign contacts to and from your tasks, thus aiding coordination and collaboration. +"},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"The Assignees class stores information related to who is assigned to a particular task through maintaining an internal ArrayList that keeps track of all the indexes of the people who are assigned to the task. +"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"The indexes stored in the Assignees class *refer to the index of the person in the UniquePersonList, not the visible index shown to the user in the UI*. This means that the indexes will not change even if the list shown in the UI changes, such as after a `find` operation. +"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"For example, given the below list of persons:"},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexMovement.png[width\u003d\"800\"]"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.1 : Mapping of indexes to a task_"},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"After a `find` operation, only the second, fourth and fifth persons are visible."},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"When you call `assign 1 2 to/1`, while the first and second persons in the visible list will be assigned to the first Task, in this case the \"Second person\" and \"Fourth person\", internally the assignee list contain Indexes corresponding the following values: +"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[source, java]"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"assignedList \u003d {1, 3}"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"The indexes 1 and 3 refer to the zero-based index of the \"Second person\" and \"Fourth person\" in the complete list."},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Due to this requirement, when the UniquePersonList changes, the assigned indexes of each task will be updated as well."},{"lineNumber":555,"author":{"gitId":"-"},"content":""},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"The `add` operation will not require the assigned indexes to be updated, as each newly added person is not assigned to any task by default, and when a person is added, he is inserted to the end of the list, thus the order of the other persons will not change."},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"After a `clear` operation that clears only the persons list, all task assignee lists will be cleared and re-initialized."},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"After a `delete` operation, the order of the persons in the persons list may change. This is especially so when the first person is deleted, as this will cause the positions of all other persons to decrease by 1."},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"The activity diagram below illustrates the process of updating task assignee lists when a person is deleted."},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexDelete.png[width\u003d\"800]"},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.2 : Activity Diagram for updating Assignees after deleting a Person_"},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"After a `sort` operation, the order of the persons in the persons list may change as well. However, in comparison to `delete`, the new position of the person is not fixed."},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"To ensure that the indexes are updated properly, the change in positions after each `sort` operation is maintained as well inside the UniquePersonList. +"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexSort.png[width\u003d\"800\"]"},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.3 : Mapping of indexes after a sort operation_"},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"All task assignee lists will thus be updated using the mappings from the sort operation. Each index in the list will be replaced by the value given in the mappings."},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"For example, if a task previously had an index of \"1\" assigned to it, it be replaced by an index of \"4\"."},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of assigned persons in the Assignee class +"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store the Indexes of the persons only +"},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"**Pros:** The assigned persons will only need to be retrieved on a per-need basis, rather than residing in the Assignee class all the time, thus making storage simpler +"},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":"**Cons:** UniquePersonList will be coupled to Tasks, as Tasks will need to retrieve information from the UniquePersonList in order to update itself after any operation that could potentially change the UniquePersonList ordering. +"},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store the whole person in the Assignees class +"},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":"**Pros:** The Assignees class will not need to depend on the UniquePersonList as its internal list is independent from that of the UniquePersonList +"},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"**Cons:** Repetition of information is incurred in the storage file, as the same person can appear multiple times if he is assigned to multiple tasks. This will increase the size of the storage file, and make read-write operations slow. +"},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]"},{"lineNumber":587,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]"},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":589,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":590,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` methods in UniquePersonList and UniqueTaskList. It supports"},{"lineNumber":591,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field."},{"lineNumber":592,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":593,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator."},{"lineNumber":594,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":595,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`"},{"lineNumber":596,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class or the UniqueTaskList class."},{"lineNumber":597,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":598,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for sort commands that trigger sorting in person listings is shown below:"},{"lineNumber":599,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":600,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandPersonDiagram.png[width\u003d\"800\"]"},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command class diagram_"},{"lineNumber":602,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":603,"author":{"gitId":"charlesgoh"},"content":"Likewise, the UML Class diagram for sort commands that trigger sorting in task listings is shown below:"},{"lineNumber":604,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":605,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandTaskDiagram.png[width\u003d\"800\"]"},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort task command class diagram_"},{"lineNumber":607,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":608,"author":{"gitId":"charlesgoh"},"content":"We can deduce from the UML diagrams diagrams above that the only difference between the implementation"},{"lineNumber":609,"author":{"gitId":"charlesgoh"},"content":"of the sorting for persons and tasks lies in the location where the sorting is actually executed."},{"lineNumber":610,"author":{"gitId":"charlesgoh"},"content":"The sorting of persons happens in `UniquePersonList` class while the sorting of tasks happens in `UniqueTaskList`."},{"lineNumber":611,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":612,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort person name desc`. The following sequence diagram"},{"lineNumber":613,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works."},{"lineNumber":614,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":615,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]"},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command sequence diagram_"},{"lineNumber":617,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":618,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods results in the actual person or task list being sorted. This list will be"},{"lineNumber":619,"author":{"gitId":"charlesgoh"},"content":"reflected in both the application\u0027s storage as well as the graphical user interface."},{"lineNumber":620,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":621,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":622,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":623,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +"},{"lineNumber":624,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":625,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` and `UniqueTaskList` class. +"},{"lineNumber":626,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the lists."},{"lineNumber":627,"author":{"gitId":"charlesgoh"},"content":"Future changes to the implementation will be easier as a consequence. +"},{"lineNumber":628,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +"},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +"},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +"},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList`"},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":"and `UniqueTaskList` will have to rely on the `SortCommand` class."},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +"},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +"},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive and reduces complexity in implementation. +"},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +"},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +"},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +"},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system."},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":"// end::sort[]"},{"lineNumber":647,"author":{"gitId":"-"},"content":""},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":"// tag::backup[]"},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":"The `backup` command uses the event handler `BackupRequestEvent`. When raised, this"},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":"event notifies the subscriber `backupAddressBook` method in Storage class."},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":"The outlining sequence diagram for this process (excluding the interaction with the"},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":"`BackupRequestEvent`) is shown below:"},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDiagram.png[width\u003d\"800]"},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"_Figure 3.7.1 : Backup command sequence diagram_"},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +"},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":664,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Use an event handler to initialize the backup process +"},{"lineNumber":665,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Avoids coupling the logic to the storage unnecessarily. +"},{"lineNumber":666,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May not be as intuitive for some developers in the beginning +"},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":668,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Access storage component directly instead of using event handlers +"},{"lineNumber":669,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive as it is a direct approach +"},{"lineNumber":670,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates the Law of Demeter."},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":"// end::backup[]"},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":"// tag::password[]"},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock and Unlock Command"},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":"The `lock` and `unlock` commands utilise the Model to access the user preferences of"},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"the application."},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"Arguments are processed in the `UnlockCommandParser` or `LockCommandParser`,"},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":"which passes control over to the `UnlockCommand` and `LockCommand` class respectively."},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":"These `Command` classes will then call the Model to toggle the lock\u0027s state."},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":"The activity diagram below outlines the basic logic of the lock states concept.:"},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":"image::LockStatesActivityDiagram.png[width\u003d\"800]"},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"_Figure 3.8.1 : Lock/Unlock command activity diagram_"},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":"From the activity diagram we can see that lock states are preserved in the `preferences.json`"},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":"file after the application closes by passing the lock state into the `UserPrefs` class to be"},{"lineNumber":690,"author":{"gitId":"-"},"content":"saved by the Storage component."},{"lineNumber":691,"author":{"gitId":"-"},"content":""},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":"The default state of the lock is set to False (i.e. locked) when the user first opens the"},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":"application. Subsequent changes to the lock will persist in the user preferences."},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `lock` and `unlock` Commands"},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Call methods in the Model directly to change UserPrefs +"},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive. Highest returns for minimal amount of code +"},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May be confusing to some developers in the beginning, since another"},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"intuitive approach is to use event handlers +"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Use Event Handlers +"},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for some developers +"},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will still have to access Model, which makes its advantage over direct calls next to none"},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d ChangePassword Command"},{"lineNumber":710,"author":{"gitId":"charlesgoh"},"content":"The default password when users first open Address++ is `password`. The ChangePassword command"},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":"sets a new password in the temporary User Preferences. When the application is closed, this"},{"lineNumber":712,"author":{"gitId":"charlesgoh"},"content":"information is passed to the Storage Component to be saved into the file `preferences.json`"},{"lineNumber":713,"author":{"gitId":"-"},"content":""},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":"To illustrate this concept better, let us have a look at the `preferences.json` file:"},{"lineNumber":715,"author":{"gitId":"jeffreygohkw"},"content":"[source, json]"},{"lineNumber":716,"author":{"gitId":"-"},"content":"{"},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":" \"guiSettings\" : {"},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" \"windowWidth\" : 1309.0,"},{"lineNumber":719,"author":{"gitId":"-"},"content":" \"windowHeight\" : 720.0,"},{"lineNumber":720,"author":{"gitId":"-"},"content":" \"windowCoordinates\" : {"},{"lineNumber":721,"author":{"gitId":"-"},"content":" \"x\" : 0,"},{"lineNumber":722,"author":{"gitId":"-"},"content":" \"y\" : 22"},{"lineNumber":723,"author":{"gitId":"-"},"content":" }"},{"lineNumber":724,"author":{"gitId":"-"},"content":" },"},{"lineNumber":725,"author":{"gitId":"-"},"content":" \"addressBookFilePath\" : \"data/addressbook.xml\","},{"lineNumber":726,"author":{"gitId":"-"},"content":" \"addressBookName\" : \"My Address++\","},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":" \"addressBookLockState\" : false,"},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":" \"addressBookEncryptedPassword\" : \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\","},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" \"theme\" : \"/view/DarkTheme.css\""},{"lineNumber":730,"author":{"gitId":"-"},"content":"}"},{"lineNumber":731,"author":{"gitId":"-"},"content":""},{"lineNumber":732,"author":{"gitId":"charlesgoh"},"content":"As shown in the cope snippet above, the password is stored as one of the entries in the JSON"},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":"file."},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":735,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":"SHA256 encryption was used to calculate a hash for the password. This is to delay anyone snooping around the"},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"user\u0027s file directories from seeing the real password immediately."},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":739,"author":{"gitId":"charlesgoh"},"content":"**Validation Checks**"},{"lineNumber":740,"author":{"gitId":"-"},"content":"****"},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":"1. **Password Validation** -\u003e Is the password correct?"},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"2. **Password Confirmation** -\u003e Does the new password and confirmation password match?"},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"3. **Password Uniqueness** -\u003e Is the new password different from the old password?"},{"lineNumber":744,"author":{"gitId":"-"},"content":"****"},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":746,"author":{"gitId":"charlesgoh"},"content":"The activity diagram below outlines the process flow for the `ChangePasswordCommand`:"},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":748,"author":{"gitId":"charlesgoh"},"content":"image::ChangePasswordActivityDiagram.png[width\u003d\"800]"},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"_Figure 3.9.1 : ChangePassword command activity diagram_"},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** On Demand Saving vs. Save On Exit +"},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Save On Exit +"},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Simplifies process flow as the command class no longer has to access both Model and Storage components +"},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Any system/application crash may cause change password data to be lost +"},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** On Demand Saving +"},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Changes may persist even through system and application crashes +"},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May slow down application, although not significantly. Complicates process flow."},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"// end::password[]"},{"lineNumber":763,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":764,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacy[]"},{"lineNumber":765,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields"},{"lineNumber":766,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":767,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email`, `Address` and `Remark` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not."},{"lineNumber":768,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":769,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacy.png[width\u003d\"800\"]"},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.1 : Class diagram for a Person, only Name, Phone, Email, Address and Remark contain an isPrivate boolean to indicate if it is private or not_"},{"lineNumber":771,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +"},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +"},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +"},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":776,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes."},{"lineNumber":777,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field."},{"lineNumber":778,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor."},{"lineNumber":779,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`."},{"lineNumber":780,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":781,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":782,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.2 : Sequence Diagram for adding a Person with private fields_"},{"lineNumber":783,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":784,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +"},{"lineNumber":785,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:"},{"lineNumber":786,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":787,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":788,"author":{"gitId":"jeffreygohkw"},"content":"@Override"},{"lineNumber":789,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {"},{"lineNumber":790,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":791,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":792,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":793,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;"},{"lineNumber":794,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":795,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":796,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":797,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI."},{"lineNumber":798,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":799,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name."},{"lineNumber":800,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":801,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`."},{"lineNumber":802,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":803,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`."},{"lineNumber":804,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following"},{"lineNumber":805,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":806,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":807,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":808,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":809,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":810,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":811,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":812,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":813,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":814,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":815,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":816,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":817,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":818,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":819,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format"},{"lineNumber":820,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":821,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]"},{"lineNumber":822,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":823,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e"},{"lineNumber":824,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e"},{"lineNumber":825,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e"},{"lineNumber":826,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e"},{"lineNumber":827,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e"},{"lineNumber":828,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e"},{"lineNumber":829,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e"},{"lineNumber":830,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e"},{"lineNumber":831,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e"},{"lineNumber":832,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremark\u003echeerful lad\u003c/remark\u003e"},{"lineNumber":833,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremarkIsPrivate\u003efalse\u003c/remarkIsPrivate\u003e"},{"lineNumber":834,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e"},{"lineNumber":835,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e"},{"lineNumber":836,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":837,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same."},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +"},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was."},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":844,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`."},{"lineNumber":845,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true."},{"lineNumber":846,"author":{"gitId":"-"},"content":""},{"lineNumber":847,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false."},{"lineNumber":848,"author":{"gitId":"-"},"content":""},{"lineNumber":849,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object."},{"lineNumber":850,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":851,"author":{"gitId":"-"},"content":"----"},{"lineNumber":852,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":853,"author":{"gitId":"-"},"content":" Name updatedName;"},{"lineNumber":854,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {"},{"lineNumber":855,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":856,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":857,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":858,"author":{"gitId":"-"},"content":" }"},{"lineNumber":859,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":860,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":861,"author":{"gitId":"-"},"content":" }"},{"lineNumber":862,"author":{"gitId":"-"},"content":" return updatedName;"},{"lineNumber":863,"author":{"gitId":"-"},"content":"}"},{"lineNumber":864,"author":{"gitId":"-"},"content":"----"},{"lineNumber":865,"author":{"gitId":"-"},"content":""},{"lineNumber":866,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing."},{"lineNumber":867,"author":{"gitId":"-"},"content":""},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":869,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +"},{"lineNumber":871,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":872,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +"},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +"},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +"},{"lineNumber":875,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +"},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +"},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to."},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +"},{"lineNumber":882,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +"},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +"},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +"},{"lineNumber":886,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +"},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +"},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users."},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy"},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`."},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below."},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.11.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_"},{"lineNumber":899,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object."},{"lineNumber":901,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`."},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":"This is illustrated in the code below, which shows how the privacy of `Name` is set in `PersonPrivacySettings`:"},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {"},{"lineNumber":908,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {"},{"lineNumber":909,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {"},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`"},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`."},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`. For example, the new `Name` is created in the code snippet below:"},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {"},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);"},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);"},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":936,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":937,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":938,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");"},{"lineNumber":939,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":940,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {"},{"lineNumber":941,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());"},{"lineNumber":942,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":943,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());"},{"lineNumber":944,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":945,"author":{"gitId":"jeffreygohkw"},"content":" return name;"},{"lineNumber":946,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":947,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":948,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`."},{"lineNumber":949,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":950,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":951,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`."},{"lineNumber":952,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all."},{"lineNumber":953,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":954,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":955,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":956,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +"},{"lineNumber":957,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":958,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +"},{"lineNumber":959,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +"},{"lineNumber":960,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +"},{"lineNumber":961,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":962,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Enhance the functionality of EditCommand. +"},{"lineNumber":963,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +"},{"lineNumber":964,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data."},{"lineNumber":965,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":966,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the address book\u0027s privacy level"},{"lineNumber":967,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":968,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommand` allows the user to change the privacy level of Address++, letting users easily reveal data hidden by private fields, or hide persons containing private fields entirely."},{"lineNumber":969,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":970,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `PrivacyLevelCommand` is illustrated below."},{"lineNumber":971,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":972,"author":{"gitId":"jeffreygohkw"},"content":"image::PrivacyLevelSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":973,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.1 : Sequence Diagram for changing the privacy level of the address book_"},{"lineNumber":974,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":975,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommandParser` will accept any integer that is input in the command line, and create a `PrivacyLevelCommand` that stores the integer, which represents the privacy level to switch to."},{"lineNumber":976,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":977,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution,`PrivacyLevelCommand` will first check if the integer falls within the range of the minimum and maximum privacy level. If it does not, a new `CommandException` is thrown, reminding the user of the valid input levels."},{"lineNumber":978,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":979,"author":{"gitId":"jeffreygohkw"},"content":"If the integer is within the valid range, `PrivacyLevelCommand` will update the privacy level of `Model`. Following that, it will proceed to update the privacy level of each person."},{"lineNumber":980,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":981,"author":{"gitId":"jeffreygohkw"},"content":"`Model`, each `Person` and each field that can be set as private all contain a `privacyLevel` variable to indicate the current privacy level. This value should remain the same between all of these objects throughout the operation of Address++."},{"lineNumber":982,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":983,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacyLevel.png[width\u003d\"800\"]"},{"lineNumber":984,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.2 : Class Diagram of Person, which shows which classes contain an integer to indicate the privacy level_"},{"lineNumber":985,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":986,"author":{"gitId":"jeffreygohkw"},"content":"Finally, depending on the privacy level, `PrivacyLevelCommand` will update the call `model.updateFilteredPersonList()` with the appropriate predicate."},{"lineNumber":987,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":988,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated in the code snippet below."},{"lineNumber":989,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":990,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":991,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":992,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {"},{"lineNumber":993,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":994,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {"},{"lineNumber":995,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":996,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":997,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);"},{"lineNumber":998,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {"},{"lineNumber":999,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);"},{"lineNumber":1000,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);"},{"lineNumber":1001,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);"},{"lineNumber":1002,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":1003,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);"},{"lineNumber":1004,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":1005,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":1006,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {"},{"lineNumber":1007,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":1008,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1009,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1010,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {"},{"lineNumber":1011,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());"},{"lineNumber":1012,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1013,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":1014,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1015,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));"},{"lineNumber":1016,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1017,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1018,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1019,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1020,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1021,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Storing of the privacy level +"},{"lineNumber":1022,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1023,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have each relevant class store a privacy level integer. +"},{"lineNumber":1024,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Less coupling, less modification of existing code required. +"},{"lineNumber":1025,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify every relevant object every time `PrivacyLevelCommand` is called. Runs the risk that an object may accidentally not have its privacy level modified to match the other objects if privacy levels are not properly updated. +"},{"lineNumber":1026,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1027,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store the privacy level in the model and have any object that needs to check it query from model. +"},{"lineNumber":1028,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only one integer needs to be modified for the privacy level of the entire address book to change, which also eliminates any possibility that privacy level may be different when used by different objects. +"},{"lineNumber":1029,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases coupling, classes such as Name will need to have a Model object as one of its variables to access Model. Large scale modification of existing code and tests are necessary."},{"lineNumber":1030,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacy[]"},{"lineNumber":1031,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1032,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]"},{"lineNumber":1033,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps"},{"lineNumber":1034,"author":{"gitId":"-"},"content":""},{"lineNumber":1035,"author":{"gitId":"jeffreygohkw"},"content":"Locating a person\u0027s address allows users to take the address that is stored by a person and search it on Google Maps in the browser."},{"lineNumber":1036,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +"},{"lineNumber":1038,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:"},{"lineNumber":1039,"author":{"gitId":"-"},"content":""},{"lineNumber":1040,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1041,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1042,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":1043,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":1044,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":1045,"author":{"gitId":"-"},"content":" return new LocateCommand(index);"},{"lineNumber":1046,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":1047,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":1048,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":1049,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1050,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1051,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1052,"author":{"gitId":"-"},"content":""},{"lineNumber":1053,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of persons, a `CommandException` will be thrown."},{"lineNumber":1054,"author":{"gitId":"-"},"content":""},{"lineNumber":1055,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution."},{"lineNumber":1056,"author":{"gitId":"-"},"content":""},{"lineNumber":1057,"author":{"gitId":"-"},"content":"This code for this can be found below:"},{"lineNumber":1058,"author":{"gitId":"-"},"content":""},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1060,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1061,"author":{"gitId":"-"},"content":"public CommandResult execute() throws CommandException {"},{"lineNumber":1062,"author":{"gitId":"-"},"content":""},{"lineNumber":1063,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":1064,"author":{"gitId":"-"},"content":""},{"lineNumber":1065,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":1066,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":1067,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1068,"author":{"gitId":"-"},"content":""},{"lineNumber":1069,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":1070,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":1071,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":1072,"author":{"gitId":"-"},"content":""},{"lineNumber":1073,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1074,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:"},{"lineNumber":1077,"author":{"gitId":"-"},"content":""},{"lineNumber":1078,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1079,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1080,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":1081,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":1082,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":1083,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1084,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":1085,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":1086,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1087,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1088,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1089,"author":{"gitId":"-"},"content":""},{"lineNumber":1090,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:"},{"lineNumber":1091,"author":{"gitId":"-"},"content":""},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1093,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.13.1 : Sequence Diagram for Locating a Person\u0027s Address_"},{"lineNumber":1094,"author":{"gitId":"-"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1096,"author":{"gitId":"-"},"content":""},{"lineNumber":1097,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +"},{"lineNumber":1098,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1099,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command `locate`. +"},{"lineNumber":1100,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +"},{"lineNumber":1101,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +"},{"lineNumber":1102,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1103,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +"},{"lineNumber":1105,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users."},{"lineNumber":1106,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]"},{"lineNumber":1107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1108,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]"},{"lineNumber":1109,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another using Google Maps"},{"lineNumber":1110,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1111,"author":{"gitId":"jeffreygohkw"},"content":"When the `navigate` command is entered into the command line, `NavigateCommandParse` will first reset its internal `from`, `to`, `fromIndex`, `toIndex` to null. It will then check for the input prefixes and ensure that only one of the prefixes from the group `fp/`, `ft/`, and `fa/`, which we will subsequently call the `from` prefixes are present. It then does the same with the prefixes from the group `tp/`, `tt/` and `ta/`, which we will call the `to` prefixes. +"},{"lineNumber":1112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1113,"author":{"gitId":"jeffreygohkw"},"content":"This is done by invoking the `checkFrom` and `checkTo` methods as can be seen from the code snippet below. For the example `checkFrom`, it takes in 3 booleans on whether or not each prefix is present and checks whether or not there is exactly one kind of `from` prefix. It throws an error if there are no `from` prefixes or more than one type of `from` prefixes."},{"lineNumber":1114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1115,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1116,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1117,"author":{"gitId":"jeffreygohkw"},"content":"private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)"},{"lineNumber":1118,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {"},{"lineNumber":1119,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {"},{"lineNumber":1120,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":1121,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {"},{"lineNumber":1122,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present"},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);"},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1132,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"`checkFrom` calls `setArgsForNavigateCommand`, which sets the variables in the `NavigateCommandParser` to the appropriate values depending on whether the address originates from a person, a task or is a manual input by the user."},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":"private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person, boolean forFrom) throws IllegalValueException {"},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {"},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());"},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());"},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {"},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());"},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1153,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());"},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":1157,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());"},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1160,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());"},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1164,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1167,"author":{"gitId":"jeffreygohkw"},"content":"Finally, `NavigateCommandParser` will create a new `NavigateCommand` based on the inputs as set by `setArgsForNavigateCommand`."},{"lineNumber":1168,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1169,"author":{"gitId":"jeffreygohkw"},"content":"When `NavigateCommand` is created, it first checks if there are duplicate `from` or `to` addresses that are passed into it and throws an error if that is the case."},{"lineNumber":1170,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1173,"author":{"gitId":"jeffreygohkw"},"content":"private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex) throws IllegalArgumentException {"},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {"},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":1176,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1177,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {"},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1180,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1183,"author":{"gitId":"jeffreygohkw"},"content":"If it passes this check, `NavigateCommand` stores `fromLocation` and `toLocation`, which are the Locations of any manually added address by the user to navigate from and to respectively. It also stores `toIndex` and `fromIndex`, which are the Indexes of the `Person` or `Task` to extract the address from as well as `toIsTask` and `fromIsTask`, which are booleans that indicate whether `toIndex` and `fromIndex` are indexes of Persons or Tasks."},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `NavigateCommmand`, it will first check if it has a non-null `fromIndex`, if it does, it will create a new Location based on its `fromIndex` and `fromIsTask` values using the `setLocationByIndex` method. Otherwise, it will set the Location to be the Location in `locationfrom`. This can be seen below:"},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1187,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"if (fromIndex !\u003d null) {"},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":1190,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);"},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);"},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1194,"author":{"gitId":"jeffreygohkw"},"content":"} else {"},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;"},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1197,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"setLocationByIndex throws CommandException if the target Person or Task does not have a valid Address to extract due to the Address being blank, or it being private."},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1201,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {"},{"lineNumber":1204,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {"},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {"},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1208,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());"},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1211,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {"},{"lineNumber":1212,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":1213,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {"},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":1215,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())"},{"lineNumber":1217,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":1218,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1220,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1221,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1222,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1223,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` does the same for the Address to navigate `To` and posts a new `BrowserPanelNavigateEvent`, passing in the `Location` to navigate `From` and the `Location` to navigate `To`. +"},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` will then create a new `CommandResult` to indicate a successful `Command`."},{"lineNumber":1225,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":"`BrowserPanel` will then get the information from this `BrowserPanelNavigateEvent`, and load the appropriate Google Maps URL after replacing information such as the Unit Number and extra whitespaces. This has to be done as Google Maps does not function properly with Unit Numbers or spaces in its URL."},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1229,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"private void loadDirectionsPage(String fromLocation, String toLocation) {"},{"lineNumber":1231,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\""},{"lineNumber":1232,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\""},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":1236,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);"},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1239,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":"The overall sequence of events is illustrated by the following sequence diagram:"},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"image::NavigateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1243,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.14.1 : Sequence Diagram for Navigating from one Address to another_"},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1246,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1247,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1248,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to pass the appropriate information to NavigateCommand +"},{"lineNumber":1249,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1250,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have a constructor that takes in a large number of arguments so that NavigateCommand can correctly identify what kind of Location to post in BrowserPanelNavigateEvent. +"},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only 1 constructor needed. +"},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional methods will be needed to properly identify which Location to use for navigation. +"},{"lineNumber":1253,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1254,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Create many constructors to segregate the different possible scenarios that might happen. +"},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear what information to use to generate the Locations +"},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires large numbers of constructors to be created, easy for mistakes to occur as Constructors all share the same name but different argument types."},{"lineNumber":1257,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to transfer information of the address from one class to another +"},{"lineNumber":1259,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1260,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Wrap the address in a `Location` class before posting the BrowserPanelNavigateEvent. +"},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only Locations, which indicates that the address is properly parsed, will be passed for the BrowserPanel to read, reducing the possibility of BrowserPanel reading stray unwanted strings as addresses to navigate to and from. The value stored inside each Location cannot be altered once that Location object has been created. +"},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** A new class has to be created and Strings, Addresses and TaskAddresses will need to be converted to Locations first. +"},{"lineNumber":1263,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1264,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Simply pass on a String containing the address from class to class +"},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easy to read and transfer information, lower overhead +"},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** It is easier for stray Strings to pollute the information, and the Strings can be unintentionally modified."},{"lineNumber":1267,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]"},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1269,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]"},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening and Saving of the .xml save file"},{"lineNumber":1271,"author":{"gitId":"jeffreygohkw"},"content":"Both `OpenCommand` and `SaveAsCommand` function in a very similar way."},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"When `open` or `save` is input by the user, `AddressBookParser` will create a new `OpenCommand` or `SaveAsCommand`."},{"lineNumber":1273,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1274,"author":{"gitId":"jeffreygohkw"},"content":"These two commands will then post a new `OpenRequestEvent` or a new `SaveAsRequestEvent` and return a successful `CommandResult`."},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` will have two methods, `HandleOpenRequestEvent` and `HandleSaveAsRequestEvent` that subscribe to the above two events and will call `handleOpen` and `handleSaveAs`."},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1280,"author":{"gitId":"jeffreygohkw"},"content":"private void handleOpen() throws IOException, DataConversionException {"},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":1282,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog"},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);"},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file"},{"lineNumber":1290,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file"},{"lineNumber":1292,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));"},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1296,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1297,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1299,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1300,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"private void handleSaveAs() throws IOException {"},{"lineNumber":1302,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":1304,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":1305,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog"},{"lineNumber":1308,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);"},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension"},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {"},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");"},{"lineNumber":1314,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1315,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file"},{"lineNumber":1316,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":1317,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences"},{"lineNumber":1318,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());"},{"lineNumber":1319,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);"},{"lineNumber":1320,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":1321,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":1322,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1324,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1326,"author":{"gitId":"jeffreygohkw"},"content":"Both `handleOpen` and `handleSaveAs` will create a new `FileChooser` extension filter that only allows the pop-up window to save files and load files in the .xml format."},{"lineNumber":1327,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1328,"author":{"gitId":"jeffreygohkw"},"content":"Upon successfully selecting a file to load or a location to save as in the pop-up window, both methods will call `changefilepath` in `Storage` to the selected file path."},{"lineNumber":1329,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"Finally, both commands diverge as `handleOpen` will call `resetData` to reset the data using the new save file, while `handleSaveAs` will call `saveAddressBook` and `saveUserPrefs` to save the data. Both methods will finally call `fillInnerParts()` to refresh the data displayed on the UI."},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated using the sequence diagram below:"},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1334,"author":{"gitId":"jeffreygohkw"},"content":"image::OpenSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1335,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.15.1 : Sequence Diagram for Opening a save file_"},{"lineNumber":1336,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1337,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1338,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How does `OpenCommand` and `SaveAsCommand` determine the file location to save or load the save file from +"},{"lineNumber":1339,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1340,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Open a `FileChooser` window, allowing the user to move through their file directory to acquire their save location and to select the name of the save file. +"},{"lineNumber":1341,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** User friendly, many other applications function similarly when saving and loading. Easier to implement and use as part of the dropdown menu in the User Interface. +"},{"lineNumber":1342,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Not entirely command line based. +"},{"lineNumber":1343,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1344,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Input the file directory and file name to save or load from as part of the command. +"},{"lineNumber":1345,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Entirely command line based, may be more preferable for users who prefer using the command line. +"},{"lineNumber":1346,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires more complex code. Command must check if the file location to save or load from is valid, and that there is a valid file of that name."},{"lineNumber":1347,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]"},{"lineNumber":1348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1349,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]"},{"lineNumber":1350,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the theme of the address book"},{"lineNumber":1351,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1352,"author":{"gitId":"jeffreygohkw"},"content":"The original style of the address book may not be for everyone. `ThemeCommand` allows users to switch between multiple preset themes."},{"lineNumber":1353,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1354,"author":{"gitId":"jeffreygohkw"},"content":"`ThemeCommandParser` trims the arguments after the word `theme` in the command line, removing any whitespaces leading up to and following that word. If the entire String ended up trimmed, then `ThemeCommandParser` will throw a `ParseException`. Otherwise, it creates a new `ThemeCommand`, passing in the trimmed word as seen below:"},{"lineNumber":1355,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1356,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1357,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1358,"author":{"gitId":"jeffreygohkw"},"content":"public ThemeCommand parse(String args) throws ParseException {"},{"lineNumber":1359,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {"},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));"},{"lineNumber":1362,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);"},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1366,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1367,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1368,"author":{"gitId":"jeffreygohkw"},"content":"When initialising the Address Book, the `AddressBook` class will create a `HashMap\u003cString, String\u003e` to store the keys and values of the themes."},{"lineNumber":1369,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1370,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1371,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1372,"author":{"gitId":"jeffreygohkw"},"content":"private void initialiseStyleMap() {"},{"lineNumber":1373,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"DarkTheme.css\");"},{"lineNumber":1374,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"DarkTheme.css\");"},{"lineNumber":1375,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"LightTheme.css\");"},{"lineNumber":1376,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"LightTheme.css\");"},{"lineNumber":1377,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1378,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1379,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"The keys correspond to the possible user inputs, such as `light` or `dark`, while the values contain the filepath of the .css files, such as `DarkTheme.css`. This way, users do not need to remember and will not have to know what the .css files are like to use the theme command."},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1382,"author":{"gitId":"jeffreygohkw"},"content":"On executing `ThemeCommand`, it first checks if the input string can be found in the set of keys in the HashMap contained by the `AddressBook` class. If it cannot be found, or if the value corresponding to the input string is identical to that of the value of the file path of the .css file stored in Model, then a `CommandException` is thrown, as users cannot change to a non-existent theme, or a theme that is already in use."},{"lineNumber":1383,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1384,"author":{"gitId":"jeffreygohkw"},"content":"If the string is valid, `ThemeCommand` will post a `ChangeThemeRequestEvent` and set the theme to the new file path corresponding to the input String in `Model`. `Model` will then continue on to set the theme in `UserPrefs` as well, so that it can be loaded on starting the application."},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` contains a method `handleChangeThemeEvent` that subscribes to the `ChangeThemeRequestEvent`. `handleChangeThemeEvent` calls `handlChangeTheme`, which first checks if there is an existing theme, if there is, it removes it, then sets adds the new theme through the file path that was passed to it."},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1388,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1390,"author":{"gitId":"jeffreygohkw"},"content":"public void handleChangeTheme(String theme) {"},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {"},{"lineNumber":1392,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);"},{"lineNumber":1393,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1394,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(VIEW_PATH + theme);"},{"lineNumber":1395,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1396,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1397,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"After all is done, `ThemeCommand` returns a `CommandResult`, indicating the success of the command."},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"The overall execution of `ThemeCommand` is seen in the following code snippet."},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {"},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;"},{"lineNumber":1406,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1407,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {"},{"lineNumber":1408,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);"},{"lineNumber":1409,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));"},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1412,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1413,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {"},{"lineNumber":1414,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));"},{"lineNumber":1415,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));"},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);"},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));"},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for the whole process is show below:"},{"lineNumber":1424,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1425,"author":{"gitId":"jeffreygohkw"},"content":"image::ThemeSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1426,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.16.1 : Sequence Diagram for Changing Themes_"},{"lineNumber":1427,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Getting the correct file path to the .css file +"},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Store the file path in a HashMap, where the keys are the possible inputs that the user may type and the values are the actual filepaths +"},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier on the user. They do not need to remember any complicated .css names or file paths, and the input string can be customisable by changing the names of the keys added to the HashMap. +"},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Slightly more work needed to initialise the HashMap and check if the file paths are valid. +"},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Change the name of the .css file and file paths such that what the user directly inputs can correspond to the actual .css file. +"},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** A HashMap is no longer needed, instead, the input string just needs to be parsed to be turned into a file path. This makes it easier to add additional .css files, as developers do not have to keep modifying the initialisation of the HashMap +"},{"lineNumber":1435,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Less flexibility in naming the file, user may break the code if they realise the input string directly used as part of the file path."},{"lineNumber":1436,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]"},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"// tag::adddeletetag[]"},{"lineNumber":1439,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism"},{"lineNumber":1440,"author":{"gitId":"-"},"content":""},{"lineNumber":1441,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete"},{"lineNumber":1442,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`."},{"lineNumber":1443,"author":{"gitId":"-"},"content":""},{"lineNumber":1444,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`."},{"lineNumber":1445,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once."},{"lineNumber":1446,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`add tag/ 1 2 3 t/friends`) will be executed."},{"lineNumber":1447,"author":{"gitId":"-"},"content":"The same operation will happen for `delete tag/` command."},{"lineNumber":1448,"author":{"gitId":"-"},"content":""},{"lineNumber":1449,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works"},{"lineNumber":1450,"author":{"gitId":"-"},"content":"in a similar way."},{"lineNumber":1451,"author":{"gitId":"-"},"content":""},{"lineNumber":1452,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:"},{"lineNumber":1453,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1454,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1455,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":1456,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book."},{"lineNumber":1457,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1458,"author":{"gitId":"-"},"content":"public class AddTagCommand extends AddCommand {"},{"lineNumber":1459,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":1460,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":1461,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":1462,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1463,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":1464,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":1465,"author":{"gitId":"-"},"content":""},{"lineNumber":1466,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":1467,"author":{"gitId":"-"},"content":" // check whether the index within the range"},{"lineNumber":1468,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1469,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":1470,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag"},{"lineNumber":1471,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1472,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag"},{"lineNumber":1473,"author":{"gitId":"-"},"content":" return new CommandResult();"},{"lineNumber":1474,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1475,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1476,"author":{"gitId":"-"},"content":""},{"lineNumber":1477,"author":{"gitId":"-"},"content":"Suppose the user enter the `add tag/ 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:"},{"lineNumber":1478,"author":{"gitId":"-"},"content":""},{"lineNumber":1479,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":1480,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : Add Tag Sequence Diagram for Logic_ +"},{"lineNumber":1481,"author":{"gitId":"-"},"content":"The `delete tag/` command works the same as `add tag/` command with different name only."},{"lineNumber":1482,"author":{"gitId":"-"},"content":""},{"lineNumber":1483,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1484,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +"},{"lineNumber":1485,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +"},{"lineNumber":1486,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception."},{"lineNumber":1487,"author":{"gitId":"-"},"content":""},{"lineNumber":1488,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1489,"author":{"gitId":"-"},"content":""},{"lineNumber":1490,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1491,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `add tag/` and `delete tag/` +"},{"lineNumber":1492,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +"},{"lineNumber":1493,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +"},{"lineNumber":1494,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+"},{"lineNumber":1495,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1496,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +"},{"lineNumber":1497,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +"},{"lineNumber":1498,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list."},{"lineNumber":1499,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle."},{"lineNumber":1500,"author":{"gitId":"-"},"content":""},{"lineNumber":1501,"author":{"gitId":"-"},"content":"---"},{"lineNumber":1502,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +"},{"lineNumber":1503,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `add tag/` and `delete tag/` +"},{"lineNumber":1504,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +"},{"lineNumber":1505,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +"},{"lineNumber":1506,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1507,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +"},{"lineNumber":1508,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +"},{"lineNumber":1509,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner."},{"lineNumber":1510,"author":{"gitId":"-"},"content":"// end::adddeletetag[]"},{"lineNumber":1511,"author":{"gitId":"-"},"content":""},{"lineNumber":1512,"author":{"gitId":"-"},"content":"// tag::findtag[]"},{"lineNumber":1513,"author":{"gitId":"-"},"content":""},{"lineNumber":1514,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism"},{"lineNumber":1515,"author":{"gitId":"-"},"content":""},{"lineNumber":1516,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book."},{"lineNumber":1517,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`."},{"lineNumber":1518,"author":{"gitId":"-"},"content":""},{"lineNumber":1519,"author":{"gitId":"-"},"content":"The `find tag/` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`."},{"lineNumber":1520,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first."},{"lineNumber":1521,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar."},{"lineNumber":1522,"author":{"gitId":"-"},"content":""},{"lineNumber":1523,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences."},{"lineNumber":1524,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`."},{"lineNumber":1525,"author":{"gitId":"-"},"content":""},{"lineNumber":1526,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:"},{"lineNumber":1527,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String."},{"lineNumber":1528,"author":{"gitId":"-"},"content":""},{"lineNumber":1529,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1530,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1531,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":1532,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":1533,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":1534,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {"},{"lineNumber":1535,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":1536,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");"},{"lineNumber":1537,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1538,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();"},{"lineNumber":1539,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1540,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1541,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one"},{"lineNumber":1542,"author":{"gitId":"-"},"content":"is for the tags to be excluded."},{"lineNumber":1543,"author":{"gitId":"-"},"content":""},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":1545,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1546,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":1547,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":1548,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":1549,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":1550,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1551,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":1552,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {"},{"lineNumber":1553,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {"},{"lineNumber":1554,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);"},{"lineNumber":1555,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1556,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));"},{"lineNumber":1557,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1558,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1559,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1560,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1561,"author":{"gitId":"-"},"content":""},{"lineNumber":1562,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +"},{"lineNumber":1563,"author":{"gitId":"-"},"content":"Suppose the user enter `find tag/ friends` command. The following sequence diagram shows how the find tag command works:"},{"lineNumber":1564,"author":{"gitId":"-"},"content":""},{"lineNumber":1565,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1566,"author":{"gitId":"-"},"content":"_Figure 3.18.1 : Find Tag Sequence Diagram for Logic_ +"},{"lineNumber":1567,"author":{"gitId":"-"},"content":""},{"lineNumber":1568,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1569,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list."},{"lineNumber":1570,"author":{"gitId":"-"},"content":""},{"lineNumber":1571,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1572,"author":{"gitId":"-"},"content":""},{"lineNumber":1573,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1574,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `find tag/` +"},{"lineNumber":1575,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `find tag/` +"},{"lineNumber":1576,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `find tag/` command will be similar to the `find` command. +"},{"lineNumber":1577,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +"},{"lineNumber":1578,"author":{"gitId":"-"},"content":""},{"lineNumber":1579,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `find tag/` in `FindCommand`. +"},{"lineNumber":1580,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +"},{"lineNumber":1581,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle"},{"lineNumber":1582,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things."},{"lineNumber":1583,"author":{"gitId":"-"},"content":"// end::findtag[]"},{"lineNumber":1584,"author":{"gitId":"-"},"content":""},{"lineNumber":1585,"author":{"gitId":"-"},"content":"// tag::favunfav[]"},{"lineNumber":1586,"author":{"gitId":"-"},"content":""},{"lineNumber":1587,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Favourite/Unfavourite Person mechanism"},{"lineNumber":1588,"author":{"gitId":"-"},"content":"To favourite a person is achieved by `FavouriteCommand`. It basically changes the value of the `favourite` status of a `Person` but there is no specific `Favourite` field for person."},{"lineNumber":1589,"author":{"gitId":"-"},"content":""},{"lineNumber":1590,"author":{"gitId":"-"},"content":"In this sense, a boolean value needs to be created to store the favourite status of a contact. As `AddCommand` does not involve `favourite`, the default `favourite` status for every newly added `Person` is false."},{"lineNumber":1591,"author":{"gitId":"-"},"content":""},{"lineNumber":1592,"author":{"gitId":"-"},"content":"The `favourite` status is a boolean value and it will be set as true through `FavouriteCommand`. Then, the target person will be updated."},{"lineNumber":1593,"author":{"gitId":"-"},"content":""},{"lineNumber":1594,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1595,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1596,"author":{"gitId":"-"},"content":"public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":1597,"author":{"gitId":"-"},"content":""},{"lineNumber":1598,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":1599,"author":{"gitId":"-"},"content":""},{"lineNumber":1600,"author":{"gitId":"-"},"content":" // throw invalid person index"},{"lineNumber":1601,"author":{"gitId":"-"},"content":""},{"lineNumber":1602,"author":{"gitId":"-"},"content":" // update favourite status"},{"lineNumber":1603,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":1604,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),"},{"lineNumber":1605,"author":{"gitId":"-"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),"},{"lineNumber":1606,"author":{"gitId":"-"},"content":" personToFavourite.getAddress(), true,"},{"lineNumber":1607,"author":{"gitId":"-"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),"},{"lineNumber":1608,"author":{"gitId":"-"},"content":" personToFavourite.getTags());"},{"lineNumber":1609,"author":{"gitId":"-"},"content":" // update target person"},{"lineNumber":1610,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":1611,"author":{"gitId":"-"},"content":" model.updatePerson(personToFavourite, editedPerson);"},{"lineNumber":1612,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":1613,"author":{"gitId":"-"},"content":" // throw exception"},{"lineNumber":1614,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1615,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":1616,"author":{"gitId":"-"},"content":""},{"lineNumber":1617,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));"},{"lineNumber":1618,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1619,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1620,"author":{"gitId":"-"},"content":"`FavouriteCommand` takes in an integer as its argument. The command is first being parsed in `AddressBookParser` to be identified as an instance of `FavouriteCommand`."},{"lineNumber":1621,"author":{"gitId":"-"},"content":"Then it is parsed by `FavouriteCommandParser` to parse the index. Invalid indexes will be handled by throwing an exception. This is how `FavouriteCommandParser` is implemented:"},{"lineNumber":1622,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1623,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1624,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":1625,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand"},{"lineNumber":1626,"author":{"gitId":"-"},"content":" * and returns an FavouriteCommand object for execution."},{"lineNumber":1627,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":1628,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1629,"author":{"gitId":"-"},"content":" public FavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":1630,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":1631,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":1632,"author":{"gitId":"-"},"content":" return new FavouriteCommand(index);"},{"lineNumber":1633,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":1634,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":1635,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":1636,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1637,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1638,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1639,"author":{"gitId":"-"},"content":""},{"lineNumber":1640,"author":{"gitId":"-"},"content":"The following sequence diagram shows how a `FavouriteCommand` is processed: +"},{"lineNumber":1641,"author":{"gitId":"-"},"content":""},{"lineNumber":1642,"author":{"gitId":"jeffreygohkw"},"content":"image::FavouriteSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1643,"author":{"gitId":"-"},"content":"_Figure 3.19.1 : Favourite Sequence Diagram for Logic_ +"},{"lineNumber":1644,"author":{"gitId":"-"},"content":""},{"lineNumber":1645,"author":{"gitId":"-"},"content":"To indicate that a person has been `favoured`, `PersonCard` is modified to contain a `favouriteLabel` that changes its appearance based on the `favourite` status of the person."},{"lineNumber":1646,"author":{"gitId":"-"},"content":"It will first detect the boolean favourite status of the person. If the person is a favourite contact, a heart will be shown."},{"lineNumber":1647,"author":{"gitId":"-"},"content":"The colours of the border and the background of the label are set to transparent, so that only the background picture, which is a heart, will be shown."},{"lineNumber":1648,"author":{"gitId":"-"},"content":""},{"lineNumber":1649,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":1650,"author":{"gitId":"-"},"content":""},{"lineNumber":1651,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `favourite` +"},{"lineNumber":1652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `favourite`. +"},{"lineNumber":1653,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to modify existing command. +"},{"lineNumber":1654,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Person` class to update the person status. The constructor of `person` has been modified so all the `person` in the address book must change accordingly. +"},{"lineNumber":1655,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `favourite` in `AddCommand` +"},{"lineNumber":1656,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +"},{"lineNumber":1657,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. The `favourite` status will be treated as an optional field when using `AddCommand`. In order to change `favourite` status, `EditCommand` may be modified which is very troublesome. +"},{"lineNumber":1658,"author":{"gitId":"-"},"content":""},{"lineNumber":1659,"author":{"gitId":"-"},"content":"---"},{"lineNumber":1660,"author":{"gitId":"-"},"content":"**Aspect:** Store `Favourite` values +"},{"lineNumber":1661,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Store it as a `Boolean` value +"},{"lineNumber":1662,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to create another class. +"},{"lineNumber":1663,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` and `ModelManager` to update the person status.It is also prone to bugs when developers forget to change the ObjectProperty to `String` in UI classes. +"},{"lineNumber":1664,"author":{"gitId":"-"},"content":""},{"lineNumber":1665,"author":{"gitId":"-"},"content":"**Alternative 2:** Add a new `Favourite` field +"},{"lineNumber":1666,"author":{"gitId":"-"},"content":"**Pros:** Similar way to store other personal information. It also follows the open-close principle and exercises cohesion, where all matters related to `Favourite` field is dealt in its own class. +"},{"lineNumber":1667,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. Adding a new field will cause many changes in UI, Logic, Model and Storage. Some test cases will be rewritten."},{"lineNumber":1668,"author":{"gitId":"-"},"content":"// end::favunfav[]"},{"lineNumber":1669,"author":{"gitId":"-"},"content":""},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging"},{"lineNumber":1671,"author":{"gitId":"-"},"content":""},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations."},{"lineNumber":1673,"author":{"gitId":"-"},"content":""},{"lineNumber":1674,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])"},{"lineNumber":1675,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level"},{"lineNumber":1676,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file."},{"lineNumber":1677,"author":{"gitId":"-"},"content":""},{"lineNumber":1678,"author":{"gitId":"-"},"content":"*Logging Levels*"},{"lineNumber":1679,"author":{"gitId":"-"},"content":""},{"lineNumber":1680,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application"},{"lineNumber":1681,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution"},{"lineNumber":1682,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App"},{"lineNumber":1683,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size"},{"lineNumber":1684,"author":{"gitId":"-"},"content":""},{"lineNumber":1685,"author":{"gitId":"-"},"content":""},{"lineNumber":1686,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration"},{"lineNumber":1687,"author":{"gitId":"-"},"content":""},{"lineNumber":1688,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`)."},{"lineNumber":1689,"author":{"gitId":"-"},"content":""},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation"},{"lineNumber":1691,"author":{"gitId":"-"},"content":""},{"lineNumber":1692,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation."},{"lineNumber":1693,"author":{"gitId":"-"},"content":""},{"lineNumber":1694,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1695,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting."},{"lineNumber":1696,"author":{"gitId":"-"},"content":""},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation"},{"lineNumber":1698,"author":{"gitId":"-"},"content":""},{"lineNumber":1699,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits."},{"lineNumber":1700,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time."},{"lineNumber":1701,"author":{"gitId":"-"},"content":""},{"lineNumber":1702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation"},{"lineNumber":1703,"author":{"gitId":"-"},"content":""},{"lineNumber":1704,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis."},{"lineNumber":1705,"author":{"gitId":"-"},"content":""},{"lineNumber":1706,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format"},{"lineNumber":1707,"author":{"gitId":"-"},"content":""},{"lineNumber":1708,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages."},{"lineNumber":1709,"author":{"gitId":"-"},"content":""},{"lineNumber":1710,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format."},{"lineNumber":1711,"author":{"gitId":"-"},"content":""},{"lineNumber":1712,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format."},{"lineNumber":1713,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`."},{"lineNumber":1714,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu."},{"lineNumber":1715,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below."},{"lineNumber":1716,"author":{"gitId":"-"},"content":""},{"lineNumber":1717,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]"},{"lineNumber":1718,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_"},{"lineNumber":1719,"author":{"gitId":"-"},"content":""},{"lineNumber":1720,"author":{"gitId":"-"},"content":"\u003d\u003d Testing"},{"lineNumber":1721,"author":{"gitId":"-"},"content":""},{"lineNumber":1722,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests"},{"lineNumber":1723,"author":{"gitId":"-"},"content":""},{"lineNumber":1724,"author":{"gitId":"-"},"content":"There are three ways to run tests."},{"lineNumber":1725,"author":{"gitId":"-"},"content":""},{"lineNumber":1726,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":1727,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies."},{"lineNumber":1728,"author":{"gitId":"-"},"content":""},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*"},{"lineNumber":1730,"author":{"gitId":"-"},"content":""},{"lineNumber":1731,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`"},{"lineNumber":1732,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`"},{"lineNumber":1733,"author":{"gitId":"-"},"content":""},{"lineNumber":1734,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*"},{"lineNumber":1735,"author":{"gitId":"-"},"content":""},{"lineNumber":1736,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)"},{"lineNumber":1737,"author":{"gitId":"-"},"content":""},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1739,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle."},{"lineNumber":1740,"author":{"gitId":"-"},"content":""},{"lineNumber":1741,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*"},{"lineNumber":1742,"author":{"gitId":"-"},"content":""},{"lineNumber":1743,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running."},{"lineNumber":1744,"author":{"gitId":"-"},"content":""},{"lineNumber":1745,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)"},{"lineNumber":1746,"author":{"gitId":"-"},"content":""},{"lineNumber":1747,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests"},{"lineNumber":1748,"author":{"gitId":"-"},"content":""},{"lineNumber":1749,"author":{"gitId":"-"},"content":"We have two types of tests:"},{"lineNumber":1750,"author":{"gitId":"-"},"content":""},{"lineNumber":1751,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,"},{"lineNumber":1752,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package."},{"lineNumber":1753,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package."},{"lineNumber":1754,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,"},{"lineNumber":1755,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +"},{"lineNumber":1756,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`"},{"lineNumber":1757,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +"},{"lineNumber":1758,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`"},{"lineNumber":1759,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +"},{"lineNumber":1760,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`"},{"lineNumber":1761,"author":{"gitId":"-"},"content":""},{"lineNumber":1762,"author":{"gitId":"-"},"content":""},{"lineNumber":1763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing"},{"lineNumber":1764,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**"},{"lineNumber":1765,"author":{"gitId":"-"},"content":""},{"lineNumber":1766,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing."},{"lineNumber":1767,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`."},{"lineNumber":1768,"author":{"gitId":"-"},"content":""},{"lineNumber":1769,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops"},{"lineNumber":1770,"author":{"gitId":"-"},"content":""},{"lineNumber":1771,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation"},{"lineNumber":1772,"author":{"gitId":"-"},"content":""},{"lineNumber":1773,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation."},{"lineNumber":1774,"author":{"gitId":"-"},"content":""},{"lineNumber":1775,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration"},{"lineNumber":1776,"author":{"gitId":"-"},"content":""},{"lineNumber":1777,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details."},{"lineNumber":1778,"author":{"gitId":"-"},"content":""},{"lineNumber":1779,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release"},{"lineNumber":1780,"author":{"gitId":"-"},"content":""},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Here are the steps to create a new release."},{"lineNumber":1782,"author":{"gitId":"-"},"content":""},{"lineNumber":1783,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]."},{"lineNumber":1784,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e."},{"lineNumber":1785,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`"},{"lineNumber":1786,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created."},{"lineNumber":1787,"author":{"gitId":"-"},"content":""},{"lineNumber":1788,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies"},{"lineNumber":1789,"author":{"gitId":"-"},"content":""},{"lineNumber":1790,"author":{"gitId":"Esilocke"},"content":"A project often depends on third-party libraries. For example, Address++ depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +"},{"lineNumber":1791,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +"},{"lineNumber":1792,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)"},{"lineNumber":1793,"author":{"gitId":"-"},"content":""},{"lineNumber":1794,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1795,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories"},{"lineNumber":1796,"author":{"gitId":"-"},"content":""},{"lineNumber":1797,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`"},{"lineNumber":1798,"author":{"gitId":"-"},"content":""},{"lineNumber":1799,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]"},{"lineNumber":1800,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1801,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can..."},{"lineNumber":1802,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App"},{"lineNumber":1803,"author":{"gitId":"-"},"content":""},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new person | keep track of my contacts"},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need"},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new task | keep track of my tasks and assignments"},{"lineNumber":1809,"author":{"gitId":"-"},"content":""},{"lineNumber":1810,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need"},{"lineNumber":1811,"author":{"gitId":"-"},"content":""},{"lineNumber":1812,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts"},{"lineNumber":1813,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1814,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added"},{"lineNumber":1815,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1816,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made"},{"lineNumber":1817,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1818,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values"},{"lineNumber":1819,"author":{"gitId":"-"},"content":""},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"|`* * *` |cautious user |be able to lock my address book application whenever I want with a password | prevent people with malicious intent from making changes to my data"},{"lineNumber":1821,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1822,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident"},{"lineNumber":1823,"author":{"gitId":"-"},"content":""},{"lineNumber":1824,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location"},{"lineNumber":1825,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1826,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs"},{"lineNumber":1827,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1828,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity"},{"lineNumber":1829,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1830,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better"},{"lineNumber":1831,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1832,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me"},{"lineNumber":1833,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1834,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts"},{"lineNumber":1835,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1836,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms"},{"lineNumber":1837,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1838,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others"},{"lineNumber":1839,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1840,"author":{"gitId":"Esilocke"},"content":"|`* *` |cautious user |be able to back up my address book data | retrieve my back up data in the event I make breaking changes to my actual address book and there is no way of undoing them"},{"lineNumber":1841,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"|`* *` |user with poor eyesight |be able to increase the font size | use the application without straining my eyes"},{"lineNumber":1843,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"|`* *` |forgetful user |be able to see who is assigned to a task | find my contacts who are in charge more quickly"},{"lineNumber":1845,"author":{"gitId":"-"},"content":""},{"lineNumber":1846,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly"},{"lineNumber":1847,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1848,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like"},{"lineNumber":1849,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1850,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts"},{"lineNumber":1851,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"|`*` |user |be able to mark my favourite contacts |find them more easily"},{"lineNumber":1853,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently"},{"lineNumber":1855,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1856,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features"},{"lineNumber":1857,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1858,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1859,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1860,"author":{"gitId":"-"},"content":""},{"lineNumber":1861,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1862,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases"},{"lineNumber":1863,"author":{"gitId":"-"},"content":""},{"lineNumber":1864,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)"},{"lineNumber":1865,"author":{"gitId":"-"},"content":""},{"lineNumber":1866,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person"},{"lineNumber":1868,"author":{"gitId":"-"},"content":""},{"lineNumber":1869,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1870,"author":{"gitId":"-"},"content":""},{"lineNumber":1871,"author":{"gitId":"-"},"content":"1. User requests to list persons"},{"lineNumber":1872,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1873,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list"},{"lineNumber":1874,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person"},{"lineNumber":1875,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1876,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1877,"author":{"gitId":"-"},"content":""},{"lineNumber":1878,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1879,"author":{"gitId":"-"},"content":""},{"lineNumber":1880,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1881,"author":{"gitId":"-"},"content":"* 2a. The list is empty."},{"lineNumber":1882,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1883,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1884,"author":{"gitId":"-"},"content":""},{"lineNumber":1885,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid."},{"lineNumber":1886,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1887,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1888,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1889,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1890,"author":{"gitId":"-"},"content":"Use case resumes at step 2."},{"lineNumber":1891,"author":{"gitId":"-"},"content":""},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person"},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria"},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria"},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found."},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found."},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person"},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons"},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list"},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person."},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person."},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid."},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid."},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message."},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail."},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made."},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1956,"author":{"gitId":"-"},"content":""},{"lineNumber":1957,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1958,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps"},{"lineNumber":1959,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1960,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1961,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1962,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps"},{"lineNumber":1963,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo"},{"lineNumber":1964,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message"},{"lineNumber":1965,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone."},{"lineNumber":1966,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1967,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1968,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1969,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1970,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1971,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1972,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands."},{"lineNumber":1973,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1974,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1975,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands."},{"lineNumber":1976,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1977,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3."},{"lineNumber":1978,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1979,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1980,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands."},{"lineNumber":1981,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1982,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1983,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands."},{"lineNumber":1984,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1985,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3"},{"lineNumber":1986,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1987,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1988,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort"},{"lineNumber":1989,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1990,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1991,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1992,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria"},{"lineNumber":1993,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria"},{"lineNumber":1994,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message."},{"lineNumber":1995,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1996,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1997,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1998,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1999,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":2000,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":2001,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":2002,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":2003,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":2004,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":2005,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid."},{"lineNumber":2006,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":2007,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":2008,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message."},{"lineNumber":2009,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":2010,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1."},{"lineNumber":2011,"author":{"gitId":"-"},"content":""},{"lineNumber":2012,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":2013,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements"},{"lineNumber":2014,"author":{"gitId":"-"},"content":""},{"lineNumber":2015,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed."},{"lineNumber":2016,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage."},{"lineNumber":2017,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse."},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure."},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse."},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0."},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing."},{"lineNumber":2022,"author":{"gitId":"-"},"content":""},{"lineNumber":2023,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":2024,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary"},{"lineNumber":2025,"author":{"gitId":"-"},"content":""},{"lineNumber":2026,"author":{"gitId":"-"},"content":"[[mainstream-os]]"},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Mainstream OS"},{"lineNumber":2028,"author":{"gitId":"-"},"content":""},{"lineNumber":2029,"author":{"gitId":"-"},"content":"...."},{"lineNumber":2030,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X"},{"lineNumber":2031,"author":{"gitId":"-"},"content":"...."},{"lineNumber":2032,"author":{"gitId":"-"},"content":""},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]"},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible"},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"...."},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data."},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"...."},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2040,"author":{"gitId":"-"},"content":"[appendix]"}],"authorContributionMap":{"charlesgoh":266,"jeffreygohkw":604,"Esilocke":296,"-":874}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:"},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//tag::introduction[]"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"//end::introduction[]"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer."},{"lineNumber":30,"author":{"gitId":"-"},"content":"+"},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":34,"author":{"gitId":"-"},"content":"+"},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here]."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++."},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds."},{"lineNumber":38,"author":{"gitId":"-"},"content":"+"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]"},{"lineNumber":40,"author":{"gitId":"-"},"content":"+"},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +"},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window."},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window"},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++."},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list"},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`."},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`."},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc."},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable."},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too big? Address++ allows you to change your font sizes at will. Here are three"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"ways of changing the font sizes:"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"**Option 1: Menu Font Size Buttons and Keyboard Shortcuts**"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"**Option 3: Handtype command into CLI**:"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeCLI.png[width\u003d\"540\"]"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"* Increase Size Command: `fontsize increase`"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"* Decrease Size Command: `fs decrease`"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"* Reset Size Command: `fontsize reset`"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"* `fontsize` can be replaced with `fs` for faster input. +"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]"},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"If you have trouble figuring out how to do something, or would like to find out about more features, you can click"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"on the **help** menu button. You can also enter the command `help` to access the help window."},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"image::HelpButtonUI.png[width\u003d\"540\"]"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":"Format: `help` +"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1]."},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"// tag::addprivacy[]"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"// tag::avatar[]"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Adding a person: `add`"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book."},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input."},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address`, `Remark` and `Avatar`, to be private by placing a `p` in front of the prefix. +"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"* As of version v1.5, the avatar fields accepts all URLs, and filenames with the prefix \"file:\""},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"You made a new friend John Doe, and want to save him into Address++. You could type the following command to add his details:"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"v/https://helloworld.world/image.png`"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"You meet Ima Hidearu, another one of your group members, but you do not know anything about him other than his name."},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" Nevertheless, you are still able to add him into Address++:"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/Ima Hidearu r/secretive`"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 3** +"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"Sometimes, you may wish to keep some fields private (i.e. not reveal them in the application). You can use the private"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"option while typing in your command:"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate pr/A true hero` +"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"**Note:** you do not have to set all fields as private, and you can choose which specific fields you want to set as private."},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"//end::addprivacy[]"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"//tag::addtask[]"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a task: `add task/` (Since V1.2)"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"You can use the `add task/` command to add new tasks to your address book. This allows you to keep track of your"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"assignments and project objectives."},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Format: `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input."},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 0 to 5 inclusive, with 5 being the highest priority +"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"* Adding a task with a priority of 0 is the same as not adding a priority. Only priority level above 1 will be displayed in the User Interface +"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default."},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"**Examples**:"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"You are assigned the task of writing a 1500-word essay that is due in 3 weeks. You decide to add this"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"task into Address++."},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Essay d/Write a 1500-word essay on philosophical thinking t/3 weeks later p/4`"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"You are required to submit at least one forum post to the school forums each week. To remind yourself of this task,"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"you add it into Address++."},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Weekly forum post p/1`"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"// end::addtask[]"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":"// tag::addtag[]"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a tag to persons : `add tag/` (Since V1.2)"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"You can use the `add tag/` command to add tag for multiple persons in the address book. For example, you may wish to add the tag `friends` to the first two persons in the address book. +"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"`add tag/` can be replaced by `a tag/` for faster input. +"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"Format: `add tag/ INDEX... t/[TAG]` +"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":"****"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":"**Things To Note**"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":"* You can add the tag of the person at the specific `INDEX`. +"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":"* The index refers to the index number shown in the most recent listing. +"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ... +"},{"lineNumber":198,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, `add tag/` will add the tag to all contacts in the address book."},{"lineNumber":199,"author":{"gitId":"-"},"content":"****"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**"},{"lineNumber":202,"author":{"gitId":"-"},"content":"****"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add tag `friends` to the 1st and 2nd persons in the address book. You can use `list` to show all the contacts in the address book first,"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"then use the `addtag` command to achieve it."},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":208,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ 1 2 t/friends` +"},{"lineNumber":209,"author":{"gitId":"-"},"content":"****"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":"****"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add a common tag to all the persons in the address book. You can type in the following command:"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ t/acquaintance` +"},{"lineNumber":217,"author":{"gitId":"-"},"content":"****"},{"lineNumber":218,"author":{"gitId":"-"},"content":"image::AddTagCommand.png[width\u003d\"790\"]"},{"lineNumber":219,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : AddTagCommand_"},{"lineNumber":220,"author":{"gitId":"-"},"content":"// end::addtag[]"},{"lineNumber":221,"author":{"gitId":"-"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Listing all persons : `list`"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts and tasks in the address book. +"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"`list` can be replaced by `l` for faster input. +"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"Format: `list` +"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"// tag::editprivacy[]"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit`"},{"lineNumber":232,"author":{"gitId":"-"},"content":""},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +"},{"lineNumber":238,"author":{"gitId":"-"},"content":""},{"lineNumber":239,"author":{"gitId":"-"},"content":"****"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command."},{"lineNumber":242,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values."},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands."},{"lineNumber":244,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it."},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command."},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message."},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields."},{"lineNumber":248,"author":{"gitId":"-"},"content":"****"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"**Examples**:"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":"Your friend John Doe has changed his email. You decide to update his entry in Address++ to reflect this change."},{"lineNumber":254,"author":{"gitId":"-"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 1 p/91234567 e/johndoe@example.com`"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"Your friend Betsy is no longer taking part in the same project as you, and has changed her phone number to a new one"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":"that you are not aware of. You decide to update her entry in Address++ accordingly."},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 2 p/ t/`"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"// end::editprivacy[]"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"// tag::edittask[]"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit task/` (Since V1.2)"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"You can use the `edit task/` command to quickly fix mistakes in your entries, or add/remove details in your tasks. You may wish to edit your tasks when their requirements change, for example. +"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":"Format: `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided."},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values."},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"You had previously added a task reminding you to write a 1500-word essay. However you receive notification that the word requirement"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"is now 1800 words instead. You edit the task to reflect this change."},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 2 d/1800 words essay`"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"One of your assignments has been pushed back and is no longer as urgent as before. You edit the task to reflect this change."},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 4 deadline/2 months later p/2`"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"// end::edittask[]"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"// tag::edittag[]"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edit tag/` (Since v1.2)"},{"lineNumber":296,"author":{"gitId":"-"},"content":""},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"You can use `edit tag/` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"`edit tag/` can be replaced by `et` for faster input. +"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Format: `edit tag/ OLDTAGNAME NEWTAGNAME` +"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different."},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `OLDTAGNAME` value."},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**:"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"You have finished a project, and have become good friends with your project mates."},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"You decide to promote all your project mates into friends."},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit tag/ project friends`"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"// end::edittag[]"},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"// tag::changeprivacy[]"},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":"`changeprivacy` can be replaced by `cp` for faster input. +"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":325,"author":{"gitId":"charlesgoh"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR]`"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields."},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix."},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI."},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI."},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy."},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting."},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":"You are meeting some new groupmates for your upcoming project and you are not too comfortable with exposing your family\u0027s particulars. +"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":"You decide to hide your family\u0027s phone number, email and home address by setting them to private. +"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `changeprivacy 1 p/true e/true a/true`"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":"// end::changeprivacy[]"},{"lineNumber":345,"author":{"gitId":"-"},"content":""},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacylevel[]"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy Level of the address book : `privacylevel`(Since V1.5)"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":"Changing a person\u0027s privacy just to reveal their data or to make a person fully confidential may be time-consuming. If you would like to view all the data hidden by private fields easily, or completely hide a person with private fields, you can use this command to change the Privacy Level of the address book. +"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":"At level 1, all data, regardless of whether they are set to be private or public, can be viewed. +"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":"At level 2, private fields will have their data hidden by a string, such as `\u003cPrivate Phone\u003e`. +"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":"At level 3, any person containing at least one private field will be completely hidden in the address book. +"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"`privacylevel` can be replaced by `pl` for faster input. +"},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"Format: `privacylevel LEVEL`"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"* Address++ always launches in privacy level 2."},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":"* The `LEVEL` that you input can only contain the values 1, 2, or 3."},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":"* This does not change the actual privacy setting of each field, thus, changing the privacy level to 1 does not make any of the private fields public."},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":"** Thus, even if you have set the address book to be privacy level 1, you cannot edit a field that is set as private without setting it back to public."},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":"** Similarly, since a person is completely hidden in privacy level 3, you will have to set the privacy level back to 2 or 1 to be able to modify that person."},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":"You have an address book full of various contacts with private fields, however, now you need to access the email addresses of all your contacts to ask them for help in your upcoming survey. +"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"You decide to use the privacylevel command to reveal all you contacts\u0027 hidden data."},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 1`"},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2** +"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"You wish to completely hide some of your confidential contacts from view, but your address book is too large, and you do not want to have to individually set every field for every confidential person to be private. +"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":"Using the privacylevel command, you set each contact with any private field to be hidden in the address book. +"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 3`"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacylevel[]"},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":381,"author":{"gitId":"-"},"content":"// tag::favourite[]"},{"lineNumber":382,"author":{"gitId":"-"},"content":""},{"lineNumber":383,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite contacts. For example, you may wish to set your girlfriend as your favourite contact. You will see a heart png next to your girlfriend\u0027s name"},{"lineNumber":386,"author":{"gitId":"-"},"content":"once you successfully set her as your favourite contact. +"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":388,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +"},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":390,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +"},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"-"},"content":"****"},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":"**Things To Note**"},{"lineNumber":394,"author":{"gitId":"-"},"content":""},{"lineNumber":395,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`."},{"lineNumber":396,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":397,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"* You will see a heart shape next to your favourite persons."},{"lineNumber":399,"author":{"gitId":"-"},"content":"****"},{"lineNumber":400,"author":{"gitId":"-"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +"},{"lineNumber":402,"author":{"gitId":"-"},"content":"****"},{"lineNumber":403,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +"},{"lineNumber":404,"author":{"gitId":"-"},"content":"Suppose you want to set the 2nd person in the address book to be your favourite contact. You should `list` all the persons first, then use `favourite` command to achieve it."},{"lineNumber":405,"author":{"gitId":"-"},"content":""},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 2` +"},{"lineNumber":408,"author":{"gitId":"-"},"content":"****"},{"lineNumber":409,"author":{"gitId":"-"},"content":""},{"lineNumber":410,"author":{"gitId":"-"},"content":"****"},{"lineNumber":411,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2:** +"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to set `Betsy Brandt` as your favourite contact."},{"lineNumber":413,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `favourite` her."},{"lineNumber":414,"author":{"gitId":"-"},"content":""},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Betsy` +"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 1` +"},{"lineNumber":417,"author":{"gitId":"-"},"content":"****"},{"lineNumber":418,"author":{"gitId":"-"},"content":"image::FavouriteCommandBeforeAndAfter.png[width\u003d\"790\"]"},{"lineNumber":419,"author":{"gitId":"-"},"content":"_Figure 3.12.1 : FavouriteCommand_"},{"lineNumber":420,"author":{"gitId":"-"},"content":"// end::favourite[]"},{"lineNumber":421,"author":{"gitId":"-"},"content":""},{"lineNumber":422,"author":{"gitId":"-"},"content":"// tag::showfavourite[]"},{"lineNumber":423,"author":{"gitId":"-"},"content":""},{"lineNumber":424,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)"},{"lineNumber":425,"author":{"gitId":"-"},"content":""},{"lineNumber":426,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":430,"author":{"gitId":"-"},"content":"Format: `showfavourite` +"},{"lineNumber":431,"author":{"gitId":"-"},"content":""},{"lineNumber":432,"author":{"gitId":"-"},"content":"****"},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":434,"author":{"gitId":"-"},"content":""},{"lineNumber":435,"author":{"gitId":"-"},"content":"* `showfavourite` command: It will return an empty list if there is no favourite persons."},{"lineNumber":436,"author":{"gitId":"-"},"content":"****"},{"lineNumber":437,"author":{"gitId":"-"},"content":"image::ShowFavouriteCommand.png[width\u003d\"250\"]"},{"lineNumber":438,"author":{"gitId":"-"},"content":"_Figure 3.13.1 : ShowFavouriteCommand_"},{"lineNumber":439,"author":{"gitId":"-"},"content":"// end::showfavourite[]"},{"lineNumber":440,"author":{"gitId":"-"},"content":""},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`"},{"lineNumber":442,"author":{"gitId":"-"},"content":""},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"*Things To Note*"},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`"},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Only the names will be searched"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"You would like to find all the people whose name contains the word \"David\". You first use `list` to show all your contacts,"},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the contacts named \"David\"."},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David` +"},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":468,"author":{"gitId":"-"},"content":"****"},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find people whose name contain the word \"David\" or \"Joe\"."},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David Joe` +"},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"// tag::findtask[]"},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Finding a task : `find task/` (Since V1.3)"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"You can use the `find task/` command to quickly find tasks that match your criteria, as well as tasks that have a certain level of urgency. +"},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"Furthermore, you can choose to only retrieve tasks that are either complete, or still in progress. +"},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +"},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Format: `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Things To Note*"},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":488,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`"},{"lineNumber":489,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`"},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"* Both the name and the description will be searched"},{"lineNumber":491,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`"},{"lineNumber":492,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"* *You must include at least 1 search keyword*, in order to filter the results by their priority, and whether or not it is completed."},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"* The `PRIORITY` must be an integer from 1 to 5, inclusive. If the priority search is included, all tasks that have a priority at least that of the specified priority will matced."},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"* `STATE` must be either `true` or `false`. If it is `true`, you will only see tasks that have been marked as complete, and if it is `false, you will only see tasks that are not complete, in addition to all other search criteria."},{"lineNumber":496,"author":{"gitId":"-"},"content":"****"},{"lineNumber":497,"author":{"gitId":"-"},"content":""},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"You would like to find all the tasks related to \"Report\". You first use `list` to show all your tasks,"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the tasks related to \"Report\"."},{"lineNumber":503,"author":{"gitId":"-"},"content":""},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report` +"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find tasks that have a \"High\" or \"Highest\" priority."},{"lineNumber":511,"author":{"gitId":"-"},"content":""},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4` +"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Furthermore, as you have several tasks related to \"Report\" that are already complete, you only want to see the tasks that are still not done."},{"lineNumber":519,"author":{"gitId":"-"},"content":""},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4 done/false` +"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"// end::findtask[]"},{"lineNumber":524,"author":{"gitId":"-"},"content":""},{"lineNumber":525,"author":{"gitId":"-"},"content":"// tag::showtag[]"},{"lineNumber":526,"author":{"gitId":"-"},"content":""},{"lineNumber":527,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all tags : `showtag` (Since V1.5)"},{"lineNumber":528,"author":{"gitId":"-"},"content":""},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"You can use the `showtag` command to quickly show all tags in the address book. Sometimes you may forget `tags` that you have added a few weeks ago. You may use this command to help you. +"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":531,"author":{"gitId":"-"},"content":"`showtag` can be replaced by `stag` for faster input. +"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":533,"author":{"gitId":"-"},"content":"Format: `showtag` +"},{"lineNumber":534,"author":{"gitId":"-"},"content":""},{"lineNumber":535,"author":{"gitId":"-"},"content":"****"},{"lineNumber":536,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":537,"author":{"gitId":"-"},"content":""},{"lineNumber":538,"author":{"gitId":"-"},"content":"* `showtag` command: It will return an empty list if there is no tags in the address book."},{"lineNumber":539,"author":{"gitId":"-"},"content":"* You may want to use `showtag` command to help you recall all the `tags` in the address book before you try to use `findtag` to find persons."},{"lineNumber":540,"author":{"gitId":"-"},"content":"****"},{"lineNumber":541,"author":{"gitId":"-"},"content":"// end::showtag[]"},{"lineNumber":542,"author":{"gitId":"-"},"content":""},{"lineNumber":543,"author":{"gitId":"-"},"content":"// tag::findtag[]"},{"lineNumber":544,"author":{"gitId":"-"},"content":""},{"lineNumber":545,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `find tag/` (Since V1.4)"},{"lineNumber":546,"author":{"gitId":"-"},"content":""},{"lineNumber":547,"author":{"gitId":"-"},"content":"You can use the `find tag/` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +"},{"lineNumber":548,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/` in front of the `friends`. +"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":550,"author":{"gitId":"-"},"content":"`find tag/` can be replaced by `f tag/` for faster input. +"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":552,"author":{"gitId":"-"},"content":"Format: `find tag/ KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":553,"author":{"gitId":"-"},"content":""},{"lineNumber":554,"author":{"gitId":"-"},"content":"****"},{"lineNumber":555,"author":{"gitId":"-"},"content":"**Things To Note** +"},{"lineNumber":556,"author":{"gitId":"-"},"content":""},{"lineNumber":557,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`"},{"lineNumber":558,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`"},{"lineNumber":559,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons."},{"lineNumber":560,"author":{"gitId":"-"},"content":"* Only full words will be matched. e.g. `friend` will not match `friends`"},{"lineNumber":561,"author":{"gitId":"-"},"content":"* There is no space between `/` and tag name. e.g. `/ friends` will not match `/friends`."},{"lineNumber":562,"author":{"gitId":"-"},"content":"****"},{"lineNumber":563,"author":{"gitId":"-"},"content":""},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":565,"author":{"gitId":"-"},"content":"****"},{"lineNumber":566,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +"},{"lineNumber":567,"author":{"gitId":"-"},"content":"Suppose you want to find contatcs with tag `friends` or `colleagues`, you can just key in the following command."},{"lineNumber":568,"author":{"gitId":"-"},"content":""},{"lineNumber":569,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends colleagues`"},{"lineNumber":570,"author":{"gitId":"-"},"content":"****"},{"lineNumber":571,"author":{"gitId":"-"},"content":""},{"lineNumber":572,"author":{"gitId":"-"},"content":"****"},{"lineNumber":573,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2:** +"},{"lineNumber":574,"author":{"gitId":"-"},"content":"Suppose you want to find contacts without tag `frineds`, you can key in the following command."},{"lineNumber":575,"author":{"gitId":"-"},"content":""},{"lineNumber":576,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ /friends`"},{"lineNumber":577,"author":{"gitId":"-"},"content":"****"},{"lineNumber":578,"author":{"gitId":"-"},"content":""},{"lineNumber":579,"author":{"gitId":"-"},"content":"****"},{"lineNumber":580,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 3:** +"},{"lineNumber":581,"author":{"gitId":"-"},"content":"Suppose you want to find contacts with tag `friends` but without `colleagues`, you can key in the following command."},{"lineNumber":582,"author":{"gitId":"-"},"content":""},{"lineNumber":583,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends /colleagues`"},{"lineNumber":584,"author":{"gitId":"-"},"content":"****"},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::FindTagCommand.png[width\u003d\"790\"]"},{"lineNumber":586,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : FindTagCommand_"},{"lineNumber":587,"author":{"gitId":"-"},"content":"// end::findtag[]"},{"lineNumber":588,"author":{"gitId":"-"},"content":""},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`"},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts from the address book. The `delete` command will help you clean up contacts who you may not wish to associate with anymore. +"},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +"},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +"},{"lineNumber":596,"author":{"gitId":"-"},"content":""},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":599,"author":{"gitId":"-"},"content":""},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"* Deletes the person at the specified `INDEX`."},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first person from your contacts."},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1`"},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":"You wish to delete \"Maribel Edelweiss\" from your contacts. However you have many contacts, and are not sure where Maribel is."},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"You thus use `find` to find contacts who are named \"Maribel\", then delete Maribel Edelweiss accordingly."},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Maribel` +"},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 3`"},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"// tag::deletetask[]"},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a task : `delete task/` (Since V1.2)"},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"You can use the `delete task/` command to remove tasks from the address book. The `delete task/` command will help you clean up obsolete or completed tasks. +"},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"`delete task/` can be replaced by `d task/` for faster input. +"},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Format: `delete task/ INDEX` +"},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"* Deletes the task at the specified `INDEX`."},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent task listing."},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first task."},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 1`"},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":645,"author":{"gitId":"-"},"content":""},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"You wish to delete a task named \"1500-word Essay\". However you have many tasks, and are not sure where it is."},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"You thus use `find task/` to find tasks related to \"Essays\", before using `delete task/` to delete \"1500-word Essay\" accordingly."},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ Essay` +"},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 3`"},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"// end::deletetask[]"},{"lineNumber":655,"author":{"gitId":"-"},"content":"// tag::deletetag[]"},{"lineNumber":656,"author":{"gitId":"-"},"content":""},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `delete tag/` (Since V1.2)"},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"You can use `delete tag/` to delete the tag of multiple persons from the address book. +"},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":661,"author":{"gitId":"-"},"content":"`delete tag/` can be replaced by `d tag/` for faster input. +"},{"lineNumber":662,"author":{"gitId":"-"},"content":""},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Format: `delete tag/ INDEX... t/[TAG]` +"},{"lineNumber":664,"author":{"gitId":"-"},"content":""},{"lineNumber":665,"author":{"gitId":"-"},"content":""},{"lineNumber":666,"author":{"gitId":"-"},"content":"****"},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +"},{"lineNumber":668,"author":{"gitId":"-"},"content":""},{"lineNumber":669,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`."},{"lineNumber":670,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":671,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"* If you do not key in any index, delete tag/ will delete the tag from all contacts in the address book."},{"lineNumber":673,"author":{"gitId":"-"},"content":"****"},{"lineNumber":674,"author":{"gitId":"-"},"content":""},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":676,"author":{"gitId":"-"},"content":"****"},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +"},{"lineNumber":678,"author":{"gitId":"-"},"content":"Suppose you want to delete `classmates` tag for the first two persons in the address book, you can `list` all the persons first, then"},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"use the `delete tag/` command to achieve."},{"lineNumber":680,"author":{"gitId":"-"},"content":""},{"lineNumber":681,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +"},{"lineNumber":682,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ 1 2 t/friends` +"},{"lineNumber":683,"author":{"gitId":"-"},"content":"****"},{"lineNumber":684,"author":{"gitId":"-"},"content":""},{"lineNumber":685,"author":{"gitId":"-"},"content":"****"},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":687,"author":{"gitId":"Esilocke"},"content":"Suppose you want to delete `friends` tag from all contacts in the address book."},{"lineNumber":688,"author":{"gitId":"-"},"content":""},{"lineNumber":689,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +"},{"lineNumber":690,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ t/friends` +"},{"lineNumber":691,"author":{"gitId":"-"},"content":"****"},{"lineNumber":692,"author":{"gitId":"-"},"content":"image::DeleTagCommand.png[width\u003d\"790\"]"},{"lineNumber":693,"author":{"gitId":"-"},"content":"_Figure 3.20.1 : DeleteTagCommand_"},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::deletetag[]"},{"lineNumber":695,"author":{"gitId":"-"},"content":""},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]"},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Sorting your contact list and tasks : `sort` (Since V1.1)"},{"lineNumber":698,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts or tasks by using the `sort` command +"},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"`sort` can be replaced with `so` for faster input. +"},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"Format: `sort LIST FIELD ORDER` +"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":705,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contacts by any field in either ascending or descending order"},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your tasks by deadline or by priority in ascending or descending order"},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for person contacts: NAME, PHONE, EMAIL, ADDRESS, REMARK, AVATAR."},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for tasks: DEADLINE, PRIORITY."},{"lineNumber":710,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC."},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts"},{"lineNumber":712,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":713,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":"You have many contacts on Address++. You decide to make it neater by sorting your contacts"},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":"by name in ascending order:"},{"lineNumber":719,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort person name asc`"},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":"You add a few tasks of different priorities. You decide to sort the tasks so you can see"},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":"the higher priority tasks on the top of the list:"},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort task priority desc`"},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":"//end::sort[]"},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":"//tag::backup[]"},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Backing up your data : `backup` (Since V1.2)"},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +"},{"lineNumber":735,"author":{"gitId":"-"},"content":""},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [FILENAME]` +"},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"`backup` can be replaced with `bk` for faster input. +"},{"lineNumber":738,"author":{"gitId":"-"},"content":""},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":"This allows you to backup your saved data on Address++ in another file."},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario**: +"},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":"You decide to backup your data just in case you accidentally make changes that"},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":"cannot be undone. You type the following code:"},{"lineNumber":746,"author":{"gitId":"-"},"content":""},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":"`backup filename.xml`"},{"lineNumber":748,"author":{"gitId":"-"},"content":""},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":"The file will then be saved in the same directory location as your `JAR` application file"},{"lineNumber":750,"author":{"gitId":"-"},"content":"****"},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"//end::backup[]"},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":"//tag::password[]"},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Protecting your data : `lock` `unlock` (Since V1.5)"},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":"Worried about security? Address++ allows your to protect your data with a password."},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":"Using the `lock` and `unlock` commands, you can toggle between security modes. +"},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":"Locked address books only allow viewing of data. If anyone attempts to tamper with"},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"your data, they will be greeted with this error:"},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"image::LockedRestriction.png[width\u003d\"800\"]"},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":"Format for `lock` Command: `lock pw/[PASSWORD]` +"},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":"`lock` can be replaced with `lk` for faster input. +"},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":"Format for `unlock` Command: `unlock pw/[PASSWORD]` +"},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":"`unlock` can be replaced with `ul` for faster input. +"},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"The default password is `password`"},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":773,"author":{"gitId":"-"},"content":"****"},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":"You have just finished editing your contacts on Address++ and you decide to have a break away from"},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"your computer. You decide to lock Address++ using the following command:"},{"lineNumber":777,"author":{"gitId":"-"},"content":""},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `lock pw/password`"},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":"When you return to your computer, you decide to continue adding contacts in Address++."},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"To unlock the Address++ application, you use the following command:"},{"lineNumber":784,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `unlock pw/password`"},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":787,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing your password : `changepassword` (Since V1.5)"},{"lineNumber":789,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":790,"author":{"gitId":"charlesgoh"},"content":"Want to choose a better password? The `changepassword` command allows you to change your"},{"lineNumber":791,"author":{"gitId":"charlesgoh"},"content":"password whenever you want, provided you know the old password."},{"lineNumber":792,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":793,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":794,"author":{"gitId":"charlesgoh"},"content":"The default password is \u0027password\u0027"},{"lineNumber":795,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":796,"author":{"gitId":"charlesgoh"},"content":"image::ChangePasswordImages.png[width\u003d\"800\"]"},{"lineNumber":797,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":798,"author":{"gitId":"charlesgoh"},"content":"Format: `changepassword pw/[PASSWORD] np/[NEWPASSWORD] cfp/[CONFIRMPASSWORD]` +"},{"lineNumber":799,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":800,"author":{"gitId":"charlesgoh"},"content":"**`changepassword` can be replaced with `cpw` for faster input.** +"},{"lineNumber":801,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":802,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":803,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":804,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":805,"author":{"gitId":"charlesgoh"},"content":"You open Address++ for the first time. After reading the user guide, you realize"},{"lineNumber":806,"author":{"gitId":"charlesgoh"},"content":"that the default password (\"password\") is not good enough. You decide to make a new"},{"lineNumber":807,"author":{"gitId":"charlesgoh"},"content":"one with the following command:"},{"lineNumber":808,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":809,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `changepassword pw/password np/newpassword cfp/newpassword`"},{"lineNumber":810,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":811,"author":{"gitId":"charlesgoh"},"content":"//end::password[]"},{"lineNumber":812,"author":{"gitId":"-"},"content":""},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`"},{"lineNumber":814,"author":{"gitId":"-"},"content":""},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact, and look at it in greater detail. +"},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +"},{"lineNumber":818,"author":{"gitId":"-"},"content":""},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":"Format: `select INDEX` +"},{"lineNumber":820,"author":{"gitId":"-"},"content":""},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"The first person in your contacts has a very long address, and you want to see if it is correct."},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select 1` +"},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"// tag::selecttask[]"},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a task : `select task/` (Since V1.4)"},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":"You can use `select task/` to pick out a task, and look at it in greater detail. +"},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +"},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"Format: `select task/ INDEX` +"},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"The first task has a very long description, and you want to see it in full."},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select task/ 1` +"},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"// end::selecttask[]"},{"lineNumber":863,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]"},{"lineNumber":864,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)"},{"lineNumber":865,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":866,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +"},{"lineNumber":867,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +"},{"lineNumber":869,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +"},{"lineNumber":871,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":872,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +"},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +"},{"lineNumber":875,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where the second person in your address book lives. +"},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `list` +"},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 2` +"},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +"},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where a specific person in your address book, Betsy, lives. +"},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Betsy` +"},{"lineNumber":882,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 1` +"},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":886,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +"},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses."},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps."},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"* A person with no address will open Google Maps, but it will not search for an address as there is no address to search for."},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing."},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]"},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]"},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another : `navigate` (Since V1.5)"},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"Although `locate` shows you where a person\u0027s address is, it does not tell you how to get there. The `navigate` command will provide directions, with the help of Google Maps, on how to get from one address to another. +"},{"lineNumber":899,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"`navigate` can be replaced by `nav` for faster input. +"},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +"},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +"},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +"},{"lineNumber":908,"author":{"gitId":"Esilocke"},"content":"You are planning to go to your friend Roy\u0027s house for their birthday party that afternoon, but you have just ended class at NUS. +"},{"lineNumber":909,"author":{"gitId":"Esilocke"},"content":"You have never been to their house before, and you enlist the aid of Address++ to find the fastest route to their house. +"},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Roy` +"},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fa/NUS tp/1`"},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +"},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":"After the birthday party, you have a group meeting scheduled for your project. You have this meeting schedules as your first task, and you seek help from Address++ to find a path from Roy\u0027s house to the group meeting. +"},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fp/1 tt/1`"},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 3:** +"},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"To conclude your long and busy day, you have to send off your sister at Changi Airport, who is going off on an exchange programme. +"},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"Using the navigate command once again, you find an efficient route from the location of your group meeting to the airport. +"},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate ft/1 ta/Changi Airport`"},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +"},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses."},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address or a person with no address cannot be navigated from or navigated to."},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"* A task with no address cannot be navigated from or navigated to."},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing."},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":"* You may only input exactly one of the 3 prefixes from `fp/` `ft/` and `fa/` to indicate the address to navigate from, and exactly one of the 3 prefixes from `tp/` `tt/` and `ta/` to indicate the address to navigate to."},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":"** If you input any less or any more than 1 of the 3 prefixes from each group, the command will fail."},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":"** There is no need to match the type of prefixes. You can navigate with any combination of prefixes as long as there is only one prefix to indicate the address to navigate from and only one prefix to indicate the address to navigate to."},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]"},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"// tag::setstate[]"},{"lineNumber":937,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as complete : `setcomplete` (Since V1.5)"},{"lineNumber":938,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +"},{"lineNumber":940,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":941,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +"},{"lineNumber":942,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":943,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +"},{"lineNumber":944,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed."},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"You have finally completed a task that involves writing a 1500-word essay."},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e\u003e `setcomplete 6` +"},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as incomplete : `setincomplete` (Since V1.5)"},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +"},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +"},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":967,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +"},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete."},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"You realised that you had marked a task as complete, even though it is still in progress."},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"Furthermore you are not sure when you had marked it as complete. However, you are still able to safely mark the task as being"},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":"in progress."},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `setincomplete 7`"},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"// end::setstate[]"},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]"},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assigning contacts to task : `assign` (Since V1.4)"},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +"},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +"},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +"},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"You have created a new task to complete a paper model. However you are unable to do it by yourself, and require the help of some of your friends."},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `assign 1 5 7 to/5`"},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismissing contacts from task : `dismiss` (Since V1.4)"},{"lineNumber":1016,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1017,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +"},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +"},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +"},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"One of the tasks that you had created previously with many people assigned turned out to be easier than expected."},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"You believe that this task could do with less manpower and would like to remove some of the previously assigned contacts from this task."},{"lineNumber":1038,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `dismiss 1 5 7 from/5`"},{"lineNumber":1040,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1041,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Viewing contacts assigned to a task : `viewassign` (Since V1.5)"},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"You can use `viewassign` to see who is assigned to a particular task. You may wish to use `viewassign` when you want to contact only the people who are assigned to a particular task, for example. +"},{"lineNumber":1045,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"`viewassign` can be replaced by `va` for faster input. +"},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1048,"author":{"gitId":"Esilocke"},"content":"Format: `viewassign INDEX` +"},{"lineNumber":1049,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1050,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"2 weeks after assigning some of your contacts to a particular task, you decide to obtain a status report about their current progress. +"},{"lineNumber":1062,"author":{"gitId":"Esilocke"},"content":"However you have forgotten who you have assigned to that task. You thus use `viewassign` to see who is assigned to that task."},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `viewassign 4`"},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1066,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]"},{"lineNumber":1067,"author":{"gitId":"-"},"content":""},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]"},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing the Address Book\u0027s theme : `theme` (Since V1.5)"},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1071,"author":{"gitId":"jeffreygohkw"},"content":"Perhaps you may not be too fond of the existing style of the address book and you want to have something fresh. The `theme` command changes the address book between two themes, `light` and `dark`."},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":1073,"author":{"gitId":"jeffreygohkw"},"content":"`theme` can be replaced by `th` for faster input. +"},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1075,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +"},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1077,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +"},{"lineNumber":1078,"author":{"gitId":"jeffreygohkw"},"content":"It is late at night and the light theme is a little too brightly coloured. Preferring a darker theme, you can choose to input the theme command to make the theme into a darker colour. +"},{"lineNumber":1079,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `theme dark`"},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1081,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"Format: `theme` + THEME"},{"lineNumber":1083,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1085,"author":{"gitId":"jeffreygohkw"},"content":"* There are only two themes as of v1.5, light and dark. More themes of different colours could be added in a future release."},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1087,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]"},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1089,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`"},{"lineNumber":1090,"author":{"gitId":"-"},"content":""},{"lineNumber":1091,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +"},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1093,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +"},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"Format: `history` +"},{"lineNumber":1096,"author":{"gitId":"-"},"content":""},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1100,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box."},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1102,"author":{"gitId":"-"},"content":""},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"// tag::undo[]"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`"},{"lineNumber":1105,"author":{"gitId":"-"},"content":""},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +"},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +"},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1110,"author":{"gitId":"-"},"content":"Format: `undo` +"},{"lineNumber":1111,"author":{"gitId":"-"},"content":""},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Undoable commands: Commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`)."},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1117,"author":{"gitId":"-"},"content":""},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts."},{"lineNumber":1122,"author":{"gitId":"-"},"content":""},{"lineNumber":1123,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1124,"author":{"gitId":"-"},"content":""},{"lineNumber":1125,"author":{"gitId":"Esilocke"},"content":"You realise this immediately and undo your mistake."},{"lineNumber":1126,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1127,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`"},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1130,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts. Furthermore, not knowing this, you made a mistake when editing another person\u0027s name."},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarisa Liselote`"},{"lineNumber":1136,"author":{"gitId":"-"},"content":""},{"lineNumber":1137,"author":{"gitId":"Esilocke"},"content":"You realise that something is amiss, and find out that you made not one, but two mistakes. Nevertheless you still manage to recover your contact by using multiple `undo` commands."},{"lineNumber":1138,"author":{"gitId":"-"},"content":""},{"lineNumber":1139,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"Finally, you edit Clarissa\u0027s name correctly."},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1144,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarissa Liselotte`"},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"// end::undo[]"},{"lineNumber":1147,"author":{"gitId":"-"},"content":""},{"lineNumber":1148,"author":{"gitId":"-"},"content":"// tag::unfavourite[]"},{"lineNumber":1149,"author":{"gitId":"-"},"content":""},{"lineNumber":1150,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)"},{"lineNumber":1151,"author":{"gitId":"-"},"content":""},{"lineNumber":1152,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +"},{"lineNumber":1153,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +"},{"lineNumber":1154,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1155,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +"},{"lineNumber":1156,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1157,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +"},{"lineNumber":1158,"author":{"gitId":"-"},"content":""},{"lineNumber":1159,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1160,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +"},{"lineNumber":1161,"author":{"gitId":"-"},"content":""},{"lineNumber":1162,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`."},{"lineNumber":1163,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":1164,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":1165,"author":{"gitId":"-"},"content":"* The heart png will disappear once you `unfavourite` the person."},{"lineNumber":1166,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1167,"author":{"gitId":"-"},"content":""},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1169,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1170,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +"},{"lineNumber":1171,"author":{"gitId":"-"},"content":"Suppose you do not want to the 2nd person in the address book to be your favourite contact anymore, you should `list` all the persons first, then use `unfavourite` command to achieve it."},{"lineNumber":1172,"author":{"gitId":"-"},"content":""},{"lineNumber":1173,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +"},{"lineNumber":1174,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 2` +"},{"lineNumber":1175,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1176,"author":{"gitId":"-"},"content":""},{"lineNumber":1177,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1178,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2:** +"},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to `unfavourite` `Betsy Brandt` in the address book."},{"lineNumber":1180,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `unfavourite` `Betsy Brandt`."},{"lineNumber":1181,"author":{"gitId":"-"},"content":""},{"lineNumber":1182,"author":{"gitId":"-"},"content":"\u003e\u003e `find Betsy` +"},{"lineNumber":1183,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 1` +"},{"lineNumber":1184,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1185,"author":{"gitId":"-"},"content":"image::UnfavouriteCommand.png[width\u003d\"790\"]"},{"lineNumber":1186,"author":{"gitId":"-"},"content":"_Figure 3.37.1 : UnfavouriteCommand_"},{"lineNumber":1187,"author":{"gitId":"-"},"content":"// end::unfavourite[]"},{"lineNumber":1188,"author":{"gitId":"-"},"content":""},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"// tag::redo[]"},{"lineNumber":1190,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`"},{"lineNumber":1191,"author":{"gitId":"-"},"content":""},{"lineNumber":1192,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` was not necessary. `redo` reverses the most recent `undo` command. +"},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +"},{"lineNumber":1195,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1196,"author":{"gitId":"-"},"content":"Format: `redo` +"},{"lineNumber":1197,"author":{"gitId":"-"},"content":""},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts."},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo your mistake."},{"lineNumber":1206,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`"},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"However you realise that you have deleted the correct person. Instead of typing `delete 1`, you choose to `redo` your command instead."},{"lineNumber":1210,"author":{"gitId":"-"},"content":""},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`"},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1214,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts, as well as two of your tasks."},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 5` +"},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 8` +"},{"lineNumber":1220,"author":{"gitId":"-"},"content":""},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo all your previous commands."},{"lineNumber":1222,"author":{"gitId":"-"},"content":""},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`"},{"lineNumber":1226,"author":{"gitId":"-"},"content":""},{"lineNumber":1227,"author":{"gitId":"Esilocke"},"content":"However you realise that no mistake was made. Instead of typing your commands again, you choose to `redo` your commands instead."},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +"},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +"},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`"},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1233,"author":{"gitId":"Esilocke"},"content":"// end::redo[]"},{"lineNumber":1234,"author":{"gitId":"Esilocke"},"content":"// tag::clear[]"},{"lineNumber":1235,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`"},{"lineNumber":1236,"author":{"gitId":"-"},"content":""},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +"},{"lineNumber":1238,"author":{"gitId":"Esilocke"},"content":"Additionally, if you clear only the contacts list or the task list, you can specify which type to clear in the command. +"},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1240,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +"},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1242,"author":{"gitId":"-"},"content":"Format: `clear` +"},{"lineNumber":1243,"author":{"gitId":"-"},"content":""},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"To clear only the contacts list, type `clear person/` +"},{"lineNumber":1245,"author":{"gitId":"Esilocke"},"content":"To clear only the tasks list, type `clear task/` +"},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1249,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"* If both `person/` and `task` are specified, or if neither were specified, the `clear` command will delete all entries in the address book."},{"lineNumber":1251,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1252,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1255,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1256,"author":{"gitId":"Esilocke"},"content":"You have completed every task in your task list, and want to clean it up."},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1258,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear task/` +"},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1261,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1262,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1263,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. However you would still like to keep smome of the tasks for further reference."},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1265,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear person/` +"},{"lineNumber":1266,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1268,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1270,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. You would like to clear everything in Address++ to make space for your own contacts and tasks."},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1272,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear` +"},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1275,"author":{"gitId":"Esilocke"},"content":"// end::clear[]"},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"// tag::open[]"},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening a save file : `open`"},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"Switching between address books is made easy with the `open` command, as it allows you can load different save files into the application. +"},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"You can choose which .xml file to open from the pop up window that appears upon executing this command. +"},{"lineNumber":1280,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":"`open` can be replaced by `o` for faster input. +"},{"lineNumber":1282,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":"Format `open`"},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":"// end::open[]"},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":"// tag::saveas[]"},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Saving the data as a new save file : `save`"},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to save a copy of your data in a separate location or with a different name, the `save` command will allow you to do just that. +"},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":"You can choose what to name your save file and where to save it from the pop up window that appears upon executing this command. +"},{"lineNumber":1290,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":"`save` can be replaced by `sa` for faster input. +"},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":"Format: `save`"},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":"// end::saveas[]"},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1296,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`"},{"lineNumber":1297,"author":{"gitId":"-"},"content":""},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +"},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Format: `exit`"},{"lineNumber":1300,"author":{"gitId":"-"},"content":""},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4]."},{"lineNumber":1302,"author":{"gitId":"-"},"content":""},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]"},{"lineNumber":1304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data"},{"lineNumber":1305,"author":{"gitId":"-"},"content":""},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +"},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually."},{"lineNumber":1308,"author":{"gitId":"-"},"content":""},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, you can use the `save` command, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window."},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, you can use the `open` command, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window."},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]"},{"lineNumber":1314,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1315,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ"},{"lineNumber":1316,"author":{"gitId":"-"},"content":""},{"lineNumber":1317,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +"},{"lineNumber":1318,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location."},{"lineNumber":1319,"author":{"gitId":"-"},"content":""},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet"},{"lineNumber":1321,"author":{"gitId":"-"},"content":""},{"lineNumber":1322,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1324,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `add pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1326,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"e.g. `add task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`"},{"lineNumber":1328,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `add tag/ [INDEX...] t/[TAG]` +"},{"lineNumber":1329,"author":{"gitId":"Esilocke"},"content":"e.g. `add tag/ 1 2 t/friends`"},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +"},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false r/true`"},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `privacylevel [LEVEL]` +"},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`"},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"* *Clear persons* : `clear person/`"},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"* *Clear tasks* : `clear task/`"},{"lineNumber":1336,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +"},{"lineNumber":1337,"author":{"gitId":"-"},"content":"e.g. `delete 3`"},{"lineNumber":1338,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task/ INDEX` +"},{"lineNumber":1339,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task/ 4`"},{"lineNumber":1340,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `delete tag/ [INDEX...] t/[TAG]` +"},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"e.g. `delete tag/ 1 2 t/friends`"},{"lineNumber":1342,"author":{"gitId":"charlesgoh"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +"},{"lineNumber":1343,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`"},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1345,"author":{"gitId":"Esilocke"},"content":"e.g. `edit task/ 2 p/veryhigh`"},{"lineNumber":1346,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edit tag/ TAGTOCHANGE NEWTAGNAME` +"},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"e.g. `edit tag/ friends enemies`"},{"lineNumber":1348,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +"},{"lineNumber":1349,"author":{"gitId":"-"},"content":"e.g. `favourite 1`"},{"lineNumber":1350,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +"},{"lineNumber":1351,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`"},{"lineNumber":1352,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +"},{"lineNumber":1353,"author":{"gitId":"-"},"content":"e.g. `showfavourite`"},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":1355,"author":{"gitId":"-"},"content":"e.g. `find James Jake`"},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `find tag/ TAG [MORE_TAGS]` +"},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"e.g. `find tag/ friends`"},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +"},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"e.g. `find task/ update p/high done/false`"},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : `help`"},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `list`"},{"lineNumber":1362,"author":{"gitId":"-"},"content":"* *List tags* : `showtag`"},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate INDEX`"},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +"},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navigate fa/Tampines Mall ta/Sentosa"},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +"},{"lineNumber":1367,"author":{"gitId":"-"},"content":"e.g.`select 2`"},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task/ INDEX` +"},{"lineNumber":1369,"author":{"gitId":"Esilocke"},"content":"e.g.`select task/ 2`"},{"lineNumber":1370,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +"},{"lineNumber":1371,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`"},{"lineNumber":1372,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +"},{"lineNumber":1373,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`"},{"lineNumber":1374,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +"},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`"},{"lineNumber":1376,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +"},{"lineNumber":1377,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`"},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `viewassign INDEX` +"},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"e.g. `viewassign 1`"},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `theme THEME` +"},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `theme light`"},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"* *History* : `history`"},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":"* *Undo* : `undo`"},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"* *Redo* : `redo`"},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `open`"},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `save`"},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : `exit`"},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Command Shorthand Cheat Sheet"},{"lineNumber":1390,"author":{"gitId":"Esilocke"},"content":"* *Add* : `a n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `a n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1392,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `a pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1393,"author":{"gitId":"Esilocke"},"content":"e.g. `a pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `a task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"e.g. `a task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`"},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `a tag/ [INDEX...] t/[TAG]` +"},{"lineNumber":1397,"author":{"gitId":"Esilocke"},"content":"e.g. `a tag/ 1 2 t/friends`"},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `cp INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +"},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `cp 2 n/true p/false e/true a/false r/true`"},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `pl [LEVEL]` +"},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`"},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear persons* : `c person`"},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear tasks* : `c task`"},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":"* *Delete person* : `d INDEX` +"},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `d 3`"},{"lineNumber":1406,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `d task/ INDEX` +"},{"lineNumber":1407,"author":{"gitId":"Esilocke"},"content":"e.g. `d task/ 4`"},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `d tag/ INDEX t/[TAG]` +"},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"e.g. `d tag/ 1 2 t/friends`"},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `e INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `e 2 n/James Lee e/jameslee@example.com`"},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `e task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1413,"author":{"gitId":"Esilocke"},"content":"e.g. `e task/ 2 p/veryhigh`"},{"lineNumber":1414,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `e tag/ OLDTAGNAME NEWTAGNAME` +"},{"lineNumber":1415,"author":{"gitId":"Esilocke"},"content":"e.g. `e tag/ friends enemies`"},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":"* *Favourite persons* :`fav INDEX` +"},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `fav 1`"},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":"* *Unfavourite persons* :`unfav INDEX` +"},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `unfav 1`"},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"* *Show favourite list* :`sfav` +"},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sfav`"},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":"* *Find person* : `f KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `f James Jake`"},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `f tag/ Tag [MORE_TAGS]` +"},{"lineNumber":1425,"author":{"gitId":"Esilocke"},"content":"e.g. `f tag/ friends`"},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `f task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +"},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":"e.g. `f task/ update p/high`"},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `l`"},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"* *List tags* : `stag`"},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `loc INDEX`"},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navi [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +"},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navi fa/Tampines Mall ta/Sentosa"},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"* *Select person* : `s INDEX` +"},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"e.g.`s 2`"},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `s task/ INDEX` +"},{"lineNumber":1436,"author":{"gitId":"Esilocke"},"content":"e.g.`s task/ 2`"},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as complete* : `stc INDEX` +"},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `stc 4`"},{"lineNumber":1439,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as incomplete* : `sti INDEX` +"},{"lineNumber":1440,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sti 5`"},{"lineNumber":1441,"author":{"gitId":"jeffreygohkw"},"content":"* *Assign to task* : `as PERSONINDEX... to/TASKINDEX` +"},{"lineNumber":1442,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `as 4 1 17 18 to/21`"},{"lineNumber":1443,"author":{"gitId":"jeffreygohkw"},"content":"* *Dismiss from task* : `ds PERSONINDEX... from/TASKINDEX` +"},{"lineNumber":1444,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `ds 4 1 from/17`"},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `va INDEX` +"},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"e.g. `va 1`"},{"lineNumber":1447,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `th THEME` +"},{"lineNumber":1448,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `th light`"},{"lineNumber":1449,"author":{"gitId":"jeffreygohkw"},"content":"* *History* : `h`"},{"lineNumber":1450,"author":{"gitId":"jeffreygohkw"},"content":"* *Undo* : `u`"},{"lineNumber":1451,"author":{"gitId":"jeffreygohkw"},"content":"* *Redo* : `r`"},{"lineNumber":1452,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `o`"},{"lineNumber":1453,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `sa`"},{"lineNumber":1454,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1455,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts"},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1457,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]"},{"lineNumber":1458,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[F1]"},{"lineNumber":1459,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]"},{"lineNumber":1460,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]"},{"lineNumber":1461,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":1462,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":1463,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":1464,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1465,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept"},{"lineNumber":1466,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary."},{"lineNumber":1467,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1468,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]"}],"authorContributionMap":{"charlesgoh":204,"jeffreygohkw":252,"Esilocke":668,"-":344}},{"path":"docs/team/JeffreyGoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Jeffrey Goh - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: ../images"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: ../stylesheets"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Project: Address++"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is a desktop address book application that aims to help users manage their contacts and their time. It is primarily targeted at students with projects, although it may be used in a wide variety of other settings as well. Users will be able to interact with it using a Command Line Interface, and it has a Graphic User Interface created with JavaFX."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/jeffreygohkw.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/jeffreygohkw.md[Test code]]"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Privacy of Fields"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior (Add and Edit Co-authored with Charles Goh)"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003daddprivacy]"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003deditprivacy]"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dchangeprivacy]"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dprivacylevel]"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"Users may have contacts that they would like to keep confidential or those that they do not feel comfortable displaying in public. Instead of removing the contact from the address book, setting a field to private allows users to choose exactly what information they would like to display and what they would like to hide."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"In addition, a private name cannot be searched for, and a private address cannot be used in the locate and navigate commands to prevent users from finding out the value of the private field."},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"Having a private field also doubles up as an extra layer of protection against unintentional modifications, as private fields cannot be edited without changing them back to public fields."},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"It may be inconvenient for a user to set a person\u0027s fields to public and back to private every time they would like to have a peek at the data that was hidden, or to set a person\u0027s every field to private if they want to hide them. Thus, having a command to change the privacy level of the address book will make it much more convenient for users to access private information."},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dprivacy]"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Locating a person\u0027s address"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dlocate]"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"While a person\u0027s phone and email address can be used directly, users often are unaware of where exactly their contacts\u0027 addresses are located in real life. The locate command aims to solve this problem by taking the address of a contact and searching for it on Google Maps. This allows the user to find out where exactly their contacts\u0027 addresses are located."},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dlocate]"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Navigating from one address to another"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dnavigate]"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"Locating a contact does not tell users how to arrive at that particular contact\u0027s address. Furthermore, users may face the scenario where they have to travel and meet different groups and different contacts throughout the day. The Navigate command allows users to find out the most efficient path from one address to another with the aid of Google Maps."},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"Users are able to utilize the addresses attached to a person, as well as those attached to a task, in the navigate command. They can also manually input addresses in the custom line if they are looking for directions to or from an address that is not presently stored inside the address book. This greatly enhances the flexibility of the command, and allows users to use the command without having to add a dummy task or person to store new addresses beforehand."},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dnavigate]"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Opening and Saving of the .xml save file"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopen]"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dsaveas]"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopensaveas]"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"Open and Save As will allow users to more easily manage their data. Open allows them to load their data from a .xml file, letting them easily work on multiple different address books. +"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"Save As allows users to save their address book data, letting it serve as backup or allowing them to be placed in a different location on the computer while still remaining operational. +"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"This also allows for easier transfers of save files between devices without having to manually drag and manage the save files to and from the folder where Address++ is located."},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"It can even potentially allow for syncing save files between devices if external software like Dropbox is used."},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dopensaveas]"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Other contributions"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":"* Add Menu Icons for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#10])"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"* Add Keyboard Shortcuts for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#11], https://github.com/CS2103AUG2017-W09-B2/main/pull/101[#101])"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"* Modified SortCommand to be undoable, and wrote test cases for it (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/29[#29], https://github.com/CS2103AUG2017-W09-B2/main/pull/30[#30])"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"* Created TaskAddress to store the address of tasks (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/129[#129], https://github.com/CS2103AUG2017-W09-B2/main/pull/132[#132])"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"* Added Travis, Coveralls and Appveyor links for Continuous Integration (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/4[#4], https://github.com/CS2103AUG2017-W09-B2/main/pull/22[#22])"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"* Performed Acceptance Testing for Team T16-B2 (Issue https://github.com/CS2103AUG2017-T16-B2/main/issues/102[#102])"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":"* Wrote some Manual Testing tests (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/162[#162], https://github.com/CS2103AUG2017-W09-B2/main/pull/165[#165])"}],"authorContributionMap":{"jeffreygohkw":159}},{"path":"docs/team/KelvinLin.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"\u003d Lin Ziwen Kelvin - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":":imagesDir: ../images"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":":stylesDir: ../stylesheets"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: AddressBook++"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/Esilocke.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/Esilocke.md[Test code]]"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Edit Tag"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittag]"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"#End of Extract#"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"The user may find a need to change the name of a particular name. +"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"In the context of the target user, suppose that a user wishes to change the tag `CS2103Groupmates` to `friends`, after he has completed the module. +"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"The user would need to delete the tag from all users who are tagged with `CS2103Groupmates`, and add the tag `friends` to them one-by-one. `edittag` thus aims to make this process faster by allowing users to rename all instances of the tag from the address book."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"The EditTagCommand iterates through each person in the UniquePersonList, and replaces the old tag, if found, with the new tag."},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Optional Data Input"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"Optional Data Input allows tasks and persons to have only one compulsory field, the name. All other fields in a person or task can be left unspecified, allowing for a greater range of inputs."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"We may not always have the opportunity to find contacts or tasks with complete information. +"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"This means that some contacts may not have an address, or email address, while some tasks may not have a deadline, or a description. Without Optional Data Input, the user would need to come up with random placeholder values for each prefix, which would greatly hinder user experience as the user would need to type in unnecessary values to satisfy the command format. +"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"Allowing optional data input thus lifts the restriction of making every field compulsory, and thus allows users to fill in a wider range of input."},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"When a user does not fill in a prefix for a particular field, the parser will create an object corresponding to the missing field with a placeholder value."},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"[source, java]"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"public Phone(String args) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ..."},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"public boolean isValidPhone(String args) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (args.equals(PHONE_PLACEHOLDER_VALUE) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" ..."},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"In addition, the isValid method is also updated to accept placeholder values as valid inputs."},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Tasks Management"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003daddtask]"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittask]"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003ddeletetask]"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dfindtask]"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dselecttask]"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dsetstate]"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dassignDismiss]"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dclear]"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"#End of Extract#"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"Our intended target audience are primarily NUS students, who are working on projects. In addition to managing their contact details, allowing users to manage their tasks would also greatly improve their user experience, as they would not need to keep track of their project deadlines separately."},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dtask]"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dassignDismiss]"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"#End of Extract#"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Other contributions"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* Conducted internal acceptance testing [https://github.com/CS2103AUG2017-W09-B2/main/issues/155[Issue #155]]"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"* Conducted Acceptance Testing for other teams [https://github.com/CS2103AUG2017-F09-B1/main/issues/83[F09-B1]] [https://github.com/CS2103AUG2017-F09-B1/main/issues/82[F09-B1]]"}],"authorContributionMap":{"charlesgoh":1,"Esilocke":114}},{"path":"docs/team/charlesgoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Charles Goh - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":":imagesDir: ../images"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":":stylesDir: ../stylesheets"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: Address++"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"Address++ is a desktop address book application that aims to provide students and"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"professionals with an effective tool to help them manage their contacts and their time."},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"This is a snapshot of our User Interface"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"My contributions to this project are listed below:"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/charlesgoh.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/charlesgoh.md[Test code]]"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Password Protection Commands `lock` `unlock` `changepassword`"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dpassword]"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"Many users have security related concerns. In order to slow malicious users from causing"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"damage to users\u0027 Address++ application, the password protection suite of commands were"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"created."},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dpassword]"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dsort]"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"As more contacts and tasks are added to the application, the lists may get long and disorganized. The Sort Command"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"allows users to sort both contacts and tasks by key fields. Examples include sorting contacts by name and"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"sorting contacts by deadlines."},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dbackup]"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"Users are able to back up their data before making any changes so that in the event of an"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"emergency (e.g. clearing all data and then closing afterwards), the old save data can be restored."},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dbackup]"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dfontsize]"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"Different monitors render the application differently. On some monitors, the words may appear to be too small. The font size"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"commands and buttons allow users to increase/decrease/reset the font sizes at any time when using the application."},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dfontsize]"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Avatar and Remark Fields"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior: Co-authored with Jeffrey Goh"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003davatar]"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":"Avatars and remarks help users to identify different contacts. It was also implemented with the intention of making the application"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"more user friendly."},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation for Avatar Field"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003davatar]"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Other contributions"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":"* Added tests for task related implementations (https://github.com/CS2103AUG2017-W09-B2/main/pull/115/files[#115]) +"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":"* Conducted Acceptance Testing for another team [https://github.com/CS2103AUG2017-W09-B4/main/issues/77[W09-B4]]"}],"authorContributionMap":{"charlesgoh":162}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 5, 0, false);"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());"},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book."},{"lineNumber":88,"author":{"gitId":"-"},"content":" */"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");"},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null."},{"lineNumber":117,"author":{"gitId":"-"},"content":" */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;"},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());"},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \""},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");"},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;"},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \""},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");"},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":169,"author":{"gitId":"-"},"content":" }"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(model.getUserPrefs());"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private String appTitle \u003d \"Address++\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well."},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/"},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;"},{"lineNumber":13,"author":{"gitId":"-"},"content":" }"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BackupRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * An Event for backing up of data to a selected location."},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class BackupRequestEvent extends BaseEvent {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private Model model;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private String args;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public BackupRequestEvent(Model model, String args) {"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public Model getModel() {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" return model;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public void setModel(Model model) {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public String getArgs() {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" return args;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void setArgs(String args) {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String toString() {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelNavigateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelNavigateEvent extends BaseEvent {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" private final Location fromLocation;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final Location toLocation;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelNavigateEvent(Location fromLocation, Location toLocation) {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.fromLocation \u003d fromLocation;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.toLocation \u003d toLocation;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Location getFromLocation() {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" return fromLocation;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Location getToLocation() {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" return toLocation;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":33}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeFontSizeEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a font size change triggered by a command or the UI"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"public class ChangeFontSizeEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static int increaseSizeEventIndex \u003d 0;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static int decreaseSizeEventIndex \u003d 1;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static int resetSizeEventIndex \u003d 2;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private int triggerOption;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public ChangeFontSizeEvent(int triggerOption) {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public String toString() {"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" return \"New Event: Font size change\";"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static int getIncreaseSizeEventIndex() {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" return increaseSizeEventIndex;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public static int getDecreaseSizeEventIndex() {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return decreaseSizeEventIndex;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static int getResetSizeEventIndex() {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return resetSizeEventIndex;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public int getTriggerOption() {"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return triggerOption;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public void setTriggerOption(int triggerOption) {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangeThemeRequestEvent extends BaseEvent {"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" private final String styleSheet;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public ChangeThemeRequestEvent(String styleSheet) {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" this.styleSheet \u003d styleSheet;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public String getStyleSheet() {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return styleSheet;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/commons/events/ui/JumpToListRequestTaskEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Indicates a request to jump to the list of tasks"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class JumpToListRequestTaskEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public final int targetIndex;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public JumpToListRequestTaskEvent(Index targetIndex) {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" //TODO optimize this class"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex.getZeroBased();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user."},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution."},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();"},{"lineNumber":31,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model) {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.history \u003d new CommandHistory();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" this.addressBookParser \u003d new AddressBookParser();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");"},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" return result;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" } finally {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" history.add(commandText);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":12,"Esilocke":8,"-":49}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that adds an object to the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class AddCommand extends UndoableCommand {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/AddPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Adds a person to the address book."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"John Doe \""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"98765432 \""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johnd@example.com \""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + PREFIX_REMARK + \"Sells sea shells on the sea shore \""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + PREFIX_AVATAR + \"avatar-filepath.png\""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"friends \""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"owesMoney\";"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public AddPersonCommand(ReadOnlyPerson person) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddPersonCommand)) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assert (((AddPersonCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddPersonCommand) other).personToAdd);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":73}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book."},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends AddCommand {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all \""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" + \"target persons in the current list.\";"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":126}},{"path":"src/main/java/seedu/address/logic/commands/AddTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \": Adds a task to the address book. \""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS]\\n\""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"12 Kent Ridge Crescent, 119275\";"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New task added: \\n%1$s\";"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Creates an AddTaskCommand to add the specified {@code ReadOnlyTask}"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public AddTaskCommand(ReadOnlyTask task) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" super();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddTaskCommand)) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assert (taskToAdd !\u003d null);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert (((AddTaskCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddTaskCommand) other).taskToAdd);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":70}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location."},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \"MyBackUpFile\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" super();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new BackupRequestEvent(model, args));"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/logic/commands/ChangePasswordCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Changes user\u0027s password provided old password is correct and new passwords match."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommand extends Command {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"changepassword\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"cpw\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Password changed successfully\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes user password. \\n\""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"NEWPASSWORD \""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"CONFIRMPASSWORD \\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\";"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_OLD_NEW_PS_SAME \u003d \"New password must be different from your old password\";"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ERROR_OCCURED \u003d \"An error occured. Please try again.\\n\";"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Your password is incorrect. Please try again.\\n\";"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_CONFIRMATION_INCORRECT \u003d \"Your new password and confirmation password \""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" + \"do not match. Please try again\\n\";"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(ChangePasswordCommand.class);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private String oldPassword;"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private String newPassword;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" private String confirmationPassword;"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" * Takes in old password, new password and confirmation password from parser and creates a new"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * ChangePasswordCommand object"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param oldPassword"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" * @param newPassword"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" * @param confirmPassword"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand(String oldPassword, String newPassword, String confirmPassword) {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.oldPassword \u003d oldPassword;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" this.newPassword \u003d newPassword;"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.confirmationPassword \u003d confirmPassword;"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes string using SHA256 encryption and returns hashed string"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * @param argument"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" private String forwardHash(String argument) {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(argument, StandardCharsets.UTF_8).toString();"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes the user input password and checks if it matches with the encrypted password saved"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldPasswordCorrect() {"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String forwardHashedInputPassword \u003d forwardHash(oldPassword);"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" String forwardHashActualPassword;"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" forwardHashActualPassword \u003d userPrefs.getAddressBookEncryptedPassword();"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" if (forwardHashActualPassword.equals(forwardHashedInputPassword)) {"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Actual password and input password matches\");"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return true;"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Actual password and input password do not match\");"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" return false;"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Takes new input passwords and checks them against one another."},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" private boolean isNewPasswordInputsSame() {"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return newPassword.equals(confirmationPassword);"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Checks if old password and new password are the same"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldAndNewPasswordTheSame() {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return oldPassword.equals(newPassword);"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" // Case where old password is incorrect"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" if (!isOldPasswordCorrect()) {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Password is incorrect. Note: Default password is \u0027password\u0027 \");"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Case where new password and confirmation password do not match"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" if (!isNewPasswordInputsSame()) {"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"New password and confirmation password do not match\");"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_CONFIRMATION_INCORRECT);"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" // Case where old and new passwords are the same"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" if (isOldAndNewPasswordTheSame()) {"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Old password and new password cannot be the same\");"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_OLD_NEW_PS_SAME);"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Case where user input passes both checks. Password is changed and UserPrefs saved"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs;"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" // Get user prefs file"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d model.getUserPrefs();"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set new password to user prefs"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(newPassword);"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" // Logs new password and saved password for debugging purposes"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String hashedNewPassword \u003d forwardHash(newPassword);"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" String userPrefsHashedPassword \u003d userPrefs.getAddressBookEncryptedPassword();"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New Password: \" + newPassword"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted New Password: \" + hashedNewPassword"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted Password From UserPrefs:\" + userPrefsHashedPassword"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" + \"\\nCommand\u0027s Password and UserPrefs saved password matches: \""},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + Boolean.toString(hashedNewPassword.equals(userPrefsHashedPassword)) + \"\\n\");"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" // Return command result"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":142}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_AVATAR + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD + \" \""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_AVATAR + FALSE_WORD;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d null;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(model.getPrivacyLevel());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Person must have all fields initialised.\");"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps)"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Name name \u003d createNameWithPrivacy(person, pps);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone \u003d createPhoneWithPrivacy(person, pps);"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" Email email \u003d createEmailWithPrivacy(person, pps);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Address address \u003d createAddressWithPrivacy(person, pps);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark \u003d createRemarkWithPrivacy(person, pps);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar \u003d person.getAvatar();"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" Boolean favourite \u003d person.getFavourite();"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tag \u003d person.getTags();"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tag);"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Name) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Name) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return name;"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createPhoneWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getPhone().getIsPrivate()) {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(false);"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(true);"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Phone\");"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(pps.getPhoneIsPrivate());"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(person.getPhone().getIsPrivate());"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return phone;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createEmailWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getEmail().getIsPrivate()) {"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(false);"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(true);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Email\");"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(pps.getEmailIsPrivate());"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(person.getEmail().getIsPrivate());"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return email;"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createAddressWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(false);"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(true);"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Address\");"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(pps.getAddressIsPrivate());"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(person.getAddress().getIsPrivate());"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" return address;"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createRemarkWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getRemark().getIsPrivate()) {"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(false);"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(true);"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Remark\");"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(pps.getRemarkIsPrivate());"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(person.getRemark().getIsPrivate());"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return remark;"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return index;"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person."},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {"},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}"},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {"},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;"},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;"},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;"},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null."},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;"},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":359,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":360,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":361,"author":{"gitId":"charlesgoh"},"content":" * Returns the value of remarkIsPrivate"},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" public Boolean getRemarkIsPrivate() {"},{"lineNumber":364,"author":{"gitId":"charlesgoh"},"content":" return remarkIsPrivate;"},{"lineNumber":365,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":366,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":367,"author":{"gitId":"charlesgoh"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {"},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remarkIsPrivate);"},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;"},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":371,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":372,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {"},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;"},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())"},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())"},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())"},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())"},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());"},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":381}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Clears all entries in the address book."},{"lineNumber":11,"author":{"gitId":"-"},"content":" */"},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/ClearPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the contacts in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommand extends ClearCommand {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All contacts have been cleared!\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_PERSON);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/ClearTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the tasks in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommand extends ClearCommand {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All tasks have been cleared!\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_TASK);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public abstract class Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" protected CommandHistory history;"},{"lineNumber":17,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons."},{"lineNumber":21,"author":{"gitId":"-"},"content":" *"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed"},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks."},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message."},{"lineNumber":41,"author":{"gitId":"-"},"content":" *"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command."},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * access to the dependencies."},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that deletes an object from the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class DeleteCommand extends UndoableCommand {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/DeletePersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Deletes a person from the address book."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommand extends DeleteCommand {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person identified by the index number used in the last listing.\\n\""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Person: %1$s\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand(Index targetIndex) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size()) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToDelete));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeletePersonCommand // instanceof handles nulls"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeletePersonCommand) other).targetIndex)); // state check"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book."},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends DeleteCommand {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"The target persons do not have input tags.\";"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons."},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list."},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":125}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a task from the address book."},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommand extends DeleteCommand {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the task identified by the index number used in the last listing.\\n\""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Task: %1$s\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand(Index targetIndex) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToDelete));"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeleteTaskCommand // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteTaskCommand) other).targetIndex)); // state check"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":56}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends UndoableCommand {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + \"TASK \";"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" if (!personsToDismiss.contains(toDismiss)) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":89}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that edits an object in the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class EditCommand extends UndoableCommand {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";"},{"lineNumber":11,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/EditPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * Edits a person in the address book."},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommand extends EditCommand {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last person listing. \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"91234567 \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Person: \\n%1$s\";"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static boolean areFieldsAllPrivate \u003d true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final EditPersonDescriptor editPersonDescriptor;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private final Index index;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * @param index of the person in the filtered person list to edit"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * @param editPersonDescriptor details to edit the person with"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand(Index index, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editPersonDescriptor);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" editedPerson.setPrivacyLevel(model.getPrivacyLevel());"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}."},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" updatedAvatar \u003d createUpdatedAvatar(personToEdit, editPersonDescriptor);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedAvatar, updatedTags);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().getIsPrivate()) {"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().getIsPrivate()) {"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().getIsPrivate()) {"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().getIsPrivate()) {"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" //**author charlesgoh"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().getIsPrivate()) {"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Avatar) for use in createEditedPerson"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Avatar) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar createUpdatedAvatar(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAvatar().isPresent()) {"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAvatar;"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" //author"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());"},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonCommand)) {"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand e \u003d (EditPersonCommand) other;"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the person."},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" public static class EditPersonDescriptor {"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" private Name name;"},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" private Phone phone;"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" private Email email;"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" private Address address;"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" private Boolean favourite;"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" private Remark remark;"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" private Avatar avatar;"},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" private Set\u003cTag\u003e tags;"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor() {}"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" this.name \u003d toCopy.name;"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d toCopy.phone;"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" this.email \u003d toCopy.email;"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" this.address \u003d toCopy.address;"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" this.favourite \u003d toCopy.favourite;"},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d toCopy.remark;"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d toCopy.avatar;"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d toCopy.tags;"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited."},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark,"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" this.avatar, this.tags);"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" public void setName(Name name) {"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":" this.name \u003d name;"},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cName\u003e getName() {"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(name);"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d phone;"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPhone\u003e getPhone() {"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(phone);"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void setEmail(Email email) {"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" this.email \u003d email;"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cEmail\u003e getEmail() {"},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(email);"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" public void setAddress(Address address) {"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" this.address \u003d address;"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAddress\u003e getAddress() {"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(address);"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":368,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":369,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":370,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;"},{"lineNumber":371,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":372,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {"},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);"},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":376,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d remark;"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cRemark\u003e getRemark() {"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(remark);"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" public void setAvatar(Avatar avatar) {"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d avatar;"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAvatar\u003e getAvatar() {"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(avatar);"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d tags;"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(tags);"},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonDescriptor)) {"},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" return getName().equals(e.getName())"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar())"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTags().equals(e.getTags());"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":190,"Esilocke":227,"wangyiming1019":9}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends EditCommand {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \": Edits the specified tag \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/EditTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Edits a task in the address book."},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommand extends EditCommand {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \": Edits the details of the task identified \""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Task: \\n%1$s\";"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private final Index index;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand(Index index, EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownTaskList.size()) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedTask));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * edited with {@code editTaskDescriptor}."},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assert taskToEdit !\u003d null;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" TaskName updatedTaskName;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Description updatedDescription;"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" Deadline updatedDeadline;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Priority updatedPriority;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Assignees assignees;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" Boolean updatedState;"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" TaskAddress updatedTaskAddress;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // You cannot edit assignees or state using edit command"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assignees \u003d taskToEdit.getAssignees();"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" updatedState \u003d taskToEdit.getCompleteState();"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress \u003d editTaskDescriptor.getTaskAddress().orElse(taskToEdit.getTaskAddress());"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState,"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress);"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskCommand)) {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand e \u003d (EditTaskCommand) other;"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task."},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private Description description;"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" private Priority priority;"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" private TaskAddress taskAddress;"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d toCopy.taskAddress;"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited."},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority,"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" this.taskAddress);"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d taskAddress;"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskAddress\u003e getTaskAddress() {"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskAddress);"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority())"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTaskAddress().equals(e.getTaskAddress());"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":224}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getAddress(), true,"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getTags());"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToFavourite, editedPerson);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that finds objects in the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class FindCommand extends Command {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/FindPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" * Finds people in the address book."},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommand extends FindCommand {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand(NameContainsKeywordsPredicate predicate) {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindPersonCommand"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personPredicate.equals(((FindPersonCommand) other).personPredicate);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":32}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords."},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive."},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends FindCommand {"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" + \": Finds all persons whose tags contain any of \""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" friends colleagues\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/FindTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Finds tasks in the address book."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommand extends FindCommand {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \": Finds all tasks whose names or descriptions \""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]... [p/MINIMUM_PRIORITY] [done/TASK_STATE]\\n\""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_COMPLETE_VALUE \u003d \"The task status should either be \u0027true\u0027 or \u0027false\u0027\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PRIORITY \u003d \"The specified priority should be an integer from 1 to 5\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand(TaskContainsKeywordPredicate predicate) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindTaskCommand"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskPredicate.equals(((FindTaskCommand) other).taskPredicate);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/commands/FontSizeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 5;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"fontsize\";"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"fs\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String INCREASE_SIZE_PARAMETER \u003d \"increase\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String DECREASE_SIZE_PARAMETER \u003d \"decrease\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String RESET_SIZE_PARAMETER \u003d \"reset\";"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" INCREASE_SIZE_PARAMETER, DECREASE_SIZE_PARAMETER, RESET_SIZE_PARAMETER));"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Increases, decreases or resets font sizes \\n\""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [OPTION]\\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" increase\\n\""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" reset\\n\";"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\" + MESSAGE_USAGE;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_INCREASE_FONT \u003d \"Font size increased successfully\";"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_DECREASE_FONT \u003d \"Font size decreased successfully\";"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_RESET_FONT \u003d \"Font size reset successfully\";"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" private final String option;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand(String option) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.option \u003d option;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getOption() {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return this.option;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" switch (option) {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" case INCREASE_SIZE_PARAMETER:"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_INCREASE_FONT);"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" case DECREASE_SIZE_PARAMETER:"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_DECREASE_FONT);"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" case RESET_SIZE_PARAMETER:"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_RESET_FONT);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" System.err.println(\"Parameter is invalid\");"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_INVALID_INPUT + MESSAGE_USAGE);"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":68}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person at Index: %1$s\";"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_ADDRESS_FAILURE \u003d \"Person %1$s has no Address\";"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().getIsPrivate()) {"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().toString().equals(\"\")) {"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_NO_ADDRESS_FAILURE, targetIndex.getOneBased()));"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":62}},{"path":"src/main/java/seedu/address/logic/commands/LockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class LockCommand extends Command {"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"lock\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"lk\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Locks the application. \""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ locked successfully\";"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public LockCommand(String password) {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs."},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to lock"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/NavigateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Navigates from one address to another with the help of Google Maps"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"navigate\";"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"nav\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" + \": Get directions from one address to another.\\n\""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three)\""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \" AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three)\\n\""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" fp/2 ta/University Town\";"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NAVIGATE_SUCCESS \u003d \"Navigating from %1$s to %2$s\";"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_FROM_ERROR \u003d \"Only one type of From prefix allowed.\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_TO_ERROR \u003d \"Only one type of To prefix allowed.\";"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR \u003d \"Address of the Person at index %1$s is private.\";"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR \u003d \"Person at index %1$s does not have an address.\";"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_HAS_NO_ADDRESS_ERROR \u003d \"Task at index %1$s does not have an address.\";"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationFrom;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationTo;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private final Index fromIndex;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private final Index toIndex;"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean fromIsTask;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean toIsTask;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d null;"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d null;"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" checkDuplicateFromAndToLocation(locationFrom, locationTo, fromIndex, toIndex);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null) {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null) {"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" this.locationFrom \u003d from;"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" this.locationTo \u003d to;"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" this.toIndex \u003d toIndex;"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIndex \u003d fromIndex;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" this.toIsTask \u003d toIsTask;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIsTask \u003d fromIsTask;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Throws an IllegalArgumentException if there is both locationFrom and fromIndex are not null,"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * or if both locationTo and toIndex are not null."},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo,"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" Index fromIndex, Index toIndex) throws IllegalArgumentException {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" Location from;"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" Location to;"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" if (fromIndex !\u003d null) {"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" if (toIndex !\u003d null) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d setLocationByIndex(toIndex, toIsTask);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelNavigateEvent(from, to));"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_NAVIGATE_SUCCESS, from, to));"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationFrom() {"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" return locationFrom;"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationTo() {"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" return locationTo;"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" public Index getFromIndex() {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" return fromIndex;"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" public Index getToIndex() {"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" return toIndex;"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isFromIsTask() {"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return fromIsTask;"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isToIsTask() {"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" return toIsTask;"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NavigateCommand // instanceof handles nulls"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationFrom(other)"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationTo(other)"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIndex(other)"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIndex(other)"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIsTask(other)"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIsTask(other)); // state check"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationFrom) of this object is equal to that of the other Object"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationFrom(Object other) {"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationFrom \u003d\u003d null) {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationFrom \u003d\u003d null;"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationFrom.equals(((NavigateCommand) other).locationFrom);"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationTo) of this object is equal to that of the other Object"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationTo(Object other) {"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationTo \u003d\u003d null) {"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationTo \u003d\u003d null;"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationTo.equals(((NavigateCommand) other).locationTo);"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIndex) of this object is equal to that of the other Object"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIndex(Object other) {"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" if (this.fromIndex \u003d\u003d null) {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).fromIndex \u003d\u003d null;"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIndex.equals(((NavigateCommand) other).fromIndex);"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIndex) of this object is equal to that of the other Object"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIndex(Object other) {"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" if (this.toIndex \u003d\u003d null) {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).toIndex \u003d\u003d null;"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIndex.equals(((NavigateCommand) other).toIndex);"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIsTask) of this object is equal to that of the other Object"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIsTask(Object other) {"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIsTask \u003d\u003d (((NavigateCommand) other).fromIsTask);"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIsTask) of this object is equal to that of the other Object"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIsTask(Object other) {"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIsTask \u003d\u003d (((NavigateCommand) other).toIsTask);"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":224}},{"path":"src/main/java/seedu/address/logic/commands/OpenCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommand extends Command {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"open\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"o\";"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String OPEN_COMMAND_SUCCESS \u003d \"Successfully opened file.\";"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new OpenRequestEvent());"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(OPEN_COMMAND_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/PrivacyLevelCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Handles the changing of Privacy Levels in the address book"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"privacylevel\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"pl\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String CHANGE_PRIVACY_LEVEL_SUCCESS \u003d \"Successfully changed privacy level to %1$s.\";"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String WRONG_PRIVACY_LEVEL_MESSAGE \u003d \"Privacy Level can only be 1, 2 or 3\";"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MIN_PRIVACY_LEVEL \u003d 1;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MAX_PRIVACY_LEVEL \u003d 3;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \": Changes the privacy level of the address book. Level 1 shows all data, level 2 hides private fields\""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" + \" and level 3 hides persons with at least 1 private field.\\n\""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: LEVEL (must be 1, 2 or 3)\\n\""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final int level;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand(int level) {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.level \u003d level;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public int getLevel() {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return level;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof PrivacyLevelCommand // instanceof handles nulls"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.level \u003d\u003d ((PrivacyLevelCommand) other).level); // state check"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":77}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SaveAsCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data to a new save file at a desired location"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommand extends Command {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"save\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"sa\";"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String SAVE_AS_COMMAND_SUCCESS \u003d \"Successfully saved file.\";"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new SaveAsRequestEvent());"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(SAVE_AS_COMMAND_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that selects an object in the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class SelectCommand extends Command {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/SelectPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Selects a person in the address book and loads the view panel for that person."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommand extends SelectCommand {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Person: %1$s\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand(Index targetIndex) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectPersonCommand // instanceof handles nulls"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectPersonCommand) other).targetIndex)); // state check"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":47}},{"path":"src/main/java/seedu/address/logic/commands/SelectTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * Selects a task in the address book and loads the view panel for that task."},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommand extends SelectCommand {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \": Selects the task identified by the index number used in the last task listing.\\n\""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Task: %1$s\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand(Index targetIndex) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownTaskList.size()) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestTaskEvent(targetIndex));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectTaskCommand // instanceof handles nulls"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectTaskCommand) other).targetIndex)); // state check"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":49}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as complete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as incomplete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_LIST_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"person\", \"task\"));"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\", \"priority\", \"deadline\"));"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons or all tasks by chosen \""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive\\n\""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [LIST] [FIELD] [ORDER]\\n\""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" person email desc\\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_WORD + \" task deadline desc\\n\";"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Person Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Task Field Values: DEADLINE, PRIORITY\\n\""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_PERSONS \u003d \"All persons in address book successfully sorted\";"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_TASKS \u003d \"All tasks in address book successfully sorted\";"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" private final String list;"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private final String field;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private final String order;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String list, String field, String order) {"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" this.list \u003d list;"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * Checks if argument command has the same parameter properties"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param commandB"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public boolean sameCommandAs(SortCommand commandB) {"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return commandB.getList().equals(this.list) \u0026\u0026 commandB.getField()"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .equals(this.field) \u0026\u0026 commandB.getOrder().equals(this.order);"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public String getField() {"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" return this.field;"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" return this.order;"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public String getList() {"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" return this.list;"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" if (this.list.equals(ACCEPTED_LIST_PARAMETERS.get(0))) {"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_PERSONS);"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" model.sortTasks(getField(), getOrder());"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_TASKS);"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":2}},{"path":"src/main/java/seedu/address/logic/commands/TagListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * List all tags in the address book to the user"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommand extends Command {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showtag\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"stag\";"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAILURE \u003d \"There is no tag!\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All the tags are here: \";"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(displayTags());"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * display all the tags to user"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * @return String displayTags"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String displayTags() {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" String displayTags;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e tagList \u003d getAllTagsInAddressBook();"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" if (tagList.isEmpty()) {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_FAILURE;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_SUCCESS + convertTagToString(tagList);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return displayTags;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * get all the tags in the address book without duplication"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" * @return allTagList"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" private ArrayList\u003cTag\u003e getAllTagsInAddressBook() {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e allTagList \u003d new ArrayList\u003cTag\u003e();"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" if (!allTagList.contains(tag)) {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" allTagList.add(tag);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" return allTagList;"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" * convert a list of tags to a String"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * @return String tags"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ArrayList\u003cTag\u003e tagList) {"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagNameList \u003d new ArrayList\u003cString\u003e();"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : tagList) {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" tagNameList.add(tag.getTagName());"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Collections.sort(tagNameList);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder tagNameString \u003d new StringBuilder();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" for (String tagName : tagNameList) {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" tagNameString.append(\"\u003c\").append(tagName).append(\"\u003e \");"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" return tagNameString.toString().trim();"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/ThemeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommand extends Command {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"theme\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"th\";"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" + \": Sets the theme based on the specified style.\\n\""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: STYLE\\n\""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" dark\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_CHANGE_SUCCESS \u003d \"Theme Changed to: %1$s\";"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_NOT_AVAILABLE \u003d \"Theme %1$s is not available.\";"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_IN_USE \u003d \"Theme %1$s is currently in use.\";"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private final String style;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand (String style) {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" this.style \u003d style;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return style;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ThemeCommand // instanceof handles nulls"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.style.equals(((ThemeCommand) other).style)); // state check"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":64}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToUnfavourite.getName(),"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getPhone(), personToUnfavourite.getEmail(),"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getAddress(), false,"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getRemark(), personToUnfavourite.getAvatar(),"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getTags());"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToUnfavourite, editedPerson);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/UnlockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommand extends Command {"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"unlock\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"ul\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Unlocks the application. \""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ unlocked successfully\";"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand(String password) {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs."},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to unlocked"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/ViewAssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Displays a list of all persons assigned to a specified task"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"viewassign\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"va\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Shows all persons assigned to a task\\n\""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index taskIndex;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand(Index taskIndex) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToFind \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.viewAssignees(taskToFind);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" || other instanceof ViewAssignCommand"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((ViewAssignCommand) other).taskIndex);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":48}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object"},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution."},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK, PREFIX_TAG_FULL)) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d AddTaskCommandParser.constructTask(args);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new AddTaskCommand(taskToAdd);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TAG_FULL)) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AddTagCommandParser().parse(filteredArgs);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d AddPersonCommandParser.constructPerson(args);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new AddPersonCommand(personToAdd);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":28,"-":23}},{"path":"src/main/java/seedu/address/logic/parser/AddPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR_PRIVATE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ReadOnlyPerson object in the context of AddPersonCommand."},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"public class AddPersonCommandParser extends AddCommandParser {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided."},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static ReadOnlyPerson constructPerson(String args) throws ParseException {"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_AVATAR, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_AVATAR_PRIVATE);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d makeName(argMultimap);"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d makePhone(argMultimap);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d makeEmail(argMultimap);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d mmakeAddress(argMultimap);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d makeAvatar(argMultimap);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d makeRemark(argMultimap);"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, avatar, tagList);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Name based on the input arguments"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static Name makeName(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return name;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Phone based on the input arguments"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone makePhone(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)) {"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(null);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" return phone;"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Email based on the input arguments"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" private static Email makeEmail(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)) {"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(null);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" return email;"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Address based on the input arguments"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" private static Address mmakeAddress(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)) {"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(null);"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return address;"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Avatar based on the input arguments"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar makeAvatar(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_AVATAR))) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).get();"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d new Avatar(null);"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return avatar;"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Remark based on the input arguments"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark makeRemark(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)) {"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(null);"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return remark;"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":164,"Esilocke":2}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser extends AddCommandParser {"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution."},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" protected static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/parser/AddTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ReadOnlyTask object in the context of AddTaskCommand."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParser extends AddCommandParser {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyTask from the arguments provided."},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static ReadOnlyTask constructTask(String args) throws ParseException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY,"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" PREFIX_ADDRESS, PREFIX_TASK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" TaskName name;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Description description;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Priority priority;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" TaskAddress address;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" description \u003d arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION)"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get()"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" : new Description(null);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" deadline \u003d arePrefixesPresent(argMultimap, PREFIX_DEADLINE)"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get()"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" : new Deadline(null);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" priority \u003d arePrefixesPresent(argMultimap, PREFIX_PRIORITY)"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get()"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" : new Priority(null);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" address \u003d arePrefixesPresent(argMultimap, PREFIX_ADDRESS)"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS)).get()"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" : new TaskAddress(null);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, address);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":67}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":"public class AddressBookParser {"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_NO_ACCESS \u003d \"Not allowed! You must unlock before\""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" + \" making any changes.\\n\" + UnlockCommand.MESSAGE_USAGE;"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args."},{"lineNumber":58,"author":{"gitId":"-"},"content":" */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Parses user input into command for execution."},{"lineNumber":65,"author":{"gitId":"-"},"content":" *"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @param userInput full user input string"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @return the command based on the user input"},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // Check lock state"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Parsing command. Lock state is currently: \" + Boolean.toString(lockState));"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());"},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");"},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" Command result \u003d processNonCrudCommands(commandWord, arguments);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" if (result !\u003d null) {"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" return result;"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // Test for lock. If locked, return no access message"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" if (lockState) {"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(MESSAGE_NO_ACCESS);"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_WORD:"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_ALIAS:"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommandParser().parse(arguments);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_WORD:"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_ALIAS:"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommandParser().parse(arguments);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:"},{"lineNumber":120,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:"},{"lineNumber":132,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_WORD:"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_ALIAS:"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" return new TagListCommand();"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":154,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:"},{"lineNumber":156,"author":{"gitId":"-"},"content":" return new HistoryCommand();"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:"},{"lineNumber":160,"author":{"gitId":"-"},"content":" return new UndoCommand();"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:"},{"lineNumber":164,"author":{"gitId":"-"},"content":" return new RedoCommand();"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_WORD:"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_ALIAS:"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommandParser().parse(arguments);"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_WORD:"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_ALIAS:"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommandParser().parse(arguments);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":179,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" * Checks for non crud command words or aliases and returns the relevant commmand if there is one."},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" * Otherwise control is returned back to the original parseCommand method."},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" * Note: Code was refactored due to codacy\u0027s recommendation that there was a problem with parseCommand\u0027s"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" * NPath complexity (i.e. it the code was too long. Makes it less readable and prone to errors)"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" * @param commandWord"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" * @param arguments"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" private Command processNonCrudCommands(String commandWord, String arguments) throws ParseException {"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality and for locking and unlocking"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_WORD:"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_ALIAS:"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return new OpenCommand();"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_WORD:"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_ALIAS:"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" return new SaveAsCommand();"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return new ExitCommand();"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" return new HelpCommand();"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_WORD:"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_ALIAS:"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return new SelectCommandParser().parse(arguments);"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_WORD:"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_ALIAS:"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" return new LocateCommandParser().parse(arguments);"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_WORD:"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_ALIAS:"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" return new NavigateCommandParser().parse(arguments);"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_WORD:"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_ALIAS:"},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommandParser().parse(arguments);"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_WORD:"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_ALIAS:"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return new LockCommandParser().parse(arguments);"},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_WORD:"},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_ALIAS:"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommandParser().parse(arguments);"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" return new ListCommand();"},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" return null;"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":249,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":106,"jeffreygohkw":19,"Esilocke":25,"wangyiming1019":29,"-":70}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * filepath."},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 1;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Parses the given user input and backs up data into a separate file name."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @param userInput"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ChangePasswordCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new ChangePassword object"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandParser implements Parser\u003cChangePasswordCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePasswordCommand"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a ChangePasswordCommand object for execution."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" .tokenize(args, PREFIX_PASSWORD, PREFIX_NEW_PASSWORD, PREFIX_CONFIRM_PASSWORD);"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" // Check and split arguments before passing them to ChangePasswordCommand"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_NEW_PASSWORD).isPresent()"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).isPresent()) {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException("},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String password \u003d argMultimap.getValue(PREFIX_PASSWORD).get();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String newPassword \u003d argMultimap.getValue(PREFIX_NEW_PASSWORD).get();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" String confirmPassword \u003d argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).get();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommand(password, newPassword, confirmPassword);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":38}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePrivacyCommand"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ChangePrivacyCommand object for execution."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ClearCommand object"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser implements Parser\u003cClearCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearPersonCommand();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new ClearTaskCommand();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person/\");"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TAG_FULL \u003d new Prefix(\"tag/\");"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"v/\");"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR_PRIVATE \u003d new Prefix(\"pv/\");"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task/\");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"p/\");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_STATE \u003d new Prefix(\"done/\");"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_PERSON \u003d new Prefix(\"fp/\");"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_TASK \u003d new Prefix(\"ft/\");"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_ADDRESS \u003d new Prefix(\"fa/\");"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_PERSON \u003d new Prefix(\"tp/\");"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_TASK \u003d new Prefix(\"tt/\");"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_ADDRESS \u003d new Prefix(\"ta/\");"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_NEW_PASSWORD \u003d new Prefix(\"np/\");"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_CONFIRM_PASSWORD \u003d new Prefix(\"cfp/\");"},{"lineNumber":45,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":14,"Esilocke":9,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommandParser().parse(filteredString);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return new DeleteTagCommandParser().parse(filteredArgs);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommandParser().parse(args);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/DeletePersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParser extends DeleteCommandParser {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand."},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand parse(String args) throws ParseException {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommand(index);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution."},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":69}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParser {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object in the context of DeleteTaskCommand."},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand parse(String args) throws ParseException {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommand(index);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object"},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" requireNonNull(args);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommandParser().constructTaskDescriptor(filteredArgs);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(filteredArgs);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommandParser().constructPersonDescriptor(args);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":16,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/EditPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditPersonCommand object"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParser extends EditCommandParser {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditPersonCommand that edits a Person object. **/"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand constructPersonDescriptor(String args) throws ParseException {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" PREFIX_REMARK, PREFIX_AVATAR, PREFIX_TAG);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.EditPersonDescriptor editPersonDescriptor \u003d new EditPersonCommand.EditPersonDescriptor();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).ifPresent(editPersonDescriptor::setAvatar);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommand(index, editPersonDescriptor);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty."},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * {@code Set\u003cTag\u003e} containing zero tags."},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert tags !\u003d null;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (tags.isEmpty()) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return Optional.empty();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":74}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditTagCommand"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * and returns an EditTagCommand object for execution."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return tagList;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/logic/parser/EditTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditTaskCommand object"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParser extends EditCommandParser {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditTaskCommand that edits a Task object. **/"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand constructTaskDescriptor(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY, PREFIX_ADDRESS);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor editTaskDescriptor \u003d new EditTaskCommand.EditTaskDescriptor();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS))"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setTaskAddress);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommand(index, editTaskDescriptor);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommandParser().parse(args);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new FindTagCommandParser().parse(filteredArgs);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommandParser().parse(args);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/FindPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindPersonCommand object"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParser extends FindCommandParser {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindPersonCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an FindPersonCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindPersonCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/FindTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_STATE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindTaskCommand object"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandParser extends FindCommandParser {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindTaskCommand"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * and returns an FindTaskCommand object for execution."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand parse(String args) throws ParseException {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(argsWithNoTaskPrefix, PREFIX_PRIORITY, PREFIX_STATE);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String keywords \u003d argMultimap.getPreamble();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d keywords.trim();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityFindRequired \u003d argMultimap.getValue(PREFIX_PRIORITY).isPresent();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" boolean isStateFindRequired \u003d argMultimap.getValue(PREFIX_STATE).isPresent();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" int minPriority \u003d 0;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" boolean isComplete \u003d false;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (isPriorityFindRequired) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" minPriority \u003d parsePriority(argMultimap.getValue(PREFIX_PRIORITY).get());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" if (isStateFindRequired) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" isComplete \u003d parseState(argMultimap.getValue(PREFIX_STATE).get());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords),"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" isStateFindRequired, isPriorityFindRequired, isComplete, minPriority));"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns an integer corresponding to its value"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Guarantees: The specified value is valid as a priority value"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private int parsePriority(String args) throws ParseException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(Priority.MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" int priority;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.parseInt(args.trim());"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (priority \u003c 1 || priority \u003e 5) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return priority;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns a boolean value corresponding to its value"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" private boolean parseState(String args) throws ParseException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" if (\"true\".equals(trimmed) || \"false\".equals(trimmed)) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return Boolean.valueOf(trimmed);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_COMPLETE_VALUE);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/logic/parser/FontSizeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParser implements Parser\u003cFontSizeCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final int PARAMETER_POSITION \u003d 0;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the FontSizeCommand"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a FontSizeCommand object for execution."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 1) {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" if (!FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])) {"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, FontSizeCommand.MESSAGE_USAGE));"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommand(argKeywords[PARAMETER_POSITION]);"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":48}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new LocateCommand object"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the LocateCommand"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an LocateCommand object for execution."},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/LockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class LockCommandParser implements Parser\u003cLockCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the LockCommand"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * and returns a LockCommand object for execution."},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public LockCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[0]);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[1]);"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":36}},{"path":"src/main/java/seedu/address/logic/parser/NavigateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.stream.Stream;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new NavigateCommand object"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParser implements Parser\u003cNavigateCommand\u003e {"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" private Location from \u003d null;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private Location to \u003d null;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Index fromIndex \u003d null;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Index toIndex \u003d null;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the NavigateCommand"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an NavigateCommand object for execution."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand parse(String args) throws ParseException {"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" resetValues();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argumentMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_NAVIGATE_FROM_PERSON,"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_FROM_TASK, PREFIX_NAVIGATE_FROM_ADDRESS, PREFIX_NAVIGATE_TO_PERSON,"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_TO_TASK, PREFIX_NAVIGATE_TO_ADDRESS);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_ADDRESS);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_PERSON);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_TASK);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" boolean toAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_ADDRESS);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" boolean toPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_PERSON);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" boolean toTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_TASK);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkFrom(argumentMultimap, fromAddress, fromPerson, fromTask);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" checkTo(argumentMultimap, toAddress, toPerson, toTask);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return new NavigateCommand(from, to, fromIndex, toIndex, fromTask, toTask);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * Resets the values stored in NavigateCommandParser object to null"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void resetValues() {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d null;"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d null;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d null;"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d null;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Checksif only 1 To argument is provided"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no To arguments or there are more than 1 To arguements"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" private void checkTo(ArgumentMultimap argumentMultimap, boolean toAddress, boolean toPerson, boolean toTask)"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (!(toAddress || toPerson || toTask)) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((toAddress \u0026\u0026 (toPerson || toTask)) || (toPerson \u0026\u0026 toTask)) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more to prefixes are present"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, toAddress, toPerson, false);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if only 1 From argument is provided"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no From arguments or there are more than 1 From arguments"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person,"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" boolean forFrom) throws IllegalValueException {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":144}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes."},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type."},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtil {"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * trimmed."},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer)."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Name to be private if true."},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Phone to be private if true."},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":101,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":102,"author":{"gitId":"-"},"content":" */"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Address to be private if true."},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e avatar} into an {@code Optional\u003cAddress\u003e} if {@code avatar} is present."},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAvatar\u003e parseAvatar(Optional\u003cString\u003e avatar) throws IllegalValueException {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(avatar);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" return avatar.isPresent() ? Optional.of(new Avatar(avatar.get())) : Optional.empty();"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Remark to be private if true."},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":152,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Email to be private if true."},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":171,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":172,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}."},{"lineNumber":173,"author":{"gitId":"-"},"content":" */"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" requireNonNull(tags);"},{"lineNumber":176,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" for (String tagName : tags) {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":" return tagSet;"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present."},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present."},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present."},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present."},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a {@code TaskAddress} if it is present."},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cTaskAddress\u003e parseTaskAddress(Optional\u003cString\u003e address) throws IllegalValueException {"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new TaskAddress(address.get())) : Optional.empty();"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a (@code Location) if it is present."},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cLocation\u003e parseLocationFromAddress(Optional\u003cString\u003e location) throws IllegalValueException {"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(location);"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return location.isPresent() ? Optional.of(new Location(location.get())) : Optional.empty();"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" * the value in the String."},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" public static ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" int parsedInt;"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" if (!s.isEmpty()) {"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":123,"Esilocke":64,"-":66}},{"path":"src/main/java/seedu/address/logic/parser/PrivacyLevelCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new PrivacyLevelCommand object"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParser implements Parser\u003cPrivacyLevelCommand\u003e {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the PrivacyLevelCommand"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an PrivacyLevelCommand object for execution."},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand parse(String args) throws ParseException {"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" int level \u003d ParserUtil.parseIndex(args).getOneBased();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommand(level);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException("},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, PrivacyLevelCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27}},{"path":"src/main/java/seedu/address/logic/parser/SelectCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new SelectCommand object"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class SelectCommandParser implements Parser\u003cSelectCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * and returns an SelectCommand object for execution."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public SelectCommand parse(String args) throws ParseException {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\").trim();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommandParser().parse(trimmed);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommandParser().parse(args);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/SelectPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectPersonCommand object"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParser extends SelectCommandParser {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectPersonCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectPersonCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommand(index);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SelectTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectTaskCommand object"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParser extends SelectCommandParser {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectTaskCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectTaskCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommand(index);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int LIST_ARG_POSITION \u003d 0;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 1;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 2;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 3;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e PERSON_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(0, 4);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e TASK_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(4, 6);"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution."},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Eliminate spaces"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(0))"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 TASK_FIELD_ARGS.contains(argKeywords[1]))"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(1))"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 PERSON_FIELD_ARGS.contains(argKeywords[1]))) {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_LIST_PARAMETERS.contains(argKeywords[LIST_ARG_POSITION])) {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[LIST_ARG_POSITION],"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":66}},{"path":"src/main/java/seedu/address/logic/parser/ThemeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ThemeCommand object"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParser implements Parser\u003cThemeCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ThemeCommand"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ThemeCommand object for execution."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand parse(String args) throws ParseException {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/UnlockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommandParser implements Parser\u003cUnlockCommand\u003e {"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d \"Password is required\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the UnlockCommand"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a UnlockCommand object for execution."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException("},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[0]);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[1]);"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ViewAssignCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ViewAssignCommand object"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParser implements Parser\u003cViewAssignCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand parse(String args) throws ParseException {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommand(index);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":24}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashMap;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)"},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private HashMap\u003cString, String\u003e styleMap;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"},{"lineNumber":45,"author":{"gitId":"-"},"content":" *"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * among constructors."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" styleMap \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public AddressBook() {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" initialiseStyleMap();"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}"},{"lineNumber":62,"author":{"gitId":"-"},"content":" */"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" resetData(toBeCopied);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" //// list overwrite operations"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" requireNonNull(newData);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":97,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}."},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasks.clearAssignees();"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":125,"author":{"gitId":"-"},"content":" //// person-level operations"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":128,"author":{"gitId":"-"},"content":" * Adds a person to the address book."},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,"},{"lineNumber":130,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}."},{"lineNumber":131,"author":{"gitId":"-"},"content":" *"},{"lineNumber":132,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists."},{"lineNumber":133,"author":{"gitId":"-"},"content":" */"},{"lineNumber":134,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);"},{"lineNumber":137,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":138,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":139,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":140,"author":{"gitId":"-"},"content":" persons.add(newPerson);"},{"lineNumber":141,"author":{"gitId":"-"},"content":" }"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}."},{"lineNumber":145,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}."},{"lineNumber":146,"author":{"gitId":"-"},"content":" *"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":149,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":150,"author":{"gitId":"-"},"content":" *"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)"},{"lineNumber":154,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);"},{"lineNumber":158,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":160,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":161,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":162,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" public void sortTasksBy(String field, String order) {"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" tasks.sortBy(field, order);"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the index of {@code ReadOnlyPerson} specified"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractPersonIndexes(ArrayList\u003cReadOnlyPerson\u003e personsToExtract) {"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return persons.extractIndexes(personsToExtract);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}."},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":201,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);"},{"lineNumber":202,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":203,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":204,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":205,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}."},{"lineNumber":206,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":208,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":209,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);"},{"lineNumber":210,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":211,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:"},{"lineNumber":214,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":216,"author":{"gitId":"-"},"content":" */"},{"lineNumber":217,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {"},{"lineNumber":218,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());"},{"lineNumber":219,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list"},{"lineNumber":222,"author":{"gitId":"-"},"content":" // used for checking person tag references"},{"lineNumber":223,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();"},{"lineNumber":224,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list."},{"lineNumber":227,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();"},{"lineNumber":228,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));"},{"lineNumber":229,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":235,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":236,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":237,"author":{"gitId":"-"},"content":" */"},{"lineNumber":238,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {"},{"lineNumber":239,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":244,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":245,"author":{"gitId":"-"},"content":" */"},{"lineNumber":246,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {"},{"lineNumber":247,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":249,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":250,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":251,"author":{"gitId":"-"},"content":" }"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the UniquePersonList"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" return persons.getMappings();"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":264,"author":{"gitId":"-"},"content":" //// tag-level operations"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {"},{"lineNumber":267,"author":{"gitId":"-"},"content":" tags.add(t);"},{"lineNumber":268,"author":{"gitId":"-"},"content":" }"},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" //// task-level operations"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book."},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists."},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified person from all assignment lists for every task **/"},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" public void removePersonFromAssignees(Index target) {"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" tasks.removeAssignee(target);"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" * Updates the Assignees for all tasks in the internal tasks list with their new mappings"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" public void updateTaskAssigneeMappings(Index[] mappings) {"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" tasks.updateAssignees(mappings);"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}."},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" //// theme-level operations"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Initialises the style map by adding the key value pairs"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" * for the strings that will be input in ThemeCommand and the file name of the .css file"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void initialiseStyleMap() {"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"/view/DarkTheme.css\");"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"/view/DarkTheme.css\");"},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"/view/LightTheme.css\");"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"/view/LightTheme.css\");"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" return styleMap;"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":" //// util methods"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":345,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\""},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";"},{"lineNumber":348,"author":{"gitId":"-"},"content":" // TODO: refine later"},{"lineNumber":349,"author":{"gitId":"-"},"content":" }"},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":352,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":353,"author":{"gitId":"-"},"content":" return persons.asObservableList();"},{"lineNumber":354,"author":{"gitId":"-"},"content":" }"},{"lineNumber":355,"author":{"gitId":"-"},"content":""},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromPersonList(int index) {"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" return persons.asObservableList().get(index);"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":368,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":369,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":370,"author":{"gitId":"-"},"content":" return tags.asObservableList();"},{"lineNumber":371,"author":{"gitId":"-"},"content":" }"},{"lineNumber":372,"author":{"gitId":"-"},"content":""},{"lineNumber":373,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":374,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":375,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":376,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls"},{"lineNumber":377,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);"},{"lineNumber":380,"author":{"gitId":"-"},"content":" }"},{"lineNumber":381,"author":{"gitId":"-"},"content":""},{"lineNumber":382,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":383,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":384,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);"},{"lineNumber":386,"author":{"gitId":"-"},"content":" }"},{"lineNumber":387,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":26,"Esilocke":131,"wangyiming1019":17,"-":192}},{"path":"src/main/java/seedu/address/model/Location.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Location in the address book."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidLocation(String)}"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class Location {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" \"Location can take any value, and it should not be blank\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" /*"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String LOCATION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given location."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given location string is invalid."},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public Location(String location) throws IllegalValueException {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (location \u003d\u003d null) {"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidLocation(location)) {"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d location;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid location."},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidLocation(String test) {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(LOCATION_VALIDATION_REGEX);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof Location // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Location) other).value)); // state check"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The API of the Model component."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public interface Model {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */"},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" /** Deletes the given person. */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Adds the given person */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}."},{"lineNumber":64,"author":{"gitId":"-"},"content":" *"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":70,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}."},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /** Displays all persons assigned to the specified task */"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" void viewAssignees(ReadOnlyTask task);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}."},{"lineNumber":114,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":115,"author":{"gitId":"-"},"content":" */"},{"lineNumber":116,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}."},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by chosen field in ascending (asc) or descending (desc) order"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" * Sorts all tasks in task list by chosen field in ascending (asc) or descending (desc) order"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" void sortTasks(String field, String order);"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Returns lock state. True means locked. False means unlocked"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" boolean getLockState();"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" * Locks address book from model"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" void lockAddressBookFromModel();"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Unlock address book from model"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" void unlockAddressBookFromModel();"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" * Returns a copy of the UserPrefs"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" UserPrefs getUserPrefs();"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson getPersonAtIndexFromAddressBook(int index);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" void setTheme(String theme);"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" String getTheme();"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" HashMap\u003cString, String\u003e getStyleMap();"},{"lineNumber":174,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":15,"Esilocke":58,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePrivacyLevelPredicate;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPrivacyLevelPredicate;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPrivacyLevelPredicate;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.PersonCompleteMatchPredicate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data."},{"lineNumber":50,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized."},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" private final UserPrefs userPrefs;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs."},{"lineNumber":64,"author":{"gitId":"-"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.userPrefs \u003d userPrefs;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d userPrefs.getTheme();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" public ModelManager() {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":103,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":105,"author":{"gitId":"-"},"content":" }"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */"},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":113,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" persons.add(target);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d addressBook.extractPersonIndexes(persons);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" Index personIndex \u003d personIndexes.get(0);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" addressBook.removePersonFromAssignees(personIndex);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list."},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":142,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":143,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":145,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list."},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":166,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":167,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":168,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);"},{"lineNumber":172,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" Index[] updatedIndexes \u003d addressBook.getMappings();"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" System.out.println(updatedIndexes.length);"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" addressBook.updateTaskAssigneeMappings(updatedIndexes);"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks(String field, String order) {"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(field, order);"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" return userPrefs;"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public boolean getLockState() {"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return getUserPrefs().getAddressBookLockState();"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBookFromModel() {"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().lockAddressBook();"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBookFromModel() {"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().unlockAddressBook();"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes."},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag."},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" int index;"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":235,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);"},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);"},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToAssign);"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d newAssignees.assign(positions);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneAdded) {"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToAssignTo, newAssignees);"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToAssignTo, updatedTask);"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToDismiss);"},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneDismissed \u003d newAssignees.dismiss(positions);"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneDismissed) {"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToDismissFrom, newAssignees);"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToDismissFrom, updatedTask);"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();"},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d toSet.getTaskAddress();"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state, taskAddress);"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d task.getAssignees();"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e internalList \u003d assignees.getList();"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToShow \u003d new ArrayList\u003c\u003e();"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" for (Index i : internalList) {"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" assert(i.getZeroBased() \u003c filteredPersons.size());"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" personsToShow.add(filteredPersons.get(i.getZeroBased()));"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" PersonCompleteMatchPredicate assignedPredicate \u003d new PersonCompleteMatchPredicate(personsToShow);"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" updateFilteredPersonList(assignedPredicate);"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":337,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":338,"author":{"gitId":"-"},"content":""},{"lineNumber":339,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":340,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of"},{"lineNumber":341,"author":{"gitId":"-"},"content":" * {@code addressBook}"},{"lineNumber":342,"author":{"gitId":"-"},"content":" */"},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":344,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":345,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);"},{"lineNumber":346,"author":{"gitId":"-"},"content":" }"},{"lineNumber":347,"author":{"gitId":"-"},"content":""},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(predicate);"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 3) {"},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" if (predicate instanceof NameContainsKeywordsPredicate) {"},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsKeywordsPrivacyLevelPredicate((("},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPredicate) predicate).getKeywords()));"},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsTagsPredicate) {"},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsTagsPrivacyLevelPredicate((("},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsTagsPredicate) predicate).getTags()));"},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsFavouritePredicate) {"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsFavouritePrivacyLevelPredicate());"},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate \u003d\u003d PREDICATE_SHOW_ALL_PERSONS) {"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());"},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":386,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":387,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {"},{"lineNumber":388,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":389,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {"},{"lineNumber":390,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":391,"author":{"gitId":"-"},"content":" }"},{"lineNumber":392,"author":{"gitId":"-"},"content":""},{"lineNumber":393,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":394,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {"},{"lineNumber":395,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":396,"author":{"gitId":"-"},"content":" }"},{"lineNumber":397,"author":{"gitId":"-"},"content":""},{"lineNumber":398,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":399,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;"},{"lineNumber":400,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)"},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);"},{"lineNumber":403,"author":{"gitId":"-"},"content":" }"},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Utility methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" * Constructs a new {@code ReadOnlyTask} from an existing ReadOnlyTask, with the specified assignees list."},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyTask constructTaskWithNewAssignee(ReadOnlyTask originalTask, Assignees updatedAssignees) {"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d originalTask.getTaskName();"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" Description description \u003d originalTask.getDescription();"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d originalTask.getDeadline();"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d originalTask.getPriority();"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d originalTask.getCompleteState();"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d originalTask.getTaskAddress();"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, updatedAssignees,"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" state, taskAddress);"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" return updatedTask;"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":424,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":425,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":426,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":427,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c 1 || level \u003e 3) {"},{"lineNumber":428,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy Level can only be 0, 1 or 2\");"},{"lineNumber":429,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":430,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":431,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":432,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":434,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":435,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":436,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":437,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":438,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":439,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {"},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getPersonAtIndexFromPersonList(index);"},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {"},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;"},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" userPrefs.setTheme(theme);"},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" return theme;"},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {"},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getStyleMap();"},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":461,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":72,"Esilocke":186,"wangyiming1019":58,"-":110}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list."},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String addressBookFilePath \u003d \"data/addressbook.xml\";"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private String addressBookName \u003d \"My Address++\";"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private boolean addressBookLockState \u003d false;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private String addressBookEncryptedPassword \u003d Hashing.sha256()"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" .hashString(\"password\", StandardCharsets.UTF_8).toString();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" public UserPrefs() {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" this.setGuiSettings(1080, 720, 0, 0);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return addressBookFilePath;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" public String getAddressBookName() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" return addressBookName;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public String getAddressBookEncryptedPassword() {"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" return addressBookEncryptedPassword;"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void setAddressBookEncryptedPassword(String addressBookPasswordInput) {"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" this.addressBookEncryptedPassword \u003d Hashing.sha256()"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" .hashString(addressBookPasswordInput, StandardCharsets.UTF_8).toString();"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBook() {"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d true;"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBook() {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d false;"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean getAddressBookLockState() {"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return this.addressBookLockState;"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well."},{"lineNumber":82,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)"},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookEncryptedPassword, o.addressBookEncryptedPassword)"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":100,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());"},{"lineNumber":103,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nPassword : \" + addressBookEncryptedPassword);"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));"},{"lineNumber":107,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (theme \u003d\u003d null) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return \"/view/DarkTheme.css\";"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return theme;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":12,"-":74}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given address."},{"lineNumber":27,"author":{"gitId":"-"},"content":" *"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address) throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.value \u003d address;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this(address);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid person address."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s avatar filepath in the address book."},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"public class Avatar {"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" \"Person avatar can take any values, and it should not be blank\";"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" * Validates given address."},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public Avatar(String address) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d AVATAR_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" if (!isValidAvatar(address)) {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d address;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidAvatar(String test) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return test.matches(AVATAR_VALIDATION_REGEX) || test.equals(AVATAR_PLACEHOLDER_VALUE);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Avatar // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":57,"jeffreygohkw":6}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given email."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email) throws IllegalValueException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this(email);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":42,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Validates given name."},{"lineNumber":28,"author":{"gitId":"-"},"content":" *"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name) throws IllegalValueException {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d trimmedName;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(name);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":71,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Name) other).value)); // state check"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":47,"-":48}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured and has no private fields"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsFavouritePrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsFavouritePrivacyLevelPredicate() {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return (person.getFavourite() \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsFavouritePrivacyLevelPredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given."},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameContainsKeywordsPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public NameContainsKeywordsPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" this.keywords \u003d keywords;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" }"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" return keywords.stream()"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword));"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getKeywords() {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" return keywords;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":33,"author":{"gitId":"-"},"content":" || (other instanceof NameContainsKeywordsPredicate // instanceof handles nulls"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPredicate) other).keywords)); // state check"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":7,"-":30}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" * and has no private fields"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsKeywordsPrivacyLevelPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.keywords \u003d keywords;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return (keywords.stream()"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword))"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsKeywordsPrivacyLevelPredicate // instanceof handles nulls"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPrivacyLevelPredicate) other).keywords)); //state check"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/\")) {"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(1));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getTags() {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return tags;"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":6,"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags and hasno private fields."},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsTagsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e tags;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsTagsPrivacyLevelPredicate(List\u003cString\u003e tags) {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.tags \u003d tags;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" String allTagString \u003d convertTagToString(person);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (isOnlyUnwantedTags) {"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" return (!(unwantedTag.stream()"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))))"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" return (wantedTag.stream()"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !(unwantedTag.stream()"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))))"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" * check only unwanted tag list has elements"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" * @return a boolean value"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e unwantedTag) {"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" for (String everyTag : tags) {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (!everyTag.startsWith(\"/\")) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" wantedTag.add(everyTag);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" unwantedTag.add(everyTag.substring(1));"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * Convert a set of tags to Strings"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : personTags) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(\" \");"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return allTagNames.toString().trim();"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":86}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cAvatar\u003e avatar;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Every field must be present and not null."},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Boolean favourite, Remark remark, Avatar avatar, Set\u003cTag\u003e tags) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" this.avatar \u003d new SimpleObjectProperty\u003c\u003e(avatar);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" source.getRemark(), source.getAvatar(), source.getTags());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return name;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public Name getName() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return name.get();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return phone;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public Phone getPhone() {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" return phone.get();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return email;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public Email getEmail() {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" return email.get();"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" return address;"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public Address getAddress() {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return address.get();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return favourite;"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" return remark.get();"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void setAvatar(Avatar avatar) {"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" this.avatar.set(requireNonNull(avatar));"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cAvatar\u003e avatarProperty() {"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" return avatar;"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" public Avatar getAvatar() {"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" return avatar.get();"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":155,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}"},{"lineNumber":157,"author":{"gitId":"-"},"content":" * if modification is attempted."},{"lineNumber":158,"author":{"gitId":"-"},"content":" */"},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" }"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":166,"author":{"gitId":"-"},"content":" }"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set."},{"lineNumber":170,"author":{"gitId":"-"},"content":" */"},{"lineNumber":171,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":176,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":177,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":178,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls"},{"lineNumber":179,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":183,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":184,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags, avatar);"},{"lineNumber":186,"author":{"gitId":"-"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" return getAsText();"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.getName().setPrivacyLevel(level);"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" this.getPhone().setPrivacyLevel(level);"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" this.getEmail().setPrivacyLevel(level);"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" this.getAddress().setPrivacyLevel(level);"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" this.getRemark().setPrivacyLevel(level);"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if the Person has at least one private field and false otherwise"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" public boolean hasPrivateField() {"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return (this.getName().getIsPrivate() || this.getPhone().getIsPrivate() || this.getAddress().getIsPrivate()"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" || this.getEmail().getIsPrivate() || this.getRemark().getIsPrivate());"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":37,"jeffreygohkw":25,"wangyiming1019":20,"-":134}},{"path":"src/main/java/seedu/address/model/person/PersonCompleteMatchPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s matches any one of the keywords"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class PersonCompleteMatchPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" private final List\u003cReadOnlyPerson\u003e keywords;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public PersonCompleteMatchPredicate(List\u003cReadOnlyPerson\u003e keywords) {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return keywords.stream()"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" .anyMatch(person::equals);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || (other instanceof PersonCompleteMatchPredicate // instanceof handles nulls"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((PersonCompleteMatchPredicate) other).keywords)); // state check"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Validates given phone number."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone) throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number."},{"lineNumber":47,"author":{"gitId":"-"},"content":" */"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":69,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls"},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook."},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();"},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();"},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cAvatar\u003e avatarProperty();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" Avatar getAvatar();"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" boolean hasPrivateField();"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":42,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark())"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getAvatar().equals(this.getAvatar());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details."},{"lineNumber":54,"author":{"gitId":"-"},"content":" */"},{"lineNumber":55,"author":{"gitId":"-"},"content":" default String getAsText() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" builder.append(getName())"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Phone: \")"},{"lineNumber":59,"author":{"gitId":"-"},"content":" .append(getPhone())"},{"lineNumber":60,"author":{"gitId":"-"},"content":" .append(\" Email: \")"},{"lineNumber":61,"author":{"gitId":"-"},"content":" .append(getEmail())"},{"lineNumber":62,"author":{"gitId":"-"},"content":" .append(\" Address: \")"},{"lineNumber":63,"author":{"gitId":"-"},"content":" .append(getAddress())"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" .append(\" Avatar: \")"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" .append(getAvatar())"},{"lineNumber":68,"author":{"gitId":"-"},"content":" .append(\" Tags: \");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" return builder.toString();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book."},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark."},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid."},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this(remark);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Remark\u003e\";"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":66,"jeffreygohkw":29}},{"path":"src/main/java/seedu/address/model/person/ShowAllPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured after taking into account privacy level."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class ShowAllPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public ShowAllPrivacyLevelPredicate() {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return !person.hasPrivateField();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ShowAllPrivacyLevelPredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Iterator;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations."},{"lineNumber":25,"author":{"gitId":"-"},"content":" *"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cPerson\u003e internalCopy \u003d FXCollections.observableArrayList();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" // used by asObservableList()"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public boolean contains(ReadOnlyPerson toCheck) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Adds a person to the list."},{"lineNumber":46,"author":{"gitId":"-"},"content":" *"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" internalList.add(new Person(toAdd));"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}."},{"lineNumber":59,"author":{"gitId":"-"},"content":" *"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list."},{"lineNumber":61,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":62,"author":{"gitId":"-"},"content":" */"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" internalList.set(index, new Person(editedPerson));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list."},{"lineNumber":81,"author":{"gitId":"-"},"content":" *"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":83,"author":{"gitId":"-"},"content":" */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list."},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list."},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));"},{"lineNumber":131,"author":{"gitId":"-"},"content":" }"},{"lineNumber":132,"author":{"gitId":"-"},"content":" setPersons(replacement);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" }"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":136,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":137,"author":{"gitId":"-"},"content":" */"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the {@code ReadOnlyPerson} specified"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractIndexes(ArrayList\u003cReadOnlyPerson\u003e persons) {"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : persons) {"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" int position \u003d internalList.indexOf(p);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromZeroBased(position));"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return indexes;"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the internalList before sorting"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index[] mappings \u003d new Index[internalCopy.size()];"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" int count \u003d 0;"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" for (Person p : internalCopy) {"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(p);"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" mappings[count] \u003d Index.fromZeroBased(index);"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" count++;"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" return mappings;"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalList.size());"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" internalCopy.clear();"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" for (Person p : internalList) {"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" internalCopy.add(p);"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalCopy.size());"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" switch (field) {"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" case \"name\":"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;"},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" case \"email\":"},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" case \"address\":"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;"},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" switch (order) {"},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":"},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":258,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":259,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {"},{"lineNumber":260,"author":{"gitId":"-"},"content":" return internalList.iterator();"},{"lineNumber":261,"author":{"gitId":"-"},"content":" }"},{"lineNumber":262,"author":{"gitId":"-"},"content":""},{"lineNumber":263,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":264,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":265,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":266,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls"},{"lineNumber":267,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));"},{"lineNumber":268,"author":{"gitId":"-"},"content":" }"},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":271,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":272,"author":{"gitId":"-"},"content":" return internalList.hashCode();"},{"lineNumber":273,"author":{"gitId":"-"},"content":" }"},{"lineNumber":274,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":89,"Esilocke":35,"wangyiming1019":31,"-":119}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name."},{"lineNumber":20,"author":{"gitId":"-"},"content":" *"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing."},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Assignees {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e assignedList;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public Assignees(ArrayList\u003cIndex\u003e assignees) {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public Assignees() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public Assignees(Assignees toCopy) {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(toCopy.getList());"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean assign(ArrayList\u003cIndex\u003e personsToAssign) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d false;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" for (Index i : personsToAssign) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!assignedList.contains(i)) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assignedList.add(i);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" atLeastOneAdded \u003d true;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return atLeastOneAdded;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /** Updates the internal assignedList with the correct Index values after a sort operation */"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void updateList(Index[] mappings) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e updatedList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" for (Index i : assignedList) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Index updatedPosition \u003d mappings[i.getZeroBased()];"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" updatedList.add(updatedPosition);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedList.clear();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(updatedList);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list, and returns true if at least 1 person was removed */"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public boolean dismiss(ArrayList\u003cIndex\u003e personsToDismiss) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return assignedList.removeAll(personsToDismiss);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e getList() {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this.assignedList;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Deletes the specified index from the internal list, and decrements all other indexes in the assigned list"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * that have a value lower than the deleted index by 1."},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void decrementIndex(Index deletedIndex) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(deletedIndex);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c assignedList.size(); i++) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index current \u003d assignedList.get(i);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (current.getZeroBased() \u003e deletedIndex.getZeroBased()) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" int indexValue \u003d current.getZeroBased() - 1;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index decrementedIndex \u003d Index.fromZeroBased(indexValue);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assignedList.set(i, decrementedIndex);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return assignedList.hashCode();"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":90}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Date;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.DateGroup;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.Parser;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class Deadline {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_DATE \u003d"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" \"The specified date is invalid.\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public final Date date;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null || deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.date \u003d null;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" this.date \u003d setDateFromArgs(deadline);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d date.toString();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" setDateFromArgs(test);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Returns a Date object that represents the given date string."},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static Date setDateFromArgs(String date) throws IllegalValueException {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Parser deadlineParser \u003d new Parser();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cDateGroup\u003e groups \u003d deadlineParser.parse(date);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cDate\u003e dates \u003d null;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" for (DateGroup group : groups) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" dates \u003d group.getDates();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (dates \u003d\u003d null) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_INVALID_DATE);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return dates.get(0);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":86}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description."},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Priority {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String[] PRIORITY_TEXT_STRINGS \u003d {\"\", \"Lowest\", \"Low\", \"Medium\", \"High\", \"Highest\"};"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 0;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final int value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given priority."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null || priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d 0;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d Integer.parseInt(trimmedPriority);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return PRIORITY_TEXT_STRINGS[value];"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value \u003d\u003d ((Priority) other).value); // state check"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":75}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" TaskAddress getTaskAddress();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskAddress\u003e taskAddressProperty();"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e changeStateProperty();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" void changeState();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .append(\" Address: \")"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .append(getTaskAddress())"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .append(\" \")"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return builder.toString();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState()"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskAddress().equals(this.getTaskAddress());"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskAddress\u003e taskAddress;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete, TaskAddress taskAddress) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * by default."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState(), task.getTaskAddress());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return taskName.get();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return description.get();"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return deadline.get();"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return priority.get();"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return assignees.get();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return state.get();"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public TaskAddress getTaskAddress() {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return taskAddress.get();"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return getAsText();"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" return description;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return deadline;"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return priority;"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return assignees;"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskAddress\u003e taskAddressProperty() {"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" return taskAddress;"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e changeStateProperty() {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d getCompleteState();"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (state) {"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as incomplete\");"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as complete\");"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" public void changeState() {"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" this.setState(!this.getCompleteState());"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" this.taskAddress.set(taskAddress);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String printableState;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" return printableState;"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":200}},{"path":"src/main/java/seedu/address/model/task/TaskAddress.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Task\u0027s address in the address book."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidTaskAddress(String)}"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class TaskAddress {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" \"Task addresses can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /*"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public final String taskAddress;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given address."},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public TaskAddress(String address) throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d ADDRESS_PLACEHOLDER_VALUE;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidTaskAddress(address)) {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_TASK_ADDRESS_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d address;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid task address."},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidTaskAddress(String test) {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof TaskAddress // instanceof handles nulls"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.taskAddress.equals(((TaskAddress) other).taskAddress)); // state check"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress.hashCode();"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByState;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByPriority;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private boolean isComplete;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private int basePriority;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords, boolean isStateCheckRequired,"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityCheckRequired, boolean isComplete, int basePriority) {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d isPriorityCheckRequired;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d isStateCheckRequired;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d isComplete;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d basePriority;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d false;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d false;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d false;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d 0;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" for (String keyword : keywords) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (needFilterByState \u0026\u0026 task.getCompleteState() !\u003d isComplete) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } else if (needFilterByPriority \u0026\u0026 task.getPriority().value \u003c basePriority) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } else if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByPriority \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByPriority"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByState \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByState"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isComplete \u003d\u003d ((TaskContainsKeywordPredicate) other).isComplete"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.basePriority \u003d\u003d ((TaskContainsKeywordPredicate) other).basePriority); // state check"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class TaskName {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public final String taskName;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Validates given name."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument."},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}."},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list."},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list."},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" * Removes all assignees from all tasks."},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" t.clearAssignees();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified assignee from all tasks **/"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void removeAssignee(Index personIndex) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" updated.decrementIndex(personIndex);"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" internalList.clear();"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" * Updates the assignee list within each task to match that of the newPersonIndexes."},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * This method is called after a sort persons operation due to the order change"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public void updateAssignees(Index[] newPersonIndexes) {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" updated.updateList(newPersonIndexes);"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" internalList.clear();"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * Sorts person list by all persons by any field in ascending or descending order"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e comparator \u003d null;"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e priorityComparator \u003d Comparator.comparingInt(o -\u003e o.getPriority().value);"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e deadlineComparator \u003d (o1, o2) -\u003e {"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" if (o1.getDeadline().date \u003d\u003d null || o2.getDeadline().date \u003d\u003d null) {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return 0;"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" switch (field) {"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" case \"priority\":"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d priorityComparator;"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" case \"deadline\":"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d deadlineComparator;"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" switch (order) {"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":60,"Esilocke":179}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task."},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class SampleDataUtil {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" return new Person[] {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"), new Avatar(\"\"),"},{"lineNumber":29,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),"},{"lineNumber":30,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"), new Avatar(\"\"),"},{"lineNumber":33,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),"},{"lineNumber":34,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"), new Avatar(\"\"),"},{"lineNumber":37,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),"},{"lineNumber":38,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"), new Avatar(\"\"),"},{"lineNumber":41,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),"},{"lineNumber":42,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"), new Avatar(\"\"),"},{"lineNumber":45,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),"},{"lineNumber":46,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"), new Avatar(\"\"),"},{"lineNumber":49,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))"},{"lineNumber":50,"author":{"gitId":"-"},"content":" };"},{"lineNumber":51,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return sampleAb;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given."},{"lineNumber":70,"author":{"gitId":"-"},"content":" */"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" for (String s : strings) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}."},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found."},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format."},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage."},{"lineNumber":35,"author":{"gitId":"-"},"content":" * @param addressBook cannot be null."},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem writing to the file."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" void changeFilePath(String fp, UserPrefs u);"},{"lineNumber":46,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":2,"-":43}},{"path":"src/main/java/seedu/address/storage/Storage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * API of the Storage component"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public interface Storage extends AddressBookStorage, UserPrefsStorage {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"-"},"content":" void saveUserPrefs(UserPrefs userPrefs) throws IOException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location. Subscribes to BackupRequestEvent"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" void handleBackupAddressBook(BackupRequestEvent event) throws IOException;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Saves the current version of the Address Book to the hard disk."},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Creates the data file if it is missing."},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Raises {@link DataSavingExceptionEvent} if there was an error during saving."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" void handleAddressBookChangedEvent(AddressBookChangedEvent abce);"},{"lineNumber":46,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"-":38}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" @Subscribe"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" public void handleBackupAddressBook(BackupRequestEvent event) throws IOException {"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyAddressBook addressBook \u003d event.getModel().getAddressBook();"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" String args \u003d event.getArgs();"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, args);"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));"},{"lineNumber":97,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":11,"jeffreygohkw":8,"-":91}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedIndex.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlValue;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * JAXB-friendly adapted version of the Index."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedIndex {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" @XmlValue"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private int index;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedIndex."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex() {}"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Converts a given Index into this class for JAXB use."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex(Index source) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d source.getZeroBased();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted tag object into an Index object."},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints\\"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public Index toModelType() throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return Index.fromZeroBased(index);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private String name;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":29,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private String phone;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private String email;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String address;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" private String remark;"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private String avatar;"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson."},{"lineNumber":55,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use."},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().value;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d source.getAvatar().value;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().getIsPrivate();"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().getIsPrivate();"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().getIsPrivate();"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().getIsPrivate();"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().getIsPrivate();"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object."},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tags);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":71,"wangyiming1019":3,"-":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private String name;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private String description;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private String deadline;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private String priority;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String state;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @XmlElement"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedIndex\u003e assignees \u003d new ArrayList\u003c\u003e();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private String address;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use."},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.toString(source.getPriority().value);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" address \u003d source.getTaskAddress().taskAddress;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assignees \u003d new ArrayList\u003c\u003e();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (Index i : source.getAssignees().getList()) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assignees.add(new XmlAdaptedIndex(i));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object."},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" final TaskAddress address \u003d new TaskAddress(this.address);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cIndex\u003e assigneeIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" for (XmlAdaptedIndex index : assignees) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assigneeIndexes.add(index.toModelType());"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" final Assignees assignees \u003d new Assignees(assigneeIndexes);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, assignees, state, address);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format."},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,"},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);"},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a custom save file name"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.info(filePath);"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":12,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook."},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":19,"-":73}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_PREFIX \u003d \"https://www.google.com.sg/maps/dir/?api\u003d1\";"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_SUFFIX \u003d \"/\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private WebView browser;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public BrowserPanel() {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page."},{"lineNumber":50,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" loadDefaultPage();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().value.replaceAll(\" \", \"+\")"},{"lineNumber":66,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s address if their address is not private"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Loads Google Maps with directions on how to go from one location to another"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * @param fromLocation The location we want to start from"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * @param toLocation The location we want to reach"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDirectionsPage(String fromLocation, String toLocation) {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":101,"author":{"gitId":"-"},"content":" public void loadPage(String url) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"-"},"content":" * Loads a default HTML file with a background that matches the general theme."},{"lineNumber":107,"author":{"gitId":"-"},"content":" */"},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void loadDefaultPage() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" loadPage(defaultPage.toExternalForm());"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Frees resources allocated to the browser."},{"lineNumber":115,"author":{"gitId":"-"},"content":" */"},{"lineNumber":116,"author":{"gitId":"-"},"content":" public void freeResources() {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" browser \u003d null;"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" loadDirectionsPage(event.getFromLocation().toString(), event.getToLocation().toString());"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":68,"Esilocke":1,"-":65}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";"},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Stage primaryStage;"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container"},{"lineNumber":64,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private ViewTaskPanel viewTaskPanel;"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private ViewPersonPanel viewPersonPanel;"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":73,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":76,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":100,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":106,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":109,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" // Set dependencies"},{"lineNumber":116,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;"},{"lineNumber":117,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":118,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" // Configure the UI"},{"lineNumber":122,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());"},{"lineNumber":123,"author":{"gitId":"-"},"content":" setIcon(ICON);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" setWindowMinSize();"},{"lineNumber":125,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" setWindowDefaultTheme(prefs);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());"},{"lineNumber":128,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" setAccelerators();"},{"lineNumber":131,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" return primaryStage;"},{"lineNumber":136,"author":{"gitId":"-"},"content":" }"},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem."},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator"},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":157,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK."},{"lineNumber":160,"author":{"gitId":"-"},"content":" *"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will"},{"lineNumber":162,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and"},{"lineNumber":163,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by"},{"lineNumber":165,"author":{"gitId":"-"},"content":" * the TextInputControl(s)."},{"lineNumber":166,"author":{"gitId":"-"},"content":" *"},{"lineNumber":167,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open"},{"lineNumber":168,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay."},{"lineNumber":170,"author":{"gitId":"-"},"content":" */"},{"lineNumber":171,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" event.consume();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":" });"},{"lineNumber":177,"author":{"gitId":"-"},"content":" }"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself."},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window."},{"lineNumber":208,"author":{"gitId":"-"},"content":" */"},{"lineNumber":209,"author":{"gitId":"-"},"content":" void fillInnerParts() {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" browserPanel \u003d new BrowserPanel();"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" viewTaskPanel \u003d new ViewTaskPanel();"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" viewPersonPanel \u003d new ViewPersonPanel();"},{"lineNumber":213,"author":{"gitId":"-"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());"},{"lineNumber":216,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();"},{"lineNumber":222,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());"},{"lineNumber":226,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);"},{"lineNumber":229,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" void hide() {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" primaryStage.hide();"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }"},{"lineNumber":235,"author":{"gitId":"-"},"content":""},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);"},{"lineNumber":238,"author":{"gitId":"-"},"content":" }"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Sets the given image as the icon of the main window."},{"lineNumber":242,"author":{"gitId":"-"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}"},{"lineNumber":243,"author":{"gitId":"-"},"content":" */"},{"lineNumber":244,"author":{"gitId":"-"},"content":" private void setIcon(String iconSource) {"},{"lineNumber":245,"author":{"gitId":"-"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":249,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences."},{"lineNumber":250,"author":{"gitId":"-"},"content":" */"},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {"},{"lineNumber":252,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());"},{"lineNumber":253,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());"},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());"},{"lineNumber":256,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default theme based on user preferences."},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultTheme(UserPrefs prefs) {"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(prefs.getTheme());"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":267,"author":{"gitId":"-"},"content":" private void setWindowMinSize() {"},{"lineNumber":268,"author":{"gitId":"-"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);"},{"lineNumber":269,"author":{"gitId":"-"},"content":" primaryStage.setMinWidth(MIN_WIDTH);"},{"lineNumber":270,"author":{"gitId":"-"},"content":" }"},{"lineNumber":271,"author":{"gitId":"-"},"content":""},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" return getRoot().getStylesheets().get(1);"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":276,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":277,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window."},{"lineNumber":278,"author":{"gitId":"-"},"content":" */"},{"lineNumber":279,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {"},{"lineNumber":280,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),"},{"lineNumber":281,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());"},{"lineNumber":282,"author":{"gitId":"-"},"content":" }"},{"lineNumber":283,"author":{"gitId":"-"},"content":""},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command for menu item"},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {"},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command for menu item"},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":298,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {"},{"lineNumber":299,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling decrease in font size\");"},{"lineNumber":300,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));"},{"lineNumber":301,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":302,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":304,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command"},{"lineNumber":305,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":306,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":307,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {"},{"lineNumber":308,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling reset in font size\");"},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));"},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":311,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":312,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":313,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":314,"author":{"gitId":"-"},"content":" * Opens the help window."},{"lineNumber":315,"author":{"gitId":"-"},"content":" */"},{"lineNumber":316,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":317,"author":{"gitId":"-"},"content":" public void handleHelp() {"},{"lineNumber":318,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();"},{"lineNumber":319,"author":{"gitId":"-"},"content":" helpWindow.show();"},{"lineNumber":320,"author":{"gitId":"-"},"content":" }"},{"lineNumber":321,"author":{"gitId":"-"},"content":""},{"lineNumber":322,"author":{"gitId":"-"},"content":" void show() {"},{"lineNumber":323,"author":{"gitId":"-"},"content":" primaryStage.show();"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpenRequestEvent(OpenRequestEvent event) throws IOException, DataConversionException {"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" handleOpen();"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {"},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog"},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension"},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {"},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");"},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);"},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAsRequestEvent(SaveAsRequestEvent event) throws IOException, DataConversionException {"},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" handleSaveAs();"},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the existing theme to the input theme"},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" public void handleChangeTheme(String theme) {"},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {"},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);"},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":397,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(theme);"},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":399,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":""},{"lineNumber":401,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":402,"author":{"gitId":"-"},"content":" private void handleExit() {"},{"lineNumber":403,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());"},{"lineNumber":404,"author":{"gitId":"-"},"content":" }"},{"lineNumber":405,"author":{"gitId":"-"},"content":""},{"lineNumber":406,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {"},{"lineNumber":407,"author":{"gitId":"-"},"content":" return this.personListPanel;"},{"lineNumber":408,"author":{"gitId":"-"},"content":" }"},{"lineNumber":409,"author":{"gitId":"-"},"content":""},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":414,"author":{"gitId":"-"},"content":" void releaseResources() {"},{"lineNumber":415,"author":{"gitId":"-"},"content":" browserPanel.freeResources();"},{"lineNumber":416,"author":{"gitId":"-"},"content":" }"},{"lineNumber":417,"author":{"gitId":"-"},"content":""},{"lineNumber":418,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":419,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {"},{"lineNumber":420,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":421,"author":{"gitId":"-"},"content":" handleHelp();"},{"lineNumber":422,"author":{"gitId":"-"},"content":" }"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewTaskPanel.getRoot());"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewPersonPanel.getRoot());"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" private void handleChangeThemeEvent(ChangeThemeRequestEvent event) {"},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" handleChangeTheme(event.getStyleSheet());"},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":461,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":172,"Esilocke":35,"-":212}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.ImageView;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later."},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":40,"author":{"gitId":"-"},"content":" *"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" initTags(person);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" initFavourite(person);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));"},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" });"},{"lineNumber":89,"author":{"gitId":"-"},"content":" person.favouriteProperty().addListener((observable, oldValue, newValue) -\u003e initFavourite(person));"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * display the heart for favourite person"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private void initFavourite(ReadOnlyPerson person) {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" boolean favouriteStatus \u003d person.getFavourite();"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Label favouriteLabel \u003d new Label();"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" Image starFilled \u003d new Image(getClass().getResource(\"/images/heart.png\").toExternalForm());"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" if (favouriteStatus) {"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setGraphic(new ImageView(starFilled));"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setStyle(\"-fx-background-color: transparent; -fx-border-color: transparent\");"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" cardPane.getChildren().add(favouriteLabel);"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @param tag"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" * @return"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" * @param person"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" });"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":155,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":157,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":158,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":162,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":164,"author":{"gitId":"-"},"content":" }"},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":167,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;"},{"lineNumber":168,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":169,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);"},{"lineNumber":170,"author":{"gitId":"-"},"content":" }"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" return name;"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" return phone;"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" return address;"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" return email;"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" //author"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":67,"Esilocke":2,"wangyiming1019":52,"-":84}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Panel containing the list of persons."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" setConnections(personList);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));"},{"lineNumber":51,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":61,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":" });"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier + 1);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier - 1);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // Set new font size"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New person font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for person cards"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * @param event"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" @Subscribe"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" private void handlePersonCardChangeFontSizeEvent (ChangeFontSizeEvent event) {"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" case 0:"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" case 1:"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" case 2:"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it."},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":148,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);"},{"lineNumber":149,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":150,"author":{"gitId":"-"},"content":" });"},{"lineNumber":151,"author":{"gitId":"-"},"content":" }"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" * Listens for change of font size events"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" * @param event"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":158,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":160,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}."},{"lineNumber":183,"author":{"gitId":"-"},"content":" */"},{"lineNumber":184,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {"},{"lineNumber":185,"author":{"gitId":"-"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);"},{"lineNumber":189,"author":{"gitId":"-"},"content":""},{"lineNumber":190,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {"},{"lineNumber":191,"author":{"gitId":"-"},"content":" setGraphic(null);"},{"lineNumber":192,"author":{"gitId":"-"},"content":" setText(null);"},{"lineNumber":193,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }"},{"lineNumber":196,"author":{"gitId":"-"},"content":" }"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":92,"jeffreygohkw":7,"Esilocke":14,"-":86}},{"path":"src/main/java/seedu/address/ui/StatusBarFooter.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.time.Clock;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.controlsfx.control.StatusBar;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A ui for the status bar that is displayed at the footer of the application."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class StatusBarFooter extends UiPart\u003cRegion\u003e {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_INITIAL \u003d \"Not updated yet in this session\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_UPDATED \u003d \"Last Updated: %s\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Used to generate time stamps."},{"lineNumber":26,"author":{"gitId":"-"},"content":" *"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * TODO: change clock to an instance variable."},{"lineNumber":28,"author":{"gitId":"-"},"content":" * We leave it as a static variable because manual dependency injection"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * will require passing down the clock reference all the way from MainApp,"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * but it should be easier once we have factories/DI frameworks."},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static Clock clock \u003d Clock.systemDefaultZone();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StatusBarFooter.class);"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"StatusBarFooter.fxml\";"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private StatusBar syncStatus;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private StatusBar totalPersons;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private StatusBar saveLocationStatus;"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public StatusBarFooter(String saveLocation, int initialTotalPersons) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" setSyncStatus(SYNC_STATUS_INITIAL);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" setSaveLocation(\"./\" + saveLocation);"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" setTotalPersons(initialTotalPersons);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the clock used to determine the current time."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static void setClock(Clock clock) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" StatusBarFooter.clock \u003d clock;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Returns the clock currently in use."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static Clock getClock() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return clock;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void setSaveLocation(String location) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.saveLocationStatus.setText(location));"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" private void setSyncStatus(String status) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.syncStatus.setText(status));"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent abce) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" long now \u003d clock.millis();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" String lastUpdated \u003d new Date(now).toString();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(abce, \"Setting last updated status to \" + lastUpdated));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" setSyncStatus(String.format(SYNC_STATUS_UPDATED, lastUpdated));"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" this.setTotalPersons(abce.data.getPersonList().size());"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" private void setTotalPersons(int totalPersons) {"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.totalPersons.setText(totalPersons + \" person(s) listed\");"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":9,"-":79}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private Label taskAddress;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" taskAddress.textProperty().bind(Bindings.convert(task.taskAddressProperty()));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" taskAddress.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" assignCount.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" state.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof TaskCard)) {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" TaskCard card \u003d (TaskCard) other;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 task.equals(card.task);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return taskName;"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return description;"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return deadline;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" return priority;"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public Label getTaskAddress() {"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":47,"jeffreygohkw":4,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map("},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier + 1);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier - 1);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set new font size"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New task font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for task cards"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" * @param event"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" @Subscribe"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" private void handleTaskCardChangeFontSizeEvent (ChangeFontSizeEvent event) {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" case 0:"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" case 1:"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" case 2:"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it."},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestTaskEvent(JumpToListRequestTaskEvent event) {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in task list view\");"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}."},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" setText(null);"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":1,"Esilocke":114}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component"},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */"},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */"},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private static UserPrefs prefs;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");"},{"lineNumber":51,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" //Set the application icon."},{"lineNumber":54,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts"},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (Throwable e) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" prefs.setTheme(mainWindow.getTheme());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" mainWindow.hide();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters."},{"lineNumber":94,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog."},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,"},{"lineNumber":97,"author":{"gitId":"-"},"content":" String contentText) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" alert.getDialogPane().getStylesheets().add(String.format(\"view/\", prefs.getTheme()));"},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.initOwner(owner);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setTitle(title);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);"},{"lineNumber":105,"author":{"gitId":"-"},"content":" alert.showAndWait();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},"},{"lineNumber":110,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog."},{"lineNumber":111,"author":{"gitId":"-"},"content":" */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());"},{"lineNumber":115,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":116,"author":{"gitId":"-"},"content":" System.exit(1);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":122,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":124,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,"},{"lineNumber":125,"author":{"gitId":"-"},"content":" event.exception);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"-":118}},{"path":"src/main/java/seedu/address/ui/ViewPersonPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.HashMap;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.Random;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.Image;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.ImageView;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.VBox;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Contains the details of a person."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewPersonPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewPersonPanel.fxml\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" * Preset values for random selection later."},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private enum Colours {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private static Random randomNumber \u003d new Random();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyPerson person;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private VBox personPanel;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private Label name;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private Label phone;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" private Label address;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private Label remark;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private ImageView avatarImage;"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Label email;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel(ReadOnlyPerson person, int fontSizeMultiplier) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" this.person \u003d person;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" initializeAvatar();"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel() {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private void initializeWithPerson(ReadOnlyPerson person) {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" //author charlesgoh"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" * Sets avatar to a URL or filepath and falls back to the placeholder avatar if specified path fits in"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * neither categories"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" private void initializeAvatar() {"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String avatarPath \u003d person.getAvatar().value;"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to set avatar to image at specified URL or filepath\");"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" Image newImage \u003d new Image(avatarPath);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(newImage);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException ex) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" logger.warning(\"Saved path is not a valid filepath or URL path. Setting avatar to placeholder\");"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" Image imagePlaceholder \u003d new Image(\"file:docs/images/Avatar.png\");"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(imagePlaceholder);"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof ViewPersonPanel)) {"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" ViewPersonPanel card \u003d (ViewPersonPanel) other;"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" return person.equals(card.person);"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" public Label getName() {"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return name;"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public Label getPhone() {"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return phone;"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" public Label getAddress() {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" return address;"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public Label getRemark() {"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" return remark;"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public Label getEmail() {"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" return email;"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.person \u003d event.getNewSelection().person;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":28,"Esilocke":155}},{"path":"src/main/java/seedu/address/ui/ViewTaskPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Contains details of a Task."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class ViewTaskPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewTaskPanel.fxml\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Label taskName;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Label description;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Label deadline;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Label priority;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Label state;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyTask task;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel(ReadOnlyTask task) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (task !\u003d null) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(task);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel() {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private void initializeWithTask(ReadOnlyTask task) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(event.getNewSelection().task);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":67}},{"path":"src/test/data/ManualTesting/[W09-B2][Address++]TestScript.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++ - Test Script"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":":experimental:"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github[]"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":":tip-caption: :bulb:"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":":note-caption: :information_source:"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Getting Started"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"Ensure that you have the [W09-B2][Address++].jar file and the [W09-B2][Address++]SampleData.xml available on your computer and a working internet connection."},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Importing the test data"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":". Launch [W09-B2][Address++].jar."},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":". On initial launch, it should contain sample data of 6 different persons and 0 tasks."},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":". Type `open` to open a pop up window."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":". Navigate to the location of the [W09-B2][Address++]SampleData.xml file and click Open to open it."},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":". The sample data containing 20 different persons and 7 different tasks should be loaded."},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":". You are now ready to begin testing."},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d User Interface"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"* The Menu on the top of the screen contains 3 buttons: `File`, `Help` and `Font Size`."},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"* Below the menu is the command line, you can type your commands in here."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"* The box below the command line will show feedback when you type in commands, such as if the command is successful or if you have typed an erroneous command."},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"* The leftmost panel contains the list of persons in the address book."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* The middle panel contains the list of tasks in the address book."},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"* The rightmost panel contains either the details of the selected task or person, or the in-application browser."},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"* The bottom bar contains miscellaneous information about the address book, such as the file where the save data will be stored and the number of persons in the address book."},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Testing"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"Unless explicitly stated, each test section for each command is assumed to be carried out continuously. +"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"This means that you *should carry out the tests in the given order*. +"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"Each test section is carried out independently. This means that you are recommended to `undo` to restore the address book after each test section."},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d HelpCommand"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"*Opening the help window*"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"help"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"The User Guide appears in a separate window."},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"Opened help window."},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddPersonCommand"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"*Adding a person with all details*"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"add n/Svea Lisenhower p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"A person named Svea Lisenhower, with the details as stated above is added to the address book at index 21. +"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"New person added: +"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"Svea Lisenhower Phone: 98009621 Email: svea_li@example.com Address: Jurong West Street 65 Blk 667A Remark: Russian Exchange Student Avatar: https://example.com/image.png Tags:"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing compulsory details*"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"add p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing."},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"add: Adds a person to the address book. Parameters: n/NAME [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]... +"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"Example: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 r/Sells sea shells on the sea shore v/avatar-filepath.pngt/friends t/owesMoney"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing optional details*"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"add n/Kent Seethis"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"A person named Kent Seethis, but with no other details is added to the address book at index 22. +"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"New person added: +"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"Kent Seethis Phone: Email: Address: Remark: Avatar: Tags:"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid phones*"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl p/@"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid."},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid emails*"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl e/here"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid."},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid tags*"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl t/@"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified tag is invalid."},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTaskCommand"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"*Adding a task with all details*"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":"add task/ n/Buy pencils d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"A task named \"Buy pencils\", with a description of \"Buy 4 pencils from Popular\", with a deadline of \"Sat Nov 18 19:00:00 SGT 2017\","},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"a priority of \"Low\", and an address of \"West Point\" is added to the addresss book at index 8 in the task list. +"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"New task added: +"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"Buy pencils Description: Buy 4 pencils from Popular Deadline: Sat Nov 18 19:00:00 SGT 2017 Priority: Low Address: West Point \u003cIncomplete\u003e +"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing compulsory details*"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"add task/ d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing."},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"add task/: Adds a task to the address book. Parameters: n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS] +"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Example: add task/ n/Buy pencil d/Buy a new pencil from ABS by/10-10-2017 p/4 a/12 Kent Ridge Crescent, 119275"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing optional details*"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"A task with the name \"Create better task\", and no other details present is added to the address book at index 9 in the task list. +"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"New task added:"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"Create better task Description: Deadline: Priority: Address: \u003cIncomplete\u003e"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid deadlines*"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task by/AAAAAAAAAAAAA"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified deadline is invalid."},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid."},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid priority*"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task p/99999999"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified priority is invalid."},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTagCommand"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":"*Adding tags to persons in Address++*"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 2 t/friends"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":"The first two person in the person list will have the tag `friends` but it will not show in the person panel."},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"add tag/ t/friends"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will have the tag `friends`."},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons if all of them having the input tags*"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 3 t/friends"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since all of them have the tag `friends` already."},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"This tag already exists in all target persons in the current list."},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with invalid index*"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"add tag/ 23 t/friends"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list."},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid."},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with no input tags*"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 t/"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags."},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ListCommand"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":"*List all entries*"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"list"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"All tasks and persons in the address book are listed."},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Listed all entries"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditPersonCommand"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"*Editing a person for all entries*"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Laura Edelweiss p/1111111 a/House of Edelweiss e/laura@example.com r/Heiress to the House of Edelweiss t/Heiress v/https://example.com/validimage2.png"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"The person at index 7 (Elizabeth Edelweiss) is updated and now has new details matching the command."},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":"Edited Person: +"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"Laura Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":"*Editing a person with only 1 entry*"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Elizabath Edelweiss"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":"Only the name of the person at index 7 (Now named Laura Edelweiss) is changed to Elizabeth Edelweiss. All other details remain the same."},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":"Edited Person: +"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":"Elizabath Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":"edit 7 n/"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid."},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"Person names should only contain alphanumeric characters and spaces, and it should not be blank"},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"edit 7 p/ppp"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid."},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"edit 7 e/ppp"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid."},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":"edit 7 t/@@@@@@"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid."},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"*Editing a private person*"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"edit 11 n/Unhide me"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person\u0027s name is private."},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"At least one field to be edited must be public."},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid person*"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"edit 19999 n/Unhide me"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid."},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTaskCommand"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"*Editing a task for all entries*"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Paper Castle d/Castle Garde by/9 December 2017 8pm p/1 a/NUS"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The task at index 7 is updated and now has new details matching the command."},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"Edited Task: +"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"Paper Castle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"*Editing a task with only 1 entry*"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Sandcastle"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"Only the name of the task at index 7 (Now named Paper Castle) is changed to Sandcastle. All other details remain the same."},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"Edited Task: +"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"Sandcastle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*"},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid."},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"Task names can be in any format, and should not be blank"},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 by/AAAAAAAA"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid."},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid."},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 e/ppp"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid."},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid task*"},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"edit task/ 19999 n/Tiny, tiny house"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid."},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTagCommand"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag in the address book*"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends goodFriends"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"All instances of \"friends\" tags are replaced with \"goodFriends\" tags (at indexes 1, 3, 10, 11, 12, 17). +"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Replaced tag friends with goodFriends"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"*Renaming a non-existant tag in the address book*"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends nemesis"},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"As \"friends\" were renamed to \"goodFriends\", there are no more \"friends\" tags. +"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the tag \"friends\" is not in any of the contacts."},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"No such tag was found in the address book."},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with the exact same name*"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends goodFriends"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the two tag names are exactly the same. +"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"The new name of the tag cannot be the same as the old name."},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*"},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +"},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@"},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +"},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +"},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies"},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ChangePrivacyCommand"},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of public fields*"},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/true p/true e/true a/true r/true"},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":588,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as private, and the original data is hidden in the UI."},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":590,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: \u003cPrivate Name\u003e Phone: \u003cPrivate Phone\u003e Email: \u003cPrivate Email\u003e Address: \u003cPrivate Address\u003e Remark: \u003cPrivate Remark\u003e Avatar: Tags: [project]"},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":596,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 n/false"},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":599,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s name, being originally public, remains public."},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:"},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of private fields*"},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/false p/false e/false a/false r/false"},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as public, revealing all the original data in the UI."},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]"},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 a/true"},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s address, being originally private, remains private."},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:"},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of empty fields*"},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/true"},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to private."},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: \u003cPrivate Remark\u003e Avatar: Tags: [GEQ2000]"},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/false"},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to public, but since it is empty, it does not display any data."},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":655,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":656,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]"},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d PrivacyLevelCommand"},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":661,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy level*"},{"lineNumber":662,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":664,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":665,"author":{"gitId":"Esilocke"},"content":"privacylevel 1"},{"lineNumber":666,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":667,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":668,"author":{"gitId":"Esilocke"},"content":"All persons are listed with any private data revealed."},{"lineNumber":669,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":670,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":671,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 1."},{"lineNumber":673,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":674,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":676,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":677,"author":{"gitId":"Esilocke"},"content":"privacylevel 3"},{"lineNumber":678,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":680,"author":{"gitId":"Esilocke"},"content":"Lists all persons except those that have at least one private field."},{"lineNumber":681,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":682,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":683,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":684,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 3."},{"lineNumber":685,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":687,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":688,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":689,"author":{"gitId":"Esilocke"},"content":"privacylevel 2"},{"lineNumber":690,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":691,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":692,"author":{"gitId":"Esilocke"},"content":"List all persons. Fields that are private will have their data hidden."},{"lineNumber":693,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":694,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":695,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":696,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 2."},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":698,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":699,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteCommand"},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":701,"author":{"gitId":"Esilocke"},"content":"*Setting a person in the Address++ to be the favourite person*"},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":703,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":704,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":705,"author":{"gitId":"Esilocke"},"content":"list +"},{"lineNumber":706,"author":{"gitId":"Esilocke"},"content":"favourite 2"},{"lineNumber":707,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":708,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":709,"author":{"gitId":"Esilocke"},"content":"The 2nd person in the Address++ will be favoured and a heart picture will be shown next to his name."},{"lineNumber":710,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":711,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"Favourited Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]"},{"lineNumber":713,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person if he has been favoured*"},{"lineNumber":715,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":716,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":717,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"list +"},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"favourite 1"},{"lineNumber":720,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":721,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":722,"author":{"gitId":"Esilocke"},"content":"An error message will display since the first person in the Address++ has been favoured."},{"lineNumber":723,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":725,"author":{"gitId":"Esilocke"},"content":"Person is already favourited."},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":727,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person with invalid index*"},{"lineNumber":728,"author":{"gitId":"-"},"content":""},{"lineNumber":729,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":730,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":731,"author":{"gitId":"Esilocke"},"content":"favourite 56"},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":733,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"An error message will display since there is no 56th person in the current list."},{"lineNumber":735,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":736,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":738,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteListCommand"},{"lineNumber":740,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":"*Listing all favoured persons in the Address++*"},{"lineNumber":742,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":743,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":745,"author":{"gitId":"Esilocke"},"content":"showfavourite"},{"lineNumber":746,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":747,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"List all the favoured persons."},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":750,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons."},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":753,"author":{"gitId":"Esilocke"},"content":"*Listing empty list with no favoured person in the Address++*"},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":755,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"showfavourite"},{"lineNumber":758,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":759,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":760,"author":{"gitId":"Esilocke"},"content":"An empty list but with successful message."},{"lineNumber":761,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons."},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindPersonCommand"},{"lineNumber":766,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":767,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*"},{"lineNumber":768,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":"find plumley"},{"lineNumber":772,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":773,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":774,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\", case insensitive, in their name are displayed. +"},{"lineNumber":775,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":776,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":777,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":778,"author":{"gitId":"Esilocke"},"content":"2 persons listed!"},{"lineNumber":779,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":780,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":781,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*"},{"lineNumber":782,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":783,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":784,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":785,"author":{"gitId":"Esilocke"},"content":"find plumley edelweiss"},{"lineNumber":786,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":787,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\" or \"edelweiss\", case insensitive, in their name are displayed. +"},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":"4 persons listed!"},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindTaskCommand"},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*"},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":"find task/ on"},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\", case insensitive, in their name or description are displayed. +"},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!"},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*"},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"find task/ on stew"},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description are displayed. +"},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":820,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"3 tasks listed!"},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with priority search*"},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"find task/ on stew p/4"},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and have a priority of \"High\" or above are displayed. +"},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!"},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state search*"},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true"},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and are currently complete are displayed. +"},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!"},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state and priority search*"},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true p/3"},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, with a priority of at least \"medium\", and are currently complete are displayed. +"},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":863,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":864,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!"},{"lineNumber":865,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":866,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d TagListCommand"},{"lineNumber":868,"author":{"gitId":"-"},"content":""},{"lineNumber":869,"author":{"gitId":"-"},"content":"*Listing all the tag in the Address++*"},{"lineNumber":870,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":871,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":873,"author":{"gitId":"-"},"content":"showtag"},{"lineNumber":874,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":875,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":876,"author":{"gitId":"-"},"content":"Tags contain capital letter will displayed in front. All the tags (with or without capital letter) will be displayed in alphabetical order."},{"lineNumber":877,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":878,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":879,"author":{"gitId":"-"},"content":"All the tags are here: \u003cGEQ2000\u003e \u003cacquaintance\u003e \u003cclassmates\u003e \u003cenemy\u003e \u003cfamily\u003e \u003cfriends\u003e \u003cneighbours\u003e \u003cproject\u003e \u003csecretive\u003e \u003ctutee\u003e"},{"lineNumber":880,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":881,"author":{"gitId":"-"},"content":"*Listing empty tag list with no tags in Address++*"},{"lineNumber":882,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":883,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":884,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":885,"author":{"gitId":"-"},"content":"showtag"},{"lineNumber":886,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":887,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":888,"author":{"gitId":"-"},"content":"There is no tag list."},{"lineNumber":889,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":890,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":891,"author":{"gitId":"-"},"content":"There is no tag!"},{"lineNumber":892,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":893,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d FindTagCommand"},{"lineNumber":894,"author":{"gitId":"-"},"content":""},{"lineNumber":895,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with specific tags*"},{"lineNumber":896,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":897,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":898,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":899,"author":{"gitId":"-"},"content":"find tag/ friends"},{"lineNumber":900,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":902,"author":{"gitId":"-"},"content":"List all the persons who have tag `friends`."},{"lineNumber":903,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":904,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":905,"author":{"gitId":"-"},"content":"6 persons listed!"},{"lineNumber":906,"author":{"gitId":"-"},"content":""},{"lineNumber":907,"author":{"gitId":"-"},"content":"*Finding person in the Address++ without specific tags*"},{"lineNumber":908,"author":{"gitId":"-"},"content":""},{"lineNumber":909,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":910,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":911,"author":{"gitId":"-"},"content":"find tag/ /friends"},{"lineNumber":912,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":913,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":914,"author":{"gitId":"-"},"content":"List all the persons without tag `friends`."},{"lineNumber":915,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":916,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":917,"author":{"gitId":"-"},"content":"14 persons listed!"},{"lineNumber":918,"author":{"gitId":"-"},"content":""},{"lineNumber":919,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with \"TAGA\" but without \"TAGB\"*"},{"lineNumber":920,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":921,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":922,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":923,"author":{"gitId":"-"},"content":"find tag/ friends /classmates"},{"lineNumber":924,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":925,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":926,"author":{"gitId":"-"},"content":"Persons have tag `friends` but do not have tag `classmates` will be listed."},{"lineNumber":927,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":928,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":929,"author":{"gitId":"-"},"content":"5 persons listed!"},{"lineNumber":930,"author":{"gitId":"-"},"content":""},{"lineNumber":931,"author":{"gitId":"-"},"content":"*Failing to find persons in the Address++ with valid tags*"},{"lineNumber":932,"author":{"gitId":"-"},"content":""},{"lineNumber":933,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":934,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":935,"author":{"gitId":"-"},"content":"find tag/ fff"},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":937,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":938,"author":{"gitId":"-"},"content":"Although it is a valid tag, there is no person with tag `fff`. Hence, no person will be listed."},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":940,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":941,"author":{"gitId":"-"},"content":"0 persons listed!"},{"lineNumber":942,"author":{"gitId":"-"},"content":""},{"lineNumber":943,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeletePersonCommand"},{"lineNumber":944,"author":{"gitId":"-"},"content":""},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*"},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"delete 20"},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":"The contact at index 20, Myuria Plumley is deleted from the address book. +"},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"Deleted Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]"},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*"},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"delete 2000"},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":967,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTaskCommand"},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*"},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"delete task/ 7"},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is deleted from the address book. +"},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"Deleted Task: Paper Model for project Description: Paper model of Himeji castle for project. Myucel/Myuria twins in charge Deadline: Wed Dec 13 17:00:00 SGT 2017 Priority: Medium Address: \u003cIncomplete\u003e"},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*"},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"delete task/ 7000"},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTagCommand"},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"*Deleting tags from persons in the Address++*"},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/friends"},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"The tag `friends` for the first person will be deleted. The rest tags remain no change."},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]"},{"lineNumber":1016,"author":{"gitId":"-"},"content":""},{"lineNumber":1017,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"delete tag/ t/friends"},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will not have the tag `friends`."},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]"},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons if none of them have the input tags*"},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/neighbour"},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"An error message will display since target persons do not have tag `neighbour`."},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"The target persons do not have input tags."},{"lineNumber":1038,"author":{"gitId":"-"},"content":""},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with invalid index*"},{"lineNumber":1040,"author":{"gitId":"-"},"content":""},{"lineNumber":1041,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":"delete tag/ 23 t/friends"},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1045,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list."},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1048,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1049,"author":{"gitId":"-"},"content":"The person index provided is invalid"},{"lineNumber":1050,"author":{"gitId":"-"},"content":""},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with no input tags*"},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 t/"},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags."},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":1062,"author":{"gitId":"-"},"content":""},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectPersonCommand"},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"*Selecting a person*"},{"lineNumber":1066,"author":{"gitId":"-"},"content":""},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1068,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"select 19"},{"lineNumber":1070,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1071,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1072,"author":{"gitId":"Esilocke"},"content":"The person at index 19, \"Myucel Plumley\" is selected, and her details are listed in the UI panel. +"},{"lineNumber":1073,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1074,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1075,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1076,"author":{"gitId":"Esilocke"},"content":"Selected Person: 19"},{"lineNumber":1077,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1078,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1079,"author":{"gitId":"Esilocke"},"content":"*Selecting a person with an invalid index*"},{"lineNumber":1080,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1081,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1082,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1083,"author":{"gitId":"Esilocke"},"content":"select 19999"},{"lineNumber":1084,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1085,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1086,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1087,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1088,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1089,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1090,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":1091,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1093,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectTaskCommand"},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1095,"author":{"gitId":"Esilocke"},"content":"*Selecting a task*"},{"lineNumber":1096,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"select task/ 7"},{"lineNumber":1100,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1102,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is selected and its details are shown in the UI panel. +"},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1104,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1105,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Selected Task: 7"},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"*Selecting a task with an invalid index*"},{"lineNumber":1110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1111,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"select task/ 7000"},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d LocateCommand"},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":"*Locating a person\u0027s address on Google Maps*"},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":"locate 1"},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and searches for the first person\u0027s address. +"},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"Searching for Person at Index: 1"},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":"*Failing to locate a person with no address*"},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":"locate 2"},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":"An error message is printed, as the person at index 2 has no address. +"},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":"Person 2 has no Address"},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"*Failing to locate a person with a private address*"},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"locate 6"},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +"},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1164,"author":{"gitId":"Esilocke"},"content":"Person 6 has a Private Address"},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d NavigateCommand"},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Person*"},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"navigate fp/1 tp/3"},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first person\u0027s address to the third person\u0027s address. +"},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 30 Geylang Street 29, #06-40 to Blk 30 Lorong 3 Serangoon Gardens, #07-18"},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Task*"},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 tt/1"},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to the first task\u0027s address. +"},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to Blk 45 Aljunied Street 85, #11-31"},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1197,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Address*"},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 ta/NUS"},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to NUS. +"},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to NUS"},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Person*"},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tp/3"},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the third person\u0027s address. +"},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1222,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to Blk 30 Lorong 3 Serangoon Gardens, #07-18"},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Task*"},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tt/4"},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the fourth task\u0027s address. +"},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1236,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to SR-1, COM-1 NUS"},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Address*"},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1243,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 ta/NUS"},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to NUS. +"},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1249,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to NUS"},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Person*"},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":"navigate fa/NUS tp/3"},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NUS to the third person\u0027s address. +"},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1263,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":"Navigating from NUS to Blk 30 Lorong 3 Serangoon Gardens, #07-18"},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Task*"},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":"navigate fa/NTU tt/4"},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NTU to the fourth task\u0027s address. +"},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1276,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1277,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1278,"author":{"gitId":"Esilocke"},"content":"Navigating from NTU to SR-1, COM-1 NUS"},{"lineNumber":1279,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1280,"author":{"gitId":"-"},"content":""},{"lineNumber":1281,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Address*"},{"lineNumber":1282,"author":{"gitId":"-"},"content":""},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1284,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1285,"author":{"gitId":"Esilocke"},"content":"navigate fa/SMU ta/NUS"},{"lineNumber":1286,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1287,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1288,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from SMU to NUS. +"},{"lineNumber":1289,"author":{"gitId":"-"},"content":""},{"lineNumber":1290,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1291,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":"Navigating from SMU to NUS"},{"lineNumber":1293,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1294,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1295,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has a private address*"},{"lineNumber":1296,"author":{"gitId":"-"},"content":""},{"lineNumber":1297,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1298,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1299,"author":{"gitId":"Esilocke"},"content":"navigate fp/6 ta/Changi Airport"},{"lineNumber":1300,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1301,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1302,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +"},{"lineNumber":1303,"author":{"gitId":"-"},"content":""},{"lineNumber":1304,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1305,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1306,"author":{"gitId":"Esilocke"},"content":"Address of the Person at index 6 is private."},{"lineNumber":1307,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1308,"author":{"gitId":"-"},"content":""},{"lineNumber":1309,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has no address*"},{"lineNumber":1310,"author":{"gitId":"-"},"content":""},{"lineNumber":1311,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1312,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1313,"author":{"gitId":"Esilocke"},"content":"navigate fp/8 ta/Changi Airport"},{"lineNumber":1314,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1315,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1316,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 8 has no address. +"},{"lineNumber":1317,"author":{"gitId":"-"},"content":""},{"lineNumber":1318,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1319,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"Person at index 8 does not have an address."},{"lineNumber":1321,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1322,"author":{"gitId":"-"},"content":""},{"lineNumber":1323,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a task has no address*"},{"lineNumber":1324,"author":{"gitId":"-"},"content":""},{"lineNumber":1325,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1326,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"navigate ft/2 ta/Changi Airport"},{"lineNumber":1328,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1329,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1330,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the task at index 2 has no address. +"},{"lineNumber":1331,"author":{"gitId":"-"},"content":""},{"lineNumber":1332,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1333,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"Task at index 2 does not have an address."},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1336,"author":{"gitId":"-"},"content":""},{"lineNumber":1337,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*"},{"lineNumber":1338,"author":{"gitId":"-"},"content":""},{"lineNumber":1339,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1340,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"navigate"},{"lineNumber":1342,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1343,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1345,"author":{"gitId":"-"},"content":""},{"lineNumber":1346,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1348,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":1349,"author":{"gitId":"Esilocke"},"content":"navigate: Get directions from one address to another. +"},{"lineNumber":1350,"author":{"gitId":"Esilocke"},"content":"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three) AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three) +"},{"lineNumber":1351,"author":{"gitId":"Esilocke"},"content":"Example: navigate fp/2 ta/University Town"},{"lineNumber":1352,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1353,"author":{"gitId":"-"},"content":""},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"*Error when no address after a fa/ or ta/ prefix is entered*"},{"lineNumber":1355,"author":{"gitId":"-"},"content":""},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"navigate fa/ tp/1"},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1360,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1361,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1362,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1363,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1364,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1365,"author":{"gitId":"Esilocke"},"content":"Location can take any value, and it should not be blank"},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1367,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"*Error when no integer after a fp/, tp/, ft/ or tt/ prefix is entered*"},{"lineNumber":1369,"author":{"gitId":"-"},"content":""},{"lineNumber":1370,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1371,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1372,"author":{"gitId":"Esilocke"},"content":"navigate ft/ tp/1"},{"lineNumber":1373,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1374,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1376,"author":{"gitId":"-"},"content":""},{"lineNumber":1377,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"Index is not a non-zero unsigned integer."},{"lineNumber":1380,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1381,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetCompleteCommand"},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as complete*"},{"lineNumber":1385,"author":{"gitId":"-"},"content":""},{"lineNumber":1386,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1387,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":"setcomplete 3"},{"lineNumber":1389,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1390,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1391,"author":{"gitId":"Esilocke"},"content":"The task at index 3, \"Visit David\u0027s house\" is marked as completed. +"},{"lineNumber":1392,"author":{"gitId":"-"},"content":""},{"lineNumber":1393,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"Marked Task as completed: Visit David\u0027s house Description: Visit to David Li\u0027s house next Saturday Deadline: Sat Nov 18 12:00:00 SGT 2017 Priority: Low Address: Blk 436 Serangoon Gardens Street 26, #16-43 \u003cIncomplete\u003e"},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1397,"author":{"gitId":"-"},"content":""},{"lineNumber":1398,"author":{"gitId":"Esilocke"},"content":"*Marking an already complete task as complete*"},{"lineNumber":1399,"author":{"gitId":"-"},"content":""},{"lineNumber":1400,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1401,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1402,"author":{"gitId":"Esilocke"},"content":"setcomplete 3"},{"lineNumber":1403,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1404,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1405,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already complete +"},{"lineNumber":1406,"author":{"gitId":"-"},"content":""},{"lineNumber":1407,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"The specified task is already completed"},{"lineNumber":1410,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1411,"author":{"gitId":"-"},"content":""},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*"},{"lineNumber":1413,"author":{"gitId":"-"},"content":""},{"lineNumber":1414,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1415,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1416,"author":{"gitId":"Esilocke"},"content":"setcomplete 7000"},{"lineNumber":1417,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1418,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1419,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1420,"author":{"gitId":"-"},"content":""},{"lineNumber":1421,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1422,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1423,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1425,"author":{"gitId":"-"},"content":""},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetInompleteCommand"},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1428,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as incomplete*"},{"lineNumber":1429,"author":{"gitId":"-"},"content":""},{"lineNumber":1430,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1431,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1432,"author":{"gitId":"Esilocke"},"content":"setincomplete 1"},{"lineNumber":1433,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1434,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"The task at index 1, \"Tuition\" is marked as incomplete. +"},{"lineNumber":1436,"author":{"gitId":"-"},"content":""},{"lineNumber":1437,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1438,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1439,"author":{"gitId":"Esilocke"},"content":"Marked Task as incomplete: Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1440,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1441,"author":{"gitId":"-"},"content":""},{"lineNumber":1442,"author":{"gitId":"Esilocke"},"content":"*Marking an already incomplete task as incomplete*"},{"lineNumber":1443,"author":{"gitId":"-"},"content":""},{"lineNumber":1444,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"setincomplete 1"},{"lineNumber":1447,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1448,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1449,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already incomplete +"},{"lineNumber":1450,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1451,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1452,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1453,"author":{"gitId":"Esilocke"},"content":"The specified task is already incomplete"},{"lineNumber":1454,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1455,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*"},{"lineNumber":1457,"author":{"gitId":"-"},"content":""},{"lineNumber":1458,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1459,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1460,"author":{"gitId":"Esilocke"},"content":"setincomplete 7000"},{"lineNumber":1461,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1462,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1463,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1464,"author":{"gitId":"-"},"content":""},{"lineNumber":1465,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1466,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1467,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1468,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1469,"author":{"gitId":"-"},"content":""},{"lineNumber":1470,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AssignCommand"},{"lineNumber":1471,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1472,"author":{"gitId":"Esilocke"},"content":"*Assigning 1 contact to a task*"},{"lineNumber":1473,"author":{"gitId":"-"},"content":""},{"lineNumber":1474,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1475,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1476,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1"},{"lineNumber":1477,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1478,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1479,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Myucel Plumley is assigned to the first task, Tuition. The task now has 4 people assigned to it instead of 3. +"},{"lineNumber":1480,"author":{"gitId":"-"},"content":""},{"lineNumber":1481,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1482,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1483,"author":{"gitId":"Esilocke"},"content":"Assigned 1 people to +"},{"lineNumber":1484,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1485,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1486,"author":{"gitId":"-"},"content":""},{"lineNumber":1487,"author":{"gitId":"Esilocke"},"content":"*Assigning multiple contacts to a task*"},{"lineNumber":1488,"author":{"gitId":"-"},"content":""},{"lineNumber":1489,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1490,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1491,"author":{"gitId":"Esilocke"},"content":"assign 18 20 to/1"},{"lineNumber":1492,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1493,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1494,"author":{"gitId":"Esilocke"},"content":"The contacts at index 18 and 20, Myuria Plumley and Clarissa Liselotte are assigned to the first task, Tuition. The task now has 6 people assigned to it instead of 4. +"},{"lineNumber":1495,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1496,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1497,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1498,"author":{"gitId":"Esilocke"},"content":"Assigned 2 people to +"},{"lineNumber":1499,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1500,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1501,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1502,"author":{"gitId":"Esilocke"},"content":"*Assigning contacts who are already assigned to a task*"},{"lineNumber":1503,"author":{"gitId":"-"},"content":""},{"lineNumber":1504,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1505,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1506,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1"},{"lineNumber":1507,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1508,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1509,"author":{"gitId":"Esilocke"},"content":"Myucel Plumley was already assigned to the task Tuition. An error message is printed out as she is already assigned to the task. +"},{"lineNumber":1510,"author":{"gitId":"-"},"content":""},{"lineNumber":1511,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1512,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1513,"author":{"gitId":"Esilocke"},"content":"All the specified persons are already assigned to this task"},{"lineNumber":1514,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1515,"author":{"gitId":"-"},"content":""},{"lineNumber":1516,"author":{"gitId":"Esilocke"},"content":"*Assigning no contacts to a task*"},{"lineNumber":1517,"author":{"gitId":"-"},"content":""},{"lineNumber":1518,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1519,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1520,"author":{"gitId":"Esilocke"},"content":"assign to/1"},{"lineNumber":1521,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1522,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1523,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified."},{"lineNumber":1524,"author":{"gitId":"-"},"content":""},{"lineNumber":1525,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1526,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1527,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified"},{"lineNumber":1528,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1529,"author":{"gitId":"-"},"content":""},{"lineNumber":1530,"author":{"gitId":"Esilocke"},"content":"*Assigning to a task with an invalid index*"},{"lineNumber":1531,"author":{"gitId":"-"},"content":""},{"lineNumber":1532,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1533,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1534,"author":{"gitId":"Esilocke"},"content":"assign 5 to/7000"},{"lineNumber":1535,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1536,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1537,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1538,"author":{"gitId":"-"},"content":""},{"lineNumber":1539,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1540,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1541,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1542,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1543,"author":{"gitId":"-"},"content":""},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DismissCommand"},{"lineNumber":1545,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1546,"author":{"gitId":"Esilocke"},"content":"*Dismissing 1 contact from a task*"},{"lineNumber":1547,"author":{"gitId":"-"},"content":""},{"lineNumber":1548,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1549,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1550,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1"},{"lineNumber":1551,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1552,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1553,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Alex Yeoh is assigned to the first task, Tuition. The task now has 2 people assigned to it instead of 3. +"},{"lineNumber":1554,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1555,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1556,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1557,"author":{"gitId":"Esilocke"},"content":"Dismissed 1 people from task +"},{"lineNumber":1558,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1559,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1560,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1561,"author":{"gitId":"Esilocke"},"content":"*Dismissing multiple contacts from a task*"},{"lineNumber":1562,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1563,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1564,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1565,"author":{"gitId":"Esilocke"},"content":"dismiss 6 8 from/1"},{"lineNumber":1566,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1567,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1568,"author":{"gitId":"Esilocke"},"content":"The contacts at index 6 and 8, David Ng and Ima Hidearu are assigned to the first task, Tuition. The task now has 0 people assigned to it instead of 2. +"},{"lineNumber":1569,"author":{"gitId":"-"},"content":""},{"lineNumber":1570,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1571,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1572,"author":{"gitId":"Esilocke"},"content":"Dismissed 2 people from task +"},{"lineNumber":1573,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1574,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1575,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1576,"author":{"gitId":"Esilocke"},"content":"*Dismissing contacts who are already assigned from a task*"},{"lineNumber":1577,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1578,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1579,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1580,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1"},{"lineNumber":1581,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1582,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1583,"author":{"gitId":"Esilocke"},"content":"There are no contacts assigned to the task Tuition."},{"lineNumber":1584,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as none of the specified contacts were assigned to the task."},{"lineNumber":1585,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1586,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1587,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1588,"author":{"gitId":"Esilocke"},"content":"None of the specified persons are assigned to this task"},{"lineNumber":1589,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1590,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1591,"author":{"gitId":"Esilocke"},"content":"*Dismissing no contacts from a task*"},{"lineNumber":1592,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1593,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1594,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1595,"author":{"gitId":"Esilocke"},"content":"dismiss from/1"},{"lineNumber":1596,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1597,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1598,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified."},{"lineNumber":1599,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1600,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1601,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1602,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified"},{"lineNumber":1603,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1604,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1605,"author":{"gitId":"Esilocke"},"content":"*Dismissing from a task with an invalid index*"},{"lineNumber":1606,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1607,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1608,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1609,"author":{"gitId":"Esilocke"},"content":"dismiss 5 from/7000"},{"lineNumber":1610,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1611,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1612,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1613,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1614,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1615,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1616,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1617,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1618,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1619,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ViewAssignCommand"},{"lineNumber":1620,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1621,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with no persons assigned to it*"},{"lineNumber":1622,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1623,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1624,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1625,"author":{"gitId":"Esilocke"},"content":"viewassign 2"},{"lineNumber":1626,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1627,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1628,"author":{"gitId":"Esilocke"},"content":"No contacts are listed +"},{"lineNumber":1629,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1630,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1631,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1632,"author":{"gitId":"-"},"content":"0 persons listed!"},{"lineNumber":1633,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1634,"author":{"gitId":"-"},"content":""},{"lineNumber":1635,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with some persons assigned to it*"},{"lineNumber":1636,"author":{"gitId":"-"},"content":""},{"lineNumber":1637,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1638,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1639,"author":{"gitId":"Esilocke"},"content":"viewassign 1"},{"lineNumber":1640,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1641,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1642,"author":{"gitId":"Esilocke"},"content":"3 contacts are listed, Alex Yeoh, David Ng, Ima Hidearu +"},{"lineNumber":1643,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1644,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1645,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1646,"author":{"gitId":"Esilocke"},"content":"3 persons listed!"},{"lineNumber":1647,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1648,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1649,"author":{"gitId":"Esilocke"},"content":"*Viewing from a task with an invalid index*"},{"lineNumber":1650,"author":{"gitId":"-"},"content":""},{"lineNumber":1651,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1652,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1653,"author":{"gitId":"Esilocke"},"content":"viewassign 99999"},{"lineNumber":1654,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1655,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1656,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1657,"author":{"gitId":"-"},"content":""},{"lineNumber":1658,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1659,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1660,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1661,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1662,"author":{"gitId":"-"},"content":""},{"lineNumber":1663,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ThemeCommand"},{"lineNumber":1664,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1665,"author":{"gitId":"Esilocke"},"content":"*Changing the theme of the address book*"},{"lineNumber":1666,"author":{"gitId":"-"},"content":""},{"lineNumber":1667,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1668,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1669,"author":{"gitId":"Esilocke"},"content":"theme light"},{"lineNumber":1670,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1671,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1672,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a bright colour. +"},{"lineNumber":1673,"author":{"gitId":"-"},"content":""},{"lineNumber":1674,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1675,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1676,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: light"},{"lineNumber":1677,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1678,"author":{"gitId":"-"},"content":""},{"lineNumber":1679,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1680,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1681,"author":{"gitId":"Esilocke"},"content":"theme dark"},{"lineNumber":1682,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1683,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1684,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a dark colour.+"},{"lineNumber":1685,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1686,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1687,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: dark"},{"lineNumber":1688,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1689,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1690,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*"},{"lineNumber":1691,"author":{"gitId":"-"},"content":""},{"lineNumber":1692,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1693,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1694,"author":{"gitId":"Esilocke"},"content":"theme"},{"lineNumber":1695,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1696,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1697,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1698,"author":{"gitId":"-"},"content":""},{"lineNumber":1699,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1700,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1701,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":1702,"author":{"gitId":"Esilocke"},"content":"theme: Sets the theme based on the specified style. +"},{"lineNumber":1703,"author":{"gitId":"Esilocke"},"content":"Parameters: STYLE +"},{"lineNumber":1704,"author":{"gitId":"Esilocke"},"content":"Example: theme dark"},{"lineNumber":1705,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1706,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1707,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d HistoryCommand"},{"lineNumber":1708,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1709,"author":{"gitId":"Esilocke"},"content":"*Lists all commands done in reverser chronological order*"},{"lineNumber":1710,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1711,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1712,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1713,"author":{"gitId":"Esilocke"},"content":"notacommand +"},{"lineNumber":1714,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +"},{"lineNumber":1715,"author":{"gitId":"Esilocke"},"content":"history"},{"lineNumber":1716,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1717,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1718,"author":{"gitId":"Esilocke"},"content":"The two previous commands are listed in the box below the command line in reverse chronological order from top to bottom. +"},{"lineNumber":1719,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1720,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1721,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1722,"author":{"gitId":"Esilocke"},"content":"Entered commands (from most recent to earliest): +"},{"lineNumber":1723,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +"},{"lineNumber":1724,"author":{"gitId":"Esilocke"},"content":"notacommand"},{"lineNumber":1725,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1726,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1727,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d UndoCommand"},{"lineNumber":1728,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1729,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1730,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1731,"author":{"gitId":"Esilocke"},"content":"delete 1 +"},{"lineNumber":1732,"author":{"gitId":"Esilocke"},"content":"undo"},{"lineNumber":1733,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1734,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1735,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo. +"},{"lineNumber":1736,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1737,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1738,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1739,"author":{"gitId":"Esilocke"},"content":"Undo success!"},{"lineNumber":1740,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1741,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1742,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1743,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1744,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1745,"author":{"gitId":"Esilocke"},"content":"add n/Reed Richards p/94444444 e/reed@futurefoundation.com a/Baxter Building r/Loves to stretch +"},{"lineNumber":1746,"author":{"gitId":"Esilocke"},"content":"undo"},{"lineNumber":1747,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1748,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1749,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo."},{"lineNumber":1750,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1751,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1752,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1753,"author":{"gitId":"Esilocke"},"content":"Undo success!"},{"lineNumber":1754,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1755,"author":{"gitId":"-"},"content":""},{"lineNumber":1756,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UnfavouriteCommand"},{"lineNumber":1757,"author":{"gitId":"-"},"content":""},{"lineNumber":1758,"author":{"gitId":"-"},"content":"*Setting a favoured person in the Address++ to be the unfavoured person*"},{"lineNumber":1759,"author":{"gitId":"-"},"content":""},{"lineNumber":1760,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1761,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1762,"author":{"gitId":"-"},"content":"list +"},{"lineNumber":1763,"author":{"gitId":"-"},"content":"unfavourite 1"},{"lineNumber":1764,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1765,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1766,"author":{"gitId":"-"},"content":"The 1st person in the Address++ will be unfavoured and the heart picture will disappear."},{"lineNumber":1767,"author":{"gitId":"-"},"content":""},{"lineNumber":1768,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1769,"author":{"gitId":"-"},"content":"Unfavourited Person: Alex Yeoh Phone: 87438807 Email: alexyeoh@example.com Address: Blk 30 Geylang Street 29, #06-40 Remark: Cheerful lad Avatar: Tags: [friends]"},{"lineNumber":1770,"author":{"gitId":"-"},"content":""},{"lineNumber":1771,"author":{"gitId":"-"},"content":"*Failing to set a unfavored person if he has not been favoured*"},{"lineNumber":1772,"author":{"gitId":"-"},"content":""},{"lineNumber":1773,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1774,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1775,"author":{"gitId":"-"},"content":"list +"},{"lineNumber":1776,"author":{"gitId":"-"},"content":"unfavourite 2"},{"lineNumber":1777,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1778,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1779,"author":{"gitId":"-"},"content":"An error message will display since the second person in the Address++ has bot been favoured."},{"lineNumber":1780,"author":{"gitId":"-"},"content":""},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1782,"author":{"gitId":"-"},"content":"Person is not favourited yet."},{"lineNumber":1783,"author":{"gitId":"-"},"content":""},{"lineNumber":1784,"author":{"gitId":"-"},"content":"*Failing to set a unfavoured person with invalid index*"},{"lineNumber":1785,"author":{"gitId":"-"},"content":""},{"lineNumber":1786,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1787,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1788,"author":{"gitId":"-"},"content":"unfavourite 56"},{"lineNumber":1789,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1790,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1791,"author":{"gitId":"-"},"content":"An error message will display since there is no 56th person in the current list."},{"lineNumber":1792,"author":{"gitId":"-"},"content":""},{"lineNumber":1793,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1794,"author":{"gitId":"-"},"content":"The person index provided is invalid"},{"lineNumber":1795,"author":{"gitId":"-"},"content":""},{"lineNumber":1796,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d RedoCommand"},{"lineNumber":1797,"author":{"gitId":"-"},"content":""},{"lineNumber":1798,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1799,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1800,"author":{"gitId":"Esilocke"},"content":"delete 1 +"},{"lineNumber":1801,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1802,"author":{"gitId":"Esilocke"},"content":"redo"},{"lineNumber":1803,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo and deleted again after a redo. +"},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1809,"author":{"gitId":"Esilocke"},"content":"Redo success!"},{"lineNumber":1810,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1811,"author":{"gitId":"-"},"content":""},{"lineNumber":1812,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1813,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1814,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1815,"author":{"gitId":"Esilocke"},"content":"add n/Peter Parker p/92241783 e/ceo@parkerindustries.com a/New York City r/Top 10 smartest people in the world +"},{"lineNumber":1816,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1817,"author":{"gitId":"Esilocke"},"content":"redo"},{"lineNumber":1818,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1819,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo and added again with a redo."},{"lineNumber":1821,"author":{"gitId":"-"},"content":""},{"lineNumber":1822,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1823,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1824,"author":{"gitId":"Esilocke"},"content":"Redo success!"},{"lineNumber":1825,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1826,"author":{"gitId":"-"},"content":""},{"lineNumber":1827,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1828,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book to its original state before continuing with testing."},{"lineNumber":1829,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1830,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ClearCommand"},{"lineNumber":1831,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1832,"author":{"gitId":"Esilocke"},"content":"*Clearing all entries*"},{"lineNumber":1833,"author":{"gitId":"-"},"content":""},{"lineNumber":1834,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1835,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1836,"author":{"gitId":"Esilocke"},"content":"clear"},{"lineNumber":1837,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1838,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1839,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +"},{"lineNumber":1840,"author":{"gitId":"-"},"content":""},{"lineNumber":1841,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1843,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!"},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1845,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1846,"author":{"gitId":"Esilocke"},"content":"*Clearing persons only*"},{"lineNumber":1847,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1848,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1849,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1850,"author":{"gitId":"Esilocke"},"content":"clear person/"},{"lineNumber":1851,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1853,"author":{"gitId":"Esilocke"},"content":"All persons vanish from the leftmost column, leaving them empty. +"},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1855,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1856,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1857,"author":{"gitId":"Esilocke"},"content":"All contacts have been cleared!"},{"lineNumber":1858,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1859,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1860,"author":{"gitId":"Esilocke"},"content":"*Clearing tasks only*"},{"lineNumber":1861,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1862,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1863,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1864,"author":{"gitId":"Esilocke"},"content":"clear task/"},{"lineNumber":1865,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1866,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1867,"author":{"gitId":"Esilocke"},"content":"All tasks vanish from the middle columns, leaving them empty. +"},{"lineNumber":1868,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1869,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1870,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1871,"author":{"gitId":"Esilocke"},"content":"All tasks have been cleared!"},{"lineNumber":1872,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1873,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1874,"author":{"gitId":"Esilocke"},"content":"*Both person and task specified*"},{"lineNumber":1875,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1876,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1877,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1878,"author":{"gitId":"Esilocke"},"content":"clear task/ person/ task/ task/ person/"},{"lineNumber":1879,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1880,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1881,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +"},{"lineNumber":1882,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1883,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1884,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1885,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!"},{"lineNumber":1886,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1887,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1888,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1889,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book before continuing with testing."},{"lineNumber":1890,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1891,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d OpenCommand and SaveAsCommand"},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"*Saves data as a new .xml file and switches to that file*"},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"save +"},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"Save the new save file as test.xml. +"},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Click save."},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the file followed by test.xml. +"},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Successfully saved file."},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"*Opens and switches to a new .xml save file*"},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"Following the above save command:"},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":"clear"},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"To differentiate the test.xml with the [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"The address book contains no more persons or tasks."},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"open +"},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml and select [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":"Click open."},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the [W09-B2][Address++]SampleData.xml followed by the name [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"The original data is restored in the address book. +"},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":"Successfully opened file."},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ExitCommand"},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"*Exits Address++*"},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":"Input Command:"},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"exit"},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"Expected Result: Address++ closes."},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1956,"author":{"gitId":"-"},"content":""},{"lineNumber":1957,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":1958,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1959,"author":{"gitId":"charlesgoh"},"content":"*Sorts persons by name in ascending order*"},{"lineNumber":1960,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1961,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":1962,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1963,"author":{"gitId":"charlesgoh"},"content":"sort person name asc"},{"lineNumber":1964,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1965,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":1966,"author":{"gitId":"charlesgoh"},"content":"Person list panel will sort all persons by their names in ascending order +"},{"lineNumber":1967,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1968,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":1969,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1970,"author":{"gitId":"charlesgoh"},"content":"All persons in address book successfully sorted"},{"lineNumber":1971,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1972,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1973,"author":{"gitId":"charlesgoh"},"content":"*Sorts tasks by priority in descending order*"},{"lineNumber":1974,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1975,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":1976,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1977,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +"},{"lineNumber":1978,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1979,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":1980,"author":{"gitId":"charlesgoh"},"content":"Task list panel will sort all tasks by their priorities in descending order +"},{"lineNumber":1981,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1982,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":1983,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1984,"author":{"gitId":"charlesgoh"},"content":"All tasks in address book successfully sorted"},{"lineNumber":1985,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1986,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1987,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*"},{"lineNumber":1988,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1989,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":1990,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1991,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +"},{"lineNumber":1992,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1993,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":1994,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +"},{"lineNumber":1995,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1996,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":1997,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1998,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":1999,"author":{"gitId":"charlesgoh"},"content":"sort: Sorts all persons or all tasks by chosen field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive +"},{"lineNumber":2000,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [LIST] [FIELD] [ORDER] +"},{"lineNumber":2001,"author":{"gitId":"charlesgoh"},"content":"Example: sort person email desc +"},{"lineNumber":2002,"author":{"gitId":"charlesgoh"},"content":"Example 2: sort task deadline desc +"},{"lineNumber":2003,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2004,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2005,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":2006,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2007,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2008,"author":{"gitId":"charlesgoh"},"content":"Currently supports mac relative file paths. No guarantee of support for other operating system."},{"lineNumber":2009,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2010,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*"},{"lineNumber":2011,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2012,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2013,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2014,"author":{"gitId":"charlesgoh"},"content":"backup +"},{"lineNumber":2015,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2016,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2017,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +"},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":2022,"author":{"gitId":"charlesgoh"},"content":"backup: Backs up data to a user input location field [FILEPATH] +"},{"lineNumber":2023,"author":{"gitId":"charlesgoh"},"content":"Parameter: KEYWORD [FILEPATH] +"},{"lineNumber":2024,"author":{"gitId":"charlesgoh"},"content":"Example: backupMyBackUpFile +"},{"lineNumber":2025,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2026,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2027,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to same file path*"},{"lineNumber":2028,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2029,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2030,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2031,"author":{"gitId":"charlesgoh"},"content":"backup filename.xml"},{"lineNumber":2032,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the same directory as the jar file +"},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully."},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2040,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2041,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to relative file path*"},{"lineNumber":2042,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2043,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2044,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2045,"author":{"gitId":"charlesgoh"},"content":"backup ./../filename.xml +"},{"lineNumber":2046,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2047,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2048,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the directory preceding one level above the jar file +"},{"lineNumber":2049,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2050,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2051,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2052,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully."},{"lineNumber":2053,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2054,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2055,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Change Password Command"},{"lineNumber":2056,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2057,"author":{"gitId":"charlesgoh"},"content":"*Invalid Command Format Input*"},{"lineNumber":2058,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2059,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2060,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2061,"author":{"gitId":"charlesgoh"},"content":"changepassword +"},{"lineNumber":2062,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2063,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2064,"author":{"gitId":"charlesgoh"},"content":"Invalid command format error message with usage message +"},{"lineNumber":2065,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2066,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2067,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2068,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":2069,"author":{"gitId":"charlesgoh"},"content":"changepassword: Changes user password. +"},{"lineNumber":2070,"author":{"gitId":"charlesgoh"},"content":"pw/PASSWORD np/NEWPASSWORD cfp/CONFIRMPASSWORD +"},{"lineNumber":2071,"author":{"gitId":"charlesgoh"},"content":"Example: changepassword pw/password np/mynewpassword111 cfp/mynewpassword111 +"},{"lineNumber":2072,"author":{"gitId":"charlesgoh"},"content":"Example 2: cpw pw/password np/mynewpassword111 cfp/mynewpassword111 +"},{"lineNumber":2073,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2074,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2075,"author":{"gitId":"charlesgoh"},"content":"*Change Password with valid inputs*"},{"lineNumber":2076,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2077,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2078,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2079,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +"},{"lineNumber":2080,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2081,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2082,"author":{"gitId":"charlesgoh"},"content":"Application password will change to `newpassword` +"},{"lineNumber":2083,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2084,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2085,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2086,"author":{"gitId":"charlesgoh"},"content":"Password changed successfully"},{"lineNumber":2087,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2088,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2089,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Password entered*"},{"lineNumber":2090,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2091,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2092,"author":{"gitId":"charlesgoh"},"content":"Run this after running the previous command. Otherwise change the password to something incorrect. Default password"},{"lineNumber":2093,"author":{"gitId":"charlesgoh"},"content":"is `password`"},{"lineNumber":2094,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2095,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2096,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2097,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +"},{"lineNumber":2098,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2099,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2100,"author":{"gitId":"charlesgoh"},"content":"Application password will remain as `newpassword` and reject input +"},{"lineNumber":2101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2102,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2103,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2104,"author":{"gitId":"charlesgoh"},"content":"Your password is incorrect. Please try again."},{"lineNumber":2105,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2107,"author":{"gitId":"charlesgoh"},"content":"*Old and new passwords are the same*"},{"lineNumber":2108,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2109,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2110,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2111,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/newpassword cfp/newpassword +"},{"lineNumber":2112,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2113,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2114,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +"},{"lineNumber":2115,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2116,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2117,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2118,"author":{"gitId":"charlesgoh"},"content":"New password must be different from your old password"},{"lineNumber":2119,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2121,"author":{"gitId":"charlesgoh"},"content":"*New password and confirmation passwords do not match*"},{"lineNumber":2122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2123,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2124,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2125,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/evennewerpassword cfp/wutwutWUUUUUT? +"},{"lineNumber":2126,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2127,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2128,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +"},{"lineNumber":2129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2130,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2131,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2132,"author":{"gitId":"charlesgoh"},"content":"Your new password and confirmation password do not match. Please try again"},{"lineNumber":2133,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2135,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock Command"},{"lineNumber":2136,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2137,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2138,"author":{"gitId":"charlesgoh"},"content":"The following tests assume that the password has been set to `newpassword` from the above tests. If you opened the application"},{"lineNumber":2139,"author":{"gitId":"charlesgoh"},"content":"for the first time, use the default password `password`."},{"lineNumber":2140,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2141,"author":{"gitId":"charlesgoh"},"content":"*Lock Application failure with incorrect password*"},{"lineNumber":2142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2143,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2144,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2145,"author":{"gitId":"charlesgoh"},"content":"lock pw/wrongpasswordlol +"},{"lineNumber":2146,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2147,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2148,"author":{"gitId":"charlesgoh"},"content":"Application will fail to lock +"},{"lineNumber":2149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2150,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2151,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2152,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again"},{"lineNumber":2153,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2154,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2155,"author":{"gitId":"charlesgoh"},"content":"*Lock Application with correct password*"},{"lineNumber":2156,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2157,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2158,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2159,"author":{"gitId":"charlesgoh"},"content":"lock pw/newpassword"},{"lineNumber":2160,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2161,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2162,"author":{"gitId":"charlesgoh"},"content":"Locks application. Try performing any CRUD statements after locking (i.e. add or edit. It will fail) +"},{"lineNumber":2163,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2164,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2165,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2166,"author":{"gitId":"charlesgoh"},"content":"Address++ locked successfully"},{"lineNumber":2167,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2168,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2169,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Unlock Command"},{"lineNumber":2170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2171,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2172,"author":{"gitId":"charlesgoh"},"content":"This section is a continuation of the previous section on the Lock Command"},{"lineNumber":2173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2174,"author":{"gitId":"charlesgoh"},"content":"*Fail to unlock application with incorrect password*"},{"lineNumber":2175,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2176,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2177,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2178,"author":{"gitId":"charlesgoh"},"content":"unlock pw/wrongpassword:P"},{"lineNumber":2179,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2180,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2181,"author":{"gitId":"charlesgoh"},"content":"Fails to unlock application. You will still not be able to execute CRUD commands +"},{"lineNumber":2182,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2183,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2184,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2185,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again"},{"lineNumber":2186,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2188,"author":{"gitId":"charlesgoh"},"content":"*Unlock application with correct password*"},{"lineNumber":2189,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2190,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2191,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2192,"author":{"gitId":"charlesgoh"},"content":"unlock pw/newpassword:P"},{"lineNumber":2193,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2194,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2195,"author":{"gitId":"charlesgoh"},"content":"Unlocks application. You can now execute CRUD commands +"},{"lineNumber":2196,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2197,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2198,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2199,"author":{"gitId":"charlesgoh"},"content":"Address++ unlocked successfully"},{"lineNumber":2200,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2201,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2202,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command"},{"lineNumber":2203,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2204,"author":{"gitId":"charlesgoh"},"content":"*Increase font size*"},{"lineNumber":2205,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2206,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2207,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2208,"author":{"gitId":"charlesgoh"},"content":"fontsize increase"},{"lineNumber":2209,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2210,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2211,"author":{"gitId":"charlesgoh"},"content":"Increases font size by 1 level +"},{"lineNumber":2212,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2213,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2214,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2215,"author":{"gitId":"charlesgoh"},"content":"Font size increased successfully"},{"lineNumber":2216,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2217,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2218,"author":{"gitId":"charlesgoh"},"content":"*Decrease font size*"},{"lineNumber":2219,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2220,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2221,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2222,"author":{"gitId":"charlesgoh"},"content":"fs decrease"},{"lineNumber":2223,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2224,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2225,"author":{"gitId":"charlesgoh"},"content":"Decrease font size by 1 level +"},{"lineNumber":2226,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2227,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2228,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2229,"author":{"gitId":"charlesgoh"},"content":"Font size decreased successfully"},{"lineNumber":2230,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2231,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2232,"author":{"gitId":"charlesgoh"},"content":"*Reset font size*"},{"lineNumber":2233,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2234,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2235,"author":{"gitId":"charlesgoh"},"content":"You can try increasing the font size a few more times. There will be a max font size to prevent you from"},{"lineNumber":2236,"author":{"gitId":"charlesgoh"},"content":"increasing too much."},{"lineNumber":2237,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2238,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2239,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2240,"author":{"gitId":"charlesgoh"},"content":"fontsize reset +"},{"lineNumber":2241,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2242,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2243,"author":{"gitId":"charlesgoh"},"content":"Resets font size in the application +"},{"lineNumber":2244,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2245,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2246,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2247,"author":{"gitId":"charlesgoh"},"content":"Font size reset successfully"},{"lineNumber":2248,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2249,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2250,"author":{"gitId":"charlesgoh"},"content":"*Incorrect input format*"},{"lineNumber":2251,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2252,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2253,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2254,"author":{"gitId":"charlesgoh"},"content":"fontsize +"},{"lineNumber":2255,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2256,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2257,"author":{"gitId":"charlesgoh"},"content":"Displays invalid command format error and the usage message +"},{"lineNumber":2258,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2259,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2260,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2261,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":2262,"author":{"gitId":"charlesgoh"},"content":"fontsize: Increases, decreases or resets font sizes +"},{"lineNumber":2263,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [OPTION] +"},{"lineNumber":2264,"author":{"gitId":"charlesgoh"},"content":"Example: fontsize increase +"},{"lineNumber":2265,"author":{"gitId":"charlesgoh"},"content":"Example 2: fs reset +"},{"lineNumber":2266,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2267,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2268,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatars"},{"lineNumber":2269,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2270,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2271,"author":{"gitId":"charlesgoh"},"content":"There is full support for URLs. No guarantee for local file paths. Local file paths must add a local prefix `file:`"},{"lineNumber":2272,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2273,"author":{"gitId":"charlesgoh"},"content":"*Add avatar URL*"},{"lineNumber":2274,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2275,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2276,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2277,"author":{"gitId":"charlesgoh"},"content":"edit 1 v/[URL] +"},{"lineNumber":2278,"author":{"gitId":"charlesgoh"},"content":"Replace [URL] with a valid image online."},{"lineNumber":2279,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2280,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2281,"author":{"gitId":"charlesgoh"},"content":"Replaces placeholder avatar with the online image +"}],"authorContributionMap":{"charlesgoh":324,"jeffreygohkw":186,"Esilocke":1500,"-":271}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" });"},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));"},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data."},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully."},{"lineNumber":97,"author":{"gitId":"-"},"content":" */"},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel."},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}."},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}."},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected."},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card."},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected."},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task."},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list."},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list."},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list."},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call."},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list."},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" String defaultConfigAsString \u003d \"App title : Address++\\n\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code AddPersonCommand}."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandIntegrationTest {"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), expectedModel);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code AddPersonCommand} which upon execution, adds {@code person} into the {@code model}."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand prepareCommand(Person person, Model model) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":9,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandTest {"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommand \u003d new AddPersonCommand(alice);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addBobCommand \u003d new AddPersonCommand(bob);"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommandCopy \u003d new AddPersonCommand(alice);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddPersonCommand with the details of the given person."},{"lineNumber":81,"author":{"gitId":"-"},"content":" */"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand getAddCommandForPerson(Person person, Model model) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person or task."},{"lineNumber":90,"author":{"gitId":"-"},"content":" */"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":98,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added."},{"lineNumber":105,"author":{"gitId":"-"},"content":" */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":115,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":116,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":2,"-":100}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}."},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AddTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandTest {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" AddTaskCommandTest.ModelStubAcceptingTaskAdded modelStub \u003d new AddTaskCommandTest.ModelStubAcceptingTaskAdded();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d prepareCommand(validTask, modelStub).execute();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddTaskCommand.MESSAGE_SUCCESS, validTask), commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new AddTaskCommandTest.ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddTaskCommand.MESSAGE_DUPLICATE_TASK);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" prepareCommand(validTask, modelStub).execute();"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommand \u003d new AddTaskCommand(paper);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPencilCommand \u003d new AddTaskCommand(pencil);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommandCopy \u003d new AddTaskCommand(paper);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddTaskCommand with the details of the given task."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" private AddTaskCommand prepareCommand(Task task, Model model) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand command \u003d new AddTaskCommand(task);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateTaskException when trying to add a task."},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the task being added."},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingTaskAdded extends ModelStub {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":119}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_success() throws Exception {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_success() throws Exception {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_success() throws Exception {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void execute_allPersonsAlreadyAssigned_throwsCommandException() throws Exception {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assignCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, expectedModel, AssignCommand.MESSAGE_NONE_ASSIGNED);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets."},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index taskIndex) {"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, taskIndex);"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":156}},{"path":"src/test/java/seedu/address/logic/commands/ChangePasswordCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.ChangePasswordCommandParser;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandTest {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_PASSWORD \u003d \"password\";"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_SECOND_PASSWORD \u003d \"password2\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private UserPrefs userPrefs;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ChangePasswordCommandParser parser;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d new UserPrefs();"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" parser \u003d new ChangePasswordCommandParser();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void parseWrongArgumentsFailure() {"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" // No arguments failure"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Wrong number of arguments"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"one two?\", String"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // No prefixes"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"password password2 password3\", String"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void testUserPrefsPasswords() {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Check original password"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" String expectedPassword \u003d getHashed256(DEFAULT_PASSWORD);"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // Lock address book and check if state has changed"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(DEFAULT_SECOND_PASSWORD);"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" expectedPassword \u003d getHashed256(DEFAULT_SECOND_PASSWORD);"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Helps to convert string to SHA256 counterpart"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" private String getHashed256(String password) {"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":74}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\")"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" .setRemarkPrivate(\"false\").build();"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getRemarkIsPrivate(), pps.getRemarkIsPrivate());"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsCopy \u003d new PersonPrivacySettings(pps);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getAddressIsPrivate(), pps.getAddressIsPrivate());"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getEmailIsPrivate(), pps.getEmailIsPrivate());"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getNameIsPrivate(), pps.getNameIsPrivate());"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getPhoneIsPrivate(), pps.getPhoneIsPrivate());"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getRemarkIsPrivate(), pps.getRemarkIsPrivate());"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(true);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(true);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(true);"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"true\")"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").setRemarkPrivate(\"true\")"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").setRemarkPrivate(\"false\")"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(false);"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(false);"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(false);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(false);"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":149}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class ClearCommandTest {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/ClearPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommandTest {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearPersonCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ClearPersonCommand prepareCommand(Model model) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ClearPersonCommand command \u003d new ClearPersonCommand();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/commands/ClearTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommandTest {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // Verify that only the tasks are cleared"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearTaskCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ClearTaskCommand prepareCommand(Model model) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ClearTaskCommand command \u003d new ClearTaskCommand();"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":39}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands."},{"lineNumber":35,"author":{"gitId":"-"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_NAME_CHRIS \u003d \"Chris Chan\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_PHONE_CHRIS \u003d \"33333333\";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_EMAIL_CHRIS \u003d \"chris@example.com\";"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_ADDRESS_CHRIS \u003d \"Block 132, Chris Street 5\";"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_REMARK_CHRIS \u003d \"He likes swimming\";"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_AMY \u003d \"amyavatar\";"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_BOB \u003d \"bobavatar\";"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_CHRIS \u003d \"chirsavatar\";"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_ALICE \u003d \"false\";"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_BOB \u003d \"true\";"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_TAG_CHRISTAG \u003d \"special\";"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017 12pm\";"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017 12pm\";"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PENCIL \u003d \"12 Kent Ridge Cres\";"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PAPER \u003d \"Bedok Mall\";"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final String NAME_DESC_CHRIS \u003d \" \" + PREFIX_NAME + VALID_NAME_CHRIS;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public static final String PHONE_DESC_CHRIS \u003d \" \" + PREFIX_PHONE + VALID_PHONE_CHRIS;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" public static final String EMAIL_DESC_CHRIS \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_CHRIS;"},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" public static final String ADDRESS_DESC_CHRIS \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_CHRIS;"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" public static final String REMARK_DESC_CHRIS \u003d \" \" + PREFIX_REMARK + VALID_REMARK_CHRIS;"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_AMY \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_AMY;"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_BOB \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_BOB;"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_CHRIS \u003d \" \" + PREFIX_AVATAR + VALID_REMARK_CHRIS;"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PENCIL \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PAPER \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_TASK_NAME_DESC \u003d \" \" + PREFIX_NAME + \" \"; // task name cannot be blank"},{"lineNumber":109,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones"},{"lineNumber":111,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"TIMELESS AGES\"; // not a date"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_ADDRESS_DESC \u003d \" \" + PREFIX_ADDRESS + \" \"; // priority is out of bounds"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_AMY;"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_BOB;"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PENCIL;"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PAPER;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" static {"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //TODO: Change avatar filename to a real filename"},{"lineNumber":126,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)"},{"lineNumber":127,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_AMY).withAvatar(VALID_AVATAR_AMY).withFavourite(VALID_FAVOURITE_ALICE)"},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":130,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":131,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_BOB).withAvatar(VALID_AVATAR_BOB).withFavourite(VALID_FAVOURITE_ALICE)"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}"},{"lineNumber":146,"author":{"gitId":"-"},"content":" */"},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,"},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);"},{"lineNumber":153,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":160,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":162,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged"},{"lineNumber":163,"author":{"gitId":"-"},"content":" */"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can"},{"lineNumber":166,"author":{"gitId":"-"},"content":" // only do so by copying its components."},{"lineNumber":167,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());"},{"lineNumber":168,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":171,"author":{"gitId":"-"},"content":" command.execute();"},{"lineNumber":172,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (CommandException e) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());"},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());"},{"lineNumber":176,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());"},{"lineNumber":177,"author":{"gitId":"-"},"content":" }"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":181,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book."},{"lineNumber":182,"author":{"gitId":"-"},"content":" */"},{"lineNumber":183,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {"},{"lineNumber":184,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" final String[] splitName \u003d person.getName().value.split(\"\\\\s+\");"},{"lineNumber":186,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":193,"author":{"gitId":"-"},"content":" */"},{"lineNumber":194,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":199,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":200,"author":{"gitId":"-"},"content":" }"},{"lineNumber":201,"author":{"gitId":"-"},"content":" }"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book."},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public static void showFirstTaskOnly(Model model) {"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(0);"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book."},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" public static void showSecondTaskOnly(Model model) {"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(1);"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * Deletes the first task in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public static void deleteFirstTask(Model model) {"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask firstTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(firstTask);"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Task in filtered list must exist in model.\", pnfe);"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {"},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);"},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":247,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":250,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":15,"jeffreygohkw":5,"Esilocke":81,"wangyiming1019":25,"-":124}},{"path":"src/test/java/seedu/address/logic/commands/DeletePersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeletePersonCommand}."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandTest {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":71,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommand \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteSecondCommand \u003d new DeletePersonCommand(INDEX_SECOND_PERSON);"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommandCopy \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeletePersonCommand} with the parameter {@code index}."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" private DeletePersonCommand prepareCommand(Index index) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d new DeletePersonCommand(index);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" deletePersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" return deletePersonCommand;"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one."},{"lineNumber":112,"author":{"gitId":"-"},"content":" */"},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":22,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}."},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() throws Exception {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" showNoTask(expectedModel);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommand \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteSecondCommand \u003d new DeleteTaskCommand(INDEX_SECOND_TASK);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommandCopy \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(1));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(null));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeleteTaskCommand} with the parameter {@code index}."},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private DeleteTaskCommand prepareCommand(Index index) {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d new DeleteTaskCommand(index);"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" deleteTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return deleteTaskCommand;"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show no tasks."},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" private void showNoTask(Model model) {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(p -\u003e false);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().isEmpty();"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":115}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_success() throws Exception {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_success() throws Exception {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_success() throws Exception {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void execute_noneDismissed_throwsCommandException() throws Exception {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, DismissCommand.MESSAGE_NONE_ASSIGNED);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets."},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index taskIndex) {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, taskIndex);"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":151}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditPersonCommand."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandTest {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(indexLastPerson, descriptor);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));"},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book"},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex, descriptor);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book"},{"lineNumber":185,"author":{"gitId":"-"},"content":" */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex,"},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" final EditPersonCommand standardCommand \u003d new EditPersonCommand(INDEX_FIRST_PERSON, DESC_AMY);"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand commandWithSameValues \u003d new EditPersonCommand(INDEX_FIRST_PERSON, copyDescriptor);"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_SECOND_PERSON, DESC_AMY)));"},{"lineNumber":219,"author":{"gitId":"-"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_FIRST_PERSON, DESC_BOB)));"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditPersonCommand} with parameters {@code index} and {@code descriptor}"},{"lineNumber":226,"author":{"gitId":"-"},"content":" */"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" private EditPersonCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d new EditPersonCommand(index, descriptor);"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" editPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return editPersonCommand;"},{"lineNumber":231,"author":{"gitId":"-"},"content":" }"},{"lineNumber":232,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":31,"-":140}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_BOB;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorTest {"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":26,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptorWithSameValues \u003d new EditPersonDescriptor(DESC_AMY);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(descriptorWithSameValues));"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(DESC_AMY));"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(null));"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(5));"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different values -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(DESC_BOB));"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different name -\u003e returns false"},{"lineNumber":42,"author":{"gitId":"-"},"content":" EditPersonDescriptor editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withName(VALID_NAME_BOB).build();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" // different phone -\u003e returns false"},{"lineNumber":46,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withPhone(VALID_PHONE_BOB).build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // different email -\u003e returns false"},{"lineNumber":50,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withEmail(VALID_EMAIL_BOB).build();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // different address -\u003e returns false"},{"lineNumber":54,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAddress(VALID_ADDRESS_BOB).build();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" // different tags -\u003e returns false"},{"lineNumber":58,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // different remarks -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // different avatar -\u003e returns false"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAvatar(VALID_AVATAR_BOB).build();"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // different favourite status -\u003e returns false"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withFavourite(VALID_FAVOURITE_BOB).build();"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":16,"-":57}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent_throwsCommandException() throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset_success() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll_success() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" private AddressBook prepareAddressBook() throws DuplicatePersonException {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditTaskCommand."},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandTest {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder().build();"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder(editedTask).build();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(Index.fromZeroBased(3), descriptor);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(3), editedTask);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Index indexLastTask \u003d Index.fromOneBased(model.getFilteredTaskList().size());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask lastTask \u003d model.getFilteredTaskList().get(indexLastTask.getZeroBased());"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" TaskBuilder taskInList \u003d new TaskBuilder(lastTask);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d taskInList.withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(indexLastTask, descriptor);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(lastTask, editedTask);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskInFilteredList \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder(taskInFilteredList).withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK,"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(0), editedTask);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexUnfilteredList_failure() {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex, descriptor);"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" * Edit filtered list where index is larger than size of filtered list,"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * but smaller than size of address book"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexFilteredList_failure() {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex,"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" final EditTaskCommand standardCommand \u003d new EditTaskCommand(INDEX_FIRST_TASK, DESC_PENCIL);"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor copyDescriptor \u003d new EditTaskCommand.EditTaskDescriptor(DESC_PENCIL);"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand commandWithSameValues \u003d new EditTaskCommand(INDEX_FIRST_TASK, copyDescriptor);"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different index -\u003e returns false"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_SECOND_TASK, DESC_PENCIL)));"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // different descriptor -\u003e returns false"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_FIRST_TASK, DESC_PAPER)));"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskCommand} with parameters {@code index} and {@code descriptor}"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private EditTaskCommand prepareCommand(Index index, EditTaskCommand.EditTaskDescriptor descriptor) {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d new EditTaskCommand(index, descriptor);"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" editTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return editTaskCommand;"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":152}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" // different task address -\u003e returns false"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code FindPersonCommand}."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d"},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommand \u003d new FindPersonCommand(firstPredicate);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findSecondCommand \u003d new FindPersonCommand(secondPredicate);"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommandCopy \u003d new FindPersonCommand(firstPredicate);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\" \");"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindPersonCommand}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" */"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" private FindPersonCommand prepareCommand(String userInput) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":89,"author":{"gitId":"-"},"content":" */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindPersonCommand command, String expectedMessage,"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"-":84}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}."},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}."},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/FindTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_TASKS_LISTED_OVERVIEW;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.ACCEPT;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.DATE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.GRADLE;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandTest {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommand \u003d new FindTaskCommand(firstPredicate);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findSecondCommand \u003d new FindTaskCommand(secondPredicate);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommandCopy \u003d new FindTaskCommand(firstPredicate);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void execute_zeroKeywords_noTaskFound() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 0);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\" \");"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public void execute_multipleKeywords_multipleTasksFound() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 3);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\"Resolve Acceptance Date\");"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ACCEPT, DATE, GRADLE));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindTaskCommand}."},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" private FindTaskCommand prepareCommand(String userInput) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * - the {@code FilteredList\u003cReadOnlyTask\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindTaskCommand command, String expectedMessage,"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e expectedList) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedList, model.getFilteredTaskList());"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":97}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code BrowserPanelLocateEvent}"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index."},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}."},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}."},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/NavigateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code NavigateCommand}."},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandTest {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromAddress_success() throws IllegalValueException {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to, null, null, false, false);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromPersons_success() throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromTasks_success() throws IllegalValueException {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidArgs_failure() throws IllegalValueException {"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to,"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand naviOne \u003d prepareCommand(from, to,"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_SECOND_PERSON, false, false);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Executes the input (@code NavigateCommand) and checks that (@code BrowserPanelNavigateEvent) is raised with"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * the correct locations"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(NavigateCommand navi) throws IllegalValueException {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" Location from;"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Location to;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationFrom() !\u003d null) {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d navi.getLocationFrom();"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isFromIsTask()) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredTaskList().get(navi.getFromIndex().getZeroBased())"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredPersonList().get(navi.getFromIndex().getZeroBased())"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationTo() !\u003d null) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d navi.getLocationTo();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isToIsTask()) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredTaskList().get(navi.getToIndex().getZeroBased())"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredPersonList().get(navi.getToIndex().getZeroBased())"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d navi.execute();"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(NavigateCommand.MESSAGE_NAVIGATE_SUCCESS,"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" from, to),"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelNavigateEvent lastEvent \u003d"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelNavigateEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(from, lastEvent.getFromLocation());"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(to, lastEvent.getToLocation());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code NavigateCommand} based on input parameters."},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommand prepareCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d new NavigateCommand(locationFrom, locationTo, fromIndex, toIndex, fromIsTask, toIsTask);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" navi.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return navi;"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":135}},{"path":"src/test/java/seedu/address/logic/commands/OpenCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.OpenCommand.OPEN_COMMAND_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommandTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new OpenCommand().execute();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(OPEN_COMMAND_SUCCESS, result.feedbackToUser);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof OpenRequestEvent);"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/PrivacyLevelCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Assert;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code PrivacyLevelCommand}."},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandTest {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndex_success() {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //valid levels"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand onePlc \u003d prepareCommand(1);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand twoPlc \u003d prepareCommand(2);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand threePlc \u003d prepareCommand(3);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(onePlc);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(twoPlc);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(threePlc);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndex_failure() {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //Negative level"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand negativePlc \u003d prepareCommand(-1);"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //Zero level"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand zeroPlc \u003d prepareCommand(0);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //Level greater than the maximum level allowed"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand tooBigPlc \u003d prepareCommand(5);"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(negativePlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(zeroPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(tooBigPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that the privacy level of the model and each person has been"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * changed to that of the level as specified in the input (@code PrivacyLevelCommand)"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(PrivacyLevelCommand plc) {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" commandResult \u003d plc.execute();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(PrivacyLevelCommand.CHANGE_PRIVACY_LEVEL_SUCCESS, plc.getLevel()),"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //Check the model\u0027s privacy level"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(model.getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //Iterate through the list of persons in the model"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" //Check the person\u0027s Privacy Level"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getAddressBook().getPersonList().get(i);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" //Check Privacy Level of all fields of each person that can be private"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getName().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getPhone().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getEmail().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getAddress().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getRemark().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that a {@code CommandException}"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(PrivacyLevelCommand plc, String expectedMessage) {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" plc.execute();"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Assert.assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}."},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommand prepareCommand(int level) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand privacyLevelCommand \u003d new PrivacyLevelCommand(level);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" privacyLevelCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return privacyLevelCommand;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":116}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RedoCommandTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Collections.emptyList(), Arrays.asList(deletePersonCommandTwo, deletePersonCommandOne));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();"},{"lineNumber":41,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" // multiple commands in redoStack"},{"lineNumber":45,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" // single command in redoStack"},{"lineNumber":49,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" // no command in redoStack"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":8,"-":47}},{"path":"src/test/java/seedu/address/logic/commands/SaveAsCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SaveAsCommand.SAVE_AS_COMMAND_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommandTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new SaveAsCommand().execute();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(SAVE_AS_COMMAND_SUCCESS, result.feedbackToUser);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof SaveAsRequestEvent);"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/SelectPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectPersonCommand}."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandTest {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Rule"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" @Before"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public void setUp() {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommand \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectSecondCommand \u003d new SelectPersonCommand(INDEX_SECOND_PERSON);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommandCopy \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestEvent} is raised with the correct index."},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectPersonCommand.MESSAGE_SUCCESS, index.getOneBased());"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectPersonCommand.execute();"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestEvent lastEvent \u003d"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" * is thrown with the ."},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.execute();"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectPersonCommand} with parameters {@code index}."},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" private SelectPersonCommand prepareCommand(Index index) {"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d new SelectPersonCommand(index);"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" return selectPersonCommand;"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":139}},{"path":"src/test/java/seedu/address/logic/commands/SelectTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandTest {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Before"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void setUp() {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index lastTaskIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size());"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_TASK);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastTaskIndex);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommand \u003d new SelectTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectSecondCommand \u003d new SelectTaskCommand(INDEX_SECOND_TASK);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommandCopy \u003d new SelectTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestTaskEvent} is raised with the correct index."},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectTaskCommand.MESSAGE_SUCCESS, index.getOneBased());"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectTaskCommand.execute();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent lastEvent \u003d"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestTaskEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" * is thrown with the ."},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.execute();"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectTaskCommand} with parameters {@code index}."},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" private SelectTaskCommand prepareCommand(Index index) {"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d new SelectTaskCommand(index);"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" return selectTaskCommand;"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":136}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListValidIndex_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListInvalidIndex_failure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, SetCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(expectedModel);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}."},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":118}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showSecondTaskOnly;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_changeIncompleteTask_failure() throws Exception {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, SetIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(model);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(expectedModel);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}."},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":117}},{"path":"src/test/java/seedu/address/logic/commands/TagListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS_WITH_NEW_TAG;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommandTest {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" private TagListCommand listTagsCommand;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String expectedMessage;"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Before"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cTag\u003e tagList \u003d new ArrayList\u003cTag\u003e();"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand \u003d new TagListCommand();"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder expectedMessageString \u003d new StringBuilder(listTagsCommand.MESSAGE_SUCCESS);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (!tagList.contains(tag)) {"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" tagList.add(tag);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageString.append(\"\u003c\").append(tag.getTagName()).append(\"\u003e \");"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" expectedMessage \u003d expectedMessageString.toString().trim();"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void executeTagListNotEmpty() {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyTagListShowNothing() throws DuplicatePersonException {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModelWithNoTags \u003d new ModelManager();"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessageWithNoTags \u003d listTagsCommand.MESSAGE_FAILURE;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" TagListCommand tagListCommandWithNoTags \u003d new TagListCommand();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" tagListCommandWithNoTags.setData(expectedModelWithNoTags, new CommandHistory(),"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" new UndoRedoStack());"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(tagListCommandWithNoTags, expectedModelWithNoTags,"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageWithNoTags, expectedModelWithNoTags);"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithPersonAdd() throws DuplicatePersonException {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithTagEdited() throws"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" PersonNotFoundException, DuplicatePersonException {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":88}},{"path":"src/test/java/seedu/address/logic/commands/ThemeCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_CHANGE_SUCCESS;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_IN_USE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_NOT_AVAILABLE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandTest {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommand \u003d new ThemeCommand(\"light\");"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkThemeCommand \u003d new ThemeCommand(\"Dark\");"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommand));"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommandCopy \u003d new ThemeCommand(\"light\");"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommandCopy));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(1));"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(null));"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" // different theme -\u003e returns false"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(darkThemeCommand));"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_correctTheme_success() throws CommandException {"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"light\");"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(command, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"light\"));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkCommand \u003d prepareCommand(\"dark\");"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(darkCommand, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"dark\"));"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_wrongArguments_failure() {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"notATheme\");"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_NOT_AVAILABLE, \"notATheme\"));"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_themeAlreadyLoaded_failure() {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"dark\");"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_IN_USE, \"dark\"));"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightCommand \u003d prepareCommand(\"light\");"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(lightCommand, model, String.format(MESSAGE_THEME_IN_USE, \"light\"));"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses {@code userInput} into a {@code ThemeCommand}."},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommand prepareCommand(String userInput) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d new ThemeCommand(userInput);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return command;"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Asserts that {@code command} is successfully executed"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void assertCommandSuccess(ThemeCommand command, String expectedMessage) throws CommandException {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getTheme());"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getUserPrefs().getTheme());"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":98}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class UndoCommandTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() throws Exception {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Arrays.asList(deletePersonCommandOne, deletePersonCommandTwo), Collections.emptyList());"},{"lineNumber":40,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();"},{"lineNumber":41,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.execute();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.execute();"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in undoStack"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":47,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // single command in undoStack"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" // no command in undoStack"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":11,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/commands/UnlockLockCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class UnlockLockCommandTest {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private Model model;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" model \u003d new ModelManager();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public void checkLockFunctionality() throws Exception {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Check initial state is unlocked"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Check that lock works"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Check double lock"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Check that unlock works"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // Check double unlock"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":46}},{"path":"src/test/java/seedu/address/logic/commands/ViewAssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToShow \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(Index.fromZeroBased(5));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, 3);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.viewAssignees(taskToShow);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(viewAssignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommand \u003d new ViewAssignCommand(INDEX_FIRST_TASK);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewSecondCommand \u003d new ViewAssignCommand(INDEX_SECOND_TASK);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommand));"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommandCopy \u003d new ViewAssignCommand(INDEX_FIRST_TASK);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommandCopy));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(1));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(null));"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(viewSecondCommand));"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code ViewAssignCommand} with the parameter {@code index}."},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommand prepareCommand(Index index) {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d new ViewAssignCommand(index);"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" viewAssignCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return viewAssignCommand;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":90}},{"path":"src/test/java/seedu/address/logic/parser/AddPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandParserTest {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // multiple names - last name accepted"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // multiple tags - all accepted"},{"lineNumber":77,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPersonMultipleTags));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" // zero tags"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY,"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPerson));"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":98,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE);"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" // missing name prefix"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB"},{"lineNumber":103,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" // all prefixes missing"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB"},{"lineNumber":107,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":111,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" // invalid phone"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" // invalid email"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":" // invalid tag"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":28,"Esilocke":22,"-":86}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParserTest {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private AddCommandParser parser \u003d new AddCommandParser();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // multiple addresses - last address accepted"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + TASK_ADDRESS_DESC_PAPER + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // invalid deadline"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" // invalid priority"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Priority.MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;"},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":81,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;"},{"lineNumber":84,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":86,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":88,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":92,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":94,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":96,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" private static final boolean DEFAULT_STATE_LOCK \u003d false;"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" AddCommand command \u003d (AddPersonCommand) parser"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(PersonUtil.getAddCommand(person), DEFAULT_STATE_LOCK);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddPersonCommand(person), command);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(TaskUtil.getAddCommand(task), DEFAULT_STATE_LOCK);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddTaskCommand(task), command);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddPersonCommand) parser.parseCommand(AddPersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":125,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(new AddPersonCommand(person), command);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(AddTaskCommand.COMMAND_ALIAS + \" \""},{"lineNumber":130,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(new AddTaskCommand(task), command);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \""},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandPrivacyLevel() throws Exception {"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 1\", DEFAULT_STATE_LOCK)"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 2\", DEFAULT_STATE_LOCK)"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK)"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasPrivacyLevel() throws Exception {"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 1\", DEFAULT_STATE_LOCK)"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 2\", DEFAULT_STATE_LOCK)"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK)"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandTheme() throws Exception {"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" dark\", DEFAULT_STATE_LOCK)"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" light\", DEFAULT_STATE_LOCK)"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasTheme() throws Exception {"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" dark\", DEFAULT_STATE_LOCK)"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" light\", DEFAULT_STATE_LOCK)"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ClearCommand);"},{"lineNumber":228,"author":{"gitId":"-"},"content":" }"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":231,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ClearCommand);"},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":235,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand("},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \""},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand("},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \""},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand("},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand("},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \""},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":260,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":261,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \""},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \""},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":282,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":283,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {"},{"lineNumber":284,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":285,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \""},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \""},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \""},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":296,"author":{"gitId":"-"},"content":" }"},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {"},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \""},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandOpen() throws Exception {"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(OpenCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof OpenCommand);"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(OpenCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof OpenCommand);"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandSaveAs() throws Exception {"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(SaveAsCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof SaveAsCommand);"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(SaveAsCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof SaveAsCommand);"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":350,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":352,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {"},{"lineNumber":353,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ExitCommand);"},{"lineNumber":354,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser"},{"lineNumber":355,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ExitCommand);"},{"lineNumber":356,"author":{"gitId":"-"},"content":" }"},{"lineNumber":357,"author":{"gitId":"-"},"content":""},{"lineNumber":358,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {"},{"lineNumber":360,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand("},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + keywords.stream()"},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate(keywords,"},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" DEFAULT_STATE_LOCK, DEFAULT_STATE_LOCK, false, 0)), command);"},{"lineNumber":371,"author":{"gitId":"-"},"content":" }"},{"lineNumber":372,"author":{"gitId":"-"},"content":""},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {"},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand("},{"lineNumber":377,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + keywords"},{"lineNumber":378,"author":{"gitId":"charlesgoh"},"content":" .stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \""},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate("},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" keywords, DEFAULT_STATE_LOCK, false, false, 0)), command);"},{"lineNumber":386,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":387,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":388,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":389,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":390,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAddTag() throws Exception {"},{"lineNumber":391,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":392,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":393,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":395,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":396,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_WORD"},{"lineNumber":397,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":398,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":399,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":400,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);"},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":402,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":403,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":404,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasAddTag() throws Exception {"},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":406,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":407,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":408,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":409,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":410,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_ALIAS"},{"lineNumber":411,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":412,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":413,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":414,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);"},{"lineNumber":415,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":416,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":417,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":418,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDeleteTag() throws Exception {"},{"lineNumber":419,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":420,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":421,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":422,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":423,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":424,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_WORD"},{"lineNumber":425,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":426,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":427,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":428,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);"},{"lineNumber":429,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":430,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":431,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":432,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDeleteTag() throws Exception {"},{"lineNumber":433,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":434,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":435,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":436,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":438,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_ALIAS"},{"lineNumber":439,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":440,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":441,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":442,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);"},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":444,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":445,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":446,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandTagList() throws Exception {"},{"lineNumber":447,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_WORD,"},{"lineNumber":448,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand"},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasTagList() throws Exception {"},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_ALIAS,"},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":457,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand"},{"lineNumber":458,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":459,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":460,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":461,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":462,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {"},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":465,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":466,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":467,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":468,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":469,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":470,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":471,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":472,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {"},{"lineNumber":473,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":474,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":475,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":476,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":477,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":478,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":479,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":480,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":481,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":482,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavourite() throws Exception {"},{"lineNumber":483,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand("},{"lineNumber":484,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":485,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":486,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":487,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":488,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":489,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":490,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavourite() throws Exception {"},{"lineNumber":491,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand("},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":493,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":494,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":495,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":496,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":497,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":498,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnfavourite() throws Exception {"},{"lineNumber":499,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand("},{"lineNumber":500,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":501,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":502,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":503,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":504,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":505,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":506,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasUnfavourite() throws Exception {"},{"lineNumber":507,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand("},{"lineNumber":508,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":509,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":510,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":511,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":512,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":513,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":514,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavouriteList() throws Exception {"},{"lineNumber":515,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_WORD,"},{"lineNumber":516,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":517,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand"},{"lineNumber":518,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":519,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":520,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":521,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":522,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavouriteList() throws Exception {"},{"lineNumber":523,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_ALIAS,"},{"lineNumber":524,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":525,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand"},{"lineNumber":526,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":527,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":528,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":529,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":530,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":531,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {"},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HelpCommand);"},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HelpCommand);"},{"lineNumber":534,"author":{"gitId":"-"},"content":" }"},{"lineNumber":535,"author":{"gitId":"-"},"content":""},{"lineNumber":536,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":537,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {"},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand"},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":541,"author":{"gitId":"-"},"content":""},{"lineNumber":542,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);"},{"lineNumber":544,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":545,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {"},{"lineNumber":546,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":547,"author":{"gitId":"-"},"content":" }"},{"lineNumber":548,"author":{"gitId":"-"},"content":" }"},{"lineNumber":549,"author":{"gitId":"-"},"content":""},{"lineNumber":550,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":551,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {"},{"lineNumber":552,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":553,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand"},{"lineNumber":554,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":555,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":556,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":557,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);"},{"lineNumber":558,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":559,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {"},{"lineNumber":560,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":561,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":562,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":563,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":564,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":565,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {"},{"lineNumber":566,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":567,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand"},{"lineNumber":568,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":569,"author":{"gitId":"-"},"content":" }"},{"lineNumber":570,"author":{"gitId":"-"},"content":""},{"lineNumber":571,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":572,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {"},{"lineNumber":573,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":574,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand"},{"lineNumber":575,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":576,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":577,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":578,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":579,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {"},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand("},{"lineNumber":581,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":583,"author":{"gitId":"-"},"content":" }"},{"lineNumber":584,"author":{"gitId":"-"},"content":""},{"lineNumber":585,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":586,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {"},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand("},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":590,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":591,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {"},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {"},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandNavigate() throws Exception {"},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand("},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);"},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),"},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" command);"},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasNavigate() throws Exception {"},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand("},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_ALIAS + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);"},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":625,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),"},{"lineNumber":626,"author":{"gitId":"jeffreygohkw"},"content":" command);"},{"lineNumber":627,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":628,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandWord() throws Exception {"},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \""},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)"},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);"},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandAlias() throws Exception {"},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \""},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)"},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);"},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackup() throws Exception {"},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand"},{"lineNumber":647,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);"},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand"},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);"},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeWord() throws Exception {"},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {"},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser"},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand"},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);"},{"lineNumber":658,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeAlias() throws Exception {"},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {"},{"lineNumber":664,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser"},{"lineNumber":665,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand"},{"lineNumber":666,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);"},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":668,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":669,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":670,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandValid() throws Exception {"},{"lineNumber":672,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix"},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix"},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias"},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":686,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandWordInvalid() throws Exception {"},{"lineNumber":690,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":691,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));"},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);"},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandAliasInvalid() throws Exception {"},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));"},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);"},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandValid() throws Exception {"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix"},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix"},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":710,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \""},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":712,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":713,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias"},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD"},{"lineNumber":719,"author":{"gitId":"charlesgoh"},"content":" + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandWordInvalid() throws Exception {"},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));"},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);"},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandAliasInvalid() throws Exception {"},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":732,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));"},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);"},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":735,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":" public void parseChangePasswordCommand() throws Exception {"},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are correct and valid"},{"lineNumber":739,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are wrong but valid"},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":746,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":748,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that have the wrong order (i.e. fields are in the wrong order)"},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \""},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":" // Do the same thing for alias counterparts"},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":770,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":773,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \""},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":783,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":784,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {"},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof RedoCommand);"},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_STATE_LOCK) instanceof RedoCommand);"},{"lineNumber":787,"author":{"gitId":"-"},"content":" }"},{"lineNumber":788,"author":{"gitId":"-"},"content":""},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {"},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD"},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {"},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS"},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {"},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {"},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":819,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":820,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {"},{"lineNumber":821,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof UndoCommand);"},{"lineNumber":822,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_STATE_LOCK) instanceof UndoCommand);"},{"lineNumber":823,"author":{"gitId":"-"},"content":" }"},{"lineNumber":824,"author":{"gitId":"-"},"content":""},{"lineNumber":825,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":826,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {"},{"lineNumber":827,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":828,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":829,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"\", DEFAULT_STATE_LOCK);"},{"lineNumber":830,"author":{"gitId":"-"},"content":" }"},{"lineNumber":831,"author":{"gitId":"-"},"content":""},{"lineNumber":832,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":833,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {"},{"lineNumber":834,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":835,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":836,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_STATE_LOCK);"},{"lineNumber":837,"author":{"gitId":"-"},"content":" }"},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal"},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command"},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command"},{"lineNumber":844,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal"},{"lineNumber":845,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":846,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {"},{"lineNumber":847,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());"},{"lineNumber":848,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":849,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":850,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":851,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":852,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":853,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":854,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":223,"jeffreygohkw":156,"Esilocke":164,"wangyiming1019":201,"-":110}},{"path":"src/test/java/seedu/address/logic/parser/AssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private AssignTaskCommandParser parser \u003d new AssignTaskCommandParser();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new AssignCommand(indexes, INDEX_FIRST_TASK));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + \"aaaaa\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" AssignCommand.MESSAGE_USAGE));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/ClearCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ClearCommandParser parser \u003d new ClearCommandParser();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidType_failure() throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" some invalid value\","},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void parseValidTypes_success() throws ParseException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ClearCommand expectedClearAll \u003d new ClearCommand();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_PERSON.getPrefix()) instanceof ClearPersonCommand);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_TASK.getPrefix()) instanceof ClearTaskCommand);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ClearCommand multipleTypesSpecified \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearPersonCommand);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearTaskCommand);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ClearCommand repeatedTypes \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix() + PREFIX_PERSON.getPrefix() + \" \" + PREFIX_TASK.getPrefix() + \" \");"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearPersonCommand);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearTaskCommand);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":43}},{"path":"src/test/java/seedu/address/logic/parser/DeletePersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * outside of the DeletePersonCommand code. For example, inputs \"1\" and \"1 abc\" take the"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * same path through the DeletePersonCommand, and therefore we test only one of them."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParserTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeletePersonCommand(INDEX_FIRST_PERSON));"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\","},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":8,"-":25}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\","},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new DeleteTaskCommand(INDEX_FIRST_TASK));"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\","},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/DismissCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private DismissTaskCommandParser parser \u003d new DismissTaskCommandParser();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new DismissCommand(indexes, INDEX_FIRST_TASK));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + \"aaaaa\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" DismissCommand.MESSAGE_USAGE));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/EditPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParserTest {"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final String TAG_EMPTY \u003d \" \" + PREFIX_TAG;"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" private EditCommandParser parser \u003d new EditCommandParser();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no index specified"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" // no field specified"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"1\", EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" // no index and no field specified"},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" // negative index"},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" // zero index"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS); // invalid name"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS); // invalid phone"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS); // invalid email"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS); // invalid tag"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" // invalid phone followed by valid email"},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC + EMAIL_DESC_AMY, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone"},{"lineNumber":91,"author":{"gitId":"-"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + PHONE_DESC_BOB + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // while parsing {@code PREFIX_TAG} alone will reset the tags of the {@code Person} being edited,"},{"lineNumber":95,"author":{"gitId":"-"},"content":" // parsing it together with a valid tag results in error"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + TAG_EMPTY, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_EMPTY + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_EMPTY + TAG_DESC_FRIEND + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" // multiple invalid values, but only the first invalid value is captured"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC + INVALID_EMAIL_DESC + VALID_ADDRESS_AMY + VALID_PHONE_AMY,"},{"lineNumber":102,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void parse_allFieldsSpecified_success() {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":108,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":109,"author":{"gitId":"-"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + NAME_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":113,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void parse_someFieldsSpecified_success() {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + EMAIL_DESC_AMY;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)"},{"lineNumber":125,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).build();"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" }"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":132,"author":{"gitId":"-"},"content":" public void parse_oneFieldSpecified_success() {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" // name"},{"lineNumber":134,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":135,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + NAME_DESC_AMY;"},{"lineNumber":136,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY).build();"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" // phone"},{"lineNumber":141,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY;"},{"lineNumber":142,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_AMY).build();"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" // email"},{"lineNumber":147,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_AMY;"},{"lineNumber":148,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withEmail(VALID_EMAIL_AMY).build();"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" // address"},{"lineNumber":153,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + ADDRESS_DESC_AMY;"},{"lineNumber":154,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withAddress(VALID_ADDRESS_AMY).build();"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" // tags"},{"lineNumber":159,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":160,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":168,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":169,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND"},{"lineNumber":170,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)"},{"lineNumber":173,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND)"},{"lineNumber":174,"author":{"gitId":"-"},"content":" .build();"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":181,"author":{"gitId":"-"},"content":" public void parse_invalidValueFollowedByValidValue_success() {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" // no other valid values specified"},{"lineNumber":183,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":184,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + INVALID_PHONE_DESC + PHONE_DESC_BOB;"},{"lineNumber":185,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).build();"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":187,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" // other valid values specified"},{"lineNumber":190,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_BOB + INVALID_PHONE_DESC + ADDRESS_DESC_BOB"},{"lineNumber":191,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB;"},{"lineNumber":192,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).build();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" }"},{"lineNumber":197,"author":{"gitId":"-"},"content":""},{"lineNumber":198,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":199,"author":{"gitId":"-"},"content":" public void parse_resetTags_success() {"},{"lineNumber":200,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":201,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + TAG_EMPTY;"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withTags().build();"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":16,"-":192}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/EditTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TASK_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParserTest {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private EditCommandParser parser \u003d new EditCommandParser();"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no index specified"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + VALID_TASK_NAME_PAPER, MESSAGE_INVALID_FORMAT);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no field specified"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\", EditTaskCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" // no index and no field specified"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" // negative index"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"-5\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // zero index"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"0\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC,"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" TaskName.MESSAGE_NAME_CONSTRAINTS); // invalid name"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC,"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE); // invalid deadline"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_PRIORITY_DESC,"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Priority.MESSAGE_PRIORITY_CONSTRAINTS); // invalid priority"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // invalid phone followed by valid email"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC + PRIORITY_DESC_PAPER,"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + DEADLINE_DESC_PAPER + INVALID_DEADLINE_DESC,"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // multiple invalid values, but only the first invalid value is captured"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC + INVALID_PRIORITY_DESC"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + VALID_DEADLINE_PAPER + VALID_DESCRIPTION_PAPER, TaskName.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public void parse_allFieldsSpecified_success() {"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER + DESCRIPTION_DESC_PAPER"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" + DEADLINE_DESC_PAPER + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void parse_someFieldsSpecified_success() {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER).withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void parse_oneFieldSpecified_success() {"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" // name"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_THIRD_TASK;"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER;"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // phone"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER;"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER).build();"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // email"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DEADLINE_DESC_PAPER;"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" // address"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER;"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" // tags"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL;"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValueFollowedByValidValue_success() {"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" // no other valid values specified"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + INVALID_DEADLINE_DESC + DEADLINE_DESC_PAPER;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" // other valid values specified"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER + INVALID_DEADLINE_DESC"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":194}},{"path":"src/test/java/seedu/address/logic/parser/FIndTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class FIndTaskCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private FindCommandParser parser \u003d new FindCommandParser();"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void parse_emptyArg_throwsParseException() {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsFindCommand() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // no leading and trailing whitespaces"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand expectedFindTaskCommand \u003d"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(\"Lucy\", \"Date\")));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"Lucy Date\", expectedFindTaskCommand);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // multiple whitespaces between keywords"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \" \\n Lucy \\n \\t Date \\t\", expectedFindTaskCommand);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParserTest {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" private FindCommandParser parser \u003d new FindCommandParser();"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void parse_emptyArg_throwsParseException() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsFindCommand() {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" // no leading and trailing whitespaces"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand expectedFindPersonCommand \u003d"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(\"Alice\", \"Bob\")));"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"Alice Bob\", expectedFindPersonCommand);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" // multiple whitespaces between keywords"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \\n Alice \\n \\t Bob \\t\", expectedFindPersonCommand);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":8,"-":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \","},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate("},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/FontSizeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.ACCEPTED_PARAMETERS;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_USAGE;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" private FontSizeCommandParser parser \u003d new FontSizeCommandParser();"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void parse_wrongArguments_failure() {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" // No arguments specified"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" // Wrong arguments specified"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"random input\","},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand expectedCommand;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand actualCommand;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" for (String arg: ACCEPTED_PARAMETERS) {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new FontSizeCommand(arg);"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" // Check for command word"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" // Check for command alias"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectPersonCommandParserTest}."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectPersonCommandParserTest"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/NavigateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@autho jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParserTest {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommandParser parser \u003d new NavigateCommandParser();"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsPresent_success() throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //From address to address"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fata \u003d new NavigateCommand(new Location(\"NUS\"), new Location(\"Sentosa\"),"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" null, null, false, false);"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fata);"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //From address to person"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatp \u003d new NavigateCommand(new Location(\"NUS\"), null,"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_PERSON, false, false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\", fatp);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //From address to task"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatt \u003d new NavigateCommand(new Location(\"NUS\"), null,"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_TASK, false, true);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fatt);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //From person to address"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fpta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, null, false, false);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fpta);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //From person to person"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptp \u003d new NavigateCommand(null, null,"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON, false, false);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fptp);"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" //From person to task"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptt \u003d new NavigateCommand(null, null,"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_SECOND_TASK, false, true);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\", fptt);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //From task to address"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand ftta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, null, true, false);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", ftta);"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" //From task to person"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttp \u003d new NavigateCommand(null, null,"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_THIRD_PERSON, true, false);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fttp);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //From task to task"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttt \u003d new NavigateCommand(null, null,"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fttt);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_repeatedFromAndTos_failure() {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Froms"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Tos"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\","},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingFromOrTo_failure() {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" //No To"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\","},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" //No From"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"NUS\","},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_failure() {"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" //Non positive indices"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"-1\", ParserUtil.MESSAGE_INVALID_INDEX);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":139}},{"path":"src/test/java/seedu/address/logic/parser/ParserUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtilTest {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static final boolean PRIVATE_FIELD \u003d true;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String INVALID_NAME \u003d \"R@chel\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"+651234\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String INVALID_ADDRESS \u003d \" \";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final String INVALID_EMAIL \u003d \"example.com\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_REMARK \u003d \" \";"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_AVATAR \u003d \" \";"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final String INVALID_TAG \u003d \"#friend\";"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_NAME \u003d \" \";"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_DEADLINE \u003d \"The distant, distant past\";"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_PRIORITY \u003d \"99\";"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_ADDRESS \u003d \" \";"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Rachel Walker\";"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"123456\";"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"123 Main Street #0505\";"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"rachel@example.com\";"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_REMARK \u003d \"Thinks that P\u003dNP\";"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_AVATAR \u003d \"valid_file.png\";"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_1 \u003d \"friend\";"},{"lineNumber":60,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_2 \u003d \"neighbour\";"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_NAME \u003d \"Launcher\";"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DESCRIPTION \u003d \"An arbitrary decision\";"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DEADLINE \u003d \"2 weeks later\";"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_PRIORITY \u003d \"3\";"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_ADDRESS \u003d \"NUS\";"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public final ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void parseIndex_invalidInput_throwsIllegalValueException() throws Exception {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(\"10 a\");"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void parseIndex_outOfRangeInput_throwsIllegalValueException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_INVALID_INDEX);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(Long.toString(Integer.MAX_VALUE + 1));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void parseIndex_validInput_success() throws Exception {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" // No whitespaces"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\"1\"));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // Leading and trailing whitespaces"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\" 1 \"));"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void parseName_null_throwsNullPointerException() throws Exception {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" ParserUtil.parseName(null);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseName_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(INVALID_NAME));"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public void parseName_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseName(Optional.empty()).isPresent());"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void parseName_validValue_returnsName() throws Exception {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" Name expectedName \u003d new Name(VALID_NAME);"},{"lineNumber":112,"author":{"gitId":"-"},"content":" Optional\u003cName\u003e actualName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" Name expectedPrivateName \u003d new Name(VALID_NAME, PRIVATE_FIELD);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" Optional\u003cName\u003e actualPrivateName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertEquals(expectedName, actualName.get());"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateName, actualPrivateName.get());"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void parsePhone_null_throwsNullPointerException() throws Exception {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(null);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void parsePhone_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(INVALID_PHONE));"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parsePhone_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parsePhone(Optional.empty()).isPresent());"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void parsePhone_validValue_returnsPhone() throws Exception {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" Phone expectedPhone \u003d new Phone(VALID_PHONE);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" Optional\u003cPhone\u003e actualPhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Phone expectedPrivatePhone \u003d new Phone(VALID_PHONE, PRIVATE_FIELD);"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPhone\u003e actualPrivatePhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(expectedPhone, actualPhone.get());"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivatePhone, actualPrivatePhone.get());"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void parseAddress_null_throwsNullPointerException() throws Exception {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":151,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(null);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" }"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"-"},"content":" public void parseAddress_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":157,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(INVALID_ADDRESS));"},{"lineNumber":158,"author":{"gitId":"-"},"content":" }"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"-"},"content":" public void parseAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseAddress(Optional.empty()).isPresent());"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parseAddress_validValue_returnsAddress() throws Exception {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" Address expectedAddress \u003d new Address(VALID_ADDRESS);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" Optional\u003cAddress\u003e actualAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" Address expectedPrivateAddress \u003d new Address(VALID_ADDRESS, PRIVATE_FIELD);"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAddress\u003e actualPrivateAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertEquals(expectedAddress, actualAddress.get());"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateAddress, actualPrivateAddress.get());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void parseEmail_null_throwsNullPointerException() throws Exception {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":179,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(null);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":183,"author":{"gitId":"-"},"content":" public void parseEmail_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":184,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":185,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(INVALID_EMAIL));"},{"lineNumber":186,"author":{"gitId":"-"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void parseEmail_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseEmail(Optional.empty()).isPresent());"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void parseEmail_validValue_returnsEmail() throws Exception {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" Email expectedEmail \u003d new Email(VALID_EMAIL);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" Optional\u003cEmail\u003e actualEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" Email expectedPrivateEmail \u003d new Email(VALID_EMAIL, PRIVATE_FIELD);"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" Optional\u003cEmail\u003e actualPrivateEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertEquals(expectedEmail, actualEmail.get());"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateEmail, actualPrivateEmail.get());"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_null_throwsNullPointerException() throws Exception {"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(null);"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(Optional.of(INVALID_REMARK));"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseRemark(Optional.empty()).isPresent());"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_validValue_returnsRemark() throws Exception {"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" Remark expectedRemark \u003d new Remark(VALID_REMARK);"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" Remark expectedPrivateRemark \u003d new Remark(VALID_REMARK, PRIVATE_FIELD);"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualPrivateRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedRemark, actualRemark.get());"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateRemark, actualPrivateRemark.get());"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_null_throwsNullPointerException() throws Exception {"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(null);"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(Optional.of(INVALID_AVATAR));"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseAvatar(Optional.empty()).isPresent());"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_validValue_returnsAvatar() throws Exception {"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" Avatar expectedAvatar \u003d new Avatar(VALID_AVATAR);"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAvatar\u003e actualAvatar \u003d ParserUtil.parseAvatar(Optional.of(VALID_AVATAR));"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAvatar, actualAvatar.get());"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void parseTags_null_throwsNullPointerException() throws Exception {"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(null);"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithInvalidTags_throwsIllegalValueException() throws Exception {"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, INVALID_TAG));"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" public void parseTags_emptyCollection_returnsEmptySet() throws Exception {"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertTrue(ParserUtil.parseTags(Collections.emptyList()).isEmpty());"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithValidTags_returnsTagSet() throws Exception {"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e actualTagSet \u003d ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, VALID_TAG_2));"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e expectedTagSet \u003d new HashSet\u003c\u003e(Arrays.asList(new Tag(VALID_TAG_1), new Tag(VALID_TAG_2)));"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTagSet, actualTagSet);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_null_throwsNullPointerException() throws Exception {"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(null);"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(INVALID_TASK_NAME));"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskName(Optional.empty()).isPresent());"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_validValue_returnsTaskName() throws Exception {"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" TaskName expectedTaskName \u003d new TaskName(VALID_TASK_NAME);"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskName\u003e actualTaskName \u003d ParserUtil.parseTaskName(Optional.of(VALID_TASK_NAME));"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskName, actualTaskName.get());"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_null_throwsNullPointerException() throws Exception {"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(null);"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDescription(Optional.empty()).isPresent());"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_validValue_returnsDescription() throws Exception {"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Description expectedDescription \u003d new Description(VALID_DESCRIPTION);"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDescription\u003e actualDescription \u003d ParserUtil.parseDescription(Optional.of(VALID_DESCRIPTION));"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDescription, actualDescription.get());"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_null_throwsNullPointerException() throws Exception {"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(null);"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(INVALID_DEADLINE));"},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDeadline(Optional.empty()).isPresent());"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_validValue_returnsDeadline() throws Exception {"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" Deadline expectedDeadline \u003d new Deadline(VALID_DEADLINE);"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDeadline\u003e actualDeadline \u003d ParserUtil.parseDeadline(Optional.of(VALID_DEADLINE));"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDeadline, actualDeadline.get());"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_null_throwsNullPointerException() throws Exception {"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(null);"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(INVALID_PRIORITY));"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parsePriority(Optional.empty()).isPresent());"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_validValue_returnsPriority() throws Exception {"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" Priority expectedPriority \u003d new Priority(VALID_PRIORITY);"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPriority\u003e actualPriority \u003d ParserUtil.parsePriority(Optional.of(VALID_PRIORITY));"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPriority, actualPriority.get());"},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_null_throwsNullPointerException() throws Exception {"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(null);"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(INVALID_TASK_ADDRESS));"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskAddress(Optional.empty()).isPresent());"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_validValue_returnsTaskAddress() throws Exception {"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" TaskAddress expectedTaskAddress \u003d new TaskAddress(VALID_TASK_ADDRESS);"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskAddress\u003e actualTaskAddress \u003d ParserUtil.parseTaskAddress(Optional.of(VALID_TASK_ADDRESS));"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskAddress, actualTaskAddress.get());"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_null_throwsNullPointerException() throws Exception {"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(null);"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_invalidValue_throwsParseException() throws Exception {"},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(\"1 2 a b c\");"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_validValue_returnsIndexes() throws Exception {"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e expectedIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON,"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" INDEX_THIRD_PERSON));"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\"1 2 3\"));"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\" 1 2 3 \"));"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":260,"-":162}},{"path":"src/test/java/seedu/address/logic/parser/PrivacyLevelCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParserTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommandParser parser \u003d new PrivacyLevelCommandParser();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new PrivacyLevelCommand(INDEX_FIRST_PERSON.getOneBased()));"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"2\", new PrivacyLevelCommand(INDEX_SECOND_PERSON.getOneBased()));"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"3\", new PrivacyLevelCommand(INDEX_THIRD_PERSON.getOneBased()));"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"???\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/test/java/seedu/address/logic/parser/SelectPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Test scope: similar to {@code DeletePersonCommandParserTest}."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandParserTest"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParserTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new SelectPersonCommand(INDEX_FIRST_PERSON));"},{"lineNumber":23,"author":{"gitId":"-"},"content":" }"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":23}},{"path":"src/test/java/seedu/address/logic/parser/SelectTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \" + PREFIX_TASK.getPrefix() + \" 1\","},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new SelectTaskCommand(INDEX_FIRST_TASK));"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \" + PREFIX_TASK.getPrefix() + \" -1\","},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/SetCompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskCompleteCommandParser parser \u003d new SetTaskCompleteCommandParser();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\","},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetCompleteCommand(INDEX_FIRST_TASK));"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\","},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SetIncompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskIncompleteCommandParser parser \u003d new SetTaskIncompleteCommandParser();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\","},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetIncompleteCommand(INDEX_FIRST_TASK));"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\","},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_ORDER_PARAMETERS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" // no list specified"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_FIELD_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0),"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // list is person but field is for tasks"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(5)"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" // list is task but field is for person"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(1) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0)"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // Incorrect test"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\","},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" SortCommand expectedCommand;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" SortCommand actualCommand;"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // For person sorts"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" String list \u003d ACCEPTED_LIST_PARAMETERS.get(0);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" String field \u003d ACCEPTED_FIELD_PARAMETERS.get(0);"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" String order \u003d ACCEPTED_ORDER_PARAMETERS.get(0);"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // For task sorts"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" list \u003d ACCEPTED_LIST_PARAMETERS.get(1);"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" field \u003d ACCEPTED_FIELD_PARAMETERS.get(5);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" order \u003d ACCEPTED_ORDER_PARAMETERS.get(1);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":26,"jeffreygohkw":53}},{"path":"src/test/java/seedu/address/logic/parser/ThemeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParserTest {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommandParser parser \u003d new ThemeCommandParser();"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_emptyArg_throwsParseException() {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand.MESSAGE_USAGE));"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsFindCommand() {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" // no leading and trailing whitespaces"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand expectedFindPersonCommand \u003d"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" new ThemeCommand(\"light\");"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"light\", expectedFindPersonCommand);"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // multiple whitespaces between keywords"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \" light \", expectedFindPersonCommand);"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/ViewAssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommandParser parser \u003d new ViewAssignCommandParser();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsDeleteCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new ViewAssignCommand(INDEX_FIRST_PERSON));"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\","},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice"},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints."},{"lineNumber":190,"author":{"gitId":"-"},"content":" */"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();"},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":" }"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":111,"Esilocke":18,"-":88}},{"path":"src/test/java/seedu/address/model/ModelManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class ModelManagerTest {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void getFilteredPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" modelManager.getFilteredPersonList().remove(0);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /*"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of deleteTag is equals to the expected"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to delete."},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTagValidIndexesAndTagSuccess() throws Exception {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"someTag\", \"friends\").build();"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(\"someTag\");"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(toDelete, indexes);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"friends\").build();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" /*"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of addTag is equals to the expected"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to add."},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void addTagValidIndexesAndTagSuccess() throws Exception {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\").build();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(\"newTag\");"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(toAdd, indexes);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\", \"newTag\").build();"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\", \"newTag\").build();"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBookBuilder().withPerson(ALICE).withPerson(BENSON).build();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" AddressBook differentAddressBook \u003d new AddressBook();"},{"lineNumber":115,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":118,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager(addressBook, userPrefs);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" ModelManager modelManagerCopy \u003d new ModelManager(addressBook, userPrefs);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManagerCopy));"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManager));"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(null));"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(5));"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" // different addressBook -\u003e returns false"},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(differentAddressBook, userPrefs)));"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" // different filteredList -\u003e returns false"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String[] keywords \u003d ALICE.getName().value.split(\"\\\\s+\");"},{"lineNumber":136,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(keywords)));"},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(addressBook, userPrefs)));"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" // resets modelManager to initial state for upcoming tests"},{"lineNumber":140,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" // different userPrefs -\u003e returns true"},{"lineNumber":143,"author":{"gitId":"-"},"content":" UserPrefs differentUserPrefs \u003d new UserPrefs();"},{"lineNumber":144,"author":{"gitId":"-"},"content":" differentUserPrefs.setAddressBookName(\"differentName\");"},{"lineNumber":145,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(new ModelManager(addressBook, differentUserPrefs)));"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":1,"wangyiming1019":82,"-":64}},{"path":"src/test/java/seedu/address/model/UniquePersonListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class UniquePersonListTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" UniquePersonList uniquePersonList \u003d new UniquePersonList();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" uniquePersonList.asObservableList().remove(0);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byName_bothOrders() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e nameComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, nameComparator);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"asc\");"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(nameComparator));"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"desc\");"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byPhone_bothOrders() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e phoneComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, phoneComparator);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"asc\");"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(phoneComparator));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"desc\");"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byEmail_bothOrders() {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e emailComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, emailComparator);"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"asc\");"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(emailComparator));"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"desc\");"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byAddress_bothOrders() {"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e addressComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, addressComparator);"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"asc\");"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(addressComparator));"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"desc\");"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":155,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":136,"-":19}},{"path":"src/test/java/seedu/address/model/UniqueTaskListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Rule;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.UniqueTaskList;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalTasks;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class UniqueTaskListTest {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Rule"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" UniqueTaskList uniquePersonList \u003d new UniqueTaskList();"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" uniquePersonList.asObservableList().remove(0);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byDeadline_bothOrders() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"asc\");"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"desc\");"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byPriority_bothOrders() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return Integer.compare(o1.getPriority().value, o2.getPriority().value);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"asc\");"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"desc\");"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.getIsPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":19}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.getIsPrivate());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":38}},{"path":"src/test/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicateTest {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicate \u003d"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate secondPredicate \u003d"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(secondPredicateKeywordList);"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicate));"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicateCopy \u003d"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(1));"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(null));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(secondPredicate));"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameContainsKeywords_returnsTrue() throws IllegalValueException {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // One keyword"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.singletonList(\"Alice\"));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(testee));"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" testee.getPhone().setPrivate(true);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // Multiple keywords"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Alice\", \"Bob\"));"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Carol\").build();"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // Only one matching keyword"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Bob\", \"Carol\"));"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Carol\").build()));"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" testee.getAddress().setPrivate(true);"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // Mixed-case keywords"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"aLIce\", \"bOB\"));"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // Zero keywords"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.emptyList());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" // Non-matching keyword"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Carol\"));"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" testee.getRemark().setPrivate(true);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice\").withPhone(\"12345\")"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" .withEmail(\"alice@email.com\").withAddress(\"Main Street\").build();"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" // Keywords match phone, email and address, but does not match name"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList("},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" \"12345\", \"alice@email.com\", \"Main\", \"Street\"));"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":113}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name"},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.getIsPrivate());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":24}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getIsPrivate());"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":23}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" // valid deadlines"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"the day after tomorrow\")); // slashes"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"4-11\"));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":25}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"-1\")); // priority out of range"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskContainsKeywordPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicateTest {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d new TaskContainsKeywordPredicate(secondPredicateKeywordList);"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate thirdPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicate));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicateCopy \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(1));"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(null));"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different keywords -\u003e returns false"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(secondPredicate));"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(thirdPredicate));"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void test_nameContainsKeywords_returnsTrue() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // One keyword"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pen\").build()));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // Zero keywords"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.emptyList());"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy\").build()));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // Non-matching keyword"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pen\"));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void test_descriptionContainsKeywords_returnsTrue() {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // One keyword"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy 3 Pencil\").build()));"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pen\").build()));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void priorityMatches() {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // Priority level equal to required level"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // Priority level greater than required level"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"4\").build()));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // Priority level less than required level"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" // Name matches, priority check not required, even though priority level does not match"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" false, false, false, 3);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Priority matches, but name does not match"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" public void stateMatches() {"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" // States are equivalent"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // States are different"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" // Name matches, state check not required, even though state does not match"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // State matches, but name does not match"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" public void combinationTests() {"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" // At most 1 invalid input per test case"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" // Matches all"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencil now\")"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" // Name does not match, but description does"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Get something\").withDescription(\"Get 3 Pencil now\")"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" // Description does not match, but name does"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy 3 Pencil\").withDescription(\"Get something\")"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but priority does not"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"2\").withState(true).build()));"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but state does not"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(false).build()));"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":182}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));"},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class."},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class."},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),"},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called"},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder"},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored."},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method"},{"lineNumber":61,"author":{"gitId":"-"},"content":" */"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back"},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back"},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));"},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path"},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified"},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}."},{"lineNumber":112,"author":{"gitId":"-"},"content":" */"},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));"},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());"},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" descriptor.setAvatar(person.getAvatar());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":54,"author":{"gitId":"-"},"content":" */"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":66,"author":{"gitId":"-"},"content":" */"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"remark is expected to be unique.\");"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Avatar} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withAvatar(String avatar) {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseAvatar(Optional.of(avatar)).ifPresent(descriptor::setAvatar);"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"avatar is expected to be unique.\");"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" //@author"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * that we are building."},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":135,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {"},{"lineNumber":136,"author":{"gitId":"-"},"content":" return descriptor;"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":40,"Esilocke":1,"wangyiming1019":9,"-":88}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskAddress(task.getTaskAddress());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskAddress(String address) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(address)).ifPresent(descriptor::setTaskAddress);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return descriptor;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":101}},{"path":"src/test/java/seedu/address/testutil/ModelStub.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * A default model stub that have all of the methods failing."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class ModelStub implements Model {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public void setMainWindow(MainWindow mainWindow) {"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throws DuplicatePersonException {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public void sortTasks(String field, String order) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" return 0;"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" return null;"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return null;"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" return null;"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public boolean getLockState() {"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public void lockAddressBookFromModel() {"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void unlockAddressBookFromModel() {"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called\");"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":17,"jeffreygohkw":37,"Esilocke":153,"wangyiming1019":24,"-":1}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class PersonBuilder {"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_AVATAR \u003d \"\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private Person person;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" public PersonBuilder() {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Avatar defaultAvatar \u003d new Avatar(DEFAULT_AVATAR);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" defaultRemark, defaultAvatar, defaultTags);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building."},{"lineNumber":59,"author":{"gitId":"-"},"content":" */"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building."},{"lineNumber":71,"author":{"gitId":"-"},"content":" */"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));"},{"lineNumber":75,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building."},{"lineNumber":83,"author":{"gitId":"-"},"content":" */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));"},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withAvatar(String filepath) {"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.person.setAvatar(new Avatar(filepath));"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Avatar is invalid\");"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":119,"author":{"gitId":"-"},"content":" */"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));"},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building."},{"lineNumber":131,"author":{"gitId":"-"},"content":" */"},{"lineNumber":132,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));"},{"lineNumber":135,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building."},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":149,"author":{"gitId":"-"},"content":" public Person build() {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" return this.person;"},{"lineNumber":151,"author":{"gitId":"-"},"content":" }"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":34,"wangyiming1019":12,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects."},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().getIsPrivate());"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().getIsPrivate());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().getIsPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().getIsPrivate());"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(person.getRemark().getIsPrivate());"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code remarkIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setRemarkPrivate(String remark) {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":106}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * A utility class for Person."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonUtil {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand.COMMAND_WORD + \" \" + getPersonDetails(person);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details."},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" sb.append(PREFIX_NAME + person.getName().value + \" \");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");"},{"lineNumber":34,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_AVATAR + person.getAvatar().value + \" \");"},{"lineNumber":37,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach("},{"lineNumber":38,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")"},{"lineNumber":39,"author":{"gitId":"-"},"content":" );"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":1,"Esilocke":2,"-":35}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_ADDRESS \u003d \"12 Kent Ridge Crescent, 119275\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Task task;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" TaskAddress defaultAddress \u003d new TaskAddress(DEFAULT_ADDRESS);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState, defaultAddress);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building."},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building."},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building."},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building."},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building."},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code Task} that we are building."},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskAddress(String address) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskAddress(new TaskAddress(address));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Assignees} of the {@code Task} that we are building."},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withAssignees(String... args) {"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" for (String s : args) {"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromOneBased(Integer.parseInt(s)));"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" this.task.setAssignees(new Assignees(indexes));"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public Task build() {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return this.task;"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":135}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + Integer.toString(task.getPriority().value) + \" \");"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_ADDRESS + task.getTaskAddress().taskAddress + \" \");"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return sb.toString();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests."},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_CHRIS;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_CHRIS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_ALICE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_CHRIS;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_CHRIS;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_CHRIS;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests."},{"lineNumber":33,"author":{"gitId":"-"},"content":" */"},{"lineNumber":34,"author":{"gitId":"-"},"content":"public class TypicalPersons {"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")"},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")"},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_AMY)"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_BOB)"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS).withEmail(VALID_EMAIL_CHRIS)"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" .withAddress(VALID_ADDRESS_CHRIS).withFavourite(VALID_FAVOURITE_ALICE)"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_CHRIS)"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_CHRISTAG).build();"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS_WITH_NEW_TAG \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS)"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_CHRIS).withAddress(VALID_ADDRESS_CHRIS)"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_CHRIS)"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" .withTags(\"friends\").build();"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":88,"author":{"gitId":"-"},"content":" */"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":91,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" ab.addPerson(person);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assert false : \"not possible\";"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" return ab;"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":18,"wangyiming1019":32,"-":64}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").withAssignees(\"4\")"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"21 Heng Mui Keng Terrace, #02-01-01 I-Cube Building\").build();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\").withState(true)"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").withTaskAddress(\"Tampines Mall\").build();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).withTaskAddress(\"27 Prince George\u0027s Park\")"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .build();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").withTaskAddress(\"Central Park\").build();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").withTaskAddress(\"16 Gemmill Ln\").build();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).withAssignees(\"1\", \"2\", \"3\")"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"NUS School of Computing, COM1, 13 Computing Drive, 117417\").build();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\")"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"Changi Airport\").build();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL)"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String KEYWORD_MATCHING_LUCY \u003d \"Lucy\"; // A keyword that matches LUCY"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_PREFIX;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_SUFFIX;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelNavigateEvent panelNavigateEventStub;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() throws IllegalValueException {"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" panelNavigateEventStub \u003d new BrowserPanelNavigateEvent(new Location(\"NUS\"),"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" new Location(BENSON.getAddress().toString()));"},{"lineNumber":44,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());"},{"lineNumber":45,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // default web page"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelNavigateEventStub);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDirUrl \u003d new URL(GOOGLE_MAPS_DIRECTIONS_PREFIX"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026origin\u003d\""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getFromLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getToLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDirUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":47,"-":31}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultiplier());"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags"},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card"},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" });"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock"},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock"},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated"},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());"},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // no tags"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public void equals() {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}."},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":89,"Esilocke":1}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final JumpToListRequestTaskEvent JUMP_TO_SECOND_EVENT \u003d new"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent(INDEX_SECOND_PERSON);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void handleJumpToListRequestTaskEvent() {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"}"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""}],"authorContributionMap":{"charlesgoh":57,"Esilocke":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing."},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":22,"-":80}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards."},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPerson.getName().value, actualCard.getName());"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),"},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}."},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTask.getPriority().toString(), actualCard.getPriority());"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":1,"Esilocke":1,"-":71}},{"path":"src/test/java/systemtests/AddPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * -\u003e added"},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + AddPersonCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */"},{"lineNumber":90,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in"},{"lineNumber":92,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void addSecondTest() throws Exception {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void addThirdTest() throws Exception {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */"},{"lineNumber":134,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()"},{"lineNumber":150,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public void addFourthTest() throws Exception {"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */"},{"lineNumber":161,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" 1\");"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */"},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */"},{"lineNumber":184,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);"},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":196,"author":{"gitId":"-"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":206,"author":{"gitId":"-"},"content":" }"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Executes the {@code AddPersonCommand} that adds {@code toAdd} to the model and verifies that the command box"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * displays an empty string, the result display box displays the success message of executing"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * {@code AddPersonCommand} with the details of {@code toAdd}, and the model related components equal to the"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" * current model added with {@code toAdd}."},{"lineNumber":213,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":214,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,"},{"lineNumber":216,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged."},{"lineNumber":217,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":218,"author":{"gitId":"-"},"content":" */"},{"lineNumber":219,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":""},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}"},{"lineNumber":225,"author":{"gitId":"-"},"content":" * instead."},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)"},{"lineNumber":227,"author":{"gitId":"-"},"content":" */"},{"lineNumber":228,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {"},{"lineNumber":229,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(AddPersonCommand.MESSAGE_SUCCESS, toAdd);"},{"lineNumber":236,"author":{"gitId":"-"},"content":""},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":238,"author":{"gitId":"-"},"content":" }"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * {@code expectedModel}."},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)"},{"lineNumber":245,"author":{"gitId":"-"},"content":" */"},{"lineNumber":246,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":247,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":255,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":256,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":257,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":258,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":260,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":261,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":262,"author":{"gitId":"-"},"content":" */"},{"lineNumber":263,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":268,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":270,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":271,"author":{"gitId":"-"},"content":" }"},{"lineNumber":272,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":50,"Esilocke":30,"-":192}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * for test verification."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @ClassRule"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d"},{"lineNumber":52,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initializeStage();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" public BrowserPanelHandle getBrowserPanel() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated."},{"lineNumber":106,"author":{"gitId":"-"},"content":" */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" rememberStates();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar"},{"lineNumber":110,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command."},{"lineNumber":111,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());"},{"lineNumber":116,"author":{"gitId":"-"},"content":" }"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":119,"author":{"gitId":"-"},"content":" * Displays all persons in the address book."},{"lineNumber":120,"author":{"gitId":"-"},"content":" */"},{"lineNumber":121,"author":{"gitId":"-"},"content":" protected void showAllPersons() {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d getModel().getFilteredPersonList().size();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive)."},{"lineNumber":128,"author":{"gitId":"-"},"content":" */"},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + keyword);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size();"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list."},{"lineNumber":136,"author":{"gitId":"-"},"content":" */"},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" \" + index.getOneBased());"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getPersonListPanel().getSelectedCardIndex() \u003d\u003d index.getZeroBased();"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly."},{"lineNumber":146,"author":{"gitId":"-"},"content":" */"},{"lineNumber":147,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,"},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());"},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":157,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * their current state."},{"lineNumber":159,"author":{"gitId":"-"},"content":" */"},{"lineNumber":160,"author":{"gitId":"-"},"content":" private void rememberStates() {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" getBrowserPanel().rememberUrl();"},{"lineNumber":163,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();"},{"lineNumber":164,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();"},{"lineNumber":165,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();"},{"lineNumber":166,"author":{"gitId":"-"},"content":" }"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details"},{"lineNumber":170,"author":{"gitId":"-"},"content":" * of the previously selected person."},{"lineNumber":171,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()"},{"lineNumber":172,"author":{"gitId":"-"},"content":" */"},{"lineNumber":173,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());"},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at"},{"lineNumber":180,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected."},{"lineNumber":181,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":183,"author":{"gitId":"-"},"content":" */"},{"lineNumber":184,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {"},{"lineNumber":185,"author":{"gitId":"-"},"content":" String selectedCardName \u003d getPersonListPanel().getHandleToSelectedCard().getName();"},{"lineNumber":186,"author":{"gitId":"-"},"content":" URL expectedUrl;"},{"lineNumber":187,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" expectedUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX + selectedCardName.replaceAll(\" \", \"+\")"},{"lineNumber":189,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":190,"author":{"gitId":"-"},"content":" } catch (MalformedURLException mue) {"},{"lineNumber":191,"author":{"gitId":"-"},"content":" throw new AssertionError(\"URL expected to be valid.\");"},{"lineNumber":192,"author":{"gitId":"-"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" //TODO Might need to remove this as the person panel no longer involves google search."},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //assertEquals(expectedUrl, getBrowserPanel().getLoadedUrl());"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":200,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged."},{"lineNumber":201,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":203,"author":{"gitId":"-"},"content":" */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style."},{"lineNumber":211,"author":{"gitId":"-"},"content":" */"},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style."},{"lineNumber":218,"author":{"gitId":"-"},"content":" */"},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":""},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same."},{"lineNumber":225,"author":{"gitId":"-"},"content":" */"},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {"},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same."},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);"},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());"},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }"},{"lineNumber":243,"author":{"gitId":"-"},"content":""},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct."},{"lineNumber":246,"author":{"gitId":"-"},"content":" */"},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());"},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());"},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());"},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertEquals(MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE), getBrowserPanel().getLoadedUrl());"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());"},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());"},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {"},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model."},{"lineNumber":262,"author":{"gitId":"-"},"content":" */"},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();"},{"lineNumber":265,"author":{"gitId":"-"},"content":" }"},{"lineNumber":266,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":6,"-":260}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void clear() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared"},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void clearTestTwo() throws Exception {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":44,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":50,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model."},{"lineNumber":65,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes."},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}."},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)"},{"lineNumber":79,"author":{"gitId":"-"},"content":" */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":89,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":90,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":3,"Esilocke":5,"-":97}},{"path":"src/test/java/systemtests/DeletePersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeletePersonCommand.MESSAGE_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getLastIndex;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getMidIndex;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_DELETE_COMMAND_FORMAT \u003d"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void delete() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" /* ----------------- Performing delete operation while an unfiltered list is being shown -------------------- */"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: delete the first person in the list, command with leading spaces and trailing spaces -\u003e deleted */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + DeletePersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";"},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: delete the last person in the list -\u003e deleted */"},{"lineNumber":41,"author":{"gitId":"-"},"content":" Model modelBeforeDeletingLast \u003d getModel();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d getLastIndex(modelBeforeDeletingLast);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(lastPersonIndex);"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" /* Case: undo deleting the last person in the list -\u003e last person restored */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: redo deleting the last person in the list -\u003e last person deleted again */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" removePerson(modelBeforeDeletingLast, lastPersonIndex);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: delete the middle person in the list -\u003e deleted */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" Index middlePersonIndex \u003d getMidIndex(getModel());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(middlePersonIndex);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ------------------ Performing delete operation while a filtered list is being shown ---------------------- */"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book and person list -\u003e deleted */"},{"lineNumber":63,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" assertCommandSuccess(index);"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book but out of bounds of person list"},{"lineNumber":69,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":70,"author":{"gitId":"-"},"content":" */"},{"lineNumber":71,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + invalidIndex;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /* --------------------- Performing delete operation while a person card is selected ------------------------ */"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: delete the selected person -\u003e person list panel selects the person before the deleted person */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" Index selectedIndex \u003d getLastIndex(expectedModel);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" Index expectedIndex \u003d Index.fromZeroBased(selectedIndex.getZeroBased() - 1);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" selectPerson(selectedIndex);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + selectedIndex.getOneBased();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" deletedPerson \u003d removePerson(expectedModel, selectedIndex);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, expectedIndex);"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid delete operation ------------------------------------ */"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" 0\";"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" -1\";"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":100,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased("},{"lineNumber":101,"author":{"gitId":"-"},"content":" getModel().getAddressBook().getPersonList().size() + 1);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + outOfBoundsIndex.getOneBased();"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" 1 abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertCommandFailure(\"DelETE 1\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Removes the {@code ReadOnlyPerson} at the specified {@code index} in {@code model}\u0027s address book."},{"lineNumber":117,"author":{"gitId":"-"},"content":" * @return the removed person"},{"lineNumber":118,"author":{"gitId":"-"},"content":" */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" private ReadOnlyPerson removePerson(Model model, Index index) {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" ReadOnlyPerson targetPerson \u003d getPerson(model, index);"},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" model.deletePerson(targetPerson);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new AssertionError(\"targetPerson is retrieved from model.\");"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return targetPerson;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" * Deletes the person at {@code toDelete} by creating a default {@code DeletePersonCommand} using"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" * {@code toDelete} and performs the same verification as {@code assertCommandSuccess(String, Model, String)}."},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)"},{"lineNumber":133,"author":{"gitId":"-"},"content":" */"},{"lineNumber":134,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Index toDelete) {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":136,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, toDelete);"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertCommandSuccess("},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand.COMMAND_WORD + \" \" + toDelete.getOneBased(),"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" expectedModel, expectedResultMessage);"},{"lineNumber":142,"author":{"gitId":"-"},"content":" }"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":149,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card remains unchanged.\u003cbr\u003e"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":153,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}."},{"lineNumber":154,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":155,"author":{"gitId":"-"},"content":" */"},{"lineNumber":156,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":158,"author":{"gitId":"-"},"content":" }"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String)} except that the browser url"},{"lineNumber":162,"author":{"gitId":"-"},"content":" * and selected card are expected to update accordingly depending on the card at {@code expectedSelectedCardIndex}."},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":165,"author":{"gitId":"-"},"content":" */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":168,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":186,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":187,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":188,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":190,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":191,"author":{"gitId":"-"},"content":" */"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":193,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":199,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":200,"author":{"gitId":"-"},"content":" }"},{"lineNumber":201,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":21,"-":180}},{"path":"src/test/java/systemtests/EditPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited"},{"lineNumber":64,"author":{"gitId":"-"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson("},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public void editThree() throws Exception {"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":128,"author":{"gitId":"-"},"content":" */"},{"lineNumber":129,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" public void editFourth() throws Exception {"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" int invalidIndex;"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * browser url changes"},{"lineNumber":148,"author":{"gitId":"-"},"content":" */"},{"lineNumber":149,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":150,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":151,"author":{"gitId":"-"},"content":" selectPerson(index);"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":154,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the"},{"lineNumber":155,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" //TODO rewrite GUI check for this as select no longer displays google searches"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":170,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":172,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public void editFive() throws Exception {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + NAME_DESC_BOB,"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" public void editSix() throws Exception {"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */"},{"lineNumber":217,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));"},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));"},{"lineNumber":219,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":232,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged."},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)"},{"lineNumber":236,"author":{"gitId":"-"},"content":" */"},{"lineNumber":237,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);"},{"lineNumber":239,"author":{"gitId":"-"},"content":" }"},{"lineNumber":240,"author":{"gitId":"-"},"content":""},{"lineNumber":241,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditPersonCommand}.\u003cbr\u003e"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list."},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":248,"author":{"gitId":"-"},"content":" */"},{"lineNumber":249,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,"},{"lineNumber":250,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":251,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":252,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":253,"author":{"gitId":"-"},"content":" expectedModel.updatePerson("},{"lineNumber":254,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);"},{"lineNumber":255,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {"},{"lineNumber":257,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException("},{"lineNumber":258,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }"},{"lineNumber":260,"author":{"gitId":"-"},"content":""},{"lineNumber":261,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson), expectedSelectedCardIndex);"},{"lineNumber":263,"author":{"gitId":"-"},"content":" }"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged."},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":269,"author":{"gitId":"-"},"content":" */"},{"lineNumber":270,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":271,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":272,"author":{"gitId":"-"},"content":" }"},{"lineNumber":273,"author":{"gitId":"-"},"content":""},{"lineNumber":274,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":275,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":276,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":277,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":278,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":279,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at"},{"lineNumber":280,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e"},{"lineNumber":281,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":282,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":283,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":284,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":285,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":286,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":287,"author":{"gitId":"-"},"content":" */"},{"lineNumber":288,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":289,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":290,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":291,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":292,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":293,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":296,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":297,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":298,"author":{"gitId":"-"},"content":" }"},{"lineNumber":299,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":300,"author":{"gitId":"-"},"content":" }"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":303,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":304,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":305,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":306,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":307,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":308,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":309,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":310,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":311,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":312,"author":{"gitId":"-"},"content":" */"},{"lineNumber":313,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":314,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":315,"author":{"gitId":"-"},"content":""},{"lineNumber":316,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":317,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":318,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":319,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":320,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":321,"author":{"gitId":"-"},"content":" }"},{"lineNumber":322,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":49,"Esilocke":40,"-":233}},{"path":"src/test/java/systemtests/FindPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void find() {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, command with leading spaces and trailing spaces"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER + \" \";"},{"lineNumber":32,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL); // first names of Benson and Daniel are \"Meier\""},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" /* Case: repeat previous find command where person list is displaying the persons we are finding"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found"},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /* Case: find person where person list is not displaying the person we are finding -\u003e 1 person found */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Carl\";"},{"lineNumber":46,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, CARL);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords -\u003e 2 persons found */"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Benson Daniel\";"},{"lineNumber":52,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords in reversed order -\u003e 2 persons found */"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson\";"},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords with 1 repeat -\u003e 2 persons found */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson Daniel\";"},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 matching keywords and 1 non-matching keyword"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson NonMatchingKeyWord\";"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo previous find command -\u003e rejected */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo previous find command -\u003e rejected */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: find same persons in address book after deleting 1 of them -\u003e 1 person found */"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" executeCommand(DeletePersonCommand.COMMAND_WORD + \" 1\");"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert !getModel().getAddressBook().getPersonList().contains(BENSON);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is same as name but of different case -\u003e 1 person found */"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" MeIeR\";"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is substring of name -\u003e 0 persons found */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mei\";"},{"lineNumber":99,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: find person in address book, name is substring of keyword -\u003e 0 persons found */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Meiers\";"},{"lineNumber":105,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: find person not in address book -\u003e 0 persons found */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mark\";"},{"lineNumber":111,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /* Case: find phone number of person in address book -\u003e 0 persons found */"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getPhone().value;"},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: find address of person in address book -\u003e 0 persons found */"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getAddress().value;"},{"lineNumber":121,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" /* Case: find email of person in address book -\u003e 0 persons found */"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getEmail().value;"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /* Case: find tags of person in address book -\u003e 0 persons found */"},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cTag\u003e tags \u003d new ArrayList\u003c\u003e(DANIEL.getTags());"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + tags.get(0).tagName;"},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: find while a person is selected -\u003e selected card deselected */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":137,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" assert !getPersonListPanel().getHandleToSelectedCard().getName().equals(DANIEL.getName().value);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel\";"},{"lineNumber":140,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);"},{"lineNumber":141,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: find person in empty address book -\u003e 0 persons found */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;"},{"lineNumber":148,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();"},{"lineNumber":149,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" command \u003d \"FiNd Meier\";"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":160,"author":{"gitId":"-"},"content":" * box displays {@code Messages#MESSAGE_PERSONS_LISTED_OVERVIEW} with the number of people in the filtered list,"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the model related components equal to {@code expectedModel}."},{"lineNumber":162,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":163,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Also verifies that the status bar remains unchanged, and the command box has the default style class, and the"},{"lineNumber":165,"author":{"gitId":"-"},"content":" * selected card updated accordingly, depending on {@code cardStatus}."},{"lineNumber":166,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":167,"author":{"gitId":"-"},"content":" */"},{"lineNumber":168,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel) {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format("},{"lineNumber":170,"author":{"gitId":"-"},"content":" MESSAGE_PERSONS_LISTED_OVERVIEW, expectedModel.getFilteredPersonList().size());"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":180,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":181,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":185,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":186,"author":{"gitId":"-"},"content":" */"},{"lineNumber":187,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":189,"author":{"gitId":"-"},"content":""},{"lineNumber":190,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":193,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }"},{"lineNumber":196,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":1,"Esilocke":22,"-":173}},{"path":"src/test/java/systemtests/SelectPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.SelectPersonCommand.MESSAGE_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void select() {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" /* Case: select the first card in the person list, command with leading spaces and trailing spaces"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * -\u003e selected"},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /* Case: select the last card in the person list -\u003e selected */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + personCount.getOneBased();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, personCount);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: undo previous selection -\u003e rejected */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /* Case: redo selecting last card in the list -\u003e rejected */"},{"lineNumber":40,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public void selectSecondTest() throws Exception {"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: select the middle card in the person list -\u003e selected */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" Index middleIndex \u003d Index.fromOneBased(personCount.getOneBased() / 2);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + middleIndex.getOneBased();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":56,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* Case: select the current selected card -\u003e selected */"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book but out of bounds of person list"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" public void selectThirdTest() throws Exception {"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book and person list -\u003e selected */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Index validIndex \u003d Index.fromOneBased(1);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" assert validIndex.getZeroBased() \u003c getModel().getFilteredPersonList().size();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + validIndex.getOneBased();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, validIndex);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + 0,"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + -1,"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" abc\","},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void selectFourthTest() throws Exception {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" 1 abc\","},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandFailure(\"SeLeCt 1\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: select from empty address book -\u003e rejected */"},{"lineNumber":109,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":112,"author":{"gitId":"-"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * box displays the success message of executing select command with the {@code expectedSelectedCardIndex}"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * of the selected person, and the model related components equal to the current model."},{"lineNumber":119,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":120,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar remain unchanged. The resulting"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * browser url and selected card will be verified if the current selected card and the card at"},{"lineNumber":123,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex} are different."},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":126,"author":{"gitId":"-"},"content":" */"},{"lineNumber":127,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index expectedSelectedCardIndex) {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format("},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" MESSAGE_SUCCESS, expectedSelectedCardIndex.getOneBased());"},{"lineNumber":131,"author":{"gitId":"-"},"content":" int preExecutionSelectedCardIndex \u003d getPersonListPanel().getSelectedCardIndex();"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" if (preExecutionSelectedCardIndex \u003d\u003d expectedSelectedCardIndex.getZeroBased()) {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":143,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":144,"author":{"gitId":"-"},"content":" }"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":149,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":153,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":154,"author":{"gitId":"-"},"content":" */"},{"lineNumber":155,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":160,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":18,"Esilocke":21,"-":125}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,"},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" });"},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":70}}] +[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"image::images/Ui.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"endif::[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface).","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"* It is a Java application primarily targeted for students doing group projects.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Site Map","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Acknowledgements","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"_Marco Jakob_.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":36}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Goh Chang Kang, Charles","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[https://github.com/charlesgoh[github]]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert, Password Security Commands","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Jeffrey Goh Keng Wee","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Lin Ziwen Kelvin","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esilocke[github]]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Wang Yiming","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1019[github]]","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18,"Esilocke":4,"-":26}},{"path":"docs/ContactUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Contact Us","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"* *Bug reports, Suggestions* : Post in our https://github.com/CS2103AUG2017-W09-B2/main/issues[issue tracker] if you noticed bugs or have suggestions on how to improve.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"* *Contributing* : We welcome pull requests. Follow the process described https://github.com/oss-generic/process[here]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"* *Email us* : You can also reach us at `e0014961 [at] u.nus.edu`","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":4}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started].","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyTask\u003e` that can be \u0027observed\u0027.","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `Storage` component,","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package.","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.1 : Using the UI to change font size_","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size:","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"1. `onAction` handlers are used to handle UI font size buttons. These handlers will post","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"new events via `ComponentManager`.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":"2. CLI commands also post new events to handle font size changes, when the relevant command is entered (e.g. `fontsize increase`).","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeChangeSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.2 : Sequence diagram for fontsize changing_","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"From the sequence diagram above, we can observe that the font size changes are handled by subscriber functions in PersonListPanel","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"and TaskListPanel.","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"The initial implementation required access to the model from the UI. This implementation was replaced with one that","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"standardised the handling of font size change requests through events.","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Use either UI or CLI based implementations +","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implementing both UI and CLI functionality +","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More options for the user. Not much increase in complexity when implementing the CLI version +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Cons:** This implementation required passing information between classes, which may cause unnecessary coupling. +","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implementing only UI functionality +","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Less tedious to implement and very intuitive for the user +","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Users who prefer typing commands will not have the option of editing their font sizes using the CLI","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"charlesgoh"},"content":"//tag::avatar[]","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatar on ViewPersonPanel","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":"The following function allows the setting of URL for the `ImageView` attribute within the `ViewPersonPanel` class:","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":"[source,java]","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":"private void initializeAvatar() {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" String avatarPath \u003d person.getAvatar().value;","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" if (!avatarPath.equals(\"\")) {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Initializing avatar to image at saved URL\");","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" Image newImage \u003d new Image(avatarPath);","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":" avatarImage.setImage(newImage);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":"The `initializeAvatar` method piggybacks on the `handlePersonPanelSelectionChangedEvent` event handler. Whenever there is","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":"a change in the person selection panel, this function will call the `initializeAvatar` method, which will update","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"the `ImageView` attribute.","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":"[source,java]","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":"@Subscribe","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":"private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" this.person \u003d event.getNewSelection().person;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" initializeWithPerson(person);","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":"As of v1.5, the avatar field supports only URLs sourced online. References to local files may work but require the","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"prefix \"file:\"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"//tag::undoredo[]","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.1 : Command inheritance_","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" // ... list logic ...","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" // ... undo logic ...","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" executeUndoableCommand();","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" // ... delete logic ...","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.2 : Initial status of undo/redo stack_","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.3 : After executing `delete 5`_","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.4 : Executing undo_","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.5 : Undo/redo sequence diagram_","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.6 : Executing `clear`_","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.7 : Stack is not changed after `list`_","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.8 : Undo/Redo activity diagram_","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"// tag::task[]","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the `add`, `delete`, `find`, `select`, and `edit` commands.","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Object inheritance is thus used to create the commands that are shared with those used to handle Person objects.","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task-related Command implementation","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"An example of using inheritance to handle Person vs Task addition:","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand(toAdd);","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand(toAdd);","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"The Parser in charge of the command will thus return either an AddPersonCommand, or an AddTaskCommand, depending on whether you specify to add a Task or not in the arguments.","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":" +","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.1.1 : Sequence Diagram for adding a Task_","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task structure and subclasses","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"The Task object has several subclasses, which store information about the task. The following class diagram illustrates the structure of a Task object.","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"image::TaskClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.2.1 : Class Diagram for the Task class_","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"Each subclass contains its own methods for input validation, and the Assignees class supports some methods for changing its assignedList.","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task Object Storage","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"[source, xml]","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Task objects are stored in a similar manner to Person objects, and share the same level of hierarchy as Person objects. During startup, tasks are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book.","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use inheritance to implement different commands for Task and Person objects +","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"**Pros:** Can be easily extended to allow handling of other types of objects, and preserves Separation of Concerns. +","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"**Cons:** Minor code duplication occurs as the commands for Person and Tasks objects share the same structure. +","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Use polymorphism to allow existing commands to implement task handling +","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"**Pros:** Code duplication is kept to a minimum as the Command will handle Task and Person objects in the same class. +","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"**Cons:** Single Responsibility Principle is violated as each Command class now needs to handle 2 different types of objects. +","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes. +","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa. +","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage. +","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"// end::task[]","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign and Dismiss Commands","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"The `assign` and `dismiss` command allows you to assign contacts to and from your tasks, thus aiding coordination and collaboration. +","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"The Assignees class stores information related to who is assigned to a particular task through maintaining an internal ArrayList that keeps track of all the indexes of the people who are assigned to the task. +","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"The indexes stored in the Assignees class *refer to the index of the person in the UniquePersonList, not the visible index shown to the user in the UI*. This means that the indexes will not change even if the list shown in the UI changes, such as after a `find` operation. +","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"For example, given the below list of persons:","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexMovement.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.1 : Mapping of indexes to a task_","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"After a `find` operation, only the second, fourth and fifth persons are visible.","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"When you call `assign 1 2 to/1`, while the first and second persons in the visible list will be assigned to the first Task, in this case the \"Second person\" and \"Fourth person\", internally the assignee list contain Indexes corresponding the following values: +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[source, java]","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"assignedList \u003d {1, 3}","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"The indexes 1 and 3 refer to the zero-based index of the \"Second person\" and \"Fourth person\" in the complete list.","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Due to this requirement, when the UniquePersonList changes, the assigned indexes of each task will be updated as well.","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"The `add` operation will not require the assigned indexes to be updated, as each newly added person is not assigned to any task by default, and when a person is added, he is inserted to the end of the list, thus the order of the other persons will not change.","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"After a `clear` operation that clears only the persons list, all task assignee lists will be cleared and re-initialized.","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"After a `delete` operation, the order of the persons in the persons list may change. This is especially so when the first person is deleted, as this will cause the positions of all other persons to decrease by 1.","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"The activity diagram below illustrates the process of updating task assignee lists when a person is deleted.","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexDelete.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.2 : Activity Diagram for updating Assignees after deleting a Person_","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"After a `sort` operation, the order of the persons in the persons list may change as well. However, in comparison to `delete`, the new position of the person is not fixed.","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"To ensure that the indexes are updated properly, the change in positions after each `sort` operation is maintained as well inside the UniquePersonList. +","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexSort.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.3 : Mapping of indexes after a sort operation_","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"All task assignee lists will thus be updated using the mappings from the sort operation. Each index in the list will be replaced by the value given in the mappings.","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"For example, if a task previously had an index of \"1\" assigned to it, it be replaced by an index of \"4\".","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of assigned persons in the Assignee class +","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store the Indexes of the persons only +","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"**Pros:** The assigned persons will only need to be retrieved on a per-need basis, rather than residing in the Assignee class all the time, thus making storage simpler +","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":"**Cons:** UniquePersonList will be coupled to Tasks, as Tasks will need to retrieve information from the UniquePersonList in order to update itself after any operation that could potentially change the UniquePersonList ordering. +","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store the whole person in the Assignees class +","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":"**Pros:** The Assignees class will not need to depend on the UniquePersonList as its internal list is independent from that of the UniquePersonList +","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"**Cons:** Repetition of information is incurred in the storage file, as the same person can appear multiple times if he is assigned to multiple tasks. This will increase the size of the storage file, and make read-write operations slow. +","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` methods in UniquePersonList and UniqueTaskList. It supports","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field.","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator.","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class or the UniqueTaskList class.","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for sort commands that trigger sorting in person listings is shown below:","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandPersonDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command class diagram_","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"charlesgoh"},"content":"Likewise, the UML Class diagram for sort commands that trigger sorting in task listings is shown below:","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandTaskDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort task command class diagram_","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"charlesgoh"},"content":"We can deduce from the UML diagrams diagrams above that the only difference between the implementation","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"charlesgoh"},"content":"of the sorting for persons and tasks lies in the location where the sorting is actually executed.","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"charlesgoh"},"content":"The sorting of persons happens in `UniquePersonList` class while the sorting of tasks happens in `UniqueTaskList`.","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort person name desc`. The following sequence diagram","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works.","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command sequence diagram_","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods results in the actual person or task list being sorted. This list will be","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"charlesgoh"},"content":"reflected in both the application\u0027s storage as well as the graphical user interface.","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` and `UniqueTaskList` class. +","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the lists.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"charlesgoh"},"content":"Future changes to the implementation will be easier as a consequence. +","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList`","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":"and `UniqueTaskList` will have to rely on the `SortCommand` class.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive and reduces complexity in implementation. +","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system.","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":"// end::sort[]","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":"// tag::backup[]","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":"The `backup` command uses the event handler `BackupRequestEvent`. When raised, this","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":"event notifies the subscriber `backupAddressBook` method in Storage class.","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":"The outlining sequence diagram for this process (excluding the interaction with the","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":"`BackupRequestEvent`) is shown below:","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"_Figure 3.7.1 : Backup command sequence diagram_","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Use an event handler to initialize the backup process +","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Avoids coupling the logic to the storage unnecessarily. +","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May not be as intuitive for some developers in the beginning +","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Access storage component directly instead of using event handlers +","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive as it is a direct approach +","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates the Law of Demeter.","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":"// end::backup[]","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":"// tag::password[]","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock and Unlock Command","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":"The `lock` and `unlock` commands utilise the Model to access the user preferences of","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"the application.","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"Arguments are processed in the `UnlockCommandParser` or `LockCommandParser`,","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":"which passes control over to the `UnlockCommand` and `LockCommand` class respectively.","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":"These `Command` classes will then call the Model to toggle the lock\u0027s state.","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":"The activity diagram below outlines the basic logic of the lock states concept.:","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":"image::LockStatesActivityDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"_Figure 3.8.1 : Lock/Unlock command activity diagram_","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":"From the activity diagram we can see that lock states are preserved in the `preferences.json`","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":"file after the application closes by passing the lock state into the `UserPrefs` class to be","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"saved by the Storage component.","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":"The default state of the lock is set to False (i.e. locked) when the user first opens the","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":"application. Subsequent changes to the lock will persist in the user preferences.","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `lock` and `unlock` Commands","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Call methods in the Model directly to change UserPrefs +","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive. Highest returns for minimal amount of code +","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May be confusing to some developers in the beginning, since another","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"intuitive approach is to use event handlers +","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Use Event Handlers +","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for some developers +","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will still have to access Model, which makes its advantage over direct calls next to none","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d ChangePassword Command","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"charlesgoh"},"content":"The default password when users first open Address++ is `password`. The ChangePassword command","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":"sets a new password in the temporary User Preferences. When the application is closed, this","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"charlesgoh"},"content":"information is passed to the Storage Component to be saved into the file `preferences.json`","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":"To illustrate this concept better, let us have a look at the `preferences.json` file:","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"jeffreygohkw"},"content":"[source, json]","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":"{","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":" \"guiSettings\" : {","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" \"windowWidth\" : 1309.0,","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":" \"windowHeight\" : 720.0,","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":" \"windowCoordinates\" : {","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":" \"x\" : 0,","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":" \"y\" : 22","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":" },","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":" \"addressBookFilePath\" : \"data/addressbook.xml\",","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":" \"addressBookName\" : \"My Address++\",","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":" \"addressBookLockState\" : false,","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":" \"addressBookEncryptedPassword\" : \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\",","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" \"theme\" : \"/view/DarkTheme.css\"","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"charlesgoh"},"content":"As shown in the cope snippet above, the password is stored as one of the entries in the JSON","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":"file.","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":"SHA256 encryption was used to calculate a hash for the password. This is to delay anyone snooping around the","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"user\u0027s file directories from seeing the real password immediately.","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"charlesgoh"},"content":"**Validation Checks**","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":"1. **Password Validation** -\u003e Is the password correct?","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"2. **Password Confirmation** -\u003e Does the new password and confirmation password match?","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"3. **Password Uniqueness** -\u003e Is the new password different from the old password?","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"charlesgoh"},"content":"The activity diagram below outlines the process flow for the `ChangePasswordCommand`:","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"charlesgoh"},"content":"image::ChangePasswordActivityDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"_Figure 3.9.1 : ChangePassword command activity diagram_","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** On Demand Saving vs. Save On Exit +","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Save On Exit +","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Simplifies process flow as the command class no longer has to access both Model and Storage components +","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Any system/application crash may cause change password data to be lost +","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** On Demand Saving +","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Changes may persist even through system and application crashes +","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May slow down application, although not significantly. Complicates process flow.","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"// end::password[]","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacy[]","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email`, `Address` and `Remark` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not.","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacy.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.1 : Class diagram for a Person, only Name, Phone, Email, Address and Remark contain an isPrivate boolean to indicate if it is private or not_","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes.","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field.","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor.","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`.","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.2 : Sequence Diagram for adding a Person with private fields_","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"jeffreygohkw"},"content":"@Override","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI.","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name.","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`.","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`.","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremark\u003echeerful lad\u003c/remark\u003e","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremarkIsPrivate\u003efalse\u003c/remarkIsPrivate\u003e","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same.","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was.","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`.","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false.","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object.","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing.","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to.","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users.","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`.","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below.","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.11.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object.","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`.","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":"This is illustrated in the code below, which shows how the privacy of `Name` is set in `PersonPrivacySettings`:","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`.","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`. For example, the new `Name` is created in the code snippet below:","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"jeffreygohkw"},"content":" return name;","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`.","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all.","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Enhance the functionality of EditCommand. +","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data.","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the address book\u0027s privacy level","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommand` allows the user to change the privacy level of Address++, letting users easily reveal data hidden by private fields, or hide persons containing private fields entirely.","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `PrivacyLevelCommand` is illustrated below.","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"jeffreygohkw"},"content":"image::PrivacyLevelSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.1 : Sequence Diagram for changing the privacy level of the address book_","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommandParser` will accept any integer that is input in the command line, and create a `PrivacyLevelCommand` that stores the integer, which represents the privacy level to switch to.","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution,`PrivacyLevelCommand` will first check if the integer falls within the range of the minimum and maximum privacy level. If it does not, a new `CommandException` is thrown, reminding the user of the valid input levels.","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"jeffreygohkw"},"content":"If the integer is within the valid range, `PrivacyLevelCommand` will update the privacy level of `Model`. Following that, it will proceed to update the privacy level of each person.","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"jeffreygohkw"},"content":"`Model`, each `Person` and each field that can be set as private all contain a `privacyLevel` variable to indicate the current privacy level. This value should remain the same between all of these objects throughout the operation of Address++.","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacyLevel.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.2 : Class Diagram of Person, which shows which classes contain an integer to indicate the privacy level_","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"jeffreygohkw"},"content":"Finally, depending on the privacy level, `PrivacyLevelCommand` will update the call `model.updateFilteredPersonList()` with the appropriate predicate.","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated in the code snippet below.","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Storing of the privacy level +","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have each relevant class store a privacy level integer. +","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Less coupling, less modification of existing code required. +","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify every relevant object every time `PrivacyLevelCommand` is called. Runs the risk that an object may accidentally not have its privacy level modified to match the other objects if privacy levels are not properly updated. +","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store the privacy level in the model and have any object that needs to check it query from model. +","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only one integer needs to be modified for the privacy level of the entire address book to change, which also eliminates any possibility that privacy level may be different when used by different objects. +","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases coupling, classes such as Name will need to have a Model object as one of its variables to access Model. Large scale modification of existing code and tests are necessary.","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacy[]","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"jeffreygohkw"},"content":"Locating a person\u0027s address allows users to take the address that is stored by a person and search it on Google Maps in the browser.","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of persons, a `CommandException` will be thrown.","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution.","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"This code for this can be found below:","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.13.1 : Sequence Diagram for Locating a Person\u0027s Address_","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command `locate`. +","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users.","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another using Google Maps","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"jeffreygohkw"},"content":"When the `navigate` command is entered into the command line, `NavigateCommandParse` will first reset its internal `from`, `to`, `fromIndex`, `toIndex` to null. It will then check for the input prefixes and ensure that only one of the prefixes from the group `fp/`, `ft/`, and `fa/`, which we will subsequently call the `from` prefixes are present. It then does the same with the prefixes from the group `tp/`, `tt/` and `ta/`, which we will call the `to` prefixes. +","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"jeffreygohkw"},"content":"This is done by invoking the `checkFrom` and `checkTo` methods as can be seen from the code snippet below. For the example `checkFrom`, it takes in 3 booleans on whether or not each prefix is present and checks whether or not there is exactly one kind of `from` prefix. It throws an error if there are no `from` prefixes or more than one type of `from` prefixes.","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"jeffreygohkw"},"content":"private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"`checkFrom` calls `setArgsForNavigateCommand`, which sets the variables in the `NavigateCommandParser` to the appropriate values depending on whether the address originates from a person, a task or is a manual input by the user.","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":"private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person, boolean forFrom) throws IllegalValueException {","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"jeffreygohkw"},"content":"Finally, `NavigateCommandParser` will create a new `NavigateCommand` based on the inputs as set by `setArgsForNavigateCommand`.","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"jeffreygohkw"},"content":"When `NavigateCommand` is created, it first checks if there are duplicate `from` or `to` addresses that are passed into it and throws an error if that is the case.","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"jeffreygohkw"},"content":"private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex) throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"jeffreygohkw"},"content":"If it passes this check, `NavigateCommand` stores `fromLocation` and `toLocation`, which are the Locations of any manually added address by the user to navigate from and to respectively. It also stores `toIndex` and `fromIndex`, which are the Indexes of the `Person` or `Task` to extract the address from as well as `toIsTask` and `fromIsTask`, which are booleans that indicate whether `toIndex` and `fromIndex` are indexes of Persons or Tasks.","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `NavigateCommmand`, it will first check if it has a non-null `fromIndex`, if it does, it will create a new Location based on its `fromIndex` and `fromIsTask` values using the `setLocationByIndex` method. Otherwise, it will set the Location to be the Location in `locationfrom`. This can be seen below:","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"if (fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"jeffreygohkw"},"content":"} else {","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"setLocationByIndex throws CommandException if the target Person or Task does not have a valid Address to extract due to the Address being blank, or it being private.","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` does the same for the Address to navigate `To` and posts a new `BrowserPanelNavigateEvent`, passing in the `Location` to navigate `From` and the `Location` to navigate `To`. +","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` will then create a new `CommandResult` to indicate a successful `Command`.","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":"`BrowserPanel` will then get the information from this `BrowserPanelNavigateEvent`, and load the appropriate Google Maps URL after replacing information such as the Unit Number and extra whitespaces. This has to be done as Google Maps does not function properly with Unit Numbers or spaces in its URL.","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"private void loadDirectionsPage(String fromLocation, String toLocation) {","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\"","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\"","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"image::NavigateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.14.1 : Sequence Diagram for Navigating from one Address to another_","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to pass the appropriate information to NavigateCommand +","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have a constructor that takes in a large number of arguments so that NavigateCommand can correctly identify what kind of Location to post in BrowserPanelNavigateEvent. +","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only 1 constructor needed. +","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional methods will be needed to properly identify which Location to use for navigation. +","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Create many constructors to segregate the different possible scenarios that might happen. +","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear what information to use to generate the Locations +","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires large numbers of constructors to be created, easy for mistakes to occur as Constructors all share the same name but different argument types.","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to transfer information of the address from one class to another +","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Wrap the address in a `Location` class before posting the BrowserPanelNavigateEvent. +","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only Locations, which indicates that the address is properly parsed, will be passed for the BrowserPanel to read, reducing the possibility of BrowserPanel reading stray unwanted strings as addresses to navigate to and from. The value stored inside each Location cannot be altered once that Location object has been created. +","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** A new class has to be created and Strings, Addresses and TaskAddresses will need to be converted to Locations first. +","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Simply pass on a String containing the address from class to class +","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easy to read and transfer information, lower overhead +","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** It is easier for stray Strings to pollute the information, and the Strings can be unintentionally modified.","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening and Saving of the .xml save file","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"jeffreygohkw"},"content":"Both `OpenCommand` and `SaveAsCommand` function in a very similar way.","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"When `open` or `save` is input by the user, `AddressBookParser` will create a new `OpenCommand` or `SaveAsCommand`.","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"jeffreygohkw"},"content":"These two commands will then post a new `OpenRequestEvent` or a new `SaveAsRequestEvent` and return a successful `CommandResult`.","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` will have two methods, `HandleOpenRequestEvent` and `HandleSaveAsRequestEvent` that subscribe to the above two events and will call `handleOpen` and `handleSaveAs`.","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"jeffreygohkw"},"content":"private void handleOpen() throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"private void handleSaveAs() throws IOException {","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"jeffreygohkw"},"content":"Both `handleOpen` and `handleSaveAs` will create a new `FileChooser` extension filter that only allows the pop-up window to save files and load files in the .xml format.","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"jeffreygohkw"},"content":"Upon successfully selecting a file to load or a location to save as in the pop-up window, both methods will call `changefilepath` in `Storage` to the selected file path.","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"Finally, both commands diverge as `handleOpen` will call `resetData` to reset the data using the new save file, while `handleSaveAs` will call `saveAddressBook` and `saveUserPrefs` to save the data. Both methods will finally call `fillInnerParts()` to refresh the data displayed on the UI.","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated using the sequence diagram below:","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"jeffreygohkw"},"content":"image::OpenSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.15.1 : Sequence Diagram for Opening a save file_","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How does `OpenCommand` and `SaveAsCommand` determine the file location to save or load the save file from +","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Open a `FileChooser` window, allowing the user to move through their file directory to acquire their save location and to select the name of the save file. +","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** User friendly, many other applications function similarly when saving and loading. Easier to implement and use as part of the dropdown menu in the User Interface. +","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Not entirely command line based. +","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Input the file directory and file name to save or load from as part of the command. +","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Entirely command line based, may be more preferable for users who prefer using the command line. +","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires more complex code. Command must check if the file location to save or load from is valid, and that there is a valid file of that name.","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the theme of the address book","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"jeffreygohkw"},"content":"The original style of the address book may not be for everyone. `ThemeCommand` allows users to switch between multiple preset themes.","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"jeffreygohkw"},"content":"`ThemeCommandParser` trims the arguments after the word `theme` in the command line, removing any whitespaces leading up to and following that word. If the entire String ended up trimmed, then `ThemeCommandParser` will throw a `ParseException`. Otherwise, it creates a new `ThemeCommand`, passing in the trimmed word as seen below:","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"jeffreygohkw"},"content":"public ThemeCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"jeffreygohkw"},"content":"When initialising the Address Book, the `AddressBook` class will create a `HashMap\u003cString, String\u003e` to store the keys and values of the themes.","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"jeffreygohkw"},"content":"private void initialiseStyleMap() {","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"DarkTheme.css\");","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"DarkTheme.css\");","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"LightTheme.css\");","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"LightTheme.css\");","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"The keys correspond to the possible user inputs, such as `light` or `dark`, while the values contain the filepath of the .css files, such as `DarkTheme.css`. This way, users do not need to remember and will not have to know what the .css files are like to use the theme command.","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"jeffreygohkw"},"content":"On executing `ThemeCommand`, it first checks if the input string can be found in the set of keys in the HashMap contained by the `AddressBook` class. If it cannot be found, or if the value corresponding to the input string is identical to that of the value of the file path of the .css file stored in Model, then a `CommandException` is thrown, as users cannot change to a non-existent theme, or a theme that is already in use.","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"jeffreygohkw"},"content":"If the string is valid, `ThemeCommand` will post a `ChangeThemeRequestEvent` and set the theme to the new file path corresponding to the input String in `Model`. `Model` will then continue on to set the theme in `UserPrefs` as well, so that it can be loaded on starting the application.","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` contains a method `handleChangeThemeEvent` that subscribes to the `ChangeThemeRequestEvent`. `handleChangeThemeEvent` calls `handlChangeTheme`, which first checks if there is an existing theme, if there is, it removes it, then sets adds the new theme through the file path that was passed to it.","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"jeffreygohkw"},"content":"public void handleChangeTheme(String theme) {","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(VIEW_PATH + theme);","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"After all is done, `ThemeCommand` returns a `CommandResult`, indicating the success of the command.","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"The overall execution of `ThemeCommand` is seen in the following code snippet.","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for the whole process is show below:","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"jeffreygohkw"},"content":"image::ThemeSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.16.1 : Sequence Diagram for Changing Themes_","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Getting the correct file path to the .css file +","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Store the file path in a HashMap, where the keys are the possible inputs that the user may type and the values are the actual filepaths +","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier on the user. They do not need to remember any complicated .css names or file paths, and the input string can be customisable by changing the names of the keys added to the HashMap. +","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Slightly more work needed to initialise the HashMap and check if the file paths are valid. +","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Change the name of the .css file and file paths such that what the user directly inputs can correspond to the actual .css file. +","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** A HashMap is no longer needed, instead, the input string just needs to be parsed to be turned into a file path. This makes it easier to add additional .css files, as developers do not have to keep modifying the initialisation of the HashMap +","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Less flexibility in naming the file, user may break the code if they realise the input string directly used as part of the file path.","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"// tag::adddeletetag[]","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`.","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once.","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`add tag/ 1 2 3 t/friends`) will be executed.","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"-"},"content":"The same operation will happen for `delete tag/` command.","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"-"},"content":"in a similar way.","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book.","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"-"},"content":"public class AddTagCommand extends AddCommand {","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"-"},"content":" // check whether the index within the range","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1469,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":1470,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":1471,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1472,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag","isFullCredit":true},{"lineNumber":1473,"author":{"gitId":"-"},"content":" return new CommandResult();","isFullCredit":true},{"lineNumber":1474,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1475,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1476,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1477,"author":{"gitId":"-"},"content":"Suppose the user enter the `add tag/ 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:","isFullCredit":true},{"lineNumber":1478,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1479,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1480,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : Add Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":1481,"author":{"gitId":"-"},"content":"The `delete tag/` command works the same as `add tag/` command with different name only.","isFullCredit":true},{"lineNumber":1482,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1483,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1484,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":1485,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":1486,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception.","isFullCredit":true},{"lineNumber":1487,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1488,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1489,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1490,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1491,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `add tag/` and `delete tag/` +","isFullCredit":true},{"lineNumber":1492,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +","isFullCredit":true},{"lineNumber":1493,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +","isFullCredit":true},{"lineNumber":1494,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+","isFullCredit":true},{"lineNumber":1495,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1496,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +","isFullCredit":true},{"lineNumber":1497,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +","isFullCredit":true},{"lineNumber":1498,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list.","isFullCredit":true},{"lineNumber":1499,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle.","isFullCredit":true},{"lineNumber":1500,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1501,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":1502,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +","isFullCredit":true},{"lineNumber":1503,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `add tag/` and `delete tag/` +","isFullCredit":true},{"lineNumber":1504,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +","isFullCredit":true},{"lineNumber":1505,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +","isFullCredit":true},{"lineNumber":1506,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1507,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +","isFullCredit":true},{"lineNumber":1508,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +","isFullCredit":true},{"lineNumber":1509,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner.","isFullCredit":true},{"lineNumber":1510,"author":{"gitId":"-"},"content":"// end::adddeletetag[]","isFullCredit":true},{"lineNumber":1511,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1512,"author":{"gitId":"-"},"content":"// tag::findtag[]","isFullCredit":true},{"lineNumber":1513,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1514,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism","isFullCredit":true},{"lineNumber":1515,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1516,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book.","isFullCredit":true},{"lineNumber":1517,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":1518,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1519,"author":{"gitId":"-"},"content":"The `find tag/` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`.","isFullCredit":true},{"lineNumber":1520,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first.","isFullCredit":true},{"lineNumber":1521,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar.","isFullCredit":true},{"lineNumber":1522,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1523,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences.","isFullCredit":true},{"lineNumber":1524,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`.","isFullCredit":true},{"lineNumber":1525,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1526,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:","isFullCredit":true},{"lineNumber":1527,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String.","isFullCredit":true},{"lineNumber":1528,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1529,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1530,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1531,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":1532,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":1533,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":1534,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":1535,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":1536,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":1537,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1538,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":1539,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1540,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1541,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one","isFullCredit":true},{"lineNumber":1542,"author":{"gitId":"-"},"content":"is for the tags to be excluded.","isFullCredit":true},{"lineNumber":1543,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1545,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1546,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":1547,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":1548,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":1549,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":1550,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1551,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":1552,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":1553,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {","isFullCredit":true},{"lineNumber":1554,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":1555,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1556,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));","isFullCredit":true},{"lineNumber":1557,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1558,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1559,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1560,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1561,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1562,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +","isFullCredit":true},{"lineNumber":1563,"author":{"gitId":"-"},"content":"Suppose the user enter `find tag/ friends` command. The following sequence diagram shows how the find tag command works:","isFullCredit":true},{"lineNumber":1564,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1565,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1566,"author":{"gitId":"-"},"content":"_Figure 3.18.1 : Find Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":1567,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1568,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1569,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list.","isFullCredit":true},{"lineNumber":1570,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1571,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1572,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1573,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1574,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `find tag/` +","isFullCredit":true},{"lineNumber":1575,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `find tag/` +","isFullCredit":true},{"lineNumber":1576,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `find tag/` command will be similar to the `find` command. +","isFullCredit":true},{"lineNumber":1577,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +","isFullCredit":true},{"lineNumber":1578,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1579,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `find tag/` in `FindCommand`. +","isFullCredit":true},{"lineNumber":1580,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","isFullCredit":true},{"lineNumber":1581,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle","isFullCredit":true},{"lineNumber":1582,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things.","isFullCredit":true},{"lineNumber":1583,"author":{"gitId":"-"},"content":"// end::findtag[]","isFullCredit":true},{"lineNumber":1584,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1585,"author":{"gitId":"-"},"content":"// tag::favunfav[]","isFullCredit":true},{"lineNumber":1586,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1587,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Favourite/Unfavourite Person mechanism","isFullCredit":true},{"lineNumber":1588,"author":{"gitId":"-"},"content":"To favourite a person is achieved by `FavouriteCommand`. It basically changes the value of the `favourite` status of a `Person` but there is no specific `Favourite` field for person.","isFullCredit":true},{"lineNumber":1589,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1590,"author":{"gitId":"-"},"content":"In this sense, a boolean value needs to be created to store the favourite status of a contact. As `AddCommand` does not involve `favourite`, the default `favourite` status for every newly added `Person` is false.","isFullCredit":true},{"lineNumber":1591,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1592,"author":{"gitId":"-"},"content":"The `favourite` status is a boolean value and it will be set as true through `FavouriteCommand`. Then, the target person will be updated.","isFullCredit":true},{"lineNumber":1593,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1594,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1595,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1596,"author":{"gitId":"-"},"content":"public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":1597,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1598,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":1599,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1600,"author":{"gitId":"-"},"content":" // throw invalid person index","isFullCredit":true},{"lineNumber":1601,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1602,"author":{"gitId":"-"},"content":" // update favourite status","isFullCredit":true},{"lineNumber":1603,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":1604,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),","isFullCredit":true},{"lineNumber":1605,"author":{"gitId":"-"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),","isFullCredit":true},{"lineNumber":1606,"author":{"gitId":"-"},"content":" personToFavourite.getAddress(), true,","isFullCredit":true},{"lineNumber":1607,"author":{"gitId":"-"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),","isFullCredit":true},{"lineNumber":1608,"author":{"gitId":"-"},"content":" personToFavourite.getTags());","isFullCredit":true},{"lineNumber":1609,"author":{"gitId":"-"},"content":" // update target person","isFullCredit":true},{"lineNumber":1610,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":1611,"author":{"gitId":"-"},"content":" model.updatePerson(personToFavourite, editedPerson);","isFullCredit":true},{"lineNumber":1612,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":1613,"author":{"gitId":"-"},"content":" // throw exception","isFullCredit":true},{"lineNumber":1614,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1615,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":1616,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1617,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","isFullCredit":true},{"lineNumber":1618,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1619,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1620,"author":{"gitId":"-"},"content":"`FavouriteCommand` takes in an integer as its argument. The command is first being parsed in `AddressBookParser` to be identified as an instance of `FavouriteCommand`.","isFullCredit":true},{"lineNumber":1621,"author":{"gitId":"-"},"content":"Then it is parsed by `FavouriteCommandParser` to parse the index. Invalid indexes will be handled by throwing an exception. This is how `FavouriteCommandParser` is implemented:","isFullCredit":true},{"lineNumber":1622,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1623,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1624,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":1625,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","isFullCredit":true},{"lineNumber":1626,"author":{"gitId":"-"},"content":" * and returns an FavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":1627,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":1628,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1629,"author":{"gitId":"-"},"content":" public FavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1630,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":1631,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":1632,"author":{"gitId":"-"},"content":" return new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":1633,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":1634,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":1635,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1636,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1637,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1638,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1639,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1640,"author":{"gitId":"-"},"content":"The following sequence diagram shows how a `FavouriteCommand` is processed: +","isFullCredit":true},{"lineNumber":1641,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1642,"author":{"gitId":"jeffreygohkw"},"content":"image::FavouriteSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1643,"author":{"gitId":"-"},"content":"_Figure 3.19.1 : Favourite Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":1644,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1645,"author":{"gitId":"-"},"content":"To indicate that a person has been `favoured`, `PersonCard` is modified to contain a `favouriteLabel` that changes its appearance based on the `favourite` status of the person.","isFullCredit":true},{"lineNumber":1646,"author":{"gitId":"-"},"content":"It will first detect the boolean favourite status of the person. If the person is a favourite contact, a heart will be shown.","isFullCredit":true},{"lineNumber":1647,"author":{"gitId":"-"},"content":"The colours of the border and the background of the label are set to transparent, so that only the background picture, which is a heart, will be shown.","isFullCredit":true},{"lineNumber":1648,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1649,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":1650,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1651,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `favourite` +","isFullCredit":true},{"lineNumber":1652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `favourite`. +","isFullCredit":true},{"lineNumber":1653,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to modify existing command. +","isFullCredit":true},{"lineNumber":1654,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Person` class to update the person status. The constructor of `person` has been modified so all the `person` in the address book must change accordingly. +","isFullCredit":true},{"lineNumber":1655,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `favourite` in `AddCommand` +","isFullCredit":true},{"lineNumber":1656,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","isFullCredit":true},{"lineNumber":1657,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. The `favourite` status will be treated as an optional field when using `AddCommand`. In order to change `favourite` status, `EditCommand` may be modified which is very troublesome. +","isFullCredit":true},{"lineNumber":1658,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1659,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":1660,"author":{"gitId":"-"},"content":"**Aspect:** Store `Favourite` values +","isFullCredit":true},{"lineNumber":1661,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Store it as a `Boolean` value +","isFullCredit":true},{"lineNumber":1662,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to create another class. +","isFullCredit":true},{"lineNumber":1663,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` and `ModelManager` to update the person status.It is also prone to bugs when developers forget to change the ObjectProperty to `String` in UI classes. +","isFullCredit":true},{"lineNumber":1664,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1665,"author":{"gitId":"-"},"content":"**Alternative 2:** Add a new `Favourite` field +","isFullCredit":true},{"lineNumber":1666,"author":{"gitId":"-"},"content":"**Pros:** Similar way to store other personal information. It also follows the open-close principle and exercises cohesion, where all matters related to `Favourite` field is dealt in its own class. +","isFullCredit":true},{"lineNumber":1667,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. Adding a new field will cause many changes in UI, Logic, Model and Storage. Some test cases will be rewritten.","isFullCredit":true},{"lineNumber":1668,"author":{"gitId":"-"},"content":"// end::favunfav[]","isFullCredit":true},{"lineNumber":1669,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","isFullCredit":true},{"lineNumber":1671,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","isFullCredit":true},{"lineNumber":1673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1674,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])","isFullCredit":true},{"lineNumber":1675,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","isFullCredit":true},{"lineNumber":1676,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","isFullCredit":true},{"lineNumber":1677,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1678,"author":{"gitId":"-"},"content":"*Logging Levels*","isFullCredit":true},{"lineNumber":1679,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1680,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","isFullCredit":true},{"lineNumber":1681,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","isFullCredit":true},{"lineNumber":1682,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","isFullCredit":true},{"lineNumber":1683,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","isFullCredit":true},{"lineNumber":1684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1685,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1686,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","isFullCredit":true},{"lineNumber":1687,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1688,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","isFullCredit":true},{"lineNumber":1689,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","isFullCredit":true},{"lineNumber":1691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1692,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation.","isFullCredit":true},{"lineNumber":1693,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1694,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1695,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","isFullCredit":true},{"lineNumber":1696,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","isFullCredit":true},{"lineNumber":1698,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1699,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","isFullCredit":true},{"lineNumber":1700,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","isFullCredit":true},{"lineNumber":1701,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","isFullCredit":true},{"lineNumber":1703,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1704,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","isFullCredit":true},{"lineNumber":1705,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1706,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","isFullCredit":true},{"lineNumber":1707,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1708,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","isFullCredit":true},{"lineNumber":1709,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1710,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","isFullCredit":true},{"lineNumber":1711,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1712,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","isFullCredit":true},{"lineNumber":1713,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","isFullCredit":true},{"lineNumber":1714,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","isFullCredit":true},{"lineNumber":1715,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","isFullCredit":true},{"lineNumber":1716,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1717,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":1718,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_","isFullCredit":true},{"lineNumber":1719,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1720,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":1721,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1722,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","isFullCredit":true},{"lineNumber":1723,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1724,"author":{"gitId":"-"},"content":"There are three ways to run tests.","isFullCredit":true},{"lineNumber":1725,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1726,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":1727,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","isFullCredit":true},{"lineNumber":1728,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","isFullCredit":true},{"lineNumber":1730,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1731,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","isFullCredit":true},{"lineNumber":1732,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","isFullCredit":true},{"lineNumber":1733,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1734,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","isFullCredit":true},{"lineNumber":1735,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1736,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","isFullCredit":true},{"lineNumber":1737,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1739,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","isFullCredit":true},{"lineNumber":1740,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1741,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","isFullCredit":true},{"lineNumber":1742,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1743,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","isFullCredit":true},{"lineNumber":1744,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1745,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","isFullCredit":true},{"lineNumber":1746,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1747,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","isFullCredit":true},{"lineNumber":1748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1749,"author":{"gitId":"-"},"content":"We have two types of tests:","isFullCredit":true},{"lineNumber":1750,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1751,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","isFullCredit":true},{"lineNumber":1752,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","isFullCredit":true},{"lineNumber":1753,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","isFullCredit":true},{"lineNumber":1754,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","isFullCredit":true},{"lineNumber":1755,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","isFullCredit":true},{"lineNumber":1756,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","isFullCredit":true},{"lineNumber":1757,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","isFullCredit":true},{"lineNumber":1758,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","isFullCredit":true},{"lineNumber":1759,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","isFullCredit":true},{"lineNumber":1760,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","isFullCredit":true},{"lineNumber":1761,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1762,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","isFullCredit":true},{"lineNumber":1764,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","isFullCredit":true},{"lineNumber":1765,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1766,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","isFullCredit":true},{"lineNumber":1767,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","isFullCredit":true},{"lineNumber":1768,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1769,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","isFullCredit":true},{"lineNumber":1770,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1771,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","isFullCredit":true},{"lineNumber":1772,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1773,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","isFullCredit":true},{"lineNumber":1774,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1775,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","isFullCredit":true},{"lineNumber":1776,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1777,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1778,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1779,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","isFullCredit":true},{"lineNumber":1780,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","isFullCredit":true},{"lineNumber":1782,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1783,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","isFullCredit":true},{"lineNumber":1784,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","isFullCredit":true},{"lineNumber":1785,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","isFullCredit":true},{"lineNumber":1786,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","isFullCredit":true},{"lineNumber":1787,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1788,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","isFullCredit":true},{"lineNumber":1789,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1790,"author":{"gitId":"Esilocke"},"content":"A project often depends on third-party libraries. For example, Address++ depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","isFullCredit":true},{"lineNumber":1791,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","isFullCredit":true},{"lineNumber":1792,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","isFullCredit":true},{"lineNumber":1793,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1794,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1795,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","isFullCredit":true},{"lineNumber":1796,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1797,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","isFullCredit":true},{"lineNumber":1798,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1799,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","isFullCredit":true},{"lineNumber":1800,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1801,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","isFullCredit":true},{"lineNumber":1802,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","isFullCredit":true},{"lineNumber":1803,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new person | keep track of my contacts","isFullCredit":true},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","isFullCredit":true},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new task | keep track of my tasks and assignments","isFullCredit":true},{"lineNumber":1809,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1810,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","isFullCredit":true},{"lineNumber":1811,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1812,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts","isFullCredit":true},{"lineNumber":1813,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1814,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added","isFullCredit":true},{"lineNumber":1815,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1816,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made","isFullCredit":true},{"lineNumber":1817,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1818,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values","isFullCredit":true},{"lineNumber":1819,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"|`* * *` |cautious user |be able to lock my address book application whenever I want with a password | prevent people with malicious intent from making changes to my data","isFullCredit":true},{"lineNumber":1821,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1822,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident","isFullCredit":true},{"lineNumber":1823,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1824,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location","isFullCredit":true},{"lineNumber":1825,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1826,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs","isFullCredit":true},{"lineNumber":1827,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1828,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity","isFullCredit":true},{"lineNumber":1829,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1830,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better","isFullCredit":true},{"lineNumber":1831,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1832,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me","isFullCredit":true},{"lineNumber":1833,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1834,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts","isFullCredit":true},{"lineNumber":1835,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1836,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms","isFullCredit":true},{"lineNumber":1837,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1838,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others","isFullCredit":true},{"lineNumber":1839,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1840,"author":{"gitId":"Esilocke"},"content":"|`* *` |cautious user |be able to back up my address book data | retrieve my back up data in the event I make breaking changes to my actual address book and there is no way of undoing them","isFullCredit":true},{"lineNumber":1841,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"|`* *` |user with poor eyesight |be able to increase the font size | use the application without straining my eyes","isFullCredit":true},{"lineNumber":1843,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"|`* *` |forgetful user |be able to see who is assigned to a task | find my contacts who are in charge more quickly","isFullCredit":true},{"lineNumber":1845,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1846,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly","isFullCredit":true},{"lineNumber":1847,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1848,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like","isFullCredit":true},{"lineNumber":1849,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1850,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts","isFullCredit":true},{"lineNumber":1851,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"|`*` |user |be able to mark my favourite contacts |find them more easily","isFullCredit":true},{"lineNumber":1853,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently","isFullCredit":true},{"lineNumber":1855,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1856,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features","isFullCredit":true},{"lineNumber":1857,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1858,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1859,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1860,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1861,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1862,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","isFullCredit":true},{"lineNumber":1863,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1864,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)","isFullCredit":true},{"lineNumber":1865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1866,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person","isFullCredit":true},{"lineNumber":1868,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1869,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1870,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1871,"author":{"gitId":"-"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1872,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1873,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list","isFullCredit":true},{"lineNumber":1874,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person","isFullCredit":true},{"lineNumber":1875,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1876,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1877,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1878,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1879,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1880,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1881,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1882,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1883,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1884,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1885,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1886,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1887,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1888,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1889,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1890,"author":{"gitId":"-"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1891,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person","isFullCredit":true},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria","isFullCredit":true},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria","isFullCredit":true},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found.","isFullCredit":true},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found.","isFullCredit":true},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person","isFullCredit":true},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list","isFullCredit":true},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person.","isFullCredit":true},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person.","isFullCredit":true},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid.","isFullCredit":true},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail.","isFullCredit":true},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made.","isFullCredit":true},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1957,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1958,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps","isFullCredit":true},{"lineNumber":1959,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1960,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1961,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1962,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps","isFullCredit":true},{"lineNumber":1963,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo","isFullCredit":true},{"lineNumber":1964,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message","isFullCredit":true},{"lineNumber":1965,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone.","isFullCredit":true},{"lineNumber":1966,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1967,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1968,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1969,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1970,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1971,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1972,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands.","isFullCredit":true},{"lineNumber":1973,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1974,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1975,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands.","isFullCredit":true},{"lineNumber":1976,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1977,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3.","isFullCredit":true},{"lineNumber":1978,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1979,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1980,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands.","isFullCredit":true},{"lineNumber":1981,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1982,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1983,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands.","isFullCredit":true},{"lineNumber":1984,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1985,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3","isFullCredit":true},{"lineNumber":1986,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1987,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1988,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort","isFullCredit":true},{"lineNumber":1989,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1990,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1991,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1992,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria","isFullCredit":true},{"lineNumber":1993,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria","isFullCredit":true},{"lineNumber":1994,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message.","isFullCredit":true},{"lineNumber":1995,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1996,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1997,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1998,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1999,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":2000,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":2001,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":2002,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":2003,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":2004,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":2005,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid.","isFullCredit":true},{"lineNumber":2006,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":2007,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":2008,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":2009,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":2010,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1.","isFullCredit":true},{"lineNumber":2011,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2012,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":2013,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","isFullCredit":true},{"lineNumber":2014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2015,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed.","isFullCredit":true},{"lineNumber":2016,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.","isFullCredit":true},{"lineNumber":2017,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","isFullCredit":true},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure.","isFullCredit":true},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse.","isFullCredit":true},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0.","isFullCredit":true},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing.","isFullCredit":true},{"lineNumber":2022,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2023,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":2024,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":2025,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2026,"author":{"gitId":"-"},"content":"[[mainstream-os]]","isFullCredit":true},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Mainstream OS","isFullCredit":true},{"lineNumber":2028,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2029,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":2030,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","isFullCredit":true},{"lineNumber":2031,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":2032,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]","isFullCredit":true},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible","isFullCredit":true},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"....","isFullCredit":true},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data.","isFullCredit":true},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"....","isFullCredit":true},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2040,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":266,"jeffreygohkw":604,"Esilocke":296,"-":874}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//tag::introduction[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"//end::introduction[]","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here].","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too big? Address++ allows you to change your font sizes at will. Here are three","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"ways of changing the font sizes:","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"**Option 1: Menu Font Size Buttons and Keyboard Shortcuts**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"**Option 3: Handtype command into CLI**:","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeCLI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"* Increase Size Command: `fontsize increase`","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"* Decrease Size Command: `fs decrease`","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"* Reset Size Command: `fontsize reset`","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"* `fontsize` can be replaced with `fs` for faster input. +","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"If you have trouble figuring out how to do something, or would like to find out about more features, you can click","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"on the **help** menu button. You can also enter the command `help` to access the help window.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"image::HelpButtonUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"Format: `help` +","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1].","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"// tag::addprivacy[]","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"// tag::avatar[]","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Adding a person: `add`","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input.","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address`, `Remark` and `Avatar`, to be private by placing a `p` in front of the prefix. +","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"* As of version v1.5, the avatar fields accepts all URLs, and filenames with the prefix \"file:\"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"You made a new friend John Doe, and want to save him into Address++. You could type the following command to add his details:","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"v/https://helloworld.world/image.png`","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"You meet Ima Hidearu, another one of your group members, but you do not know anything about him other than his name.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" Nevertheless, you are still able to add him into Address++:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/Ima Hidearu r/secretive`","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 3** +","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"Sometimes, you may wish to keep some fields private (i.e. not reveal them in the application). You can use the private","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"option while typing in your command:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate pr/A true hero` +","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"**Note:** you do not have to set all fields as private, and you can choose which specific fields you want to set as private.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"//end::addprivacy[]","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"//tag::addtask[]","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a task: `add task/` (Since V1.2)","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"You can use the `add task/` command to add new tasks to your address book. This allows you to keep track of your","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"assignments and project objectives.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Format: `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 0 to 5 inclusive, with 5 being the highest priority +","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"* Adding a task with a priority of 0 is the same as not adding a priority. Only priority level above 1 will be displayed in the User Interface +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"**Examples**:","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"You are assigned the task of writing a 1500-word essay that is due in 3 weeks. You decide to add this","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"task into Address++.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Essay d/Write a 1500-word essay on philosophical thinking t/3 weeks later p/4`","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"You are required to submit at least one forum post to the school forums each week. To remind yourself of this task,","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"you add it into Address++.","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Weekly forum post p/1`","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"// end::addtask[]","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"// tag::addtag[]","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a tag to persons : `add tag/` (Since V1.2)","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"You can use the `add tag/` command to add tag for multiple persons in the address book. For example, you may wish to add the tag `friends` to the first two persons in the address book. +","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"`add tag/` can be replaced by `a tag/` for faster input. +","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"Format: `add tag/ INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":"* You can add the tag of the person at the specific `INDEX`. +","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":"* The index refers to the index number shown in the most recent listing. +","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ... +","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, `add tag/` will add the tag to all contacts in the address book.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add tag `friends` to the 1st and 2nd persons in the address book. You can use `list` to show all the contacts in the address book first,","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"then use the `addtag` command to achieve it.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ 1 2 t/friends` +","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add a common tag to all the persons in the address book. You can type in the following command:","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ t/acquaintance` +","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"image::AddTagCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : AddTagCommand_","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"// end::addtag[]","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Listing all persons : `list`","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts and tasks in the address book. +","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"`list` can be replaced by `l` for faster input. +","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"Format: `list` +","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"// tag::editprivacy[]","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit`","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command.","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it.","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message.","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields.","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"**Examples**:","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":"Your friend John Doe has changed his email. You decide to update his entry in Address++ to reflect this change.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 1 p/91234567 e/johndoe@example.com`","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"Your friend Betsy is no longer taking part in the same project as you, and has changed her phone number to a new one","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":"that you are not aware of. You decide to update her entry in Address++ accordingly.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 2 p/ t/`","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"// end::editprivacy[]","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"// tag::edittask[]","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit task/` (Since V1.2)","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"You can use the `edit task/` command to quickly fix mistakes in your entries, or add/remove details in your tasks. You may wish to edit your tasks when their requirements change, for example. +","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":"Format: `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided.","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"You had previously added a task reminding you to write a 1500-word essay. However you receive notification that the word requirement","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"is now 1800 words instead. You edit the task to reflect this change.","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 2 d/1800 words essay`","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"One of your assignments has been pushed back and is no longer as urgent as before. You edit the task to reflect this change.","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 4 deadline/2 months later p/2`","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"// end::edittask[]","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"// tag::edittag[]","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edit tag/` (Since v1.2)","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"You can use `edit tag/` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"`edit tag/` can be replaced by `et` for faster input. +","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Format: `edit tag/ OLDTAGNAME NEWTAGNAME` +","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different.","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `OLDTAGNAME` value.","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**:","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"You have finished a project, and have become good friends with your project mates.","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"You decide to promote all your project mates into friends.","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit tag/ project friends`","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"// end::edittag[]","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"// tag::changeprivacy[]","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":"`changeprivacy` can be replaced by `cp` for faster input. +","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"charlesgoh"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR]`","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields.","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI.","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI.","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy.","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting.","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":"You are meeting some new groupmates for your upcoming project and you are not too comfortable with exposing your family\u0027s particulars. +","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":"You decide to hide your family\u0027s phone number, email and home address by setting them to private. +","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `changeprivacy 1 p/true e/true a/true`","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":"// end::changeprivacy[]","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacylevel[]","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy Level of the address book : `privacylevel`(Since V1.5)","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":"Changing a person\u0027s privacy just to reveal their data or to make a person fully confidential may be time-consuming. If you would like to view all the data hidden by private fields easily, or completely hide a person with private fields, you can use this command to change the Privacy Level of the address book. +","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":"At level 1, all data, regardless of whether they are set to be private or public, can be viewed. +","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":"At level 2, private fields will have their data hidden by a string, such as `\u003cPrivate Phone\u003e`. +","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":"At level 3, any person containing at least one private field will be completely hidden in the address book. +","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"`privacylevel` can be replaced by `pl` for faster input. +","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"Format: `privacylevel LEVEL`","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"* Address++ always launches in privacy level 2.","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":"* The `LEVEL` that you input can only contain the values 1, 2, or 3.","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":"* This does not change the actual privacy setting of each field, thus, changing the privacy level to 1 does not make any of the private fields public.","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":"** Thus, even if you have set the address book to be privacy level 1, you cannot edit a field that is set as private without setting it back to public.","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":"** Similarly, since a person is completely hidden in privacy level 3, you will have to set the privacy level back to 2 or 1 to be able to modify that person.","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":"You have an address book full of various contacts with private fields, however, now you need to access the email addresses of all your contacts to ask them for help in your upcoming survey. +","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"You decide to use the privacylevel command to reveal all you contacts\u0027 hidden data.","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 1`","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"You wish to completely hide some of your confidential contacts from view, but your address book is too large, and you do not want to have to individually set every field for every confidential person to be private. +","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":"Using the privacylevel command, you set each contact with any private field to be hidden in the address book. +","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 3`","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacylevel[]","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"// tag::favourite[]","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite contacts. For example, you may wish to set your girlfriend as your favourite contact. You will see a heart png next to your girlfriend\u0027s name","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"once you successfully set her as your favourite contact. +","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"charlesgoh"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"* You will see a heart shape next to your favourite persons.","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"Suppose you want to set the 2nd person in the address book to be your favourite contact. You should `list` all the persons first, then use `favourite` command to achieve it.","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 2` +","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to set `Betsy Brandt` as your favourite contact.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `favourite` her.","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Betsy` +","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 1` +","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"image::FavouriteCommandBeforeAndAfter.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"_Figure 3.12.1 : FavouriteCommand_","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"// end::favourite[]","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"// tag::showfavourite[]","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"Format: `showfavourite` +","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"* `showfavourite` command: It will return an empty list if there is no favourite persons.","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"image::ShowFavouriteCommand.png[width\u003d\"250\"]","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"_Figure 3.13.1 : ShowFavouriteCommand_","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"// end::showfavourite[]","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"*Things To Note*","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Only the names will be searched","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"You would like to find all the people whose name contains the word \"David\". You first use `list` to show all your contacts,","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the contacts named \"David\".","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David` +","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find people whose name contain the word \"David\" or \"Joe\".","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David Joe` +","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"// tag::findtask[]","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Finding a task : `find task/` (Since V1.3)","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"You can use the `find task/` command to quickly find tasks that match your criteria, as well as tasks that have a certain level of urgency. +","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"Furthermore, you can choose to only retrieve tasks that are either complete, or still in progress. +","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Format: `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Things To Note*","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"* Both the name and the description will be searched","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"* *You must include at least 1 search keyword*, in order to filter the results by their priority, and whether or not it is completed.","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"* The `PRIORITY` must be an integer from 1 to 5, inclusive. If the priority search is included, all tasks that have a priority at least that of the specified priority will matced.","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"* `STATE` must be either `true` or `false`. If it is `true`, you will only see tasks that have been marked as complete, and if it is `false, you will only see tasks that are not complete, in addition to all other search criteria.","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"You would like to find all the tasks related to \"Report\". You first use `list` to show all your tasks,","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the tasks related to \"Report\".","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report` +","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find tasks that have a \"High\" or \"Highest\" priority.","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4` +","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Furthermore, as you have several tasks related to \"Report\" that are already complete, you only want to see the tasks that are still not done.","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4 done/false` +","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"// end::findtask[]","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"-"},"content":"// tag::showtag[]","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all tags : `showtag` (Since V1.5)","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"You can use the `showtag` command to quickly show all tags in the address book. Sometimes you may forget `tags` that you have added a few weeks ago. You may use this command to help you. +","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"-"},"content":"`showtag` can be replaced by `stag` for faster input. +","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"-"},"content":"Format: `showtag` +","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"-"},"content":"* `showtag` command: It will return an empty list if there is no tags in the address book.","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"-"},"content":"* You may want to use `showtag` command to help you recall all the `tags` in the address book before you try to use `findtag` to find persons.","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"// end::showtag[]","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"-"},"content":"// tag::findtag[]","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `find tag/` (Since V1.4)","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"-"},"content":"You can use the `find tag/` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/` in front of the `friends`. +","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"-"},"content":"`find tag/` can be replaced by `f tag/` for faster input. +","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"-"},"content":"Format: `find tag/ KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"-"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons.","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"-"},"content":"* Only full words will be matched. e.g. `friend` will not match `friends`","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"-"},"content":"* There is no space between `/` and tag name. e.g. `/ friends` will not match `/friends`.","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"Suppose you want to find contatcs with tag `friends` or `colleagues`, you can just key in the following command.","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends colleagues`","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"Suppose you want to find contacts without tag `frineds`, you can key in the following command.","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ /friends`","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 3:** +","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"Suppose you want to find contacts with tag `friends` but without `colleagues`, you can key in the following command.","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends /colleagues`","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::FindTagCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : FindTagCommand_","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"// end::findtag[]","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts from the address book. The `delete` command will help you clean up contacts who you may not wish to associate with anymore. +","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"* Deletes the person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first person from your contacts.","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1`","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":"You wish to delete \"Maribel Edelweiss\" from your contacts. However you have many contacts, and are not sure where Maribel is.","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"You thus use `find` to find contacts who are named \"Maribel\", then delete Maribel Edelweiss accordingly.","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Maribel` +","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 3`","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"// tag::deletetask[]","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a task : `delete task/` (Since V1.2)","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"You can use the `delete task/` command to remove tasks from the address book. The `delete task/` command will help you clean up obsolete or completed tasks. +","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"`delete task/` can be replaced by `d task/` for faster input. +","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Format: `delete task/ INDEX` +","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"* Deletes the task at the specified `INDEX`.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent task listing.","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first task.","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 1`","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"You wish to delete a task named \"1500-word Essay\". However you have many tasks, and are not sure where it is.","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"You thus use `find task/` to find tasks related to \"Essays\", before using `delete task/` to delete \"1500-word Essay\" accordingly.","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ Essay` +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 3`","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"// end::deletetask[]","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"// tag::deletetag[]","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `delete tag/` (Since V1.2)","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"You can use `delete tag/` to delete the tag of multiple persons from the address book. +","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"`delete tag/` can be replaced by `d tag/` for faster input. +","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Format: `delete tag/ INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`.","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"* If you do not key in any index, delete tag/ will delete the tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":"Suppose you want to delete `classmates` tag for the first two persons in the address book, you can `list` all the persons first, then","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"use the `delete tag/` command to achieve.","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ 1 2 t/friends` +","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"Esilocke"},"content":"Suppose you want to delete `friends` tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ t/friends` +","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"-"},"content":"image::DeleTagCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"-"},"content":"_Figure 3.20.1 : DeleteTagCommand_","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::deletetag[]","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Sorting your contact list and tasks : `sort` (Since V1.1)","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts or tasks by using the `sort` command +","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"`sort` can be replaced with `so` for faster input. +","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"Format: `sort LIST FIELD ORDER` +","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contacts by any field in either ascending or descending order","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your tasks by deadline or by priority in ascending or descending order","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for person contacts: NAME, PHONE, EMAIL, ADDRESS, REMARK, AVATAR.","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for tasks: DEADLINE, PRIORITY.","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC.","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":"You have many contacts on Address++. You decide to make it neater by sorting your contacts","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":"by name in ascending order:","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort person name asc`","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":"You add a few tasks of different priorities. You decide to sort the tasks so you can see","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":"the higher priority tasks on the top of the list:","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort task priority desc`","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":"//end::sort[]","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":"//tag::backup[]","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Backing up your data : `backup` (Since V1.2)","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [FILENAME]` +","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"`backup` can be replaced with `bk` for faster input. +","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":"This allows you to backup your saved data on Address++ in another file.","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario**: +","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":"You decide to backup your data just in case you accidentally make changes that","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":"cannot be undone. You type the following code:","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":"`backup filename.xml`","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":"The file will then be saved in the same directory location as your `JAR` application file","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"//end::backup[]","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":"//tag::password[]","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Protecting your data : `lock` `unlock` (Since V1.5)","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":"Worried about security? Address++ allows your to protect your data with a password.","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":"Using the `lock` and `unlock` commands, you can toggle between security modes. +","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":"Locked address books only allow viewing of data. If anyone attempts to tamper with","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"your data, they will be greeted with this error:","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"image::LockedRestriction.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":"Format for `lock` Command: `lock pw/[PASSWORD]` +","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":"`lock` can be replaced with `lk` for faster input. +","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":"Format for `unlock` Command: `unlock pw/[PASSWORD]` +","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":"`unlock` can be replaced with `ul` for faster input. +","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"The default password is `password`","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":"You have just finished editing your contacts on Address++ and you decide to have a break away from","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"your computer. You decide to lock Address++ using the following command:","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `lock pw/password`","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":"When you return to your computer, you decide to continue adding contacts in Address++.","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"To unlock the Address++ application, you use the following command:","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `unlock pw/password`","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing your password : `changepassword` (Since V1.5)","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"charlesgoh"},"content":"Want to choose a better password? The `changepassword` command allows you to change your","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"charlesgoh"},"content":"password whenever you want, provided you know the old password.","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"charlesgoh"},"content":"The default password is \u0027password\u0027","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"charlesgoh"},"content":"image::ChangePasswordImages.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"charlesgoh"},"content":"Format: `changepassword pw/[PASSWORD] np/[NEWPASSWORD] cfp/[CONFIRMPASSWORD]` +","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"charlesgoh"},"content":"**`changepassword` can be replaced with `cpw` for faster input.** +","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"charlesgoh"},"content":"You open Address++ for the first time. After reading the user guide, you realize","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"charlesgoh"},"content":"that the default password (\"password\") is not good enough. You decide to make a new","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"charlesgoh"},"content":"one with the following command:","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `changepassword pw/password np/newpassword cfp/newpassword`","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"charlesgoh"},"content":"//end::password[]","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact, and look at it in greater detail. +","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":"Format: `select INDEX` +","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"The first person in your contacts has a very long address, and you want to see if it is correct.","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select 1` +","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"// tag::selecttask[]","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a task : `select task/` (Since V1.4)","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":"You can use `select task/` to pick out a task, and look at it in greater detail. +","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"Format: `select task/ INDEX` +","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"The first task has a very long description, and you want to see it in full.","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select task/ 1` +","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"// end::selecttask[]","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where the second person in your address book lives. +","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 2` +","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where a specific person in your address book, Betsy, lives. +","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Betsy` +","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 1` +","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses.","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps.","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"* A person with no address will open Google Maps, but it will not search for an address as there is no address to search for.","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing.","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another : `navigate` (Since V1.5)","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"Although `locate` shows you where a person\u0027s address is, it does not tell you how to get there. The `navigate` command will provide directions, with the help of Google Maps, on how to get from one address to another. +","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"`navigate` can be replaced by `nav` for faster input. +","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"Esilocke"},"content":"You are planning to go to your friend Roy\u0027s house for their birthday party that afternoon, but you have just ended class at NUS. +","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"Esilocke"},"content":"You have never been to their house before, and you enlist the aid of Address++ to find the fastest route to their house. +","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Roy` +","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fa/NUS tp/1`","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":"After the birthday party, you have a group meeting scheduled for your project. You have this meeting schedules as your first task, and you seek help from Address++ to find a path from Roy\u0027s house to the group meeting. +","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fp/1 tt/1`","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 3:** +","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"To conclude your long and busy day, you have to send off your sister at Changi Airport, who is going off on an exchange programme. +","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"Using the navigate command once again, you find an efficient route from the location of your group meeting to the airport. +","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate ft/1 ta/Changi Airport`","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses.","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address or a person with no address cannot be navigated from or navigated to.","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"* A task with no address cannot be navigated from or navigated to.","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing.","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":"* You may only input exactly one of the 3 prefixes from `fp/` `ft/` and `fa/` to indicate the address to navigate from, and exactly one of the 3 prefixes from `tp/` `tt/` and `ta/` to indicate the address to navigate to.","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":"** If you input any less or any more than 1 of the 3 prefixes from each group, the command will fail.","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":"** There is no need to match the type of prefixes. You can navigate with any combination of prefixes as long as there is only one prefix to indicate the address to navigate from and only one prefix to indicate the address to navigate to.","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"// tag::setstate[]","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as complete : `setcomplete` (Since V1.5)","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"You have finally completed a task that involves writing a 1500-word essay.","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e\u003e `setcomplete 6` +","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as incomplete : `setincomplete` (Since V1.5)","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete.","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"You realised that you had marked a task as complete, even though it is still in progress.","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"Furthermore you are not sure when you had marked it as complete. However, you are still able to safely mark the task as being","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":"in progress.","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `setincomplete 7`","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"// end::setstate[]","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assigning contacts to task : `assign` (Since V1.4)","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"You have created a new task to complete a paper model. However you are unable to do it by yourself, and require the help of some of your friends.","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `assign 1 5 7 to/5`","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismissing contacts from task : `dismiss` (Since V1.4)","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"One of the tasks that you had created previously with many people assigned turned out to be easier than expected.","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"You believe that this task could do with less manpower and would like to remove some of the previously assigned contacts from this task.","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `dismiss 1 5 7 from/5`","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Viewing contacts assigned to a task : `viewassign` (Since V1.5)","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"You can use `viewassign` to see who is assigned to a particular task. You may wish to use `viewassign` when you want to contact only the people who are assigned to a particular task, for example. +","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"`viewassign` can be replaced by `va` for faster input. +","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"Esilocke"},"content":"Format: `viewassign INDEX` +","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"2 weeks after assigning some of your contacts to a particular task, you decide to obtain a status report about their current progress. +","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"Esilocke"},"content":"However you have forgotten who you have assigned to that task. You thus use `viewassign` to see who is assigned to that task.","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `viewassign 4`","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing the Address Book\u0027s theme : `theme` (Since V1.5)","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"jeffreygohkw"},"content":"Perhaps you may not be too fond of the existing style of the address book and you want to have something fresh. The `theme` command changes the address book between two themes, `light` and `dark`.","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"jeffreygohkw"},"content":"`theme` can be replaced by `th` for faster input. +","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"jeffreygohkw"},"content":"It is late at night and the light theme is a little too brightly coloured. Preferring a darker theme, you can choose to input the theme command to make the theme into a darker colour. +","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `theme dark`","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"Format: `theme` + THEME","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"jeffreygohkw"},"content":"* There are only two themes as of v1.5, light and dark. More themes of different colours could be added in a future release.","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"Format: `history` +","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"// tag::undo[]","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"Format: `undo` +","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Undoable commands: Commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`).","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts.","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"Esilocke"},"content":"You realise this immediately and undo your mistake.","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts. Furthermore, not knowing this, you made a mistake when editing another person\u0027s name.","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarisa Liselote`","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"Esilocke"},"content":"You realise that something is amiss, and find out that you made not one, but two mistakes. Nevertheless you still manage to recover your contact by using multiple `undo` commands.","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"Finally, you edit Clarissa\u0027s name correctly.","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarissa Liselotte`","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"// end::undo[]","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"-"},"content":"// tag::unfavourite[]","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"-"},"content":"* The heart png will disappear once you `unfavourite` the person.","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"-"},"content":"Suppose you do not want to the 2nd person in the address book to be your favourite contact anymore, you should `list` all the persons first, then use `unfavourite` command to achieve it.","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 2` +","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"Esilocke"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to `unfavourite` `Betsy Brandt` in the address book.","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `unfavourite` `Betsy Brandt`.","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"-"},"content":"\u003e\u003e `find Betsy` +","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 1` +","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"-"},"content":"image::UnfavouriteCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"-"},"content":"_Figure 3.37.1 : UnfavouriteCommand_","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"-"},"content":"// end::unfavourite[]","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"// tag::redo[]","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` was not necessary. `redo` reverses the most recent `undo` command. +","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"-"},"content":"Format: `redo` +","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts.","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo your mistake.","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"However you realise that you have deleted the correct person. Instead of typing `delete 1`, you choose to `redo` your command instead.","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts, as well as two of your tasks.","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 5` +","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 8` +","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo all your previous commands.","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"Esilocke"},"content":"However you realise that no mistake was made. Instead of typing your commands again, you choose to `redo` your commands instead.","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"Esilocke"},"content":"// end::redo[]","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"Esilocke"},"content":"// tag::clear[]","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"Esilocke"},"content":"Additionally, if you clear only the contacts list or the task list, you can specify which type to clear in the command. +","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":"Format: `clear` +","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"To clear only the contacts list, type `clear person/` +","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"Esilocke"},"content":"To clear only the tasks list, type `clear task/` +","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"* If both `person/` and `task` are specified, or if neither were specified, the `clear` command will delete all entries in the address book.","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"Esilocke"},"content":"You have completed every task in your task list, and want to clean it up.","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear task/` +","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. However you would still like to keep smome of the tasks for further reference.","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear person/` +","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. You would like to clear everything in Address++ to make space for your own contacts and tasks.","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear` +","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"Esilocke"},"content":"// end::clear[]","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"// tag::open[]","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening a save file : `open`","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"Switching between address books is made easy with the `open` command, as it allows you can load different save files into the application. +","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"You can choose which .xml file to open from the pop up window that appears upon executing this command. +","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":"`open` can be replaced by `o` for faster input. +","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":"Format `open`","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":"// end::open[]","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":"// tag::saveas[]","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Saving the data as a new save file : `save`","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to save a copy of your data in a separate location or with a different name, the `save` command will allow you to do just that. +","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":"You can choose what to name your save file and where to save it from the pop up window that appears upon executing this command. +","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":"`save` can be replaced by `sa` for faster input. +","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":"Format: `save`","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":"// end::saveas[]","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Format: `exit`","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4].","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually.","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, you can use the `save` command, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window.","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, you can use the `open` command, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window.","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location.","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `add pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"e.g. `add task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `add tag/ [INDEX...] t/[TAG]` +","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"Esilocke"},"content":"e.g. `add tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false r/true`","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `privacylevel [LEVEL]` +","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"* *Clear persons* : `clear person/`","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"* *Clear tasks* : `clear task/`","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"-"},"content":"e.g. `delete 3`","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task/ INDEX` +","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task/ 4`","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `delete tag/ [INDEX...] t/[TAG]` +","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"e.g. `delete tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"charlesgoh"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"Esilocke"},"content":"e.g. `edit task/ 2 p/veryhigh`","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edit tag/ TAGTOCHANGE NEWTAGNAME` +","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"e.g. `edit tag/ friends enemies`","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"-"},"content":"e.g. `favourite 1`","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"-"},"content":"e.g. `showfavourite`","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"-"},"content":"e.g. `find James Jake`","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `find tag/ TAG [MORE_TAGS]` +","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"e.g. `find tag/ friends`","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"e.g. `find task/ update p/high done/false`","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : `help`","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `list`","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"-"},"content":"* *List tags* : `showtag`","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate INDEX`","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navigate fa/Tampines Mall ta/Sentosa","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"-"},"content":"e.g.`select 2`","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task/ INDEX` +","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"Esilocke"},"content":"e.g.`select task/ 2`","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `viewassign INDEX` +","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"e.g. `viewassign 1`","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `theme THEME` +","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `theme light`","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"* *History* : `history`","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":"* *Undo* : `undo`","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"* *Redo* : `redo`","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `open`","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `save`","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : `exit`","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Command Shorthand Cheat Sheet","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"Esilocke"},"content":"* *Add* : `a n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `a n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `a pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"Esilocke"},"content":"e.g. `a pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `a task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"e.g. `a task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `a tag/ [INDEX...] t/[TAG]` +","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"Esilocke"},"content":"e.g. `a tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `cp INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `cp 2 n/true p/false e/true a/false r/true`","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `pl [LEVEL]` +","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear persons* : `c person`","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear tasks* : `c task`","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":"* *Delete person* : `d INDEX` +","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `d 3`","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `d task/ INDEX` +","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"Esilocke"},"content":"e.g. `d task/ 4`","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `d tag/ INDEX t/[TAG]` +","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"e.g. `d tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `e INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `e 2 n/James Lee e/jameslee@example.com`","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `e task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"Esilocke"},"content":"e.g. `e task/ 2 p/veryhigh`","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `e tag/ OLDTAGNAME NEWTAGNAME` +","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"Esilocke"},"content":"e.g. `e tag/ friends enemies`","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":"* *Favourite persons* :`fav INDEX` +","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `fav 1`","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":"* *Unfavourite persons* :`unfav INDEX` +","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `unfav 1`","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"* *Show favourite list* :`sfav` +","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sfav`","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":"* *Find person* : `f KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `f James Jake`","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `f tag/ Tag [MORE_TAGS]` +","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"Esilocke"},"content":"e.g. `f tag/ friends`","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `f task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":"e.g. `f task/ update p/high`","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `l`","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"* *List tags* : `stag`","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `loc INDEX`","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navi [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navi fa/Tampines Mall ta/Sentosa","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"* *Select person* : `s INDEX` +","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"e.g.`s 2`","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `s task/ INDEX` +","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"Esilocke"},"content":"e.g.`s task/ 2`","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as complete* : `stc INDEX` +","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `stc 4`","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as incomplete* : `sti INDEX` +","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sti 5`","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"jeffreygohkw"},"content":"* *Assign to task* : `as PERSONINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `as 4 1 17 18 to/21`","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"jeffreygohkw"},"content":"* *Dismiss from task* : `ds PERSONINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `ds 4 1 from/17`","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `va INDEX` +","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"e.g. `va 1`","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `th THEME` +","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `th light`","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"jeffreygohkw"},"content":"* *History* : `h`","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"jeffreygohkw"},"content":"* *Undo* : `u`","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"jeffreygohkw"},"content":"* *Redo* : `r`","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `o`","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `sa`","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[F1]","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary.","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":204,"jeffreygohkw":252,"Esilocke":668,"-":344}},{"path":"docs/team/JeffreyGoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Jeffrey Goh - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Project: Address++","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is a desktop address book application that aims to help users manage their contacts and their time. It is primarily targeted at students with projects, although it may be used in a wide variety of other settings as well. Users will be able to interact with it using a Command Line Interface, and it has a Graphic User Interface created with JavaFX.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/jeffreygohkw.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/jeffreygohkw.md[Test code]]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Privacy of Fields","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior (Add and Edit Co-authored with Charles Goh)","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003daddprivacy]","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003deditprivacy]","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dchangeprivacy]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dprivacylevel]","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"Users may have contacts that they would like to keep confidential or those that they do not feel comfortable displaying in public. Instead of removing the contact from the address book, setting a field to private allows users to choose exactly what information they would like to display and what they would like to hide.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"In addition, a private name cannot be searched for, and a private address cannot be used in the locate and navigate commands to prevent users from finding out the value of the private field.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"Having a private field also doubles up as an extra layer of protection against unintentional modifications, as private fields cannot be edited without changing them back to public fields.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"It may be inconvenient for a user to set a person\u0027s fields to public and back to private every time they would like to have a peek at the data that was hidden, or to set a person\u0027s every field to private if they want to hide them. Thus, having a command to change the privacy level of the address book will make it much more convenient for users to access private information.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dprivacy]","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Locating a person\u0027s address","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dlocate]","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"While a person\u0027s phone and email address can be used directly, users often are unaware of where exactly their contacts\u0027 addresses are located in real life. The locate command aims to solve this problem by taking the address of a contact and searching for it on Google Maps. This allows the user to find out where exactly their contacts\u0027 addresses are located.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dlocate]","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Navigating from one address to another","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dnavigate]","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"Locating a contact does not tell users how to arrive at that particular contact\u0027s address. Furthermore, users may face the scenario where they have to travel and meet different groups and different contacts throughout the day. The Navigate command allows users to find out the most efficient path from one address to another with the aid of Google Maps.","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"Users are able to utilize the addresses attached to a person, as well as those attached to a task, in the navigate command. They can also manually input addresses in the custom line if they are looking for directions to or from an address that is not presently stored inside the address book. This greatly enhances the flexibility of the command, and allows users to use the command without having to add a dummy task or person to store new addresses beforehand.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dnavigate]","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Opening and Saving of the .xml save file","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopen]","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dsaveas]","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopensaveas]","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"Open and Save As will allow users to more easily manage their data. Open allows them to load their data from a .xml file, letting them easily work on multiple different address books. +","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"Save As allows users to save their address book data, letting it serve as backup or allowing them to be placed in a different location on the computer while still remaining operational. +","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"This also allows for easier transfers of save files between devices without having to manually drag and manage the save files to and from the folder where Address++ is located.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"It can even potentially allow for syncing save files between devices if external software like Dropbox is used.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dopensaveas]","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Other contributions","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":"* Add Menu Icons for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#10])","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"* Add Keyboard Shortcuts for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#11], https://github.com/CS2103AUG2017-W09-B2/main/pull/101[#101])","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"* Modified SortCommand to be undoable, and wrote test cases for it (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/29[#29], https://github.com/CS2103AUG2017-W09-B2/main/pull/30[#30])","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"* Created TaskAddress to store the address of tasks (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/129[#129], https://github.com/CS2103AUG2017-W09-B2/main/pull/132[#132])","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"* Added Travis, Coveralls and Appveyor links for Continuous Integration (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/4[#4], https://github.com/CS2103AUG2017-W09-B2/main/pull/22[#22])","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"* Performed Acceptance Testing for Team T16-B2 (Issue https://github.com/CS2103AUG2017-T16-B2/main/issues/102[#102])","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":"* Wrote some Manual Testing tests (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/162[#162], https://github.com/CS2103AUG2017-W09-B2/main/pull/165[#165])","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":159}},{"path":"docs/team/KelvinLin.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"\u003d Lin Ziwen Kelvin - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: AddressBook++","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/Esilocke.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/Esilocke.md[Test code]]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Edit Tag","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittag]","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"The user may find a need to change the name of a particular name. +","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"In the context of the target user, suppose that a user wishes to change the tag `CS2103Groupmates` to `friends`, after he has completed the module. +","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"The user would need to delete the tag from all users who are tagged with `CS2103Groupmates`, and add the tag `friends` to them one-by-one. `edittag` thus aims to make this process faster by allowing users to rename all instances of the tag from the address book.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"The EditTagCommand iterates through each person in the UniquePersonList, and replaces the old tag, if found, with the new tag.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Optional Data Input","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"Optional Data Input allows tasks and persons to have only one compulsory field, the name. All other fields in a person or task can be left unspecified, allowing for a greater range of inputs.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"We may not always have the opportunity to find contacts or tasks with complete information. +","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"This means that some contacts may not have an address, or email address, while some tasks may not have a deadline, or a description. Without Optional Data Input, the user would need to come up with random placeholder values for each prefix, which would greatly hinder user experience as the user would need to type in unnecessary values to satisfy the command format. +","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"Allowing optional data input thus lifts the restriction of making every field compulsory, and thus allows users to fill in a wider range of input.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"When a user does not fill in a prefix for a particular field, the parser will create an object corresponding to the missing field with a placeholder value.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"[source, java]","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"public Phone(String args) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ...","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"public boolean isValidPhone(String args) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (args.equals(PHONE_PLACEHOLDER_VALUE) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" ...","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"In addition, the isValid method is also updated to accept placeholder values as valid inputs.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Tasks Management","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003daddtask]","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittask]","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003ddeletetask]","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dfindtask]","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dselecttask]","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dsetstate]","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dassignDismiss]","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dclear]","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"Our intended target audience are primarily NUS students, who are working on projects. In addition to managing their contact details, allowing users to manage their tasks would also greatly improve their user experience, as they would not need to keep track of their project deadlines separately.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dtask]","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dassignDismiss]","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Other contributions","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* Conducted internal acceptance testing [https://github.com/CS2103AUG2017-W09-B2/main/issues/155[Issue #155]]","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"* Conducted Acceptance Testing for other teams [https://github.com/CS2103AUG2017-F09-B1/main/issues/83[F09-B1]] [https://github.com/CS2103AUG2017-F09-B1/main/issues/82[F09-B1]]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"Esilocke":114}},{"path":"docs/team/charlesgoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Charles Goh - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: Address++","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"Address++ is a desktop address book application that aims to provide students and","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"professionals with an effective tool to help them manage their contacts and their time.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"This is a snapshot of our User Interface","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"My contributions to this project are listed below:","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/charlesgoh.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/charlesgoh.md[Test code]]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Password Protection Commands `lock` `unlock` `changepassword`","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dpassword]","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"Many users have security related concerns. In order to slow malicious users from causing","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"damage to users\u0027 Address++ application, the password protection suite of commands were","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"created.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dpassword]","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dsort]","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"As more contacts and tasks are added to the application, the lists may get long and disorganized. The Sort Command","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"allows users to sort both contacts and tasks by key fields. Examples include sorting contacts by name and","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"sorting contacts by deadlines.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dbackup]","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"Users are able to back up their data before making any changes so that in the event of an","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"emergency (e.g. clearing all data and then closing afterwards), the old save data can be restored.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dbackup]","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dfontsize]","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"Different monitors render the application differently. On some monitors, the words may appear to be too small. The font size","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"commands and buttons allow users to increase/decrease/reset the font sizes at any time when using the application.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dfontsize]","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Avatar and Remark Fields","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior: Co-authored with Jeffrey Goh","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003davatar]","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":"Avatars and remarks help users to identify different contacts. It was also implemented with the intention of making the application","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"more user friendly.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation for Avatar Field","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003davatar]","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Other contributions","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":"* Added tests for task related implementations (https://github.com/CS2103AUG2017-W09-B2/main/pull/115/files[#115]) +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":"* Conducted Acceptance Testing for another team [https://github.com/CS2103AUG2017-W09-B4/main/issues/77[W09-B4]]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":162}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 5, 0, false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(model.getUserPrefs());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private String appTitle \u003d \"Address++\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BackupRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * An Event for backing up of data to a selected location.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class BackupRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private Model model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private String args;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public BackupRequestEvent(Model model, String args) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public Model getModel() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" return model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public void setModel(Model model) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public String getArgs() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" return args;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void setArgs(String args) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelNavigateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelNavigateEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" private final Location fromLocation;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final Location toLocation;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelNavigateEvent(Location fromLocation, Location toLocation) {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.fromLocation \u003d fromLocation;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.toLocation \u003d toLocation;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Location getFromLocation() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" return fromLocation;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Location getToLocation() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" return toLocation;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":33}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeFontSizeEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a font size change triggered by a command or the UI","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"public class ChangeFontSizeEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static int increaseSizeEventIndex \u003d 0;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static int decreaseSizeEventIndex \u003d 1;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static int resetSizeEventIndex \u003d 2;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private int triggerOption;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public ChangeFontSizeEvent(int triggerOption) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" return \"New Event: Font size change\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static int getIncreaseSizeEventIndex() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" return increaseSizeEventIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public static int getDecreaseSizeEventIndex() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return decreaseSizeEventIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static int getResetSizeEventIndex() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return resetSizeEventIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public int getTriggerOption() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return triggerOption;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public void setTriggerOption(int triggerOption) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangeThemeRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" private final String styleSheet;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public ChangeThemeRequestEvent(String styleSheet) {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" this.styleSheet \u003d styleSheet;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public String getStyleSheet() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return styleSheet;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/commons/events/ui/JumpToListRequestTaskEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Indicates a request to jump to the list of tasks","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class JumpToListRequestTaskEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public final int targetIndex;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public JumpToListRequestTaskEvent(Index targetIndex) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" //TODO optimize this class","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex.getZeroBased();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" this.addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" return result;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" } finally {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" history.add(commandText);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":12,"Esilocke":8,"-":49}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that adds an object to the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class AddCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/AddPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"John Doe \"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"98765432 \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + PREFIX_REMARK + \"Sells sea shells on the sea shore \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + PREFIX_AVATAR + \"avatar-filepath.png\"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"friends \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"owesMoney\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public AddPersonCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddPersonCommand)) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assert (((AddPersonCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddPersonCommand) other).personToAdd);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":73}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends AddCommand {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" + \"target persons in the current list.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":126}},{"path":"src/main/java/seedu/address/logic/commands/AddTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \": Adds a task to the address book. \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS]\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"12 Kent Ridge Crescent, 119275\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New task added: \\n%1$s\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Creates an AddTaskCommand to add the specified {@code ReadOnlyTask}","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public AddTaskCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" super();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddTaskCommand)) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assert (taskToAdd !\u003d null);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert (((AddTaskCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddTaskCommand) other).taskToAdd);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":70}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \"MyBackUpFile\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" super();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new BackupRequestEvent(model, args));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/logic/commands/ChangePasswordCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Changes user\u0027s password provided old password is correct and new passwords match.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommand extends Command {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"changepassword\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"cpw\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Password changed successfully\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes user password. \\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"NEWPASSWORD \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"CONFIRMPASSWORD \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_OLD_NEW_PS_SAME \u003d \"New password must be different from your old password\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ERROR_OCCURED \u003d \"An error occured. Please try again.\\n\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Your password is incorrect. Please try again.\\n\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_CONFIRMATION_INCORRECT \u003d \"Your new password and confirmation password \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" + \"do not match. Please try again\\n\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(ChangePasswordCommand.class);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private String oldPassword;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private String newPassword;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" private String confirmationPassword;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" * Takes in old password, new password and confirmation password from parser and creates a new","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * ChangePasswordCommand object","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param oldPassword","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" * @param newPassword","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" * @param confirmPassword","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand(String oldPassword, String newPassword, String confirmPassword) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.oldPassword \u003d oldPassword;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" this.newPassword \u003d newPassword;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.confirmationPassword \u003d confirmPassword;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes string using SHA256 encryption and returns hashed string","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * @param argument","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" private String forwardHash(String argument) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(argument, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes the user input password and checks if it matches with the encrypted password saved","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldPasswordCorrect() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String forwardHashedInputPassword \u003d forwardHash(oldPassword);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" String forwardHashActualPassword;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" forwardHashActualPassword \u003d userPrefs.getAddressBookEncryptedPassword();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" if (forwardHashActualPassword.equals(forwardHashedInputPassword)) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Actual password and input password matches\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return true;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Actual password and input password do not match\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" return false;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Takes new input passwords and checks them against one another.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" private boolean isNewPasswordInputsSame() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return newPassword.equals(confirmationPassword);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Checks if old password and new password are the same","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldAndNewPasswordTheSame() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return oldPassword.equals(newPassword);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" // Case where old password is incorrect","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" if (!isOldPasswordCorrect()) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Password is incorrect. Note: Default password is \u0027password\u0027 \");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Case where new password and confirmation password do not match","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" if (!isNewPasswordInputsSame()) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"New password and confirmation password do not match\");","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_CONFIRMATION_INCORRECT);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" // Case where old and new passwords are the same","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" if (isOldAndNewPasswordTheSame()) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Old password and new password cannot be the same\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_OLD_NEW_PS_SAME);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Case where user input passes both checks. Password is changed and UserPrefs saved","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" // Get user prefs file","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set new password to user prefs","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(newPassword);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" // Logs new password and saved password for debugging purposes","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String hashedNewPassword \u003d forwardHash(newPassword);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" String userPrefsHashedPassword \u003d userPrefs.getAddressBookEncryptedPassword();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New Password: \" + newPassword","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted New Password: \" + hashedNewPassword","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted Password From UserPrefs:\" + userPrefsHashedPassword","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" + \"\\nCommand\u0027s Password and UserPrefs saved password matches: \"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + Boolean.toString(hashedNewPassword.equals(userPrefsHashedPassword)) + \"\\n\");","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" // Return command result","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":142}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_AVATAR + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_AVATAR + FALSE_WORD;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d null;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(model.getPrivacyLevel());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Person must have all fields initialised.\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps)","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Name name \u003d createNameWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone \u003d createPhoneWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" Email email \u003d createEmailWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Address address \u003d createAddressWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark \u003d createRemarkWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar \u003d person.getAvatar();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" Boolean favourite \u003d person.getFavourite();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tag \u003d person.getTags();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tag);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Name) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Name) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return name;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createPhoneWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getPhone().getIsPrivate()) {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Phone\");","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(person.getPhone().getIsPrivate());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return phone;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createEmailWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getEmail().getIsPrivate()) {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Email\");","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(person.getEmail().getIsPrivate());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return email;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createAddressWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Address\");","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(person.getAddress().getIsPrivate());","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" return address;","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createRemarkWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getRemark().getIsPrivate()) {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Remark\");","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(person.getRemark().getIsPrivate());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return remark;","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return index;","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person.","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null.","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"charlesgoh"},"content":" * Returns the value of remarkIsPrivate","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" public Boolean getRemarkIsPrivate() {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"charlesgoh"},"content":" return remarkIsPrivate;","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"charlesgoh"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remarkIsPrivate);","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":381}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Clears all entries in the address book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/ClearPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the contacts in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommand extends ClearCommand {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All contacts have been cleared!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_PERSON);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/ClearTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the tasks in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommand extends ClearCommand {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All tasks have been cleared!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_TASK);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public abstract class Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" protected CommandHistory history;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * access to the dependencies.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that deletes an object from the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/DeletePersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Deletes a person from the address book.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommand extends DeleteCommand {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person identified by the index number used in the last listing.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Person: %1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size()) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToDelete));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeletePersonCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeletePersonCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends DeleteCommand {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"The target persons do not have input tags.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":125}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a task from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommand extends DeleteCommand {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the task identified by the index number used in the last listing.\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Task: %1$s\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToDelete));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeleteTaskCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteTaskCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":56}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + \"TASK \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" if (!personsToDismiss.contains(toDismiss)) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":89}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that edits an object in the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class EditCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/EditPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * Edits a person in the address book.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommand extends EditCommand {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last person listing. \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"91234567 \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Person: \\n%1$s\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static boolean areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final EditPersonDescriptor editPersonDescriptor;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * @param index of the person in the filtered person list to edit","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * @param editPersonDescriptor details to edit the person with","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editPersonDescriptor);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" editedPerson.setPrivacyLevel(model.getPrivacyLevel());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" updatedAvatar \u003d createUpdatedAvatar(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedAvatar, updatedTags);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().getIsPrivate()) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().getIsPrivate()) {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" //**author charlesgoh","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().getIsPrivate()) {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Avatar) for use in createEditedPerson","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Avatar) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar createUpdatedAvatar(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAvatar().isPresent()) {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAvatar;","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" //author","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonCommand)) {","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand e \u003d (EditPersonCommand) other;","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the person.","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" public static class EditPersonDescriptor {","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" private Name name;","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" private Phone phone;","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" private Email email;","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" private Address address;","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" private Boolean favourite;","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" private Remark remark;","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" private Avatar avatar;","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" private Set\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor() {}","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" this.name \u003d toCopy.name;","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d toCopy.phone;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" this.email \u003d toCopy.email;","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" this.address \u003d toCopy.address;","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" this.favourite \u003d toCopy.favourite;","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d toCopy.remark;","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d toCopy.avatar;","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d toCopy.tags;","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark,","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" this.avatar, this.tags);","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cName\u003e getName() {","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(name);","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPhone\u003e getPhone() {","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(phone);","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cEmail\u003e getEmail() {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(email);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAddress\u003e getAddress() {","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(address);","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cRemark\u003e getRemark() {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(remark);","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" public void setAvatar(Avatar avatar) {","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d avatar;","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAvatar\u003e getAvatar() {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(avatar);","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(tags);","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonDescriptor)) {","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" return getName().equals(e.getName())","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar())","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTags().equals(e.getTags());","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":190,"Esilocke":227,"wangyiming1019":9}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends EditCommand {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \": Edits the specified tag \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/EditTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Edits a task in the address book.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommand extends EditCommand {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \": Edits the details of the task identified \"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Task: \\n%1$s\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand(Index index, EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownTaskList.size()) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedTask));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * edited with {@code editTaskDescriptor}.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assert taskToEdit !\u003d null;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" TaskName updatedTaskName;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Description updatedDescription;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" Deadline updatedDeadline;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Priority updatedPriority;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Assignees assignees;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" Boolean updatedState;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" TaskAddress updatedTaskAddress;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // You cannot edit assignees or state using edit command","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assignees \u003d taskToEdit.getAssignees();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" updatedState \u003d taskToEdit.getCompleteState();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress \u003d editTaskDescriptor.getTaskAddress().orElse(taskToEdit.getTaskAddress());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState,","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskCommand)) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand e \u003d (EditTaskCommand) other;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task.","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private Description description;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" private Priority priority;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" private TaskAddress taskAddress;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d toCopy.taskAddress;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority,","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" this.taskAddress);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d taskAddress;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskAddress\u003e getTaskAddress() {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskAddress);","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority())","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTaskAddress().equals(e.getTaskAddress());","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":224}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getAddress(), true,","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getTags());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToFavourite, editedPerson);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that finds objects in the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class FindCommand extends Command {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/FindPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" * Finds people in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommand extends FindCommand {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand(NameContainsKeywordsPredicate predicate) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindPersonCommand","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personPredicate.equals(((FindPersonCommand) other).personPredicate);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":32}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends FindCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" + \": Finds all persons whose tags contain any of \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" friends colleagues\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/FindTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Finds tasks in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommand extends FindCommand {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \": Finds all tasks whose names or descriptions \"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]... [p/MINIMUM_PRIORITY] [done/TASK_STATE]\\n\"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_COMPLETE_VALUE \u003d \"The task status should either be \u0027true\u0027 or \u0027false\u0027\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PRIORITY \u003d \"The specified priority should be an integer from 1 to 5\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand(TaskContainsKeywordPredicate predicate) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindTaskCommand","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskPredicate.equals(((FindTaskCommand) other).taskPredicate);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/commands/FontSizeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 5;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"fontsize\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"fs\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String INCREASE_SIZE_PARAMETER \u003d \"increase\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String DECREASE_SIZE_PARAMETER \u003d \"decrease\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String RESET_SIZE_PARAMETER \u003d \"reset\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" INCREASE_SIZE_PARAMETER, DECREASE_SIZE_PARAMETER, RESET_SIZE_PARAMETER));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Increases, decreases or resets font sizes \\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [OPTION]\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" increase\\n\"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" reset\\n\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\" + MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_INCREASE_FONT \u003d \"Font size increased successfully\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_DECREASE_FONT \u003d \"Font size decreased successfully\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_RESET_FONT \u003d \"Font size reset successfully\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" private final String option;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand(String option) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.option \u003d option;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getOption() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return this.option;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" switch (option) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" case INCREASE_SIZE_PARAMETER:","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_INCREASE_FONT);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" case DECREASE_SIZE_PARAMETER:","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_DECREASE_FONT);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" case RESET_SIZE_PARAMETER:","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_RESET_FONT);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" System.err.println(\"Parameter is invalid\");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_INVALID_INPUT + MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":68}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person at Index: %1$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_ADDRESS_FAILURE \u003d \"Person %1$s has no Address\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_NO_ADDRESS_FAILURE, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":62}},{"path":"src/main/java/seedu/address/logic/commands/LockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class LockCommand extends Command {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"lock\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"lk\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Locks the application. \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ locked successfully\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public LockCommand(String password) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to lock","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/NavigateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Navigates from one address to another with the help of Google Maps","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"navigate\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"nav\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" + \": Get directions from one address to another.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three)\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \" AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" fp/2 ta/University Town\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NAVIGATE_SUCCESS \u003d \"Navigating from %1$s to %2$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_FROM_ERROR \u003d \"Only one type of From prefix allowed.\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_TO_ERROR \u003d \"Only one type of To prefix allowed.\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR \u003d \"Address of the Person at index %1$s is private.\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR \u003d \"Person at index %1$s does not have an address.\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_HAS_NO_ADDRESS_ERROR \u003d \"Task at index %1$s does not have an address.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationFrom;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationTo;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private final Index fromIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private final Index toIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean fromIsTask;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean toIsTask;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d null;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d null;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" checkDuplicateFromAndToLocation(locationFrom, locationTo, fromIndex, toIndex);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" this.locationFrom \u003d from;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" this.locationTo \u003d to;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" this.toIndex \u003d toIndex;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIndex \u003d fromIndex;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" this.toIsTask \u003d toIsTask;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIsTask \u003d fromIsTask;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Throws an IllegalArgumentException if there is both locationFrom and fromIndex are not null,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * or if both locationTo and toIndex are not null.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo,","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" Index fromIndex, Index toIndex) throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" Location from;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" Location to;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" if (fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" if (toIndex !\u003d null) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d setLocationByIndex(toIndex, toIsTask);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelNavigateEvent(from, to));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_NAVIGATE_SUCCESS, from, to));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationFrom() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" return locationFrom;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationTo() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" return locationTo;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" public Index getFromIndex() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" return fromIndex;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" public Index getToIndex() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" return toIndex;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isFromIsTask() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return fromIsTask;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isToIsTask() {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" return toIsTask;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NavigateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationFrom(other)","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationTo(other)","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIndex(other)","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIndex(other)","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIsTask(other)","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIsTask(other)); // state check","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationFrom) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationFrom(Object other) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationFrom \u003d\u003d null) {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationFrom \u003d\u003d null;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationFrom.equals(((NavigateCommand) other).locationFrom);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationTo) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationTo(Object other) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationTo \u003d\u003d null) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationTo \u003d\u003d null;","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationTo.equals(((NavigateCommand) other).locationTo);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIndex) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIndex(Object other) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" if (this.fromIndex \u003d\u003d null) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).fromIndex \u003d\u003d null;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIndex.equals(((NavigateCommand) other).fromIndex);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIndex) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIndex(Object other) {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" if (this.toIndex \u003d\u003d null) {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).toIndex \u003d\u003d null;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIndex.equals(((NavigateCommand) other).toIndex);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIsTask) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIsTask(Object other) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIsTask \u003d\u003d (((NavigateCommand) other).fromIsTask);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIsTask) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIsTask(Object other) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIsTask \u003d\u003d (((NavigateCommand) other).toIsTask);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":224}},{"path":"src/main/java/seedu/address/logic/commands/OpenCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommand extends Command {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"open\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"o\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String OPEN_COMMAND_SUCCESS \u003d \"Successfully opened file.\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new OpenRequestEvent());","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(OPEN_COMMAND_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/PrivacyLevelCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Handles the changing of Privacy Levels in the address book","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"privacylevel\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"pl\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String CHANGE_PRIVACY_LEVEL_SUCCESS \u003d \"Successfully changed privacy level to %1$s.\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String WRONG_PRIVACY_LEVEL_MESSAGE \u003d \"Privacy Level can only be 1, 2 or 3\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MIN_PRIVACY_LEVEL \u003d 1;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MAX_PRIVACY_LEVEL \u003d 3;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \": Changes the privacy level of the address book. Level 1 shows all data, level 2 hides private fields\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" + \" and level 3 hides persons with at least 1 private field.\\n\"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: LEVEL (must be 1, 2 or 3)\\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final int level;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand(int level) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.level \u003d level;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public int getLevel() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return level;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof PrivacyLevelCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.level \u003d\u003d ((PrivacyLevelCommand) other).level); // state check","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":77}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SaveAsCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data to a new save file at a desired location","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommand extends Command {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"save\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"sa\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String SAVE_AS_COMMAND_SUCCESS \u003d \"Successfully saved file.\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new SaveAsRequestEvent());","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(SAVE_AS_COMMAND_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that selects an object in the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class SelectCommand extends Command {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/SelectPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Selects a person in the address book and loads the view panel for that person.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommand extends SelectCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Person: %1$s\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectPersonCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectPersonCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":47}},{"path":"src/main/java/seedu/address/logic/commands/SelectTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * Selects a task in the address book and loads the view panel for that task.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommand extends SelectCommand {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \": Selects the task identified by the index number used in the last task listing.\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Task: %1$s\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownTaskList.size()) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestTaskEvent(targetIndex));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectTaskCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectTaskCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":49}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as complete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as incomplete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_LIST_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"person\", \"task\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\", \"priority\", \"deadline\"));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons or all tasks by chosen \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [LIST] [FIELD] [ORDER]\\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" person email desc\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_WORD + \" task deadline desc\\n\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Person Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Task Field Values: DEADLINE, PRIORITY\\n\"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_PERSONS \u003d \"All persons in address book successfully sorted\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_TASKS \u003d \"All tasks in address book successfully sorted\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" private final String list;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private final String field;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private final String order;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String list, String field, String order) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" this.list \u003d list;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * Checks if argument command has the same parameter properties","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param commandB","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public boolean sameCommandAs(SortCommand commandB) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return commandB.getList().equals(this.list) \u0026\u0026 commandB.getField()","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .equals(this.field) \u0026\u0026 commandB.getOrder().equals(this.order);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public String getField() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" return this.field;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" return this.order;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public String getList() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" return this.list;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" if (this.list.equals(ACCEPTED_LIST_PARAMETERS.get(0))) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_PERSONS);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" model.sortTasks(getField(), getOrder());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_TASKS);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":2}},{"path":"src/main/java/seedu/address/logic/commands/TagListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * List all tags in the address book to the user","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommand extends Command {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showtag\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"stag\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAILURE \u003d \"There is no tag!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All the tags are here: \";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(displayTags());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * display all the tags to user","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * @return String displayTags","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String displayTags() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" String displayTags;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e tagList \u003d getAllTagsInAddressBook();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" if (tagList.isEmpty()) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_SUCCESS + convertTagToString(tagList);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return displayTags;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * get all the tags in the address book without duplication","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" * @return allTagList","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" private ArrayList\u003cTag\u003e getAllTagsInAddressBook() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e allTagList \u003d new ArrayList\u003cTag\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" if (!allTagList.contains(tag)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" allTagList.add(tag);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" return allTagList;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" * convert a list of tags to a String","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * @return String tags","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ArrayList\u003cTag\u003e tagList) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagNameList \u003d new ArrayList\u003cString\u003e();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : tagList) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" tagNameList.add(tag.getTagName());","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Collections.sort(tagNameList);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder tagNameString \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" for (String tagName : tagNameList) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" tagNameString.append(\"\u003c\").append(tagName).append(\"\u003e \");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" return tagNameString.toString().trim();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/ThemeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommand extends Command {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"theme\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"th\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" + \": Sets the theme based on the specified style.\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: STYLE\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" dark\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_CHANGE_SUCCESS \u003d \"Theme Changed to: %1$s\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_NOT_AVAILABLE \u003d \"Theme %1$s is not available.\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_IN_USE \u003d \"Theme %1$s is currently in use.\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private final String style;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand (String style) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" this.style \u003d style;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return style;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ThemeCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.style.equals(((ThemeCommand) other).style)); // state check","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":64}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToUnfavourite.getName(),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getPhone(), personToUnfavourite.getEmail(),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getAddress(), false,","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getRemark(), personToUnfavourite.getAvatar(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getTags());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToUnfavourite, editedPerson);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/UnlockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommand extends Command {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"unlock\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"ul\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Unlocks the application. \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ unlocked successfully\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand(String password) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to unlocked","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/ViewAssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Displays a list of all persons assigned to a specified task","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"viewassign\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"va\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Shows all persons assigned to a task\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index taskIndex;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToFind \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.viewAssignees(taskToFind);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" || other instanceof ViewAssignCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((ViewAssignCommand) other).taskIndex);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":48}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK, PREFIX_TAG_FULL)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d AddTaskCommandParser.constructTask(args);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new AddTaskCommand(taskToAdd);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TAG_FULL)) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AddTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d AddPersonCommandParser.constructPerson(args);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new AddPersonCommand(personToAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28,"-":23}},{"path":"src/main/java/seedu/address/logic/parser/AddPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR_PRIVATE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ReadOnlyPerson object in the context of AddPersonCommand.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"public class AddPersonCommandParser extends AddCommandParser {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static ReadOnlyPerson constructPerson(String args) throws ParseException {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_AVATAR, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_AVATAR_PRIVATE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d makeName(argMultimap);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d makePhone(argMultimap);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d makeEmail(argMultimap);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d mmakeAddress(argMultimap);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d makeAvatar(argMultimap);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d makeRemark(argMultimap);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, avatar, tagList);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Name based on the input arguments","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static Name makeName(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return name;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Phone based on the input arguments","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone makePhone(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(null);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" return phone;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Email based on the input arguments","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" private static Email makeEmail(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(null);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" return email;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Address based on the input arguments","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" private static Address mmakeAddress(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(null);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return address;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Avatar based on the input arguments","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar makeAvatar(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_AVATAR))) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).get();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d new Avatar(null);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return avatar;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Remark based on the input arguments","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark makeRemark(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)) {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(null);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return remark;","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":164,"Esilocke":2}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser extends AddCommandParser {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" protected static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/parser/AddTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ReadOnlyTask object in the context of AddTaskCommand.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParser extends AddCommandParser {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyTask from the arguments provided.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static ReadOnlyTask constructTask(String args) throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY,","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" PREFIX_ADDRESS, PREFIX_TASK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" TaskName name;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Description description;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Priority priority;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" TaskAddress address;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" description \u003d arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION)","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get()","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" : new Description(null);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" deadline \u003d arePrefixesPresent(argMultimap, PREFIX_DEADLINE)","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get()","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" : new Deadline(null);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" priority \u003d arePrefixesPresent(argMultimap, PREFIX_PRIORITY)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get()","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" : new Priority(null);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" address \u003d arePrefixesPresent(argMultimap, PREFIX_ADDRESS)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS)).get()","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" : new TaskAddress(null);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, address);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":67}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"public class AddressBookParser {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_NO_ACCESS \u003d \"Not allowed! You must unlock before\"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" + \" making any changes.\\n\" + UnlockCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @param userInput full user input string","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @return the command based on the user input","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // Check lock state","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Parsing command. Lock state is currently: \" + Boolean.toString(lockState));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" Command result \u003d processNonCrudCommands(commandWord, arguments);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" if (result !\u003d null) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" return result;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // Test for lock. If locked, return no access message","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" if (lockState) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(MESSAGE_NO_ACCESS);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" return new TagListCommand();","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" return new HistoryCommand();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" return new UndoCommand();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" return new RedoCommand();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" * Checks for non crud command words or aliases and returns the relevant commmand if there is one.","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" * Otherwise control is returned back to the original parseCommand method.","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" * Note: Code was refactored due to codacy\u0027s recommendation that there was a problem with parseCommand\u0027s","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" * NPath complexity (i.e. it the code was too long. Makes it less readable and prone to errors)","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" * @param commandWord","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" * @param arguments","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" private Command processNonCrudCommands(String commandWord, String arguments) throws ParseException {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality and for locking and unlocking","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return new OpenCommand();","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" return new SaveAsCommand();","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return new SelectCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" return new LocateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" return new NavigateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return new LockCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" return null;","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":106,"jeffreygohkw":19,"Esilocke":25,"wangyiming1019":29,"-":70}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * filepath.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 1;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Parses the given user input and backs up data into a separate file name.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @param userInput","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ChangePasswordCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new ChangePassword object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandParser implements Parser\u003cChangePasswordCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePasswordCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a ChangePasswordCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" .tokenize(args, PREFIX_PASSWORD, PREFIX_NEW_PASSWORD, PREFIX_CONFIRM_PASSWORD);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" // Check and split arguments before passing them to ChangePasswordCommand","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_NEW_PASSWORD).isPresent()","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).isPresent()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String password \u003d argMultimap.getValue(PREFIX_PASSWORD).get();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String newPassword \u003d argMultimap.getValue(PREFIX_NEW_PASSWORD).get();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" String confirmPassword \u003d argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).get();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommand(password, newPassword, confirmPassword);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":38}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePrivacyCommand","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ChangePrivacyCommand object for execution.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ClearCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser implements Parser\u003cClearCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearPersonCommand();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new ClearTaskCommand();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person/\");","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TAG_FULL \u003d new Prefix(\"tag/\");","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"v/\");","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR_PRIVATE \u003d new Prefix(\"pv/\");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task/\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_STATE \u003d new Prefix(\"done/\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_PERSON \u003d new Prefix(\"fp/\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_TASK \u003d new Prefix(\"ft/\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_ADDRESS \u003d new Prefix(\"fa/\");","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_PERSON \u003d new Prefix(\"tp/\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_TASK \u003d new Prefix(\"tt/\");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_ADDRESS \u003d new Prefix(\"ta/\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_NEW_PASSWORD \u003d new Prefix(\"np/\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_CONFIRM_PASSWORD \u003d new Prefix(\"cfp/\");","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":14,"Esilocke":9,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommandParser().parse(filteredString);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return new DeleteTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommandParser().parse(args);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/DeletePersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParser extends DeleteCommandParser {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommand(index);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":69}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParser {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object in the context of DeleteTaskCommand.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommand(index);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommandParser().constructTaskDescriptor(filteredArgs);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommandParser().constructPersonDescriptor(args);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":16,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/EditPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditPersonCommand object","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParser extends EditCommandParser {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditPersonCommand that edits a Person object. **/","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand constructPersonDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" PREFIX_REMARK, PREFIX_AVATAR, PREFIX_TAG);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.EditPersonDescriptor editPersonDescriptor \u003d new EditPersonCommand.EditPersonDescriptor();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).ifPresent(editPersonDescriptor::setAvatar);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommand(index, editPersonDescriptor);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * {@code Set\u003cTag\u003e} containing zero tags.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert tags !\u003d null;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (tags.isEmpty()) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":74}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditTagCommand","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * and returns an EditTagCommand object for execution.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return tagList;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/logic/parser/EditTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditTaskCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParser extends EditCommandParser {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditTaskCommand that edits a Task object. **/","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand constructTaskDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY, PREFIX_ADDRESS);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor editTaskDescriptor \u003d new EditTaskCommand.EditTaskDescriptor();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS))","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setTaskAddress);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommand(index, editTaskDescriptor);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommandParser().parse(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new FindTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommandParser().parse(args);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/FindPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindPersonCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParser extends FindCommandParser {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindPersonCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an FindPersonCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/FindTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_STATE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindTaskCommand object","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandParser extends FindCommandParser {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindTaskCommand","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * and returns an FindTaskCommand object for execution.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(argsWithNoTaskPrefix, PREFIX_PRIORITY, PREFIX_STATE);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String keywords \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d keywords.trim();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityFindRequired \u003d argMultimap.getValue(PREFIX_PRIORITY).isPresent();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" boolean isStateFindRequired \u003d argMultimap.getValue(PREFIX_STATE).isPresent();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" int minPriority \u003d 0;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" boolean isComplete \u003d false;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (isPriorityFindRequired) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" minPriority \u003d parsePriority(argMultimap.getValue(PREFIX_PRIORITY).get());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" if (isStateFindRequired) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" isComplete \u003d parseState(argMultimap.getValue(PREFIX_STATE).get());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" isStateFindRequired, isPriorityFindRequired, isComplete, minPriority));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns an integer corresponding to its value","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Guarantees: The specified value is valid as a priority value","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private int parsePriority(String args) throws ParseException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(Priority.MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" int priority;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.parseInt(args.trim());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (priority \u003c 1 || priority \u003e 5) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return priority;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns a boolean value corresponding to its value","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" private boolean parseState(String args) throws ParseException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" if (\"true\".equals(trimmed) || \"false\".equals(trimmed)) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return Boolean.valueOf(trimmed);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_COMPLETE_VALUE);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/logic/parser/FontSizeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParser implements Parser\u003cFontSizeCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final int PARAMETER_POSITION \u003d 0;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the FontSizeCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a FontSizeCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 1) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" if (!FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, FontSizeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommand(argKeywords[PARAMETER_POSITION]);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":48}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new LocateCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the LocateCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an LocateCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/LockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class LockCommandParser implements Parser\u003cLockCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the LockCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * and returns a LockCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public LockCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[0]);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[1]);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":36}},{"path":"src/main/java/seedu/address/logic/parser/NavigateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new NavigateCommand object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParser implements Parser\u003cNavigateCommand\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" private Location from \u003d null;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private Location to \u003d null;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Index fromIndex \u003d null;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Index toIndex \u003d null;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the NavigateCommand","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an NavigateCommand object for execution.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" resetValues();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argumentMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_NAVIGATE_FROM_PERSON,","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_FROM_TASK, PREFIX_NAVIGATE_FROM_ADDRESS, PREFIX_NAVIGATE_TO_PERSON,","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_TO_TASK, PREFIX_NAVIGATE_TO_ADDRESS);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_ADDRESS);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_PERSON);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_TASK);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" boolean toAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_ADDRESS);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" boolean toPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_PERSON);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" boolean toTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_TASK);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkFrom(argumentMultimap, fromAddress, fromPerson, fromTask);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" checkTo(argumentMultimap, toAddress, toPerson, toTask);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return new NavigateCommand(from, to, fromIndex, toIndex, fromTask, toTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * Resets the values stored in NavigateCommandParser object to null","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void resetValues() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d null;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d null;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d null;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d null;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Checksif only 1 To argument is provided","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no To arguments or there are more than 1 To arguements","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" private void checkTo(ArgumentMultimap argumentMultimap, boolean toAddress, boolean toPerson, boolean toTask)","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (!(toAddress || toPerson || toTask)) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((toAddress \u0026\u0026 (toPerson || toTask)) || (toPerson \u0026\u0026 toTask)) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more to prefixes are present","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, toAddress, toPerson, false);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if only 1 From argument is provided","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no From arguments or there are more than 1 From arguments","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person,","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" boolean forFrom) throws IllegalValueException {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":144}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtil {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * trimmed.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer).","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Name to be private if true.","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Phone to be private if true.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Address to be private if true.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e avatar} into an {@code Optional\u003cAddress\u003e} if {@code avatar} is present.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAvatar\u003e parseAvatar(Optional\u003cString\u003e avatar) throws IllegalValueException {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(avatar);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" return avatar.isPresent() ? Optional.of(new Avatar(avatar.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Remark to be private if true.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Email to be private if true.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}.","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" requireNonNull(tags);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" for (String tagName : tags) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" return tagSet;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present.","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present.","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present.","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a {@code TaskAddress} if it is present.","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cTaskAddress\u003e parseTaskAddress(Optional\u003cString\u003e address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new TaskAddress(address.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a (@code Location) if it is present.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cLocation\u003e parseLocationFromAddress(Optional\u003cString\u003e location) throws IllegalValueException {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(location);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return location.isPresent() ? Optional.of(new Location(location.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" * the value in the String.","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" public static ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" int parsedInt;","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" if (!s.isEmpty()) {","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":123,"Esilocke":64,"-":66}},{"path":"src/main/java/seedu/address/logic/parser/PrivacyLevelCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new PrivacyLevelCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParser implements Parser\u003cPrivacyLevelCommand\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the PrivacyLevelCommand","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an PrivacyLevelCommand object for execution.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" int level \u003d ParserUtil.parseIndex(args).getOneBased();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommand(level);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, PrivacyLevelCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27}},{"path":"src/main/java/seedu/address/logic/parser/SelectCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new SelectCommand object","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class SelectCommandParser implements Parser\u003cSelectCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * and returns an SelectCommand object for execution.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public SelectCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\").trim();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommandParser().parse(trimmed);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommandParser().parse(args);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/SelectPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectPersonCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParser extends SelectCommandParser {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectPersonCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectPersonCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommand(index);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SelectTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectTaskCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParser extends SelectCommandParser {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectTaskCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectTaskCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommand(index);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int LIST_ARG_POSITION \u003d 0;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 1;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 2;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 3;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e PERSON_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(0, 4);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e TASK_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(4, 6);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Eliminate spaces","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(0))","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 TASK_FIELD_ARGS.contains(argKeywords[1]))","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(1))","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 PERSON_FIELD_ARGS.contains(argKeywords[1]))) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_LIST_PARAMETERS.contains(argKeywords[LIST_ARG_POSITION])) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[LIST_ARG_POSITION],","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":66}},{"path":"src/main/java/seedu/address/logic/parser/ThemeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ThemeCommand object","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParser implements Parser\u003cThemeCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ThemeCommand","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ThemeCommand object for execution.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/UnlockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommandParser implements Parser\u003cUnlockCommand\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d \"Password is required\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the UnlockCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a UnlockCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[0]);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[1]);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ViewAssignCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ViewAssignCommand object","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParser implements Parser\u003cViewAssignCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommand(index);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":24}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private HashMap\u003cString, String\u003e styleMap;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * among constructors.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" styleMap \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public AddressBook() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" initialiseStyleMap();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" //// list overwrite operations","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasks.clearAssignees();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" //// person-level operations","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" persons.add(newPerson);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" public void sortTasksBy(String field, String order) {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" tasks.sortBy(field, order);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the index of {@code ReadOnlyPerson} specified","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractPersonIndexes(ArrayList\u003cReadOnlyPerson\u003e personsToExtract) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return persons.extractIndexes(personsToExtract);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" // used for checking person tag references","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the UniquePersonList","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" return persons.getMappings();","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" //// tag-level operations","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" tags.add(t);","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" //// task-level operations","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists.","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified person from all assignment lists for every task **/","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" public void removePersonFromAssignees(Index target) {","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" tasks.removeAssignee(target);","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" * Updates the Assignees for all tasks in the internal tasks list with their new mappings","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" public void updateTaskAssigneeMappings(Index[] mappings) {","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" tasks.updateAssignees(mappings);","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}.","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" //// theme-level operations","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Initialises the style map by adding the key value pairs","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" * for the strings that will be input in ThemeCommand and the file name of the .css file","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void initialiseStyleMap() {","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"/view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"/view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"/view/LightTheme.css\");","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"/view/LightTheme.css\");","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" return styleMap;","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" //// util methods","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\"","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":" // TODO: refine later","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" return persons.asObservableList();","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromPersonList(int index) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" return persons.asObservableList().get(index);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":" return tags.asObservableList();","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":26,"Esilocke":131,"wangyiming1019":17,"-":192}},{"path":"src/main/java/seedu/address/model/Location.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Location in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidLocation(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class Location {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" \"Location can take any value, and it should not be blank\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" /*","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String LOCATION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given location.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given location string is invalid.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public Location(String location) throws IllegalValueException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (location \u003d\u003d null) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidLocation(location)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d location;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid location.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidLocation(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(LOCATION_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof Location // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Location) other).value)); // state check","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The API of the Model component.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public interface Model {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Adds the given person */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /** Displays all persons assigned to the specified task */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" void viewAssignees(ReadOnlyTask task);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by chosen field in ascending (asc) or descending (desc) order","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" * Sorts all tasks in task list by chosen field in ascending (asc) or descending (desc) order","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" void sortTasks(String field, String order);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Returns lock state. True means locked. False means unlocked","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" boolean getLockState();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" * Locks address book from model","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" void lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Unlock address book from model","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" void unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" * Returns a copy of the UserPrefs","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" UserPrefs getUserPrefs();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson getPersonAtIndexFromAddressBook(int index);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" void setTheme(String theme);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" String getTheme();","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" HashMap\u003cString, String\u003e getStyleMap();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":15,"Esilocke":58,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.PersonCompleteMatchPredicate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" private final UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.userPrefs \u003d userPrefs;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d userPrefs.getTheme();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public ModelManager() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" persons.add(target);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d addressBook.extractPersonIndexes(persons);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" Index personIndex \u003d personIndexes.get(0);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" addressBook.removePersonFromAssignees(personIndex);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" Index[] updatedIndexes \u003d addressBook.getMappings();","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" System.out.println(updatedIndexes.length);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" addressBook.updateTaskAssigneeMappings(updatedIndexes);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks(String field, String order) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(field, order);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" return userPrefs;","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return getUserPrefs().getAddressBookLockState();","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().lockAddressBook();","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().unlockAddressBook();","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" int index;","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToAssign);","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d newAssignees.assign(positions);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneAdded) {","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToAssignTo, newAssignees);","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToAssignTo, updatedTask);","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToDismiss);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneDismissed \u003d newAssignees.dismiss(positions);","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneDismissed) {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToDismissFrom, newAssignees);","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToDismissFrom, updatedTask);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d toSet.getTaskAddress();","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state, taskAddress);","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d task.getAssignees();","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e internalList \u003d assignees.getList();","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToShow \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" for (Index i : internalList) {","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" assert(i.getZeroBased() \u003c filteredPersons.size());","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" personsToShow.add(filteredPersons.get(i.getZeroBased()));","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" PersonCompleteMatchPredicate assignedPredicate \u003d new PersonCompleteMatchPredicate(personsToShow);","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" updateFilteredPersonList(assignedPredicate);","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" * {@code addressBook}","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 3) {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" if (predicate instanceof NameContainsKeywordsPredicate) {","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsKeywordsPrivacyLevelPredicate(((","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPredicate) predicate).getKeywords()));","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsTagsPredicate) {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsTagsPrivacyLevelPredicate(((","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsTagsPredicate) predicate).getTags()));","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsFavouritePredicate) {","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsFavouritePrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate \u003d\u003d PREDICATE_SHOW_ALL_PERSONS) {","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Utility methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" * Constructs a new {@code ReadOnlyTask} from an existing ReadOnlyTask, with the specified assignees list.","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyTask constructTaskWithNewAssignee(ReadOnlyTask originalTask, Assignees updatedAssignees) {","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d originalTask.getTaskName();","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" Description description \u003d originalTask.getDescription();","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d originalTask.getDeadline();","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d originalTask.getPriority();","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d originalTask.getCompleteState();","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d originalTask.getTaskAddress();","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, updatedAssignees,","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" state, taskAddress);","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" return updatedTask;","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c 1 || level \u003e 3) {","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy Level can only be 0, 1 or 2\");","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getPersonAtIndexFromPersonList(index);","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" userPrefs.setTheme(theme);","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" return theme;","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getStyleMap();","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":72,"Esilocke":186,"wangyiming1019":58,"-":110}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String addressBookFilePath \u003d \"data/addressbook.xml\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private String addressBookName \u003d \"My Address++\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private boolean addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private String addressBookEncryptedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" .hashString(\"password\", StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public UserPrefs() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" this.setGuiSettings(1080, 720, 0, 0);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return addressBookFilePath;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public String getAddressBookName() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return addressBookName;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public String getAddressBookEncryptedPassword() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" return addressBookEncryptedPassword;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void setAddressBookEncryptedPassword(String addressBookPasswordInput) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" this.addressBookEncryptedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" .hashString(addressBookPasswordInput, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBook() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d true;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBook() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean getAddressBookLockState() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return this.addressBookLockState;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookEncryptedPassword, o.addressBookEncryptedPassword)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nPassword : \" + addressBookEncryptedPassword);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (theme \u003d\u003d null) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return \"/view/DarkTheme.css\";","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return theme;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":12,"-":74}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this(address);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid person address.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s avatar filepath in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"public class Avatar {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" \"Person avatar can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public Avatar(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d AVATAR_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" if (!isValidAvatar(address)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidAvatar(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return test.matches(AVATAR_VALIDATION_REGEX) || test.equals(AVATAR_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Avatar // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":57,"jeffreygohkw":6}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given email.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this(email);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":42,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d trimmedName;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(name);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Name) other).value)); // state check","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":47,"-":48}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured and has no private fields","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsFavouritePrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsFavouritePrivacyLevelPredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return (person.getFavourite() \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsFavouritePrivacyLevelPredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameContainsKeywordsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public NameContainsKeywordsPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" return keywords.stream()","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getKeywords() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" return keywords;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" || (other instanceof NameContainsKeywordsPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPredicate) other).keywords)); // state check","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":7,"-":30}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" * and has no private fields","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsKeywordsPrivacyLevelPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return (keywords.stream()","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword))","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsKeywordsPrivacyLevelPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPrivacyLevelPredicate) other).keywords)); //state check","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/\")) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(1));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getTags() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return tags;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":6,"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags and hasno private fields.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsTagsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e tags;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsTagsPrivacyLevelPredicate(List\u003cString\u003e tags) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" String allTagString \u003d convertTagToString(person);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (isOnlyUnwantedTags) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" return (!(unwantedTag.stream()","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))))","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" return (wantedTag.stream()","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))))","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" * check only unwanted tag list has elements","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" * @return a boolean value","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (!everyTag.startsWith(\"/\")) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" unwantedTag.add(everyTag.substring(1));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * Convert a set of tags to Strings","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":86}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cAvatar\u003e avatar;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Every field must be present and not null.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Boolean favourite, Remark remark, Avatar avatar, Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" this.avatar \u003d new SimpleObjectProperty\u003c\u003e(avatar);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" source.getRemark(), source.getAvatar(), source.getTags());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return name;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public Name getName() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return name.get();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return phone;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public Phone getPhone() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" return phone.get();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return email;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public Email getEmail() {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" return email.get();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" return address;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public Address getAddress() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return address.get();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return favourite;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" return remark.get();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void setAvatar(Avatar avatar) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" this.avatar.set(requireNonNull(avatar));","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cAvatar\u003e avatarProperty() {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" return avatar;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" public Avatar getAvatar() {","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" return avatar.get();","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" * if modification is attempted.","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags, avatar);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.getName().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" this.getPhone().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" this.getEmail().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" this.getAddress().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" this.getRemark().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if the Person has at least one private field and false otherwise","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" public boolean hasPrivateField() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return (this.getName().getIsPrivate() || this.getPhone().getIsPrivate() || this.getAddress().getIsPrivate()","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" || this.getEmail().getIsPrivate() || this.getRemark().getIsPrivate());","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":37,"jeffreygohkw":25,"wangyiming1019":20,"-":134}},{"path":"src/main/java/seedu/address/model/person/PersonCompleteMatchPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s matches any one of the keywords","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class PersonCompleteMatchPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" private final List\u003cReadOnlyPerson\u003e keywords;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public PersonCompleteMatchPredicate(List\u003cReadOnlyPerson\u003e keywords) {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return keywords.stream()","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" .anyMatch(person::equals);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || (other instanceof PersonCompleteMatchPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((PersonCompleteMatchPredicate) other).keywords)); // state check","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Validates given phone number.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cAvatar\u003e avatarProperty();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" Avatar getAvatar();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" boolean hasPrivateField();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark())","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getAvatar().equals(this.getAvatar());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" builder.append(getName())","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Phone: \")","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" .append(getPhone())","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" .append(\" Email: \")","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" .append(getEmail())","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" .append(\" Address: \")","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" .append(getAddress())","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" .append(\" Avatar: \")","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" .append(getAvatar())","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" .append(\" Tags: \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this(remark);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Remark\u003e\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":66,"jeffreygohkw":29}},{"path":"src/main/java/seedu/address/model/person/ShowAllPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured after taking into account privacy level.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class ShowAllPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public ShowAllPrivacyLevelPredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return !person.hasPrivateField();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ShowAllPrivacyLevelPredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cPerson\u003e internalCopy \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public boolean contains(ReadOnlyPerson toCheck) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Adds a person to the list.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" internalList.add(new Person(toAdd));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" internalList.set(index, new Person(editedPerson));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" setPersons(replacement);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the {@code ReadOnlyPerson} specified","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractIndexes(ArrayList\u003cReadOnlyPerson\u003e persons) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : persons) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" int position \u003d internalList.indexOf(p);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromZeroBased(position));","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return indexes;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the internalList before sorting","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index[] mappings \u003d new Index[internalCopy.size()];","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" int count \u003d 0;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" for (Person p : internalCopy) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(p);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" mappings[count] \u003d Index.fromZeroBased(index);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" count++;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" return mappings;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalList.size());","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" internalCopy.clear();","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" for (Person p : internalList) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" internalCopy.add(p);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalCopy.size());","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":89,"Esilocke":35,"wangyiming1019":31,"-":119}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Assignees {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e assignedList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public Assignees(ArrayList\u003cIndex\u003e assignees) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public Assignees() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public Assignees(Assignees toCopy) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(toCopy.getList());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean assign(ArrayList\u003cIndex\u003e personsToAssign) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d false;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" for (Index i : personsToAssign) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!assignedList.contains(i)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assignedList.add(i);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" atLeastOneAdded \u003d true;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return atLeastOneAdded;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /** Updates the internal assignedList with the correct Index values after a sort operation */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void updateList(Index[] mappings) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e updatedList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" for (Index i : assignedList) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Index updatedPosition \u003d mappings[i.getZeroBased()];","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" updatedList.add(updatedPosition);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedList.clear();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(updatedList);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list, and returns true if at least 1 person was removed */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public boolean dismiss(ArrayList\u003cIndex\u003e personsToDismiss) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return assignedList.removeAll(personsToDismiss);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e getList() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this.assignedList;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Deletes the specified index from the internal list, and decrements all other indexes in the assigned list","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * that have a value lower than the deleted index by 1.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void decrementIndex(Index deletedIndex) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(deletedIndex);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c assignedList.size(); i++) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index current \u003d assignedList.get(i);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (current.getZeroBased() \u003e deletedIndex.getZeroBased()) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" int indexValue \u003d current.getZeroBased() - 1;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index decrementedIndex \u003d Index.fromZeroBased(indexValue);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assignedList.set(i, decrementedIndex);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return assignedList.hashCode();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":90}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.DateGroup;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.Parser;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class Deadline {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_DATE \u003d","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" \"The specified date is invalid.\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public final Date date;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null || deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.date \u003d null;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" this.date \u003d setDateFromArgs(deadline);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d date.toString();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" setDateFromArgs(test);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Returns a Date object that represents the given date string.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static Date setDateFromArgs(String date) throws IllegalValueException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Parser deadlineParser \u003d new Parser();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cDateGroup\u003e groups \u003d deadlineParser.parse(date);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cDate\u003e dates \u003d null;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" for (DateGroup group : groups) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" dates \u003d group.getDates();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (dates \u003d\u003d null) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return dates.get(0);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":86}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Priority {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String[] PRIORITY_TEXT_STRINGS \u003d {\"\", \"Lowest\", \"Low\", \"Medium\", \"High\", \"Highest\"};","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 0;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final int value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given priority.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null || priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d 0;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d Integer.parseInt(trimmedPriority);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return PRIORITY_TEXT_STRINGS[value];","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value \u003d\u003d ((Priority) other).value); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":75}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" TaskAddress getTaskAddress();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskAddress\u003e taskAddressProperty();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e changeStateProperty();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" void changeState();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .append(\" Address: \")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .append(getTaskAddress())","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .append(\" \")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState()","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskAddress().equals(this.getTaskAddress());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskAddress\u003e taskAddress;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete, TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * by default.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState(), task.getTaskAddress());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return taskName.get();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return description.get();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return deadline.get();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return priority.get();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return assignees.get();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return state.get();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public TaskAddress getTaskAddress() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return taskAddress.get();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" return description;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return deadline;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return priority;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return assignees;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskAddress\u003e taskAddressProperty() {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" return taskAddress;","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e changeStateProperty() {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d getCompleteState();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (state) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as incomplete\");","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as complete\");","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" public void changeState() {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" this.setState(!this.getCompleteState());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" this.taskAddress.set(taskAddress);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String printableState;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" return printableState;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":200}},{"path":"src/main/java/seedu/address/model/task/TaskAddress.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Task\u0027s address in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidTaskAddress(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class TaskAddress {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" \"Task addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /*","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public final String taskAddress;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public TaskAddress(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d ADDRESS_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidTaskAddress(address)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_TASK_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d address;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid task address.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidTaskAddress(String test) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof TaskAddress // instanceof handles nulls","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.taskAddress.equals(((TaskAddress) other).taskAddress)); // state check","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress.hashCode();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByState;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByPriority;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private boolean isComplete;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private int basePriority;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords, boolean isStateCheckRequired,","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityCheckRequired, boolean isComplete, int basePriority) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d isPriorityCheckRequired;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d isStateCheckRequired;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d isComplete;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d basePriority;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d false;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d false;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d false;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d 0;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" for (String keyword : keywords) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (needFilterByState \u0026\u0026 task.getCompleteState() !\u003d isComplete) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } else if (needFilterByPriority \u0026\u0026 task.getPriority().value \u003c basePriority) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } else if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByPriority \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByPriority","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByState \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByState","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isComplete \u003d\u003d ((TaskContainsKeywordPredicate) other).isComplete","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.basePriority \u003d\u003d ((TaskContainsKeywordPredicate) other).basePriority); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class TaskName {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public final String taskName;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" * Removes all assignees from all tasks.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" t.clearAssignees();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified assignee from all tasks **/","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void removeAssignee(Index personIndex) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" updated.decrementIndex(personIndex);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" internalList.clear();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" * Updates the assignee list within each task to match that of the newPersonIndexes.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * This method is called after a sort persons operation due to the order change","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public void updateAssignees(Index[] newPersonIndexes) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" updated.updateList(newPersonIndexes);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" internalList.clear();","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * Sorts person list by all persons by any field in ascending or descending order","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e priorityComparator \u003d Comparator.comparingInt(o -\u003e o.getPriority().value);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e deadlineComparator \u003d (o1, o2) -\u003e {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" if (o1.getDeadline().date \u003d\u003d null || o2.getDeadline().date \u003d\u003d null) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return 0;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" case \"priority\":","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d priorityComparator;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" case \"deadline\":","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d deadlineComparator;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":60,"Esilocke":179}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task.","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" return new Person[] {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return sampleAb;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" for (String s : strings) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * @param addressBook cannot be null.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem writing to the file.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" void changeFilePath(String fp, UserPrefs u);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":2,"-":43}},{"path":"src/main/java/seedu/address/storage/Storage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * API of the Storage component","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public interface Storage extends AddressBookStorage, UserPrefsStorage {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" void saveUserPrefs(UserPrefs userPrefs) throws IOException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location. Subscribes to BackupRequestEvent","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" void handleBackupAddressBook(BackupRequestEvent event) throws IOException;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Saves the current version of the Address Book to the hard disk.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Creates the data file if it is missing.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Raises {@link DataSavingExceptionEvent} if there was an error during saving.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" void handleAddressBookChangedEvent(AddressBookChangedEvent abce);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"-":38}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" public void handleBackupAddressBook(BackupRequestEvent event) throws IOException {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyAddressBook addressBook \u003d event.getModel().getAddressBook();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" String args \u003d event.getArgs();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, args);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":11,"jeffreygohkw":8,"-":91}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedIndex.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlValue;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * JAXB-friendly adapted version of the Index.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedIndex {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" @XmlValue","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private int index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedIndex.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex() {}","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Converts a given Index into this class for JAXB use.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex(Index source) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d source.getZeroBased();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted tag object into an Index object.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints\\","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public Index toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return Index.fromZeroBased(index);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private String name;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private String phone;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private String email;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String address;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" private String remark;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private String avatar;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().value;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d source.getAvatar().value;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().getIsPrivate();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().getIsPrivate();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().getIsPrivate();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().getIsPrivate();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().getIsPrivate();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tags);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":71,"wangyiming1019":3,"-":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private String name;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private String description;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private String deadline;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private String priority;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String state;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedIndex\u003e assignees \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private String address;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.toString(source.getPriority().value);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" address \u003d source.getTaskAddress().taskAddress;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assignees \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (Index i : source.getAssignees().getList()) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assignees.add(new XmlAdaptedIndex(i));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" final TaskAddress address \u003d new TaskAddress(this.address);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cIndex\u003e assigneeIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" for (XmlAdaptedIndex index : assignees) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assigneeIndexes.add(index.toModelType());","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" final Assignees assignees \u003d new Assignees(assigneeIndexes);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, assignees, state, address);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a custom save file name","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.info(filePath);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":12,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":19,"-":73}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_PREFIX \u003d \"https://www.google.com.sg/maps/dir/?api\u003d1\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_SUFFIX \u003d \"/\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private WebView browser;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public BrowserPanel() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" loadDefaultPage();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().value.replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s address if their address is not private","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Loads Google Maps with directions on how to go from one location to another","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * @param fromLocation The location we want to start from","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * @param toLocation The location we want to reach","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDirectionsPage(String fromLocation, String toLocation) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" public void loadPage(String url) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" * Loads a default HTML file with a background that matches the general theme.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void loadDefaultPage() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" loadPage(defaultPage.toExternalForm());","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Frees resources allocated to the browser.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" public void freeResources() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" browser \u003d null;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" loadDirectionsPage(event.getFromLocation().toString(), event.getToLocation().toString());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":68,"Esilocke":1,"-":65}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Stage primaryStage;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private ViewTaskPanel viewTaskPanel;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private ViewPersonPanel viewPersonPanel;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" // Set dependencies","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" // Configure the UI","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" setIcon(ICON);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" setWindowMinSize();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" setWindowDefaultTheme(prefs);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" setAccelerators();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" return primaryStage;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" * the TextInputControl(s).","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" event.consume();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window.","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" void fillInnerParts() {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" browserPanel \u003d new BrowserPanel();","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" viewTaskPanel \u003d new ViewTaskPanel();","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" viewPersonPanel \u003d new ViewPersonPanel();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" void hide() {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" primaryStage.hide();","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Sets the given image as the icon of the main window.","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" private void setIcon(String iconSource) {","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences.","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default theme based on user preferences.","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultTheme(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(prefs.getTheme());","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" private void setWindowMinSize() {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" primaryStage.setMinWidth(MIN_WIDTH);","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" return getRoot().getStylesheets().get(1);","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window.","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command for menu item","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command for menu item","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling decrease in font size\");","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling reset in font size\");","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" * Opens the help window.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" public void handleHelp() {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" helpWindow.show();","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" void show() {","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" primaryStage.show();","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpenRequestEvent(OpenRequestEvent event) throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" handleOpen();","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAsRequestEvent(SaveAsRequestEvent event) throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" handleSaveAs();","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the existing theme to the input theme","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" public void handleChangeTheme(String theme) {","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(theme);","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" private void handleExit() {","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" return this.personListPanel;","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":" void releaseResources() {","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" browserPanel.freeResources();","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" handleHelp();","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewTaskPanel.getRoot());","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewPersonPanel.getRoot());","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" private void handleChangeThemeEvent(ChangeThemeRequestEvent event) {","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" handleChangeTheme(event.getStyleSheet());","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":172,"Esilocke":35,"-":212}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.ImageView;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" initFavourite(person);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" person.favouriteProperty().addListener((observable, oldValue, newValue) -\u003e initFavourite(person));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * display the heart for favourite person","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private void initFavourite(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" boolean favouriteStatus \u003d person.getFavourite();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Label favouriteLabel \u003d new Label();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" Image starFilled \u003d new Image(getClass().getResource(\"/images/heart.png\").toExternalForm());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" if (favouriteStatus) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setGraphic(new ImageView(starFilled));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setStyle(\"-fx-background-color: transparent; -fx-border-color: transparent\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" cardPane.getChildren().add(favouriteLabel);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @param tag","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" * @return","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" * @param person","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" });","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" return name;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" return phone;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" return address;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" return email;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" //author","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":67,"Esilocke":2,"wangyiming1019":52,"-":84}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Panel containing the list of persons.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // Set new font size","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New person font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for person cards","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * @param event","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" private void handlePersonCardChangeFontSizeEvent (ChangeFontSizeEvent event) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" case 0:","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" case 1:","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" case 2:","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" * Listens for change of font size events","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" * @param event","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" setText(null);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":92,"jeffreygohkw":7,"Esilocke":14,"-":86}},{"path":"src/main/java/seedu/address/ui/StatusBarFooter.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.time.Clock;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.controlsfx.control.StatusBar;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A ui for the status bar that is displayed at the footer of the application.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class StatusBarFooter extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_INITIAL \u003d \"Not updated yet in this session\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_UPDATED \u003d \"Last Updated: %s\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Used to generate time stamps.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * TODO: change clock to an instance variable.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * We leave it as a static variable because manual dependency injection","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * will require passing down the clock reference all the way from MainApp,","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * but it should be easier once we have factories/DI frameworks.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static Clock clock \u003d Clock.systemDefaultZone();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StatusBarFooter.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"StatusBarFooter.fxml\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private StatusBar syncStatus;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private StatusBar totalPersons;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private StatusBar saveLocationStatus;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public StatusBarFooter(String saveLocation, int initialTotalPersons) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" setSyncStatus(SYNC_STATUS_INITIAL);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" setSaveLocation(\"./\" + saveLocation);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" setTotalPersons(initialTotalPersons);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the clock used to determine the current time.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static void setClock(Clock clock) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" StatusBarFooter.clock \u003d clock;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Returns the clock currently in use.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static Clock getClock() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return clock;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void setSaveLocation(String location) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.saveLocationStatus.setText(location));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" private void setSyncStatus(String status) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.syncStatus.setText(status));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent abce) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" long now \u003d clock.millis();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" String lastUpdated \u003d new Date(now).toString();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(abce, \"Setting last updated status to \" + lastUpdated));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" setSyncStatus(String.format(SYNC_STATUS_UPDATED, lastUpdated));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" this.setTotalPersons(abce.data.getPersonList().size());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" private void setTotalPersons(int totalPersons) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.totalPersons.setText(totalPersons + \" person(s) listed\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":9,"-":79}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private Label taskAddress;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" taskAddress.textProperty().bind(Bindings.convert(task.taskAddressProperty()));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" taskAddress.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" assignCount.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" state.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof TaskCard)) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" TaskCard card \u003d (TaskCard) other;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 task.equals(card.task);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return taskName;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return description;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return deadline;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" return priority;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public Label getTaskAddress() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":47,"jeffreygohkw":4,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map(","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set new font size","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New task font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for task cards","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" * @param event","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" private void handleTaskCardChangeFontSizeEvent (ChangeFontSizeEvent event) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" case 0:","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" case 1:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" case 2:","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestTaskEvent(JumpToListRequestTaskEvent event) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in task list view\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" setText(null);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":1,"Esilocke":114}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private static UserPrefs prefs;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" //Set the application icon.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" prefs.setTheme(mainWindow.getTheme());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" mainWindow.hide();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" String contentText) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" alert.getDialogPane().getStylesheets().add(String.format(\"view/\", prefs.getTheme()));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setTitle(title);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" alert.showAndWait();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" System.exit(1);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" event.exception);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"-":118}},{"path":"src/main/java/seedu/address/ui/ViewPersonPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.Random;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.ImageView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.VBox;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Contains the details of a person.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewPersonPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewPersonPanel.fxml\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" * Preset values for random selection later.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private enum Colours {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private static Random randomNumber \u003d new Random();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private VBox personPanel;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private Label name;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" private Label address;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private ImageView avatarImage;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Label email;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel(ReadOnlyPerson person, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" initializeAvatar();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private void initializeWithPerson(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" //author charlesgoh","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" * Sets avatar to a URL or filepath and falls back to the placeholder avatar if specified path fits in","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * neither categories","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" private void initializeAvatar() {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String avatarPath \u003d person.getAvatar().value;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to set avatar to image at specified URL or filepath\");","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" Image newImage \u003d new Image(avatarPath);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(newImage);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException ex) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" logger.warning(\"Saved path is not a valid filepath or URL path. Setting avatar to placeholder\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" Image imagePlaceholder \u003d new Image(\"file:docs/images/Avatar.png\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(imagePlaceholder);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof ViewPersonPanel)) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" ViewPersonPanel card \u003d (ViewPersonPanel) other;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" return person.equals(card.person);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" public Label getName() {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return name;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public Label getPhone() {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return phone;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" public Label getAddress() {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" return address;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public Label getRemark() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" return remark;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public Label getEmail() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" return email;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.person \u003d event.getNewSelection().person;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":28,"Esilocke":155}},{"path":"src/main/java/seedu/address/ui/ViewTaskPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Contains details of a Task.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class ViewTaskPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewTaskPanel.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Label description;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Label priority;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Label state;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyTask task;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (task !\u003d null) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(task);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private void initializeWithTask(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(event.getNewSelection().task);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":67}},{"path":"src/test/data/ManualTesting/[W09-B2][Address++]TestScript.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++ - Test Script","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":":experimental:","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Getting Started","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"Ensure that you have the [W09-B2][Address++].jar file and the [W09-B2][Address++]SampleData.xml available on your computer and a working internet connection.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Importing the test data","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":". Launch [W09-B2][Address++].jar.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":". On initial launch, it should contain sample data of 6 different persons and 0 tasks.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":". Type `open` to open a pop up window.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":". Navigate to the location of the [W09-B2][Address++]SampleData.xml file and click Open to open it.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":". The sample data containing 20 different persons and 7 different tasks should be loaded.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":". You are now ready to begin testing.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d User Interface","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"* The Menu on the top of the screen contains 3 buttons: `File`, `Help` and `Font Size`.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"* Below the menu is the command line, you can type your commands in here.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"* The box below the command line will show feedback when you type in commands, such as if the command is successful or if you have typed an erroneous command.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"* The leftmost panel contains the list of persons in the address book.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* The middle panel contains the list of tasks in the address book.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"* The rightmost panel contains either the details of the selected task or person, or the in-application browser.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"* The bottom bar contains miscellaneous information about the address book, such as the file where the save data will be stored and the number of persons in the address book.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"Unless explicitly stated, each test section for each command is assumed to be carried out continuously. +","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"This means that you *should carry out the tests in the given order*. +","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"Each test section is carried out independently. This means that you are recommended to `undo` to restore the address book after each test section.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d HelpCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"*Opening the help window*","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"help","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"The User Guide appears in a separate window.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"Opened help window.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddPersonCommand","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"*Adding a person with all details*","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"add n/Svea Lisenhower p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"A person named Svea Lisenhower, with the details as stated above is added to the address book at index 21. +","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"New person added: +","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"Svea Lisenhower Phone: 98009621 Email: svea_li@example.com Address: Jurong West Street 65 Blk 667A Remark: Russian Exchange Student Avatar: https://example.com/image.png Tags:","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing compulsory details*","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"add p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"add: Adds a person to the address book. Parameters: n/NAME [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]... +","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"Example: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 r/Sells sea shells on the sea shore v/avatar-filepath.pngt/friends t/owesMoney","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing optional details*","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"add n/Kent Seethis","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"A person named Kent Seethis, but with no other details is added to the address book at index 22. +","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"New person added: +","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"Kent Seethis Phone: Email: Address: Remark: Avatar: Tags:","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid phones*","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl p/@","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid emails*","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl e/here","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid tags*","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl t/@","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified tag is invalid.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTaskCommand","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"*Adding a task with all details*","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":"add task/ n/Buy pencils d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"A task named \"Buy pencils\", with a description of \"Buy 4 pencils from Popular\", with a deadline of \"Sat Nov 18 19:00:00 SGT 2017\",","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"a priority of \"Low\", and an address of \"West Point\" is added to the addresss book at index 8 in the task list. +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"New task added: +","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"Buy pencils Description: Buy 4 pencils from Popular Deadline: Sat Nov 18 19:00:00 SGT 2017 Priority: Low Address: West Point \u003cIncomplete\u003e +","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing compulsory details*","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"add task/ d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing.","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"add task/: Adds a task to the address book. Parameters: n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS] +","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Example: add task/ n/Buy pencil d/Buy a new pencil from ABS by/10-10-2017 p/4 a/12 Kent Ridge Crescent, 119275","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing optional details*","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"A task with the name \"Create better task\", and no other details present is added to the address book at index 9 in the task list. +","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"New task added:","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"Create better task Description: Deadline: Priority: Address: \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid deadlines*","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task by/AAAAAAAAAAAAA","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified deadline is invalid.","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid priority*","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task p/99999999","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified priority is invalid.","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTagCommand","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":"*Adding tags to persons in Address++*","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 2 t/friends","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":"The first two person in the person list will have the tag `friends` but it will not show in the person panel.","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"add tag/ t/friends","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will have the tag `friends`.","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons if all of them having the input tags*","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 3 t/friends","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since all of them have the tag `friends` already.","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"This tag already exists in all target persons in the current list.","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with invalid index*","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"add tag/ 23 t/friends","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list.","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid.","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with no input tags*","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 t/","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags.","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ListCommand","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":"*List all entries*","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"list","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"All tasks and persons in the address book are listed.","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Listed all entries","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditPersonCommand","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"*Editing a person for all entries*","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Laura Edelweiss p/1111111 a/House of Edelweiss e/laura@example.com r/Heiress to the House of Edelweiss t/Heiress v/https://example.com/validimage2.png","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"The person at index 7 (Elizabeth Edelweiss) is updated and now has new details matching the command.","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":"Edited Person: +","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"Laura Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":"*Editing a person with only 1 entry*","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Elizabath Edelweiss","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":"Only the name of the person at index 7 (Now named Laura Edelweiss) is changed to Elizabeth Edelweiss. All other details remain the same.","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":"Edited Person: +","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":"Elizabath Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":"edit 7 n/","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid.","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"Person names should only contain alphanumeric characters and spaces, and it should not be blank","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"edit 7 p/ppp","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid.","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"edit 7 e/ppp","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid.","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":"edit 7 t/@@@@@@","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid.","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"*Editing a private person*","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"edit 11 n/Unhide me","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person\u0027s name is private.","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"At least one field to be edited must be public.","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid person*","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"edit 19999 n/Unhide me","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid.","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTaskCommand","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"*Editing a task for all entries*","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Paper Castle d/Castle Garde by/9 December 2017 8pm p/1 a/NUS","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The task at index 7 is updated and now has new details matching the command.","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"Edited Task: +","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"Paper Castle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"*Editing a task with only 1 entry*","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Sandcastle","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"Only the name of the task at index 7 (Now named Paper Castle) is changed to Sandcastle. All other details remain the same.","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"Edited Task: +","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"Sandcastle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid.","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"Task names can be in any format, and should not be blank","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 by/AAAAAAAA","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid.","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid.","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 e/ppp","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid.","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid task*","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"edit task/ 19999 n/Tiny, tiny house","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid.","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTagCommand","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag in the address book*","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends goodFriends","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"All instances of \"friends\" tags are replaced with \"goodFriends\" tags (at indexes 1, 3, 10, 11, 12, 17). +","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Replaced tag friends with goodFriends","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"*Renaming a non-existant tag in the address book*","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends nemesis","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"As \"friends\" were renamed to \"goodFriends\", there are no more \"friends\" tags. +","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the tag \"friends\" is not in any of the contacts.","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"No such tag was found in the address book.","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with the exact same name*","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends goodFriends","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the two tag names are exactly the same. +","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"The new name of the tag cannot be the same as the old name.","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ChangePrivacyCommand","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of public fields*","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/true p/true e/true a/true r/true","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as private, and the original data is hidden in the UI.","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: \u003cPrivate Name\u003e Phone: \u003cPrivate Phone\u003e Email: \u003cPrivate Email\u003e Address: \u003cPrivate Address\u003e Remark: \u003cPrivate Remark\u003e Avatar: Tags: [project]","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 n/false","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s name, being originally public, remains public.","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of private fields*","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/false p/false e/false a/false r/false","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as public, revealing all the original data in the UI.","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 a/true","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s address, being originally private, remains private.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of empty fields*","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/true","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to private.","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: \u003cPrivate Remark\u003e Avatar: Tags: [GEQ2000]","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/false","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to public, but since it is empty, it does not display any data.","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d PrivacyLevelCommand","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy level*","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"Esilocke"},"content":"privacylevel 1","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"Esilocke"},"content":"All persons are listed with any private data revealed.","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 1.","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"Esilocke"},"content":"privacylevel 3","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"Esilocke"},"content":"Lists all persons except those that have at least one private field.","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 3.","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"Esilocke"},"content":"privacylevel 2","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"Esilocke"},"content":"List all persons. Fields that are private will have their data hidden.","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 2.","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteCommand","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"Esilocke"},"content":"*Setting a person in the Address++ to be the favourite person*","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"Esilocke"},"content":"list +","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"Esilocke"},"content":"favourite 2","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"Esilocke"},"content":"The 2nd person in the Address++ will be favoured and a heart picture will be shown next to his name.","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"Favourited Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person if he has been favoured*","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"list +","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"favourite 1","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"Esilocke"},"content":"An error message will display since the first person in the Address++ has been favoured.","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"Esilocke"},"content":"Person is already favourited.","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person with invalid index*","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"Esilocke"},"content":"favourite 56","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"An error message will display since there is no 56th person in the current list.","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteListCommand","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":"*Listing all favoured persons in the Address++*","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"Esilocke"},"content":"showfavourite","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"List all the favoured persons.","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons.","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"Esilocke"},"content":"*Listing empty list with no favoured person in the Address++*","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"showfavourite","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"Esilocke"},"content":"An empty list but with successful message.","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons.","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindPersonCommand","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":"find plumley","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\", case insensitive, in their name are displayed. +","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"Esilocke"},"content":"2 persons listed!","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"Esilocke"},"content":"find plumley edelweiss","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\" or \"edelweiss\", case insensitive, in their name are displayed. +","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":"4 persons listed!","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindTaskCommand","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":"find task/ on","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\", case insensitive, in their name or description are displayed. +","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"find task/ on stew","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description are displayed. +","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"3 tasks listed!","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with priority search*","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"find task/ on stew p/4","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and have a priority of \"High\" or above are displayed. +","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state search*","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and are currently complete are displayed. +","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state and priority search*","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true p/3","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, with a priority of at least \"medium\", and are currently complete are displayed. +","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d TagListCommand","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"*Listing all the tag in the Address++*","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"showtag","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"Tags contain capital letter will displayed in front. All the tags (with or without capital letter) will be displayed in alphabetical order.","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":"All the tags are here: \u003cGEQ2000\u003e \u003cacquaintance\u003e \u003cclassmates\u003e \u003cenemy\u003e \u003cfamily\u003e \u003cfriends\u003e \u003cneighbours\u003e \u003cproject\u003e \u003csecretive\u003e \u003ctutee\u003e","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":"*Listing empty tag list with no tags in Address++*","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"showtag","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"There is no tag list.","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"There is no tag!","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d FindTagCommand","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with specific tags*","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"find tag/ friends","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"List all the persons who have tag `friends`.","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"6 persons listed!","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"*Finding person in the Address++ without specific tags*","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"find tag/ /friends","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":"List all the persons without tag `friends`.","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"14 persons listed!","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with \"TAGA\" but without \"TAGB\"*","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"find tag/ friends /classmates","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"Persons have tag `friends` but do not have tag `classmates` will be listed.","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"5 persons listed!","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"*Failing to find persons in the Address++ with valid tags*","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"find tag/ fff","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"Although it is a valid tag, there is no person with tag `fff`. Hence, no person will be listed.","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":"0 persons listed!","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeletePersonCommand","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"delete 20","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":"The contact at index 20, Myuria Plumley is deleted from the address book. +","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"Deleted Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"delete 2000","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTaskCommand","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"delete task/ 7","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is deleted from the address book. +","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"Deleted Task: Paper Model for project Description: Paper model of Himeji castle for project. Myucel/Myuria twins in charge Deadline: Wed Dec 13 17:00:00 SGT 2017 Priority: Medium Address: \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"delete task/ 7000","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTagCommand","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"*Deleting tags from persons in the Address++*","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/friends","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"The tag `friends` for the first person will be deleted. The rest tags remain no change.","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"delete tag/ t/friends","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will not have the tag `friends`.","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons if none of them have the input tags*","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/neighbour","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"An error message will display since target persons do not have tag `neighbour`.","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"The target persons do not have input tags.","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with invalid index*","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":"delete tag/ 23 t/friends","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list.","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with no input tags*","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 t/","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags.","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectPersonCommand","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"*Selecting a person*","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"select 19","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"Esilocke"},"content":"The person at index 19, \"Myucel Plumley\" is selected, and her details are listed in the UI panel. +","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"Esilocke"},"content":"Selected Person: 19","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"Esilocke"},"content":"*Selecting a person with an invalid index*","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"Esilocke"},"content":"select 19999","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectTaskCommand","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"Esilocke"},"content":"*Selecting a task*","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"select task/ 7","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is selected and its details are shown in the UI panel. +","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Selected Task: 7","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"*Selecting a task with an invalid index*","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"select task/ 7000","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d LocateCommand","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":"*Locating a person\u0027s address on Google Maps*","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":"locate 1","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and searches for the first person\u0027s address. +","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"Searching for Person at Index: 1","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":"*Failing to locate a person with no address*","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":"locate 2","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":"An error message is printed, as the person at index 2 has no address. +","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":"Person 2 has no Address","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"*Failing to locate a person with a private address*","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"locate 6","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"Esilocke"},"content":"Person 6 has a Private Address","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d NavigateCommand","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Person*","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"navigate fp/1 tp/3","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first person\u0027s address to the third person\u0027s address. +","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 30 Geylang Street 29, #06-40 to Blk 30 Lorong 3 Serangoon Gardens, #07-18","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Task*","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 tt/1","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to the first task\u0027s address. +","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to Blk 45 Aljunied Street 85, #11-31","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Address*","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 ta/NUS","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to NUS. +","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to NUS","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Person*","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tp/3","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the third person\u0027s address. +","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to Blk 30 Lorong 3 Serangoon Gardens, #07-18","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Task*","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tt/4","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the fourth task\u0027s address. +","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to SR-1, COM-1 NUS","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Address*","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 ta/NUS","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to NUS. +","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to NUS","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Person*","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":"navigate fa/NUS tp/3","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NUS to the third person\u0027s address. +","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":"Navigating from NUS to Blk 30 Lorong 3 Serangoon Gardens, #07-18","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Task*","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":"navigate fa/NTU tt/4","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NTU to the fourth task\u0027s address. +","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"Esilocke"},"content":"Navigating from NTU to SR-1, COM-1 NUS","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Address*","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"Esilocke"},"content":"navigate fa/SMU ta/NUS","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from SMU to NUS. +","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":"Navigating from SMU to NUS","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has a private address*","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"Esilocke"},"content":"navigate fp/6 ta/Changi Airport","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"Esilocke"},"content":"Address of the Person at index 6 is private.","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has no address*","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"Esilocke"},"content":"navigate fp/8 ta/Changi Airport","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 8 has no address. +","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"Person at index 8 does not have an address.","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a task has no address*","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"navigate ft/2 ta/Changi Airport","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the task at index 2 has no address. +","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"Task at index 2 does not have an address.","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"navigate","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"Esilocke"},"content":"navigate: Get directions from one address to another. +","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"Esilocke"},"content":"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three) AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three) +","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"Esilocke"},"content":"Example: navigate fp/2 ta/University Town","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"*Error when no address after a fa/ or ta/ prefix is entered*","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"navigate fa/ tp/1","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"Esilocke"},"content":"Location can take any value, and it should not be blank","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"*Error when no integer after a fp/, tp/, ft/ or tt/ prefix is entered*","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"Esilocke"},"content":"navigate ft/ tp/1","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"Index is not a non-zero unsigned integer.","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetCompleteCommand","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as complete*","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":"setcomplete 3","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"Esilocke"},"content":"The task at index 3, \"Visit David\u0027s house\" is marked as completed. +","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"Marked Task as completed: Visit David\u0027s house Description: Visit to David Li\u0027s house next Saturday Deadline: Sat Nov 18 12:00:00 SGT 2017 Priority: Low Address: Blk 436 Serangoon Gardens Street 26, #16-43 \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"Esilocke"},"content":"*Marking an already complete task as complete*","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"Esilocke"},"content":"setcomplete 3","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already complete +","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"The specified task is already completed","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"Esilocke"},"content":"setcomplete 7000","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetInompleteCommand","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as incomplete*","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"Esilocke"},"content":"setincomplete 1","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"The task at index 1, \"Tuition\" is marked as incomplete. +","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"Esilocke"},"content":"Marked Task as incomplete: Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"Esilocke"},"content":"*Marking an already incomplete task as incomplete*","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"setincomplete 1","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already incomplete +","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"Esilocke"},"content":"The specified task is already incomplete","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"Esilocke"},"content":"setincomplete 7000","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1469,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1470,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AssignCommand","isFullCredit":true},{"lineNumber":1471,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1472,"author":{"gitId":"Esilocke"},"content":"*Assigning 1 contact to a task*","isFullCredit":true},{"lineNumber":1473,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1474,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1475,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1476,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1","isFullCredit":true},{"lineNumber":1477,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1478,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1479,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Myucel Plumley is assigned to the first task, Tuition. The task now has 4 people assigned to it instead of 3. +","isFullCredit":true},{"lineNumber":1480,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1481,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1482,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1483,"author":{"gitId":"Esilocke"},"content":"Assigned 1 people to +","isFullCredit":true},{"lineNumber":1484,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1485,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1486,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1487,"author":{"gitId":"Esilocke"},"content":"*Assigning multiple contacts to a task*","isFullCredit":true},{"lineNumber":1488,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1489,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1490,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1491,"author":{"gitId":"Esilocke"},"content":"assign 18 20 to/1","isFullCredit":true},{"lineNumber":1492,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1493,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1494,"author":{"gitId":"Esilocke"},"content":"The contacts at index 18 and 20, Myuria Plumley and Clarissa Liselotte are assigned to the first task, Tuition. The task now has 6 people assigned to it instead of 4. +","isFullCredit":true},{"lineNumber":1495,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1496,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1497,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1498,"author":{"gitId":"Esilocke"},"content":"Assigned 2 people to +","isFullCredit":true},{"lineNumber":1499,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1500,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1501,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1502,"author":{"gitId":"Esilocke"},"content":"*Assigning contacts who are already assigned to a task*","isFullCredit":true},{"lineNumber":1503,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1504,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1505,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1506,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1","isFullCredit":true},{"lineNumber":1507,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1508,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1509,"author":{"gitId":"Esilocke"},"content":"Myucel Plumley was already assigned to the task Tuition. An error message is printed out as she is already assigned to the task. +","isFullCredit":true},{"lineNumber":1510,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1511,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1512,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1513,"author":{"gitId":"Esilocke"},"content":"All the specified persons are already assigned to this task","isFullCredit":true},{"lineNumber":1514,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1515,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1516,"author":{"gitId":"Esilocke"},"content":"*Assigning no contacts to a task*","isFullCredit":true},{"lineNumber":1517,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1518,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1519,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1520,"author":{"gitId":"Esilocke"},"content":"assign to/1","isFullCredit":true},{"lineNumber":1521,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1522,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1523,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified.","isFullCredit":true},{"lineNumber":1524,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1525,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1526,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1527,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified","isFullCredit":true},{"lineNumber":1528,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1529,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1530,"author":{"gitId":"Esilocke"},"content":"*Assigning to a task with an invalid index*","isFullCredit":true},{"lineNumber":1531,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1532,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1533,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1534,"author":{"gitId":"Esilocke"},"content":"assign 5 to/7000","isFullCredit":true},{"lineNumber":1535,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1536,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1537,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1538,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1539,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1540,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1541,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1542,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1543,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DismissCommand","isFullCredit":true},{"lineNumber":1545,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1546,"author":{"gitId":"Esilocke"},"content":"*Dismissing 1 contact from a task*","isFullCredit":true},{"lineNumber":1547,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1548,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1549,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1550,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1","isFullCredit":true},{"lineNumber":1551,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1552,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1553,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Alex Yeoh is assigned to the first task, Tuition. The task now has 2 people assigned to it instead of 3. +","isFullCredit":true},{"lineNumber":1554,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1555,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1556,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1557,"author":{"gitId":"Esilocke"},"content":"Dismissed 1 people from task +","isFullCredit":true},{"lineNumber":1558,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1559,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1560,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1561,"author":{"gitId":"Esilocke"},"content":"*Dismissing multiple contacts from a task*","isFullCredit":true},{"lineNumber":1562,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1563,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1564,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1565,"author":{"gitId":"Esilocke"},"content":"dismiss 6 8 from/1","isFullCredit":true},{"lineNumber":1566,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1567,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1568,"author":{"gitId":"Esilocke"},"content":"The contacts at index 6 and 8, David Ng and Ima Hidearu are assigned to the first task, Tuition. The task now has 0 people assigned to it instead of 2. +","isFullCredit":true},{"lineNumber":1569,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1570,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1571,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1572,"author":{"gitId":"Esilocke"},"content":"Dismissed 2 people from task +","isFullCredit":true},{"lineNumber":1573,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1574,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1575,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1576,"author":{"gitId":"Esilocke"},"content":"*Dismissing contacts who are already assigned from a task*","isFullCredit":true},{"lineNumber":1577,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1578,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1579,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1580,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1","isFullCredit":true},{"lineNumber":1581,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1582,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1583,"author":{"gitId":"Esilocke"},"content":"There are no contacts assigned to the task Tuition.","isFullCredit":true},{"lineNumber":1584,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as none of the specified contacts were assigned to the task.","isFullCredit":true},{"lineNumber":1585,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1586,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1587,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1588,"author":{"gitId":"Esilocke"},"content":"None of the specified persons are assigned to this task","isFullCredit":true},{"lineNumber":1589,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1590,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1591,"author":{"gitId":"Esilocke"},"content":"*Dismissing no contacts from a task*","isFullCredit":true},{"lineNumber":1592,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1593,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1594,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1595,"author":{"gitId":"Esilocke"},"content":"dismiss from/1","isFullCredit":true},{"lineNumber":1596,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1597,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1598,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified.","isFullCredit":true},{"lineNumber":1599,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1600,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1601,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1602,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified","isFullCredit":true},{"lineNumber":1603,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1604,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1605,"author":{"gitId":"Esilocke"},"content":"*Dismissing from a task with an invalid index*","isFullCredit":true},{"lineNumber":1606,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1607,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1608,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1609,"author":{"gitId":"Esilocke"},"content":"dismiss 5 from/7000","isFullCredit":true},{"lineNumber":1610,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1611,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1612,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1613,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1614,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1615,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1616,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1617,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1618,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1619,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ViewAssignCommand","isFullCredit":true},{"lineNumber":1620,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1621,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with no persons assigned to it*","isFullCredit":true},{"lineNumber":1622,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1623,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1624,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1625,"author":{"gitId":"Esilocke"},"content":"viewassign 2","isFullCredit":true},{"lineNumber":1626,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1627,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1628,"author":{"gitId":"Esilocke"},"content":"No contacts are listed +","isFullCredit":true},{"lineNumber":1629,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1630,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1631,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1632,"author":{"gitId":"-"},"content":"0 persons listed!","isFullCredit":true},{"lineNumber":1633,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1634,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1635,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with some persons assigned to it*","isFullCredit":true},{"lineNumber":1636,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1637,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1638,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1639,"author":{"gitId":"Esilocke"},"content":"viewassign 1","isFullCredit":true},{"lineNumber":1640,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1641,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1642,"author":{"gitId":"Esilocke"},"content":"3 contacts are listed, Alex Yeoh, David Ng, Ima Hidearu +","isFullCredit":true},{"lineNumber":1643,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1644,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1645,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1646,"author":{"gitId":"Esilocke"},"content":"3 persons listed!","isFullCredit":true},{"lineNumber":1647,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1648,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1649,"author":{"gitId":"Esilocke"},"content":"*Viewing from a task with an invalid index*","isFullCredit":true},{"lineNumber":1650,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1651,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1652,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1653,"author":{"gitId":"Esilocke"},"content":"viewassign 99999","isFullCredit":true},{"lineNumber":1654,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1655,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1656,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1657,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1658,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1659,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1660,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1661,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1662,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1663,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ThemeCommand","isFullCredit":true},{"lineNumber":1664,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1665,"author":{"gitId":"Esilocke"},"content":"*Changing the theme of the address book*","isFullCredit":true},{"lineNumber":1666,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1667,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1668,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1669,"author":{"gitId":"Esilocke"},"content":"theme light","isFullCredit":true},{"lineNumber":1670,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1671,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1672,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a bright colour. +","isFullCredit":true},{"lineNumber":1673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1674,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1675,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1676,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: light","isFullCredit":true},{"lineNumber":1677,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1678,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1679,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1680,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1681,"author":{"gitId":"Esilocke"},"content":"theme dark","isFullCredit":true},{"lineNumber":1682,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1683,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1684,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a dark colour.+","isFullCredit":true},{"lineNumber":1685,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1686,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1687,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: dark","isFullCredit":true},{"lineNumber":1688,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1689,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1690,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*","isFullCredit":true},{"lineNumber":1691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1692,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1693,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1694,"author":{"gitId":"Esilocke"},"content":"theme","isFullCredit":true},{"lineNumber":1695,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1696,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1697,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1698,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1699,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1700,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1701,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":1702,"author":{"gitId":"Esilocke"},"content":"theme: Sets the theme based on the specified style. +","isFullCredit":true},{"lineNumber":1703,"author":{"gitId":"Esilocke"},"content":"Parameters: STYLE +","isFullCredit":true},{"lineNumber":1704,"author":{"gitId":"Esilocke"},"content":"Example: theme dark","isFullCredit":true},{"lineNumber":1705,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1706,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1707,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d HistoryCommand","isFullCredit":true},{"lineNumber":1708,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1709,"author":{"gitId":"Esilocke"},"content":"*Lists all commands done in reverser chronological order*","isFullCredit":true},{"lineNumber":1710,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1711,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1712,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1713,"author":{"gitId":"Esilocke"},"content":"notacommand +","isFullCredit":true},{"lineNumber":1714,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +","isFullCredit":true},{"lineNumber":1715,"author":{"gitId":"Esilocke"},"content":"history","isFullCredit":true},{"lineNumber":1716,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1717,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1718,"author":{"gitId":"Esilocke"},"content":"The two previous commands are listed in the box below the command line in reverse chronological order from top to bottom. +","isFullCredit":true},{"lineNumber":1719,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1720,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1721,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1722,"author":{"gitId":"Esilocke"},"content":"Entered commands (from most recent to earliest): +","isFullCredit":true},{"lineNumber":1723,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +","isFullCredit":true},{"lineNumber":1724,"author":{"gitId":"Esilocke"},"content":"notacommand","isFullCredit":true},{"lineNumber":1725,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1726,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1727,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d UndoCommand","isFullCredit":true},{"lineNumber":1728,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1729,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1730,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1731,"author":{"gitId":"Esilocke"},"content":"delete 1 +","isFullCredit":true},{"lineNumber":1732,"author":{"gitId":"Esilocke"},"content":"undo","isFullCredit":true},{"lineNumber":1733,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1734,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1735,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo. +","isFullCredit":true},{"lineNumber":1736,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1737,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1738,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1739,"author":{"gitId":"Esilocke"},"content":"Undo success!","isFullCredit":true},{"lineNumber":1740,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1741,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1742,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1743,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1744,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1745,"author":{"gitId":"Esilocke"},"content":"add n/Reed Richards p/94444444 e/reed@futurefoundation.com a/Baxter Building r/Loves to stretch +","isFullCredit":true},{"lineNumber":1746,"author":{"gitId":"Esilocke"},"content":"undo","isFullCredit":true},{"lineNumber":1747,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1748,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1749,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo.","isFullCredit":true},{"lineNumber":1750,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1751,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1752,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1753,"author":{"gitId":"Esilocke"},"content":"Undo success!","isFullCredit":true},{"lineNumber":1754,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1755,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1756,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UnfavouriteCommand","isFullCredit":true},{"lineNumber":1757,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1758,"author":{"gitId":"-"},"content":"*Setting a favoured person in the Address++ to be the unfavoured person*","isFullCredit":true},{"lineNumber":1759,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1760,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1761,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1762,"author":{"gitId":"-"},"content":"list +","isFullCredit":true},{"lineNumber":1763,"author":{"gitId":"-"},"content":"unfavourite 1","isFullCredit":true},{"lineNumber":1764,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1765,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1766,"author":{"gitId":"-"},"content":"The 1st person in the Address++ will be unfavoured and the heart picture will disappear.","isFullCredit":true},{"lineNumber":1767,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1768,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1769,"author":{"gitId":"-"},"content":"Unfavourited Person: Alex Yeoh Phone: 87438807 Email: alexyeoh@example.com Address: Blk 30 Geylang Street 29, #06-40 Remark: Cheerful lad Avatar: Tags: [friends]","isFullCredit":true},{"lineNumber":1770,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1771,"author":{"gitId":"-"},"content":"*Failing to set a unfavored person if he has not been favoured*","isFullCredit":true},{"lineNumber":1772,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1773,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1774,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1775,"author":{"gitId":"-"},"content":"list +","isFullCredit":true},{"lineNumber":1776,"author":{"gitId":"-"},"content":"unfavourite 2","isFullCredit":true},{"lineNumber":1777,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1778,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1779,"author":{"gitId":"-"},"content":"An error message will display since the second person in the Address++ has bot been favoured.","isFullCredit":true},{"lineNumber":1780,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1782,"author":{"gitId":"-"},"content":"Person is not favourited yet.","isFullCredit":true},{"lineNumber":1783,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1784,"author":{"gitId":"-"},"content":"*Failing to set a unfavoured person with invalid index*","isFullCredit":true},{"lineNumber":1785,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1786,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1787,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1788,"author":{"gitId":"-"},"content":"unfavourite 56","isFullCredit":true},{"lineNumber":1789,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1790,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1791,"author":{"gitId":"-"},"content":"An error message will display since there is no 56th person in the current list.","isFullCredit":true},{"lineNumber":1792,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1793,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1794,"author":{"gitId":"-"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":1795,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1796,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d RedoCommand","isFullCredit":true},{"lineNumber":1797,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1798,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1799,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1800,"author":{"gitId":"Esilocke"},"content":"delete 1 +","isFullCredit":true},{"lineNumber":1801,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1802,"author":{"gitId":"Esilocke"},"content":"redo","isFullCredit":true},{"lineNumber":1803,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo and deleted again after a redo. +","isFullCredit":true},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1809,"author":{"gitId":"Esilocke"},"content":"Redo success!","isFullCredit":true},{"lineNumber":1810,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1811,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1812,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1813,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1814,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1815,"author":{"gitId":"Esilocke"},"content":"add n/Peter Parker p/92241783 e/ceo@parkerindustries.com a/New York City r/Top 10 smartest people in the world +","isFullCredit":true},{"lineNumber":1816,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1817,"author":{"gitId":"Esilocke"},"content":"redo","isFullCredit":true},{"lineNumber":1818,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1819,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo and added again with a redo.","isFullCredit":true},{"lineNumber":1821,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1822,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1823,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1824,"author":{"gitId":"Esilocke"},"content":"Redo success!","isFullCredit":true},{"lineNumber":1825,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1826,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1827,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1828,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book to its original state before continuing with testing.","isFullCredit":true},{"lineNumber":1829,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1830,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ClearCommand","isFullCredit":true},{"lineNumber":1831,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1832,"author":{"gitId":"Esilocke"},"content":"*Clearing all entries*","isFullCredit":true},{"lineNumber":1833,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1834,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1835,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1836,"author":{"gitId":"Esilocke"},"content":"clear","isFullCredit":true},{"lineNumber":1837,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1838,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1839,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +","isFullCredit":true},{"lineNumber":1840,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1841,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1843,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!","isFullCredit":true},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1845,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1846,"author":{"gitId":"Esilocke"},"content":"*Clearing persons only*","isFullCredit":true},{"lineNumber":1847,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1848,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1849,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1850,"author":{"gitId":"Esilocke"},"content":"clear person/","isFullCredit":true},{"lineNumber":1851,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1853,"author":{"gitId":"Esilocke"},"content":"All persons vanish from the leftmost column, leaving them empty. +","isFullCredit":true},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1855,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1856,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1857,"author":{"gitId":"Esilocke"},"content":"All contacts have been cleared!","isFullCredit":true},{"lineNumber":1858,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1859,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1860,"author":{"gitId":"Esilocke"},"content":"*Clearing tasks only*","isFullCredit":true},{"lineNumber":1861,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1862,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1863,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1864,"author":{"gitId":"Esilocke"},"content":"clear task/","isFullCredit":true},{"lineNumber":1865,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1866,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1867,"author":{"gitId":"Esilocke"},"content":"All tasks vanish from the middle columns, leaving them empty. +","isFullCredit":true},{"lineNumber":1868,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1869,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1870,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1871,"author":{"gitId":"Esilocke"},"content":"All tasks have been cleared!","isFullCredit":true},{"lineNumber":1872,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1873,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1874,"author":{"gitId":"Esilocke"},"content":"*Both person and task specified*","isFullCredit":true},{"lineNumber":1875,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1876,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1877,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1878,"author":{"gitId":"Esilocke"},"content":"clear task/ person/ task/ task/ person/","isFullCredit":true},{"lineNumber":1879,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1880,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1881,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +","isFullCredit":true},{"lineNumber":1882,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1883,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1884,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1885,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!","isFullCredit":true},{"lineNumber":1886,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1887,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1888,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1889,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book before continuing with testing.","isFullCredit":true},{"lineNumber":1890,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1891,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d OpenCommand and SaveAsCommand","isFullCredit":true},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"*Saves data as a new .xml file and switches to that file*","isFullCredit":true},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"save +","isFullCredit":true},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"Save the new save file as test.xml. +","isFullCredit":true},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Click save.","isFullCredit":true},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the file followed by test.xml. +","isFullCredit":true},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Successfully saved file.","isFullCredit":true},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"*Opens and switches to a new .xml save file*","isFullCredit":true},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"Following the above save command:","isFullCredit":true},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":"clear","isFullCredit":true},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"To differentiate the test.xml with the [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"The address book contains no more persons or tasks.","isFullCredit":true},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"open +","isFullCredit":true},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml and select [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":"Click open.","isFullCredit":true},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the [W09-B2][Address++]SampleData.xml followed by the name [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"The original data is restored in the address book. +","isFullCredit":true},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":"Successfully opened file.","isFullCredit":true},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ExitCommand","isFullCredit":true},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"*Exits Address++*","isFullCredit":true},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":"Input Command:","isFullCredit":true},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"exit","isFullCredit":true},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"Expected Result: Address++ closes.","isFullCredit":true},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1957,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":1958,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1959,"author":{"gitId":"charlesgoh"},"content":"*Sorts persons by name in ascending order*","isFullCredit":true},{"lineNumber":1960,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1961,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1962,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1963,"author":{"gitId":"charlesgoh"},"content":"sort person name asc","isFullCredit":true},{"lineNumber":1964,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1965,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1966,"author":{"gitId":"charlesgoh"},"content":"Person list panel will sort all persons by their names in ascending order +","isFullCredit":true},{"lineNumber":1967,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1968,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1969,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1970,"author":{"gitId":"charlesgoh"},"content":"All persons in address book successfully sorted","isFullCredit":true},{"lineNumber":1971,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1972,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1973,"author":{"gitId":"charlesgoh"},"content":"*Sorts tasks by priority in descending order*","isFullCredit":true},{"lineNumber":1974,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1975,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1976,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1977,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +","isFullCredit":true},{"lineNumber":1978,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1979,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1980,"author":{"gitId":"charlesgoh"},"content":"Task list panel will sort all tasks by their priorities in descending order +","isFullCredit":true},{"lineNumber":1981,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1982,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1983,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1984,"author":{"gitId":"charlesgoh"},"content":"All tasks in address book successfully sorted","isFullCredit":true},{"lineNumber":1985,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1986,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1987,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*","isFullCredit":true},{"lineNumber":1988,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1989,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1990,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1991,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +","isFullCredit":true},{"lineNumber":1992,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1993,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1994,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +","isFullCredit":true},{"lineNumber":1995,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1996,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1997,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1998,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":1999,"author":{"gitId":"charlesgoh"},"content":"sort: Sorts all persons or all tasks by chosen field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive +","isFullCredit":true},{"lineNumber":2000,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [LIST] [FIELD] [ORDER] +","isFullCredit":true},{"lineNumber":2001,"author":{"gitId":"charlesgoh"},"content":"Example: sort person email desc +","isFullCredit":true},{"lineNumber":2002,"author":{"gitId":"charlesgoh"},"content":"Example 2: sort task deadline desc +","isFullCredit":true},{"lineNumber":2003,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2004,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2005,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":2006,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2007,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2008,"author":{"gitId":"charlesgoh"},"content":"Currently supports mac relative file paths. No guarantee of support for other operating system.","isFullCredit":true},{"lineNumber":2009,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2010,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*","isFullCredit":true},{"lineNumber":2011,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2012,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2013,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2014,"author":{"gitId":"charlesgoh"},"content":"backup +","isFullCredit":true},{"lineNumber":2015,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2016,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2017,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +","isFullCredit":true},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":2022,"author":{"gitId":"charlesgoh"},"content":"backup: Backs up data to a user input location field [FILEPATH] +","isFullCredit":true},{"lineNumber":2023,"author":{"gitId":"charlesgoh"},"content":"Parameter: KEYWORD [FILEPATH] +","isFullCredit":true},{"lineNumber":2024,"author":{"gitId":"charlesgoh"},"content":"Example: backupMyBackUpFile +","isFullCredit":true},{"lineNumber":2025,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2026,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2027,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to same file path*","isFullCredit":true},{"lineNumber":2028,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2029,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2030,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2031,"author":{"gitId":"charlesgoh"},"content":"backup filename.xml","isFullCredit":true},{"lineNumber":2032,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the same directory as the jar file +","isFullCredit":true},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully.","isFullCredit":true},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2040,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2041,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to relative file path*","isFullCredit":true},{"lineNumber":2042,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2043,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2044,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2045,"author":{"gitId":"charlesgoh"},"content":"backup ./../filename.xml +","isFullCredit":true},{"lineNumber":2046,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2047,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2048,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the directory preceding one level above the jar file +","isFullCredit":true},{"lineNumber":2049,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2050,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2051,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2052,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully.","isFullCredit":true},{"lineNumber":2053,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2054,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2055,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Change Password Command","isFullCredit":true},{"lineNumber":2056,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2057,"author":{"gitId":"charlesgoh"},"content":"*Invalid Command Format Input*","isFullCredit":true},{"lineNumber":2058,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2059,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2060,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2061,"author":{"gitId":"charlesgoh"},"content":"changepassword +","isFullCredit":true},{"lineNumber":2062,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2063,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2064,"author":{"gitId":"charlesgoh"},"content":"Invalid command format error message with usage message +","isFullCredit":true},{"lineNumber":2065,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2066,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2067,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2068,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":2069,"author":{"gitId":"charlesgoh"},"content":"changepassword: Changes user password. +","isFullCredit":true},{"lineNumber":2070,"author":{"gitId":"charlesgoh"},"content":"pw/PASSWORD np/NEWPASSWORD cfp/CONFIRMPASSWORD +","isFullCredit":true},{"lineNumber":2071,"author":{"gitId":"charlesgoh"},"content":"Example: changepassword pw/password np/mynewpassword111 cfp/mynewpassword111 +","isFullCredit":true},{"lineNumber":2072,"author":{"gitId":"charlesgoh"},"content":"Example 2: cpw pw/password np/mynewpassword111 cfp/mynewpassword111 +","isFullCredit":true},{"lineNumber":2073,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2074,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2075,"author":{"gitId":"charlesgoh"},"content":"*Change Password with valid inputs*","isFullCredit":true},{"lineNumber":2076,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2077,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2078,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2079,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +","isFullCredit":true},{"lineNumber":2080,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2081,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2082,"author":{"gitId":"charlesgoh"},"content":"Application password will change to `newpassword` +","isFullCredit":true},{"lineNumber":2083,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2084,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2085,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2086,"author":{"gitId":"charlesgoh"},"content":"Password changed successfully","isFullCredit":true},{"lineNumber":2087,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2088,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2089,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Password entered*","isFullCredit":true},{"lineNumber":2090,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2091,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2092,"author":{"gitId":"charlesgoh"},"content":"Run this after running the previous command. Otherwise change the password to something incorrect. Default password","isFullCredit":true},{"lineNumber":2093,"author":{"gitId":"charlesgoh"},"content":"is `password`","isFullCredit":true},{"lineNumber":2094,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2095,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2096,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2097,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +","isFullCredit":true},{"lineNumber":2098,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2099,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2100,"author":{"gitId":"charlesgoh"},"content":"Application password will remain as `newpassword` and reject input +","isFullCredit":true},{"lineNumber":2101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2102,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2103,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2104,"author":{"gitId":"charlesgoh"},"content":"Your password is incorrect. Please try again.","isFullCredit":true},{"lineNumber":2105,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2107,"author":{"gitId":"charlesgoh"},"content":"*Old and new passwords are the same*","isFullCredit":true},{"lineNumber":2108,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2109,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2110,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2111,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/newpassword cfp/newpassword +","isFullCredit":true},{"lineNumber":2112,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2113,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2114,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +","isFullCredit":true},{"lineNumber":2115,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2116,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2117,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2118,"author":{"gitId":"charlesgoh"},"content":"New password must be different from your old password","isFullCredit":true},{"lineNumber":2119,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2121,"author":{"gitId":"charlesgoh"},"content":"*New password and confirmation passwords do not match*","isFullCredit":true},{"lineNumber":2122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2123,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2124,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2125,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/evennewerpassword cfp/wutwutWUUUUUT? +","isFullCredit":true},{"lineNumber":2126,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2127,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2128,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +","isFullCredit":true},{"lineNumber":2129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2130,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2131,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2132,"author":{"gitId":"charlesgoh"},"content":"Your new password and confirmation password do not match. Please try again","isFullCredit":true},{"lineNumber":2133,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2135,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock Command","isFullCredit":true},{"lineNumber":2136,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2137,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2138,"author":{"gitId":"charlesgoh"},"content":"The following tests assume that the password has been set to `newpassword` from the above tests. If you opened the application","isFullCredit":true},{"lineNumber":2139,"author":{"gitId":"charlesgoh"},"content":"for the first time, use the default password `password`.","isFullCredit":true},{"lineNumber":2140,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2141,"author":{"gitId":"charlesgoh"},"content":"*Lock Application failure with incorrect password*","isFullCredit":true},{"lineNumber":2142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2143,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2144,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2145,"author":{"gitId":"charlesgoh"},"content":"lock pw/wrongpasswordlol +","isFullCredit":true},{"lineNumber":2146,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2147,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2148,"author":{"gitId":"charlesgoh"},"content":"Application will fail to lock +","isFullCredit":true},{"lineNumber":2149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2150,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2151,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2152,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again","isFullCredit":true},{"lineNumber":2153,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2154,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2155,"author":{"gitId":"charlesgoh"},"content":"*Lock Application with correct password*","isFullCredit":true},{"lineNumber":2156,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2157,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2158,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2159,"author":{"gitId":"charlesgoh"},"content":"lock pw/newpassword","isFullCredit":true},{"lineNumber":2160,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2161,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2162,"author":{"gitId":"charlesgoh"},"content":"Locks application. Try performing any CRUD statements after locking (i.e. add or edit. It will fail) +","isFullCredit":true},{"lineNumber":2163,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2164,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2165,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2166,"author":{"gitId":"charlesgoh"},"content":"Address++ locked successfully","isFullCredit":true},{"lineNumber":2167,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2168,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2169,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Unlock Command","isFullCredit":true},{"lineNumber":2170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2171,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2172,"author":{"gitId":"charlesgoh"},"content":"This section is a continuation of the previous section on the Lock Command","isFullCredit":true},{"lineNumber":2173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2174,"author":{"gitId":"charlesgoh"},"content":"*Fail to unlock application with incorrect password*","isFullCredit":true},{"lineNumber":2175,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2176,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2177,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2178,"author":{"gitId":"charlesgoh"},"content":"unlock pw/wrongpassword:P","isFullCredit":true},{"lineNumber":2179,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2180,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2181,"author":{"gitId":"charlesgoh"},"content":"Fails to unlock application. You will still not be able to execute CRUD commands +","isFullCredit":true},{"lineNumber":2182,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2183,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2184,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2185,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again","isFullCredit":true},{"lineNumber":2186,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2188,"author":{"gitId":"charlesgoh"},"content":"*Unlock application with correct password*","isFullCredit":true},{"lineNumber":2189,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2190,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2191,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2192,"author":{"gitId":"charlesgoh"},"content":"unlock pw/newpassword:P","isFullCredit":true},{"lineNumber":2193,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2194,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2195,"author":{"gitId":"charlesgoh"},"content":"Unlocks application. You can now execute CRUD commands +","isFullCredit":true},{"lineNumber":2196,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2197,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2198,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2199,"author":{"gitId":"charlesgoh"},"content":"Address++ unlocked successfully","isFullCredit":true},{"lineNumber":2200,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2201,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2202,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command","isFullCredit":true},{"lineNumber":2203,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2204,"author":{"gitId":"charlesgoh"},"content":"*Increase font size*","isFullCredit":true},{"lineNumber":2205,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2206,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2207,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2208,"author":{"gitId":"charlesgoh"},"content":"fontsize increase","isFullCredit":true},{"lineNumber":2209,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2210,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2211,"author":{"gitId":"charlesgoh"},"content":"Increases font size by 1 level +","isFullCredit":true},{"lineNumber":2212,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2213,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2214,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2215,"author":{"gitId":"charlesgoh"},"content":"Font size increased successfully","isFullCredit":true},{"lineNumber":2216,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2217,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2218,"author":{"gitId":"charlesgoh"},"content":"*Decrease font size*","isFullCredit":true},{"lineNumber":2219,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2220,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2221,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2222,"author":{"gitId":"charlesgoh"},"content":"fs decrease","isFullCredit":true},{"lineNumber":2223,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2224,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2225,"author":{"gitId":"charlesgoh"},"content":"Decrease font size by 1 level +","isFullCredit":true},{"lineNumber":2226,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2227,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2228,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2229,"author":{"gitId":"charlesgoh"},"content":"Font size decreased successfully","isFullCredit":true},{"lineNumber":2230,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2231,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2232,"author":{"gitId":"charlesgoh"},"content":"*Reset font size*","isFullCredit":true},{"lineNumber":2233,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2234,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2235,"author":{"gitId":"charlesgoh"},"content":"You can try increasing the font size a few more times. There will be a max font size to prevent you from","isFullCredit":true},{"lineNumber":2236,"author":{"gitId":"charlesgoh"},"content":"increasing too much.","isFullCredit":true},{"lineNumber":2237,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2238,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2239,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2240,"author":{"gitId":"charlesgoh"},"content":"fontsize reset +","isFullCredit":true},{"lineNumber":2241,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2242,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2243,"author":{"gitId":"charlesgoh"},"content":"Resets font size in the application +","isFullCredit":true},{"lineNumber":2244,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2245,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2246,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2247,"author":{"gitId":"charlesgoh"},"content":"Font size reset successfully","isFullCredit":true},{"lineNumber":2248,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2249,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2250,"author":{"gitId":"charlesgoh"},"content":"*Incorrect input format*","isFullCredit":true},{"lineNumber":2251,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2252,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2253,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2254,"author":{"gitId":"charlesgoh"},"content":"fontsize +","isFullCredit":true},{"lineNumber":2255,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2256,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2257,"author":{"gitId":"charlesgoh"},"content":"Displays invalid command format error and the usage message +","isFullCredit":true},{"lineNumber":2258,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2259,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2260,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2261,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":2262,"author":{"gitId":"charlesgoh"},"content":"fontsize: Increases, decreases or resets font sizes +","isFullCredit":true},{"lineNumber":2263,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [OPTION] +","isFullCredit":true},{"lineNumber":2264,"author":{"gitId":"charlesgoh"},"content":"Example: fontsize increase +","isFullCredit":true},{"lineNumber":2265,"author":{"gitId":"charlesgoh"},"content":"Example 2: fs reset +","isFullCredit":true},{"lineNumber":2266,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2267,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2268,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatars","isFullCredit":true},{"lineNumber":2269,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2270,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2271,"author":{"gitId":"charlesgoh"},"content":"There is full support for URLs. No guarantee for local file paths. Local file paths must add a local prefix `file:`","isFullCredit":true},{"lineNumber":2272,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2273,"author":{"gitId":"charlesgoh"},"content":"*Add avatar URL*","isFullCredit":true},{"lineNumber":2274,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2275,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2276,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2277,"author":{"gitId":"charlesgoh"},"content":"edit 1 v/[URL] +","isFullCredit":true},{"lineNumber":2278,"author":{"gitId":"charlesgoh"},"content":"Replace [URL] with a valid image online.","isFullCredit":true},{"lineNumber":2279,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2280,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2281,"author":{"gitId":"charlesgoh"},"content":"Replaces placeholder avatar with the online image +","isFullCredit":true}],"authorContributionMap":{"charlesgoh":324,"jeffreygohkw":186,"Esilocke":1500,"-":271}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" String defaultConfigAsString \u003d \"App title : Address++\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code AddPersonCommand}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandIntegrationTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), expectedModel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code AddPersonCommand} which upon execution, adds {@code person} into the {@code model}.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand prepareCommand(Person person, Model model) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":9,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandTest {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommand \u003d new AddPersonCommand(alice);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addBobCommand \u003d new AddPersonCommand(bob);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommandCopy \u003d new AddPersonCommand(alice);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddPersonCommand with the details of the given person.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand getAddCommandForPerson(Person person, Model model) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person or task.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":2,"-":100}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AddTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" AddTaskCommandTest.ModelStubAcceptingTaskAdded modelStub \u003d new AddTaskCommandTest.ModelStubAcceptingTaskAdded();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d prepareCommand(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddTaskCommand.MESSAGE_SUCCESS, validTask), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new AddTaskCommandTest.ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddTaskCommand.MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" prepareCommand(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommand \u003d new AddTaskCommand(paper);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPencilCommand \u003d new AddTaskCommand(pencil);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommandCopy \u003d new AddTaskCommand(paper);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddTaskCommand with the details of the given task.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" private AddTaskCommand prepareCommand(Task task, Model model) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand command \u003d new AddTaskCommand(task);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateTaskException when trying to add a task.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the task being added.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingTaskAdded extends ModelStub {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":119}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_success() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_success() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_success() throws Exception {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void execute_allPersonsAlreadyAssigned_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assignCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, expectedModel, AssignCommand.MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index taskIndex) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, taskIndex);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":156}},{"path":"src/test/java/seedu/address/logic/commands/ChangePasswordCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.ChangePasswordCommandParser;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_PASSWORD \u003d \"password\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_SECOND_PASSWORD \u003d \"password2\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ChangePasswordCommandParser parser;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" parser \u003d new ChangePasswordCommandParser();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void parseWrongArgumentsFailure() {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" // No arguments failure","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Wrong number of arguments","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"one two?\", String","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // No prefixes","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"password password2 password3\", String","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void testUserPrefsPasswords() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Check original password","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" String expectedPassword \u003d getHashed256(DEFAULT_PASSWORD);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // Lock address book and check if state has changed","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(DEFAULT_SECOND_PASSWORD);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" expectedPassword \u003d getHashed256(DEFAULT_SECOND_PASSWORD);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Helps to convert string to SHA256 counterpart","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" private String getHashed256(String password) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":74}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" .setRemarkPrivate(\"false\").build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getRemarkIsPrivate(), pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsCopy \u003d new PersonPrivacySettings(pps);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getAddressIsPrivate(), pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getEmailIsPrivate(), pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getNameIsPrivate(), pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getRemarkIsPrivate(), pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").setRemarkPrivate(\"true\")","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").setRemarkPrivate(\"false\")","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":149}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class ClearCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/ClearPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearPersonCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ClearPersonCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ClearPersonCommand command \u003d new ClearPersonCommand();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/commands/ClearTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommandTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // Verify that only the tasks are cleared","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearTaskCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ClearTaskCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ClearTaskCommand command \u003d new ClearTaskCommand();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":39}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_NAME_CHRIS \u003d \"Chris Chan\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_PHONE_CHRIS \u003d \"33333333\";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_EMAIL_CHRIS \u003d \"chris@example.com\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_ADDRESS_CHRIS \u003d \"Block 132, Chris Street 5\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_REMARK_CHRIS \u003d \"He likes swimming\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_AMY \u003d \"amyavatar\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_BOB \u003d \"bobavatar\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_CHRIS \u003d \"chirsavatar\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_ALICE \u003d \"false\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_BOB \u003d \"true\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_TAG_CHRISTAG \u003d \"special\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017 12pm\";","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017 12pm\";","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PENCIL \u003d \"12 Kent Ridge Cres\";","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PAPER \u003d \"Bedok Mall\";","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final String NAME_DESC_CHRIS \u003d \" \" + PREFIX_NAME + VALID_NAME_CHRIS;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public static final String PHONE_DESC_CHRIS \u003d \" \" + PREFIX_PHONE + VALID_PHONE_CHRIS;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" public static final String EMAIL_DESC_CHRIS \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_CHRIS;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" public static final String ADDRESS_DESC_CHRIS \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_CHRIS;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" public static final String REMARK_DESC_CHRIS \u003d \" \" + PREFIX_REMARK + VALID_REMARK_CHRIS;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_AMY \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_AMY;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_BOB \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_BOB;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_CHRIS \u003d \" \" + PREFIX_AVATAR + VALID_REMARK_CHRIS;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PENCIL \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PAPER \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_TASK_NAME_DESC \u003d \" \" + PREFIX_NAME + \" \"; // task name cannot be blank","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"TIMELESS AGES\"; // not a date","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_ADDRESS_DESC \u003d \" \" + PREFIX_ADDRESS + \" \"; // priority is out of bounds","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_AMY;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_BOB;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PENCIL;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PAPER;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" static {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //TODO: Change avatar filename to a real filename","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_AMY).withAvatar(VALID_AVATAR_AMY).withFavourite(VALID_FAVOURITE_ALICE)","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_BOB).withAvatar(VALID_AVATAR_BOB).withFavourite(VALID_FAVOURITE_ALICE)","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" // only do so by copying its components.","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" command.execute();","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (CommandException e) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" final String[] splitName \u003d person.getName().value.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public static void showFirstTaskOnly(Model model) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(0);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" public static void showSecondTaskOnly(Model model) {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(1);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * Deletes the first task in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public static void deleteFirstTask(Model model) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask firstTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(firstTask);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Task in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":15,"jeffreygohkw":5,"Esilocke":81,"wangyiming1019":25,"-":124}},{"path":"src/test/java/seedu/address/logic/commands/DeletePersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeletePersonCommand}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommand \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteSecondCommand \u003d new DeletePersonCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommandCopy \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeletePersonCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" private DeletePersonCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d new DeletePersonCommand(index);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" deletePersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" return deletePersonCommand;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":22,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" showNoTask(expectedModel);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommand \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteSecondCommand \u003d new DeleteTaskCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommandCopy \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeleteTaskCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private DeleteTaskCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d new DeleteTaskCommand(index);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" deleteTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return deleteTaskCommand;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show no tasks.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" private void showNoTask(Model model) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(p -\u003e false);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().isEmpty();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":115}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_success() throws Exception {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_success() throws Exception {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_success() throws Exception {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void execute_noneDismissed_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, DismissCommand.MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index taskIndex) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, taskIndex);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":151}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditPersonCommand.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandTest {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(indexLastPerson, descriptor);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex,","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" final EditPersonCommand standardCommand \u003d new EditPersonCommand(INDEX_FIRST_PERSON, DESC_AMY);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand commandWithSameValues \u003d new EditPersonCommand(INDEX_FIRST_PERSON, copyDescriptor);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_SECOND_PERSON, DESC_AMY)));","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_FIRST_PERSON, DESC_BOB)));","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditPersonCommand} with parameters {@code index} and {@code descriptor}","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" private EditPersonCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d new EditPersonCommand(index, descriptor);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" editPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return editPersonCommand;","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":31,"-":140}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_BOB;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptorWithSameValues \u003d new EditPersonDescriptor(DESC_AMY);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(descriptorWithSameValues));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(DESC_AMY));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(null));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(5));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different values -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(DESC_BOB));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different name -\u003e returns false","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" EditPersonDescriptor editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // different phone -\u003e returns false","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withPhone(VALID_PHONE_BOB).build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // different email -\u003e returns false","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withEmail(VALID_EMAIL_BOB).build();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // different address -\u003e returns false","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAddress(VALID_ADDRESS_BOB).build();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // different tags -\u003e returns false","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // different remarks -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // different avatar -\u003e returns false","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAvatar(VALID_AVATAR_BOB).build();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // different favourite status -\u003e returns false","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withFavourite(VALID_FAVOURITE_BOB).build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":16,"-":57}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent_throwsCommandException() throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset_success() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll_success() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" private AddressBook prepareAddressBook() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditTaskCommand.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder(editedTask).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(Index.fromZeroBased(3), descriptor);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(3), editedTask);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Index indexLastTask \u003d Index.fromOneBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask lastTask \u003d model.getFilteredTaskList().get(indexLastTask.getZeroBased());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" TaskBuilder taskInList \u003d new TaskBuilder(lastTask);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d taskInList.withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(indexLastTask, descriptor);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(lastTask, editedTask);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskInFilteredList \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder(taskInFilteredList).withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(0), editedTask);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" * Edit filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex,","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" final EditTaskCommand standardCommand \u003d new EditTaskCommand(INDEX_FIRST_TASK, DESC_PENCIL);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor copyDescriptor \u003d new EditTaskCommand.EditTaskDescriptor(DESC_PENCIL);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand commandWithSameValues \u003d new EditTaskCommand(INDEX_FIRST_TASK, copyDescriptor);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_SECOND_TASK, DESC_PENCIL)));","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // different descriptor -\u003e returns false","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_FIRST_TASK, DESC_PAPER)));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskCommand} with parameters {@code index} and {@code descriptor}","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private EditTaskCommand prepareCommand(Index index, EditTaskCommand.EditTaskDescriptor descriptor) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d new EditTaskCommand(index, descriptor);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" editTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return editTaskCommand;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":152}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" // different task address -\u003e returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code FindPersonCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommand \u003d new FindPersonCommand(firstPredicate);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findSecondCommand \u003d new FindPersonCommand(secondPredicate);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommandCopy \u003d new FindPersonCommand(firstPredicate);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindPersonCommand}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" private FindPersonCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindPersonCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"-":84}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/FindTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_TASKS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.ACCEPT;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.DATE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.GRADLE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommand \u003d new FindTaskCommand(firstPredicate);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findSecondCommand \u003d new FindTaskCommand(secondPredicate);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommandCopy \u003d new FindTaskCommand(firstPredicate);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void execute_zeroKeywords_noTaskFound() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public void execute_multipleKeywords_multipleTasksFound() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\"Resolve Acceptance Date\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ACCEPT, DATE, GRADLE));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindTaskCommand}.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" private FindTaskCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * - the {@code FilteredList\u003cReadOnlyTask\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindTaskCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e expectedList) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedList, model.getFilteredTaskList());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":97}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code BrowserPanelLocateEvent}","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/NavigateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code NavigateCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromAddress_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to, null, null, false, false);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromPersons_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromTasks_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidArgs_failure() throws IllegalValueException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to,","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand naviOne \u003d prepareCommand(from, to,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_SECOND_PERSON, false, false);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Executes the input (@code NavigateCommand) and checks that (@code BrowserPanelNavigateEvent) is raised with","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * the correct locations","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(NavigateCommand navi) throws IllegalValueException {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" Location from;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Location to;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationFrom() !\u003d null) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d navi.getLocationFrom();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isFromIsTask()) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredTaskList().get(navi.getFromIndex().getZeroBased())","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredPersonList().get(navi.getFromIndex().getZeroBased())","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationTo() !\u003d null) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d navi.getLocationTo();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isToIsTask()) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredTaskList().get(navi.getToIndex().getZeroBased())","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredPersonList().get(navi.getToIndex().getZeroBased())","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d navi.execute();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(NavigateCommand.MESSAGE_NAVIGATE_SUCCESS,","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" from, to),","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelNavigateEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelNavigateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(from, lastEvent.getFromLocation());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(to, lastEvent.getToLocation());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code NavigateCommand} based on input parameters.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommand prepareCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d new NavigateCommand(locationFrom, locationTo, fromIndex, toIndex, fromIsTask, toIsTask);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" navi.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return navi;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":135}},{"path":"src/test/java/seedu/address/logic/commands/OpenCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.OpenCommand.OPEN_COMMAND_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new OpenCommand().execute();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(OPEN_COMMAND_SUCCESS, result.feedbackToUser);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof OpenRequestEvent);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/PrivacyLevelCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Assert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code PrivacyLevelCommand}.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndex_success() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //valid levels","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand onePlc \u003d prepareCommand(1);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand twoPlc \u003d prepareCommand(2);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand threePlc \u003d prepareCommand(3);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(onePlc);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(twoPlc);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(threePlc);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndex_failure() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //Negative level","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand negativePlc \u003d prepareCommand(-1);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //Zero level","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand zeroPlc \u003d prepareCommand(0);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //Level greater than the maximum level allowed","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand tooBigPlc \u003d prepareCommand(5);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(negativePlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(zeroPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(tooBigPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that the privacy level of the model and each person has been","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * changed to that of the level as specified in the input (@code PrivacyLevelCommand)","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(PrivacyLevelCommand plc) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" commandResult \u003d plc.execute();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(PrivacyLevelCommand.CHANGE_PRIVACY_LEVEL_SUCCESS, plc.getLevel()),","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //Check the model\u0027s privacy level","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(model.getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //Iterate through the list of persons in the model","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" //Check the person\u0027s Privacy Level","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getAddressBook().getPersonList().get(i);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" //Check Privacy Level of all fields of each person that can be private","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getName().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getPhone().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getEmail().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getAddress().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getRemark().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(PrivacyLevelCommand plc, String expectedMessage) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" plc.execute();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Assert.assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommand prepareCommand(int level) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand privacyLevelCommand \u003d new PrivacyLevelCommand(level);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" privacyLevelCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return privacyLevelCommand;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":116}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RedoCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Collections.emptyList(), Arrays.asList(deletePersonCommandTwo, deletePersonCommandOne));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // multiple commands in redoStack","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" // single command in redoStack","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" // no command in redoStack","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8,"-":47}},{"path":"src/test/java/seedu/address/logic/commands/SaveAsCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SaveAsCommand.SAVE_AS_COMMAND_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new SaveAsCommand().execute();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(SAVE_AS_COMMAND_SUCCESS, result.feedbackToUser);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof SaveAsRequestEvent);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/SelectPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectPersonCommand}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandTest {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Rule","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" @Before","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommand \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectSecondCommand \u003d new SelectPersonCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommandCopy \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestEvent} is raised with the correct index.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectPersonCommand.MESSAGE_SUCCESS, index.getOneBased());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectPersonCommand.execute();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" * is thrown with the .","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.execute();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectPersonCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" private SelectPersonCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d new SelectPersonCommand(index);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" return selectPersonCommand;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":139}},{"path":"src/test/java/seedu/address/logic/commands/SelectTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Before","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index lastTaskIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_TASK);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastTaskIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommand \u003d new SelectTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectSecondCommand \u003d new SelectTaskCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommandCopy \u003d new SelectTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestTaskEvent} is raised with the correct index.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectTaskCommand.MESSAGE_SUCCESS, index.getOneBased());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectTaskCommand.execute();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestTaskEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" * is thrown with the .","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.execute();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectTaskCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" private SelectTaskCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d new SelectTaskCommand(index);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" return selectTaskCommand;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":136}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListValidIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListInvalidIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, SetCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":118}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showSecondTaskOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_changeIncompleteTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, SetIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(model);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(expectedModel);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":117}},{"path":"src/test/java/seedu/address/logic/commands/TagListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS_WITH_NEW_TAG;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommandTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" private TagListCommand listTagsCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String expectedMessage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Before","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cTag\u003e tagList \u003d new ArrayList\u003cTag\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand \u003d new TagListCommand();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder expectedMessageString \u003d new StringBuilder(listTagsCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (!tagList.contains(tag)) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" tagList.add(tag);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageString.append(\"\u003c\").append(tag.getTagName()).append(\"\u003e \");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" expectedMessage \u003d expectedMessageString.toString().trim();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void executeTagListNotEmpty() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyTagListShowNothing() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModelWithNoTags \u003d new ModelManager();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessageWithNoTags \u003d listTagsCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" TagListCommand tagListCommandWithNoTags \u003d new TagListCommand();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" tagListCommandWithNoTags.setData(expectedModelWithNoTags, new CommandHistory(),","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" new UndoRedoStack());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(tagListCommandWithNoTags, expectedModelWithNoTags,","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageWithNoTags, expectedModelWithNoTags);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithPersonAdd() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithTagEdited() throws","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" PersonNotFoundException, DuplicatePersonException {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":88}},{"path":"src/test/java/seedu/address/logic/commands/ThemeCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_CHANGE_SUCCESS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_IN_USE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_NOT_AVAILABLE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommand \u003d new ThemeCommand(\"light\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkThemeCommand \u003d new ThemeCommand(\"Dark\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommand));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommandCopy \u003d new ThemeCommand(\"light\");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommandCopy));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(1));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(null));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" // different theme -\u003e returns false","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(darkThemeCommand));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_correctTheme_success() throws CommandException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"light\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(command, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"light\"));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkCommand \u003d prepareCommand(\"dark\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(darkCommand, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"dark\"));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"notATheme\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_NOT_AVAILABLE, \"notATheme\"));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_themeAlreadyLoaded_failure() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"dark\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_IN_USE, \"dark\"));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightCommand \u003d prepareCommand(\"light\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(lightCommand, model, String.format(MESSAGE_THEME_IN_USE, \"light\"));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses {@code userInput} into a {@code ThemeCommand}.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d new ThemeCommand(userInput);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return command;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Asserts that {@code command} is successfully executed","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void assertCommandSuccess(ThemeCommand command, String expectedMessage) throws CommandException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getTheme());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getUserPrefs().getTheme());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":98}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class UndoCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() throws Exception {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Arrays.asList(deletePersonCommandOne, deletePersonCommandTwo), Collections.emptyList());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.execute();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.execute();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in undoStack","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // single command in undoStack","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" // no command in undoStack","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":11,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/commands/UnlockLockCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class UnlockLockCommandTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private Model model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public void checkLockFunctionality() throws Exception {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Check initial state is unlocked","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Check that lock works","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Check double lock","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Check that unlock works","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // Check double unlock","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":46}},{"path":"src/test/java/seedu/address/logic/commands/ViewAssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToShow \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.viewAssignees(taskToShow);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(viewAssignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommand \u003d new ViewAssignCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewSecondCommand \u003d new ViewAssignCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommand));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommandCopy \u003d new ViewAssignCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommandCopy));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(viewSecondCommand));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code ViewAssignCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d new ViewAssignCommand(index);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" viewAssignCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return viewAssignCommand;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":90}},{"path":"src/test/java/seedu/address/logic/parser/AddPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandParserTest {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // multiple tags - all accepted","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPersonMultipleTags));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // zero tags","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY,","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" // missing name prefix","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" // invalid phone","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" // invalid email","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" // invalid tag","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":28,"Esilocke":22,"-":86}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParserTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // multiple addresses - last address accepted","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + TASK_ADDRESS_DESC_PAPER + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // invalid deadline","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" // invalid priority","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Priority.MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" private static final boolean DEFAULT_STATE_LOCK \u003d false;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" AddCommand command \u003d (AddPersonCommand) parser","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(PersonUtil.getAddCommand(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddPersonCommand(person), command);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(TaskUtil.getAddCommand(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddTaskCommand(task), command);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddPersonCommand) parser.parseCommand(AddPersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(new AddPersonCommand(person), command);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(AddTaskCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(new AddTaskCommand(task), command);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandPrivacyLevel() throws Exception {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 1\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 2\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasPrivacyLevel() throws Exception {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 1\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 2\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandTheme() throws Exception {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" dark\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" light\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasTheme() throws Exception {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" dark\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" light\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandOpen() throws Exception {","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(OpenCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof OpenCommand);","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(OpenCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof OpenCommand);","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandSaveAs() throws Exception {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(SaveAsCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof SaveAsCommand);","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(SaveAsCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof SaveAsCommand);","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + keywords.stream()","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate(keywords,","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" DEFAULT_STATE_LOCK, DEFAULT_STATE_LOCK, false, 0)), command);","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + keywords","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"charlesgoh"},"content":" .stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate(","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" keywords, DEFAULT_STATE_LOCK, false, false, 0)), command);","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAddTag() throws Exception {","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasAddTag() throws Exception {","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDeleteTag() throws Exception {","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDeleteTag() throws Exception {","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandTagList() throws Exception {","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasTagList() throws Exception {","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_ALIAS,","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavourite() throws Exception {","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavourite() throws Exception {","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnfavourite() throws Exception {","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasUnfavourite() throws Exception {","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavouriteList() throws Exception {","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavouriteList() throws Exception {","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_ALIAS,","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandNavigate() throws Exception {","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" command);","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasNavigate() throws Exception {","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_ALIAS + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"jeffreygohkw"},"content":" command);","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandWord() throws Exception {","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandAlias() throws Exception {","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackup() throws Exception {","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeWord() throws Exception {","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeAlias() throws Exception {","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandValid() throws Exception {","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandWordInvalid() throws Exception {","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandAliasInvalid() throws Exception {","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandValid() throws Exception {","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"charlesgoh"},"content":" + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandWordInvalid() throws Exception {","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandAliasInvalid() throws Exception {","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":" public void parseChangePasswordCommand() throws Exception {","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are correct and valid","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are wrong but valid","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that have the wrong order (i.e. fields are in the wrong order)","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \"","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":" // Do the same thing for alias counterparts","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \"","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_STATE_LOCK) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_STATE_LOCK) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":223,"jeffreygohkw":156,"Esilocke":164,"wangyiming1019":201,"-":110}},{"path":"src/test/java/seedu/address/logic/parser/AssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private AssignTaskCommandParser parser \u003d new AssignTaskCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new AssignCommand(indexes, INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + \"aaaaa\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" AssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/ClearCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ClearCommandParser parser \u003d new ClearCommandParser();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidType_failure() throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" some invalid value\",","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void parseValidTypes_success() throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ClearCommand expectedClearAll \u003d new ClearCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_PERSON.getPrefix()) instanceof ClearPersonCommand);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_TASK.getPrefix()) instanceof ClearTaskCommand);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ClearCommand multipleTypesSpecified \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearPersonCommand);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearTaskCommand);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ClearCommand repeatedTypes \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix() + PREFIX_PERSON.getPrefix() + \" \" + PREFIX_TASK.getPrefix() + \" \");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearPersonCommand);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearTaskCommand);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":43}},{"path":"src/test/java/seedu/address/logic/parser/DeletePersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * outside of the DeletePersonCommand code. For example, inputs \"1\" and \"1 abc\" take the","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * same path through the DeletePersonCommand, and therefore we test only one of them.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParserTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeletePersonCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8,"-":25}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\",","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new DeleteTaskCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\",","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/DismissCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private DismissTaskCommandParser parser \u003d new DismissTaskCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new DismissCommand(indexes, INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + \"aaaaa\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" DismissCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/EditPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParserTest {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final String TAG_EMPTY \u003d \" \" + PREFIX_TAG;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private EditCommandParser parser \u003d new EditCommandParser();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no index specified","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" // no field specified","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"1\", EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" // negative index","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" // zero index","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS); // invalid name","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS); // invalid phone","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS); // invalid email","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS); // invalid tag","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" // invalid phone followed by valid email","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC + EMAIL_DESC_AMY, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + PHONE_DESC_BOB + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // while parsing {@code PREFIX_TAG} alone will reset the tags of the {@code Person} being edited,","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" // parsing it together with a valid tag results in error","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + TAG_EMPTY, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_EMPTY + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_EMPTY + TAG_DESC_FRIEND + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" // multiple invalid values, but only the first invalid value is captured","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC + INVALID_EMAIL_DESC + VALID_ADDRESS_AMY + VALID_PHONE_AMY,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void parse_allFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + NAME_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void parse_someFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).build();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" public void parse_oneFieldSpecified_success() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // name","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY).build();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" // phone","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_AMY).build();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // email","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withEmail(VALID_EMAIL_AMY).build();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // address","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withAddress(VALID_ADDRESS_AMY).build();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" // tags","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND)","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" .build();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" public void parse_invalidValueFollowedByValidValue_success() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" // no other valid values specified","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + INVALID_PHONE_DESC + PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).build();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" // other valid values specified","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_BOB + INVALID_PHONE_DESC + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).build();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" public void parse_resetTags_success() {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + TAG_EMPTY;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withTags().build();","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":16,"-":192}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/EditTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TASK_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParserTest {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private EditCommandParser parser \u003d new EditCommandParser();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no index specified","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + VALID_TASK_NAME_PAPER, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no field specified","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\", EditTaskCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" // negative index","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"-5\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // zero index","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"0\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC,","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" TaskName.MESSAGE_NAME_CONSTRAINTS); // invalid name","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC,","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE); // invalid deadline","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_PRIORITY_DESC,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Priority.MESSAGE_PRIORITY_CONSTRAINTS); // invalid priority","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // invalid phone followed by valid email","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC + PRIORITY_DESC_PAPER,","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + DEADLINE_DESC_PAPER + INVALID_DEADLINE_DESC,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // multiple invalid values, but only the first invalid value is captured","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC + INVALID_PRIORITY_DESC","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + VALID_DEADLINE_PAPER + VALID_DESCRIPTION_PAPER, TaskName.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public void parse_allFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER + DESCRIPTION_DESC_PAPER","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" + DEADLINE_DESC_PAPER + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void parse_someFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER).withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void parse_oneFieldSpecified_success() {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" // name","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // phone","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER).build();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // email","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" // address","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" // tags","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValueFollowedByValidValue_success() {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" // no other valid values specified","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + INVALID_DEADLINE_DESC + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" // other valid values specified","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":194}},{"path":"src/test/java/seedu/address/logic/parser/FIndTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class FIndTaskCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private FindCommandParser parser \u003d new FindCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void parse_emptyArg_throwsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsFindCommand() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand expectedFindTaskCommand \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(\"Lucy\", \"Date\")));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"Lucy Date\", expectedFindTaskCommand);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \" \\n Lucy \\n \\t Date \\t\", expectedFindTaskCommand);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParserTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private FindCommandParser parser \u003d new FindCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void parse_emptyArg_throwsParseException() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsFindCommand() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand expectedFindPersonCommand \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(\"Alice\", \"Bob\")));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"Alice Bob\", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \\n Alice \\n \\t Bob \\t\", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8,"-":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \",","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/FontSizeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.ACCEPTED_PARAMETERS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" private FontSizeCommandParser parser \u003d new FontSizeCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void parse_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" // No arguments specified","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" // Wrong arguments specified","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"random input\",","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand expectedCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand actualCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" for (String arg: ACCEPTED_PARAMETERS) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new FontSizeCommand(arg);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" // Check for command word","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" // Check for command alias","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectPersonCommandParserTest}.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectPersonCommandParserTest","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/NavigateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@autho jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParserTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommandParser parser \u003d new NavigateCommandParser();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsPresent_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //From address to address","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fata \u003d new NavigateCommand(new Location(\"NUS\"), new Location(\"Sentosa\"),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" null, null, false, false);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fata);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //From address to person","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatp \u003d new NavigateCommand(new Location(\"NUS\"), null,","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_PERSON, false, false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\", fatp);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //From address to task","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatt \u003d new NavigateCommand(new Location(\"NUS\"), null,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_TASK, false, true);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fatt);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //From person to address","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fpta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, null, false, false);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fpta);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //From person to person","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptp \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON, false, false);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fptp);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" //From person to task","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptt \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_SECOND_TASK, false, true);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\", fptt);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //From task to address","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand ftta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, null, true, false);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", ftta);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" //From task to person","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttp \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_THIRD_PERSON, true, false);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fttp);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //From task to task","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttt \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fttt);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_repeatedFromAndTos_failure() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Froms","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Tos","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\",","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingFromOrTo_failure() {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" //No To","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\",","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" //No From","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"NUS\",","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_failure() {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" //Non positive indices","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"-1\", ParserUtil.MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":139}},{"path":"src/test/java/seedu/address/logic/parser/ParserUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtilTest {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static final boolean PRIVATE_FIELD \u003d true;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String INVALID_NAME \u003d \"R@chel\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"+651234\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String INVALID_ADDRESS \u003d \" \";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final String INVALID_EMAIL \u003d \"example.com\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_REMARK \u003d \" \";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_AVATAR \u003d \" \";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final String INVALID_TAG \u003d \"#friend\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_NAME \u003d \" \";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_DEADLINE \u003d \"The distant, distant past\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_PRIORITY \u003d \"99\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_ADDRESS \u003d \" \";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Rachel Walker\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"123456\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"123 Main Street #0505\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"rachel@example.com\";","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_REMARK \u003d \"Thinks that P\u003dNP\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_AVATAR \u003d \"valid_file.png\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_1 \u003d \"friend\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_2 \u003d \"neighbour\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_NAME \u003d \"Launcher\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DESCRIPTION \u003d \"An arbitrary decision\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DEADLINE \u003d \"2 weeks later\";","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_PRIORITY \u003d \"3\";","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_ADDRESS \u003d \"NUS\";","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public final ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void parseIndex_invalidInput_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(\"10 a\");","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void parseIndex_outOfRangeInput_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(Long.toString(Integer.MAX_VALUE + 1));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void parseIndex_validInput_success() throws Exception {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // No whitespaces","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\"1\"));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // Leading and trailing whitespaces","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\" 1 \"));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void parseName_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" ParserUtil.parseName(null);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseName_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(INVALID_NAME));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public void parseName_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseName(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void parseName_validValue_returnsName() throws Exception {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" Name expectedName \u003d new Name(VALID_NAME);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" Optional\u003cName\u003e actualName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" Name expectedPrivateName \u003d new Name(VALID_NAME, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" Optional\u003cName\u003e actualPrivateName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertEquals(expectedName, actualName.get());","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateName, actualPrivateName.get());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void parsePhone_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(null);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void parsePhone_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(INVALID_PHONE));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parsePhone_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parsePhone(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void parsePhone_validValue_returnsPhone() throws Exception {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" Phone expectedPhone \u003d new Phone(VALID_PHONE);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" Optional\u003cPhone\u003e actualPhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Phone expectedPrivatePhone \u003d new Phone(VALID_PHONE, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPhone\u003e actualPrivatePhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(expectedPhone, actualPhone.get());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivatePhone, actualPrivatePhone.get());","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void parseAddress_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(null);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" public void parseAddress_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(INVALID_ADDRESS));","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" public void parseAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseAddress(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parseAddress_validValue_returnsAddress() throws Exception {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" Address expectedAddress \u003d new Address(VALID_ADDRESS);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" Optional\u003cAddress\u003e actualAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" Address expectedPrivateAddress \u003d new Address(VALID_ADDRESS, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAddress\u003e actualPrivateAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertEquals(expectedAddress, actualAddress.get());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateAddress, actualPrivateAddress.get());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void parseEmail_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(null);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" public void parseEmail_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(INVALID_EMAIL));","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void parseEmail_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseEmail(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void parseEmail_validValue_returnsEmail() throws Exception {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" Email expectedEmail \u003d new Email(VALID_EMAIL);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" Optional\u003cEmail\u003e actualEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" Email expectedPrivateEmail \u003d new Email(VALID_EMAIL, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" Optional\u003cEmail\u003e actualPrivateEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertEquals(expectedEmail, actualEmail.get());","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateEmail, actualPrivateEmail.get());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(null);","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(Optional.of(INVALID_REMARK));","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseRemark(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_validValue_returnsRemark() throws Exception {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" Remark expectedRemark \u003d new Remark(VALID_REMARK);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" Remark expectedPrivateRemark \u003d new Remark(VALID_REMARK, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualPrivateRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedRemark, actualRemark.get());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateRemark, actualPrivateRemark.get());","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(null);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(Optional.of(INVALID_AVATAR));","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseAvatar(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_validValue_returnsAvatar() throws Exception {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" Avatar expectedAvatar \u003d new Avatar(VALID_AVATAR);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAvatar\u003e actualAvatar \u003d ParserUtil.parseAvatar(Optional.of(VALID_AVATAR));","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAvatar, actualAvatar.get());","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void parseTags_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(null);","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithInvalidTags_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, INVALID_TAG));","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" public void parseTags_emptyCollection_returnsEmptySet() throws Exception {","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertTrue(ParserUtil.parseTags(Collections.emptyList()).isEmpty());","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithValidTags_returnsTagSet() throws Exception {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e actualTagSet \u003d ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, VALID_TAG_2));","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e expectedTagSet \u003d new HashSet\u003c\u003e(Arrays.asList(new Tag(VALID_TAG_1), new Tag(VALID_TAG_2)));","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTagSet, actualTagSet);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(null);","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(INVALID_TASK_NAME));","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskName(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_validValue_returnsTaskName() throws Exception {","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" TaskName expectedTaskName \u003d new TaskName(VALID_TASK_NAME);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskName\u003e actualTaskName \u003d ParserUtil.parseTaskName(Optional.of(VALID_TASK_NAME));","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskName, actualTaskName.get());","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(null);","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDescription(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_validValue_returnsDescription() throws Exception {","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Description expectedDescription \u003d new Description(VALID_DESCRIPTION);","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDescription\u003e actualDescription \u003d ParserUtil.parseDescription(Optional.of(VALID_DESCRIPTION));","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDescription, actualDescription.get());","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(null);","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(INVALID_DEADLINE));","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDeadline(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_validValue_returnsDeadline() throws Exception {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" Deadline expectedDeadline \u003d new Deadline(VALID_DEADLINE);","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDeadline\u003e actualDeadline \u003d ParserUtil.parseDeadline(Optional.of(VALID_DEADLINE));","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDeadline, actualDeadline.get());","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(null);","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(INVALID_PRIORITY));","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parsePriority(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_validValue_returnsPriority() throws Exception {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" Priority expectedPriority \u003d new Priority(VALID_PRIORITY);","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPriority\u003e actualPriority \u003d ParserUtil.parsePriority(Optional.of(VALID_PRIORITY));","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPriority, actualPriority.get());","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(null);","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(INVALID_TASK_ADDRESS));","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskAddress(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_validValue_returnsTaskAddress() throws Exception {","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" TaskAddress expectedTaskAddress \u003d new TaskAddress(VALID_TASK_ADDRESS);","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskAddress\u003e actualTaskAddress \u003d ParserUtil.parseTaskAddress(Optional.of(VALID_TASK_ADDRESS));","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskAddress, actualTaskAddress.get());","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(null);","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_invalidValue_throwsParseException() throws Exception {","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(\"1 2 a b c\");","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_validValue_returnsIndexes() throws Exception {","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e expectedIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON,","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\"1 2 3\"));","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\" 1 2 3 \"));","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":260,"-":162}},{"path":"src/test/java/seedu/address/logic/parser/PrivacyLevelCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParserTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommandParser parser \u003d new PrivacyLevelCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new PrivacyLevelCommand(INDEX_FIRST_PERSON.getOneBased()));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"2\", new PrivacyLevelCommand(INDEX_SECOND_PERSON.getOneBased()));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"3\", new PrivacyLevelCommand(INDEX_THIRD_PERSON.getOneBased()));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"???\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/test/java/seedu/address/logic/parser/SelectPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Test scope: similar to {@code DeletePersonCommandParserTest}.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandParserTest","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParserTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new SelectPersonCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":23}},{"path":"src/test/java/seedu/address/logic/parser/SelectTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \" + PREFIX_TASK.getPrefix() + \" 1\",","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new SelectTaskCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \" + PREFIX_TASK.getPrefix() + \" -1\",","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/SetCompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskCompleteCommandParser parser \u003d new SetTaskCompleteCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\",","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetCompleteCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\",","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SetIncompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskIncompleteCommandParser parser \u003d new SetTaskIncompleteCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\",","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetIncompleteCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\",","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_ORDER_PARAMETERS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" // no list specified","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_FIELD_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0),","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // list is person but field is for tasks","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(5)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" // list is task but field is for person","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(1) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0)","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // Incorrect test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\",","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" SortCommand expectedCommand;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" SortCommand actualCommand;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // For person sorts","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" String list \u003d ACCEPTED_LIST_PARAMETERS.get(0);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" String field \u003d ACCEPTED_FIELD_PARAMETERS.get(0);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" String order \u003d ACCEPTED_ORDER_PARAMETERS.get(0);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // For task sorts","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" list \u003d ACCEPTED_LIST_PARAMETERS.get(1);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" field \u003d ACCEPTED_FIELD_PARAMETERS.get(5);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" order \u003d ACCEPTED_ORDER_PARAMETERS.get(1);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":26,"jeffreygohkw":53}},{"path":"src/test/java/seedu/address/logic/parser/ThemeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParserTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommandParser parser \u003d new ThemeCommandParser();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_emptyArg_throwsParseException() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsFindCommand() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand expectedFindPersonCommand \u003d","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" new ThemeCommand(\"light\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"light\", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \" light \", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/ViewAssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommandParser parser \u003d new ViewAssignCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new ViewAssignCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":111,"Esilocke":18,"-":88}},{"path":"src/test/java/seedu/address/model/ModelManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class ModelManagerTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void getFilteredPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" modelManager.getFilteredPersonList().remove(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /*","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of deleteTag is equals to the expected","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to delete.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTagValidIndexesAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"someTag\", \"friends\").build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(\"someTag\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(toDelete, indexes);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" /*","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of addTag is equals to the expected","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to add.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void addTagValidIndexesAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\").build();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(\"newTag\");","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(toAdd, indexes);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\", \"newTag\").build();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\", \"newTag\").build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBookBuilder().withPerson(ALICE).withPerson(BENSON).build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" AddressBook differentAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" ModelManager modelManagerCopy \u003d new ModelManager(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManagerCopy));","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManager));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(null));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(5));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // different addressBook -\u003e returns false","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(differentAddressBook, userPrefs)));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // different filteredList -\u003e returns false","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String[] keywords \u003d ALICE.getName().value.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(keywords)));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(addressBook, userPrefs)));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" // resets modelManager to initial state for upcoming tests","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" // different userPrefs -\u003e returns true","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" UserPrefs differentUserPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" differentUserPrefs.setAddressBookName(\"differentName\");","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(new ModelManager(addressBook, differentUserPrefs)));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":1,"wangyiming1019":82,"-":64}},{"path":"src/test/java/seedu/address/model/UniquePersonListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class UniquePersonListTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" UniquePersonList uniquePersonList \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" uniquePersonList.asObservableList().remove(0);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byName_bothOrders() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e nameComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, nameComparator);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(nameComparator));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byPhone_bothOrders() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e phoneComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, phoneComparator);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(phoneComparator));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byEmail_bothOrders() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e emailComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, emailComparator);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(emailComparator));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byAddress_bothOrders() {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e addressComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, addressComparator);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(addressComparator));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":136,"-":19}},{"path":"src/test/java/seedu/address/model/UniqueTaskListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.UniqueTaskList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalTasks;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class UniqueTaskListTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Rule","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" UniqueTaskList uniquePersonList \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" uniquePersonList.asObservableList().remove(0);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byDeadline_bothOrders() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"asc\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"desc\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byPriority_bothOrders() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return Integer.compare(o1.getPriority().value, o2.getPriority().value);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"asc\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"desc\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.getIsPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":19}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.getIsPrivate());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":38}},{"path":"src/test/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicateTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(secondPredicateKeywordList);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicate));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicateCopy \u003d","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(1));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(null));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(secondPredicate));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameContainsKeywords_returnsTrue() throws IllegalValueException {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // One keyword","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.singletonList(\"Alice\"));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(testee));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" testee.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // Multiple keywords","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Alice\", \"Bob\"));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Carol\").build();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // Only one matching keyword","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Bob\", \"Carol\"));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Carol\").build()));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" testee.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // Mixed-case keywords","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"aLIce\", \"bOB\"));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // Zero keywords","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.emptyList());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" // Non-matching keyword","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Carol\"));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" testee.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice\").withPhone(\"12345\")","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" .withEmail(\"alice@email.com\").withAddress(\"Main Street\").build();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" // Keywords match phone, email and address, but does not match name","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" \"12345\", \"alice@email.com\", \"Main\", \"Street\"));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":113}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.getIsPrivate());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":24}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getIsPrivate());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":23}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" // valid deadlines","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"the day after tomorrow\")); // slashes","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"4-11\"));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":25}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"-1\")); // priority out of range","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskContainsKeywordPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicateTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d new TaskContainsKeywordPredicate(secondPredicateKeywordList);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate thirdPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicate));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicateCopy \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(1));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(null));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different keywords -\u003e returns false","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(secondPredicate));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(thirdPredicate));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void test_nameContainsKeywords_returnsTrue() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // One keyword","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pen\").build()));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // Zero keywords","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.emptyList());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy\").build()));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // Non-matching keyword","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pen\"));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void test_descriptionContainsKeywords_returnsTrue() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // One keyword","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy 3 Pencil\").build()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pen\").build()));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void priorityMatches() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // Priority level equal to required level","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // Priority level greater than required level","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"4\").build()));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // Priority level less than required level","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" // Name matches, priority check not required, even though priority level does not match","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" false, false, false, 3);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Priority matches, but name does not match","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" public void stateMatches() {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" // States are equivalent","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // States are different","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" // Name matches, state check not required, even though state does not match","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // State matches, but name does not match","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" public void combinationTests() {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" // At most 1 invalid input per test case","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" // Matches all","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencil now\")","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" // Name does not match, but description does","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Get something\").withDescription(\"Get 3 Pencil now\")","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" // Description does not match, but name does","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy 3 Pencil\").withDescription(\"Get something\")","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but priority does not","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"2\").withState(true).build()));","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but state does not","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(false).build()));","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":182}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" descriptor.setAvatar(person.getAvatar());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"remark is expected to be unique.\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Avatar} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withAvatar(String avatar) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseAvatar(Optional.of(avatar)).ifPresent(descriptor::setAvatar);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"avatar is expected to be unique.\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" //@author","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * that we are building.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":40,"Esilocke":1,"wangyiming1019":9,"-":88}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskAddress(task.getTaskAddress());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskAddress(String address) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(address)).ifPresent(descriptor::setTaskAddress);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":101}},{"path":"src/test/java/seedu/address/testutil/ModelStub.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * A default model stub that have all of the methods failing.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class ModelStub implements Model {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public void setMainWindow(MainWindow mainWindow) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public void sortTasks(String field, String order) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" return 0;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" return null;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return null;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" return null;","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public void lockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void unlockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called\");","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":17,"jeffreygohkw":37,"Esilocke":153,"wangyiming1019":24,"-":1}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class PersonBuilder {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_AVATAR \u003d \"\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private Person person;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public PersonBuilder() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Avatar defaultAvatar \u003d new Avatar(DEFAULT_AVATAR);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" defaultRemark, defaultAvatar, defaultTags);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withAvatar(String filepath) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.person.setAvatar(new Avatar(filepath));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Avatar is invalid\");","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" public Person build() {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" return this.person;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":34,"wangyiming1019":12,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().getIsPrivate());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().getIsPrivate());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().getIsPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().getIsPrivate());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(person.getRemark().getIsPrivate());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code remarkIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setRemarkPrivate(String remark) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":106}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * A utility class for Person.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonUtil {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand.COMMAND_WORD + \" \" + getPersonDetails(person);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" sb.append(PREFIX_NAME + person.getName().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_AVATAR + person.getAvatar().value + \" \");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach(","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" );","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":1,"Esilocke":2,"-":35}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_ADDRESS \u003d \"12 Kent Ridge Crescent, 119275\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Task task;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" TaskAddress defaultAddress \u003d new TaskAddress(DEFAULT_ADDRESS);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState, defaultAddress);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskAddress(String address) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskAddress(new TaskAddress(address));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Assignees} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withAssignees(String... args) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" for (String s : args) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromOneBased(Integer.parseInt(s)));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" this.task.setAssignees(new Assignees(indexes));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public Task build() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return this.task;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":135}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + Integer.toString(task.getPriority().value) + \" \");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_ADDRESS + task.getTaskAddress().taskAddress + \" \");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_CHRIS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_CHRIS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_ALICE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_CHRIS;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_CHRIS;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_CHRIS;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"public class TypicalPersons {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS).withEmail(VALID_EMAIL_CHRIS)","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" .withAddress(VALID_ADDRESS_CHRIS).withFavourite(VALID_FAVOURITE_ALICE)","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_CHRIS)","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_CHRISTAG).build();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS_WITH_NEW_TAG \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS)","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_CHRIS).withAddress(VALID_ADDRESS_CHRIS)","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_CHRIS)","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" .withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" return ab;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":18,"wangyiming1019":32,"-":64}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").withAssignees(\"4\")","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"21 Heng Mui Keng Terrace, #02-01-01 I-Cube Building\").build();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\").withState(true)","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").withTaskAddress(\"Tampines Mall\").build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).withTaskAddress(\"27 Prince George\u0027s Park\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").withTaskAddress(\"Central Park\").build();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").withTaskAddress(\"16 Gemmill Ln\").build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).withAssignees(\"1\", \"2\", \"3\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"NUS School of Computing, COM1, 13 Computing Drive, 117417\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"Changi Airport\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL)","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String KEYWORD_MATCHING_LUCY \u003d \"Lucy\"; // A keyword that matches LUCY","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_PREFIX;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_SUFFIX;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelNavigateEvent panelNavigateEventStub;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() throws IllegalValueException {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" panelNavigateEventStub \u003d new BrowserPanelNavigateEvent(new Location(\"NUS\"),","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" new Location(BENSON.getAddress().toString()));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // default web page","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelNavigateEventStub);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDirUrl \u003d new URL(GOOGLE_MAPS_DIRECTIONS_PREFIX","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026origin\u003d\"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getFromLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getToLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDirUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":47,"-":31}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultiplier());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // no tags","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":89,"Esilocke":1}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final JumpToListRequestTaskEvent JUMP_TO_SECOND_EVENT \u003d new","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void handleJumpToListRequestTaskEvent() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true}],"authorContributionMap":{"charlesgoh":57,"Esilocke":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"-":80}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPerson.getName().value, actualCard.getName());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTask.getPriority().toString(), actualCard.getPriority());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":1,"Esilocke":1,"-":71}},{"path":"src/test/java/systemtests/AddPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * -\u003e added","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + AddPersonCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void addSecondTest() throws Exception {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void addThirdTest() throws Exception {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public void addFourthTest() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" 1\");","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Executes the {@code AddPersonCommand} that adds {@code toAdd} to the model and verifies that the command box","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * displays an empty string, the result display box displays the success message of executing","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * {@code AddPersonCommand} with the details of {@code toAdd}, and the model related components equal to the","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" * current model added with {@code toAdd}.","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged.","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" * instead.","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(AddPersonCommand.MESSAGE_SUCCESS, toAdd);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * {@code expectedModel}.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":50,"Esilocke":30,"-":192}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * for test verification.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @ClassRule","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initializeStage();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public BrowserPanelHandle getBrowserPanel() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" rememberStates();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * Displays all persons in the address book.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" protected void showAllPersons() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d getModel().getFilteredPersonList().size();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive).","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + keyword);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" \" + index.getOneBased());","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getPersonListPanel().getSelectedCardIndex() \u003d\u003d index.getZeroBased();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * their current state.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" private void rememberStates() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" getBrowserPanel().rememberUrl();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" * of the previously selected person.","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" String selectedCardName \u003d getPersonListPanel().getHandleToSelectedCard().getName();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" URL expectedUrl;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" expectedUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX + selectedCardName.replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" } catch (MalformedURLException mue) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" throw new AssertionError(\"URL expected to be valid.\");","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" //TODO Might need to remove this as the person panel no longer involves google search.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //assertEquals(expectedUrl, getBrowserPanel().getLoadedUrl());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style.","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same.","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertEquals(MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE), getBrowserPanel().getLoadedUrl());","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model.","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":260}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void clear() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void clearTestTwo() throws Exception {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"Esilocke":5,"-":97}},{"path":"src/test/java/systemtests/DeletePersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeletePersonCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getLastIndex;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getMidIndex;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_DELETE_COMMAND_FORMAT \u003d","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void delete() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /* ----------------- Performing delete operation while an unfiltered list is being shown -------------------- */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: delete the first person in the list, command with leading spaces and trailing spaces -\u003e deleted */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + DeletePersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: delete the last person in the list -\u003e deleted */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" Model modelBeforeDeletingLast \u003d getModel();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d getLastIndex(modelBeforeDeletingLast);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /* Case: undo deleting the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: redo deleting the last person in the list -\u003e last person deleted again */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" removePerson(modelBeforeDeletingLast, lastPersonIndex);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: delete the middle person in the list -\u003e deleted */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" Index middlePersonIndex \u003d getMidIndex(getModel());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(middlePersonIndex);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ------------------ Performing delete operation while a filtered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book and person list -\u003e deleted */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" assertCommandSuccess(index);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + invalidIndex;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /* --------------------- Performing delete operation while a person card is selected ------------------------ */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: delete the selected person -\u003e person list panel selects the person before the deleted person */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Index selectedIndex \u003d getLastIndex(expectedModel);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" Index expectedIndex \u003d Index.fromZeroBased(selectedIndex.getZeroBased() - 1);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" selectPerson(selectedIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + selectedIndex.getOneBased();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" deletedPerson \u003d removePerson(expectedModel, selectedIndex);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, expectedIndex);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid delete operation ------------------------------------ */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" 0\";","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" -1\";","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" getModel().getAddressBook().getPersonList().size() + 1);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + outOfBoundsIndex.getOneBased();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" 1 abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertCommandFailure(\"DelETE 1\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Removes the {@code ReadOnlyPerson} at the specified {@code index} in {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * @return the removed person","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" private ReadOnlyPerson removePerson(Model model, Index index) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" ReadOnlyPerson targetPerson \u003d getPerson(model, index);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" model.deletePerson(targetPerson);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new AssertionError(\"targetPerson is retrieved from model.\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return targetPerson;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" * Deletes the person at {@code toDelete} by creating a default {@code DeletePersonCommand} using","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" * {@code toDelete} and performs the same verification as {@code assertCommandSuccess(String, Model, String)}.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Index toDelete) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, toDelete);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertCommandSuccess(","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand.COMMAND_WORD + \" \" + toDelete.getOneBased(),","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card remains unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String)} except that the browser url","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * and selected card are expected to update accordingly depending on the card at {@code expectedSelectedCardIndex}.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":21,"-":180}},{"path":"src/test/java/systemtests/EditPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson(","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public void editThree() throws Exception {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" public void editFourth() throws Exception {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" int invalidIndex;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * browser url changes","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" selectPerson(index);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" //TODO rewrite GUI check for this as select no longer displays google searches","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public void editFive() throws Exception {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" public void editSix() throws Exception {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditPersonCommand}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson), expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":49,"Esilocke":40,"-":233}},{"path":"src/test/java/systemtests/FindPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void find() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER + \" \";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL); // first names of Benson and Daniel are \"Meier\"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" /* Case: repeat previous find command where person list is displaying the persons we are finding","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /* Case: find person where person list is not displaying the person we are finding -\u003e 1 person found */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Carl\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, CARL);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords -\u003e 2 persons found */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Benson Daniel\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords in reversed order -\u003e 2 persons found */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords with 1 repeat -\u003e 2 persons found */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson Daniel\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 matching keywords and 1 non-matching keyword","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson NonMatchingKeyWord\";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo previous find command -\u003e rejected */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo previous find command -\u003e rejected */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: find same persons in address book after deleting 1 of them -\u003e 1 person found */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" executeCommand(DeletePersonCommand.COMMAND_WORD + \" 1\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert !getModel().getAddressBook().getPersonList().contains(BENSON);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is same as name but of different case -\u003e 1 person found */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" MeIeR\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is substring of name -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mei\";","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: find person in address book, name is substring of keyword -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Meiers\";","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: find person not in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mark\";","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /* Case: find phone number of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getPhone().value;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: find address of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getAddress().value;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" /* Case: find email of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getEmail().value;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /* Case: find tags of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cTag\u003e tags \u003d new ArrayList\u003c\u003e(DANIEL.getTags());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + tags.get(0).tagName;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: find while a person is selected -\u003e selected card deselected */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" assert !getPersonListPanel().getHandleToSelectedCard().getName().equals(DANIEL.getName().value);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel\";","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: find person in empty address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" command \u003d \"FiNd Meier\";","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * box displays {@code Messages#MESSAGE_PERSONS_LISTED_OVERVIEW} with the number of people in the filtered list,","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the model related components equal to {@code expectedModel}.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Also verifies that the status bar remains unchanged, and the command box has the default style class, and the","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" * selected card updated accordingly, depending on {@code cardStatus}.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" MESSAGE_PERSONS_LISTED_OVERVIEW, expectedModel.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":1,"Esilocke":22,"-":173}},{"path":"src/test/java/systemtests/SelectPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.SelectPersonCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void select() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /* Case: select the first card in the person list, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * -\u003e selected","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /* Case: select the last card in the person list -\u003e selected */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + personCount.getOneBased();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, personCount);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: undo previous selection -\u003e rejected */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /* Case: redo selecting last card in the list -\u003e rejected */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public void selectSecondTest() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: select the middle card in the person list -\u003e selected */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Index middleIndex \u003d Index.fromOneBased(personCount.getOneBased() / 2);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + middleIndex.getOneBased();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* Case: select the current selected card -\u003e selected */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" public void selectThirdTest() throws Exception {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book and person list -\u003e selected */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Index validIndex \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assert validIndex.getZeroBased() \u003c getModel().getFilteredPersonList().size();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + validIndex.getOneBased();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, validIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + 0,","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + -1,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" abc\",","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void selectFourthTest() throws Exception {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" 1 abc\",","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandFailure(\"SeLeCt 1\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: select from empty address book -\u003e rejected */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * box displays the success message of executing select command with the {@code expectedSelectedCardIndex}","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * of the selected person, and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar remain unchanged. The resulting","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * browser url and selected card will be verified if the current selected card and the card at","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex} are different.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" MESSAGE_SUCCESS, expectedSelectedCardIndex.getOneBased());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" int preExecutionSelectedCardIndex \u003d getPersonListPanel().getSelectedCardIndex();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" if (preExecutionSelectedCardIndex \u003d\u003d expectedSelectedCardIndex.getZeroBased()) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18,"Esilocke":21,"-":125}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":70}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Delta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Delta_master/authorship.json index bfc970c05b..46da6d3a33 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Delta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeFindPreviousAuthors/expected/reposense_testrepo-Delta_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager"},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]"},{"lineNumber":3,"author":{"gitId":"-"},"content":""},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":"https://travis-ci.org/CS2103JAN2018-F14-B1/main[image:https://travis-ci.org/CS2103JAN2018-F14-B1/main.svg?branch\u003dmaster[Build Status]]"},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"https://ci.appveyor.com/project/lithiumlkid/main/branch/master[image:https://ci.appveyor.com/api/projects/status/2itvfqp2b8xnaqqn/branch/master?svg\u003dtrue[Build status]]"},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"https://coveralls.io/github/CS2103JAN2018-F14-B1/main?branch\u003dmaster[image:https://coveralls.io/repos/github/CS2103JAN2018-F14-B1/main/badge.svg?branch\u003dmaster[Coverage Status]]"},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"image:https://circleci.com/gh/CS2103JAN2018-F14-B1/main.svg?style\u003dsvg[\"CircleCI\", link\u003d\"https://circleci.com/gh/CS2103JAN2018-F14-B1/main\"]"},{"lineNumber":8,"author":{"gitId":"-"},"content":"https://gitter.im/se-edu/Lobby[image:https://badges.gitter.im/se-edu/Lobby.svg[Gitter chat]]"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"image::docs/images/MyTeamManagerLogo.png[width\u003d\"100\", align\u003d\"center\"]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]"},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/MyTeamManagerLogo.png[width\u003d\"600\", align\u003d\"center\"]"},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":19,"author":{"gitId":"-"},"content":"image::docs/images/Ui.png[width\u003d\"600\", align\u003d\"center\"]"},{"lineNumber":20,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"ifndef::env-github[]"},{"lineNumber":23,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\", align\u003d\"center\"]"},{"lineNumber":24,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction to MTM"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop based team managing application for football team managers. +"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"It uses a Command Line Interface (CLI)."},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"MTM is equipped with multiple features in helping you efficiently"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"and effectively manage your players, while keeping track of the team\u0027s schedule. +"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"With MTM\u0027s aesthetically pleasing graphical user interface, viewing critical information will be quick and painless."},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"Never lose track of your training schedule again! +"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"Say goodbye to manual tracking of information on excel sheet after excel sheet!"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"\u003d\u003d What MTM Can Do - Key Features"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"* Set up Teams"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"* Add Players to Teams"},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":"* Add Player\u0027s personal details, position, rating, avatar etc."},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"* View, Edit and Delete Players"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"* Sort players by field of choice"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":"Come and take a look at our \u003c\u003cUserGuide#, User Guide\u003e\u003e to get started with MTM now."},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":"* My Team Manager is morphed from https://github.com/se-edu/addressbook-level4[AddressBook-Level4] application, a project created by SE-EDU initiative."},{"lineNumber":58,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by"},{"lineNumber":59,"author":{"gitId":"-"},"content":"_Marco Jakob_."},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Libraries used: https://github.com/TomasMikula/EasyBind[EasyBind], https://github.com/TestFX/TestFX[TextFX], https://bitbucket.org/controlsfx/controlsfx/[ControlsFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/google/guava[Guava], https://github.com/junit-team/junit4[JUnit4]"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]"}],"authorContributionMap":{"lithiumlkid":5,"codeeong":16,"-":41}},{"path":"docs/DeveloperGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - Developer Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3"},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full"},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":12,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":13,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main/tree/master"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"By: `F14-B1`      Since: `Mar 2018`      Licence: `MIT`"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"// tag::overview[]"},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d Overview"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a team managing application for football coaches. MTM is designed to be quick and easy for you to manage a team of players without the need of a mouse."},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"This developer\u0027s guide provides information that will not only show the design principles of the project, but allow you to understand the different implementations, and give you the opportunity to get started with being a contributor or as a reference for experienced developer."},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"This developer\u0027s guide consist of the following sections:"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cSetting up, Setting up\u003e\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign, Design\u003e\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":"* \u003c\u003cImplementation, Implementation\u003e\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":"* \u003c\u003cDocumentation, Documentation\u003e\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":"* \u003c\u003cTesting, Testing\u003e\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* \u003c\u003cDev Ops, Dev Ops\u003e\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":"// end::overview[]"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"The following pointers teach you how to get started with developing on our application. You’ll learn how to prepare yourself with the project on IntelliJ and run it. Then, you’ll update configurations in IntelliJ to easily match the coding standards and you’ll be ready to start coding."},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"But before you start, there are two fundamental prerequisites you should know about MTM:"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":"MTM is written in Java 8 and with the use of an integrated development environment (IDE) such as IntelliJ, it provides you as a developer with a better environment suited for developing MTM to maintain coding standards and provide continuous integration."},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":". You are required to have *JDK `1.8.0_60`* or later,"},{"lineNumber":46,"author":{"gitId":"-"},"content":"+"},{"lineNumber":47,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":48,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":49,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8. +"},{"lineNumber":50,"author":{"gitId":"-"},"content":"You can download Java 8 from link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151[here]."},{"lineNumber":51,"author":{"gitId":"-"},"content":"+"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":". and *IntelliJ* IDE."},{"lineNumber":54,"author":{"gitId":"-"},"content":"+"},{"lineNumber":55,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":56,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +"},{"lineNumber":57,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them. +"},{"lineNumber":58,"author":{"gitId":"-"},"content":"You can download IntelliJ from link:https://www.jetbrains.com/idea/download/#section\u003dwindows[here]."},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up the project on your computer"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":"Before you begin setting up the project, please ensure that you’ve done the following on our GitHub repository (repo)."},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":"Upon completion of forking from our GitHub repo, you can proceed to set up your project on IntelliJ."},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)"},{"lineNumber":70,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle"},{"lineNumber":71,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`"},{"lineNumber":72,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK"},{"lineNumber":73,"author":{"gitId":"-"},"content":". Click `Import Project`"},{"lineNumber":74,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`"},{"lineNumber":75,"author":{"gitId":"-"},"content":". Click `Open as Project`"},{"lineNumber":76,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings"},{"lineNumber":77,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message which will generate all resources required by the application and tests."},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":"Now that you’ve properly setup your project, you can verify that you have done everything properly."},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands"},{"lineNumber":84,"author":{"gitId":"-"},"content":". \u003c\u003cTesting,Run the tests\u003e\u003e to ensure they all pass."},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":"You have verified the setup and you’re all ready to dive into the code, but before you do, check out the following configurations that will help you make your coding more integrated and accurate."},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.adoc[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)"},{"lineNumber":95,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`"},{"lineNumber":96,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements"},{"lineNumber":99,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code."},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `se-edu/addressbook-level4` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `se-edu/addressbook-level4`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork."},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up."},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":"After setting up Travis, you can optionally set up coverage reporting for your team fork (see \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e)."},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":114,"author":{"gitId":"-"},"content":"Coverage reporting could be useful for a team repository that hosts the final version but it is not that useful for your personal fork."},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e)."},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":119,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Getting started with coding"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":"When you are ready to start coding,"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading \u003c\u003cDesign-Architecture\u003e\u003e."},{"lineNumber":126,"author":{"gitId":"-"},"content":"2. Dive right in and get started with programming."},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"\u003d\u003d Design"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"After you have successfully configured MTM, you are encouraged to read through the following section to understand the design of the software. The design section covers a high level overview the architecture and components of the software, as well as how common classes, configuration and logging throughout development are being used."},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":"[[Design-Architecture]]"},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Software Architecture"},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"The *_Architecture Diagram_* given below (Figure 1) explains the high-level design of the App."},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":".Architecture Diagram"},{"lineNumber":138,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"Given below is a quick overview of each component."},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":143,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`."},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,"},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other."},{"lineNumber":148,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary."},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":"\u003c\u003cDesign-Commons,*`Commons`*\u003e\u003e represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level."},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)"},{"lineNumber":153,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file."},{"lineNumber":154,"author":{"gitId":"-"},"content":""},{"lineNumber":155,"author":{"gitId":"-"},"content":"The rest of the App consists of four components."},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Ui,*`UI`*\u003e\u003e: The UI of the App."},{"lineNumber":158,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Logic,*`Logic`*\u003e\u003e: The command executor."},{"lineNumber":159,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Model,*`Model`*\u003e\u003e: Holds the data of the App in-memory."},{"lineNumber":160,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Storage,*`Storage`*\u003e\u003e: Reads data from, and writes data to, the hard disk."},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":"Each of the four components"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component."},{"lineNumber":165,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class."},{"lineNumber":166,"author":{"gitId":"-"},"content":""},{"lineNumber":167,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class."},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":".Class Diagram of the Logic Component"},{"lineNumber":170,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":173,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`."},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 1)"},{"lineNumber":178,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":181,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk."},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time."},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 2)"},{"lineNumber":186,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":189,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components."},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":"The sections below give more details of each component."},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":"[[Design-Ui]]"},{"lineNumber":194,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":"The UI Component contains a MainWindow that consists of various parts e.g. CommandBox, ResultDisplayer, TeamDetails, PersonListPanel, PlayerDetails etc. The UI classes are all child classes of the abstract UiPart class."},{"lineNumber":197,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":198,"author":{"gitId":"lithiumlkid"},"content":"The structure of the UI component is shown in the figure below:"},{"lineNumber":199,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":".Structure of the UI Component"},{"lineNumber":201,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `PlayerDetails` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class."},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `UI` component,"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component."},{"lineNumber":212,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change."},{"lineNumber":213,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly."},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":"[[Design-Logic]]"},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"lithiumlkid"},"content":"The Logic Component handles how each command would be parsed and executed. The class diagrams below illustrates the structure of the Logic Component and the structure of each individual commands."},{"lineNumber":219,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":"[[fig-LogicClassDiagram]]"},{"lineNumber":221,"author":{"gitId":"-"},"content":".Structure of the Logic Component"},{"lineNumber":222,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":".Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in \u003c\u003cfig-LogicClassDiagram\u003e\u003e"},{"lineNumber":225,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":226,"author":{"gitId":"-"},"content":""},{"lineNumber":227,"author":{"gitId":"-"},"content":"*API* :"},{"lineNumber":228,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command."},{"lineNumber":231,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`."},{"lineNumber":232,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events."},{"lineNumber":233,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`."},{"lineNumber":234,"author":{"gitId":"-"},"content":""},{"lineNumber":235,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call."},{"lineNumber":236,"author":{"gitId":"-"},"content":""},{"lineNumber":237,"author":{"gitId":"-"},"content":".Interactions Inside the Logic Component for the `delete 1` Command"},{"lineNumber":238,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":"[[Design-Model]]"},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component"},{"lineNumber":242,"author":{"gitId":"-"},"content":""},{"lineNumber":243,"author":{"gitId":"lithiumlkid"},"content":"The Model Component handles the players and teams data structures in My Team Manager. These structures also provide APIs to create, read, update and delete the details of these objects. The class diagram below shows the structure of the Model Component."},{"lineNumber":244,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":245,"author":{"gitId":"-"},"content":".Structure of the Model Component"},{"lineNumber":246,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"-"},"content":"The `Model`,"},{"lineNumber":251,"author":{"gitId":"-"},"content":""},{"lineNumber":252,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences."},{"lineNumber":253,"author":{"gitId":"-"},"content":"* stores the Address Book data."},{"lineNumber":254,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change."},{"lineNumber":255,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components."},{"lineNumber":256,"author":{"gitId":"-"},"content":""},{"lineNumber":257,"author":{"gitId":"-"},"content":"[[Design-Storage]]"},{"lineNumber":258,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"lithiumlkid"},"content":"Any changes made to the data is retained and handled by the Storage Component. The structure of this component is shown in Figure 10 below."},{"lineNumber":261,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":".Structure of the Storage Component"},{"lineNumber":263,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]"},{"lineNumber":266,"author":{"gitId":"-"},"content":""},{"lineNumber":267,"author":{"gitId":"-"},"content":"The `Storage` component,"},{"lineNumber":268,"author":{"gitId":"-"},"content":""},{"lineNumber":269,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back."},{"lineNumber":270,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back."},{"lineNumber":271,"author":{"gitId":"-"},"content":""},{"lineNumber":272,"author":{"gitId":"-"},"content":"[[Design-Commons]]"},{"lineNumber":273,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"lithiumlkid"},"content":"All classes used by the different components can be found in the `seedu.addressbook.commons` package."},{"lineNumber":276,"author":{"gitId":"-"},"content":""},{"lineNumber":277,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration"},{"lineNumber":278,"author":{"gitId":"-"},"content":""},{"lineNumber":279,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`)."},{"lineNumber":280,"author":{"gitId":"-"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":"// tag::logging[]"},{"lineNumber":282,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging"},{"lineNumber":283,"author":{"gitId":"-"},"content":""},{"lineNumber":284,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations."},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"lithiumlkid"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See \u003c\u003cConfiguration,Configuration\u003e\u003e)"},{"lineNumber":287,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level"},{"lineNumber":288,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file."},{"lineNumber":289,"author":{"gitId":"-"},"content":""},{"lineNumber":290,"author":{"gitId":"-"},"content":"*Logging Levels*"},{"lineNumber":291,"author":{"gitId":"-"},"content":""},{"lineNumber":292,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application"},{"lineNumber":293,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution"},{"lineNumber":294,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App"},{"lineNumber":295,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size"},{"lineNumber":296,"author":{"gitId":"-"},"content":""},{"lineNumber":297,"author":{"gitId":"-"},"content":"[[Implementation-Configuration]]"},{"lineNumber":298,"author":{"gitId":"-"},"content":"// end::logging[]"},{"lineNumber":299,"author":{"gitId":"-"},"content":""},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented."},{"lineNumber":303,"author":{"gitId":"-"},"content":""},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Pre-existing"},{"lineNumber":305,"author":{"gitId":"-"},"content":""},{"lineNumber":306,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":307,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undo/Redo feature"},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`."},{"lineNumber":311,"author":{"gitId":"-"},"content":""},{"lineNumber":312,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:"},{"lineNumber":313,"author":{"gitId":"-"},"content":""},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":".Logic Class Diagram"},{"lineNumber":315,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern]."},{"lineNumber":318,"author":{"gitId":"-"},"content":""},{"lineNumber":319,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:"},{"lineNumber":320,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":321,"author":{"gitId":"-"},"content":"----"},{"lineNumber":322,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":323,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":324,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":325,"author":{"gitId":"-"},"content":" // ... list logic ..."},{"lineNumber":326,"author":{"gitId":"-"},"content":" }"},{"lineNumber":327,"author":{"gitId":"-"},"content":"}"},{"lineNumber":328,"author":{"gitId":"-"},"content":"----"},{"lineNumber":329,"author":{"gitId":"-"},"content":""},{"lineNumber":330,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:"},{"lineNumber":331,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":332,"author":{"gitId":"-"},"content":"----"},{"lineNumber":333,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {"},{"lineNumber":334,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":335,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":336,"author":{"gitId":"-"},"content":" // ... undo logic ..."},{"lineNumber":337,"author":{"gitId":"-"},"content":""},{"lineNumber":338,"author":{"gitId":"-"},"content":" executeUndoableCommand();"},{"lineNumber":339,"author":{"gitId":"-"},"content":" }"},{"lineNumber":340,"author":{"gitId":"-"},"content":"}"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":344,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":345,"author":{"gitId":"-"},"content":" // ... delete logic ..."},{"lineNumber":346,"author":{"gitId":"-"},"content":" }"},{"lineNumber":347,"author":{"gitId":"-"},"content":"}"},{"lineNumber":348,"author":{"gitId":"-"},"content":"----"},{"lineNumber":349,"author":{"gitId":"-"},"content":""},{"lineNumber":350,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning."},{"lineNumber":351,"author":{"gitId":"-"},"content":""},{"lineNumber":352,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command)."},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 1)"},{"lineNumber":355,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":356,"author":{"gitId":"-"},"content":""},{"lineNumber":357,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person."},{"lineNumber":358,"author":{"gitId":"-"},"content":""},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 1)"},{"lineNumber":360,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":361,"author":{"gitId":"-"},"content":""},{"lineNumber":362,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":363,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all."},{"lineNumber":364,"author":{"gitId":"-"},"content":""},{"lineNumber":365,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`."},{"lineNumber":366,"author":{"gitId":"-"},"content":""},{"lineNumber":367,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed."},{"lineNumber":368,"author":{"gitId":"-"},"content":""},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 2)"},{"lineNumber":370,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":371,"author":{"gitId":"-"},"content":""},{"lineNumber":372,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":373,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`."},{"lineNumber":374,"author":{"gitId":"-"},"content":""},{"lineNumber":375,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:"},{"lineNumber":376,"author":{"gitId":"-"},"content":""},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Sequence Diagram"},{"lineNumber":378,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":379,"author":{"gitId":"-"},"content":""},{"lineNumber":380,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed)."},{"lineNumber":381,"author":{"gitId":"-"},"content":""},{"lineNumber":382,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":383,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`."},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow)."},{"lineNumber":386,"author":{"gitId":"-"},"content":""},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 2)"},{"lineNumber":388,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":389,"author":{"gitId":"-"},"content":""},{"lineNumber":390,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:"},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 3)"},{"lineNumber":393,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":394,"author":{"gitId":"-"},"content":""},{"lineNumber":395,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:"},{"lineNumber":396,"author":{"gitId":"-"},"content":""},{"lineNumber":397,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Activity Diagram"},{"lineNumber":398,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"650\"]"},{"lineNumber":399,"author":{"gitId":"-"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":401,"author":{"gitId":"-"},"content":""},{"lineNumber":402,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `UndoableCommand`"},{"lineNumber":403,"author":{"gitId":"-"},"content":""},{"lineNumber":404,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()`."},{"lineNumber":405,"author":{"gitId":"-"},"content":"** Pros: We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist."},{"lineNumber":406,"author":{"gitId":"-"},"content":"** Cons: Hard for new developers to understand the template pattern."},{"lineNumber":407,"author":{"gitId":"-"},"content":"* **Alternative 2:** Just override `execute()`."},{"lineNumber":408,"author":{"gitId":"-"},"content":"** Pros: Does not involve the template pattern, easier for new developers to understand."},{"lineNumber":409,"author":{"gitId":"-"},"content":"** Cons: Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo."},{"lineNumber":410,"author":{"gitId":"-"},"content":""},{"lineNumber":411,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How undo \u0026 redo executes"},{"lineNumber":412,"author":{"gitId":"-"},"content":""},{"lineNumber":413,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Saves the entire address book."},{"lineNumber":414,"author":{"gitId":"-"},"content":"** Pros: Easy to implement."},{"lineNumber":415,"author":{"gitId":"-"},"content":"** Cons: May have performance issues in terms of memory usage."},{"lineNumber":416,"author":{"gitId":"-"},"content":"* **Alternative 2:** Individual command knows how to undo/redo by itself."},{"lineNumber":417,"author":{"gitId":"-"},"content":"** Pros: Will use less memory (e.g. for `delete`, just save the person being deleted)."},{"lineNumber":418,"author":{"gitId":"-"},"content":"** Cons: We must ensure that the implementation of each individual command are correct."},{"lineNumber":419,"author":{"gitId":"-"},"content":""},{"lineNumber":420,"author":{"gitId":"-"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Type of commands that can be undone/redone"},{"lineNumber":422,"author":{"gitId":"-"},"content":""},{"lineNumber":423,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`)."},{"lineNumber":424,"author":{"gitId":"-"},"content":"** Pros: We only revert changes that are hard to change back (the view can easily be re-modified as no data are * lost)."},{"lineNumber":425,"author":{"gitId":"-"},"content":"** Cons: User might think that undo also applies when the list is modified (undoing filtering for example), * only to realize that it does not do that, after executing `undo`."},{"lineNumber":426,"author":{"gitId":"-"},"content":"* **Alternative 2:** Include all commands."},{"lineNumber":427,"author":{"gitId":"-"},"content":"** Pros: Might be more intuitive for the user."},{"lineNumber":428,"author":{"gitId":"-"},"content":"** Cons: User have no way of skipping such commands if he or she just want to reset the state of the address * book and not the view."},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Additional Info:** See our discussion https://github.com/se-edu/addressbook-level4/issues/390#issuecomment-298936672[here]."},{"lineNumber":430,"author":{"gitId":"-"},"content":""},{"lineNumber":431,"author":{"gitId":"-"},"content":""},{"lineNumber":432,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Aspect: Data structure to support the undo/redo commands"},{"lineNumber":433,"author":{"gitId":"-"},"content":""},{"lineNumber":434,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Use separate stack for undo and redo."},{"lineNumber":435,"author":{"gitId":"-"},"content":"** Pros: Easy to understand for new Computer Science student undergraduates to understand, who are likely to be * the new incoming developers of our project."},{"lineNumber":436,"author":{"gitId":"-"},"content":"** Cons: Logic is duplicated twice. For example, when a new command is executed, we must remember to update * both `HistoryManager` and `UndoRedoStack`."},{"lineNumber":437,"author":{"gitId":"-"},"content":"* **Alternative 2:** Use `HistoryManager` for undo/redo."},{"lineNumber":438,"author":{"gitId":"-"},"content":"** Pros: We do not need to maintain a separate stack, and just reuse what is already in the codebase."},{"lineNumber":439,"author":{"gitId":"-"},"content":"** Cons: Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two * different things."},{"lineNumber":440,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Player-Related Enhancements"},{"lineNumber":443,"author":{"gitId":"-"},"content":""},{"lineNumber":444,"author":{"gitId":"lithiumlkid"},"content":"// tag::player[]"},{"lineNumber":445,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Player Component `[since v1.3]`"},{"lineNumber":446,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":447,"author":{"gitId":"lithiumlkid"},"content":"`Player` is one of the core components of MTM. To implement it, we used the same `Person` object and added additional attributes to it. Shown below is the"},{"lineNumber":448,"author":{"gitId":"lithiumlkid"},"content":"new constructor for the Person object followed by the class diagram."},{"lineNumber":449,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":450,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":451,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":452,"author":{"gitId":"lithiumlkid"},"content":"public Person(Name name, Phone phone, Email email, Address address, Remark remark, TeamName teamName,"},{"lineNumber":453,"author":{"gitId":"lithiumlkid"},"content":" Set\u003cTag\u003e tags, Rating rating, Position position, JerseyNumber jerseyNumber, Avatar avatar) {"},{"lineNumber":454,"author":{"gitId":"lithiumlkid"},"content":" ..."},{"lineNumber":455,"author":{"gitId":"lithiumlkid"},"content":" this.remark \u003d remark;"},{"lineNumber":456,"author":{"gitId":"lithiumlkid"},"content":" this.teamName \u003d teamName;"},{"lineNumber":457,"author":{"gitId":"lithiumlkid"},"content":" this.rating \u003d rating;"},{"lineNumber":458,"author":{"gitId":"lithiumlkid"},"content":" this.position \u003d position;"},{"lineNumber":459,"author":{"gitId":"lithiumlkid"},"content":" this.jerseyNumber \u003d jerseyNumber;"},{"lineNumber":460,"author":{"gitId":"lithiumlkid"},"content":" this.avatar \u003d avatar;"},{"lineNumber":461,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":462,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":463,"author":{"gitId":"lithiumlkid"},"content":".Person Class Diagram"},{"lineNumber":464,"author":{"gitId":"lithiumlkid"},"content":"image::PlayerClassDiagram.png[width\u003d\"300\"]"},{"lineNumber":465,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":466,"author":{"gitId":"lithiumlkid"},"content":"The additional attributes are: \u003c\u003cteam,teamName\u003e\u003e, \u003c\u003cremark,Remark\u003e\u003e, \u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e."},{"lineNumber":467,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":468,"author":{"gitId":"lithiumlkid"},"content":"The add and edit command has also been updated to include \u003c\u003cteam,teamName\u003e\u003e,\u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e."},{"lineNumber":469,"author":{"gitId":"lithiumlkid"},"content":"One thing to note is that in `executeUndoableCommand()`"},{"lineNumber":470,"author":{"gitId":"lithiumlkid"},"content":"in both add and edit commands now does two additional things, setting the file path for players avatar, and assigning a player to a team"},{"lineNumber":471,"author":{"gitId":"lithiumlkid"},"content":"and adding person to current filtered list. Shown below is the code snippet of the new `executeUndoableCommand()` and sequence diagram"},{"lineNumber":472,"author":{"gitId":"lithiumlkid"},"content":"of the new add command as an example."},{"lineNumber":473,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":474,"author":{"gitId":"lithiumlkid"},"content":"[[AddSequence]]"},{"lineNumber":475,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":476,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":477,"author":{"gitId":"lithiumlkid"},"content":" @Override"},{"lineNumber":478,"author":{"gitId":"lithiumlkid"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":479,"author":{"gitId":"lithiumlkid"},"content":" requireNonNull(model);"},{"lineNumber":480,"author":{"gitId":"lithiumlkid"},"content":" try {"},{"lineNumber":481,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":482,"author":{"gitId":"lithiumlkid"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);"},{"lineNumber":483,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":484,"author":{"gitId":"lithiumlkid"},"content":" model.addPerson(toAdd);"},{"lineNumber":485,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":486,"author":{"gitId":"lithiumlkid"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());"},{"lineNumber":487,"author":{"gitId":"lithiumlkid"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());"},{"lineNumber":488,"author":{"gitId":"lithiumlkid"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));"},{"lineNumber":489,"author":{"gitId":"lithiumlkid"},"content":" } else { ..."},{"lineNumber":490,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":491,"author":{"gitId":"lithiumlkid"},"content":".Add Sequence Diagram"},{"lineNumber":492,"author":{"gitId":"lithiumlkid"},"content":"image::AddSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":493,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":494,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":495,"author":{"gitId":"lithiumlkid"},"content":"[[rating]]"},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Rating Class"},{"lineNumber":497,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":498,"author":{"gitId":"lithiumlkid"},"content":"The `Rating` class contains a `String value`. `value` holds the players rating, an integer from 0 to 5. It uses a validation regex `[0-5]`"},{"lineNumber":499,"author":{"gitId":"lithiumlkid"},"content":"to ensure valid input."},{"lineNumber":500,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":501,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Rating` is `ra/`"},{"lineNumber":502,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":503,"author":{"gitId":"lithiumlkid"},"content":"[[position]]"},{"lineNumber":504,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Position Class"},{"lineNumber":505,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":506,"author":{"gitId":"lithiumlkid"},"content":"The`Position` class contains a `String value`. `value` here holds the players position, an integer from 1 to 4. It uses a validation regex `[1-4]` to ensure valid input."},{"lineNumber":507,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":508,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `po/`."},{"lineNumber":509,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":510,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":511,"author":{"gitId":"lithiumlkid"},"content":"A static hashmap is used to store and retrieve the corresponding position names of the position values. The position name can be called using the method `getPositionName()` which returns `myMap.get(value)`."},{"lineNumber":512,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for the `hashmap` and `getPositionName()` is shown below."},{"lineNumber":513,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":514,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":515,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":516,"author":{"gitId":"lithiumlkid"},"content":"private static final Map\u003cString, String\u003e myMap;"},{"lineNumber":517,"author":{"gitId":"lithiumlkid"},"content":"static {"},{"lineNumber":518,"author":{"gitId":"lithiumlkid"},"content":" Map\u003cString, String\u003e aMap \u003d new HashMap\u003c\u003e();"},{"lineNumber":519,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"1\", \"Striker\");"},{"lineNumber":520,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"2\", \"Midfielder\");"},{"lineNumber":521,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"3\", \"Defender\");"},{"lineNumber":522,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"4\", \"Goalkeeper\");"},{"lineNumber":523,"author":{"gitId":"lithiumlkid"},"content":" myMap \u003d Collections.unmodifiableMap(aMap);"},{"lineNumber":524,"author":{"gitId":"lithiumlkid"},"content":"}"},{"lineNumber":525,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":526,"author":{"gitId":"lithiumlkid"},"content":"public String getPositionName() {"},{"lineNumber":527,"author":{"gitId":"lithiumlkid"},"content":" return myMap.get(value);"},{"lineNumber":528,"author":{"gitId":"lithiumlkid"},"content":"}"},{"lineNumber":529,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":530,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":531,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":532,"author":{"gitId":"lithiumlkid"},"content":"[[jersey]]"},{"lineNumber":533,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d JerseyNumber Class"},{"lineNumber":534,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":535,"author":{"gitId":"lithiumlkid"},"content":"The`JerseyNumber` class contains a `String value`. `value` here holds the players jersey number, an integer from 0 to 99. It uses a validation regex `[0-9]|[1-8][0-9]|9[0-9]` to ensure valid input."},{"lineNumber":536,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":537,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `j/`."},{"lineNumber":538,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":539,"author":{"gitId":"lithiumlkid"},"content":"[[avatar]]"},{"lineNumber":540,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Avatar Class"},{"lineNumber":541,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":542,"author":{"gitId":"lithiumlkid"},"content":"The`Avatar` class contains a `String value`. `value` here holds the absolute filepath to the players avatar image file, a png of jpeg file. It uses a validation regex `([^\\s]+(\\.(?i)(jpg|png))$)` to ensure valid input."},{"lineNumber":543,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":544,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Avatar` is `av/`."},{"lineNumber":545,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":546,"author":{"gitId":"lithiumlkid"},"content":"When the class is created, the `value` stores the original location of the players avatar image file eg. `C:\\image.png` or if not specified, stores \"\u003cUNSPECIFIED\u003e\"."},{"lineNumber":547,"author":{"gitId":"lithiumlkid"},"content":"Thereafter, if the avatar is specified when \u003c\u003cAddSequence,adding\u003e\u003e or editing a player, `setFilePath()` is called which will attempt to copy the image file to a `/image` folder that is in the same directory as the `MTM.jar` file."},{"lineNumber":548,"author":{"gitId":"lithiumlkid"},"content":"`value` is then updated to the new file path."},{"lineNumber":549,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":550,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for setFilePath() is shown below."},{"lineNumber":551,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":552,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":553,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":554,"author":{"gitId":"lithiumlkid"},"content":"public void setFilePath(String player) throws IOException {"},{"lineNumber":555,"author":{"gitId":"lithiumlkid"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {"},{"lineNumber":556,"author":{"gitId":"lithiumlkid"},"content":" return;"},{"lineNumber":557,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":558,"author":{"gitId":"lithiumlkid"},"content":" final File file \u003d new File(value);"},{"lineNumber":559,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":560,"author":{"gitId":"lithiumlkid"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();"},{"lineNumber":561,"author":{"gitId":"lithiumlkid"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any"},{"lineNumber":562,"author":{"gitId":"lithiumlkid"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);"},{"lineNumber":563,"author":{"gitId":"lithiumlkid"},"content":" this.value \u003d dest.toString();"},{"lineNumber":564,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":565,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":566,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":567,"author":{"gitId":"lithiumlkid"},"content":"// end::player[]"},{"lineNumber":568,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":569,"author":{"gitId":"-"},"content":"// tag::remark[]"},{"lineNumber":570,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Remark a Player `[since v1.1]`"},{"lineNumber":571,"author":{"gitId":"-"},"content":""},{"lineNumber":572,"author":{"gitId":"-"},"content":"Leaving a remark would be ideal for the user to note down any important detail of a player that is useful in the future."},{"lineNumber":573,"author":{"gitId":"-"},"content":"Remarks given can be in any format and therefore would not look good if it was done using tags instead, as tags are used with minimal words."},{"lineNumber":574,"author":{"gitId":"-"},"content":""},{"lineNumber":575,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":576,"author":{"gitId":"-"},"content":"The remark mechanism is facilitated by `RemarkCommand` and it inherits from `UndoableCommand`, making it undoable. The mechanism allows user to perform the adding, editing, and deleting of a single remark to a specified `Person` via the `INDEX` from the list shown in the `UI`. The field `remark` is similar to the other fields of `Person`, hence some of its logic in `AddCommand.java` and `EditCommand.java` are updated."},{"lineNumber":577,"author":{"gitId":"-"},"content":""},{"lineNumber":578,"author":{"gitId":"-"},"content":"The mechanism uses the command `remark` and a `r/` prefix to add, edit, and delete a single remark of a `Person`. When the user leaves the remark as empty after the `r/` prefix, it is an indication to delete the remark, and when it is valid, it either create a new remark for that `Person` or overwrites the current existing remark. Only one `remark` is saved at a time. If the user `remark` on the same person, it will be overwritten."},{"lineNumber":579,"author":{"gitId":"-"},"content":""},{"lineNumber":580,"author":{"gitId":"-"},"content":"The field `remark` is found in `Person`, and it is not modified via `add` or `edit` commands. All functions related to `remark` is done strictly via the `remark` command."},{"lineNumber":581,"author":{"gitId":"-"},"content":""},{"lineNumber":582,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remark` command:"},{"lineNumber":583,"author":{"gitId":"-"},"content":""},{"lineNumber":584,"author":{"gitId":"-"},"content":".Remark Activity Diagram"},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::RemarkActivityDiagram.png[width\u003d\"100%\"]"},{"lineNumber":586,"author":{"gitId":"-"},"content":""},{"lineNumber":587,"author":{"gitId":"-"},"content":"The `remark` field is not required when adding or editing a `Person`, and it will be initialized to an empty string or retrieved to fit the implementation of the other fields."},{"lineNumber":588,"author":{"gitId":"-"},"content":""},{"lineNumber":589,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows how remark is initialized as empty."},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":592,"author":{"gitId":"-"},"content":"----"},{"lineNumber":593,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":594,"author":{"gitId":"-"},"content":" //...AddCommandParser code..."},{"lineNumber":595,"author":{"gitId":"-"},"content":" Remark remark \u003d new Remark(\"\");"},{"lineNumber":596,"author":{"gitId":"-"},"content":""},{"lineNumber":597,"author":{"gitId":"-"},"content":" Person person \u003d new Person(name, phone, email, address, remark, teamName, tagList, rating,"},{"lineNumber":598,"author":{"gitId":"-"},"content":" position, jerseyNumber, avatar);"},{"lineNumber":599,"author":{"gitId":"-"},"content":" //...AddCommandParser code..."},{"lineNumber":600,"author":{"gitId":"lithiumlkid"},"content":"}"},{"lineNumber":601,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":602,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":603,"author":{"gitId":"-"},"content":"Code snippet from `EditCommand.java` that shows how remark is being retrieved."},{"lineNumber":604,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":605,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":606,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":607,"author":{"gitId":"-"},"content":"private static Person createEditedPerson(Person personToEdit,"},{"lineNumber":608,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":609,"author":{"gitId":"-"},"content":" //...EditCommand code..."},{"lineNumber":610,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate()) ? personToEdit.getRemark()"},{"lineNumber":611,"author":{"gitId":"-"},"content":" : personToEdit.getRemark();"},{"lineNumber":612,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":613,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":614,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber,"},{"lineNumber":615,"author":{"gitId":"-"},"content":" updatedAvatar);"},{"lineNumber":616,"author":{"gitId":"-"},"content":"}"},{"lineNumber":617,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":618,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":619,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` field"},{"lineNumber":621,"author":{"gitId":"-"},"content":""},{"lineNumber":622,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Creates an additional `remark` field in `Person`."},{"lineNumber":623,"author":{"gitId":"-"},"content":"** Pros: Follows the existing style of similar fields, making implementation easier."},{"lineNumber":624,"author":{"gitId":"-"},"content":"** Cons: Could only have 1 remark per person, unless `remark` mechanism follows the `tag` mechanism to have multiple remarks."},{"lineNumber":625,"author":{"gitId":"-"},"content":"* **Alternative 2:** Have a list of remarks that associates with the specified `Person`."},{"lineNumber":626,"author":{"gitId":"-"},"content":"** Pros: Can have multiple remarks associating with a specific `Person`."},{"lineNumber":627,"author":{"gitId":"-"},"content":"** Cons: Harder to maintain, more complicated."},{"lineNumber":628,"author":{"gitId":"-"},"content":""},{"lineNumber":629,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` command"},{"lineNumber":630,"author":{"gitId":"-"},"content":""},{"lineNumber":631,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Create a specific command for remarking `Person`."},{"lineNumber":632,"author":{"gitId":"-"},"content":"** Pros: Optional for user to enter remark during add, and have an isolated command to give remarks to a player that works as an add and edit command for remark."},{"lineNumber":633,"author":{"gitId":"-"},"content":"** Cons: Increases the number of commands available for the user, and could mistaken that remark can be done using add/edit command."},{"lineNumber":634,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make it similar to how other fields are implemented in `Person`."},{"lineNumber":635,"author":{"gitId":"-"},"content":"** Pros: Quick and easy implementation as it uses the same format as other fields, and can be added and modified through `add` and `edit` commands."},{"lineNumber":636,"author":{"gitId":"-"},"content":"** Cons: An additional field that can be input when adding a player, making the process longer to execute the command."},{"lineNumber":637,"author":{"gitId":"-"},"content":"// end::remark[]"},{"lineNumber":638,"author":{"gitId":"-"},"content":""},{"lineNumber":639,"author":{"gitId":"-"},"content":"// tag::privatefield[]"},{"lineNumber":640,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Setting various player fields to private `[since v1.4]`"},{"lineNumber":641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":642,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":643,"author":{"gitId":"lohtianwei"},"content":"`Phone`, `Email`, `Remark`, `Rating` and `Address` of a player has an additional boolean attribute"},{"lineNumber":644,"author":{"gitId":"lohtianwei"},"content":"`isPrivate` which tracks the privacy of the particular field. When a player is added into MTM, `isPrivate` of these"},{"lineNumber":645,"author":{"gitId":"lohtianwei"},"content":"fields are set to \u0027false\u0027 by default."},{"lineNumber":646,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":647,"author":{"gitId":"lohtianwei"},"content":"Each of these fields have a different `toString` method which would return `\u003cPrivate \u0027FIELD\u0027\u003e` if privacy of"},{"lineNumber":648,"author":{"gitId":"lohtianwei"},"content":"the field is set to \u0027true\u0027, as shown in the following code snippet:"},{"lineNumber":649,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":650,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":651,"author":{"gitId":"lohtianwei"},"content":"@Override"},{"lineNumber":652,"author":{"gitId":"lohtianwei"},"content":" public String toString() {"},{"lineNumber":653,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {"},{"lineNumber":654,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":655,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":656,"author":{"gitId":"lohtianwei"},"content":" return value;"},{"lineNumber":657,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":658,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":659,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":660,"author":{"gitId":"lohtianwei"},"content":"`XmlAdaptedPerson` under the storage portion has been edited to save the `isPrivate` value for the fields:"},{"lineNumber":661,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":662,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":663,"author":{"gitId":"lohtianwei"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":664,"author":{"gitId":"lohtianwei"},"content":" private Boolean phonePrivacy;"},{"lineNumber":665,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":666,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":667,"author":{"gitId":"lohtianwei"},"content":"Toggling of privacy works in a similar way to `Edit`. New fields will be created with privacy settings of `EditPersonPrivacy`"},{"lineNumber":668,"author":{"gitId":"lohtianwei"},"content":" based on user input. This is done by first detecting if a particular prefix is present when command is"},{"lineNumber":669,"author":{"gitId":"lohtianwei"},"content":"entered in `TogglePrivacyCommandParser`:"},{"lineNumber":670,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":671,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":672,"author":{"gitId":"lohtianwei"},"content":"if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":673,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);"},{"lineNumber":674,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":675,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":676,"author":{"gitId":"lohtianwei"},"content":"If prefix of a field is not present, the privacy setting of that particular field in `EditPersonPrivacy` would be null."},{"lineNumber":677,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":678,"author":{"gitId":"lohtianwei"},"content":"In `TogglePrivacyCommand`, the new fields are created with this:"},{"lineNumber":679,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":680,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":681,"author":{"gitId":"lohtianwei"},"content":"private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":682,"author":{"gitId":"lohtianwei"},"content":" Phone phone;"},{"lineNumber":683,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":684,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {"},{"lineNumber":685,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":686,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":687,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":688,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":689,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":690,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":691,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":692,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");"},{"lineNumber":693,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":694,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {"},{"lineNumber":695,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":696,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();"},{"lineNumber":697,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":698,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":699,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":700,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":701,"author":{"gitId":"lohtianwei"},"content":" return phone;"},{"lineNumber":702,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":703,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":704,"author":{"gitId":"lohtianwei"},"content":"Note that in the second portion of the code, if `epp.getPrivatePhone()` is null, this would mean that it\u0027s privacy"},{"lineNumber":705,"author":{"gitId":"lohtianwei"},"content":"setting was not toggled and thus is set to the same as it was before. Else, it would be toggled:"},{"lineNumber":706,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":707,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":708,"author":{"gitId":"lohtianwei"},"content":"public void togglePrivacy() {"},{"lineNumber":709,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":710,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":711,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":712,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":713,"author":{"gitId":"lohtianwei"},"content":"A new person object is then created:"},{"lineNumber":714,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":715,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":716,"author":{"gitId":"lohtianwei"},"content":"private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)"},{"lineNumber":717,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {"},{"lineNumber":718,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":719,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":720,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();"},{"lineNumber":721,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);"},{"lineNumber":722,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);"},{"lineNumber":723,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);"},{"lineNumber":724,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);"},{"lineNumber":725,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();"},{"lineNumber":726,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();"},{"lineNumber":727,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);"},{"lineNumber":728,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();"},{"lineNumber":729,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();"},{"lineNumber":730,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();"},{"lineNumber":731,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":732,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":733,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);"},{"lineNumber":734,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":735,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":736,"author":{"gitId":"lohtianwei"},"content":"and is used to update current person:"},{"lineNumber":737,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":738,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":739,"author":{"gitId":"lohtianwei"},"content":"model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":740,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":741,"author":{"gitId":"-"},"content":""},{"lineNumber":742,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":743,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How field privacy is implemented"},{"lineNumber":744,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":745,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Boolean `isPrivate` added to field classes."},{"lineNumber":746,"author":{"gitId":"lohtianwei"},"content":"** Pros: Privacy settings can be obtained straight from class by calling getter method."},{"lineNumber":747,"author":{"gitId":"lohtianwei"},"content":"** Cons: Adddtional methods are needed to set and get value of `isPrivate`."},{"lineNumber":748,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Field privacy settings stored in `Person` in a HashMap."},{"lineNumber":749,"author":{"gitId":"lohtianwei"},"content":"** Pros: Field privacy can be accessed and modified easily"},{"lineNumber":750,"author":{"gitId":"lohtianwei"},"content":"** Cons: `Person` has to be accessed every time field privacy needs to be checked"},{"lineNumber":751,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":752,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Privacy of fields upon adding of player"},{"lineNumber":753,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":754,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** All newly added players\u0027 fields are not private by default."},{"lineNumber":755,"author":{"gitId":"lohtianwei"},"content":"** Pros: `Add` command does not need to be tweaked to allow adding player with private fields."},{"lineNumber":756,"author":{"gitId":"lohtianwei"},"content":"** Cons: After adding players, user has to do additional command to toggle privacy of fields."},{"lineNumber":757,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Include implementation of prefixes that denotes private field during `Add`."},{"lineNumber":758,"author":{"gitId":"lohtianwei"},"content":"** Pros: Newly added players can have private fields right away."},{"lineNumber":759,"author":{"gitId":"lohtianwei"},"content":"** Cons: Addtional changes has to be made to `Add` command."},{"lineNumber":760,"author":{"gitId":"-"},"content":"// end::privatefield[]"},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":762,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]"},{"lineNumber":763,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Sorting players by fields `[since v1.2]`"},{"lineNumber":764,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":765,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":766,"author":{"gitId":"lohtianwei"},"content":"The `sort` command is currently able to sort players by name, email, address, rating, jersey and postition in either ascending or descending order. Support for more fields will be added in subsequent updates."},{"lineNumber":767,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":768,"author":{"gitId":"lohtianwei"},"content":"* The `sort` command is parsed through `SortCommandParser` which hands control to the `SortCommand` class."},{"lineNumber":769,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":770,"author":{"gitId":"lohtianwei"},"content":"* Java Collections Sort API is used together with a custom `Comparator` in this implementation"},{"lineNumber":771,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":772,"author":{"gitId":"lohtianwei"},"content":"Sorting is facilitated by the `SortCommand` which uses method `sortPlayers` to ultimately call method `sortBy` in UniquePersonList for the actual sorting as shown in this code snippet:"},{"lineNumber":773,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":774,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":775,"author":{"gitId":"lohtianwei"},"content":" switch (field) {"},{"lineNumber":776,"author":{"gitId":"lohtianwei"},"content":" case \"name\":"},{"lineNumber":777,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;"},{"lineNumber":778,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":779,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":780,"author":{"gitId":"lohtianwei"},"content":" //... code for other switch cases..."},{"lineNumber":781,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":782,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":783,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":784,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":785,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":786,"author":{"gitId":"lohtianwei"},"content":" switch (order) {"},{"lineNumber":787,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":"},{"lineNumber":788,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":789,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":790,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":791,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":"},{"lineNumber":792,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":793,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":794,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":795,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":796,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":797,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":798,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":799,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":800,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":801,"author":{"gitId":"lohtianwei"},"content":"The code above utilises a custom `Comparator` defined in the sample code below:"},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":803,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":804,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":805,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);"},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":809,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":810,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":811,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":812,"author":{"gitId":"lohtianwei"},"content":"The following sequence diagram shows the program flow when `sort` is used:"},{"lineNumber":813,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":".Sort Sequence Diagram"},{"lineNumber":815,"author":{"gitId":"lohtianwei"},"content":"image::sortSeq.png[width\u003d\"900\"]"},{"lineNumber":816,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":817,"author":{"gitId":"lohtianwei"},"content":"[NOTE]"},{"lineNumber":818,"author":{"gitId":"lohtianwei"},"content":"If address book is empty, a `NoPlayerException` will be thrown by `sortBy` method in UniquePlayerList."},{"lineNumber":819,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":820,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":821,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `sort`"},{"lineNumber":822,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":823,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sorting is done in `UniquePersonList`."},{"lineNumber":824,"author":{"gitId":"lohtianwei"},"content":"** Pros: Sorting methods resides in class that handles most operations done to list. Future changes to implementation would be easier."},{"lineNumber":825,"author":{"gitId":"-"},"content":"** Cons: Complicated flow of control passed between classes."},{"lineNumber":826,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sorting is done in `SortCommand`."},{"lineNumber":827,"author":{"gitId":"-"},"content":"** Pros: Easier to trace flow of control as lesser passing between classes."},{"lineNumber":828,"author":{"gitId":"-"},"content":"** Cons: Unnecessary coupling if `UniquePersonList` has to rely on `SortCommand`."},{"lineNumber":829,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":830,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort by multiple fields"},{"lineNumber":831,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":832,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sort can only be done by 1 field."},{"lineNumber":833,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and input is straightforward."},{"lineNumber":834,"author":{"gitId":"-"},"content":"** Cons: Unable to fine tune to great detail how teams are sorted and displayed."},{"lineNumber":835,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sort can be done by multiple fields."},{"lineNumber":836,"author":{"gitId":"-"},"content":"** Pros: Able to fine tune to great detail how teams are sorted and displayed."},{"lineNumber":837,"author":{"gitId":"-"},"content":"** Cons: Unnecessary as team managers would not need to sort players by multiple fields."},{"lineNumber":838,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":839,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort Persistence"},{"lineNumber":840,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Address book is saved after sorting."},{"lineNumber":842,"author":{"gitId":"lohtianwei"},"content":"** Pros: Easy to implement. Allows team managers to use preferred sort pattern in every session."},{"lineNumber":843,"author":{"gitId":"lohtianwei"},"content":"** Cons: Previous order of players will be lost."},{"lineNumber":844,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Address book is not saved after sorting."},{"lineNumber":845,"author":{"gitId":"-"},"content":"** Pros: Good if team manager wants to sort players for current session only."},{"lineNumber":846,"author":{"gitId":"lohtianwei"},"content":"** Cons: Sort order is lost when program exits. More memory is used to sort a list and reverse it after."},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]"},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":849,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Team-Related Enhancements"},{"lineNumber":850,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":851,"author":{"gitId":"-"},"content":"// tag::team[]"},{"lineNumber":852,"author":{"gitId":"lithiumlkid"},"content":"[[team]]"},{"lineNumber":853,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Component `[since v1.2]`"},{"lineNumber":854,"author":{"gitId":"-"},"content":""},{"lineNumber":855,"author":{"gitId":"-"},"content":"One of the core components to MTM is `Team`, and it is the base to creating more commands for the user to access capability on team management. The `Team` component provides user with better organizational methods for organizing their players and interact with multiple teams to manage them effectively."},{"lineNumber":856,"author":{"gitId":"-"},"content":""},{"lineNumber":857,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":858,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":859,"author":{"gitId":"-"},"content":"We achieved the implementation of `Team` component by introducing a `UniqueTeamList` into the application which consists of a list of `Team` objects. `UniqueTeamList` is similar in context to `UniquePersonList` in which it keeps a unique list of all the `Team` objects. `Team` objects consist of `TeamName` object, which is used to uniquely identify the team. `Team` inherits `UniquePersonList` object which stores the a list of unique `Person` objects, containing information of the player."},{"lineNumber":860,"author":{"gitId":"-"},"content":""},{"lineNumber":861,"author":{"gitId":"-"},"content":"The class diagrams below shoes the relationship between the related classes. The Team Class Diagrams are an extension to the current existing Designs of \u003c\u003cDesign-Model, `Model`\u003e\u003e, \u003c\u003cDesign-Storage, `Storage`\u003e\u003e, and \u003c\u003cDesign-Ui, `UI`\u003e\u003e."},{"lineNumber":862,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":863,"author":{"gitId":"-"},"content":".Model Component: Team Class Diagram"},{"lineNumber":864,"author":{"gitId":"-"},"content":"image::TeamModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":865,"author":{"gitId":"-"},"content":""},{"lineNumber":866,"author":{"gitId":"-"},"content":".Storage Component: Team Class Diagram"},{"lineNumber":867,"author":{"gitId":"-"},"content":"image::TeamStorageClassDiagram.png[width\u003d\"400\"]"},{"lineNumber":868,"author":{"gitId":"-"},"content":""},{"lineNumber":869,"author":{"gitId":"-"},"content":".UI Component: Team Class Diagram"},{"lineNumber":870,"author":{"gitId":"-"},"content":"image::TeamUiClassDiagram.png[width\u003d\"400\"]"},{"lineNumber":871,"author":{"gitId":"-"},"content":""},{"lineNumber":872,"author":{"gitId":"-"},"content":"Code snippet from `Team.java` that shows the constructor for `Team`."},{"lineNumber":873,"author":{"gitId":"-"},"content":""},{"lineNumber":874,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":875,"author":{"gitId":"-"},"content":"----"},{"lineNumber":876,"author":{"gitId":"-"},"content":"public class Team {"},{"lineNumber":877,"author":{"gitId":"-"},"content":" private final TeamName teamName;"},{"lineNumber":878,"author":{"gitId":"-"},"content":""},{"lineNumber":879,"author":{"gitId":"-"},"content":" public Team(TeamName teamName) {"},{"lineNumber":880,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;"},{"lineNumber":881,"author":{"gitId":"-"},"content":" }"},{"lineNumber":882,"author":{"gitId":"-"},"content":"}"},{"lineNumber":883,"author":{"gitId":"-"},"content":"----"},{"lineNumber":884,"author":{"gitId":"-"},"content":""},{"lineNumber":885,"author":{"gitId":"-"},"content":"For the application to store the information of `Team` into a list, we will need to introduce a new `UniqueTeamList` variable into the `AddressBook.java`, so that it will have a container for all the new `Team` objects that is going to be created in MTM."},{"lineNumber":886,"author":{"gitId":"-"},"content":""},{"lineNumber":887,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the declaration and initialization of `UniqueTeamList`."},{"lineNumber":888,"author":{"gitId":"-"},"content":""},{"lineNumber":889,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":890,"author":{"gitId":"-"},"content":"----"},{"lineNumber":891,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":892,"author":{"gitId":"-"},"content":" //...AddressBook code..."},{"lineNumber":893,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;"},{"lineNumber":894,"author":{"gitId":"-"},"content":""},{"lineNumber":895,"author":{"gitId":"-"},"content":" {"},{"lineNumber":896,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList;"},{"lineNumber":897,"author":{"gitId":"-"},"content":" }"},{"lineNumber":898,"author":{"gitId":"-"},"content":""},{"lineNumber":899,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {"},{"lineNumber":900,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);"},{"lineNumber":901,"author":{"gitId":"-"},"content":" }"},{"lineNumber":902,"author":{"gitId":"-"},"content":""},{"lineNumber":903,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":904,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {"},{"lineNumber":905,"author":{"gitId":"-"},"content":" return teams.asObservableList();"},{"lineNumber":906,"author":{"gitId":"-"},"content":" }"},{"lineNumber":907,"author":{"gitId":"-"},"content":" //...AddressBook code..."},{"lineNumber":908,"author":{"gitId":"-"},"content":"}"},{"lineNumber":909,"author":{"gitId":"-"},"content":"----"},{"lineNumber":910,"author":{"gitId":"-"},"content":""},{"lineNumber":911,"author":{"gitId":"-"},"content":"Since `Team` inherits the `UniquePersonList` class, we are able to store `Person` object into `Team` by using the super class method `add` in `UniquePersonList`. By storing a list of players inside `Team` object, future enhancements can easily make use of the data to perform functions that requires quick access to all players in a team. However, this have created a coupling in which data made to the `changes made to `AddressBook.persons` needs to be updated in `Team` to maintain synchronicity."},{"lineNumber":912,"author":{"gitId":"-"},"content":""},{"lineNumber":913,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the propagation of details updated in `Person` from the full player list to the `Person` objects in `Team`."},{"lineNumber":914,"author":{"gitId":"-"},"content":""},{"lineNumber":915,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":916,"author":{"gitId":"-"},"content":"----"},{"lineNumber":917,"author":{"gitId":"-"},"content":"public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":918,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":919,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":920,"author":{"gitId":"-"},"content":" //...syncEditedPerson initialisation..."},{"lineNumber":921,"author":{"gitId":"-"},"content":""},{"lineNumber":922,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":923,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);"},{"lineNumber":924,"author":{"gitId":"-"},"content":" }"},{"lineNumber":925,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);"},{"lineNumber":926,"author":{"gitId":"-"},"content":"}"},{"lineNumber":927,"author":{"gitId":"-"},"content":"----"},{"lineNumber":928,"author":{"gitId":"-"},"content":""},{"lineNumber":929,"author":{"gitId":"-"},"content":"An additional `TeamName` field is also added to `Person` so that the user can quickly determine the team the player is in through the use of `PREDICATE`."},{"lineNumber":930,"author":{"gitId":"-"},"content":""},{"lineNumber":931,"author":{"gitId":"-"},"content":"Code snippet from `Person.java` that shows the `TeamName` field."},{"lineNumber":932,"author":{"gitId":"-"},"content":""},{"lineNumber":933,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":934,"author":{"gitId":"-"},"content":"----"},{"lineNumber":935,"author":{"gitId":"-"},"content":"public class Person {"},{"lineNumber":936,"author":{"gitId":"-"},"content":""},{"lineNumber":937,"author":{"gitId":"-"},"content":" private final TeamName teamName;"},{"lineNumber":938,"author":{"gitId":"-"},"content":""},{"lineNumber":939,"author":{"gitId":"-"},"content":" public Person(Name name, Phone phone, Email email, Address address, Remark remark,"},{"lineNumber":940,"author":{"gitId":"-"},"content":" TeamName teamName, Set\u003cTag\u003e tags, Rating rating, Position position,"},{"lineNumber":941,"author":{"gitId":"-"},"content":" JerseyNumber jerseyNumber, Avatar avatar) {"},{"lineNumber":942,"author":{"gitId":"-"},"content":" //...attributes initialisation..."},{"lineNumber":943,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;"},{"lineNumber":944,"author":{"gitId":"-"},"content":" }"},{"lineNumber":945,"author":{"gitId":"-"},"content":""},{"lineNumber":946,"author":{"gitId":"-"},"content":" public TeamName getTeamName() {"},{"lineNumber":947,"author":{"gitId":"-"},"content":" return teamName;"},{"lineNumber":948,"author":{"gitId":"-"},"content":" }"},{"lineNumber":949,"author":{"gitId":"-"},"content":"}"},{"lineNumber":950,"author":{"gitId":"-"},"content":"----"},{"lineNumber":951,"author":{"gitId":"-"},"content":""},{"lineNumber":952,"author":{"gitId":"-"},"content":"Code snippet from `ModelManager.java` that shows the use of filtering the person list using the `TeamName` field in `Person`."},{"lineNumber":953,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":954,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":955,"author":{"gitId":"-"},"content":"----"},{"lineNumber":956,"author":{"gitId":"-"},"content":"@Override"},{"lineNumber":957,"author":{"gitId":"-"},"content":"public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {"},{"lineNumber":958,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);"},{"lineNumber":959,"author":{"gitId":"-"},"content":""},{"lineNumber":960,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();"},{"lineNumber":961,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":962,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {"},{"lineNumber":963,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));"},{"lineNumber":964,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":965,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();"},{"lineNumber":966,"author":{"gitId":"-"},"content":" }"},{"lineNumber":967,"author":{"gitId":"-"},"content":"}"},{"lineNumber":968,"author":{"gitId":"-"},"content":"----"},{"lineNumber":969,"author":{"gitId":"-"},"content":""},{"lineNumber":970,"author":{"gitId":"-"},"content":"Additional exception classes are also created so that these new exceptions can be thrown during the program, such that when these exceptions are thrown, the code is easily comprehensible."},{"lineNumber":971,"author":{"gitId":"-"},"content":""},{"lineNumber":972,"author":{"gitId":"-"},"content":".`TeamNotFoundException.java`"},{"lineNumber":973,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":974,"author":{"gitId":"-"},"content":"----"},{"lineNumber":975,"author":{"gitId":"-"},"content":"public class TeamNotFoundException extends Exception {"},{"lineNumber":976,"author":{"gitId":"-"},"content":" //...TeamNotFoundException..."},{"lineNumber":977,"author":{"gitId":"-"},"content":"}"},{"lineNumber":978,"author":{"gitId":"-"},"content":"----"},{"lineNumber":979,"author":{"gitId":"-"},"content":""},{"lineNumber":980,"author":{"gitId":"-"},"content":".`DupliecateTeamException.java`"},{"lineNumber":981,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":982,"author":{"gitId":"-"},"content":"----"},{"lineNumber":983,"author":{"gitId":"-"},"content":"public class DuplicateTeamException extends DuplicateDataException {"},{"lineNumber":984,"author":{"gitId":"-"},"content":" //...DuplicateTeamException..."},{"lineNumber":985,"author":{"gitId":"-"},"content":"}"},{"lineNumber":986,"author":{"gitId":"-"},"content":"----"},{"lineNumber":987,"author":{"gitId":"-"},"content":""},{"lineNumber":988,"author":{"gitId":"-"},"content":"Implementing a new component into MTM, the data consisting of `Team` is also stored into storage using `XmlAdaptedTeam.java` to format the output."},{"lineNumber":989,"author":{"gitId":"-"},"content":""},{"lineNumber":990,"author":{"gitId":"-"},"content":"Code snippet from `XmlAdaptedTeam.java` that shows the elements that will be stored into storage."},{"lineNumber":991,"author":{"gitId":"-"},"content":""},{"lineNumber":992,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":993,"author":{"gitId":"-"},"content":"----"},{"lineNumber":994,"author":{"gitId":"-"},"content":"public class XmlAdaptedTeam {"},{"lineNumber":995,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":996,"author":{"gitId":"-"},"content":" private String teamName;"},{"lineNumber":997,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":998,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();"},{"lineNumber":999,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1001,"author":{"gitId":"-"},"content":""},{"lineNumber":1002,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Team`"},{"lineNumber":1004,"author":{"gitId":"-"},"content":""},{"lineNumber":1005,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `Team` object stores a `Person` object that is also in `UniquePersonList` and `TeamName` is also an attribute of `Person`."},{"lineNumber":1006,"author":{"gitId":"-"},"content":"** Pros: Provides an easier lookup of person belonging in which team without the need of iterating through the `UniqueTeamList` for a specific `Person`, and provide ease of access to data for future enhancements."},{"lineNumber":1007,"author":{"gitId":"-"},"content":"** Cons: Checks to ensure synchronicity need to be done thoroughly to ensure that player information is in sync between Team and full player list"},{"lineNumber":1008,"author":{"gitId":"-"},"content":"* **Alternative 2:** `Team` object is stored in `Person` object as an attribute."},{"lineNumber":1009,"author":{"gitId":"-"},"content":"** Pros: Logical thought process to include `Team` as an attribute."},{"lineNumber":1010,"author":{"gitId":"-"},"content":"** Cons: Excess storage wasted due to duplicated data of `Team` in every `Person`."},{"lineNumber":1011,"author":{"gitId":"-"},"content":"// end::team[]"},{"lineNumber":1012,"author":{"gitId":"-"},"content":""},{"lineNumber":1013,"author":{"gitId":"-"},"content":"// tag::teamfunction[]"},{"lineNumber":1014,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Functions `[since v1.4]`"},{"lineNumber":1015,"author":{"gitId":"-"},"content":""},{"lineNumber":1016,"author":{"gitId":"-"},"content":"To assist the user with manging teams, we have decided to use the design concept of Create-Read-Update-Delete (CRUD) to implement commands related to `Team`."},{"lineNumber":1017,"author":{"gitId":"-"},"content":"This set of commands provide the basic necessities for the user to efficiently use our application."},{"lineNumber":1018,"author":{"gitId":"-"},"content":""},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1020,"author":{"gitId":"-"},"content":""},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Based on the principles of CRUD, we have created the commands that corresponds to each principles, namely, `create`, `view`, `rename` and `assign`, `remove`."},{"lineNumber":1022,"author":{"gitId":"-"},"content":"With these commands, the application is ready to support the features that the application is designed to be used."},{"lineNumber":1023,"author":{"gitId":"-"},"content":""},{"lineNumber":1024,"author":{"gitId":"-"},"content":"Team-related commands that modifies the data in the application, such as `create`, `rename`, `assign`, and `remove`, inherits from `UndoableCommand` class which makes all these commands undoable. Each command has its own `Parser` to uniquely parse user input arguments for the commands, so that it is validated and the command understand what it should be doing."},{"lineNumber":1025,"author":{"gitId":"-"},"content":""},{"lineNumber":1026,"author":{"gitId":"-"},"content":"For each feature, new functions are created in `AddressBook.java` and `ModelManager.java` so that the commands executed are able to manipulate the data accordingly."},{"lineNumber":1027,"author":{"gitId":"-"},"content":""},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `create`: Creates a `Team`, so that other team-related commands can be executed."},{"lineNumber":1029,"author":{"gitId":"-"},"content":"After the creation of a new team, the user will then be able to perform a new set of commands that performs team management functionality. Moreover, the `add` command can be used with the prefix `tm/` to immediately add the user into MTM and into the team specified."},{"lineNumber":1030,"author":{"gitId":"-"},"content":""},{"lineNumber":1031,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `create` command:"},{"lineNumber":1032,"author":{"gitId":"-"},"content":""},{"lineNumber":1033,"author":{"gitId":"-"},"content":".Logic Component: Create Sequence Diagram"},{"lineNumber":1034,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram1.png[width\u003d\"100%\"]"},{"lineNumber":1035,"author":{"gitId":"-"},"content":""},{"lineNumber":1036,"author":{"gitId":"-"},"content":".Model Component: Create Sequence Diagram"},{"lineNumber":1037,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram2.png[width\u003d\"70%\"]"},{"lineNumber":1038,"author":{"gitId":"-"},"content":""},{"lineNumber":1039,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `view`: Views a `Team`, which shows all players in the team."},{"lineNumber":1040,"author":{"gitId":"-"},"content":"The command uses the `filteredPersons` list, and an overloaded `updateFilteredPersonList` method that sets a predicate that filters the list based on a `TeamName`, in `ModelManager.java` so that it can be displayed via the UI."},{"lineNumber":1041,"author":{"gitId":"-"},"content":""},{"lineNumber":1042,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `view` command:"},{"lineNumber":1043,"author":{"gitId":"-"},"content":""},{"lineNumber":1044,"author":{"gitId":"-"},"content":".View Sequence Diagram"},{"lineNumber":1045,"author":{"gitId":"-"},"content":"image::TeamViewSequenceDiagram.png[width\u003d\"100%\"]"},{"lineNumber":1046,"author":{"gitId":"-"},"content":""},{"lineNumber":1047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `rename`: Renames a given `Team`."},{"lineNumber":1048,"author":{"gitId":"-"},"content":"The user can rename a specified team to a new team name only if the current team name does not existing in MTM. On a side note, it prevents the user from renaming the team to the same name that it currently have."},{"lineNumber":1049,"author":{"gitId":"-"},"content":""},{"lineNumber":1050,"author":{"gitId":"-"},"content":"This command will update the name of the teams that are in `teams` in `AddressBook.java` and will update all the players `TeamName` field in `persons` and `Team` with the new team name."},{"lineNumber":1051,"author":{"gitId":"-"},"content":""},{"lineNumber":1052,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `rename` command:"},{"lineNumber":1053,"author":{"gitId":"-"},"content":""},{"lineNumber":1054,"author":{"gitId":"-"},"content":".Logic Component: Rename Sequence Diagram"},{"lineNumber":1055,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram1.png[width\u003d\"100%\"]"},{"lineNumber":1056,"author":{"gitId":"-"},"content":""},{"lineNumber":1057,"author":{"gitId":"-"},"content":".Model Component: Rename Sequence Diagram"},{"lineNumber":1058,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram2.png[width\u003d\"70%\"]"},{"lineNumber":1059,"author":{"gitId":"-"},"content":""},{"lineNumber":1060,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `assign`: Assign a set of `Person` to a specified `Team`."},{"lineNumber":1061,"author":{"gitId":"-"},"content":"The core feature that organizes the player into teams so that the user can easily view the desired team players quickly. The command have 2 functions, firstly it is able to assign an individual or a set of players to a specified team, and secondly, it is able to unassign an individual or a set of players from any team."},{"lineNumber":1062,"author":{"gitId":"-"},"content":""},{"lineNumber":1063,"author":{"gitId":"-"},"content":"The command takes in a set of indexes that corresponds to the player in the current list, and will perform the assign operation in ascending index order. If the command is unable to process an index given, it will process all the valid index until the index that causes an issue."},{"lineNumber":1064,"author":{"gitId":"-"},"content":""},{"lineNumber":1065,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1066,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Typical issues that the command handles are,"},{"lineNumber":1068,"author":{"gitId":"-"},"content":""},{"lineNumber":1069,"author":{"gitId":"-"},"content":"* Assigning a player to the same team that it is currently in."},{"lineNumber":1070,"author":{"gitId":"-"},"content":"* Assigning a player to team that does not exist."},{"lineNumber":1071,"author":{"gitId":"-"},"content":"* Unassigning a player that does not exist in any team."},{"lineNumber":1072,"author":{"gitId":"-"},"content":"* Process index starting from 1."},{"lineNumber":1073,"author":{"gitId":"-"},"content":"* Removes all index that exceeds the current number of player listed."},{"lineNumber":1074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"-"},"content":"This command will update and synchronise all affected players in `persons` and in the specified `Team` object, such that their `TeamName` field in `Person` are updated with the new assigned or unassigned team. At the same time, the list of players in `Team` gets update if new player are assigned or unassigned."},{"lineNumber":1077,"author":{"gitId":"-"},"content":""},{"lineNumber":1078,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `assign` command:"},{"lineNumber":1079,"author":{"gitId":"-"},"content":""},{"lineNumber":1080,"author":{"gitId":"-"},"content":".Assign Sequence Diagram"},{"lineNumber":1081,"author":{"gitId":"-"},"content":"image::TeamAssignSequenceDiagram.png[width\u003d\"100%\"]"},{"lineNumber":1082,"author":{"gitId":"-"},"content":""},{"lineNumber":1083,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `remove`: Removes the given `Team`."},{"lineNumber":1084,"author":{"gitId":"-"},"content":"The final step in completing the CRUD design is the removal of team. It will delete the `Team` from `teams` list in `AddressBook.java` and will update all affected players in the team to be unassigned from the team by having their `TeamName` field updated with an unspecifed field."},{"lineNumber":1085,"author":{"gitId":"-"},"content":""},{"lineNumber":1086,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remove` command:"},{"lineNumber":1087,"author":{"gitId":"-"},"content":""},{"lineNumber":1088,"author":{"gitId":"-"},"content":".Logic Component: Remove Sequence Diagram"},{"lineNumber":1089,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram1.png[width\u003d\"100%\"]"},{"lineNumber":1090,"author":{"gitId":"-"},"content":""},{"lineNumber":1091,"author":{"gitId":"-"},"content":".Model Component: Remove Sequence Diagram"},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram2.png[width\u003d\"70%\"]"},{"lineNumber":1093,"author":{"gitId":"-"},"content":""},{"lineNumber":1094,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Team Functions"},{"lineNumber":1096,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Uses CRUD design concept to create new commands."},{"lineNumber":1097,"author":{"gitId":"-"},"content":"** Pros: Systematic approach in dealing with what functions should be created to ensure that the product has the features required to perform team management, and provides a platform to work on ideal features that target the needs of the audience."},{"lineNumber":1098,"author":{"gitId":"-"},"content":"** Cons: Simple and only captures the basic requirements of the product."},{"lineNumber":1099,"author":{"gitId":"-"},"content":"* **Alternative 2:** Implement commands based on suggested features."},{"lineNumber":1100,"author":{"gitId":"-"},"content":"** Pros: End product will have features that targets the need of the audiences."},{"lineNumber":1101,"author":{"gitId":"-"},"content":"** Cons: Possible to miss out basic and core features of a team management application."},{"lineNumber":1102,"author":{"gitId":"-"},"content":""},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Undoable commands for Team Functions"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Make all functions that modifies data to be undoable."},{"lineNumber":1105,"author":{"gitId":"-"},"content":"** Pros: Follows the current implementation of `undo` such that if data are modified in MTM, it will be an undoable command."},{"lineNumber":1106,"author":{"gitId":"-"},"content":"** Cons: Need to ensure that regression bugs are squashed when the new commands are executed, and time consuming in identifying regression."},{"lineNumber":1107,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make all functions not undoable."},{"lineNumber":1108,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and will produce lesser regression bugs."},{"lineNumber":1109,"author":{"gitId":"-"},"content":"** Cons: Does not align with the current implementation of `undo` \u0026 `redo`, and the user would require more steps to revert any changes made."},{"lineNumber":1110,"author":{"gitId":"-"},"content":"// end::teamfunction[]"},{"lineNumber":1111,"author":{"gitId":"-"},"content":""},{"lineNumber":1112,"author":{"gitId":"-"},"content":"// tag::showbestxi[]"},{"lineNumber":1113,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Show Best XI `[coming in v2.0]`"},{"lineNumber":1114,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1115,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1116,"author":{"gitId":"lohtianwei"},"content":"The `showBest` command is able to show the current team\u0027s best 11 players. There is however no functional implementation for this feature yet. Coming soon!"},{"lineNumber":1117,"author":{"gitId":"-"},"content":"// end::showbestxi[]"},{"lineNumber":1118,"author":{"gitId":"-"},"content":""},{"lineNumber":1119,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Usability Enhancements"},{"lineNumber":1120,"author":{"gitId":"-"},"content":""},{"lineNumber":1121,"author":{"gitId":"-"},"content":"// tag::key[]"},{"lineNumber":1122,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Toggle lock on MTM `[since v1.5]`"},{"lineNumber":1123,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1124,"author":{"gitId":"-"},"content":"Locking mechanism of MTM can be toggled on and off using the `Key` command. It utilises the Model to access"},{"lineNumber":1125,"author":{"gitId":"-"},"content":"user preferences of MTM. Current lock state and password is stored in `UserPrefs` in the Storage component."},{"lineNumber":1126,"author":{"gitId":"-"},"content":""},{"lineNumber":1127,"author":{"gitId":"lohtianwei"},"content":"This activity diagram shows the logic behind the `Key` command:"},{"lineNumber":1128,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1129,"author":{"gitId":"lohtianwei"},"content":".Key Activity Diagram"},{"lineNumber":1130,"author":{"gitId":"lohtianwei"},"content":"image::Keyactdiag.png[width\u003d\"900\"]"},{"lineNumber":1131,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1132,"author":{"gitId":"-"},"content":"Password checking done in `Key` command:"},{"lineNumber":1133,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1134,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1135,"author":{"gitId":"-"},"content":"private boolean correctPassword() {"},{"lineNumber":1136,"author":{"gitId":"-"},"content":" UserPrefs up \u003d model.getUserPrefs();"},{"lineNumber":1137,"author":{"gitId":"-"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":1138,"author":{"gitId":"-"},"content":" return hash.equals(up.getAddressBookHashedPass());"},{"lineNumber":1139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1140,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1141,"author":{"gitId":"-"},"content":"When password check is done, the lock on MTM is toggled to the state opposite of the current:"},{"lineNumber":1142,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1143,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1144,"author":{"gitId":"-"},"content":"if (correctPassword()) {"},{"lineNumber":1145,"author":{"gitId":"-"},"content":" if (model.getLockState()) {"},{"lineNumber":1146,"author":{"gitId":"-"},"content":" model.unlockAddressBookModel();"},{"lineNumber":1147,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1148,"author":{"gitId":"-"},"content":" model.lockAddressBookModel();"},{"lineNumber":1149,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1150,"author":{"gitId":"-"},"content":""},{"lineNumber":1151,"author":{"gitId":"-"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":1152,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":1153,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1154,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1155,"author":{"gitId":"-"},"content":""},{"lineNumber":1156,"author":{"gitId":"-"},"content":"In a locked state, only certain functions of MTM can be used. This is to prevent unauthorised tampering with the details"},{"lineNumber":1157,"author":{"gitId":"-"},"content":"stored on MTM."},{"lineNumber":1158,"author":{"gitId":"-"},"content":""},{"lineNumber":1159,"author":{"gitId":"-"},"content":"This is done in `AddressBookParser`. Commands are split into low level or not. When a command is"},{"lineNumber":1160,"author":{"gitId":"-"},"content":"being executed, it is checked if it falls under the low level category. If so, it would execute. When adding new features,"},{"lineNumber":1161,"author":{"gitId":"-"},"content":"add them to this list should you feel it is \u0027low level\u0027:"},{"lineNumber":1162,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1163,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1164,"author":{"gitId":"-"},"content":"private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {"},{"lineNumber":1165,"author":{"gitId":"-"},"content":" switch(commandWord) {"},{"lineNumber":1166,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_WORD:"},{"lineNumber":1167,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:"},{"lineNumber":1168,"author":{"gitId":"-"},"content":" return new ChangeThemeCommandParser().parse(arguments);"},{"lineNumber":1169,"author":{"gitId":"-"},"content":""},{"lineNumber":1170,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":1171,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":1172,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":1173,"author":{"gitId":"-"},"content":""},{"lineNumber":1174,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":1175,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":1176,"author":{"gitId":"-"},"content":" return new ListCommand();"},{"lineNumber":1177,"author":{"gitId":"-"},"content":""},{"lineNumber":1178,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_WORD:"},{"lineNumber":1179,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_ALIAS:"},{"lineNumber":1180,"author":{"gitId":"-"},"content":" return new KeyCommandParser().parse(arguments);"},{"lineNumber":1181,"author":{"gitId":"-"},"content":""},{"lineNumber":1182,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_WORD:"},{"lineNumber":1183,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_ALIAS:"},{"lineNumber":1184,"author":{"gitId":"-"},"content":" return new ViewCommandParser().parse(arguments);"},{"lineNumber":1185,"author":{"gitId":"-"},"content":""},{"lineNumber":1186,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":1187,"author":{"gitId":"-"},"content":" return new ExitCommand();"},{"lineNumber":1188,"author":{"gitId":"-"},"content":""},{"lineNumber":1189,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":1190,"author":{"gitId":"-"},"content":" return new HelpCommand();"},{"lineNumber":1191,"author":{"gitId":"-"},"content":""},{"lineNumber":1192,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":1193,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":1194,"author":{"gitId":"-"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":1195,"author":{"gitId":"-"},"content":""},{"lineNumber":1196,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":1197,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":1198,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1200,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1201,"author":{"gitId":"-"},"content":"If command being executed does not fall into the category of \u0027low level\u0027, a check on the lock state of MTM is done"},{"lineNumber":1202,"author":{"gitId":"-"},"content":"before allowing or restricting access:"},{"lineNumber":1203,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1204,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1205,"author":{"gitId":"-"},"content":"if (lockState) {"},{"lineNumber":1206,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_RESTRICTED);"},{"lineNumber":1207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1208,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1209,"author":{"gitId":"-"},"content":""},{"lineNumber":1210,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1211,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of locking MTM"},{"lineNumber":1212,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Lock is toggled with only a single command `Key`."},{"lineNumber":1213,"author":{"gitId":"-"},"content":"** Pros: Easy to implement, just check current lock state and switch it."},{"lineNumber":1214,"author":{"gitId":"-"},"content":"** Cons: With a toggle, user might unlock MTM thinking he/she is locking it."},{"lineNumber":1215,"author":{"gitId":"-"},"content":"* **Alternative 2:** Locking and unlocking of MTM is done with two separate commands."},{"lineNumber":1216,"author":{"gitId":"-"},"content":"** Pros: Ensures that when a lock is done, MTM is truly locked."},{"lineNumber":1217,"author":{"gitId":"-"},"content":"** Cons: Addtional command needs to be created, along with its command parser and implementations."},{"lineNumber":1218,"author":{"gitId":"-"},"content":"// end::key[]"},{"lineNumber":1219,"author":{"gitId":"-"},"content":""},{"lineNumber":1220,"author":{"gitId":"-"},"content":"// tag::changepass[]"},{"lineNumber":1221,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change Password `[coming in v2.0]`"},{"lineNumber":1222,"author":{"gitId":"-"},"content":""},{"lineNumber":1223,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1224,"author":{"gitId":"-"},"content":"Default password used for toggling lock on MTM is currently \u0027ilikesports\u0027. In an upcoming update, user would be able"},{"lineNumber":1225,"author":{"gitId":"-"},"content":"to change this password to one of his choosing. There is currently no functional implementation for this feature yet."},{"lineNumber":1226,"author":{"gitId":"-"},"content":"Coming soon!"},{"lineNumber":1227,"author":{"gitId":"-"},"content":"// end::changepass[]"},{"lineNumber":1228,"author":{"gitId":"-"},"content":""},{"lineNumber":1229,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d User Experience Enhancements"},{"lineNumber":1230,"author":{"gitId":"-"},"content":""},{"lineNumber":1231,"author":{"gitId":"-"},"content":"// tag::autocomplete[]"},{"lineNumber":1232,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Tab Autocomplete"},{"lineNumber":1233,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1234,"author":{"gitId":"-"},"content":""},{"lineNumber":1235,"author":{"gitId":"-"},"content":"The tab autocomplete feature works by handling the Tab key pressed event, searching for any commands with matching prefix and returns one if found."},{"lineNumber":1236,"author":{"gitId":"-"},"content":"The command strings are stored in a Trie data structure, named `CommandTrie`, for optimal search."},{"lineNumber":1237,"author":{"gitId":"-"},"content":""},{"lineNumber":1238,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1239,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1240,"author":{"gitId":"-"},"content":"public class CommandTrie {"},{"lineNumber":1241,"author":{"gitId":"-"},"content":" String attemptAutoComplete (String input);"},{"lineNumber":1242,"author":{"gitId":"-"},"content":" void insert (String input);"},{"lineNumber":1243,"author":{"gitId":"-"},"content":" Set\u003cString\u003e getCommandSet();"},{"lineNumber":1244,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1245,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1246,"author":{"gitId":"-"},"content":""},{"lineNumber":1247,"author":{"gitId":"-"},"content":"The trie is made up of `TrieNode` objects which contains three objects. The `TrieNode sibling` represents a character on the same level as the current one. The `TrieNode child` represents a next possible letter."},{"lineNumber":1248,"author":{"gitId":"-"},"content":"For example in the words `edit` and `exit`, the node for `d` would have a child `i` and a sibling `x`. `x` would have a child `i`."},{"lineNumber":1249,"author":{"gitId":"-"},"content":""},{"lineNumber":1250,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1251,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1252,"author":{"gitId":"-"},"content":"public class TrieNode {"},{"lineNumber":1253,"author":{"gitId":"-"},"content":""},{"lineNumber":1254,"author":{"gitId":"-"},"content":" private TrieNode sibling;"},{"lineNumber":1255,"author":{"gitId":"-"},"content":" private TrieNode child;"},{"lineNumber":1256,"author":{"gitId":"-"},"content":" private char key;"},{"lineNumber":1257,"author":{"gitId":"-"},"content":" ..."},{"lineNumber":1258,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1259,"author":{"gitId":"-"},"content":""},{"lineNumber":1260,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1261,"author":{"gitId":"-"},"content":"Upon the pressing of the tab key, the command box calls `attemptAutoComplete`, in the `commandTrie` class. With the content of the command box as the query, attemptAutoComplete searches for the query using the standard Trie search algortihm."},{"lineNumber":1262,"author":{"gitId":"-"},"content":"If the query prefix itself is not present in the trie, then the attempt fails. If the query reaches a `TrieNode` with a `sibling` or `child` `TrieNode`,"},{"lineNumber":1263,"author":{"gitId":"-"},"content":"it will provide the user with possible commands for a given input. In this case, a dropdown box will appear in the UI that lists the possible commands for the user."},{"lineNumber":1264,"author":{"gitId":"-"},"content":""},{"lineNumber":1265,"author":{"gitId":"-"},"content":"Upon finding a matching command, `attemptAutoComplete` returns it and replaces the text in the Command Line. If the no matching command is found, the text is turned red."},{"lineNumber":1266,"author":{"gitId":"-"},"content":"// end::autocomplete[]"},{"lineNumber":1267,"author":{"gitId":"-"},"content":""},{"lineNumber":1268,"author":{"gitId":"-"},"content":"// tag::enhancedadd[]"},{"lineNumber":1269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Optional Field Add Command `[since v1.1]`"},{"lineNumber":1270,"author":{"gitId":"-"},"content":""},{"lineNumber":1271,"author":{"gitId":"-"},"content":"MTM is designed to manage a multitude of players and the main function that would be used repetitively is the `add` command, hence it would alleviate the cumbersomeness of entering every detail of the players when you want the command to be executed quickly."},{"lineNumber":1272,"author":{"gitId":"-"},"content":"Having the option to only entering the mandatory fields and leaving the optional ones empty will make the process of adding players more efficient."},{"lineNumber":1273,"author":{"gitId":"-"},"content":""},{"lineNumber":1274,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1275,"author":{"gitId":"-"},"content":"This mechanism enhances the original implementation of the `add` command."},{"lineNumber":1276,"author":{"gitId":"-"},"content":"The required fields that are mandatory to be filled by the user are `n/NAME` and `e/EMAIL`."},{"lineNumber":1277,"author":{"gitId":"-"},"content":"This implementation of making fields optional for `AddCommand` allows user to add players without their full information, and can be updated accordingly when the user retrieves their full information."},{"lineNumber":1278,"author":{"gitId":"-"},"content":""},{"lineNumber":1279,"author":{"gitId":"-"},"content":"Code snippet from `ParserUtil.java` that shows the implementation of when a field is left empty."},{"lineNumber":1280,"author":{"gitId":"-"},"content":"\"\u003cUNSPECIFIED\u003e\" string will be return when the value passed in is empty."},{"lineNumber":1281,"author":{"gitId":"-"},"content":""},{"lineNumber":1282,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1283,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1284,"author":{"gitId":"-"},"content":"public class ParserUtil {"},{"lineNumber":1285,"author":{"gitId":"-"},"content":" public static final String UNSPECIFIED_FIELD \u003d \"\u003cUNSPECIFIED\u003e\";"},{"lineNumber":1286,"author":{"gitId":"-"},"content":" //...ParserUtil code..."},{"lineNumber":1287,"author":{"gitId":"-"},"content":""},{"lineNumber":1288,"author":{"gitId":"-"},"content":" public static Optional\u003cString\u003e parseValue(Optional\u003cString\u003e value, String messageConstraints)"},{"lineNumber":1289,"author":{"gitId":"-"},"content":" throws IllegalValueException {"},{"lineNumber":1290,"author":{"gitId":"-"},"content":" if (value.isPresent() \u0026\u0026 value.get().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":1291,"author":{"gitId":"-"},"content":" throw new IllegalValueException(messageConstraints);"},{"lineNumber":1292,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1293,"author":{"gitId":"-"},"content":" return Optional.of(value.orElse(UNSPECIFIED_FIELD));"},{"lineNumber":1294,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1295,"author":{"gitId":"-"},"content":" //...ParserUtil code ..."},{"lineNumber":1296,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1297,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1298,"author":{"gitId":"-"},"content":""},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows the usage of parsing fields that are set as optional."},{"lineNumber":1300,"author":{"gitId":"-"},"content":""},{"lineNumber":1301,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1302,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1303,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":1304,"author":{"gitId":"-"},"content":" //...tokenize arguments..."},{"lineNumber":1305,"author":{"gitId":"-"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_EMAIL)"},{"lineNumber":1306,"author":{"gitId":"-"},"content":" || !argMultimap.getPreamble().isEmpty()) {"},{"lineNumber":1307,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":1308,"author":{"gitId":"-"},"content":" AddCommand.MESSAGE_USAGE));"},{"lineNumber":1309,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1310,"author":{"gitId":"-"},"content":""},{"lineNumber":1311,"author":{"gitId":"-"},"content":" //...get person details from arguments..."},{"lineNumber":1312,"author":{"gitId":"-"},"content":" Address address \u003d ParserUtil.parseAddress(ParserUtil.parseValue(argMultimap"},{"lineNumber":1313,"author":{"gitId":"-"},"content":" .getValue(PREFIX_ADDRESS), Address.MESSAGE_ADDRESS_CONSTRAINTS)).get();"},{"lineNumber":1314,"author":{"gitId":"-"},"content":""},{"lineNumber":1315,"author":{"gitId":"-"},"content":" return new AddCommand(person);"},{"lineNumber":1316,"author":{"gitId":"-"},"content":" //...AddCommandParser code..."},{"lineNumber":1317,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1318,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1319,"author":{"gitId":"-"},"content":""},{"lineNumber":1320,"author":{"gitId":"-"},"content":"Code snippet from `Address.java` that shows an example of an optional field being valid when not specified."},{"lineNumber":1321,"author":{"gitId":"-"},"content":""},{"lineNumber":1322,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1323,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1324,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":1325,"author":{"gitId":"-"},"content":" //...Address code..."},{"lineNumber":1326,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":1327,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":1328,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1329,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1330,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1331,"author":{"gitId":"-"},"content":""},{"lineNumber":1332,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":1333,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Optional fields"},{"lineNumber":1334,"author":{"gitId":"-"},"content":""},{"lineNumber":1335,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Set a default value for unspecified fields and parse fields that are mandatory."},{"lineNumber":1336,"author":{"gitId":"-"},"content":"** Pros: Easy to implement as fields are still filled with information even though user did not specify."},{"lineNumber":1337,"author":{"gitId":"-"},"content":"** Cons: Unattractive display of fields when it is unspecified."},{"lineNumber":1338,"author":{"gitId":"-"},"content":"* **Alternative 2:** Require users to input all fields."},{"lineNumber":1339,"author":{"gitId":"-"},"content":"** Pros: The current implementation is used, hence there is no additional code to ensure validity of unspecified input."},{"lineNumber":1340,"author":{"gitId":"-"},"content":"** Cons: Less flexibility is given to the user when adding a player into the application."},{"lineNumber":1341,"author":{"gitId":"-"},"content":"// end::enhancedadd[]"},{"lineNumber":1342,"author":{"gitId":"-"},"content":""},{"lineNumber":1343,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI Enhancements"},{"lineNumber":1344,"author":{"gitId":"-"},"content":""},{"lineNumber":1345,"author":{"gitId":"-"},"content":"// tag::teamDisplay[]"},{"lineNumber":1346,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Team Display Bar `[since v1.3]`"},{"lineNumber":1347,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1348,"author":{"gitId":"-"},"content":""},{"lineNumber":1349,"author":{"gitId":"codeeong"},"content":"The Team Display Bar is implemented as `TeamDisplay` in the UI Component and renders `TeamDisplay.fxml`."},{"lineNumber":1350,"author":{"gitId":"codeeong"},"content":"It is called from `MainWindow` and highlights"},{"lineNumber":1351,"author":{"gitId":"codeeong"},"content":"the current team that has been selected in the Command Line Interface by the user. +"},{"lineNumber":1352,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1353,"author":{"gitId":"codeeong"},"content":"It calls the `Team` model and displays the `Player` cards associated with that `Team`."},{"lineNumber":1354,"author":{"gitId":"codeeong"},"content":"It contains event handler methods such as handleShowNewTeamEvent(), handleHighlightSelectedTeamEvent(),"},{"lineNumber":1355,"author":{"gitId":"codeeong"},"content":"and handleDeselectTeamEvent(), which update the UI accordingly. +"},{"lineNumber":1356,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1357,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `TeamDisplay` below, using the example of a `create` command:"},{"lineNumber":1358,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1359,"author":{"gitId":"codeeong"},"content":".Component interactions for `create Team` command"},{"lineNumber":1360,"author":{"gitId":"codeeong"},"content":"image::ShowNewTeamDiagram.png[width\u003d\"800\"]"},{"lineNumber":1361,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1362,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1363,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027TeamDisplay\u0027 to show initialisation of UI component and event handlers:"},{"lineNumber":1364,"author":{"gitId":"-"},"content":""},{"lineNumber":1365,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1366,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1367,"author":{"gitId":"-"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {"},{"lineNumber":1368,"author":{"gitId":"-"},"content":""},{"lineNumber":1369,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";"},{"lineNumber":1370,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1371,"author":{"gitId":"-"},"content":" public TeamDisplay() {"},{"lineNumber":1372,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":1373,"author":{"gitId":"codeeong"},"content":" //...initialise Teams code..."},{"lineNumber":1374,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":1375,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1376,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1377,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1378,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {"},{"lineNumber":1379,"author":{"gitId":"codeeong"},"content":" //...handleShowNewTeamEvent code..."},{"lineNumber":1380,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1381,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1382,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1383,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {"},{"lineNumber":1384,"author":{"gitId":"codeeong"},"content":" //...handleHighlightSelectedTeamEvent code..."},{"lineNumber":1385,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1386,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1387,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1388,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {"},{"lineNumber":1389,"author":{"gitId":"codeeong"},"content":" //...handleDeselectTeamEvent code..."},{"lineNumber":1390,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1391,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1392,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1393,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1394,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1395,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience"},{"lineNumber":1396,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1397,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `TeamDisplay` is placed underneath the `ResultDisplay` and above the `PersonListPanel`."},{"lineNumber":1398,"author":{"gitId":"-"},"content":"** Pros: Located at an obvious location for the user to view the team currently selected."},{"lineNumber":1399,"author":{"gitId":"-"},"content":"** Cons: There will be less space for the `ResultDisplay` and `CommandBox`."},{"lineNumber":1400,"author":{"gitId":"-"},"content":"* **Alternative 2:** `TeamDisplay` is placed on the left of the `PersonListPanel` as a vertical bar."},{"lineNumber":1401,"author":{"gitId":"-"},"content":"** Pros: There will be more space for the `ResultDisplay` and `CommandBox`."},{"lineNumber":1402,"author":{"gitId":"-"},"content":"** Cons: It is less obvious to the user as it is at the side."},{"lineNumber":1403,"author":{"gitId":"-"},"content":"// end::teamDisplay[]"},{"lineNumber":1404,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1405,"author":{"gitId":"-"},"content":"// tag::PlayerDetails[]"},{"lineNumber":1406,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Player Details Pane `[since v1.4]`"},{"lineNumber":1407,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1408,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1409,"author":{"gitId":"codeeong"},"content":"The `Player Details` pane is implemented as `PlayerDetails` in the UI Component."},{"lineNumber":1410,"author":{"gitId":"codeeong"},"content":"It is called from `PlayerListPanel`. It renders `PlayerDetails.fxml` and displays the selected `PersonCard`."},{"lineNumber":1411,"author":{"gitId":"codeeong"},"content":"It calls the `Person` model and displays the fields in the `Person` model that are not displayed in the left panel."},{"lineNumber":1412,"author":{"gitId":"codeeong"},"content":"It contains the event handler method handlePersonDetailsChangedEvent(), which updates the UI component when the `edit `"},{"lineNumber":1413,"author":{"gitId":"codeeong"},"content":"or `remark` commands are entered. +"},{"lineNumber":1414,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1415,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `PlayerDetails` below, using the example of a `remark` command:"},{"lineNumber":1416,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1417,"author":{"gitId":"codeeong"},"content":".Component interactions for `remark 1 r/test` command"},{"lineNumber":1418,"author":{"gitId":"codeeong"},"content":"image::PlayerDetailsDiagram.png[width\u003d\"800\"]"},{"lineNumber":1419,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1420,"author":{"gitId":"-"},"content":"Code snippet from \u0027PlayerDetails\u0027 to show initialisation of UI component:"},{"lineNumber":1421,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1422,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1423,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1424,"author":{"gitId":"-"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {"},{"lineNumber":1425,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1426,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";"},{"lineNumber":1427,"author":{"gitId":"-"},"content":" public final Person person;"},{"lineNumber":1428,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1429,"author":{"gitId":"-"},"content":" public PlayerDetails(Person person) {"},{"lineNumber":1430,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":1431,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":1432,"author":{"gitId":"-"},"content":" //....player details code..."},{"lineNumber":1433,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1434,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1435,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1436,"author":{"gitId":"codeeong"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {"},{"lineNumber":1437,"author":{"gitId":"codeeong"},"content":" ...handlePersonDetailsChangedEvent code..."},{"lineNumber":1438,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1439,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1440,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1441,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1442,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1443,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1444,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience"},{"lineNumber":1445,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1446,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `PlayerDetails` is placed on the right of `Person List Panel`, replacing the `BrowserPanel`."},{"lineNumber":1447,"author":{"gitId":"-"},"content":"** Pros: It is the only large unused space in the software left and is right beside the `Person List Panel`, thus is the logical"},{"lineNumber":1448,"author":{"gitId":"-"},"content":"place to look at after selection of a person card."},{"lineNumber":1449,"author":{"gitId":"-"},"content":"** Cons: This is a lot of whitespace in the pane as are not many fields."},{"lineNumber":1450,"author":{"gitId":"-"},"content":"* **Alternative 2:** `PlayerDetails` pane size is reduced and the extra space is repurposed."},{"lineNumber":1451,"author":{"gitId":"-"},"content":"** Pros: There will be more space for another new feature e.g. calendar."},{"lineNumber":1452,"author":{"gitId":"-"},"content":"** Cons: It can only be implemented in v2.0 due to time constraints in development."},{"lineNumber":1453,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1454,"author":{"gitId":"codeeong"},"content":"// end::PlayerDetails[]"},{"lineNumber":1455,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1456,"author":{"gitId":"codeeong"},"content":"// tag::changeThemeCommand[]"},{"lineNumber":1457,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Change Theme Command `[since v1.5]`"},{"lineNumber":1458,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1459,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1460,"author":{"gitId":"codeeong"},"content":"The `ChangeThemeCommand` is a new feature that allows user to change the current theme to another theme. A new css class is implemented to accommodate the new theme, LightTheme."},{"lineNumber":1461,"author":{"gitId":"codeeong"},"content":"The `MainWindow` class is also changed to contain a handleChangeThemeRequestEvent() method which is an event handler to `setAddressBookTheme`,"},{"lineNumber":1462,"author":{"gitId":"codeeong"},"content":"which is a method in `UserPrefs`. +"},{"lineNumber":1463,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1464,"author":{"gitId":"codeeong"},"content":"Below is the sequence diagram for how the `ChangeThemeCommand` works:"},{"lineNumber":1465,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1466,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `changeTheme` Command"},{"lineNumber":1467,"author":{"gitId":"codeeong"},"content":"image::ChangeThemeDiagram.png[width\u003d\"800\"]"},{"lineNumber":1468,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1469,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1470,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027ChangeThemeCommand\u0027:"},{"lineNumber":1471,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1472,"author":{"gitId":"codeeong"},"content":"[source, java]"},{"lineNumber":1473,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1474,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {"},{"lineNumber":1475,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1476,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {"},{"lineNumber":1477,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();"},{"lineNumber":1478,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1479,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1480,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":1481,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":1482,"author":{"gitId":"codeeong"},"content":" //...check for valid theme code..."},{"lineNumber":1483,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));"},{"lineNumber":1484,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));"},{"lineNumber":1485,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1486,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":1487,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1488,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1489,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1490,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Command Syntax"},{"lineNumber":1491,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1492,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** The command syntax is in the form \"changeTheme Dark\" or \"changeTheme Light\"."},{"lineNumber":1493,"author":{"gitId":"codeeong"},"content":"** Pros: This supports future implementation of more themes, so that the developer can easily add the new themes without"},{"lineNumber":1494,"author":{"gitId":"codeeong"},"content":"having to change the execution."},{"lineNumber":1495,"author":{"gitId":"codeeong"},"content":"** Cons: The command is longer than it could be. (see alternative 2)"},{"lineNumber":1496,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** The command syntax in the form \"changeTheme\", which would automatically toggle the theme."},{"lineNumber":1497,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly."},{"lineNumber":1498,"author":{"gitId":"codeeong"},"content":"** Cons: Future implementation of more themes would be harder for the developer as the toggle function would have to be"},{"lineNumber":1499,"author":{"gitId":"codeeong"},"content":"changed quite drastically to become a command for selecting a theme out of multiple themes."},{"lineNumber":1500,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1501,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience"},{"lineNumber":1502,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1503,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** `ChangeThemeCommand` is implemented as a CLI command."},{"lineNumber":1504,"author":{"gitId":"codeeong"},"content":"** Pros: Consistent with the rest of the application, of which all changes are made by the CLI."},{"lineNumber":1505,"author":{"gitId":"codeeong"},"content":"** Cons: User has yet another command to remember the syntax of."},{"lineNumber":1506,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** Change of theme is implemented as a button to change onClick."},{"lineNumber":1507,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly."},{"lineNumber":1508,"author":{"gitId":"codeeong"},"content":"** Cons: Inconsistent with the rest of the application, which is CLI-based."},{"lineNumber":1509,"author":{"gitId":"codeeong"},"content":"// end::changeThemeCommand[]"},{"lineNumber":1510,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1511,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1512,"author":{"gitId":"codeeong"},"content":"// tag::settagcolour[]"},{"lineNumber":1513,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Set Tag Colour feature `[since v1.1]`"},{"lineNumber":1514,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1515,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1516,"author":{"gitId":"codeeong"},"content":"The `Set` Command is an entirely new command that allows the user to assign a colour to a specific tag."},{"lineNumber":1517,"author":{"gitId":"codeeong"},"content":"This mechanism is facilitated by the `SetCommandParser`, which creates and returns a new `SetCommand`."},{"lineNumber":1518,"author":{"gitId":"codeeong"},"content":"In `SetCommandParser`, which implements the `Parser` interface, it parses the arguments inputted into the CLI, and checks whether the arguments are valid."},{"lineNumber":1519,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1520,"author":{"gitId":"codeeong"},"content":"`SetCommandParser` is implemented as such:"},{"lineNumber":1521,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1522,"author":{"gitId":"codeeong"},"content":"[source, java]"},{"lineNumber":1523,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1524,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {"},{"lineNumber":1525,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1526,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {"},{"lineNumber":1527,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1528,"author":{"gitId":"codeeong"},"content":" // ...parse arguments and check for invalid arguments..."},{"lineNumber":1529,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1530,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":1531,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1532,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1533,"author":{"gitId":"codeeong"},"content":"`SetCommand` inherits the abstract `Command` class. After `execute()` is called in `SetCommand`, the tag colour is set through the logic portions of `ModelManager` and `AddressBook`, then"},{"lineNumber":1534,"author":{"gitId":"codeeong"},"content":"lastly changes `tagColour` attribute within the `Tag` object itself. It also posts an event in `SetCommand`, to which"},{"lineNumber":1535,"author":{"gitId":"codeeong"},"content":"its handler in `PersonCard` responds and performs the UI update. +"},{"lineNumber":1536,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1537,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1538,"author":{"gitId":"codeeong"},"content":"`SetCommand` is implemented in this way:"},{"lineNumber":1539,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1540,"author":{"gitId":"codeeong"},"content":"[source, java]"},{"lineNumber":1541,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1542,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {"},{"lineNumber":1543,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1544,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;"},{"lineNumber":1545,"author":{"gitId":"codeeong"},"content":" private final String tagColour;"},{"lineNumber":1546,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1547,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {"},{"lineNumber":1548,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);"},{"lineNumber":1549,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;"},{"lineNumber":1550,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;"},{"lineNumber":1551,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1552,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1553,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":1554,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {"},{"lineNumber":1555,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);"},{"lineNumber":1556,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);"},{"lineNumber":1557,"author":{"gitId":"codeeong"},"content":" //...check for valid tagName code...."},{"lineNumber":1558,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));"},{"lineNumber":1559,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));"},{"lineNumber":1560,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1561,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":1562,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1563,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1564,"author":{"gitId":"codeeong"},"content":"The following sequence diagram shows how the set command operation works:"},{"lineNumber":1565,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1566,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `setTagColour` Command"},{"lineNumber":1567,"author":{"gitId":"codeeong"},"content":"image::SetTagCommandDiagram.png[width\u003d\"800\"]"},{"lineNumber":1568,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1569,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1570,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Command` vs `UndoableCommand`"},{"lineNumber":1571,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1572,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** Inherit from `Command`."},{"lineNumber":1573,"author":{"gitId":"codeeong"},"content":"** Pros: Does not involve complicated undo/redo tests, simple and quicker implementation,"},{"lineNumber":1574,"author":{"gitId":"codeeong"},"content":"lessen chances of mistakes made in implementation."},{"lineNumber":1575,"author":{"gitId":"codeeong"},"content":"** Cons: User cannot use the `undo/redo` command."},{"lineNumber":1576,"author":{"gitId":"codeeong"},"content":"* **Alternative 2 :** Inherit from `UndoableCommand`."},{"lineNumber":1577,"author":{"gitId":"codeeong"},"content":"** Pros: User can utilise the `undo/redo` command."},{"lineNumber":1578,"author":{"gitId":"codeeong"},"content":"** Cons: Hard for developers to implement extra tests, not very necessary as users can just as easily type"},{"lineNumber":1579,"author":{"gitId":"codeeong"},"content":"out the colour they would like to change their tag to; it is a short command, especially with the `stc` alias."},{"lineNumber":1580,"author":{"gitId":"codeeong"},"content":"// end::settagcolour[]"},{"lineNumber":1581,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1582,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation"},{"lineNumber":1583,"author":{"gitId":"-"},"content":""},{"lineNumber":1584,"author":{"gitId":"-"},"content":"We use https://asciidoctor.org[asciidoc] for writing documentation."},{"lineNumber":1585,"author":{"gitId":"-"},"content":""},{"lineNumber":1586,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1587,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting."},{"lineNumber":1588,"author":{"gitId":"-"},"content":""},{"lineNumber":1589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation"},{"lineNumber":1590,"author":{"gitId":"-"},"content":""},{"lineNumber":1591,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits."},{"lineNumber":1592,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time."},{"lineNumber":1593,"author":{"gitId":"-"},"content":""},{"lineNumber":1594,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation"},{"lineNumber":1595,"author":{"gitId":"-"},"content":""},{"lineNumber":1596,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis."},{"lineNumber":1597,"author":{"gitId":"-"},"content":""},{"lineNumber":1598,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format"},{"lineNumber":1599,"author":{"gitId":"-"},"content":""},{"lineNumber":1600,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages."},{"lineNumber":1601,"author":{"gitId":"-"},"content":""},{"lineNumber":1602,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format."},{"lineNumber":1603,"author":{"gitId":"-"},"content":""},{"lineNumber":1604,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format."},{"lineNumber":1605,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`."},{"lineNumber":1606,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu."},{"lineNumber":1607,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below."},{"lineNumber":1608,"author":{"gitId":"-"},"content":""},{"lineNumber":1609,"author":{"gitId":"-"},"content":".Saving documentation as PDF files in Chrome"},{"lineNumber":1610,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]"},{"lineNumber":1611,"author":{"gitId":"-"},"content":""},{"lineNumber":1612,"author":{"gitId":"-"},"content":"[[Testing]]"},{"lineNumber":1613,"author":{"gitId":"-"},"content":"\u003d\u003d Testing"},{"lineNumber":1614,"author":{"gitId":"codeeong"},"content":"If you are intending to develop our software further, it is highly recommended that you run tests in the ways listed below."},{"lineNumber":1615,"author":{"gitId":"-"},"content":""},{"lineNumber":1616,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests"},{"lineNumber":1617,"author":{"gitId":"-"},"content":""},{"lineNumber":1618,"author":{"gitId":"-"},"content":"There are three ways to run tests."},{"lineNumber":1619,"author":{"gitId":"-"},"content":""},{"lineNumber":1620,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":1621,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies."},{"lineNumber":1622,"author":{"gitId":"-"},"content":""},{"lineNumber":1623,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*"},{"lineNumber":1624,"author":{"gitId":"-"},"content":""},{"lineNumber":1625,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`"},{"lineNumber":1626,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`"},{"lineNumber":1627,"author":{"gitId":"-"},"content":""},{"lineNumber":1628,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*"},{"lineNumber":1629,"author":{"gitId":"-"},"content":""},{"lineNumber":1630,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)"},{"lineNumber":1631,"author":{"gitId":"-"},"content":""},{"lineNumber":1632,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1633,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle."},{"lineNumber":1634,"author":{"gitId":"-"},"content":""},{"lineNumber":1635,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*"},{"lineNumber":1636,"author":{"gitId":"-"},"content":""},{"lineNumber":1637,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running."},{"lineNumber":1638,"author":{"gitId":"-"},"content":""},{"lineNumber":1639,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)"},{"lineNumber":1640,"author":{"gitId":"-"},"content":""},{"lineNumber":1641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests"},{"lineNumber":1642,"author":{"gitId":"-"},"content":""},{"lineNumber":1643,"author":{"gitId":"-"},"content":"We have two types of tests:"},{"lineNumber":1644,"author":{"gitId":"-"},"content":""},{"lineNumber":1645,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,"},{"lineNumber":1646,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package."},{"lineNumber":1647,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package."},{"lineNumber":1648,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,"},{"lineNumber":1649,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +"},{"lineNumber":1650,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`"},{"lineNumber":1651,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +"},{"lineNumber":1652,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`"},{"lineNumber":1653,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +"},{"lineNumber":1654,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`"},{"lineNumber":1655,"author":{"gitId":"-"},"content":""},{"lineNumber":1656,"author":{"gitId":"-"},"content":""},{"lineNumber":1657,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing"},{"lineNumber":1658,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**"},{"lineNumber":1659,"author":{"gitId":"-"},"content":""},{"lineNumber":1660,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing."},{"lineNumber":1661,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`."},{"lineNumber":1662,"author":{"gitId":"-"},"content":""},{"lineNumber":1663,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops"},{"lineNumber":1664,"author":{"gitId":"codeeong"},"content":"This section covers resources for you to develop this software with good practices and prepare it for release."},{"lineNumber":1665,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation"},{"lineNumber":1667,"author":{"gitId":"-"},"content":""},{"lineNumber":1668,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation."},{"lineNumber":1669,"author":{"gitId":"-"},"content":""},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration"},{"lineNumber":1671,"author":{"gitId":"-"},"content":""},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details."},{"lineNumber":1673,"author":{"gitId":"-"},"content":""},{"lineNumber":1674,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coverage Reporting"},{"lineNumber":1675,"author":{"gitId":"-"},"content":""},{"lineNumber":1676,"author":{"gitId":"-"},"content":"We use https://coveralls.io/[Coveralls] to track the code coverage of our projects. See \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e for more details."},{"lineNumber":1677,"author":{"gitId":"-"},"content":""},{"lineNumber":1678,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Documentation Previews"},{"lineNumber":1679,"author":{"gitId":"-"},"content":"When a pull request has changes to asciidoc files, you can use https://www.netlify.com/[Netlify] to see a preview of how the HTML version of those asciidoc files will look like when the pull request is merged. See \u003c\u003cUsingNetlify#, UsingNetlify.adoc\u003e\u003e for more details."},{"lineNumber":1680,"author":{"gitId":"-"},"content":""},{"lineNumber":1681,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release"},{"lineNumber":1682,"author":{"gitId":"-"},"content":""},{"lineNumber":1683,"author":{"gitId":"-"},"content":"Here are the steps to create a new release."},{"lineNumber":1684,"author":{"gitId":"-"},"content":""},{"lineNumber":1685,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]."},{"lineNumber":1686,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e."},{"lineNumber":1687,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`"},{"lineNumber":1688,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created."},{"lineNumber":1689,"author":{"gitId":"-"},"content":""},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies"},{"lineNumber":1691,"author":{"gitId":"-"},"content":""},{"lineNumber":1692,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +"},{"lineNumber":1693,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +"},{"lineNumber":1694,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)"},{"lineNumber":1695,"author":{"gitId":"-"},"content":""},{"lineNumber":1696,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d Product Scope"},{"lineNumber":1698,"author":{"gitId":"-"},"content":""},{"lineNumber":1699,"author":{"gitId":"codeeong"},"content":"This section tells you more details of our software, our target users, the user stories, and gives you a sneak peak into our development process."},{"lineNumber":1700,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1701,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Target user profile:"},{"lineNumber":1702,"author":{"gitId":"-"},"content":""},{"lineNumber":1703,"author":{"gitId":"lohtianwei"},"content":"* football team managers"},{"lineNumber":1704,"author":{"gitId":"-"},"content":"* has a need to manage a significant number of contacts"},{"lineNumber":1705,"author":{"gitId":"-"},"content":"* prefer desktop apps over other types"},{"lineNumber":1706,"author":{"gitId":"-"},"content":"* can type fast"},{"lineNumber":1707,"author":{"gitId":"-"},"content":"* prefers typing over mouse input"},{"lineNumber":1708,"author":{"gitId":"-"},"content":"* is reasonably comfortable using CLI apps"},{"lineNumber":1709,"author":{"gitId":"-"},"content":""},{"lineNumber":1710,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Value proposition:"},{"lineNumber":1711,"author":{"gitId":"codeeong"},"content":"Exclusive application for management of footballers and football teams that provides an enhanced listing of footballers and convenient lookup on updated information of players."},{"lineNumber":1712,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1713,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Feature Contribution"},{"lineNumber":1714,"author":{"gitId":"codeeong"},"content":"* Codee +"},{"lineNumber":1715,"author":{"gitId":"-"},"content":"** Major - Revamp MTM’s whole GUI for ease of viewing teams and players’ details."},{"lineNumber":1716,"author":{"gitId":"-"},"content":"*** e.g. remove browser panel, add player details panel, change person card."},{"lineNumber":1717,"author":{"gitId":"-"},"content":"** Minor - Command to set the colour of tags to colour of choice."},{"lineNumber":1718,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1719,"author":{"gitId":"codeeong"},"content":"* Jordan"},{"lineNumber":1720,"author":{"gitId":"-"},"content":"** Major - Implementation of Team Component and Related Functions."},{"lineNumber":1721,"author":{"gitId":"-"},"content":"*** e.g. creation of team, assignment of players, viewing of teams, removal of team, renaming of team."},{"lineNumber":1722,"author":{"gitId":"codeeong"},"content":"** Minor"},{"lineNumber":1723,"author":{"gitId":"-"},"content":"*** Introduce `remark` command and `remark` field."},{"lineNumber":1724,"author":{"gitId":"-"},"content":"*** Enhanced add functionality to allow optional fields."},{"lineNumber":1725,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1726,"author":{"gitId":"codeeong"},"content":"* Syafiq"},{"lineNumber":1727,"author":{"gitId":"-"},"content":"** Major - Create a new player class that contains more information about the players."},{"lineNumber":1728,"author":{"gitId":"-"},"content":"*** e.g. Position, Rating (0 - 5 Star), Remarks"},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*** Update add, edit ,list, sort to include these fields accordingly."},{"lineNumber":1730,"author":{"gitId":"codeeong"},"content":"** Minor - Autocomplete command"},{"lineNumber":1731,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1732,"author":{"gitId":"codeeong"},"content":"* Tianwei"},{"lineNumber":1733,"author":{"gitId":"codeeong"},"content":"** Major - privacy"},{"lineNumber":1734,"author":{"gitId":"codeeong"},"content":"*** Set private field and passwords"},{"lineNumber":1735,"author":{"gitId":"codeeong"},"content":"*** Make accounts"},{"lineNumber":1736,"author":{"gitId":"codeeong"},"content":"** Minor - Sorting players by different fields"},{"lineNumber":1737,"author":{"gitId":"-"},"content":""},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1739,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories"},{"lineNumber":1740,"author":{"gitId":"-"},"content":""},{"lineNumber":1741,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`"},{"lineNumber":1742,"author":{"gitId":"-"},"content":""},{"lineNumber":1743,"author":{"gitId":"-"},"content":"[width\u003d\"75%\",cols\u003d\"^8%,^23%,\u003c25%,\u003c30%\",options\u003d\"header\",]"},{"lineNumber":1744,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1745,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can..."},{"lineNumber":1746,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1747,"author":{"gitId":"-"},"content":"4.1+^s|First Time User Stories"},{"lineNumber":1748,"author":{"gitId":"-"},"content":""},{"lineNumber":1749,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App"},{"lineNumber":1750,"author":{"gitId":"-"},"content":""},{"lineNumber":1751,"author":{"gitId":"-"},"content":"|`* * *` |new user |access the user guide |find out how to use fancy features of the application"},{"lineNumber":1752,"author":{"gitId":"-"},"content":""},{"lineNumber":1753,"author":{"gitId":"-"},"content":"|`* * *` |new user |see a list of instructions available |navigate and use the application easily"},{"lineNumber":1754,"author":{"gitId":"-"},"content":""},{"lineNumber":1755,"author":{"gitId":"-"},"content":"4.1+^s|Player Related User Stories"},{"lineNumber":1756,"author":{"gitId":"-"},"content":""},{"lineNumber":1757,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add a new player|"},{"lineNumber":1758,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1759,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s address |mail him important documents"},{"lineNumber":1760,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1761,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s contact number |contact him when needed"},{"lineNumber":1762,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1763,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s email |email him when needed"},{"lineNumber":1764,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1765,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s jersey number |easily identify them during the game"},{"lineNumber":1766,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1767,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s position |easily pick my lineup for match"},{"lineNumber":1768,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1769,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player\u0027s ratings |easily identify the better players"},{"lineNumber":1770,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1771,"author":{"gitId":"-"},"content":"|`* * *` |team manager |delete a player |remove him if I kick him out from the team or he quits"},{"lineNumber":1772,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1773,"author":{"gitId":"-"},"content":"|`* * *` |team manager |find a player by name |locate details of players without having to go through the entire list"},{"lineNumber":1774,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1775,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s contact number |"},{"lineNumber":1776,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1777,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s email |"},{"lineNumber":1778,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1779,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s jersey number |"},{"lineNumber":1780,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1781,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s match stats (e.g. goals scored) |decide the lineup, give award"},{"lineNumber":1782,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1783,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player remarks |for self note"},{"lineNumber":1784,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1785,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s avatar |for facial recognition"},{"lineNumber":1786,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1787,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s position |easily pick my lineup for match"},{"lineNumber":1788,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1789,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s address |"},{"lineNumber":1790,"author":{"gitId":"-"},"content":""},{"lineNumber":1791,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s avatar |"},{"lineNumber":1792,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1793,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player remarks |for self note"},{"lineNumber":1794,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1795,"author":{"gitId":"-"},"content":"|`* *` |team manager |hide \u003c\u003cprivate-contact-detail,private contact details\u003e\u003e by default |minimize chance of someone else seeing them by accident"},{"lineNumber":1796,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1797,"author":{"gitId":"-"},"content":"|`*` |team manager |edit player’s name |"},{"lineNumber":1798,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1799,"author":{"gitId":"-"},"content":"|`*` |team manager with many players in the team managing application |sort by player name |locate a person easily"},{"lineNumber":1800,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1801,"author":{"gitId":"-"},"content":"4.1+^s|Team Related User Stories"},{"lineNumber":1802,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1803,"author":{"gitId":"-"},"content":"|`* * *` |team manager |create teams |organize and manage my players through their respective team"},{"lineNumber":1804,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1805,"author":{"gitId":"-"},"content":"|`* * *` |team manager |assign player to teams |identify the team that the player is playing for"},{"lineNumber":1806,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1807,"author":{"gitId":"-"},"content":"|`* * *` |team manager |view players in specified team |identify the lineup of the team and which player belongs to which team"},{"lineNumber":1808,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1809,"author":{"gitId":"-"},"content":"|`* * *` |team manager |remove teams |remove teams that I no longer managed"},{"lineNumber":1810,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1811,"author":{"gitId":"-"},"content":"|`* *` |team manager |set match with competing team |acknowledge and plan training session for the team"},{"lineNumber":1812,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1813,"author":{"gitId":"-"},"content":"|`* *` |team manager |view upcoming match |keep track of the upcoming matches with opponent teams"},{"lineNumber":1814,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1815,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s allocated team |move players between teams"},{"lineNumber":1816,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1817,"author":{"gitId":"-"},"content":"|`* *` |team manager |schedule training programs for team |I do not have any conflicting schedule between different teams"},{"lineNumber":1818,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1819,"author":{"gitId":"-"},"content":"|`* *` |team manager |send reminder to team of schedule |my players does not forget about training session"},{"lineNumber":1820,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1821,"author":{"gitId":"-"},"content":"|`*` |team manager |sort by team name |identify group lineup easily"},{"lineNumber":1822,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1823,"author":{"gitId":"-"},"content":"4.1+^s|Additional User Stories"},{"lineNumber":1824,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1825,"author":{"gitId":"-"},"content":"|`* *` |team manager who remembers better with visual |set colours to tags |easily identify the tag that I have set to players"},{"lineNumber":1826,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1827,"author":{"gitId":"-"},"content":"|`* *` |team manager |autofill command |perform task quickly"},{"lineNumber":1828,"author":{"gitId":"-"},"content":""},{"lineNumber":1829,"author":{"gitId":"-"},"content":"|`* *` |team manager |password login |if team manager wants to protect certain information"},{"lineNumber":1830,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1831,"author":{"gitId":"-"},"content":"|`* *` |team manager |submit feedback to developers |developers can improve the application constantly"},{"lineNumber":1832,"author":{"gitId":"-"},"content":""},{"lineNumber":1833,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1834,"author":{"gitId":"-"},"content":""},{"lineNumber":1835,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1836,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases"},{"lineNumber":1837,"author":{"gitId":"-"},"content":""},{"lineNumber":1838,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `MTM` and the *Team Manager* is the `user`, unless specified otherwise)"},{"lineNumber":1839,"author":{"gitId":"-"},"content":""},{"lineNumber":1840,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1841,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Add player"},{"lineNumber":1842,"author":{"gitId":"-"},"content":""},{"lineNumber":1843,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1844,"author":{"gitId":"-"},"content":""},{"lineNumber":1845,"author":{"gitId":"-"},"content":"1. User enter command to add"},{"lineNumber":1846,"author":{"gitId":"-"},"content":"2. MTM prompt user of format to enter player\u0027s name and details"},{"lineNumber":1847,"author":{"gitId":"-"},"content":"3. User enter player\u0027s name and details in required format"},{"lineNumber":1848,"author":{"gitId":"-"},"content":"4. User press enter to insert person into storage"},{"lineNumber":1849,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1850,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1851,"author":{"gitId":"-"},"content":""},{"lineNumber":1852,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1853,"author":{"gitId":"-"},"content":""},{"lineNumber":1854,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1855,"author":{"gitId":"-"},"content":"* 4a. User did not enter any details."},{"lineNumber":1856,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1857,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1858,"author":{"gitId":"-"},"content":"** 4a1. MTM inform user that it is an invalid add command."},{"lineNumber":1859,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1860,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1861,"author":{"gitId":"-"},"content":""},{"lineNumber":1862,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1863,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Edit player\u0027s team"},{"lineNumber":1864,"author":{"gitId":"-"},"content":""},{"lineNumber":1865,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1866,"author":{"gitId":"-"},"content":""},{"lineNumber":1867,"author":{"gitId":"-"},"content":"1. User enter command to find"},{"lineNumber":1868,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name"},{"lineNumber":1869,"author":{"gitId":"-"},"content":"3. MTM display list of players found"},{"lineNumber":1870,"author":{"gitId":"-"},"content":"4. User enter command to edit player\u0027s team using index of displayed list"},{"lineNumber":1871,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1872,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1873,"author":{"gitId":"-"},"content":""},{"lineNumber":1874,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1875,"author":{"gitId":"-"},"content":""},{"lineNumber":1876,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1877,"author":{"gitId":"-"},"content":"* 2a. Player name does not exist."},{"lineNumber":1878,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1879,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1880,"author":{"gitId":"-"},"content":"** 2a1. MTM inform user that player does not exist."},{"lineNumber":1881,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1882,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1883,"author":{"gitId":"-"},"content":""},{"lineNumber":1884,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Find player by team name"},{"lineNumber":1886,"author":{"gitId":"-"},"content":""},{"lineNumber":1887,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1888,"author":{"gitId":"-"},"content":""},{"lineNumber":1889,"author":{"gitId":"-"},"content":"1. User enter command to find team"},{"lineNumber":1890,"author":{"gitId":"-"},"content":"2. User enter team name"},{"lineNumber":1891,"author":{"gitId":"-"},"content":"3. MTM display list of players in team"},{"lineNumber":1892,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1893,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1894,"author":{"gitId":"-"},"content":""},{"lineNumber":1895,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1896,"author":{"gitId":"-"},"content":""},{"lineNumber":1897,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1898,"author":{"gitId":"-"},"content":"* 2a. Team name does not exist."},{"lineNumber":1899,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1900,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1901,"author":{"gitId":"-"},"content":"** 2a1. MTM informs user that team name does not exist"},{"lineNumber":1902,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1903,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1904,"author":{"gitId":"-"},"content":""},{"lineNumber":1905,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1906,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Remove player from team"},{"lineNumber":1907,"author":{"gitId":"-"},"content":""},{"lineNumber":1908,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1909,"author":{"gitId":"-"},"content":""},{"lineNumber":1910,"author":{"gitId":"-"},"content":"1. User enter command to find"},{"lineNumber":1911,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name"},{"lineNumber":1912,"author":{"gitId":"-"},"content":"3. MTM display list of players found"},{"lineNumber":1913,"author":{"gitId":"-"},"content":"4. User enter remove command and index associated with player"},{"lineNumber":1914,"author":{"gitId":"-"},"content":"5. MTM displays player that is removed and updated list of players"},{"lineNumber":1915,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1916,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1917,"author":{"gitId":"-"},"content":""},{"lineNumber":1918,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1919,"author":{"gitId":"-"},"content":""},{"lineNumber":1920,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1921,"author":{"gitId":"-"},"content":"* 4a. Invalid index entered."},{"lineNumber":1922,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1923,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1924,"author":{"gitId":"-"},"content":"** 4a1. MTM informs user that index is invalid."},{"lineNumber":1925,"author":{"gitId":"-"},"content":"** 4a2. User enters valid index."},{"lineNumber":1926,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1927,"author":{"gitId":"-"},"content":"Use case resumes at step 5."},{"lineNumber":1928,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1929,"author":{"gitId":"-"},"content":"* 4b. User removes wrong index unintentionally."},{"lineNumber":1930,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1931,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1932,"author":{"gitId":"-"},"content":"** 4b1. User undo remove by entering command to undo."},{"lineNumber":1933,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1934,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1935,"author":{"gitId":"-"},"content":""},{"lineNumber":1936,"author":{"gitId":"-"},"content":"_{More to be added}_"},{"lineNumber":1937,"author":{"gitId":"-"},"content":""},{"lineNumber":1938,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1939,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements"},{"lineNumber":1940,"author":{"gitId":"-"},"content":""},{"lineNumber":1941,"author":{"gitId":"codeeong"},"content":". Should work on any mainstream OS as long as it has Java 1.8.0_60 or higher installed."},{"lineNumber":1942,"author":{"gitId":"-"},"content":". Should be able to hold up to 150 players without a noticeable sluggishness in performance for typical usage."},{"lineNumber":1943,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse."},{"lineNumber":1944,"author":{"gitId":"codeeong"},"content":". Works on both 32-bit and 64-bit machines"},{"lineNumber":1945,"author":{"gitId":"codeeong"},"content":". Should respond within 1 second of query"},{"lineNumber":1946,"author":{"gitId":"codeeong"},"content":". Should be intuitive and easy to use for a first-time user."},{"lineNumber":1947,"author":{"gitId":"codeeong"},"content":". Should be able to handle any sort of input, i.e. should recover from invalid input."},{"lineNumber":1948,"author":{"gitId":"codeeong"},"content":". Should have audience-focused user guides and developer guides."},{"lineNumber":1949,"author":{"gitId":"codeeong"},"content":". Should have command names that concisely describe their function."},{"lineNumber":1950,"author":{"gitId":"codeeong"},"content":". Should be an open-source project."},{"lineNumber":1951,"author":{"gitId":"codeeong"},"content":". Development be cost effective or free."},{"lineNumber":1952,"author":{"gitId":"codeeong"},"content":". App should be able to work offline."},{"lineNumber":1953,"author":{"gitId":"-"},"content":". Should save and backup the state of the team managing application regularly."},{"lineNumber":1954,"author":{"gitId":"codeeong"},"content":". Current versions must be backward compatible with older versions to support undo."},{"lineNumber":1955,"author":{"gitId":"codeeong"},"content":". The user interface should be simple and minimise distractions so that user can continue with their work in a focused manner."},{"lineNumber":1956,"author":{"gitId":"-"},"content":""},{"lineNumber":1957,"author":{"gitId":"-"},"content":""},{"lineNumber":1958,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1959,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary"},{"lineNumber":1960,"author":{"gitId":"-"},"content":""},{"lineNumber":1961,"author":{"gitId":"-"},"content":"[[mainstream-os]] Mainstream OS::"},{"lineNumber":1962,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X"},{"lineNumber":1963,"author":{"gitId":"-"},"content":""},{"lineNumber":1964,"author":{"gitId":"-"},"content":"[[private-contact-detail]] Private contact detail::"},{"lineNumber":1965,"author":{"gitId":"-"},"content":"A contact detail that is not meant to be shared with others"},{"lineNumber":1966,"author":{"gitId":"-"},"content":""},{"lineNumber":1967,"author":{"gitId":"-"},"content":"[[lineuo]] Lineup::"},{"lineNumber":1968,"author":{"gitId":"-"},"content":"A list of players that are playing for a match, with their positions specified"},{"lineNumber":1969,"author":{"gitId":"-"},"content":""},{"lineNumber":1970,"author":{"gitId":"-"},"content":"[[user-guide]] User Guide::"},{"lineNumber":1971,"author":{"gitId":"-"},"content":"A documentation on the functionality and usability of MTM"},{"lineNumber":1972,"author":{"gitId":"-"},"content":""},{"lineNumber":1973,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1974,"author":{"gitId":"-"},"content":"\u003d\u003d Instructions for Manual Testing"},{"lineNumber":1975,"author":{"gitId":"-"},"content":""},{"lineNumber":1976,"author":{"gitId":"-"},"content":"Given below are instructions to test the app manually."},{"lineNumber":1977,"author":{"gitId":"-"},"content":""},{"lineNumber":1978,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1979,"author":{"gitId":"-"},"content":"These instructions only provide a starting point for testers to work on; testers are expected to do more _exploratory_ testing."},{"lineNumber":1980,"author":{"gitId":"-"},"content":""},{"lineNumber":1981,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Launch and Shutdown"},{"lineNumber":1982,"author":{"gitId":"-"},"content":""},{"lineNumber":1983,"author":{"gitId":"-"},"content":". Initial launch"},{"lineNumber":1984,"author":{"gitId":"-"},"content":""},{"lineNumber":1985,"author":{"gitId":"-"},"content":".. Download the jar file and copy into an empty folder"},{"lineNumber":1986,"author":{"gitId":"-"},"content":".. Double-click the jar file +"},{"lineNumber":1987,"author":{"gitId":"-"},"content":" Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum."},{"lineNumber":1988,"author":{"gitId":"-"},"content":""},{"lineNumber":1989,"author":{"gitId":"-"},"content":". Saving window preferences"},{"lineNumber":1990,"author":{"gitId":"-"},"content":""},{"lineNumber":1991,"author":{"gitId":"-"},"content":".. Resize the window to an optimum size. Move the window to a different location. Close the window."},{"lineNumber":1992,"author":{"gitId":"-"},"content":".. Re-launch the app by double-clicking the jar file. +"},{"lineNumber":1993,"author":{"gitId":"-"},"content":" Expected: The most recent window size and location is retained."},{"lineNumber":1994,"author":{"gitId":"-"},"content":""},{"lineNumber":1995,"author":{"gitId":"-"},"content":"_{ more test cases ... }_"},{"lineNumber":1996,"author":{"gitId":"-"},"content":""},{"lineNumber":1997,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Deleting a player"},{"lineNumber":1998,"author":{"gitId":"-"},"content":""},{"lineNumber":1999,"author":{"gitId":"codeeong"},"content":". Deleting a player while all players are listed"},{"lineNumber":2000,"author":{"gitId":"-"},"content":""},{"lineNumber":2001,"author":{"gitId":"codeeong"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list."},{"lineNumber":2002,"author":{"gitId":"-"},"content":".. Test case: `delete 1` +"},{"lineNumber":2003,"author":{"gitId":"codeeong"},"content":" Expected: First player is deleted from the list. Details of the deleted player shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2004,"author":{"gitId":"-"},"content":".. Test case: `delete 0` +"},{"lineNumber":2005,"author":{"gitId":"-"},"content":" Expected: No person is deleted. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2006,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `delete`, `delete x` (where x is larger than the list size) _{give more}_ +"},{"lineNumber":2007,"author":{"gitId":"-"},"content":" Expected: Similar to previous."},{"lineNumber":2008,"author":{"gitId":"-"},"content":""},{"lineNumber":2009,"author":{"gitId":"-"},"content":"_{ more test cases ... }_"},{"lineNumber":2010,"author":{"gitId":"-"},"content":""},{"lineNumber":2011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving data"},{"lineNumber":2012,"author":{"gitId":"-"},"content":""},{"lineNumber":2013,"author":{"gitId":"-"},"content":". Dealing with missing/corrupted data files"},{"lineNumber":2014,"author":{"gitId":"-"},"content":""},{"lineNumber":2015,"author":{"gitId":"-"},"content":".. _{explain how to simulate a missing/corrupted file and the expected behavior}_"},{"lineNumber":2016,"author":{"gitId":"-"},"content":""},{"lineNumber":2017,"author":{"gitId":"-"},"content":"_{ more test cases ... }_"},{"lineNumber":2018,"author":{"gitId":"-"},"content":""},{"lineNumber":2019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Remarking a player"},{"lineNumber":2020,"author":{"gitId":"-"},"content":""},{"lineNumber":2021,"author":{"gitId":"-"},"content":". Remarking a player while all players are listed"},{"lineNumber":2022,"author":{"gitId":"-"},"content":""},{"lineNumber":2023,"author":{"gitId":"-"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list."},{"lineNumber":2024,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/This is my remark to you.` +"},{"lineNumber":2025,"author":{"gitId":"-"},"content":"Expected: First player is remarked from the list. Details of the remarked player shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2026,"author":{"gitId":"-"},"content":".. Test case: `remark 0` +"},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Expected: No person is remarked. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2028,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `remark`, `remark x` (where x is larger than the list size), `remark -1`, `remark 2 x/` (where x is not the prefix for remark) +"},{"lineNumber":2029,"author":{"gitId":"-"},"content":"Expected: Similar to previous."},{"lineNumber":2030,"author":{"gitId":"-"},"content":".. Test case: `remark 1` +"},{"lineNumber":2031,"author":{"gitId":"-"},"content":"Expected: First player has its remark removed. Details of the remarked player shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2032,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/I want to delete this.` -\u003e `remark 1 r/` +"},{"lineNumber":2033,"author":{"gitId":"-"},"content":"Expected: Similar to previous."},{"lineNumber":2034,"author":{"gitId":"-"},"content":""},{"lineNumber":2035,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a player without all fields"},{"lineNumber":2036,"author":{"gitId":"-"},"content":""},{"lineNumber":2037,"author":{"gitId":"-"},"content":". Adding a player where player is unique"},{"lineNumber":2038,"author":{"gitId":"-"},"content":""},{"lineNumber":2039,"author":{"gitId":"-"},"content":".. Prerequisites: Newly added player must not exist in MTM."},{"lineNumber":2040,"author":{"gitId":"-"},"content":".. Test case: `add n/Tumeric Turner e/tt@tuner.com` +"},{"lineNumber":2041,"author":{"gitId":"-"},"content":"Expected: Player added into MTM and will be on the list. Details of the newly added player shown in the status message. Fields that are not input during addition are replaced with `\u003cUNSPECIFIED\u003e` Timestamp in the status bar is updated."},{"lineNumber":2042,"author":{"gitId":"-"},"content":".. Test case: `add n/Guavi Hollae` +"},{"lineNumber":2043,"author":{"gitId":"-"},"content":"Expected: Player is not added into MTM. Errors details shown in status message. Name and email are compulsory fields that need to be entered for `add` to work."},{"lineNumber":2044,"author":{"gitId":"-"},"content":""},{"lineNumber":2045,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Functions"},{"lineNumber":2046,"author":{"gitId":"-"},"content":""},{"lineNumber":2047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a Team"},{"lineNumber":2048,"author":{"gitId":"-"},"content":""},{"lineNumber":2049,"author":{"gitId":"-"},"content":". Creating a Team with current existing data in MTM"},{"lineNumber":2050,"author":{"gitId":"-"},"content":""},{"lineNumber":2051,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently does not exist in MTM."},{"lineNumber":2052,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +"},{"lineNumber":2053,"author":{"gitId":"-"},"content":"Expected: Team is created and displayed in Team Display Panel. Team name will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2054,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +"},{"lineNumber":2055,"author":{"gitId":"-"},"content":"Expected: Team is not created due to team already existing in MTM. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2056,"author":{"gitId":"-"},"content":".. Test case: `create \u0026-Team-\u0026` +"},{"lineNumber":2057,"author":{"gitId":"-"},"content":"Expected: Team does not allow names with special characters, only alphanumeric, can consist of all numbers and can contain space in name. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2058,"author":{"gitId":"-"},"content":""},{"lineNumber":2059,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a Team"},{"lineNumber":2060,"author":{"gitId":"-"},"content":""},{"lineNumber":2061,"author":{"gitId":"-"},"content":". Viewing a Team with current existing data in MTM"},{"lineNumber":2062,"author":{"gitId":"-"},"content":""},{"lineNumber":2063,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM."},{"lineNumber":2064,"author":{"gitId":"-"},"content":"... Test case: `view Arsenal` +"},{"lineNumber":2065,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be updated with list of players that are in the Team. Team name will be shown in the status message."},{"lineNumber":2066,"author":{"gitId":"-"},"content":"... Test case: `view NonExistingTeam` +"},{"lineNumber":2067,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM. Error details shown in the status message."},{"lineNumber":2068,"author":{"gitId":"-"},"content":"... Test case: `view chelsea` +"},{"lineNumber":2069,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM, as team names are case sensitive. Error details shown in the status message."},{"lineNumber":2070,"author":{"gitId":"-"},"content":".. Prerequisites: The command `create NUSTeam` was executed right before executing this test case."},{"lineNumber":2071,"author":{"gitId":"-"},"content":"... Test case: `view NUSTeam` +"},{"lineNumber":2072,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be empty as no players are in the team yet. Team name will be shown in the status message."},{"lineNumber":2073,"author":{"gitId":"-"},"content":""},{"lineNumber":2074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning Players to Team"},{"lineNumber":2075,"author":{"gitId":"-"},"content":""},{"lineNumber":2076,"author":{"gitId":"-"},"content":". Assigning players to a Team after executing `create NUSTeam`"},{"lineNumber":2077,"author":{"gitId":"-"},"content":""},{"lineNumber":2078,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/1 3 5` +"},{"lineNumber":2079,"author":{"gitId":"-"},"content":"Expected: Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2080,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/3` +"},{"lineNumber":2081,"author":{"gitId":"-"},"content":"Expected: No player is assigned as player already exist in the team. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2082,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/2 3 4` +"},{"lineNumber":2083,"author":{"gitId":"-"},"content":"Expected: Only the player at index 2 is assigned. Assign command will stop once it detects that a player cannot be assigned. Team Display Panel will not be updated. Person Card of index 2 will be updated with assigned team. Timestamp in the status bar is updated."},{"lineNumber":2084,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/9 6 4` +"},{"lineNumber":2085,"author":{"gitId":"-"},"content":"Expected: All players will be assigned by ascending index order. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2086,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/7 40` +"},{"lineNumber":2087,"author":{"gitId":"-"},"content":"Expected: Index exceeding the number of players listed in the Player List Panel will be ignored. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2088,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/-1` +"},{"lineNumber":2089,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message. Team is not viewed."},{"lineNumber":2090,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam` +"},{"lineNumber":2091,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Invalid command format as no index is given. Team is not viewed."},{"lineNumber":2092,"author":{"gitId":"-"},"content":".. Test case: `assign NoTeam` +"},{"lineNumber":2093,"author":{"gitId":"-"},"content":"Expected: Error deatils shown in the status message. No such team found in MTM. Team is not viewed, player list not updated."},{"lineNumber":2094,"author":{"gitId":"-"},"content":".. Test case: `add n/Barry Putter e/bp@hotwot.com tm/NUSTeam` +"},{"lineNumber":2095,"author":{"gitId":"-"},"content":"Expected: New person is added into MTM. Team in Team Display Panel will be selected. Player list will be updated with the new added person. Timestamp in the status bar is updated."},{"lineNumber":2096,"author":{"gitId":"-"},"content":".. Test case: `add n/Himonie Branger e/hb@notwot.com tm/MissingTeam` +"},{"lineNumber":2097,"author":{"gitId":"-"},"content":"Expected: Person is not added into MTM. Team does not exist in MTM. Error details shown in the status message."},{"lineNumber":2098,"author":{"gitId":"-"},"content":""},{"lineNumber":2099,"author":{"gitId":"-"},"content":". Unassigning players from a Team"},{"lineNumber":2100,"author":{"gitId":"-"},"content":""},{"lineNumber":2101,"author":{"gitId":"-"},"content":".. Prerequisites: Players are already existing in the team"},{"lineNumber":2102,"author":{"gitId":"-"},"content":".. Test case: `view NUSTeam` -\u003e `assign i/1 2 3` +"},{"lineNumber":2103,"author":{"gitId":"-"},"content":"Expected: Player list will be updated as the specified players to be unassigned will be removed from the team. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2104,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/10 11` +"},{"lineNumber":2105,"author":{"gitId":"-"},"content":"Expected: Player list will be updated with the specified players to be unassigned will have their team name updated to `\u003cUNSPECIFIED\u003e`. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2106,"author":{"gitId":"-"},"content":".. Test case: `assign i/NUS` +"},{"lineNumber":2107,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message."},{"lineNumber":2108,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/1` +"},{"lineNumber":2109,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Player already has no team and can\u0027t be unassigned."},{"lineNumber":2110,"author":{"gitId":"-"},"content":""},{"lineNumber":2111,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Renaming a Team"},{"lineNumber":2112,"author":{"gitId":"-"},"content":""},{"lineNumber":2113,"author":{"gitId":"-"},"content":". Renaming a Team after assigning players above"},{"lineNumber":2114,"author":{"gitId":"-"},"content":""},{"lineNumber":2115,"author":{"gitId":"-"},"content":".. Prerequisites: Ensure that the team to be renamed into does not exist"},{"lineNumber":2116,"author":{"gitId":"-"},"content":".. Test case: `rename NUSTeam tm/SUNTeam` +"},{"lineNumber":2117,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be renamed to the new team name. New team name will be selected in the Team Display Panel. Player list of all the players in the new team name will be displayed. All players in the team will have their team name updated to the new team name. Team rename will be shown in the result status message. Timestamp in the status bar is updated."},{"lineNumber":2118,"author":{"gitId":"-"},"content":".. Test case: `rename NewTeam tm/MooTeam` +"},{"lineNumber":2119,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename does not exist in MTM."},{"lineNumber":2120,"author":{"gitId":"-"},"content":".. Test case: `rename SUNTeam tm/\u0026-Team` +"},{"lineNumber":2121,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename into is invalid and should only contains alphanumeric characters."},{"lineNumber":2122,"author":{"gitId":"-"},"content":".. Test case: `rename tm/SmoovTeam` +"},{"lineNumber":2123,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Did not specify which team to rename and will indicate invalid command format."},{"lineNumber":2124,"author":{"gitId":"-"},"content":""},{"lineNumber":2125,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a Team"},{"lineNumber":2126,"author":{"gitId":"-"},"content":""},{"lineNumber":2127,"author":{"gitId":"-"},"content":". Removing a Team after renaming the team above"},{"lineNumber":2128,"author":{"gitId":"-"},"content":""},{"lineNumber":2129,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM."},{"lineNumber":2130,"author":{"gitId":"-"},"content":".. Test case: `view SUNTeam` -\u003e `remove SUNTeam` +"},{"lineNumber":2131,"author":{"gitId":"-"},"content":"Expected: Team is removed and Team Display Panel is updated to reflect that the team has been removed. Team name that is being removed will be shown in the status message. All players in the team will have their team name updated in the Player List Panel. Player List Panel will show the full list of players in MTM. Timestamp in the status bar is updated."},{"lineNumber":2132,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `remove Arsenal` +"},{"lineNumber":2133,"author":{"gitId":"-"},"content":"Expected: Similar to above, will be displaying full list of players before and after `remove` command."},{"lineNumber":2134,"author":{"gitId":"-"},"content":".. Test case: `remove SUNTeam` +"},{"lineNumber":2135,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team does not exist in MTM."},{"lineNumber":2136,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2137,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Appearance Related Functions"},{"lineNumber":2138,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2139,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Changing a Theme"},{"lineNumber":2140,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2141,"author":{"gitId":"codeeong"},"content":". Changing the theme that MTM is currently on"},{"lineNumber":2142,"author":{"gitId":"codeeong"},"content":".. Test case: `cte Dark` (if current theme is Light) or `cte Light` (if current theme is Dark) +"},{"lineNumber":2143,"author":{"gitId":"codeeong"},"content":"Expected: MTM colour scheme will change to the respective themes as shown below:"},{"lineNumber":2144,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2145,"author":{"gitId":"codeeong"},"content":"image::DarkTheme.png[width\u003d\"300\"]"},{"lineNumber":2146,"author":{"gitId":"codeeong"},"content":"image::LightTheme.png[width\u003d\"300\"]"},{"lineNumber":2147,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2148,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2149,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Setting Tag Colours"},{"lineNumber":2150,"author":{"gitId":"codeeong"},"content":". Setting the tags to colour of choice"},{"lineNumber":2151,"author":{"gitId":"codeeong"},"content":".. Prerequisites: Player has tags"},{"lineNumber":2152,"author":{"gitId":"codeeong"},"content":".. Test case: `setTagColour t/redCard tc/blue`"},{"lineNumber":2153,"author":{"gitId":"codeeong"},"content":"Expected: All tags with the name `redCard` would become blue"}],"authorContributionMap":{"lithiumlkid":189,"lohtianwei":210,"codeeong":253,"-":1501}},{"path":"docs/UserGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - User Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":toc-title: Table Of Contents"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3"},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full"},{"lineNumber":10,"author":{"gitId":"-"},"content":":experimental:"},{"lineNumber":11,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":12,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":13,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":14,"author":{"gitId":"-"},"content":":important-caption: :white_check_mark:"},{"lineNumber":15,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"By: `F14-B1` Since: `Mar 2018` Licence: `MIT`"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"// tag::introduction[]"},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction"},{"lineNumber":22,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a link:https://en.wikipedia.org/wiki/Command-line_interface[Command-Line Interface] (CLI) based address book application for *football team managers*."},{"lineNumber":23,"author":{"gitId":"-"},"content":"It is a one-stop solution to help you manage your player\u0027s contact details in an efficient and convenient manner."},{"lineNumber":24,"author":{"gitId":"-"},"content":"Using MTM, you can organize players into teams, view player statistics, and, generate player line-ups."},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"Head to \u003c\u003cQuick Start\u003e\u003e to get started with My Team Manager!"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"\u003d\u003d Quick Start"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"Welcome! If you want to learn more about using My Team Manager, you\u0027ve come to the right place. My Team Manager is the easiest"},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"way for you to manage your team efficiently, and this quick start section will help you learn the basics so you can get going."},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"Your teams, their players, and all the relevant information is organized clearly in My Team Manager. Teams can be created and"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"players can be assigned to teams."},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Before we begin"},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer."},{"lineNumber":39,"author":{"gitId":"-"},"content":". You can download Java 8 link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[here]."},{"lineNumber":40,"author":{"gitId":"-"},"content":"+"},{"lineNumber":41,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* Having any Java 8 version is not enough. +"},{"lineNumber":44,"author":{"gitId":"-"},"content":"* This app will not work with *earlier* or *later* versions of Java 8."},{"lineNumber":45,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":46,"author":{"gitId":"-"},"content":"+"},{"lineNumber":47,"author":{"gitId":"-"},"content":". Download the latest `MyTeamManager.jar` link:{repoURL}/releases[here]."},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":". Copy the file to the folder you want to use as the home folder for your MTM."},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":". Double-click the file to start the app. The software interface should appear in a few seconds as shown below."},{"lineNumber":50,"author":{"gitId":"-"},"content":"+"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"image::UiNew.png[width\u003d\"790\"]"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Navigating the interface"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"The figure below shows the different components in My Team Manager and the list below explains their purpose."},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"image::UIGuide.png[width\u003d\"790\"]"},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":". *Command Box*: This is where you _key in the commands_ to use My Team Manager."},{"lineNumber":61,"author":{"gitId":"-"},"content":". *Display Box*: The display box _displays results_ to any command you input."},{"lineNumber":62,"author":{"gitId":"-"},"content":". *Team List* : This _displays the teams_ you have created in My Team Manager. +"},{"lineNumber":63,"author":{"gitId":"-"},"content":"* If a team is being viewed, it would be highlighted."},{"lineNumber":64,"author":{"gitId":"-"},"content":". *Details Panel*: This _displays details of the player_ that is currently selected. +"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* Here, the player\u0027s _name_, _phone number_, _address_, _email_, _jersey number_ followed by _remarks_ are shown."},{"lineNumber":66,"author":{"gitId":"-"},"content":". *Systems Panel*: This displays information regarding modification to MTM\u0027s data."},{"lineNumber":67,"author":{"gitId":"-"},"content":"* On the left, it displays the time and date when MTM is last updated."},{"lineNumber":68,"author":{"gitId":"-"},"content":"* On the right, is the location of the data."},{"lineNumber":69,"author":{"gitId":"-"},"content":". *Player List*: This is the list of player cards. In each player card, +"},{"lineNumber":70,"author":{"gitId":"-"},"content":"* The player\u0027s _name_, _tags_, _team_, _rating_, followed by _position_ is displayed."},{"lineNumber":71,"author":{"gitId":"-"},"content":"* The player\u0027s _avatar_ is also shown on the right column."},{"lineNumber":72,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":73,"author":{"gitId":"lithiumlkid"},"content":"[[Using_Commands]]"},{"lineNumber":74,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Using Commands"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":".*Getting started with Commands*"},{"lineNumber":77,"author":{"gitId":"-"},"content":"****"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":80,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user."},{"lineNumber":81,"author":{"gitId":"-"},"content":"** An example in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`."},{"lineNumber":82,"author":{"gitId":"-"},"content":"* Fields that are in enclosed with `[ ]` are optional."},{"lineNumber":83,"author":{"gitId":"-"},"content":"** An example, `n/NAME [t/TAG]`, can be used as, `n/John Doe t/friend`, or as, `n/John Doe`."},{"lineNumber":84,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times."},{"lineNumber":85,"author":{"gitId":"-"},"content":"** In this example, `[t/TAG]...`, these parameters are valid, `t/friend`, `t/friend t/family`, and even `{nbsp}` (no parameter)."},{"lineNumber":86,"author":{"gitId":"-"},"content":"* Parameters can be entered in any order."},{"lineNumber":87,"author":{"gitId":"-"},"content":"** For example, if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable."},{"lineNumber":88,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":89,"author":{"gitId":"-"},"content":"****"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":".*The Use of Alias*"},{"lineNumber":92,"author":{"gitId":"-"},"content":"****"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":95,"author":{"gitId":"-"},"content":"* Some commands have an alias that you can use to execute the command. This alias acts as a shortcut to execute the commands you want without typing the full command out."},{"lineNumber":96,"author":{"gitId":"-"},"content":"** For example, you can type the alias `a` instead of the `add` command word to add a player into MTM."},{"lineNumber":97,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":98,"author":{"gitId":"-"},"content":"****"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":".*Lookout for Tips, Notes, and Expected Outcomes*"},{"lineNumber":101,"author":{"gitId":"-"},"content":"****"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":104,"author":{"gitId":"-"},"content":"TIP: This box give _tips_ that *might be useful*."},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":"NOTE: This box _notes_ down *important details* regarding a feature."},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":"IMPORTANT: This box will let you know the _outcome_ and what MTM should be *expected to do*."},{"lineNumber":109,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":110,"author":{"gitId":"-"},"content":"****"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"lithiumlkid"},"content":"Now that you are familiar with the interface and using commands, you are now ready to begin using My Team Manager!"},{"lineNumber":113,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":114,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Three steps to get started"},{"lineNumber":115,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":116,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Add your first player"},{"lineNumber":117,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":118,"author":{"gitId":"lithiumlkid"},"content":". Add your first player, `Ronaldo` by typing the command `add n/Ronaldo e/Ronaldo@arsenal.com` in the command box and pressing kbd:[Enter] to execute it."},{"lineNumber":119,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":120,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":121,"author":{"gitId":"lithiumlkid"},"content":"image::add.png[width\u003d\"400\"]"},{"lineNumber":122,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":123,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":124,"author":{"gitId":"lithiumlkid"},"content":". Your new player, `Ronaldo` should appear in the player list as shown in the white box above."},{"lineNumber":125,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":126,"author":{"gitId":"lithiumlkid"},"content":"TIP: The `Add` command has additional optional parameters for you to include more information. For the full list,"},{"lineNumber":127,"author":{"gitId":"-"},"content":"refer to \u003c\u003cadd, Adding a player\u003e\u003e."},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Create your first team"},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"Now that you have a player, let\u0027s explore teams. Teams allow you to manage and group your players together according to"},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":"the teams they belong to."},{"lineNumber":132,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":". Create your first team, `NUS` by typing the command `create NUS` in the command box and pressing kbd:[Enter] to execute it."},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"image::create.PNG[width\u003d\"300\"]"},{"lineNumber":136,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":137,"author":{"gitId":"lithiumlkid"},"content":". Your new team, `NUS` should appear in the team list."},{"lineNumber":138,"author":{"gitId":"lithiumlkid"},"content":". You can now assign `Ronaldo` to `NUS` by typing the command `assign tm/NUS i/1` in the command box and pressing kbd:[Enter] to execute it."},{"lineNumber":139,"author":{"gitId":"lithiumlkid"},"content":"- The Team List should now show NUS highlighted as shown in the white box labeled 1 above."},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"- `Ronaldo` \u0027s player card should now show NUS in the team field as shown in the white box labeled 2 above."},{"lineNumber":141,"author":{"gitId":"lithiumlkid"},"content":"- The player list shows only players assigned to the team `NUS`"},{"lineNumber":142,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":143,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Viewing more details"},{"lineNumber":144,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":". View more details about a player, by entering `select` followed by the \u003c\u003cIndex, `INDEX`\u003e\u003e of the player. For example, to view"},{"lineNumber":146,"author":{"gitId":"lithiumlkid"},"content":"`Ronaldo` \u0027s details, enter `select 1`."},{"lineNumber":147,"author":{"gitId":"lithiumlkid"},"content":". The details panel should now show the player\u0027s details."},{"lineNumber":148,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":149,"author":{"gitId":"lithiumlkid"},"content":"image::select.png[width\u003d\"790\"]"},{"lineNumber":150,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":151,"author":{"gitId":"lithiumlkid"},"content":". You may notice that there are fields that show `\u003cUNSPECIFIED\u003e`. These are optional fields that you can edit later on."},{"lineNumber":152,"author":{"gitId":"lithiumlkid"},"content":"There are also many ways you can customize and add to My Team Manager. Here are a few ways to start:"},{"lineNumber":153,"author":{"gitId":"-"},"content":".. \u003c\u003cedit, Editing a player\u003e\u003e"},{"lineNumber":154,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003cchangeTheme, Changing MTM theme\u003e\u003e"},{"lineNumber":155,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csetTagColour, Setting Tag Colour\u003e\u003e"},{"lineNumber":156,"author":{"gitId":"-"},"content":".. \u003c\u003ctoggleprivacy, Setting privacy\u003e\u003e"},{"lineNumber":157,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csort, Sorting players in the list\u003e\u003e"},{"lineNumber":158,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":159,"author":{"gitId":"lithiumlkid"},"content":"// end::introduction[]"},{"lineNumber":160,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":161,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Commands in My Team Manager"},{"lineNumber":162,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":163,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful information regarding all the commands in My Team Manager."},{"lineNumber":164,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":165,"author":{"gitId":"lithiumlkid"},"content":"If you are not familiar on how to use commands yet, you can refer to \u003c\u003cUsing_Commands\u003e\u003e"},{"lineNumber":166,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":167,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Fundamentals"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"lithiumlkid"},"content":"MTM provides tools that gives you the power to use MTM more efficiently and teach you how to navigate through MTM with ease."},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"lithiumlkid"},"content":"Enter commands more quickly with \u003c\u003cautocomplete,kbd:[tab] autocomplete\u003e\u003e, get \u003c\u003chelp,help\u003e\u003e or find out how to \u003c\u003cundo,undo\u003e\u003e and \u003c\u003credo,redo\u003e\u003e commands."},{"lineNumber":172,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":173,"author":{"gitId":"lithiumlkid"},"content":"You can also find information to secure your information in My Team Manger by \u003c\u003ctogglePrivacy, toggling privacy\u003e\u003e or \u003c\u003ckey,set a key to prevent tampering\u003e\u003e"},{"lineNumber":174,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Saving the data"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":"There is no need to save anything manually as My Team Manager will save"},{"lineNumber":178,"author":{"gitId":"-"},"content":"any data entered directly to the hard drive."},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":"// tag::autocomplete[]"},{"lineNumber":181,"author":{"gitId":"-"},"content":"[[autocomplete]]"},{"lineNumber":182,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Using kbd:[tab] Autocomplete"},{"lineNumber":183,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":"After typing in the first few characters of a command, pressing kbd:[tab] will fill in the rest of the item."},{"lineNumber":185,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":"To view the parameters for a command, press tab after the whole command is typed in. Pressing tab again will remove the parameters."},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":189,"author":{"gitId":"-"},"content":"You can use the autocompleted parameters as a template after viewing them."},{"lineNumber":190,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":191,"author":{"gitId":"lithiumlkid"},"content":"Text will turn red if the input has no parameters or if no matching command exists."},{"lineNumber":192,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":193,"author":{"gitId":"lithiumlkid"},"content":"If there are multiple possible commands for a given input, i.e. \u0027e\u0027 could be \u0027edit\u0027 or \u0027exit\u0027,"},{"lineNumber":194,"author":{"gitId":"-"},"content":"then a dropdown box will appear with the possible commands. These can be navigated using mouse or arrow keys. Press enter to select the desired command."},{"lineNumber":195,"author":{"gitId":"-"},"content":"// end::autocomplete[]"},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":"[[help]]"},{"lineNumber":198,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing help : `help`"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":"Feeling lost? Not sure what to do? Don\u0027t worry, our friendly guide will help you! All you have to do is just type the `help` command, and you will get all the information you require."},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":"Format: `help` +"},{"lineNumber":203,"author":{"gitId":"-"},"content":"Alias: kbd:[F1]"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"-"},"content":"[[history]]"},{"lineNumber":206,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing entered commands : `history`"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":"Have you been extensively using MTM and in the midst of entering more commands, you could not remember what commands you have entered? MTM allows you to look at all your past commands that you have entered in reverse chronological order."},{"lineNumber":209,"author":{"gitId":"-"},"content":""},{"lineNumber":210,"author":{"gitId":"-"},"content":"Format: `history` +"},{"lineNumber":211,"author":{"gitId":"-"},"content":"Alias: `h`"},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":215,"author":{"gitId":"-"},"content":"* Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box."},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":219,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":220,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":221,"author":{"gitId":"-"},"content":"A list of your previously entered command will be shown to you."},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":225,"author":{"gitId":"-"},"content":"[[undo]]"},{"lineNumber":226,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undoing previous command : `undo`"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":"Have you entered a wrong command or might have accidentally entered the wrong values to the specified fields to a command? +"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":"You don\u0027t have to worry, as MTM provides you with the command to undo most mistakes that you might have made. MTM will restore itself to the state before the previous command was executed."},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":"Format: `undo` +"},{"lineNumber":233,"author":{"gitId":"-"},"content":"Alias: `u`"},{"lineNumber":234,"author":{"gitId":"-"},"content":""},{"lineNumber":235,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":236,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":237,"author":{"gitId":"-"},"content":"* There are a few commands that can be undoable: commands that modify MTM\u0027s content that are related to players or teams."},{"lineNumber":238,"author":{"gitId":"-"},"content":"** Player related commands: `add`, `delete`, `edit`, `clear`, `remark` +"},{"lineNumber":239,"author":{"gitId":"-"},"content":"** Team related commands: `create`, `assign`, `remove`, `rename`"},{"lineNumber":240,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":243,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":244,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":245,"author":{"gitId":"-"},"content":"Commands that are _undoAble_ will be reversed and MTM will be in the state before the command was executed."},{"lineNumber":246,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"-"},"content":"[[redo]]"},{"lineNumber":249,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Redoing the previously undone command : `redo`"},{"lineNumber":250,"author":{"gitId":"codeeong"},"content":"If you accidentally call the `undo` command too many times and need a way to quickly reverse that, MTM allows you to redo the most recent `undo` command."},{"lineNumber":251,"author":{"gitId":"-"},"content":""},{"lineNumber":252,"author":{"gitId":"-"},"content":"Format: `redo` +"},{"lineNumber":253,"author":{"gitId":"-"},"content":"Alias: `r`"},{"lineNumber":254,"author":{"gitId":"-"},"content":""},{"lineNumber":255,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":256,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":257,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":258,"author":{"gitId":"-"},"content":"Previously executed `undo` command will be reversed and MTM will be in its previous state."},{"lineNumber":259,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":260,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":"// tag::togglePrivacy[]"},{"lineNumber":263,"author":{"gitId":"-"},"content":"[[toggleprivacy]]"},{"lineNumber":264,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling various fields to private: `toggleprivacy` `[Since v1.4]`"},{"lineNumber":265,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":"You can toggle the privacy of various fields of players in MTM."},{"lineNumber":267,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":268,"author":{"gitId":"-"},"content":"Format: `toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]` +"},{"lineNumber":269,"author":{"gitId":"-"},"content":"Alias: `tp`"},{"lineNumber":270,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":271,"author":{"gitId":"codeeong"},"content":"[NOTE]"},{"lineNumber":272,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":273,"author":{"gitId":"-"},"content":"* Current version of `toggleprivacy` supports the field to be privated: +"},{"lineNumber":274,"author":{"gitId":"-"},"content":"** `p/`: PHONE, `e/`: EMAIL, `r/`: REMARK, `ra/`:RATING \u0026 `a/`: ADDRESS."},{"lineNumber":275,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":276,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":277,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":278,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":279,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":280,"author":{"gitId":"-"},"content":"Privacy of field will be toggled between private or public. +"},{"lineNumber":281,"author":{"gitId":"-"},"content":"If Phone: `p/` of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1 is private, running command: `tp 1 p/` would change phone field to public. +"},{"lineNumber":282,"author":{"gitId":"-"},"content":"Private fields are shown as \u003cPrivate `FIELD`\u003e."},{"lineNumber":283,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":284,"author":{"gitId":"-"},"content":""},{"lineNumber":285,"author":{"gitId":"-"},"content":"Here are some examples on how you can use the `toggleprivacy` command:"},{"lineNumber":286,"author":{"gitId":"-"},"content":""},{"lineNumber":287,"author":{"gitId":"-"},"content":"* `tp 1 p/ ra/`"},{"lineNumber":288,"author":{"gitId":"-"},"content":""},{"lineNumber":289,"author":{"gitId":"-"},"content":"Toggles privacy of phone and rating of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1."},{"lineNumber":290,"author":{"gitId":"-"},"content":"// end::togglePrivacy[]"},{"lineNumber":291,"author":{"gitId":"-"},"content":""},{"lineNumber":292,"author":{"gitId":"-"},"content":"// tag::key[]"},{"lineNumber":293,"author":{"gitId":"-"},"content":"[[key]]"},{"lineNumber":294,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling lock on MTM: `key` `[Since v1.5]`"},{"lineNumber":295,"author":{"gitId":"-"},"content":""},{"lineNumber":296,"author":{"gitId":"-"},"content":"You can toggle a lock on MTM to prevent unauthorised changes to your details in MTM. When MTM is in a locked state, functionality will be limited."},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"-"},"content":"Format: `key PASSWORD` +"},{"lineNumber":299,"author":{"gitId":"-"},"content":"Alias: `k`"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":302,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":303,"author":{"gitId":"-"},"content":"* Current version of `key` uses a fixed default `PASSWORD`: *ilikesports*"},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":305,"author":{"gitId":"-"},"content":""},{"lineNumber":306,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":307,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":309,"author":{"gitId":"-"},"content":"When MTM is locked, only the following commands can be executed: +"},{"lineNumber":310,"author":{"gitId":"-"},"content":"`changeTheme`, `exit`, `find`, `help`, `key`, `list`, `sort` and `view`"},{"lineNumber":311,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":312,"author":{"gitId":"-"},"content":""},{"lineNumber":313,"author":{"gitId":"-"},"content":"Here are examples on how to use `key`:"},{"lineNumber":314,"author":{"gitId":"-"},"content":""},{"lineNumber":315,"author":{"gitId":"-"},"content":"* `key ilikesports`"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":"If MTM is in a lock state, use this command to unlock it."},{"lineNumber":318,"author":{"gitId":"-"},"content":""},{"lineNumber":319,"author":{"gitId":"-"},"content":""},{"lineNumber":320,"author":{"gitId":"-"},"content":"* `key ilikesports`"},{"lineNumber":321,"author":{"gitId":"-"},"content":""},{"lineNumber":322,"author":{"gitId":"-"},"content":"To lock MTM, use this command to lock."},{"lineNumber":323,"author":{"gitId":"-"},"content":""},{"lineNumber":324,"author":{"gitId":"-"},"content":"// end::key[]"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":"[[clear]]"},{"lineNumber":327,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Clearing all entries : `clear`"},{"lineNumber":328,"author":{"gitId":"-"},"content":""},{"lineNumber":329,"author":{"gitId":"-"},"content":"You can clear all entries from MTM with the \u0027clear\u0027 command."},{"lineNumber":330,"author":{"gitId":"-"},"content":""},{"lineNumber":331,"author":{"gitId":"-"},"content":"Format: `clear` +"},{"lineNumber":332,"author":{"gitId":"-"},"content":"Alias: `c`"},{"lineNumber":333,"author":{"gitId":"-"},"content":""},{"lineNumber":334,"author":{"gitId":"-"},"content":"[[exit]]"},{"lineNumber":335,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Exiting the program : `exit`"},{"lineNumber":336,"author":{"gitId":"-"},"content":""},{"lineNumber":337,"author":{"gitId":"-"},"content":"You can exit the program by entering the \u0027exit\u0027 command."},{"lineNumber":338,"author":{"gitId":"-"},"content":""},{"lineNumber":339,"author":{"gitId":"-"},"content":"Format: `exit`"},{"lineNumber":340,"author":{"gitId":"-"},"content":""},{"lineNumber":341,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands"},{"lineNumber":342,"author":{"gitId":"-"},"content":""},{"lineNumber":343,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your players and their information in My Team Manager +"},{"lineNumber":344,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003cadd,adding a player\u003e\u003e, \u003c\u003cedit,editing a player\u003e\u003e or \u003c\u003cremark,adding a remark\u003e\u003e."},{"lineNumber":345,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools to \u003c\u003cfind,find\u003e\u003e a player or \u003c\u003csort,sort\u003e\u003e players in your list."},{"lineNumber":346,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":347,"author":{"gitId":"lithiumlkid"},"content":"// tag::addplayer[]"},{"lineNumber":348,"author":{"gitId":"-"},"content":"[[add]]"},{"lineNumber":349,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Adding a player: `add`"},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"lithiumlkid"},"content":"This is the command that you will be using most frequently, especially when dealing with new players. You will be able to add new players with the details that you have obtained into MTM by using the `add` command."},{"lineNumber":352,"author":{"gitId":"-"},"content":""},{"lineNumber":353,"author":{"gitId":"lithiumlkid"},"content":"Format: `add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]...` +"},{"lineNumber":354,"author":{"gitId":"-"},"content":"Alias: `a`"},{"lineNumber":355,"author":{"gitId":"-"},"content":""},{"lineNumber":356,"author":{"gitId":"-"},"content":"The table below explains the correct inputs for the parameters."},{"lineNumber":357,"author":{"gitId":"-"},"content":""},{"lineNumber":358,"author":{"gitId":"-"},"content":"[width\u003d\"80%\",cols\u003d\"1,2,2\",options\u003d\"header\"]"},{"lineNumber":359,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":360,"author":{"gitId":"-"},"content":"|Parameter |Input type |Example"},{"lineNumber":361,"author":{"gitId":"-"},"content":"|n/NAME |Player name | n/Ronaldo"},{"lineNumber":362,"author":{"gitId":"-"},"content":"|e/EMAIL |Player\u0027s email address | a/ronaldo@soccer.com"},{"lineNumber":363,"author":{"gitId":"-"},"content":"|tm/TEAM |Player\u0027s Team | tm/Real Madrid"},{"lineNumber":364,"author":{"gitId":"-"},"content":"|a/ADDRESS |Player\u0027s address| a/Blk 123 Bukit Batok St 21"},{"lineNumber":365,"author":{"gitId":"-"},"content":"|p/PHONE_NUMBER| Player\u0027s phone number| p/92343433"},{"lineNumber":366,"author":{"gitId":"-"},"content":"|j/JERSEY_NUMBER| Player\u0027s jersey number| j/17"},{"lineNumber":367,"author":{"gitId":"-"},"content":"|ra/RATING| Player\u0027s performance rating (From 1 to 5)| ra/5"},{"lineNumber":368,"author":{"gitId":"-"},"content":"|po/POSITION| Player\u0027s postion +"},{"lineNumber":369,"author":{"gitId":"-"},"content":"(1 for Striker, +"},{"lineNumber":370,"author":{"gitId":"-"},"content":"2 for Midfiled, +"},{"lineNumber":371,"author":{"gitId":"-"},"content":"3 for Defender, +"},{"lineNumber":372,"author":{"gitId":"-"},"content":"4 for Goalkeeper)| po/1"},{"lineNumber":373,"author":{"gitId":"-"},"content":"|av/AVATAR| Absolute filepath to player\u0027s avatar image file| av/C:\\avatar.png (for Windows) av//User/username/path/to/image.jpg (for MacOS)"},{"lineNumber":374,"author":{"gitId":"-"},"content":"|t/TAG| Your tag for the player| t/Injured"},{"lineNumber":375,"author":{"gitId":"-"},"content":""},{"lineNumber":376,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":377,"author":{"gitId":"-"},"content":""},{"lineNumber":378,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":379,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":380,"author":{"gitId":"-"},"content":"* A player can only be added to an existing team."},{"lineNumber":381,"author":{"gitId":"-"},"content":"* If you have not created the team yet, you can create one first using the \u003c\u003cCreating a team: `create` `[Since v1.2]`, `create`\u003e\u003e command."},{"lineNumber":382,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":383,"author":{"gitId":"-"},"content":""},{"lineNumber":384,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":385,"author":{"gitId":"-"},"content":"A player can have any number of tags (including 0)."},{"lineNumber":386,"author":{"gitId":"-"},"content":""},{"lineNumber":387,"author":{"gitId":"-"},"content":"Output: The added player should appear in the player list panel."},{"lineNumber":388,"author":{"gitId":"-"},"content":""},{"lineNumber":389,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":390,"author":{"gitId":"-"},"content":""},{"lineNumber":391,"author":{"gitId":"-"},"content":"* `add n/Mo Salah e/mo@soccer.com`"},{"lineNumber":392,"author":{"gitId":"-"},"content":""},{"lineNumber":393,"author":{"gitId":"-"},"content":"Adds a player named `Mo Salah` with email `mo@soccer.com`."},{"lineNumber":394,"author":{"gitId":"-"},"content":""},{"lineNumber":395,"author":{"gitId":"-"},"content":"* `add n/Ronaldo p/92331322 e/ronaldo@soccer.com a/Portugal tm/Real Madrid j/17 ra/5 po/1`"},{"lineNumber":396,"author":{"gitId":"-"},"content":""},{"lineNumber":397,"author":{"gitId":"-"},"content":"Adds a player named Ronaldo with phone number `92331322`, email `ronaldo@soccer.com`, address `Portugal`,"},{"lineNumber":398,"author":{"gitId":"-"},"content":"team `Real Madrid`, jersey number `17`, rating `5`, and position `1` corresponding to `Striker`."},{"lineNumber":399,"author":{"gitId":"-"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":"[[edit]]"},{"lineNumber":401,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Editing a player : `edit`"},{"lineNumber":402,"author":{"gitId":"-"},"content":""},{"lineNumber":403,"author":{"gitId":"lithiumlkid"},"content":"If you made a mistake when adding a player, or if there\u0027s player information that needs updating, you may edit an existing player in MTM with the \u0027edit\u0027 command."},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"-"},"content":"Format: `edit INDEX [n/NAME] [e/EMAIL] [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]...` +"},{"lineNumber":406,"author":{"gitId":"-"},"content":"Alias: `e`"},{"lineNumber":407,"author":{"gitId":"-"},"content":""},{"lineNumber":408,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":409,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":410,"author":{"gitId":"-"},"content":"* Edits the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e."},{"lineNumber":411,"author":{"gitId":"-"},"content":"* Please only edit the player that is currently being selected. If you were to edit a player who is not selected, the player\u0027s details will be updated, but the selection will remain at the currently selected player."},{"lineNumber":412,"author":{"gitId":"-"},"content":"* At least one of the optional fields must be provided."},{"lineNumber":413,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values."},{"lineNumber":414,"author":{"gitId":"-"},"content":"* When you edit tags, the existing tags of the player will be removed i.e adding of tags is not cumulative."},{"lineNumber":415,"author":{"gitId":"-"},"content":"* You can remove all the player\u0027s tags by typing `t/` without specifying any tags after it."},{"lineNumber":416,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":417,"author":{"gitId":"-"},"content":""},{"lineNumber":418,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":419,"author":{"gitId":"-"},"content":""},{"lineNumber":420,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com`"},{"lineNumber":421,"author":{"gitId":"-"},"content":""},{"lineNumber":422,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st player to be `91234567` and `johndoe@example.com` respectively."},{"lineNumber":423,"author":{"gitId":"-"},"content":""},{"lineNumber":424,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/`"},{"lineNumber":425,"author":{"gitId":"-"},"content":""},{"lineNumber":426,"author":{"gitId":"-"},"content":"Edits the name of the 2nd player to be `Betsy Crower` and clears all existing tags."},{"lineNumber":427,"author":{"gitId":"lithiumlkid"},"content":"// end::addplayer[]"},{"lineNumber":428,"author":{"gitId":"-"},"content":""},{"lineNumber":429,"author":{"gitId":"-"},"content":"[[delete]]"},{"lineNumber":430,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Deleting a player : `delete`"},{"lineNumber":431,"author":{"gitId":"-"},"content":""},{"lineNumber":432,"author":{"gitId":"codeeong"},"content":"If you want to remove a player from MTM, you may use this command to delete the player."},{"lineNumber":433,"author":{"gitId":"-"},"content":""},{"lineNumber":434,"author":{"gitId":"-"},"content":"Format: `delete INDEX` +"},{"lineNumber":435,"author":{"gitId":"-"},"content":"Alias: `d`"},{"lineNumber":436,"author":{"gitId":"-"},"content":""},{"lineNumber":437,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":438,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":439,"author":{"gitId":"-"},"content":"* Deletes the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e."},{"lineNumber":440,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":443,"author":{"gitId":"-"},"content":""},{"lineNumber":444,"author":{"gitId":"-"},"content":"* `list`"},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `delete 2`"},{"lineNumber":446,"author":{"gitId":"-"},"content":""},{"lineNumber":447,"author":{"gitId":"-"},"content":"Deletes the 2nd player in the MTM."},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"-"},"content":"* `find Betsy`"},{"lineNumber":450,"author":{"gitId":"-"},"content":"* `delete 1`"},{"lineNumber":451,"author":{"gitId":"-"},"content":""},{"lineNumber":452,"author":{"gitId":"lohtianwei"},"content":"Deletes the 1st player in the results of the `find` command."},{"lineNumber":453,"author":{"gitId":"-"},"content":""},{"lineNumber":454,"author":{"gitId":"-"},"content":"[[remark]]"},{"lineNumber":455,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Noting down a remark for player: `remark` `[Since v1.1]`"},{"lineNumber":456,"author":{"gitId":"-"},"content":""},{"lineNumber":457,"author":{"gitId":"-"},"content":"When you need to drop yourself a self-note with regards to a specific player you\u0027re managing, you can make a self-note"},{"lineNumber":458,"author":{"gitId":"-"},"content":"of a specific player easily by giving the player a remark for you to remember by."},{"lineNumber":459,"author":{"gitId":"-"},"content":""},{"lineNumber":460,"author":{"gitId":"-"},"content":"Format: `remark INDEX [r/[REMARK]]` +"},{"lineNumber":461,"author":{"gitId":"-"},"content":"Alias: `rm`"},{"lineNumber":462,"author":{"gitId":"-"},"content":""},{"lineNumber":463,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":464,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":465,"author":{"gitId":"-"},"content":"* By leaving out `r/REMARK` or `REMARK`, the command acts as a remark removal."},{"lineNumber":466,"author":{"gitId":"-"},"content":"* Only use the `remark` command when you want to leave a remark, `add` or `edit` does not allow you to create a remark for the player."},{"lineNumber":467,"author":{"gitId":"-"},"content":"* Please only add remarks to the player that is currently being selected. If you were to add remarks to a player who is not selected, the player\u0027s remarks will be updated, but the selection will remain at the currently selected player."},{"lineNumber":468,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":469,"author":{"gitId":"-"},"content":""},{"lineNumber":470,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":471,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":472,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":473,"author":{"gitId":"-"},"content":"Your specified player will either be given a new remark or have its existing remark removed."},{"lineNumber":474,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":475,"author":{"gitId":"-"},"content":""},{"lineNumber":476,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `remark` command:"},{"lineNumber":477,"author":{"gitId":"-"},"content":""},{"lineNumber":478,"author":{"gitId":"-"},"content":"* `remark 1`"},{"lineNumber":479,"author":{"gitId":"-"},"content":""},{"lineNumber":480,"author":{"gitId":"-"},"content":"Removes the remark from the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1."},{"lineNumber":481,"author":{"gitId":"-"},"content":""},{"lineNumber":482,"author":{"gitId":"-"},"content":"* `remark 5 r/MVP Player`"},{"lineNumber":483,"author":{"gitId":"-"},"content":""},{"lineNumber":484,"author":{"gitId":"-"},"content":"Give a remark to the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 5 with the remark \"MVP Player\"."},{"lineNumber":485,"author":{"gitId":"-"},"content":""},{"lineNumber":486,"author":{"gitId":"-"},"content":"[[list]]"},{"lineNumber":487,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing all players : `list`"},{"lineNumber":488,"author":{"gitId":"-"},"content":""},{"lineNumber":489,"author":{"gitId":"-"},"content":"To view a list of all the players you are managing, you can use the `list` command to see all of your players."},{"lineNumber":490,"author":{"gitId":"-"},"content":""},{"lineNumber":491,"author":{"gitId":"-"},"content":"Format: `list` +"},{"lineNumber":492,"author":{"gitId":"-"},"content":"Alias: `l`"},{"lineNumber":493,"author":{"gitId":"-"},"content":""},{"lineNumber":494,"author":{"gitId":"-"},"content":""},{"lineNumber":495,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]"},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"[[sort]]"},{"lineNumber":497,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sorting players by field: `sort` `[Since v1.2]`"},{"lineNumber":498,"author":{"gitId":"-"},"content":""},{"lineNumber":499,"author":{"gitId":"-"},"content":"You can sort the players by fields with the \u0027sort\u0027 command. Players can be sorted in both ascending or descending order."},{"lineNumber":500,"author":{"gitId":"-"},"content":""},{"lineNumber":501,"author":{"gitId":"-"},"content":"Format: `sort FIELD ORDER` +"},{"lineNumber":502,"author":{"gitId":"-"},"content":"Alias: `so`"},{"lineNumber":503,"author":{"gitId":"-"},"content":""},{"lineNumber":504,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":505,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":506,"author":{"gitId":"-"},"content":"* Current version of `sort` supports the following fields and order:"},{"lineNumber":507,"author":{"gitId":"-"},"content":"** `FIELD`: `name`, `email`, `address`, `rating`, `jersey` \u0026 `position`"},{"lineNumber":508,"author":{"gitId":"-"},"content":"** `ORDER`: `asc` \u0026 `desc`"},{"lineNumber":509,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":510,"author":{"gitId":"-"},"content":""},{"lineNumber":511,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `sort` command:"},{"lineNumber":512,"author":{"gitId":"-"},"content":""},{"lineNumber":513,"author":{"gitId":"-"},"content":"* `sort name asc`"},{"lineNumber":514,"author":{"gitId":"-"},"content":""},{"lineNumber":515,"author":{"gitId":"-"},"content":"This will sort MTM by names, in alphabetical order."},{"lineNumber":516,"author":{"gitId":"-"},"content":""},{"lineNumber":517,"author":{"gitId":"-"},"content":"* `sort name desc`"},{"lineNumber":518,"author":{"gitId":"-"},"content":""},{"lineNumber":519,"author":{"gitId":"-"},"content":"This will sort MTM by names, in reverse alphabetical order."},{"lineNumber":520,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]"},{"lineNumber":521,"author":{"gitId":"-"},"content":""},{"lineNumber":522,"author":{"gitId":"-"},"content":"[[find]]"},{"lineNumber":523,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Locating players by name: `find`"},{"lineNumber":524,"author":{"gitId":"-"},"content":""},{"lineNumber":525,"author":{"gitId":"-"},"content":"You can find a player whose name contain any of the given keywords with this command within the full player listing of MTM."},{"lineNumber":526,"author":{"gitId":"-"},"content":""},{"lineNumber":527,"author":{"gitId":"-"},"content":"Format: `find KEYWORD [KEYWORD]...` +"},{"lineNumber":528,"author":{"gitId":"-"},"content":"Alias: `f`"},{"lineNumber":529,"author":{"gitId":"-"},"content":""},{"lineNumber":530,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":531,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":532,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`."},{"lineNumber":533,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`."},{"lineNumber":534,"author":{"gitId":"-"},"content":"* Only the name is searched."},{"lineNumber":535,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`."},{"lineNumber":536,"author":{"gitId":"-"},"content":"* Players matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`."},{"lineNumber":537,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":538,"author":{"gitId":"-"},"content":""},{"lineNumber":539,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":540,"author":{"gitId":"-"},"content":""},{"lineNumber":541,"author":{"gitId":"-"},"content":"* `find John`"},{"lineNumber":542,"author":{"gitId":"-"},"content":""},{"lineNumber":543,"author":{"gitId":"-"},"content":"MTM will find all players with the name `john` with uppercase/lowercase characters in it."},{"lineNumber":544,"author":{"gitId":"-"},"content":""},{"lineNumber":545,"author":{"gitId":"-"},"content":"* `find Betsy Tim John`"},{"lineNumber":546,"author":{"gitId":"-"},"content":""},{"lineNumber":547,"author":{"gitId":"-"},"content":"Display all players that have the name `betsy`, `tim`, or `john`."},{"lineNumber":548,"author":{"gitId":"-"},"content":""},{"lineNumber":549,"author":{"gitId":"-"},"content":"[[select]]"},{"lineNumber":550,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Selecting a player : `select`"},{"lineNumber":551,"author":{"gitId":"-"},"content":""},{"lineNumber":552,"author":{"gitId":"-"},"content":"Identified the player you\u0027re looking for and want to see more details about the player?"},{"lineNumber":553,"author":{"gitId":"-"},"content":"MTM offers you the ability to view details of your specified player via an \u003c\u003cIndex, `INDEX`\u003e\u003e shown in the current listing of players."},{"lineNumber":554,"author":{"gitId":"-"},"content":"Alternatively, you can just scroll to the player you want, click their card,"},{"lineNumber":555,"author":{"gitId":"-"},"content":"and their details will be displayed on the right hand side of the screen."},{"lineNumber":556,"author":{"gitId":"-"},"content":""},{"lineNumber":557,"author":{"gitId":"-"},"content":"Format: `select INDEX` +"},{"lineNumber":558,"author":{"gitId":"-"},"content":"Alias: `s`"},{"lineNumber":559,"author":{"gitId":"-"},"content":""},{"lineNumber":560,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":561,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":562,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":563,"author":{"gitId":"codeeong"},"content":"The details panel will display your selected player\u0027s name, phone number, address, email address,"},{"lineNumber":564,"author":{"gitId":"codeeong"},"content":"jersey number, and remarks on the right side of the screen."},{"lineNumber":565,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":566,"author":{"gitId":"-"},"content":""},{"lineNumber":567,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `select` command:"},{"lineNumber":568,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":569,"author":{"gitId":"-"},"content":"* `list`"},{"lineNumber":570,"author":{"gitId":"-"},"content":"* `select 2`"},{"lineNumber":571,"author":{"gitId":"-"},"content":""},{"lineNumber":572,"author":{"gitId":"-"},"content":"Displays the list of all players and selects the 2nd player in that list."},{"lineNumber":573,"author":{"gitId":"-"},"content":""},{"lineNumber":574,"author":{"gitId":"-"},"content":"* `find Betsy`"},{"lineNumber":575,"author":{"gitId":"-"},"content":"* `select 1`"},{"lineNumber":576,"author":{"gitId":"-"},"content":""},{"lineNumber":577,"author":{"gitId":"-"},"content":"Finds a player named `betsy` and selects the 1st player in the results of the `find` command."},{"lineNumber":578,"author":{"gitId":"-"},"content":""},{"lineNumber":579,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands"},{"lineNumber":580,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":581,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your teams and their players in My Team Manager +"},{"lineNumber":582,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003ccreate,creating a team\u003e\u003e, \u003c\u003cassign,assigning players to a team\u003e\u003e or \u003c\u003crename,renaming a team\u003e\u003e."},{"lineNumber":583,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools like \u003c\u003cview,viewing a team\u003e\u003e."},{"lineNumber":584,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":585,"author":{"gitId":"-"},"content":"// tag::create[]"},{"lineNumber":586,"author":{"gitId":"-"},"content":"[[create]]"},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a team: `create` `[Since v1.2]`"},{"lineNumber":588,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":589,"author":{"gitId":"-"},"content":"What is a team management application without the functionality of creating a team? When you use this command, it allows you to create a team that can be assigned to players later on."},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"-"},"content":"Format: `create TEAM_NAME` +"},{"lineNumber":592,"author":{"gitId":"-"},"content":"Alias: `ct`"},{"lineNumber":593,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":594,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":595,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":596,"author":{"gitId":"-"},"content":"* You can\u0027t create a team that already exist in MTM."},{"lineNumber":597,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":598,"author":{"gitId":"-"},"content":""},{"lineNumber":599,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":600,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":601,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":602,"author":{"gitId":"-"},"content":"Your newly specified team will be created with the name you have given without any players in it, and your team name will appear in the team bar below."},{"lineNumber":603,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":604,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":605,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:"},{"lineNumber":606,"author":{"gitId":"-"},"content":""},{"lineNumber":607,"author":{"gitId":"-"},"content":"* `create Liverpool`"},{"lineNumber":608,"author":{"gitId":"-"},"content":""},{"lineNumber":609,"author":{"gitId":"-"},"content":"Creates another new team with the name \"Liverpool\" by entering `create Liverpool` into the Command Box and pressing kbd:[Enter]."},{"lineNumber":610,"author":{"gitId":"-"},"content":""},{"lineNumber":611,"author":{"gitId":"-"},"content":"image::TeamCreateExampleBefore.png[width\u003d\"200\"]"},{"lineNumber":612,"author":{"gitId":"-"},"content":""},{"lineNumber":613,"author":{"gitId":"-"},"content":"\"Liverpool\" will be shown in the Team List."},{"lineNumber":614,"author":{"gitId":"-"},"content":""},{"lineNumber":615,"author":{"gitId":"-"},"content":"image::TeamCreateExampleAfter.png[width\u003d\"350\"]"},{"lineNumber":616,"author":{"gitId":"-"},"content":"// end::create[]"},{"lineNumber":617,"author":{"gitId":"-"},"content":""},{"lineNumber":618,"author":{"gitId":"-"},"content":"// tag::view[]"},{"lineNumber":619,"author":{"gitId":"-"},"content":"[[view]]"},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a team: `view` `[Since v1.3]`"},{"lineNumber":621,"author":{"gitId":"-"},"content":""},{"lineNumber":622,"author":{"gitId":"-"},"content":"With the ability to manage different teams, you will be able to identify all players in a team easily with the `view` command."},{"lineNumber":623,"author":{"gitId":"-"},"content":""},{"lineNumber":624,"author":{"gitId":"-"},"content":"`Coming in v2.0` +"},{"lineNumber":625,"author":{"gitId":"-"},"content":"Details of your team will be displayed on the right panel when `view` command is executed."},{"lineNumber":626,"author":{"gitId":"-"},"content":""},{"lineNumber":627,"author":{"gitId":"-"},"content":"Format: `view TEAM_NAME` +"},{"lineNumber":628,"author":{"gitId":"-"},"content":"Alias: `vt`"},{"lineNumber":629,"author":{"gitId":"-"},"content":""},{"lineNumber":630,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":631,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":632,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":633,"author":{"gitId":"-"},"content":"Displays the list of players on the left panel that are in the team specified."},{"lineNumber":634,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":635,"author":{"gitId":"-"},"content":""},{"lineNumber":636,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `view` command:"},{"lineNumber":637,"author":{"gitId":"-"},"content":""},{"lineNumber":638,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":639,"author":{"gitId":"-"},"content":""},{"lineNumber":640,"author":{"gitId":"-"},"content":"You can use the command above to easily view all the players that exist in \"Arsenal\"."},{"lineNumber":641,"author":{"gitId":"-"},"content":""},{"lineNumber":642,"author":{"gitId":"-"},"content":"image::TeamViewExampleBefore.png[width\u003d\"350\"]"},{"lineNumber":643,"author":{"gitId":"-"},"content":""},{"lineNumber":644,"author":{"gitId":"-"},"content":"The Player List will be updated with all players in the specified team, \"Arsenal\"."},{"lineNumber":645,"author":{"gitId":"-"},"content":""},{"lineNumber":646,"author":{"gitId":"-"},"content":"image::TeamViewExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":647,"author":{"gitId":"-"},"content":"// end::view[]"},{"lineNumber":648,"author":{"gitId":"-"},"content":""},{"lineNumber":649,"author":{"gitId":"-"},"content":"// tag::assign[]"},{"lineNumber":650,"author":{"gitId":"-"},"content":"[[assign]]"},{"lineNumber":651,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning player to teams: `assign` `[Since v1.3]`"},{"lineNumber":652,"author":{"gitId":"-"},"content":""},{"lineNumber":653,"author":{"gitId":"-"},"content":"Have a player without a team, or have yet to assigned one during the addition of player into MTM, you can call `assign` command to assign that player to a particular team of your choice."},{"lineNumber":654,"author":{"gitId":"-"},"content":""},{"lineNumber":655,"author":{"gitId":"-"},"content":"Format: `assign [TEAM_NAME] i/INDEX [INDEX]...` +"},{"lineNumber":656,"author":{"gitId":"-"},"content":"Alias: `at`"},{"lineNumber":657,"author":{"gitId":"-"},"content":""},{"lineNumber":658,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":659,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":660,"author":{"gitId":"-"},"content":"* You can assign multiple players to a team by including more than one valid \u003c\u003cIndex, `INDEX`\u003e\u003e."},{"lineNumber":661,"author":{"gitId":"-"},"content":"* A player can only consist of 1 team, assigning a player that have an existing team, will be re-assigned the new team."},{"lineNumber":662,"author":{"gitId":"-"},"content":"* Assigning a player without a given team will unassign the player from its current team."},{"lineNumber":663,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":664,"author":{"gitId":"-"},"content":""},{"lineNumber":665,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":666,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":667,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":668,"author":{"gitId":"-"},"content":"Your specified player, via \u003c\u003cIndex, `INDEX`\u003e\u003e, will be assigned to the specified team or unassigned from any team."},{"lineNumber":669,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":670,"author":{"gitId":"-"},"content":""},{"lineNumber":671,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:"},{"lineNumber":672,"author":{"gitId":"-"},"content":""},{"lineNumber":673,"author":{"gitId":"-"},"content":"* `list`"},{"lineNumber":674,"author":{"gitId":"-"},"content":""},{"lineNumber":675,"author":{"gitId":"-"},"content":"View the full list of players in MTM so that you can determine which player you want to assign a team."},{"lineNumber":676,"author":{"gitId":"-"},"content":""},{"lineNumber":677,"author":{"gitId":"-"},"content":"image::TeamAssignListExample.png[width\u003d\"700\"]"},{"lineNumber":678,"author":{"gitId":"-"},"content":""},{"lineNumber":679,"author":{"gitId":"-"},"content":"* `assign Liverpool i/1 2`"},{"lineNumber":680,"author":{"gitId":"-"},"content":""},{"lineNumber":681,"author":{"gitId":"-"},"content":"Enter the command into the Command Box which will assign the player with \u003c\u003cIndex, `INDEX`\u003e\u003e 1 and 2 to team \"Liverpool\"."},{"lineNumber":682,"author":{"gitId":"-"},"content":""},{"lineNumber":683,"author":{"gitId":"-"},"content":"image::TeamAssignExampleBefore.png[width\u003d\"200\"]"},{"lineNumber":684,"author":{"gitId":"-"},"content":""},{"lineNumber":685,"author":{"gitId":"-"},"content":"image::TeamAssignExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":686,"author":{"gitId":"-"},"content":""},{"lineNumber":687,"author":{"gitId":"-"},"content":"* `add n/Rembart Loeri e/remlo@tam.com tm/Liverpool`"},{"lineNumber":688,"author":{"gitId":"-"},"content":""},{"lineNumber":689,"author":{"gitId":"-"},"content":"Add a player with the prefix `tm/` for `Team` will automatically be assigned to the team specified."},{"lineNumber":690,"author":{"gitId":"-"},"content":""},{"lineNumber":691,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleBefore.png[width\u003d\"350\"]"},{"lineNumber":692,"author":{"gitId":"-"},"content":""},{"lineNumber":693,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::assign[]"},{"lineNumber":695,"author":{"gitId":"-"},"content":""},{"lineNumber":696,"author":{"gitId":"-"},"content":"// tag::rename[]"},{"lineNumber":697,"author":{"gitId":"-"},"content":"[[rename]]"},{"lineNumber":698,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Rename a team: `rename` `[Since v1.4]`"},{"lineNumber":699,"author":{"gitId":"-"},"content":""},{"lineNumber":700,"author":{"gitId":"-"},"content":"Entered your team name wrongly or you need to update it to accordingly, you can use the `rename` command to help you make that change."},{"lineNumber":701,"author":{"gitId":"-"},"content":""},{"lineNumber":702,"author":{"gitId":"-"},"content":"Format: `rename TEAM_NAME tm/RENAME_TEAM_NAME` +"},{"lineNumber":703,"author":{"gitId":"-"},"content":"Alias: `rnt`"},{"lineNumber":704,"author":{"gitId":"-"},"content":""},{"lineNumber":705,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":706,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":708,"author":{"gitId":"-"},"content":"Your specified team will be updated with the new team name along with the affected players in the existing team."},{"lineNumber":709,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":710,"author":{"gitId":"-"},"content":""},{"lineNumber":711,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `rename` command:"},{"lineNumber":712,"author":{"gitId":"-"},"content":""},{"lineNumber":713,"author":{"gitId":"-"},"content":"* `rename Liverpool tm/Tello Mello`"},{"lineNumber":714,"author":{"gitId":"-"},"content":""},{"lineNumber":715,"author":{"gitId":"-"},"content":"You can rename a `Team` easily by entering a similar command above, which will rename \"Liverpool\" into \"Tello Mello\"."},{"lineNumber":716,"author":{"gitId":"-"},"content":""},{"lineNumber":717,"author":{"gitId":"-"},"content":"image::TeamRenameExampleBefore.png[width\u003d\"700\"]"},{"lineNumber":718,"author":{"gitId":"-"},"content":""},{"lineNumber":719,"author":{"gitId":"-"},"content":"After renaming, the team name will be updated in the Team List and will be update for each individual player."},{"lineNumber":720,"author":{"gitId":"-"},"content":""},{"lineNumber":721,"author":{"gitId":"-"},"content":"image::TeamRenameExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":722,"author":{"gitId":"-"},"content":"// end::rename[]"},{"lineNumber":723,"author":{"gitId":"-"},"content":""},{"lineNumber":724,"author":{"gitId":"-"},"content":"// tag::remove[]"},{"lineNumber":725,"author":{"gitId":"-"},"content":"[[remove]]"},{"lineNumber":726,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a team: `remove` `[Since v1.4]`"},{"lineNumber":727,"author":{"gitId":"-"},"content":""},{"lineNumber":728,"author":{"gitId":"-"},"content":"No longer managing the team or the team has been disbanded, you can easily remove the team from MTM."},{"lineNumber":729,"author":{"gitId":"-"},"content":""},{"lineNumber":730,"author":{"gitId":"-"},"content":"Format: `remove TEAM_NAME` +"},{"lineNumber":731,"author":{"gitId":"-"},"content":"Alias: `rt`"},{"lineNumber":732,"author":{"gitId":"-"},"content":""},{"lineNumber":733,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":734,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":735,"author":{"gitId":"-"},"content":"* Removing a team will automatically update all affected players\u0027 `Team` field."},{"lineNumber":736,"author":{"gitId":"-"},"content":"* Players without a team will need to be re-assigned."},{"lineNumber":737,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":738,"author":{"gitId":"-"},"content":""},{"lineNumber":739,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":740,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":741,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":742,"author":{"gitId":"-"},"content":"Remove the specified team and update all affected players."},{"lineNumber":743,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":744,"author":{"gitId":"-"},"content":""},{"lineNumber":745,"author":{"gitId":"-"},"content":"Here are a few valid examples of how you can use the `remove` command:"},{"lineNumber":746,"author":{"gitId":"-"},"content":""},{"lineNumber":747,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":748,"author":{"gitId":"-"},"content":""},{"lineNumber":749,"author":{"gitId":"-"},"content":"Here we show you what it would be like before the removal of \"Arsenal\"."},{"lineNumber":750,"author":{"gitId":"-"},"content":""},{"lineNumber":751,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleBefore.png[width\u003d\"700\"]"},{"lineNumber":752,"author":{"gitId":"-"},"content":""},{"lineNumber":753,"author":{"gitId":"-"},"content":"* `remove Arsenal`"},{"lineNumber":754,"author":{"gitId":"-"},"content":""},{"lineNumber":755,"author":{"gitId":"-"},"content":"After typing the command, you will remove the the team from MTM and will be taken off the Team Display as well as updating each individual player affected to be without a team."},{"lineNumber":756,"author":{"gitId":"-"},"content":""},{"lineNumber":757,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":758,"author":{"gitId":"-"},"content":"// end::remove[]"},{"lineNumber":759,"author":{"gitId":"-"},"content":""},{"lineNumber":760,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands"},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":762,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful commands to change the look of My Team Manager to \u003c\u003csetTagColour, set the colour of your tags\u003e\u003e and \u003c\u003cchangeTeam,change the theme\u003e\u003e."},{"lineNumber":763,"author":{"gitId":"-"},"content":""},{"lineNumber":764,"author":{"gitId":"-"},"content":"// tag::setTagColour[]"},{"lineNumber":765,"author":{"gitId":"lithiumlkid"},"content":"[[setTagColour]]"},{"lineNumber":766,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting colour of tags : `setTagColour` `[Since v1.2]`"},{"lineNumber":767,"author":{"gitId":"-"},"content":""},{"lineNumber":768,"author":{"gitId":"-"},"content":"You can set the tags to a colour of your choice with the \u0027setColourTag\u0027 command."},{"lineNumber":769,"author":{"gitId":"-"},"content":""},{"lineNumber":770,"author":{"gitId":"-"},"content":"Format: `setTagColour t/TAG tc/COLOUR` +"},{"lineNumber":771,"author":{"gitId":"-"},"content":"Alias: `stc`"},{"lineNumber":772,"author":{"gitId":"-"},"content":""},{"lineNumber":773,"author":{"gitId":"codeeong"},"content":"[NOTE]"},{"lineNumber":774,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":775,"author":{"gitId":"-"},"content":"* The tag must currently be in used in MTM for this command to work."},{"lineNumber":776,"author":{"gitId":"-"},"content":"* Current version of `setTagColour` supports only this list of preset `COLOUR`:"},{"lineNumber":777,"author":{"gitId":"-"},"content":"** `teal`, `red`, `yellow`, `blue`, `orange`, `brown`, `green`, `pink`, `black`, `grey`"},{"lineNumber":778,"author":{"gitId":"-"},"content":"* The current version of `setTagColour` is *NOT* an UndoableCommand."},{"lineNumber":779,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a setTagCommand."},{"lineNumber":780,"author":{"gitId":"-"},"content":"* Instead, just enter `stc t/TAG tc/COLOUR` to change the colour back!"},{"lineNumber":781,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":782,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":783,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]"},{"lineNumber":784,"author":{"gitId":"codeeong"},"content":".*What to expect*"},{"lineNumber":785,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":786,"author":{"gitId":"codeeong"},"content":"You will see the specified tags in the left panel change to the colour of your choice."},{"lineNumber":787,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":788,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":789,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `setTagColour` command:"},{"lineNumber":790,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":791,"author":{"gitId":"codeeong"},"content":"* `stc t/redCard t/red`"},{"lineNumber":792,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":793,"author":{"gitId":"codeeong"},"content":"All the tags that say \"redCard\" in the left panel will now turn red."},{"lineNumber":794,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":795,"author":{"gitId":"-"},"content":"// end::setTagColour[]"},{"lineNumber":796,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":797,"author":{"gitId":"-"},"content":"// tag::changeTheme[]"},{"lineNumber":798,"author":{"gitId":"-"},"content":"[[changeTheme]]"},{"lineNumber":799,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Changing theme : `changeTheme` `[Since v1.5]`"},{"lineNumber":800,"author":{"gitId":"codeeong"},"content":"If you feel that the dark theme is not for you, and you prefer to work on a brighter interface,"},{"lineNumber":801,"author":{"gitId":"codeeong"},"content":"you can change the theme from the default Dark Theme to Light Theme with the \u0027changeTheme\u0027 command."},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":803,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":804,"author":{"gitId":"-"},"content":"Format: `changeTheme THEME` +"},{"lineNumber":805,"author":{"gitId":"codeeong"},"content":"Alias: `cte`"},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":"[NOTE]"},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":809,"author":{"gitId":"-"},"content":"* Current version of `changeTheme` only supports this 2 `THEME`:"},{"lineNumber":810,"author":{"gitId":"-"},"content":"** `Light` or `Dark`"},{"lineNumber":811,"author":{"gitId":"-"},"content":"* The current version of `changTheme` is *NOT* an UndoableCommand."},{"lineNumber":812,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a `changeTheme` command."},{"lineNumber":813,"author":{"gitId":"-"},"content":"* Instead, just enter `cte THEME` to change the colour back!"},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":815,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":816,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `changeTheme` command:"},{"lineNumber":817,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":818,"author":{"gitId":"codeeong"},"content":"* `cte Light`"},{"lineNumber":819,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":820,"author":{"gitId":"codeeong"},"content":"You will see the whole interface change from a dark-coloured theme to become light-coloured."},{"lineNumber":821,"author":{"gitId":"-"},"content":"// end::changeTheme[]"},{"lineNumber":822,"author":{"gitId":"-"},"content":""},{"lineNumber":823,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coming Soon"},{"lineNumber":824,"author":{"gitId":"-"},"content":""},{"lineNumber":825,"author":{"gitId":"lohtianwei"},"content":"There is more to come with the next upcoming update! Keep a lookout for these newly implemented features soon!"},{"lineNumber":826,"author":{"gitId":"-"},"content":""},{"lineNumber":827,"author":{"gitId":"-"},"content":"// tag::changePass2.0[]"},{"lineNumber":828,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change password: `changepass` `[Coming in v2.0]`"},{"lineNumber":829,"author":{"gitId":"-"},"content":""},{"lineNumber":830,"author":{"gitId":"-"},"content":"Should you feel that the default password used in `key` could be more secure, you may change it to a password of your"},{"lineNumber":831,"author":{"gitId":"-"},"content":"choosing with this command."},{"lineNumber":832,"author":{"gitId":"-"},"content":""},{"lineNumber":833,"author":{"gitId":"-"},"content":"Format: `changepass CURRENT_PASSWORD NEW_PASSWORD CONFIRM_PASSWORD` +"},{"lineNumber":834,"author":{"gitId":"-"},"content":"Alias: `cpw`"},{"lineNumber":835,"author":{"gitId":"-"},"content":""},{"lineNumber":836,"author":{"gitId":"-"},"content":"Here is how you can change the your password:"},{"lineNumber":837,"author":{"gitId":"-"},"content":""},{"lineNumber":838,"author":{"gitId":"-"},"content":"* `changepass ilikesports Securep@ssword1 Securep@ssword1`"},{"lineNumber":839,"author":{"gitId":"-"},"content":"// end::changePass2.0[]"},{"lineNumber":840,"author":{"gitId":"-"},"content":""},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"// tag::showBest2.0[]"},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Showing Best XI players: `showBest` `[Coming in v2.0]`"},{"lineNumber":843,"author":{"gitId":"-"},"content":""},{"lineNumber":844,"author":{"gitId":"-"},"content":"If you went to see your current best 11 players in your team based on their respective stats, this command"},{"lineNumber":845,"author":{"gitId":"-"},"content":"is for you."},{"lineNumber":846,"author":{"gitId":"-"},"content":""},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"Format: `showBest` +"},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":"Alias: `sb`"},{"lineNumber":849,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":850,"author":{"gitId":"lohtianwei"},"content":"[IMPORTANT]"},{"lineNumber":851,"author":{"gitId":"lohtianwei"},"content":".*What to expect*"},{"lineNumber":852,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":853,"author":{"gitId":"lohtianwei"},"content":"A lineup of the best 11 players would be displayed. It would consist of 1 Goalkeeper,"},{"lineNumber":854,"author":{"gitId":"lohtianwei"},"content":"4 Defenders, 4 Midfielders and 2 Strikers."},{"lineNumber":855,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":856,"author":{"gitId":"lohtianwei"},"content":"// end::showBest2.0[]"},{"lineNumber":857,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":858,"author":{"gitId":"-"},"content":"// tag::team2.0[]"},{"lineNumber":859,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting an upcoming match with an opposing team: `setmatch` `[Coming in v2.0]`"},{"lineNumber":860,"author":{"gitId":"-"},"content":""},{"lineNumber":861,"author":{"gitId":"-"},"content":"With this command, it gives you a convenient way to keep track of the upcoming match of a team."},{"lineNumber":862,"author":{"gitId":"-"},"content":""},{"lineNumber":863,"author":{"gitId":"-"},"content":"Format: `setmatch TEAM_NAME OPPONENT_TEAM_NAME DATE` +"},{"lineNumber":864,"author":{"gitId":"-"},"content":"Alias: `sm`"},{"lineNumber":865,"author":{"gitId":"-"},"content":""},{"lineNumber":866,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":868,"author":{"gitId":"-"},"content":"* Date format to be entered is in `DD/MM/YYYY`. +"},{"lineNumber":869,"author":{"gitId":"-"},"content":"* Opponent team does not need to exist in MTM."},{"lineNumber":870,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":871,"author":{"gitId":"-"},"content":""},{"lineNumber":872,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":873,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":874,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":875,"author":{"gitId":"-"},"content":"The upcoming match of the team will be captured and displayed to you."},{"lineNumber":876,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":877,"author":{"gitId":"-"},"content":""},{"lineNumber":878,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:"},{"lineNumber":879,"author":{"gitId":"-"},"content":""},{"lineNumber":880,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":881,"author":{"gitId":"-"},"content":"* `setmatch Arsenal Liverpool 14/03/2018`"},{"lineNumber":882,"author":{"gitId":"-"},"content":""},{"lineNumber":883,"author":{"gitId":"-"},"content":"Display the list of players in team \"Arsenal\" and set an upcoming match for Arsenal with Liverpool on 14/03/2018."},{"lineNumber":884,"author":{"gitId":"-"},"content":""},{"lineNumber":885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing the team\u0027s next upcoming match: `nextmatch` `[Coming in v2.0]`"},{"lineNumber":886,"author":{"gitId":"-"},"content":""},{"lineNumber":887,"author":{"gitId":"codeeong"},"content":"You can easily determine the up and coming match with the team so that you never miss an important date."},{"lineNumber":888,"author":{"gitId":"-"},"content":""},{"lineNumber":889,"author":{"gitId":"-"},"content":"Format: `nextmatch TEAM_NAME` +"},{"lineNumber":890,"author":{"gitId":"-"},"content":"Alias: `nm`"},{"lineNumber":891,"author":{"gitId":"-"},"content":""},{"lineNumber":892,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":893,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":894,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":895,"author":{"gitId":"-"},"content":"Displays the date and opponent for the upcoming match of the team specified."},{"lineNumber":896,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":897,"author":{"gitId":"-"},"content":""},{"lineNumber":898,"author":{"gitId":"codeeong"},"content":"Here are a few valid examples on how you can use the `nextmatch` command:"},{"lineNumber":899,"author":{"gitId":"-"},"content":""},{"lineNumber":900,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":901,"author":{"gitId":"-"},"content":"* `nextmatch Arsenal`"},{"lineNumber":902,"author":{"gitId":"-"},"content":""},{"lineNumber":903,"author":{"gitId":"-"},"content":"Displays the list of players in team \"Arsenal\" and view the next upcoming match for \"Arsenal\"."},{"lineNumber":904,"author":{"gitId":"-"},"content":"// end::team2.0[]"},{"lineNumber":905,"author":{"gitId":"-"},"content":""},{"lineNumber":906,"author":{"gitId":"codeeong"},"content":"// tag::showlineup[]"},{"lineNumber":907,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Displaying lineup for next match: `showLineup` `[Coming in v2.0]`"},{"lineNumber":908,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":909,"author":{"gitId":"codeeong"},"content":"You can view the lineup for the current best 11 players."},{"lineNumber":910,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":911,"author":{"gitId":"-"},"content":"Format: `showLineup TEAM_NAME` +"},{"lineNumber":912,"author":{"gitId":"codeeong"},"content":"Alias: `sl`"},{"lineNumber":913,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":914,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]"},{"lineNumber":915,"author":{"gitId":"codeeong"},"content":".*What to expect*"},{"lineNumber":916,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":917,"author":{"gitId":"codeeong"},"content":"The panel on the right will show the avatars of the 11 players that will be playing for the next match."},{"lineNumber":918,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":919,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":920,"author":{"gitId":"codeeong"},"content":"Here is an valid example on how you can use the `showLineup` command:"},{"lineNumber":921,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `showLineup Arsenal`"},{"lineNumber":923,"author":{"gitId":"-"},"content":""},{"lineNumber":924,"author":{"gitId":"codeeong"},"content":"Displays the 11 main players that will be playing for the next match."},{"lineNumber":925,"author":{"gitId":"codeeong"},"content":"// end::showlineup[]"},{"lineNumber":926,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":927,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Scheduling trainings for team `schedule` `[Coming in v2.0]`"},{"lineNumber":928,"author":{"gitId":"-"},"content":""},{"lineNumber":929,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sending reminder emails to players: `send` `[Coming in v2.0]`"},{"lineNumber":930,"author":{"gitId":"-"},"content":""},{"lineNumber":931,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving feedback to developers: `feedback` `[Coming in v2.0]`"},{"lineNumber":932,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":933,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving demerit to players based on performance: `demerit` `[Coming in v2.0]`"},{"lineNumber":934,"author":{"gitId":"-"},"content":""},{"lineNumber":935,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ"},{"lineNumber":936,"author":{"gitId":"-"},"content":""},{"lineNumber":937,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +"},{"lineNumber":938,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous MTM folder."},{"lineNumber":939,"author":{"gitId":"-"},"content":""},{"lineNumber":940,"author":{"gitId":"-"},"content":"// tag::commandsummary[]"},{"lineNumber":941,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":942,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Glossary"},{"lineNumber":943,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":944,"author":{"gitId":"-"},"content":"[[Index]]`INDEX` - The `INDEX` refers to the index number shown in the last player listing. The `INDEX` must be a positive integer 1, 2, 3, …"},{"lineNumber":945,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d Command Summary"},{"lineNumber":947,"author":{"gitId":"-"},"content":""},{"lineNumber":948,"author":{"gitId":"-"},"content":"Just a quick reference sheet for all your needs. Never forget how to use MTM ever again."},{"lineNumber":949,"author":{"gitId":"-"},"content":""},{"lineNumber":950,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Basic Commands and Features"},{"lineNumber":951,"author":{"gitId":"-"},"content":""},{"lineNumber":952,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":953,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":954,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":955,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":956,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":957,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":958,"author":{"gitId":"-"},"content":""},{"lineNumber":959,"author":{"gitId":"-"},"content":"|\u003c\u003cautocomplete, `Autocomplete`\u003e\u003e"},{"lineNumber":960,"author":{"gitId":"-"},"content":"|kbd:[tab]"},{"lineNumber":961,"author":{"gitId":"-"},"content":"|kbd:[tab] kbd:[space] kbd:[\u0026uarr;] kbd:[\u0026darr;]"},{"lineNumber":962,"author":{"gitId":"-"},"content":"d|Fills in your command for you"},{"lineNumber":963,"author":{"gitId":"-"},"content":""},{"lineNumber":964,"author":{"gitId":"-"},"content":"|\u003c\u003chelp, `help`\u003e\u003e"},{"lineNumber":965,"author":{"gitId":"-"},"content":"|kbd:[F1]"},{"lineNumber":966,"author":{"gitId":"-"},"content":"|help"},{"lineNumber":967,"author":{"gitId":"-"},"content":"d|Shows the user guide"},{"lineNumber":968,"author":{"gitId":"-"},"content":""},{"lineNumber":969,"author":{"gitId":"-"},"content":"|\u003c\u003chistory, `history`\u003e\u003e"},{"lineNumber":970,"author":{"gitId":"-"},"content":"|`h`"},{"lineNumber":971,"author":{"gitId":"-"},"content":"|history"},{"lineNumber":972,"author":{"gitId":"-"},"content":"d|Displays the list of commands entered previously"},{"lineNumber":973,"author":{"gitId":"-"},"content":""},{"lineNumber":974,"author":{"gitId":"-"},"content":"|\u003c\u003cundo, `undo`\u003e\u003e"},{"lineNumber":975,"author":{"gitId":"-"},"content":"|`u`"},{"lineNumber":976,"author":{"gitId":"-"},"content":"|undo"},{"lineNumber":977,"author":{"gitId":"-"},"content":"d|Undo the previous command"},{"lineNumber":978,"author":{"gitId":"-"},"content":""},{"lineNumber":979,"author":{"gitId":"-"},"content":"|\u003c\u003credo, `redo`\u003e\u003e"},{"lineNumber":980,"author":{"gitId":"-"},"content":"|`r`"},{"lineNumber":981,"author":{"gitId":"-"},"content":"|redo"},{"lineNumber":982,"author":{"gitId":"-"},"content":"d|Redo the previous command"},{"lineNumber":983,"author":{"gitId":"-"},"content":""},{"lineNumber":984,"author":{"gitId":"-"},"content":"|\u003c\u003ctoggleprivacy, `toggleprivacy`\u003e\u003e"},{"lineNumber":985,"author":{"gitId":"-"},"content":"|`tp`"},{"lineNumber":986,"author":{"gitId":"-"},"content":"|toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]"},{"lineNumber":987,"author":{"gitId":"-"},"content":"|toggleprivacy 2 a/"},{"lineNumber":988,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":989,"author":{"gitId":"-"},"content":"|\u003c\u003ckey, `key`\u003e\u003e"},{"lineNumber":990,"author":{"gitId":"-"},"content":"|`k`"},{"lineNumber":991,"author":{"gitId":"-"},"content":"|key PASSWORD"},{"lineNumber":992,"author":{"gitId":"-"},"content":"|key ilikesports"},{"lineNumber":993,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":994,"author":{"gitId":"-"},"content":"|\u003c\u003cclear, `clear`\u003e\u003e"},{"lineNumber":995,"author":{"gitId":"-"},"content":"|`c`"},{"lineNumber":996,"author":{"gitId":"-"},"content":"|clear"},{"lineNumber":997,"author":{"gitId":"-"},"content":"d|Removes all information in the application"},{"lineNumber":998,"author":{"gitId":"-"},"content":""},{"lineNumber":999,"author":{"gitId":"-"},"content":"|\u003c\u003cexit, `exit`\u003e\u003e"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"|`NONE`"},{"lineNumber":1001,"author":{"gitId":"-"},"content":"|exit"},{"lineNumber":1002,"author":{"gitId":"-"},"content":"d|Exits the application"},{"lineNumber":1003,"author":{"gitId":"-"},"content":""},{"lineNumber":1004,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1005,"author":{"gitId":"-"},"content":""},{"lineNumber":1006,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands"},{"lineNumber":1007,"author":{"gitId":"-"},"content":""},{"lineNumber":1008,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":1009,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1010,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":1011,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":1012,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":1013,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":1014,"author":{"gitId":"-"},"content":""},{"lineNumber":1015,"author":{"gitId":"-"},"content":"|\u003c\u003cadd, `add`\u003e\u003e"},{"lineNumber":1016,"author":{"gitId":"-"},"content":"|`a`"},{"lineNumber":1017,"author":{"gitId":"lithiumlkid"},"content":"|add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]..."},{"lineNumber":1018,"author":{"gitId":"lithiumlkid"},"content":"|add n/Ospina e/Ospina@arsenal.com tm/Arsenal a/70 Jurong Central Circle p/90722998 j/1 ra/2 po/4 av/Capture.png t/redCard"},{"lineNumber":1019,"author":{"gitId":"-"},"content":""},{"lineNumber":1020,"author":{"gitId":"-"},"content":"|\u003c\u003cedit, `edit`\u003e\u003e"},{"lineNumber":1021,"author":{"gitId":"-"},"content":"|`e`"},{"lineNumber":1022,"author":{"gitId":"-"},"content":"|edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]..."},{"lineNumber":1023,"author":{"gitId":"-"},"content":"|edit 2 n/James Lee e/jameslee@example.com"},{"lineNumber":1024,"author":{"gitId":"-"},"content":""},{"lineNumber":1025,"author":{"gitId":"-"},"content":"|\u003c\u003cdelete, `delete`\u003e\u003e"},{"lineNumber":1026,"author":{"gitId":"-"},"content":"|`d`"},{"lineNumber":1027,"author":{"gitId":"-"},"content":"|delete INDEX"},{"lineNumber":1028,"author":{"gitId":"-"},"content":"|delete 3"},{"lineNumber":1029,"author":{"gitId":"-"},"content":""},{"lineNumber":1030,"author":{"gitId":"-"},"content":"|\u003c\u003cremark, `remark`\u003e\u003e"},{"lineNumber":1031,"author":{"gitId":"-"},"content":"|`rm`"},{"lineNumber":1032,"author":{"gitId":"-"},"content":"|remark INDEX [r/[REMARK]]"},{"lineNumber":1033,"author":{"gitId":"-"},"content":"|remark 4 r/Gotta go faster"},{"lineNumber":1034,"author":{"gitId":"-"},"content":""},{"lineNumber":1035,"author":{"gitId":"-"},"content":"|\u003c\u003clist, `list`\u003e\u003e"},{"lineNumber":1036,"author":{"gitId":"-"},"content":"|`l`"},{"lineNumber":1037,"author":{"gitId":"-"},"content":"|list"},{"lineNumber":1038,"author":{"gitId":"-"},"content":"d|List all the players"},{"lineNumber":1039,"author":{"gitId":"-"},"content":""},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003c\u003csort, `sort`\u003e\u003e"},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|`so`"},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|sort FIELD ORDER"},{"lineNumber":1043,"author":{"gitId":"-"},"content":"|sort name asc"},{"lineNumber":1044,"author":{"gitId":"-"},"content":""},{"lineNumber":1045,"author":{"gitId":"-"},"content":"|\u003c\u003cfind, `find`\u003e\u003e"},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`f`"},{"lineNumber":1047,"author":{"gitId":"-"},"content":"|find KEYWORD [KEYWORD]..."},{"lineNumber":1048,"author":{"gitId":"-"},"content":"|find James Jake"},{"lineNumber":1049,"author":{"gitId":"-"},"content":""},{"lineNumber":1050,"author":{"gitId":"-"},"content":"|\u003c\u003cselect, `select`\u003e\u003e"},{"lineNumber":1051,"author":{"gitId":"-"},"content":"|`s`"},{"lineNumber":1052,"author":{"gitId":"-"},"content":"|select INDEX"},{"lineNumber":1053,"author":{"gitId":"-"},"content":"|select 2"},{"lineNumber":1054,"author":{"gitId":"-"},"content":""},{"lineNumber":1055,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1056,"author":{"gitId":"-"},"content":""},{"lineNumber":1057,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands"},{"lineNumber":1058,"author":{"gitId":"-"},"content":""},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":1060,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1061,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":1062,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":1063,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":1064,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":1065,"author":{"gitId":"-"},"content":""},{"lineNumber":1066,"author":{"gitId":"-"},"content":"|\u003c\u003ccreate, `create`\u003e\u003e"},{"lineNumber":1067,"author":{"gitId":"-"},"content":"|`ct`"},{"lineNumber":1068,"author":{"gitId":"-"},"content":"|create TEAM_NAME"},{"lineNumber":1069,"author":{"gitId":"-"},"content":"|create Arsenal"},{"lineNumber":1070,"author":{"gitId":"-"},"content":""},{"lineNumber":1071,"author":{"gitId":"-"},"content":"|\u003c\u003cview, `view`\u003e\u003e"},{"lineNumber":1072,"author":{"gitId":"-"},"content":"|`vt`"},{"lineNumber":1073,"author":{"gitId":"-"},"content":"|view TEAM_NAME"},{"lineNumber":1074,"author":{"gitId":"-"},"content":"|view Liverpool"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"-"},"content":"|\u003c\u003cassign, `assign`\u003e\u003e"},{"lineNumber":1077,"author":{"gitId":"-"},"content":"|`at`"},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|assign [TEAM_NAME] i/INDEX [INDEX]..."},{"lineNumber":1079,"author":{"gitId":"-"},"content":"|assign Barcelona i/1 2 3"},{"lineNumber":1080,"author":{"gitId":"-"},"content":""},{"lineNumber":1081,"author":{"gitId":"-"},"content":"|\u003c\u003crename, `rename`\u003e\u003e"},{"lineNumber":1082,"author":{"gitId":"-"},"content":"|`rnt`"},{"lineNumber":1083,"author":{"gitId":"-"},"content":"|rename TEAM_NAME tm/RENAME_TEAM_NAME"},{"lineNumber":1084,"author":{"gitId":"-"},"content":"|rename Arsenal tm/Neo Arsenal"},{"lineNumber":1085,"author":{"gitId":"-"},"content":""},{"lineNumber":1086,"author":{"gitId":"-"},"content":"|\u003c\u003cremove, `remove`\u003e\u003e"},{"lineNumber":1087,"author":{"gitId":"-"},"content":"|`rt`"},{"lineNumber":1088,"author":{"gitId":"-"},"content":"|remove TEAM_NAME"},{"lineNumber":1089,"author":{"gitId":"-"},"content":"|remove Real Madrid"},{"lineNumber":1090,"author":{"gitId":"-"},"content":""},{"lineNumber":1091,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1092,"author":{"gitId":"-"},"content":""},{"lineNumber":1093,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands"},{"lineNumber":1094,"author":{"gitId":"-"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":1096,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1097,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":1098,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":1099,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":1100,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":1101,"author":{"gitId":"-"},"content":""},{"lineNumber":1102,"author":{"gitId":"-"},"content":"|\u003c\u003csetTagColour, `setTagColour`\u003e\u003e"},{"lineNumber":1103,"author":{"gitId":"-"},"content":"|`stc`"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"|setTagColour t/TAG tc/COLOUR"},{"lineNumber":1105,"author":{"gitId":"-"},"content":"|setTagColour t/friends tc/yellow"},{"lineNumber":1106,"author":{"gitId":"-"},"content":""},{"lineNumber":1107,"author":{"gitId":"-"},"content":"|\u003c\u003cchangeTheme, `changeTheme`\u003e\u003e"},{"lineNumber":1108,"author":{"gitId":"-"},"content":"|`cte`"},{"lineNumber":1109,"author":{"gitId":"-"},"content":"|changeTheme THEME"},{"lineNumber":1110,"author":{"gitId":"-"},"content":"|changeTheme Dark"},{"lineNumber":1111,"author":{"gitId":"-"},"content":""},{"lineNumber":1112,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1113,"author":{"gitId":"-"},"content":"// end::commandsummary[]"}],"authorContributionMap":{"lithiumlkid":106,"lohtianwei":26,"codeeong":64,"-":917}},{"path":"docs/team/ahmadsyafiq.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lithiumlkid"},"content":"\u003d Ahmad Syafiq - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"lithiumlkid"},"content":":imagesDir: ../images"},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":stylesDir: ../stylesheets"},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d PROJECT: My Team Manager"},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"---"},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Overview"},{"lineNumber":8,"author":{"gitId":"lithiumlkid"},"content":"My Team Manager is a desktop address book application developed as part of a Software Engineering module requirement. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 6 kLoC."},{"lineNumber":9,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":10,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":11,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Summary of contributions"},{"lineNumber":12,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":13,"author":{"gitId":"lithiumlkid"},"content":"* *Major enhancement*: added *replaced person object with player object*"},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to add and edit players that contain more attributes/information such as jersey, position, rating and avatar"},{"lineNumber":15,"author":{"gitId":"lithiumlkid"},"content":"** Justification: This feature improves the product significantly because a user can fill the address book with more important information which can be used for other utility functions such as sort."},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":"It is accompanied with improved GUI to increase usability. Eg. the user can see player\u0027s avatar for better identification."},{"lineNumber":17,"author":{"gitId":"lithiumlkid"},"content":"** Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands."},{"lineNumber":18,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":19,"author":{"gitId":"lithiumlkid"},"content":"* *Minor enhancement*: added a *tab - autocomplete function*"},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to enter command lines more quickly by helping them complete commands by pressing the tab key. It also allows them to view suggested command and command parameters in case"},{"lineNumber":21,"author":{"gitId":"lithiumlkid"},"content":"the forget."},{"lineNumber":22,"author":{"gitId":"lithiumlkid"},"content":"** Credits: To make the search optimal, I used Tries as suggested on geek-for-geeks."},{"lineNumber":23,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lithiumlkid.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lithiumlkid.md[Test code]]"},{"lineNumber":25,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":26,"author":{"gitId":"lithiumlkid"},"content":"* *Other contributions*:"},{"lineNumber":27,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":28,"author":{"gitId":"lithiumlkid"},"content":"** Project management:"},{"lineNumber":29,"author":{"gitId":"lithiumlkid"},"content":"*** Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub"},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"** Enhancements to existing features:"},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"*** Enhanced the help function to only allow one help window at a time. (Pull request https://github.com/CS2103JAN2018-F14-B1/main/pull/169[#169])"},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":"** Documentation:"},{"lineNumber":33,"author":{"gitId":"lithiumlkid"},"content":"*** Did cosmetic tweaks to existing contents of the User Guide: https://github.com/CS2103JAN2018-F14-B1/main/pull/53[#53]"},{"lineNumber":34,"author":{"gitId":"lithiumlkid"},"content":"** Community:"},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":"*** PRs reviewed (with non-trivial review comments): https://github.com/CS2103JAN2018-F14-B1/main/pull/172[#172]"},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"*** Contributed to forum discussions (examples: https://github.com/nus-cs2103-AY1718S2/forum/issues/39[39], https://github.com/nus-cs2103-AY1718S2/forum/issues/47[#47])"},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":"*** Reported bugs and suggestions for other teams in the class (example: https://github.com/CS2103JAN2018-F14-B3/main/issues/228[#228])"},{"lineNumber":38,"author":{"gitId":"lithiumlkid"},"content":"** Tools:"},{"lineNumber":39,"author":{"gitId":"lithiumlkid"},"content":"*** Integrated a new Github plugin (CircleCI) to the team repo"},{"lineNumber":40,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":41,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the User Guide"},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":43,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":44,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":45,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._"},{"lineNumber":46,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":47,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":48,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003daddplayer]"},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":50,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003dautocomplete]"},{"lineNumber":51,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the Developer Guide"},{"lineNumber":53,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":55,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._"},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":57,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dplayer]"},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":60,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dautocomplete]"},{"lineNumber":61,"author":{"gitId":"lithiumlkid"},"content":""}],"authorContributionMap":{"lithiumlkid":60,"-":1}},{"path":"docs/team/codeeong.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"\u003d Codee Ong - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":":imagesDir: ../images"},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":":stylesDir: ../stylesheets"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"---"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Overview"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop application for *football team managers* to organise the information of players they are in charge of."},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"The primary usage of this application is to add and assign players to teams, and then edit and remove information related to"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"the players as and when it is required. MTM is value added with usability features that help the team manager manage his/her"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"teams and players efficiently."},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"The user interacts with MTM using a *Command Line Interface*, and it has a GUI created with JavaFX."},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Summary of contributions"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"* *Major enhancement*: Revamped the original user interface to one that suits the usage of an application for *team managers*."},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"** What it does: The change in UI allows the user to *keep track* of which team he/she is looking at, to *view his/her players\u0027 details*,"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"and even perform some *customisation* of the application theme."},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"** Justification: The overhaul of the UI is absolutely necessary to ensure the *best user experience* for users of My Team Manager. Previously,"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"the existing UI components were neither sufficient nor suitable for management of sports teams."},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"** Highlights: Addition of the *team display bar*, the *player details pane* when a player is selected, addition of *MTM logo*,"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"and *changeTheme* command."},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"* *Minor enhancement*: addition of a *setTagCommand* that allows the user to change existing tags to a colour of their choice."},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/Codee.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/Codee.md[Test code]]"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"* *Other contributions*:"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"** Project management:"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"*** Generated release files (.jar) in `v1.4` and `v1.5rc` (2 releases), and contributed release descriptions on GitHub."},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"** Enhancements to existing features:"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"*** changed the original GUI colour scheme [https://github.com/CS2103JAN2018-F14-B1/main/pull/89[PR #89]]"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"** Documentation:"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"*** changed the project name in all the relevant files so that it will be \"My Team Manager\" and not \"Address Book App\", including the data files. [https://github.com/CS2103JAN2018-F14-B1/main/pull/120[PR #120]]"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"*** Constantly updated the README and UserGuide\u0027s application preview image. [https://github.com/CS2103JAN2018-F14-B1/main/pull/99[PR #99]][https://github.com/CS2103JAN2018-F14-B1/main/pull/160[PR #160]]"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"** Community:"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"*** PRs Reviewed (with non trivial comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/95[PR #95]][https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR #169]][https://github.com/CS2103JAN2018-F14-B1/main/pull/175[PR #175]]"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the User Guide"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting the users of MTM._"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dchangeTheme]"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dsetTagColour]"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dshowlineup]"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the Developer Guide"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dsettagcolour]"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dteamDisplay]"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dPlayerDetails]"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dchangeThemeCommand]"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":72}},{"path":"docs/team/lohtianwei.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"\u003d Loh Tian Wei - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":":imagesDir: ../images"},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":":stylesDir: ../stylesheets"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"---"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Overview"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"My Team Manager (MTM) is a dekstop address book application for *football team managers*."},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"It can also be personalised to be used for other sports team management too such as basketball."},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"With the features it provides, management of your players\u0027 contact details and team information is made easy. While"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"interactions between user and application is mainly by a *Command Line Interface (CLI)*, it features a JavaFx GUI display."},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Summary of contributions"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"* *Major enhancement*: Added *security and privacy features*"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"** *What it does*: Ensures the information stored in MTM is *secured and kept private* when needed"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"** *Justification*: This feature is crucial for protecting the *confidentiality and integrity* of the details stored in MTM."},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"It prevents unauthorised tampering of information while also maintaining confidentiality."},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"** *Highlights*: Addition of a *locking mechanism* to limit functionality of MTM and changing *privacy of fields* that would maintain"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"confidentiality of certain information"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"* *Minor enhancement*:"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"** Added a sort function that allows the list to be sorted by fields for quick viewing of relevant information"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lohtianwei.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lohtianwei.md[Test code]]"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"* *Other contributions*:"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"** Project management:"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"*** Documented issues of project using GitHub\u0027s Issue Tracker and address the issues accordingly."},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"** Enhancements to existing features:"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"*** Changes are mentioned in \u003c\u003cMinor Enhancement, Minor enhancement\u003e\u003e."},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"** Documentation:"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"** Community:"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":"*** PRs reviewed (with non-trivial review comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR#169]]"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"*** Reported bugs and suggestions for other teams in the class (https://github.com/CS2103JAN2018-W09-B2/main/issues/198[1],"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/194[2],"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/182[3],"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/174[4])"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the User Guide"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dtogglePrivacy]"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dkey]"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the Developer Guide"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dkey]"}],"authorContributionMap":{"lohtianwei":68,"-":1}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * The main entry point to the application."},{"lineNumber":40,"author":{"gitId":"-"},"content":" */"},{"lineNumber":41,"author":{"gitId":"-"},"content":"public class MainApp extends Application {"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" public static final Version VERSION \u003d new Version(1, 1, 0, true);"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" protected Ui ui;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Logic logic;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Storage storage;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Config config;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void init() throws Exception {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":" super.init();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" initLogging(config);"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" logic \u003d new LogicManager(model);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" initEventsCenter();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book."},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();"},{"lineNumber":93,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");"},{"lineNumber":99,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":100,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":102,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" LogsCenter.init(config);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null."},{"lineNumber":116,"author":{"gitId":"-"},"content":" */"},{"lineNumber":117,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" Config initializedConfig;"},{"lineNumber":119,"author":{"gitId":"-"},"content":" String configFilePathUsed;"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":131,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());"},{"lineNumber":133,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \""},{"lineNumber":135,"author":{"gitId":"-"},"content":" + \"Using default config properties\");"},{"lineNumber":136,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":140,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":141,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);"},{"lineNumber":142,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":143,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":144,"author":{"gitId":"-"},"content":" }"},{"lineNumber":145,"author":{"gitId":"-"},"content":" return initializedConfig;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":149,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * reading from the file."},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();"},{"lineNumber":155,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;"},{"lineNumber":158,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();"},{"lineNumber":160,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());"},{"lineNumber":161,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":162,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \""},{"lineNumber":163,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");"},{"lineNumber":164,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":165,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":166,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":167,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":168,"author":{"gitId":"-"},"content":" }"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":171,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" return initializedPrefs;"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" private void initEventsCenter() {"},{"lineNumber":181,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);"},{"lineNumber":182,"author":{"gitId":"-"},"content":" }"},{"lineNumber":183,"author":{"gitId":"-"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":186,"author":{"gitId":"-"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);"},{"lineNumber":187,"author":{"gitId":"-"},"content":" ui.start(primaryStage);"},{"lineNumber":188,"author":{"gitId":"-"},"content":" }"},{"lineNumber":189,"author":{"gitId":"-"},"content":""},{"lineNumber":190,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":191,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":193,"author":{"gitId":"-"},"content":" ui.stop();"},{"lineNumber":194,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(userPrefs);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));"},{"lineNumber":198,"author":{"gitId":"-"},"content":" }"},{"lineNumber":199,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":200,"author":{"gitId":"-"},"content":" System.exit(0);"},{"lineNumber":201,"author":{"gitId":"-"},"content":" }"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {"},{"lineNumber":205,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":206,"author":{"gitId":"-"},"content":" this.stop();"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" public static void main(String[] args) {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" launch(args);"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":211}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private String appTitle \u003d \"My Team Manager\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well."},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_THEME \u003d \"This theme does not exist!\\n\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TEAM_NOT_FOUND \u003d \"Team does not exist or is not specified!\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_ALL_INDEX \u003d \"All person index provided is invalid\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":15}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeTagColourEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to change tag colour"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeTagColourEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String tagColour;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public final String tagName;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public ChangeTagColourEvent(String tagName, String tagColour) {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":23}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**@@author Codee */"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Indicates a request for theme change."},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String theme;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ChangeThemeEvent(String theme) {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().toString();"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/ClearTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for clearing of all teams."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ClearTeamsEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public ClearTeamsEvent() {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" }"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" }"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"}"},{"lineNumber":20,"author":{"gitId":"-"},"content":""}],"authorContributionMap":{"codeeong":7,"-":13}},{"path":"src/main/java/seedu/address/commons/events/ui/DeselectTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to deselected selected teams."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"public class DeselectTeamEvent extends BaseEvent {"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" public DeselectTeamEvent() {"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/HighlightSelectedTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to highlight selected team name."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class HighlightSelectedTeamEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public HighlightSelectedTeamEvent(String teamName) {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel."},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedEvent extends BaseEvent {"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" private final Person editedPerson;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private final Index index;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedEvent(Person editedPerson, Index index) {"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" this.editedPerson \u003d editedPerson;"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" this.index \u003d index;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" public Person getPerson() {"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" return this.editedPerson;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" public Index getIndex() {"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" return this.index;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":34}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedNoParamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel, but no paramaters."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedNoParamEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedNoParamEvent() { }"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/ShowNewTeamNameEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to show new team name."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ShowNewTeamNameEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ShowNewTeamNameEvent(String teamName) {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":22}},{"path":"src/main/java/seedu/address/commons/events/ui/UndoTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for undoing clearing of all teams."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class UndoTeamsEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public UndoTeamsEvent() {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" }"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" }"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":7,"-":11}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * API of the Logic component"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public interface Logic {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Executes the command and returns the result."},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user."},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @return the result of the command execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of list of teams */"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /** Returns the command trie. */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" CommandTrie getCommandTrie();"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":4,"-":32}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final CommandHistory history;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final CommandTrie commandTrie;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" history \u003d new CommandHistory();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" addressBookParser \u003d new AddressBookParser();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" commandTrie \u003d new CommandTrie();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");"},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" return result;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" } finally {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" history.add(commandText);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return model.getInitTeamList();"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public CommandTrie getCommandTrie() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return commandTrie;"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":6,"-":64}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TEAM_NAME;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Adds a player to the address book."},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a player to the address book. \""},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"Parameters: \""},{"lineNumber":39,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \""},{"lineNumber":41,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TEAM_NAME + \"TEAMNAME] \""},{"lineNumber":42,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":43,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":44,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":45,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":46,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":47,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":48,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":49,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":50,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \""},{"lineNumber":51,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \""},{"lineNumber":52,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \""},{"lineNumber":53,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \""},{"lineNumber":54,"author":{"gitId":"-"},"content":" + PREFIX_RATING + \"0 \""},{"lineNumber":55,"author":{"gitId":"-"},"content":" + PREFIX_POSITION + \"1 \""},{"lineNumber":56,"author":{"gitId":"-"},"content":" + PREFIX_JERSEY_NUMBER + \"17 \""},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"goodAttitude\";"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_NAME + \"NAME \""},{"lineNumber":60,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \""},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New player added: %1$s\";"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book\";"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" private final Person toAdd;"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code Person}"},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public AddCommand(Person person) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" requireNonNull(person);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" toAdd \u003d person;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());"},{"lineNumber":94,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));"},{"lineNumber":95,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));"},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException e) {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);"},{"lineNumber":105,"author":{"gitId":"-"},"content":" }"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" TeamName teamName \u003d toAdd.getTeamName();"},{"lineNumber":111,"author":{"gitId":"-"},"content":" if (!model.getAddressBook().getTeamList().stream().anyMatch(t -\u003e t.getTeamName().equals(teamName))) {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (!teamName.toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" throw new CommandException((Messages.MESSAGE_TEAM_NOT_FOUND));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":" }"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":119,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":121,"author":{"gitId":"-"},"content":" || (other instanceof AddCommand // instanceof handles nulls"},{"lineNumber":122,"author":{"gitId":"-"},"content":" \u0026\u0026 toAdd.equals(((AddCommand) other).toAdd));"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":122}},{"path":"src/main/java/seedu/address/logic/commands/ChangeThemeCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Changes the theme of the Address Book."},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"changeTheme\";"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"cte\";"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" + \": Changes the theme of MTM.\\n\""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" + \"Parameters: THEME (must be either Light, or Dark)\\n\""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Examples: changeTheme Light, cte Dark\";"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_THEME_SUCCESS \u003d \"Theme updated to: %1$s\";"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final String theme;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" if (!isValidTheme(this.theme)) {"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_THEME);"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" if ((MainWindow.getCurrentTheme()).contains(this.theme)) {"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" throw new CommandException(\"Theme is already set to \" + this.theme + \"!\");"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private boolean isValidTheme(String theme) {"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" return theme.equals(\"Light\") || theme.equals(\"Dark\");"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" || (other instanceof ChangeThemeCommand // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.theme.equals(((ChangeThemeCommand) other).theme)); // state check"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":54}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Clears the address book."},{"lineNumber":11,"author":{"gitId":"-"},"content":" */"},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" model.resetData(new AddressBook());"},{"lineNumber":23,"author":{"gitId":"-"},"content":" // @@author Codee"},{"lineNumber":24,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new ClearTeamsEvent());"},{"lineNumber":25,"author":{"gitId":"-"},"content":" // @@author"},{"lineNumber":26,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":2,"-":25}},{"path":"src/main/java/seedu/address/logic/commands/CreateCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Creates a team to the application"},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class CreateCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"create\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"ct\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \"Creates a team in MTM. \""},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \"Parameters: \""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"TEAM_NAME\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Arsenal\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New team created: %1$s\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_TEAM \u003d \"This team already exist in the manager\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Team toCreate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Creates a CreateCommand to add the specified (@code Team)"},{"lineNumber":35,"author":{"gitId":"-"},"content":" *"},{"lineNumber":36,"author":{"gitId":"-"},"content":" */"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CreateCommand(Team team) {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" requireNonNull(team);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.toCreate \u003d team;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" model.createTeam(toCreate);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TEAM);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ShowNewTeamNameEvent(toCreate.getTeamName().toString()));"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toCreate.getTeamName().toString()));"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof CreateCommand // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 toCreate.equals(((CreateCommand) other).toCreate));"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":3,"-":57}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Deletes a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \": Deletes the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" private Person personToDelete;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public DeleteCommand(Index targetIndex) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" requireNonNull(personToDelete);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" personToDelete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls"},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex) // state check"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(this.personToDelete, ((DeleteCommand) other).personToDelete));"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":69}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":47,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Edits the details of an existing player in the address book."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the player identified \""},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \""},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":60,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":68,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":69,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \""},{"lineNumber":70,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \""},{"lineNumber":73,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":74,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":75,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":76,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":77,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":78,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":79,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":80,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":81,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: %1$s\";"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book.\";"},{"lineNumber":86,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" private final Index index;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" private Person personToEdit;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" private Person editedPerson;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * @param index of the player in the filtered player list to edit"},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the player with"},{"lineNumber":97,"author":{"gitId":"-"},"content":" */"},{"lineNumber":98,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" requireNonNull(index);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" this.index \u003d index;"},{"lineNumber":103,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" if (!editedPerson.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" editedPerson.getAvatar().setFilePath(editedPerson.getName().fullName);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":115,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":116,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");"},{"lineNumber":117,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":121,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));"},{"lineNumber":122,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":123,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());"},{"lineNumber":124,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":137,"author":{"gitId":"-"},"content":" editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * edited with {@code editPersonDescriptor}."},{"lineNumber":143,"author":{"gitId":"-"},"content":" * NOTE: Private fields will not be edited."},{"lineNumber":144,"author":{"gitId":"-"},"content":" */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static Person createEditedPerson(Person personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" Name updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":149,"author":{"gitId":"-"},"content":" Phone updatedPhone \u003d (personToEdit.getPhone().isPrivate())"},{"lineNumber":150,"author":{"gitId":"-"},"content":" ? personToEdit.getPhone() : editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());"},{"lineNumber":151,"author":{"gitId":"-"},"content":" Email updatedEmail \u003d (personToEdit.getEmail().isPrivate())"},{"lineNumber":152,"author":{"gitId":"-"},"content":" ? personToEdit.getEmail() : editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());"},{"lineNumber":153,"author":{"gitId":"-"},"content":" Address updatedAddress \u003d (personToEdit.getAddress().isPrivate())"},{"lineNumber":154,"author":{"gitId":"-"},"content":" ? personToEdit.getAddress() : editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());"},{"lineNumber":155,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate())"},{"lineNumber":156,"author":{"gitId":"-"},"content":" ? personToEdit.getRemark() : personToEdit.getRemark();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();"},{"lineNumber":158,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());"},{"lineNumber":159,"author":{"gitId":"-"},"content":" Rating updatedRating \u003d editPersonDescriptor.getRating().orElse(personToEdit.getRating());"},{"lineNumber":160,"author":{"gitId":"-"},"content":" JerseyNumber updatedJerseyNumber \u003d editPersonDescriptor.getJerseyNumber()"},{"lineNumber":161,"author":{"gitId":"-"},"content":" .orElse(personToEdit.getJerseyNumber());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" Position updatedPosition \u003d editPersonDescriptor.getPosition().orElse(personToEdit.getPosition());"},{"lineNumber":163,"author":{"gitId":"-"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":167,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" }"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":171,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":178,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {"},{"lineNumber":179,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":183,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;"},{"lineNumber":184,"author":{"gitId":"-"},"content":" return index.equals(e.index)"},{"lineNumber":185,"author":{"gitId":"-"},"content":" \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor)"},{"lineNumber":186,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(personToEdit, e.personToEdit);"},{"lineNumber":187,"author":{"gitId":"-"},"content":" }"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":190,"author":{"gitId":"-"},"content":" * Stores the details to edit the player with. Each non-empty field value will replace the"},{"lineNumber":191,"author":{"gitId":"-"},"content":" * corresponding field value of the player."},{"lineNumber":192,"author":{"gitId":"-"},"content":" */"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" private Name name;"},{"lineNumber":195,"author":{"gitId":"-"},"content":" private Phone phone;"},{"lineNumber":196,"author":{"gitId":"-"},"content":" private Email email;"},{"lineNumber":197,"author":{"gitId":"-"},"content":" private Address address;"},{"lineNumber":198,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;"},{"lineNumber":199,"author":{"gitId":"-"},"content":" private Rating rating;"},{"lineNumber":200,"author":{"gitId":"-"},"content":" private Position position;"},{"lineNumber":201,"author":{"gitId":"-"},"content":" private JerseyNumber jerseyNumber;"},{"lineNumber":202,"author":{"gitId":"-"},"content":" private Avatar avatar;"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Copy constructor."},{"lineNumber":208,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally."},{"lineNumber":209,"author":{"gitId":"-"},"content":" */"},{"lineNumber":210,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {"},{"lineNumber":211,"author":{"gitId":"-"},"content":" setName(toCopy.name);"},{"lineNumber":212,"author":{"gitId":"-"},"content":" setPhone(toCopy.phone);"},{"lineNumber":213,"author":{"gitId":"-"},"content":" setEmail(toCopy.email);"},{"lineNumber":214,"author":{"gitId":"-"},"content":" setAddress(toCopy.address);"},{"lineNumber":215,"author":{"gitId":"-"},"content":" setTags(toCopy.tags);"},{"lineNumber":216,"author":{"gitId":"-"},"content":" setRating(toCopy.rating);"},{"lineNumber":217,"author":{"gitId":"-"},"content":" setPosition(toCopy.position);"},{"lineNumber":218,"author":{"gitId":"-"},"content":" setJerseyNumber(toCopy.jerseyNumber);"},{"lineNumber":219,"author":{"gitId":"-"},"content":" setAvatar(toCopy.avatar);"},{"lineNumber":220,"author":{"gitId":"-"},"content":" }"},{"lineNumber":221,"author":{"gitId":"-"},"content":""},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited."},{"lineNumber":224,"author":{"gitId":"-"},"content":" */"},{"lineNumber":225,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":226,"author":{"gitId":"-"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.tags,"},{"lineNumber":227,"author":{"gitId":"-"},"content":" this.rating, this.position, this.jerseyNumber, this.avatar);"},{"lineNumber":228,"author":{"gitId":"-"},"content":" }"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" this.name \u003d name;"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {"},{"lineNumber":235,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);"},{"lineNumber":236,"author":{"gitId":"-"},"content":" }"},{"lineNumber":237,"author":{"gitId":"-"},"content":""},{"lineNumber":238,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":239,"author":{"gitId":"-"},"content":" this.phone \u003d phone;"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {"},{"lineNumber":243,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);"},{"lineNumber":244,"author":{"gitId":"-"},"content":" }"},{"lineNumber":245,"author":{"gitId":"-"},"content":""},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":247,"author":{"gitId":"-"},"content":" this.email \u003d email;"},{"lineNumber":248,"author":{"gitId":"-"},"content":" }"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {"},{"lineNumber":251,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" this.address \u003d address;"},{"lineNumber":256,"author":{"gitId":"-"},"content":" }"},{"lineNumber":257,"author":{"gitId":"-"},"content":""},{"lineNumber":258,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {"},{"lineNumber":259,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Sets {@code tags} to this object\u0027s {@code tags}."},{"lineNumber":264,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally."},{"lineNumber":265,"author":{"gitId":"-"},"content":" */"},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":267,"author":{"gitId":"-"},"content":" this.tags \u003d (tags !\u003d null) ? new HashSet\u003c\u003e(tags) : null;"},{"lineNumber":268,"author":{"gitId":"-"},"content":" }"},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * Returns an unmodifiable tag set, which throws {@code UnsupportedOperationException}"},{"lineNumber":272,"author":{"gitId":"-"},"content":" * if modification is attempted."},{"lineNumber":273,"author":{"gitId":"-"},"content":" * Returns {@code Optional#empty()} if {@code tags} is null."},{"lineNumber":274,"author":{"gitId":"-"},"content":" */"},{"lineNumber":275,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {"},{"lineNumber":276,"author":{"gitId":"-"},"content":" return (tags !\u003d null) ? Optional.of(Collections.unmodifiableSet(tags)) : Optional.empty();"},{"lineNumber":277,"author":{"gitId":"-"},"content":" }"},{"lineNumber":278,"author":{"gitId":"-"},"content":""},{"lineNumber":279,"author":{"gitId":"-"},"content":" public void setRating(Rating rating) {"},{"lineNumber":280,"author":{"gitId":"-"},"content":" this.rating \u003d rating;"},{"lineNumber":281,"author":{"gitId":"-"},"content":" }"},{"lineNumber":282,"author":{"gitId":"-"},"content":""},{"lineNumber":283,"author":{"gitId":"-"},"content":" public Optional\u003cRating\u003e getRating() {"},{"lineNumber":284,"author":{"gitId":"-"},"content":" return Optional.ofNullable(rating);"},{"lineNumber":285,"author":{"gitId":"-"},"content":" }"},{"lineNumber":286,"author":{"gitId":"-"},"content":""},{"lineNumber":287,"author":{"gitId":"-"},"content":" public void setPosition(Position position) {"},{"lineNumber":288,"author":{"gitId":"-"},"content":" this.position \u003d position;"},{"lineNumber":289,"author":{"gitId":"-"},"content":" }"},{"lineNumber":290,"author":{"gitId":"-"},"content":""},{"lineNumber":291,"author":{"gitId":"-"},"content":" public Optional\u003cPosition\u003e getPosition() {"},{"lineNumber":292,"author":{"gitId":"-"},"content":" return Optional.ofNullable(position);"},{"lineNumber":293,"author":{"gitId":"-"},"content":" }"},{"lineNumber":294,"author":{"gitId":"-"},"content":""},{"lineNumber":295,"author":{"gitId":"-"},"content":" public void setJerseyNumber(JerseyNumber jerseyNumber) {"},{"lineNumber":296,"author":{"gitId":"-"},"content":" this.jerseyNumber \u003d jerseyNumber;"},{"lineNumber":297,"author":{"gitId":"-"},"content":" }"},{"lineNumber":298,"author":{"gitId":"-"},"content":""},{"lineNumber":299,"author":{"gitId":"-"},"content":" public Optional\u003cJerseyNumber\u003e getJerseyNumber() {"},{"lineNumber":300,"author":{"gitId":"-"},"content":" return Optional.ofNullable(jerseyNumber);"},{"lineNumber":301,"author":{"gitId":"-"},"content":" }"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" public void setAvatar(Avatar avatar) {"},{"lineNumber":304,"author":{"gitId":"-"},"content":" this.avatar \u003d avatar;"},{"lineNumber":305,"author":{"gitId":"-"},"content":" }"},{"lineNumber":306,"author":{"gitId":"-"},"content":""},{"lineNumber":307,"author":{"gitId":"-"},"content":" public Optional\u003cAvatar\u003e getAvatar() {"},{"lineNumber":308,"author":{"gitId":"-"},"content":" return Optional.ofNullable(avatar);"},{"lineNumber":309,"author":{"gitId":"-"},"content":" }"},{"lineNumber":310,"author":{"gitId":"-"},"content":""},{"lineNumber":311,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":312,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":313,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":314,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":315,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":316,"author":{"gitId":"-"},"content":" }"},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":319,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {"},{"lineNumber":320,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":321,"author":{"gitId":"-"},"content":" }"},{"lineNumber":322,"author":{"gitId":"-"},"content":""},{"lineNumber":323,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":324,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())"},{"lineNumber":327,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())"},{"lineNumber":328,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())"},{"lineNumber":329,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())"},{"lineNumber":330,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags())"},{"lineNumber":331,"author":{"gitId":"-"},"content":" \u0026\u0026 getRating().equals(e.getRating())"},{"lineNumber":332,"author":{"gitId":"-"},"content":" \u0026\u0026 getPosition().equals(e.getPosition())"},{"lineNumber":333,"author":{"gitId":"-"},"content":" \u0026\u0026 getJerseyNumber().equals(e.getJerseyNumber())"},{"lineNumber":334,"author":{"gitId":"-"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar());"},{"lineNumber":335,"author":{"gitId":"-"},"content":" }"},{"lineNumber":336,"author":{"gitId":"-"},"content":" }"},{"lineNumber":337,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":335}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Finds and lists all persons in address book whose name contains any of the argument keywords."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive."},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \""},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"KEYWORD [MORE KEYWORD]\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final NameContainsKeywordsPredicate predicate;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" this.predicate \u003d predicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":36,"author":{"gitId":"-"},"content":" || (other instanceof FindCommand // instanceof handles nulls"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 this.predicate.equals(((FindCommand) other).predicate)); // state check"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/KeyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Sets lock in model to true/false depending on current state"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"key\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"k\";"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the lock on MTM. \""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"Functionality of MTM reduced\\n\""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Input empty password to see current lock state\\n\""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: [PASSWORD]\\n\""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \" myPassword\";"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"MTM lock toggled!\";"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_WRONG_PASS \u003d \"Password entered is incorrect. Please try again.\";"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"[PASSWORD]\";"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" private String password;"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final Logger logger \u003d LogsCenter.getLogger(KeyCommand.class);"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand(String password) {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" this.password \u003d password;"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" * Checks if input password is correct."},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" private boolean correctPassword() {"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" UserPrefs up \u003d model.getUserPrefs();"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" return hash.equals(up.getAddressBookHashedPass());"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" private boolean emptyPass() {"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" return password.isEmpty();"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (emptyPass()) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_USAGE + \"\\nLock state is now: \""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" if (correctPassword()) {"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (model.getLockState()) {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS + \"\\nLock state is now: \""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_WRONG_PASS);"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":74}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user."},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all persons\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());"},{"lineNumber":23,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":4,"-":20}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Redo the previously undone command."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee"},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/RemarkCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Updates the remark of an existing player in the address book."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RemarkCommand extends UndoableCommand {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"remark\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"rm\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Updates the remark of the player identified \""},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \""},{"lineNumber":29,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":30,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":31,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"[REMARK]\\n\""},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"Must put on field\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADD_REMARK_SUCCESS \u003d \"Remark added to: %1$s\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_REMARK_SUCCESS \u003d \"Remark removed from: %1$s\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" private final Index index;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Remark remark;"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" private Person personToEdit;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Person editedPerson;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public RemarkCommand(Index index, Remark remark) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" requireNonNull(index);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" requireNonNull(remark);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" this.index \u003d index;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.remark \u003d remark;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" requireNonNull(personToEdit);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Updating remark should not result in duplicate\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new CommandResult(getSuccessMessage(editedPerson));"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":80,"author":{"gitId":"-"},"content":" editedPerson \u003d new Person(personToEdit.getName(), personToEdit.getPhone(), personToEdit.getEmail(),"},{"lineNumber":81,"author":{"gitId":"-"},"content":" personToEdit.getAddress(), remark, personToEdit.getTeamName(), personToEdit.getTags(),"},{"lineNumber":82,"author":{"gitId":"-"},"content":" personToEdit.getRating(), personToEdit.getPosition(), personToEdit.getJerseyNumber(),"},{"lineNumber":83,"author":{"gitId":"-"},"content":" personToEdit.getAvatar());"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":89,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!(other instanceof RemarkCommand)) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":99,"author":{"gitId":"-"},"content":" RemarkCommand e \u003d (RemarkCommand) other;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return index.equals(e.index)"},{"lineNumber":101,"author":{"gitId":"-"},"content":" \u0026\u0026 remark.equals(e.remark);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Gets the corresponding success message based on the remark field from {@code personToEdit} after editing."},{"lineNumber":106,"author":{"gitId":"-"},"content":" */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" private String getSuccessMessage(Person person) {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" String message \u003d remark.value.isEmpty() ? MESSAGE_DELETE_REMARK_SUCCESS : MESSAGE_ADD_REMARK_SUCCESS;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return String.format(message, personToEdit);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":4,"-":107}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":52,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":54}},{"path":"src/main/java/seedu/address/logic/commands/SetCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" * Adds a colour to a tag in address book."},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/** @@author Codee Ong Ong */"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"setTagColour\";"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sets the colour of tags to the colour of choice \""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Parameters: \""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"TAG \""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\\n\""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"friends \""},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG_COLOUR + \"green\\n\""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" + \"Colours to choose from are : teal, red, yellow, blue, orange, brown, \\n\""},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" + \"green, pink, black, grey\\n\";"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_TAG + \"TAG \" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_TAG \u003d \"tag is invalid! Please input a valid tag name!\";"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_SUCCESS \u003d \"tag %1$s colour changed to %2$s\";"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private final String tagColour;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" * Creates an AddCommand to add the specified {@code Person}"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" if (!tagToSet.isValidTagName(tagToSet.getTagName()) || !isTagValid) {"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_INVALID_TAG));"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // Check if"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" // (a) Object is the same object"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" // (b) Object is an instance of the object and that toSet, tag and color are the same"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" || (other instanceof SetCommand // instanceof handles nulls"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagToSet.getTagName().equals(((SetCommand) other).tagToSet.getTagName()))"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagColour.equals(((SetCommand) other).tagColour);"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Sorts all players in address book by field. Can be done in asc or desc order."},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class SortCommand extends UndoableCommand {"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"sort\";"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_ASCENDING \u003d \"asc\";"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_DESCENDING \u003d \"desc\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts players in address book \""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"by fields in either ascending or descending order.\\n\""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: FIELD ORDER\\n\""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted fields for sort: name, email, address, rating, jersey, pos\\n\""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted orders: asc \u0026 desc\\n\""},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" + \" name \" + BY_ASCENDING;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"FIELD ORDER\";"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Players in address book have been sorted.\";"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_EMPTY_BOOK \u003d \"No player(s) to sort.\";"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private final String field;"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final String order;"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public SortCommand(String field, String order) {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(field);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(order);"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" this.field \u003d field;"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" this.order \u003d order;"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public String getField() {"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" return this.field;"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public String getOrder() {"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return this.order;"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" model.sortPlayers(getField(), getOrder());"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" } catch (NoPlayerException npe) {"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_EMPTY_BOOK);"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":62}},{"path":"src/main/java/seedu/address/logic/commands/TogglePrivacyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import java.util.Set;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" * Toggles privacy of fields of player identified using it\u0027s last displayed index from the address book."},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommand extends UndoableCommand {"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"toggleprivacy\";"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"tp\";"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the field privacy of the person\""},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" + \" identified by the index number used in the last person listing.\\n\""},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"]\""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_EMAIL + \"]\""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_REMARK + \"]\""},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_RATING + \"]\""},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_ADDRESS + \"]\\n\""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE + \" \""},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_EMAIL + \" \""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_ADDRESS;"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"No prefixes were specified!\";"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \""},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE]\""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_EMAIL + \"EMAIL]\""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_REMARK + \"REMARK]\""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_RATING + \"RATING]\""},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_ADDRESS + \"ADDRESS]\";"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" private final Index index;"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" private final EditPersonPrivacy epp;"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" private Person personToEdit;"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" private Person editedPerson;"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" * @param index of the person in the filtered person list to edit privacy"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand(Index index, EditPersonPrivacy epp) {"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(index);"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(epp);"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.index \u003d index;"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d epp;"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" editedPerson \u003d createEditedPrivacyPerson(personToEdit, epp);"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Person must have all fields!\");"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));"},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" * edited with {@code editPersonPrivacy}."},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" * NOTE: Private fields will not be edited."},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);"},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();"},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();"},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" Phone phone;"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {"},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" return phone;"},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" private static Email createEmailPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" Email email;"},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {"},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();"},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();"},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Email\");"},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateEmail() !\u003d null) {"},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());"},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" email.togglePrivacy();"},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());"},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" return email;"},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" private static Address createAddressPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" Address address;"},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();"},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();"},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Address\");"},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateAddress() !\u003d null) {"},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());"},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":" address.togglePrivacy();"},{"lineNumber":214,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":215,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());"},{"lineNumber":216,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" return address;"},{"lineNumber":218,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":219,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":220,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" private static Remark createRemarkPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" Remark remark;"},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":228,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {"},{"lineNumber":229,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();"},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();"},{"lineNumber":232,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":233,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Remark\");"},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRemark() !\u003d null) {"},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());"},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":" remark.togglePrivacy();"},{"lineNumber":241,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":242,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());"},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" return remark;"},{"lineNumber":245,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":246,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Rating) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Rating) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" private static Rating createRatingPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":" Rating rating;"},{"lineNumber":254,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":255,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {"},{"lineNumber":256,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();"},{"lineNumber":257,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());"},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();"},{"lineNumber":259,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":260,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());"},{"lineNumber":261,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":262,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":263,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Rating\");"},{"lineNumber":264,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRating() !\u003d null) {"},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());"},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":" rating.togglePrivacy();"},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());"},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" return rating;"},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" public Index getIndex() {"},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":" return index;"},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy getEpp() {"},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" return epp;"},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {"},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object"},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" return true;"},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls"},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof TogglePrivacyCommand)) {"},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" return false;"},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":293,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":294,"author":{"gitId":"lohtianwei"},"content":" // state check"},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand e \u003d (TogglePrivacyCommand) other;"},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" return index.equals(e.index)"},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 epp.equals(e.epp);"},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the"},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" * corresponding field value of the person."},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" public static class EditPersonPrivacy {"},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" private Boolean privatePhone;"},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateEmail;"},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateAddress;"},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRemark;"},{"lineNumber":309,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRating;"},{"lineNumber":310,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":311,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy() {}"},{"lineNumber":312,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":313,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":" * Copy constructor."},{"lineNumber":315,"author":{"gitId":"lohtianwei"},"content":" * A defensive copy of {@code tags} is used internally."},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":317,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy (EditPersonPrivacy toCopy) {"},{"lineNumber":318,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d toCopy.privateAddress;"},{"lineNumber":319,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d toCopy.privateEmail;"},{"lineNumber":320,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d toCopy.privatePhone;"},{"lineNumber":321,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d toCopy.privateRemark;"},{"lineNumber":322,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d toCopy.privateRating;"},{"lineNumber":323,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":324,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":325,"author":{"gitId":"lohtianwei"},"content":" public void setPrivatePhone(boolean privatePhone) {"},{"lineNumber":326,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d privatePhone;"},{"lineNumber":327,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":328,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":329,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivatePhone() {"},{"lineNumber":330,"author":{"gitId":"lohtianwei"},"content":" return privatePhone;"},{"lineNumber":331,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":332,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":333,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateEmail(boolean privateEmail) {"},{"lineNumber":334,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d privateEmail;"},{"lineNumber":335,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":336,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":337,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateEmail() {"},{"lineNumber":338,"author":{"gitId":"lohtianwei"},"content":" return privateEmail;"},{"lineNumber":339,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":340,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":341,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateAddress(boolean privateAddress) {"},{"lineNumber":342,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d privateAddress;"},{"lineNumber":343,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":344,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":345,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateAddress() {"},{"lineNumber":346,"author":{"gitId":"lohtianwei"},"content":" return privateAddress;"},{"lineNumber":347,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":348,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":349,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRemark(boolean privateRemark) {"},{"lineNumber":350,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d privateRemark;"},{"lineNumber":351,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":352,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":353,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRemark() {"},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":" return privateRemark;"},{"lineNumber":355,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":356,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":357,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRating(boolean privateRating) {"},{"lineNumber":358,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d privateRating;"},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":360,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":361,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRating() {"},{"lineNumber":362,"author":{"gitId":"lohtianwei"},"content":" return privateRating;"},{"lineNumber":363,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":364,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":365,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":366,"author":{"gitId":"lohtianwei"},"content":" *"},{"lineNumber":367,"author":{"gitId":"lohtianwei"},"content":" * @return true if at least one field is not null"},{"lineNumber":368,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":" public boolean anyNonNullField() {"},{"lineNumber":370,"author":{"gitId":"lohtianwei"},"content":" return CollectionUtil.isAnyNonNull(this.privateAddress, this.privateEmail, this.privatePhone,"},{"lineNumber":371,"author":{"gitId":"lohtianwei"},"content":" this.privateRating, this.privateRemark);"},{"lineNumber":372,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":373,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":374,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":375,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {"},{"lineNumber":376,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object"},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":378,"author":{"gitId":"lohtianwei"},"content":" return true;"},{"lineNumber":379,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":380,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":381,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls"},{"lineNumber":382,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof EditPersonPrivacy)) {"},{"lineNumber":383,"author":{"gitId":"lohtianwei"},"content":" return false;"},{"lineNumber":384,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":385,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":386,"author":{"gitId":"lohtianwei"},"content":" // state check"},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy e \u003d (EditPersonPrivacy) other;"},{"lineNumber":388,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":389,"author":{"gitId":"lohtianwei"},"content":" return getPrivatePhone().equals(e.getPrivatePhone())"},{"lineNumber":390,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateAddress().equals(e.getPrivateAddress())"},{"lineNumber":391,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateEmail().equals(e.getPrivateEmail())"},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRemark().equals(e.getPrivateRemark())"},{"lineNumber":393,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRating().equals(e.getPrivateRating());"},{"lineNumber":394,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":395,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":396,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":394,"-":2}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee"},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/ViewCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * View a team identified using it\u0027s team name from the address book."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ViewCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"view\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"vt\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \": Views the team identified by the team name.\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: TEAM_NAME\\n\""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" Arsenal\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_VIEW_TEAM_SUCCESS \u003d \"Viewing Team: %1$s\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final TeamName targetTeam;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public ViewCommand(TeamName targetTeam) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.targetTeam \u003d targetTeam;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(targetTeam.toString()));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(targetTeam);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_VIEW_TEAM_SUCCESS, targetTeam.toString()));"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof ViewCommand // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetTeam.equals(((ViewCommand) other).targetTeam)); // state check"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":51}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemoveCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RenameCommand;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ViewCommand;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Parses user input."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddressBookParser {"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_RESTRICTED \u003d \"Not allowed! Please unlock MTM before execution.\\n\""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" + KeyCommand.MESSAGE_USAGE;"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input into command for execution."},{"lineNumber":50,"author":{"gitId":"-"},"content":" *"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * @param userInput full user input string"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @return the command based on the user input"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":54,"author":{"gitId":"-"},"content":" */"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());"},{"lineNumber":57,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");"},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Command res \u003d lowLevelCommand(commandWord, arguments);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" if (res !\u003d null) {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return res;"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" if (lockState) {"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(MESSAGE_RESTRICTED);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" switch (commandWord) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" case AddCommand.COMMAND_ALIAS:"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" case EditCommand.COMMAND_ALIAS:"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" case SelectCommand.COMMAND_ALIAS:"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" case DeleteCommand.COMMAND_ALIAS:"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" case ClearCommand.COMMAND_ALIAS:"},{"lineNumber":93,"author":{"gitId":"-"},"content":" return new ClearCommand();"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_WORD:"},{"lineNumber":96,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_ALIAS:"},{"lineNumber":97,"author":{"gitId":"-"},"content":" return new RemarkCommandParser().parse(arguments);"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:"},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" case HistoryCommand.COMMAND_ALIAS:"},{"lineNumber":101,"author":{"gitId":"-"},"content":" return new HistoryCommand();"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_WORD:"},{"lineNumber":104,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_ALIAS:"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new CreateCommandParser().parse(arguments);"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_WORD:"},{"lineNumber":108,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_ALIAS:"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return new RemoveCommandParser().parse(arguments);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_WORD:"},{"lineNumber":112,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_ALIAS:"},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new AssignCommandParser().parse(arguments);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_WORD:"},{"lineNumber":116,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_ALIAS:"},{"lineNumber":117,"author":{"gitId":"-"},"content":" return new RenameCommandParser().parse(arguments);"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" case UndoCommand.COMMAND_ALIAS:"},{"lineNumber":121,"author":{"gitId":"-"},"content":" return new UndoCommand();"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case RedoCommand.COMMAND_ALIAS:"},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new RedoCommand();"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_WORD:"},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_ALIAS:"},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" return new SetCommandParser().parse(arguments);"},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_WORD:"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" case TogglePrivacyCommand.COMMAND_ALIAS:"},{"lineNumber":133,"author":{"gitId":"-"},"content":" return new TogglePrivacyCommandParser().parse(arguments);"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * Checks for low level command words or aliases that do not violate restriction of a locked MTM."},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" * Else, control is returned back to original parseCommand method."},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" * @param commandWord"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" * @param arguments"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" switch(commandWord) {"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_WORD:"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" return new ChangeThemeCommandParser().parse(arguments);"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" return new ListCommand();"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_WORD:"},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_ALIAS:"},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommandParser().parse(arguments);"},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_WORD:"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_ALIAS:"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" return new ViewCommandParser().parse(arguments);"},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" return new ExitCommand();"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" return new HelpCommand();"},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" return null;"},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":84,"codeeong":6,"-":93}},{"path":"src/main/java/seedu/address/logic/parser/ChangeThemeCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.ChangeThemeCommand.MESSAGE_USAGE;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Parses input arguments and creates a new ThemeCommand object."},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParser implements Parser\u003cChangeThemeCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" * Parses the given (@code String) in the context of a ThemeCommand."},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" * @return ThemeCommand Object for execution"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand parse(String userInput) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" if (userInput.length() \u003d\u003d 0) {"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" return new ChangeThemeCommand(userInput);"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":26}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final Prefix PREFIX_TAG_COLOUR \u003d new Prefix(\"tc/\");"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TEAM_NAME \u003d new Prefix(\"tm/\");"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_INDEX \u003d new Prefix(\"i/\");"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_RATING \u003d new Prefix(\"ra/\");"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_JERSEY_NUMBER \u003d new Prefix(\"j/\");"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_POSITION \u003d new Prefix(\"po/\");"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"av/\");"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":21}},{"path":"src/main/java/seedu/address/logic/parser/KeyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Parses input and creates KeyCommand object with password provided"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandParser implements Parser\u003cKeyCommand\u003e {"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the KeyCommand"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" * and returns a KeyCommand object for execution."},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand parse(String args) throws ParseException {"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" /*if (trimmedArgs.isEmpty()) {"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }*/"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length \u003e 1) {"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommand(argKeywords[0]);"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":31}},{"path":"src/main/java/seedu/address/logic/parser/SetCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Stream;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" * This class is to check whether Set Command was input correctly"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" * Parses the given {@code String} of arguments in the context of the SetCommand"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * and returns an SetCommand object for execution."},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG, PREFIX_TAG_COLOUR);"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG, PREFIX_TAG_COLOUR)"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" || !argMultimap.getPreamble().isEmpty()) {"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d ParserUtil.parseTag(argMultimap.getValue(PREFIX_TAG).get());"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" String colour \u003d ParserUtil.parseTagColour(argMultimap.getValue(PREFIX_TAG_COLOUR).get());"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" if (!tag.isValidTagColour(colour)) {"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" throw new ParseException("},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" return new SetCommand(tag, colour);"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" throw new ParseException("},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":56}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Arrays;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new SortCommand object with field and order parameters provided"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_FIELDS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" \"name\", \"email\", \"address\", \"rating\", \"jersey\", \"pos\"));"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_ORDERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" \"asc\", \"desc\"));"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public SortCommand parse(String args) throws ParseException {"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" //eliminates spaces"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" //accounts for caps entries"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length !\u003d 2) {"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_FIELDS.contains(argKeywords[0])) {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_ORDERS.contains(argKeywords[1])) {"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return new SortCommand(argKeywords[0], argKeywords[1]);"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":51}},{"path":"src/main/java/seedu/address/logic/parser/TogglePrivacyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new TogglePrivacyCommand object"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParser implements Parser\u003cTogglePrivacyCommand\u003e {"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the TogglePrivacyCommand"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" * and returns an TogglePrivacyCommand object for execution."},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand parse(String args) throws ParseException {"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(args);"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" ArgumentTokenizer.tokenize(args,"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" PREFIX_REMARK, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_RATING);"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" Index index;"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_RATING).isPresent()) {"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" if (!epp.anyNonNullField()) {"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(TogglePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" return new TogglePrivacyCommand(index, epp);"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":67,"-":2}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.UniqueTeamList;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"},{"lineNumber":42,"author":{"gitId":"-"},"content":" *"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}"},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e syncedPersonList \u003d newData.getPersonList().stream()"},{"lineNumber":83,"author":{"gitId":"-"},"content":" .map(this::syncWithMasterTagList)"},{"lineNumber":84,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());"},{"lineNumber":85,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e syncedTeamList \u003d newData.getTeamList();"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(syncedPersonList);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" setTeams(syncedTeamList);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBooks should not have duplicate persons\");"},{"lineNumber":92,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" throw new AssertionError(\"MTM should not have duplicate teams\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" //// person-level operations"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Adds a person to the address book."},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}."},{"lineNumber":103,"author":{"gitId":"-"},"content":" *"},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists."},{"lineNumber":105,"author":{"gitId":"-"},"content":" */"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person p) throws DuplicatePersonException {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person person \u003d syncWithMasterTagList(p);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":109,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":110,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":111,"author":{"gitId":"-"},"content":" persons.add(person);"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedPerson}."},{"lineNumber":116,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedPerson}."},{"lineNumber":117,"author":{"gitId":"-"},"content":" *"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":119,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":120,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":121,"author":{"gitId":"-"},"content":" *"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * @see #syncWithMasterTagList(Person)"},{"lineNumber":123,"author":{"gitId":"-"},"content":" */"},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":125,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":126,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person syncedEditedPerson \u003d syncWithMasterTagList(editedPerson);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":130,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":131,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" removeUnusedTags();"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayersBy(String field, String order) throws NoPlayerException {"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" persons.sortBy(field, order);"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" //@@author"},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Updates the master tag list to include tags in {@code person} that are not in the list."},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @return a copy of this {@code person} such that every tag in this person points to a Tag object in the master"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * list."},{"lineNumber":149,"author":{"gitId":"-"},"content":" */"},{"lineNumber":150,"author":{"gitId":"-"},"content":" private Person syncWithMasterTagList(Person person) {"},{"lineNumber":151,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());"},{"lineNumber":152,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list"},{"lineNumber":155,"author":{"gitId":"-"},"content":" // used for checking person tag references"},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list."},{"lineNumber":160,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));"},{"lineNumber":162,"author":{"gitId":"-"},"content":" return new Person("},{"lineNumber":163,"author":{"gitId":"-"},"content":" person.getName(), person.getPhone(), person.getEmail(), person.getAddress(), person.getRemark(),"},{"lineNumber":164,"author":{"gitId":"-"},"content":" person.getTeamName(), correctTagReferences, person.getRating(), person.getPosition(),"},{"lineNumber":165,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":166,"author":{"gitId":"-"},"content":" }"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":170,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":171,"author":{"gitId":"-"},"content":" */"},{"lineNumber":172,"author":{"gitId":"-"},"content":" public boolean removePerson(Person key) throws PersonNotFoundException {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":175,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":176,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" }"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" //// tag-level operations"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {"},{"lineNumber":183,"author":{"gitId":"-"},"content":" tags.add(t);"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }"},{"lineNumber":185,"author":{"gitId":"-"},"content":""},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" * Sets the colour of {@code tag}."},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" public void setTagColour(Tag tag, String colour) {"},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" for (Tag t : tags) {"},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" if (t.getTagName().equals(tag.getTagName())) {"},{"lineNumber":194,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(colour);"},{"lineNumber":195,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":196,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":197,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":198,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":200,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":201,"author":{"gitId":"-"},"content":" *"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Removes {@code tag} from all persons in this {@code AddressBook}."},{"lineNumber":203,"author":{"gitId":"-"},"content":" */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void removeTag(Tag tag) {"},{"lineNumber":205,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":206,"author":{"gitId":"-"},"content":" for (Person person : persons) {"},{"lineNumber":207,"author":{"gitId":"-"},"content":" removeTagFromPerson(tag, person);"},{"lineNumber":208,"author":{"gitId":"-"},"content":" }"},{"lineNumber":209,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":" }"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Removes {@code tag} from {@code person} in this {@code AddressBook}."},{"lineNumber":216,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code person} is not in this {@code AddressBook}."},{"lineNumber":217,"author":{"gitId":"-"},"content":" */"},{"lineNumber":218,"author":{"gitId":"-"},"content":" private void removeTagFromPerson(Tag tag, Person person) throws PersonNotFoundException {"},{"lineNumber":219,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003c\u003e(person.getTags());"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (!newTags.remove(tag)) {"},{"lineNumber":222,"author":{"gitId":"-"},"content":" return;"},{"lineNumber":223,"author":{"gitId":"-"},"content":" }"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" Person newPerson \u003d"},{"lineNumber":226,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":227,"author":{"gitId":"-"},"content":" person.getRemark(), person.getTeamName(), newTags, person.getRating(), person.getPosition(),"},{"lineNumber":228,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" updatePerson(person, newPerson);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person \""},{"lineNumber":234,"author":{"gitId":"-"},"content":" + \"after updating person\u0027s tag.\");"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }"},{"lineNumber":236,"author":{"gitId":"-"},"content":" }"},{"lineNumber":237,"author":{"gitId":"-"},"content":""},{"lineNumber":238,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":239,"author":{"gitId":"-"},"content":" * Removes all {@code tag} that are not in used by any {@code Person} in this {@code AddressBook}."},{"lineNumber":240,"author":{"gitId":"-"},"content":" */"},{"lineNumber":241,"author":{"gitId":"-"},"content":" private void removeUnusedTags() {"},{"lineNumber":242,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e tagsInPersons \u003d persons.asObservableList().stream()"},{"lineNumber":243,"author":{"gitId":"-"},"content":" .map(Person::getTags)"},{"lineNumber":244,"author":{"gitId":"-"},"content":" .flatMap(Set::stream)"},{"lineNumber":245,"author":{"gitId":"-"},"content":" .collect(Collectors.toSet());"},{"lineNumber":246,"author":{"gitId":"-"},"content":" tags.setTags(tagsInPersons);"},{"lineNumber":247,"author":{"gitId":"-"},"content":" }"},{"lineNumber":248,"author":{"gitId":"-"},"content":""},{"lineNumber":249,"author":{"gitId":"-"},"content":" //@@author jordancjq"},{"lineNumber":250,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":251,"author":{"gitId":"-"},"content":" * Creates a team in the manager."},{"lineNumber":252,"author":{"gitId":"-"},"content":" * @throws DuplicateTeamException if an equivalent team already exists."},{"lineNumber":253,"author":{"gitId":"-"},"content":" */"},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void createTeam(Team t) throws DuplicateTeamException {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" teams.add(t);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" }"},{"lineNumber":257,"author":{"gitId":"-"},"content":""},{"lineNumber":258,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Assigns a {@code person} to a {@code team}."},{"lineNumber":260,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}."},{"lineNumber":261,"author":{"gitId":"-"},"content":" */"},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":263,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":" if (!person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":266,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":267,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());"},{"lineNumber":268,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":269,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");"},{"lineNumber":270,"author":{"gitId":"-"},"content":" }"},{"lineNumber":271,"author":{"gitId":"-"},"content":" }"},{"lineNumber":272,"author":{"gitId":"-"},"content":""},{"lineNumber":273,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d"},{"lineNumber":274,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":275,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(), person.getPosition(),"},{"lineNumber":276,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":277,"author":{"gitId":"-"},"content":""},{"lineNumber":278,"author":{"gitId":"-"},"content":" if (!person.getTeamName().equals(newPersonWithTeam.getTeamName())) {"},{"lineNumber":279,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":280,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);"},{"lineNumber":281,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":282,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":283,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":284,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":285,"author":{"gitId":"-"},"content":" }"},{"lineNumber":286,"author":{"gitId":"-"},"content":" }"},{"lineNumber":287,"author":{"gitId":"-"},"content":" }"},{"lineNumber":288,"author":{"gitId":"-"},"content":""},{"lineNumber":289,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":290,"author":{"gitId":"-"},"content":" * Unassigns a {@code person} from team."},{"lineNumber":291,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code teamName} in {@code person} is {@code UNSPECIFIED_FIELD}."},{"lineNumber":292,"author":{"gitId":"-"},"content":" */"},{"lineNumber":293,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {"},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException(person.getName().toString());"},{"lineNumber":296,"author":{"gitId":"-"},"content":" }"},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d"},{"lineNumber":299,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":300,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),"},{"lineNumber":301,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":304,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());"},{"lineNumber":305,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":306,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");"},{"lineNumber":307,"author":{"gitId":"-"},"content":" }"},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":310,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);"},{"lineNumber":311,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":312,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":313,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":314,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":315,"author":{"gitId":"-"},"content":" }"},{"lineNumber":316,"author":{"gitId":"-"},"content":" }"},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":319,"author":{"gitId":"-"},"content":" * Immediately add a {@code person} to a {@code team}."},{"lineNumber":320,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}."},{"lineNumber":321,"author":{"gitId":"-"},"content":" */"},{"lineNumber":322,"author":{"gitId":"-"},"content":" public void addPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":323,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":327,"author":{"gitId":"-"},"content":" * Removes a {@code person} from a {@code team}."},{"lineNumber":328,"author":{"gitId":"-"},"content":" */"},{"lineNumber":329,"author":{"gitId":"-"},"content":" private void removePersonFromTeam(Person person, TeamName teamName) throws PersonNotFoundException {"},{"lineNumber":330,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":331,"author":{"gitId":"-"},"content":" teams.removePersonFromTeam(person, teams.getTeam(teamName));"},{"lineNumber":332,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":333,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":334,"author":{"gitId":"-"},"content":" }"},{"lineNumber":335,"author":{"gitId":"-"},"content":" }"},{"lineNumber":336,"author":{"gitId":"-"},"content":""},{"lineNumber":337,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":338,"author":{"gitId":"-"},"content":" * Removes a {@code team} from {@code teams}."},{"lineNumber":339,"author":{"gitId":"-"},"content":" */"},{"lineNumber":340,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {"},{"lineNumber":341,"author":{"gitId":"-"},"content":" if (!teams.contains(teamName)) {"},{"lineNumber":342,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();"},{"lineNumber":343,"author":{"gitId":"-"},"content":" }"},{"lineNumber":344,"author":{"gitId":"-"},"content":""},{"lineNumber":345,"author":{"gitId":"-"},"content":" Team teamToRemove \u003d teams.getTeam(teamName);"},{"lineNumber":346,"author":{"gitId":"-"},"content":""},{"lineNumber":347,"author":{"gitId":"-"},"content":" for (Person person : teamToRemove) {"},{"lineNumber":348,"author":{"gitId":"-"},"content":" removeTeamFromPerson(person);"},{"lineNumber":349,"author":{"gitId":"-"},"content":" }"},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":" teams.remove(teamToRemove);"},{"lineNumber":352,"author":{"gitId":"-"},"content":" }"},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":355,"author":{"gitId":"-"},"content":" * Removes {@code teamName} from {@code person} in this {@code Team}."},{"lineNumber":356,"author":{"gitId":"-"},"content":" */"},{"lineNumber":357,"author":{"gitId":"-"},"content":" private void removeTeamFromPerson(Person person) {"},{"lineNumber":358,"author":{"gitId":"-"},"content":" Person personWithRemoveTeam \u003d"},{"lineNumber":359,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":360,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),"},{"lineNumber":361,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":362,"author":{"gitId":"-"},"content":""},{"lineNumber":363,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":364,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRemoveTeam);"},{"lineNumber":365,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":366,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":367,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":368,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":369,"author":{"gitId":"-"},"content":" }"},{"lineNumber":370,"author":{"gitId":"-"},"content":" }"},{"lineNumber":371,"author":{"gitId":"-"},"content":""},{"lineNumber":372,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":373,"author":{"gitId":"-"},"content":" * Renames {@code Team} with {@code updatedTeamName}."},{"lineNumber":374,"author":{"gitId":"-"},"content":" * @return"},{"lineNumber":375,"author":{"gitId":"-"},"content":" */"},{"lineNumber":376,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {"},{"lineNumber":377,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":378,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e renameTeamPersonList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":379,"author":{"gitId":"-"},"content":""},{"lineNumber":380,"author":{"gitId":"-"},"content":" for (Person person : persons) {"},{"lineNumber":381,"author":{"gitId":"-"},"content":" if (person.getTeamName().equals(targetTeam.getTeamName())) {"},{"lineNumber":382,"author":{"gitId":"-"},"content":" renameTeamPersonList.add(renameTeamInPerson(person, updatedTeamName, targetTeam));"},{"lineNumber":383,"author":{"gitId":"-"},"content":" }"},{"lineNumber":384,"author":{"gitId":"-"},"content":" }"},{"lineNumber":385,"author":{"gitId":"-"},"content":""},{"lineNumber":386,"author":{"gitId":"-"},"content":" Team updatedTeam \u003d new Team(updatedTeamName, renameTeamPersonList);"},{"lineNumber":387,"author":{"gitId":"-"},"content":""},{"lineNumber":388,"author":{"gitId":"-"},"content":" teams.setTeam(targetTeam, updatedTeam);"},{"lineNumber":389,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException dte) {"},{"lineNumber":390,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate team after renaming\");"},{"lineNumber":391,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {"},{"lineNumber":392,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Teams should contain this team\");"},{"lineNumber":393,"author":{"gitId":"-"},"content":" }"},{"lineNumber":394,"author":{"gitId":"-"},"content":" }"},{"lineNumber":395,"author":{"gitId":"-"},"content":""},{"lineNumber":396,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":397,"author":{"gitId":"-"},"content":" * Renames {@code teamName} in {@code person} with {@code teamName}."},{"lineNumber":398,"author":{"gitId":"-"},"content":" */"},{"lineNumber":399,"author":{"gitId":"-"},"content":" private Person renameTeamInPerson(Person person, TeamName teamName, Team targetTeam) {"},{"lineNumber":400,"author":{"gitId":"-"},"content":" Person personWithRenameTeam \u003d"},{"lineNumber":401,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":402,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(),"},{"lineNumber":403,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":406,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRenameTeam);"},{"lineNumber":407,"author":{"gitId":"-"},"content":" return personWithRenameTeam;"},{"lineNumber":408,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":409,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":410,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":411,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":412,"author":{"gitId":"-"},"content":" }"},{"lineNumber":413,"author":{"gitId":"-"},"content":" }"},{"lineNumber":414,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":415,"author":{"gitId":"-"},"content":" //// util methods"},{"lineNumber":416,"author":{"gitId":"-"},"content":""},{"lineNumber":417,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":418,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":419,"author":{"gitId":"-"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\";"},{"lineNumber":420,"author":{"gitId":"-"},"content":" // TODO: refine later"},{"lineNumber":421,"author":{"gitId":"-"},"content":" }"},{"lineNumber":422,"author":{"gitId":"-"},"content":""},{"lineNumber":423,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":424,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getPersonList() {"},{"lineNumber":425,"author":{"gitId":"-"},"content":" return persons.asObservableList();"},{"lineNumber":426,"author":{"gitId":"-"},"content":" }"},{"lineNumber":427,"author":{"gitId":"-"},"content":""},{"lineNumber":428,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":429,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":430,"author":{"gitId":"-"},"content":" return tags.asObservableList();"},{"lineNumber":431,"author":{"gitId":"-"},"content":" }"},{"lineNumber":432,"author":{"gitId":"-"},"content":""},{"lineNumber":433,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":434,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {"},{"lineNumber":435,"author":{"gitId":"-"},"content":" return teams.asObservableList();"},{"lineNumber":436,"author":{"gitId":"-"},"content":" }"},{"lineNumber":437,"author":{"gitId":"-"},"content":""},{"lineNumber":438,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":439,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":440,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":441,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls"},{"lineNumber":442,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)"},{"lineNumber":443,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags));"},{"lineNumber":444,"author":{"gitId":"-"},"content":" }"},{"lineNumber":445,"author":{"gitId":"-"},"content":""},{"lineNumber":446,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":447,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":448,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":449,"author":{"gitId":"-"},"content":" return Objects.hash(persons, tags);"},{"lineNumber":450,"author":{"gitId":"-"},"content":" }"},{"lineNumber":451,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":7,"codeeong":13,"-":431}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The API of the Model component."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public interface Model {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" Predicate\u003cPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Deletes the given person. */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" void deletePerson(Person target) throws PersonNotFoundException;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Adds the given person */"},{"lineNumber":33,"author":{"gitId":"-"},"content":" void addPerson(Person person) throws DuplicatePersonException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}."},{"lineNumber":37,"author":{"gitId":"-"},"content":" *"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":40,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":" void updatePerson(Person target, Person editedPerson)"},{"lineNumber":43,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}."},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code teamName}."},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException;"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" * Sorts players in address book by field in asc or desc order"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" * @param field"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" * @param order"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" void sortPlayers(String field, String order) throws NoPlayerException;"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" boolean getLockState();"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" UserPrefs getUserPrefs();"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" /** Locks address book from model*/"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" void lockAddressBookModel();"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /** Unlocks address book from model*/"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" void unlockAddressBookModel();"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" /** Removes the given {@code tag} from all {@code Person}s. */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" void deleteTag(Tag tag);"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" /** Create the given team */"},{"lineNumber":81,"author":{"gitId":"-"},"content":" void createTeam(Team team) throws DuplicateTeamException;"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /** Assign person to team */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" void assignPersonToTeam(Person person, TeamName teamName)"},{"lineNumber":85,"author":{"gitId":"-"},"content":" throws DuplicatePersonException;"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /** Unassign person from team */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" void unassignPersonFromTeam(Person person) throws TeamNotFoundException;"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /** Removes the given team */"},{"lineNumber":91,"author":{"gitId":"-"},"content":" void removeTeam(TeamName teamName) throws TeamNotFoundException;"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Renames the given team */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" void renameTeam(Team targetTeam, TeamName teamName);"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" /** sets the given {@code tag} to color. */"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" boolean setTagColour(Tag tag, String colour);"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of the team list */"},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();"},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":18,"codeeong":5,"-":78}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data."},{"lineNumber":29,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final FilteredList\u003cPerson\u003e filteredPersons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private final UserPrefs userPrefs;"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" this.userPrefs \u003d userPrefs;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager() {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(Person target) throws PersonNotFoundException {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);"},{"lineNumber":76,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public synchronized void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" addressBook.sortPlayersBy(field, order);"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" indicateAddressBookChanged();"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" return userPrefs;"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().lockAddressBook();"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {"},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().unlockAddressBook();"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" return getUserPrefs().getAddressBookLockState();"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" //@@author"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":119,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" addressBook.removeTag(tag);"},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" indicateAddressBookChanged();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" //@@author jordancjq"},{"lineNumber":125,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"-"},"content":" public synchronized void createTeam(Team team) throws DuplicateTeamException {"},{"lineNumber":127,"author":{"gitId":"-"},"content":" addressBook.createTeam(team);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" }"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"-"},"content":" public synchronized void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" addressBook.assignPersonToTeam(person, teamName);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public synchronized void unassignPersonFromTeam(Person person) throws TeamNotFoundException {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" addressBook.unassignPersonFromTeam(person);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":141,"author":{"gitId":"-"},"content":" }"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":144,"author":{"gitId":"-"},"content":" public synchronized void removeTeam(TeamName teamName) throws TeamNotFoundException {"},{"lineNumber":145,"author":{"gitId":"-"},"content":" requireNonNull(teamName);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" raise(new RemoveSelectedTeamEvent(teamName));"},{"lineNumber":147,"author":{"gitId":"-"},"content":" addressBook.removeTeam(teamName);"},{"lineNumber":148,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":149,"author":{"gitId":"-"},"content":" }"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":152,"author":{"gitId":"-"},"content":" public synchronized void renameTeam(Team targetTeam, TeamName updatedTeamName) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" requireAllNonNull(targetTeam, updatedTeamName);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" addressBook.renameTeam(targetTeam, updatedTeamName);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public boolean setTagColour(Tag tag, String colour) {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e allTags \u003d addressBook.getTagList();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" boolean isTagValid \u003d false;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" for (Tag t : allTags) {"},{"lineNumber":164,"author":{"gitId":"-"},"content":" if (t.getTagName().equals(tag.getTagName())) {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" isTagValid \u003d true;"},{"lineNumber":166,"author":{"gitId":"-"},"content":" break;"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }"},{"lineNumber":168,"author":{"gitId":"-"},"content":" }"},{"lineNumber":169,"author":{"gitId":"-"},"content":" if (!isTagValid) {"},{"lineNumber":170,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":" addressBook.setTagColour(tag, colour);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":174,"author":{"gitId":"-"},"content":" return isTagValid;"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {"},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" return addressBook.getTeamList();"},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code Person} backed by the internal list of"},{"lineNumber":186,"author":{"gitId":"-"},"content":" * {@code addressBook}"},{"lineNumber":187,"author":{"gitId":"-"},"content":" */"},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" requireNonNull(predicate);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author jordancjq"},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {"},{"lineNumber":202,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {"},{"lineNumber":207,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));"},{"lineNumber":208,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":209,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":215,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":217,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {"},{"lineNumber":218,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":222,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {"},{"lineNumber":223,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":224,"author":{"gitId":"-"},"content":" }"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":227,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;"},{"lineNumber":228,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)"},{"lineNumber":229,"author":{"gitId":"-"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons);"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":28,"codeeong":7,"-":197}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String addressBookFilePath \u003d \"data/myteammanager.xml\";"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private String addressBookName \u003d \"MyTeamManager\";"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private String addressBookTheme \u003d \"DarkTheme.css\";"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean addressBookLockState \u003d false;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" private String addressBookHashedPass \u003d Hashing.sha256()"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" .hashString(\"ilikesports\", StandardCharsets.UTF_8).toString();"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" public UserPrefs() {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.setGuiSettings(500, 500, 0, 0);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return addressBookFilePath;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddressBookName() {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressBookName;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBook() {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d true;"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBook() {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d false;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public String getAddressBookHashedPass() {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" return addressBookHashedPass;"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean getAddressBookLockState() {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return this.addressBookLockState;"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" public String getAddressBookTheme() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return addressBookTheme;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" public void setAddressBookTheme(String addressBookTheme) {"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" this.addressBookTheme \u003d addressBookTheme;"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well."},{"lineNumber":89,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)"},{"lineNumber":95,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookHashedPass, o.addressBookHashedPass)"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());"},{"lineNumber":110,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nPassword: \" + addressBookHashedPass);"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":28,"codeeong":9,"-":80}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs an {@code Address}."},{"lineNumber":27,"author":{"gitId":"-"},"content":" *"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @param address A valid address."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Address(String address) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(address);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" checkArgument(isValidAddress(address), MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d address;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" public Address(String address, boolean isPrivate) {"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" this(address);"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":73}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.nio.file.Files;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.nio.file.Path;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.nio.file.Paths;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.nio.file.StandardCopyOption;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s avatar in the address book. Contains filepath to avatar image file."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAvatar(String)}"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class Avatar {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \"Please specify the absolute filepath for the avatar image eg. av/C:\\\\image.png\\n (for Windows), \""},{"lineNumber":27,"author":{"gitId":"-"},"content":" + \"av//User/username/path/to/image.jpg (for MacOS). \""},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"Image file should be 200x200 and in jpg or png format\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String AVATAR_VALIDATION_PATTERN \u003d \"([^\\\\s]+(\\\\.(?i)(jpg|png))$)\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private String value;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Constructs an {@code Avatar}."},{"lineNumber":36,"author":{"gitId":"-"},"content":" *"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @param avatar A valid avatar."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public Avatar(String avatar) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(avatar);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" checkArgument(isValidAvatar(avatar), MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.value \u003d avatar;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s avatar."},{"lineNumber":47,"author":{"gitId":"-"},"content":" */"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidAvatar(String test) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" Pattern pattern \u003d Pattern.compile(AVATAR_VALIDATION_PATTERN);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" Matcher matcher \u003d pattern.matcher(test);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return matcher.matches() || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" */"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Copies the image file from file path entered into images/ and renames it as [name].png"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * and saves the file path in value"},{"lineNumber":71,"author":{"gitId":"-"},"content":" * @param player player\u0027s avatar image filepath string"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * @throws IOException thrown when file not found"},{"lineNumber":73,"author":{"gitId":"-"},"content":" */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setFilePath(String player) throws IOException {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":" final File file \u003d new File(value);"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any"},{"lineNumber":82,"author":{"gitId":"-"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.value \u003d dest.toString();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" public String getValue() {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public static void setUpPlaceholderForTest() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" Files.copy(Avatar.class.getResourceAsStream(\"/images/placeholder_test.png\"),"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" Paths.get(\"images/placeholder_test.png\"), StandardCopyOption.REPLACE_EXISTING);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" LogsCenter.getLogger(Avatar.class).warning(\"placeholder image file missing\");"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":100,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":102,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls"},{"lineNumber":103,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":108}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s email in the address book."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Email {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" private static final String SPECIAL_CHARACTERS \u003d \"!#$%\u0026\u0027*+/\u003d?`{|}~^.-\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d \"Person emails should be of the format local-part@domain \""},{"lineNumber":14,"author":{"gitId":"-"},"content":" + \"and adhere to the following constraints:\\n\""},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"1. The local-part should only contain alphanumeric characters and these special characters, excluding \""},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the parentheses, (\" + SPECIAL_CHARACTERS + \") .\\n\""},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"2. This is followed by a \u0027@\u0027 and then a domain name. \""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"The domain name must:\\n\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \" - be at least 2 characters long\\n\""},{"lineNumber":20,"author":{"gitId":"-"},"content":" + \" - start and end with alphanumeric characters\\n\""},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \" - consist of alphanumeric characters, a period or a hyphen for the characters in between, if any.\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" // alphanumeric and special characters"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String LOCAL_PART_REGEX \u003d \"^[\\\\w\" + SPECIAL_CHARACTERS + \"]+\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String DOMAIN_FIRST_CHARACTER_REGEX \u003d \"[^\\\\W_]\"; // alphanumeric characters except underscore"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String DOMAIN_MIDDLE_REGEX \u003d \"[a-zA-Z0-9.-]*\"; // alphanumeric, period and hyphen"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String DOMAIN_LAST_CHARACTER_REGEX \u003d \"[^\\\\W_]$\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d LOCAL_PART_REGEX + \"@\""},{"lineNumber":28,"author":{"gitId":"-"},"content":" + DOMAIN_FIRST_CHARACTER_REGEX + DOMAIN_MIDDLE_REGEX + DOMAIN_LAST_CHARACTER_REGEX;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Constructs an {@code Email}."},{"lineNumber":35,"author":{"gitId":"-"},"content":" *"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @param email A valid email address."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public Email(String email) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" requireNonNull(email);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" checkArgument(isValidEmail(email), MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.value \u003d email;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" public Email(String email, boolean isPrivate) {"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" this(email);"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return test.matches(EMAIL_VALIDATION_REGEX);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Email\u003e\";"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":80,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls"},{"lineNumber":81,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":81}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Phone {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":18,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Constructs a {@code Phone}."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @param phone A valid phone number."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" requireNonNull(phone);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" checkArgument(isValidPhone(phone), MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" this.value \u003d phone;"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" public Phone(String phone, boolean isPrivate) {"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" this(phone);"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number."},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Phone\u003e\";"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":68}},{"path":"src/main/java/seedu/address/model/person/Rating.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s rating in the address book."},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRating(String)}"},{"lineNumber":11,"author":{"gitId":"-"},"content":" */"},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class Rating {"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_RATING_CONSTRAINTS \u003d"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Player\u0027s rating should be an integer from 0 - 5.\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String RATING_VALIDATION_REGEX \u003d \"[0-5]\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean isPrivate;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs an {@code Rating}."},{"lineNumber":24,"author":{"gitId":"-"},"content":" *"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param rating A valid rating."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Rating(String rating) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(rating);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidRating(rating), MESSAGE_RATING_CONSTRAINTS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.value \u003d rating;"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public Rating(String rating, boolean isPrivate) {"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this(rating);"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s rating."},{"lineNumber":40,"author":{"gitId":"-"},"content":" */"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static boolean isValidRating(String test) {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" return test.matches(RATING_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Rating\u003e\";"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void togglePrivacy() {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":68,"author":{"gitId":"-"},"content":" || (other instanceof Rating // instanceof handles nulls"},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Rating) other).value)); // state check"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":21,"-":56}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s remark in the address book."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is always valid}"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Remark {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_REMARK_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Remark can contain any values, can even be blank\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Constructs a {@code Remark}"},{"lineNumber":20,"author":{"gitId":"-"},"content":" *"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @param remark Any remark"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Remark(String remark) {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(remark);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.value \u003d remark;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" public Remark(String remark, boolean isPrivate) {"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" this(remark);"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Remarks\u003e\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof Remark // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":57}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collection;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.Comparator;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import java.util.Iterator;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations."},{"lineNumber":24,"author":{"gitId":"-"},"content":" *"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public boolean contains(Person toCheck) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Adds a person to the list."},{"lineNumber":42,"author":{"gitId":"-"},"content":" *"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void add(Person toAdd) throws DuplicatePersonException {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":" internalList.add(toAdd);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}."},{"lineNumber":55,"author":{"gitId":"-"},"content":" *"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list."},{"lineNumber":57,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":58,"author":{"gitId":"-"},"content":" */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void setPerson(Person target, Person editedPerson)"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" internalList.set(index, editedPerson);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list."},{"lineNumber":77,"author":{"gitId":"-"},"content":" *"},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":79,"author":{"gitId":"-"},"content":" */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public boolean remove(Person toRemove) throws PersonNotFoundException {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" requireAllNonNull(persons);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" for (final Person person : persons) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" replacement.add(person);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":" setPersons(replacement);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e asObservableList() {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(internalList);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" * Sorts players by selected field in asc or desc order."},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" * @return"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" public void sortBy(String field, String order) throws NoPlayerException {"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" if (internalList.size() \u003c 1) {"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" throw new NoPlayerException();"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);"},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e jerseyComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" return p1.getJerseyNumber().value.compareTo(p2.getJerseyNumber().value);"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e ratingComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" return p1.getRating().toString().compareTo(p2.getRating().toString());"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e posComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" return p1.getPosition().value.compareTo(p2.getPosition().value);"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e emailComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" return p1.getEmail().toString().compareTo(p2.getEmail().toString());"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e addressComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" return p1.getAddress().toString().compareTo(p2.getAddress().toString());"},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" switch (field) {"},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case \"name\":"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case \"jersey\":"},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d jerseyComparator;"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" case \"pos\":"},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d posComparator;"},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" case \"rating\":"},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d ratingComparator;"},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" case \"email\":"},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d emailComparator;"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" case \"address\":"},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d addressComparator;"},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":" switch (order) {"},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":"},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":"},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" //@@author"},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":208,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {"},{"lineNumber":209,"author":{"gitId":"-"},"content":" return internalList.iterator();"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":213,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":214,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":215,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls"},{"lineNumber":216,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":220,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":221,"author":{"gitId":"-"},"content":" return internalList.hashCode();"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":105,"-":118}},{"path":"src/main/java/seedu/address/model/person/exceptions/NoPlayerException.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.model.person.exceptions;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":" * Singals that the operation is unable to sort due to no players in book."},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"public class NoPlayerException extends Exception {"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":7}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Tag {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be a string\";"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_COLOUR_CONSTRAINTS \u003d \"Tag colours should be one of these colours:\""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" + \"teal, red, yellow, blue, orange, brown, green, pink, black, grey\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private static final String[] TAG_COLOR_STYLES \u003d"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" { \"teal\", \"red\", \"yellow\", \"blue\", \"orange\", \"brown\", \"green\", \"pink\", \"black\", \"grey\" };"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String tagName;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" private String tagColour;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs a {@code Tag}."},{"lineNumber":24,"author":{"gitId":"-"},"content":" *"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param tagName A valid tag name."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Tag(String tagName) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(tagName);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Overloaded constructor for a {@code Tag}."},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" * @param tagName A valid tag name"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" * @param tagColour A valid tag colour."},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" public Tag(String tagName, String tagColour) {"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" requireNonNull(tagName);"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" public String getTagName() {"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" return this.tagName;"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag name."},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagName(String test) {"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return test.matches(TAG_VALIDATION_REGEX);"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public String getTagColour() {"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" return this.tagColour;"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" * Changes the {@code tagColour} for {@code tagName}\u0027s label"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" public void changeTagColour(String colour) {"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d colour;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag colour."},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagColour(String testColour) {"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (String tcs : TAG_COLOR_STYLES) {"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (testColour.equals(tcs)) {"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" return true;"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" return false;"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":87,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls"},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":92,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" return tagName.hashCode();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"-"},"content":" * Format state as text for viewing."},{"lineNumber":98,"author":{"gitId":"-"},"content":" */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":54,"-":49}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class SampleDataUtil {"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new Person[] {"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Aaron Ramsey\"), new Phone(\"87438807\"), new Email(\"aramsey@example.com\"),"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), new Remark(\"Sign him for one more year\"),"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"),"},{"lineNumber":34,"author":{"gitId":"-"},"content":" getTagSet(\"redCard\"), new Rating(\"3\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":35,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Hector Moruno\"), new Phone(\"99272758\"), new Email(\"hectorm@example.com\"),"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cesc Fabregas\"), new Phone(\"93210283\"), new Email(\"cescfabregas@example.com\"),"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":42,"author":{"gitId":"-"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":43,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ospina\"), new Phone(\"99272758\"), new Email(\"Ospina@arsenal.com\"),"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"22\"),"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cech\"), new Phone(\"93210283\"), new Email(\"cech@arsenal.com\"),"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mertesacker\"), new Phone(\"95432223\"), new Email(\"mertesacker@arsenal.com\"),"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Koscielny\"), new Phone(\"92352021\"), new Email(\"koscielny@example.com\"),"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Holding\"), new Phone(\"92624417\"), new Email(\"holding@example.com\"),"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Monreal\"), new Phone(\"99272758\"), new Email(\"monreal@arsenal.com\"),"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mustafi\"), new Phone(\"93215483\"), new Email(\"mustafi@arsenal.com\"),"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"4\"),"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"91031282\"), new Email(\"chambers@arsenal.com\"),"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"92492021\"), new Email(\"chambers@arsenal.com\"),"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),"},{"lineNumber":89,"author":{"gitId":"-"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),"},{"lineNumber":90,"author":{"gitId":"-"},"content":" new TeamName(\"Chelsea\"), getTagSet(\"injured\"),"},{"lineNumber":91,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":92,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Irfan Fandi\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":96,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":97,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mavropanos\"), new Phone(\"92624417\"), new Email(\"mavropanos@arsenal.com\"),"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"98\"),"},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Kolasinac\"), new Phone(\"99272758\"), new Email(\"kolasinac@arsenal.com\"),"},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"2\"), new JerseyNumber(\"52\"),"},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mkhitaryan\"), new Phone(\"93210283\"), new Email(\"mkhitaryan@arsenal.com\"),"},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Wilshere\"), new Phone(\"95432223\"), new Email(\"wilshere@arsenal.com\"),"},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),"},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),"},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),"},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ozil\"), new Phone(\"92352021\"), new Email(\"ozil@example.com\"),"},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Xhaka\"), new Phone(\"92624417\"), new Email(\"xhaka@example.com\"),"},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),"},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" };"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":129,"author":{"gitId":"-"},"content":" public static Team[] getSampleTeams() {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" return new Team[] {"},{"lineNumber":131,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Arsenal\")),"},{"lineNumber":132,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Chelsea\"))"},{"lineNumber":133,"author":{"gitId":"-"},"content":" };"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {"},{"lineNumber":138,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();"},{"lineNumber":140,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":141,"author":{"gitId":"-"},"content":" for (Team sampleTeam : getSampleTeams()) {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" sampleAb.createTeam(sampleTeam);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":145,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);"},{"lineNumber":147,"author":{"gitId":"-"},"content":" sampleAb.addPersonToTeam(samplePerson, samplePerson.getTeamName());"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }"},{"lineNumber":149,"author":{"gitId":"-"},"content":" return sampleAb;"},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);"},{"lineNumber":152,"author":{"gitId":"codeeong"},"content":" } catch (DuplicateTeamException e) {"},{"lineNumber":153,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\" sample data cannot contain duplicate teams\", e);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given."},{"lineNumber":159,"author":{"gitId":"-"},"content":" */"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" for (String s : strings) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));"},{"lineNumber":164,"author":{"gitId":"-"},"content":" }"},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":86,"-":83}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Person\u0027s %s field is missing!\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String name;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private String phone;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Boolean phonePrivacy;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private String email;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Boolean emailPrivacy;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private String address;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Boolean addressPrivacy;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private String remark;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Boolean remarkPrivacy;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private String teamName;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private String rating;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" private Boolean ratingPrivacy;"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":57,"author":{"gitId":"-"},"content":" private String position;"},{"lineNumber":58,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private String jerseyNumber;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private String avatar;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":64,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson."},{"lineNumber":68,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"-"},"content":" * Constructs an {@code XmlAdaptedPerson} with the given person details."},{"lineNumber":74,"author":{"gitId":"-"},"content":" */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(String name, String phone, String email, String address, List\u003cXmlAdaptedTag\u003e tagged) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" this.name \u003d name;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.phone \u003d phone;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.email \u003d email;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.address \u003d address;"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.remarkPrivacy \u003d false;"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.phonePrivacy \u003d false;"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" this.addressPrivacy \u003d false;"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" this.emailPrivacy \u003d false;"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" if (tagged !\u003d null) {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" this.tagged \u003d new ArrayList\u003c\u003e(tagged);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Converts a given Person into this class for JAXB use."},{"lineNumber":93,"author":{"gitId":"-"},"content":" *"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson"},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(Person source) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" name \u003d source.getName().fullName;"},{"lineNumber":98,"author":{"gitId":"-"},"content":" phone \u003d source.getPhone().value;"},{"lineNumber":99,"author":{"gitId":"-"},"content":" email \u003d source.getEmail().value;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" address \u003d source.getAddress().value;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" remark \u003d source.getRemark().value;"},{"lineNumber":102,"author":{"gitId":"-"},"content":" teamName \u003d source.getTeamName().fullName;"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" phonePrivacy \u003d source.getPhone().isPrivate();"},{"lineNumber":105,"author":{"gitId":"-"},"content":" emailPrivacy \u003d source.getEmail().isPrivate();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" addressPrivacy \u003d source.getAddress().isPrivate();"},{"lineNumber":107,"author":{"gitId":"-"},"content":" remarkPrivacy \u003d source.getRemark().isPrivate();"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d source.getRating().isPrivate();"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":111,"author":{"gitId":"-"},"content":" rating \u003d source.getRating().value;"},{"lineNumber":112,"author":{"gitId":"-"},"content":" position \u003d source.getPosition().value;"},{"lineNumber":113,"author":{"gitId":"-"},"content":" jerseyNumber \u003d source.getJerseyNumber().value;"},{"lineNumber":114,"author":{"gitId":"-"},"content":" avatar \u003d source.getAvatar().getValue();"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" for (Tag tag : source.getTags()) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" tagged.add(new XmlAdaptedTag(tag));"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object."},{"lineNumber":123,"author":{"gitId":"-"},"content":" *"},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":125,"author":{"gitId":"-"},"content":" */"},{"lineNumber":126,"author":{"gitId":"-"},"content":" public Person toModelType() throws IllegalValueException {"},{"lineNumber":127,"author":{"gitId":"-"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":128,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag tag : tagged) {"},{"lineNumber":129,"author":{"gitId":"-"},"content":" personTags.add(tag.toModelType());"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" if (phonePrivacy \u003d\u003d null) {"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" phonePrivacy \u003d false;"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" if (emailPrivacy \u003d\u003d null) {"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" emailPrivacy \u003d false;"},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" if (addressPrivacy \u003d\u003d null) {"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" addressPrivacy \u003d false;"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" if (remarkPrivacy \u003d\u003d null) {"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" remarkPrivacy \u003d false;"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" if (ratingPrivacy \u003d\u003d null) {"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d false;"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" if (this.name \u003d\u003d null) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName()));"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":" if (!Name.isValidName(this.name)) {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":" final Name name \u003d new Name(this.name);"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" if (this.phone \u003d\u003d null) {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName()));"},{"lineNumber":162,"author":{"gitId":"-"},"content":" }"},{"lineNumber":163,"author":{"gitId":"-"},"content":" if (!Phone.isValidPhone(this.phone)) {"},{"lineNumber":164,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" final Phone phone \u003d new Phone(this.phone, this.phonePrivacy);"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" if (this.email \u003d\u003d null) {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName()));"},{"lineNumber":170,"author":{"gitId":"-"},"content":" }"},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (!Email.isValidEmail(this.email)) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" final Email email \u003d new Email(this.email, this.emailPrivacy);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" if (this.address \u003d\u003d null) {"},{"lineNumber":177,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName()));"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":" if (!Address.isValidAddress(this.address)) {"},{"lineNumber":180,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Address.MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" final Address address \u003d new Address(this.address, this.addressPrivacy);"},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkPrivacy);"},{"lineNumber":185,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" if (this.rating \u003d\u003d null) {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Rating.class.getSimpleName()));"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":" if (!Rating.isValidRating(this.rating)) {"},{"lineNumber":193,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Rating.MESSAGE_RATING_CONSTRAINTS);"},{"lineNumber":194,"author":{"gitId":"-"},"content":" }"},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" final Rating rating \u003d new Rating(this.rating, this.ratingPrivacy);"},{"lineNumber":196,"author":{"gitId":"-"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":" if (this.position \u003d\u003d null) {"},{"lineNumber":198,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":199,"author":{"gitId":"-"},"content":" Position.class.getSimpleName()));"},{"lineNumber":200,"author":{"gitId":"-"},"content":" }"},{"lineNumber":201,"author":{"gitId":"-"},"content":" if (!Position.isValidPosition(this.position)) {"},{"lineNumber":202,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Position.MESSAGE_POSITION_CONSTRAINTS);"},{"lineNumber":203,"author":{"gitId":"-"},"content":" }"},{"lineNumber":204,"author":{"gitId":"-"},"content":" final Position position \u003d new Position(this.position);"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (this.jerseyNumber \u003d\u003d null) {"},{"lineNumber":207,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":208,"author":{"gitId":"-"},"content":" JerseyNumber.class.getSimpleName()));"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"-"},"content":" if (!JerseyNumber.isValidJerseyNumber(this.jerseyNumber)) {"},{"lineNumber":211,"author":{"gitId":"-"},"content":" throw new IllegalValueException(JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);"},{"lineNumber":212,"author":{"gitId":"-"},"content":" }"},{"lineNumber":213,"author":{"gitId":"-"},"content":" final JerseyNumber jerseyNumber \u003d new JerseyNumber(this.jerseyNumber);"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" if (this.avatar \u003d\u003d null) {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":217,"author":{"gitId":"-"},"content":" Avatar.class.getSimpleName()));"},{"lineNumber":218,"author":{"gitId":"-"},"content":" }"},{"lineNumber":219,"author":{"gitId":"-"},"content":" if (!Avatar.isValidAvatar(this.avatar)) {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Avatar.MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);"},{"lineNumber":223,"author":{"gitId":"-"},"content":" return new Person(name, phone, email, address, remark, teamName, tags, rating, position, jerseyNumber, avatar);"},{"lineNumber":224,"author":{"gitId":"-"},"content":" }"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":227,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":228,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":229,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedPerson)) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }"},{"lineNumber":235,"author":{"gitId":"-"},"content":""},{"lineNumber":236,"author":{"gitId":"-"},"content":" XmlAdaptedPerson otherPerson \u003d (XmlAdaptedPerson) other;"},{"lineNumber":237,"author":{"gitId":"-"},"content":" return Objects.equals(name, otherPerson.name)"},{"lineNumber":238,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(phone, otherPerson.phone)"},{"lineNumber":239,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(email, otherPerson.email)"},{"lineNumber":240,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(address, otherPerson.address)"},{"lineNumber":241,"author":{"gitId":"-"},"content":" \u0026\u0026 tagged.equals(otherPerson.tagged);"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }"},{"lineNumber":243,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":34,"-":209}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Tag."},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class XmlAdaptedTag {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @XmlElement"},{"lineNumber":14,"author":{"gitId":"-"},"content":" private String tagName;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" @XmlElement"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String tagColour;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedTag."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public XmlAdaptedTag() {}"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName}."},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(String tagName) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName} and {@code tagColour}."},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTag(String tagName, String tagColour) {"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Converts a given Tag into this class for JAXB use."},{"lineNumber":45,"author":{"gitId":"-"},"content":" *"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created"},{"lineNumber":47,"author":{"gitId":"-"},"content":" */"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(Tag source) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" tagName \u003d source.tagName;"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" tagColour \u003d source.getTagColour();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Tag object."},{"lineNumber":55,"author":{"gitId":"-"},"content":" *"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public Tag toModelType() throws IllegalValueException {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (!Tag.isValidTagName(tagName)) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" if (!Tag.isValidTagColour(tagColour)) {"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_COLOUR_CONSTRAINTS);"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" return new Tag(tagName, tagColour);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedTag)) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" return tagName.equals(((XmlAdaptedTag) other).tagName);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":22,"-":59}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTeam.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Team"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class XmlAdaptedTeam {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Team\u0027s %s field is missing!\";"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private String teamName;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" * Constructs an XmlAdaptedTeam."},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam() {}"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTeam} with the given {@code teamName}."},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public XmlAdaptedTeam(String teamName, List\u003cXmlAdaptedPerson\u003e persons) {"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (persons !\u003d null) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.players \u003d new ArrayList\u003c\u003e(persons);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" * Converts a given Team into this class for JAXB use."},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTeam"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam(Team source) {"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" teamName \u003d source.getTeamName().toString();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" players \u003d new ArrayList\u003c\u003e();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" for (Person person : source.getTeamPlayers()) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" players.add(new XmlAdaptedPerson(person));"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Team object."},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" public Team toModelType() throws IllegalValueException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" if (this.teamName \u003d\u003d null) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new IllegalValueException((String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":64,"author":{"gitId":"-"},"content":" TeamName.class.getSimpleName())));"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" if (!TeamName.isValidName(this.teamName)) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" throw new IllegalValueException(TeamName.MESSAGE_TEAM_NAME_CONSTRAINTS);"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" final List\u003cPerson\u003e teamPlayers \u003d new ArrayList\u003c\u003e();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson player : players) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" teamPlayers.add(player.toModelType());"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" return new Team(teamName, teamPlayers);"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" return true;"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" if (!(other instanceof XmlAdaptedTeam)) {"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" return false;"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":" XmlAdaptedTeam otherTeam \u003d (XmlAdaptedTeam) other;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return Objects.equals(teamName, otherTeam.teamName)"},{"lineNumber":90,"author":{"gitId":"-"},"content":" \u0026\u0026 players.equals(otherTeam.players);"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":60,"-":33}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":3,"author":{"gitId":"-"},"content":""},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format"},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTeam\u003e teams;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":27,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook."},{"lineNumber":32,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling."},{"lineNumber":33,"author":{"gitId":"-"},"content":" */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":37,"author":{"gitId":"-"},"content":" teams \u003d new ArrayList\u003c\u003e();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Conversion"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" /** @@author Codee */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));"},{"lineNumber":48,"author":{"gitId":"-"},"content":" teams.addAll(src.getTeamList().stream().map(XmlAdaptedTeam::new).collect(Collectors.toList()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Converts this addressbook into the model\u0027s {@code AddressBook} object."},{"lineNumber":53,"author":{"gitId":"-"},"content":" *"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated or duplicates in the"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * {@code XmlAdaptedPerson} or {@code XmlAdaptedTag}."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook toModelType() throws IllegalValueException {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBook();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag t : tags) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" addressBook.addTag(t.toModelType());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson p : persons) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" addressBook.addPerson(p.toModelType());"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":" for (XmlAdaptedTeam tm : teams) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" addressBook.createTeam(tm.toModelType());"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlSerializableAddressBook)) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook otherAb \u003d (XmlSerializableAddressBook) other;"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return persons.equals(otherAb.persons) \u0026\u0026 tags.equals(otherAb.tags) \u0026\u0026 teams.equals(otherAb.teams);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":83}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Menu;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.Image;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.ImageView;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.VBox;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed."},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cStage\u003e {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private static String currentTheme \u003d \"view/DarkTheme.css\";"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" private Stage primaryStage;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HelpWindow helpWindow;"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" private Menu mtmLogo;"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":62,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" private StackPane teamDisplayPlaceholder;"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" private VBox mainWindow;"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" super(FXML, primaryStage);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // Set dependencies"},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // Configure the UI"},{"lineNumber":83,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());"},{"lineNumber":84,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" setAccelerators();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return primaryStage;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void setAccelerators() {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem."},{"lineNumber":100,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator"},{"lineNumber":101,"author":{"gitId":"-"},"content":" */"},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":106,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666"},{"lineNumber":108,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK."},{"lineNumber":109,"author":{"gitId":"-"},"content":" *"},{"lineNumber":110,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and"},{"lineNumber":112,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * the TextInputControl(s)."},{"lineNumber":115,"author":{"gitId":"-"},"content":" *"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay."},{"lineNumber":119,"author":{"gitId":"-"},"content":" */"},{"lineNumber":120,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());"},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.consume();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":" });"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window."},{"lineNumber":130,"author":{"gitId":"-"},"content":" */"},{"lineNumber":131,"author":{"gitId":"-"},"content":" void fillInnerParts() {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":133,"author":{"gitId":"-"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();"},{"lineNumber":134,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(currentTheme);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(\"view/Extensions.css\");"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" final Image image \u003d new Image(\"images/MyTeamManagerLogo.png\", true);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" mtmLogo.setGraphic(new ImageView(image));"},{"lineNumber":139,"author":{"gitId":"-"},"content":" mtmLogo.setDisable(true);"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":142,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());"},{"lineNumber":143,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();"},{"lineNumber":146,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"codeeong"},"content":" TeamDisplay teamDisplay \u003d new TeamDisplay(logic.getInitTeamList());"},{"lineNumber":149,"author":{"gitId":"codeeong"},"content":" teamDisplayPlaceholder.getChildren().add(teamDisplay.getRoot());"},{"lineNumber":150,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(prefs.getAddressBookFilePath());"},{"lineNumber":152,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" void hide() {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" primaryStage.hide();"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);"},{"lineNumber":164,"author":{"gitId":"-"},"content":" }"},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":167,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences."},{"lineNumber":168,"author":{"gitId":"-"},"content":" */"},{"lineNumber":169,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {"},{"lineNumber":170,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());"},{"lineNumber":171,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());"},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" * @returns the {@code currentTheme}."},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":" public static String getCurrentTheme() {"},{"lineNumber":183,"author":{"gitId":"codeeong"},"content":" return currentTheme;"},{"lineNumber":184,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" public void handleChangeThemeRequestEvent(ChangeThemeEvent event) throws CommandException {"},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().remove(currentTheme);"},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" prefs.setAddressBookTheme(event.theme + \"Theme.css\");"},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();"},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().add(currentTheme);"},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":194,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":197,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window."},{"lineNumber":198,"author":{"gitId":"-"},"content":" */"},{"lineNumber":199,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {"},{"lineNumber":200,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),"},{"lineNumber":201,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());"},{"lineNumber":202,"author":{"gitId":"-"},"content":" }"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":205,"author":{"gitId":"-"},"content":" * Opens the help window."},{"lineNumber":206,"author":{"gitId":"-"},"content":" */"},{"lineNumber":207,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":208,"author":{"gitId":"-"},"content":" public void handleHelp() {"},{"lineNumber":209,"author":{"gitId":"-"},"content":" if (helpWindow \u003d\u003d null) {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" helpWindow \u003d new HelpWindow();"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":" helpWindow.show();"},{"lineNumber":213,"author":{"gitId":"-"},"content":" }"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" void show() {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" primaryStage.show();"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":220,"author":{"gitId":"-"},"content":" * Closes the application."},{"lineNumber":221,"author":{"gitId":"-"},"content":" */"},{"lineNumber":222,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":223,"author":{"gitId":"-"},"content":" private void handleExit() {"},{"lineNumber":224,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());"},{"lineNumber":225,"author":{"gitId":"-"},"content":" }"},{"lineNumber":226,"author":{"gitId":"-"},"content":""},{"lineNumber":227,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {"},{"lineNumber":228,"author":{"gitId":"-"},"content":" return this.personListPanel;"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":232,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":234,"author":{"gitId":"-"},"content":" handleHelp();"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }"},{"lineNumber":236,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":35,"-":201}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.Iterator;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.logging.Logger;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.scene.paint.ImagePattern;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.scene.shape.Circle;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":34,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":36,"author":{"gitId":"-"},"content":" *"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public final Person person;"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonCard.class);"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private HBox cardPane;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private Label name;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private Label id;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"-"},"content":" private Label teamName;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":52,"author":{"gitId":"-"},"content":" private FlowPane tags;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Label rating;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private Label position;"},{"lineNumber":57,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":58,"author":{"gitId":"-"},"content":" private Label jerseyNumber;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Circle avatar;"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" public PersonCard(Person person, int displayedIndex) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":66,"author":{"gitId":"-"},"content":" name.setText(person.getName().fullName);"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" rating.setText(person.getRating().toString());"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" rating.setText(person.getRating().value);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" teamName.setText(person.getTeamName().fullName);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" position.setText(person.getPosition().getPositionName());"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" initTags(person);"},{"lineNumber":75,"author":{"gitId":"-"},"content":" setContactImage(person.getAvatar().getValue());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void setContactImage(String path) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" Image img \u003d null;"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (new File(path).isFile()) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" img \u003d new Image(new File(path).toURI().toURL().toString());"},{"lineNumber":86,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":" } catch (MalformedURLException e) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":" avatar.setVisible(true);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" avatar.setFill(new ImagePattern(img));"},{"lineNumber":94,"author":{"gitId":"-"},"content":" avatar.setVisible(true);"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}."},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" private void initTags(Person person) {"},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" person.getTags().forEach(tag -\u003e {"},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" Label tagLabel \u003d new Label(tag.getTagName());"},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" tagLabel.getStyleClass().add(tag.getTagColour());"},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(tagLabel);"},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" });"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":117,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":122,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":124,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" public void handleColourChangeEvent(ChangeTagColourEvent event) {"},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":131,"author":{"gitId":"codeeong"},"content":" Set\u003cTag\u003e tagSet \u003d person.getTags();"},{"lineNumber":132,"author":{"gitId":"codeeong"},"content":" int i \u003d 0;"},{"lineNumber":133,"author":{"gitId":"codeeong"},"content":" for (Iterator\u003cTag\u003e it \u003d tagSet.iterator(); it.hasNext();) {"},{"lineNumber":134,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d it.next();"},{"lineNumber":135,"author":{"gitId":"codeeong"},"content":" if (tag.getTagName().equals(event.tagName)) {"},{"lineNumber":136,"author":{"gitId":"codeeong"},"content":" tags.getChildren().remove(i);"},{"lineNumber":137,"author":{"gitId":"codeeong"},"content":" Label newTagLabel \u003d new Label(event.tagName);"},{"lineNumber":138,"author":{"gitId":"codeeong"},"content":" newTagLabel.getStyleClass().add(event.tagColour);"},{"lineNumber":139,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(i, newTagLabel);"},{"lineNumber":140,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":141,"author":{"gitId":"codeeong"},"content":" i++;"},{"lineNumber":142,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":143,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":5,"codeeong":42,"-":97}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Panel containing the list of persons."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private PlayerDetails playerDetails;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Integer selectedCardIndex;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private StackPane playerDetailsPlaceholder;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cPerson\u003e personList) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" setConnections(personList);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cPerson\u003e personList) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map("},{"lineNumber":46,"author":{"gitId":"-"},"content":" personList, (person) -\u003e new PersonCard(person, personList.indexOf(person) + 1));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());"},{"lineNumber":49,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().clear();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" playerDetails \u003d new PlayerDetails(newValue.person);"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" });"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it."},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" this.selectedCardIndex \u003d index;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" });"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":79,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":84,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedNoParamEvent(PersonDetailsChangedNoParamEvent event) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":86,"author":{"gitId":"-"},"content":" PersonCard newPersonCard \u003d personListView.getItems().get(selectedCardIndex);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().clear();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" playerDetails \u003d new PlayerDetails(newPersonCard.person);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":" //@author"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}."},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" setGraphic(null);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" setText(null);"},{"lineNumber":105,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":12,"-":98}},{"path":"src/main/java/seedu/address/ui/PlayerDetails.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" * The Browser Panel of the App."},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public final Person person;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Person personBeforeChange;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private HBox cardPane;"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private Label name;"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" private Label phone;"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" private Label address;"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private Label email;"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private Label jerseyNumber;"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" private Label remark;"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public PlayerDetails(Person person) {"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" super(FXML);"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" this.person \u003d person;"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" name.setText(person.getName().fullName);"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" jerseyNumber.setText(\"Jersey Number: \" + person.getJerseyNumber().value);"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().toString());"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().value);"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().toString());"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().value);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().toString());"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().value);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().toString());"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().value);"},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" personBeforeChange \u003d this.person;"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":83,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (event.getPerson().getName().fullName.equals(person.getName().fullName)) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" name.setText((event.getPerson().getName().toString()));"},{"lineNumber":86,"author":{"gitId":"-"},"content":" phone.setText(event.getPerson().getPhone().toString());"},{"lineNumber":87,"author":{"gitId":"-"},"content":" jerseyNumber.setText(\"Jersey Number: \" + event.getPerson().getJerseyNumber().toString());"},{"lineNumber":88,"author":{"gitId":"-"},"content":" address.setText(event.getPerson().getAddress().toString());"},{"lineNumber":89,"author":{"gitId":"-"},"content":" email.setText(event.getPerson().getEmail().toString());"},{"lineNumber":90,"author":{"gitId":"-"},"content":" remark.setText(\"Remarks: \" + event.getPerson().getRemark().toString());"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":"}"},{"lineNumber":94,"author":{"gitId":"-"},"content":""}],"authorContributionMap":{"lohtianwei":34,"codeeong":46,"-":14}},{"path":"src/main/java/seedu/address/ui/TeamDisplay.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * A ui for displaying the team currently chosen"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(TeamDisplay.class);"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private FlowPane teams;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public TeamDisplay(ObservableList\u003cTeam\u003e teamList) {"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" super(FXML);"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.teamList \u003d teamList;"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" initTeams();"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" getTeams();"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}."},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void initTeams() {"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" for (Team t: this.teamList) {"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" Label teamLabel \u003d new Label(t.getTeamName().toString());"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" teamLabel.setStyle(\"-fx-text-fill: #3f7bbf\");"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(teamLabel);"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" teams.setHgap(10);"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e listOfTeams \u003d FXCollections.observableArrayList();"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" for (Team t: teamList) {"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" listOfTeams.add(t.getTeamName().toString());"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return listOfTeams;"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(newTeamLabel);"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (event.teamName.equals(teamList.get(i).getTeamName().toString())) {"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass().add(\"selected\");"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleRemoveSelectedTeamEvent(RemoveSelectedTeamEvent event) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":103,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c teams.getChildren().size(); i++) {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" if (teamList.get(i).getTeamName().equals(event.teamName)) {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" teams.getChildren().remove(i);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" private void handleClearTeamsEvent(ClearTeamsEvent event) {"},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();"},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" private void handleUndoTeamsEvent(UndoTeamsEvent event) {"},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();"},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" initTeams();"},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" getTeams();"},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":109,"-":15}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private static final String ICON_APPLICATION \u003d \"/images/football.png\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" //Set the application icon."},{"lineNumber":52,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (Throwable e) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));"},{"lineNumber":61,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" mainWindow.hide();"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters."},{"lineNumber":86,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog."},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,"},{"lineNumber":89,"author":{"gitId":"-"},"content":" String contentText) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");"},{"lineNumber":92,"author":{"gitId":"-"},"content":" alert.initOwner(owner);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" alert.setTitle(title);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.showAndWait();"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));"},{"lineNumber":106,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":108,"author":{"gitId":"-"},"content":" System.exit(1);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":116,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,"},{"lineNumber":117,"author":{"gitId":"-"},"content":" event.exception);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/guitests/guihandles/MainWindowHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Provides a handle for {@code MainWindow}."},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class MainWindowHandle extends StageHandle {"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":" private final PersonListPanelHandle personListPanel;"},{"lineNumber":11,"author":{"gitId":"-"},"content":" private final ResultDisplayHandle resultDisplay;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" private final TeamDisplayHandle teamDisplayBar;"},{"lineNumber":13,"author":{"gitId":"-"},"content":" private final CommandBoxHandle commandBox;"},{"lineNumber":14,"author":{"gitId":"-"},"content":" private final StatusBarFooterHandle statusBarFooter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private final MainMenuHandle mainMenu;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public MainWindowHandle(Stage stage) {"},{"lineNumber":18,"author":{"gitId":"-"},"content":" super(stage);"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanelHandle(getChildNode(PersonListPanelHandle.PERSON_LIST_VIEW_ID));"},{"lineNumber":21,"author":{"gitId":"-"},"content":" resultDisplay \u003d new ResultDisplayHandle(getChildNode(ResultDisplayHandle.RESULT_DISPLAY_ID));"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" teamDisplayBar \u003d new TeamDisplayHandle(getChildNode(TeamDisplayHandle.TEAM_DISPLAY_ID));"},{"lineNumber":23,"author":{"gitId":"-"},"content":" commandBox \u003d new CommandBoxHandle(getChildNode(CommandBoxHandle.COMMAND_INPUT_FIELD_ID));"},{"lineNumber":24,"author":{"gitId":"-"},"content":" statusBarFooter \u003d new StatusBarFooterHandle(getChildNode(StatusBarFooterHandle.STATUS_BAR_PLACEHOLDER));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" mainMenu \u003d new MainMenuHandle(getChildNode(MainMenuHandle.MENU_BAR_ID));"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return personListPanel;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return resultDisplay;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return commandBox;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return statusBarFooter;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return mainMenu;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":46}},{"path":"src/test/java/guitests/guihandles/PersonCardHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.scene.Node;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Provides a handle to a person card in the person list panel."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class PersonCardHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String TAGS_FIELD_ID \u003d \"#tags\";"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private static final String RATING_FIELD_ID \u003d \"#rating\";"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private static final String POSITION_FIELD_ID \u003d \"#position\";"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String TEAMNAME_FIELD_ID \u003d \"#teamName\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label idLabel;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label nameLabel;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private final Label positionLabel;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private final Label ratingLabel;"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final Label teamNameLabel;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final List\u003cLabel\u003e tagLabels;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public PersonCardHandle(Node cardNode) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super(cardNode);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" this.positionLabel \u003d getChildNode(POSITION_FIELD_ID);"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" this.ratingLabel \u003d getChildNode(RATING_FIELD_ID);"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" this.teamNameLabel \u003d getChildNode(TEAMNAME_FIELD_ID);"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" Region tagsContainer \u003d getChildNode(TAGS_FIELD_ID);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.tagLabels \u003d tagsContainer"},{"lineNumber":40,"author":{"gitId":"-"},"content":" .getChildrenUnmodifiable()"},{"lineNumber":41,"author":{"gitId":"-"},"content":" .stream()"},{"lineNumber":42,"author":{"gitId":"-"},"content":" .map(Label.class::cast)"},{"lineNumber":43,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String getId() {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" return idLabel.getText();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String getName() {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return nameLabel.getText();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public String getPosition() {"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return positionLabel.getText();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public String getRating() {"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return ratingLabel.getText();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" public String getTeamName() {"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return teamNameLabel.getText();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" public List\u003cString\u003e getTags() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" return tagLabels"},{"lineNumber":68,"author":{"gitId":"-"},"content":" .stream()"},{"lineNumber":69,"author":{"gitId":"-"},"content":" .map(Label::getText)"},{"lineNumber":70,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTagStyleClasses(String tag) {"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" return tagLabels"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" .stream()"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" .filter(label -\u003e label.getText().equals(tag))"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" .map(Label::getStyleClass)"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" .findFirst()"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" .orElseThrow(() -\u003e new IllegalArgumentException(\"No such tag.\"));"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":25,"-":56}},{"path":"src/test/java/guitests/guihandles/PlayerDetailsHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Provides a handle to a player details pane."},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class PlayerDetailsHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String PLAYER_DETAILS_DISPLAY_ID \u003d \"#playerDetails\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String JERSEY_FIELD_ID \u003d \"#jerseyNumber\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String PHONE_FIELD_ID \u003d \"#phone\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" private static final String EMAIL_FIELD_ID \u003d \"#email\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String ADDRESS_FIELD_ID \u003d \"#address\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String REMARK_FIELD_ID \u003d \"#remark\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label nameLabel;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label jerseyLabel;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private final Label addressLabel;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Label phoneLabel;"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final Label emailLabel;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final Label remarkLabel;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PlayerDetailsHandle(Node cardNode) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" super(cardNode);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.phoneLabel \u003d getChildNode(PHONE_FIELD_ID);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.addressLabel \u003d getChildNode(ADDRESS_FIELD_ID);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.emailLabel \u003d getChildNode(EMAIL_FIELD_ID);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.remarkLabel \u003d getChildNode(REMARK_FIELD_ID);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.jerseyLabel \u003d getChildNode(JERSEY_FIELD_ID);"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getPhone() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return phoneLabel.getText();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public String getName() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return nameLabel.getText();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddress() {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressLabel.getText();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public String getJerseyNumber() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return jerseyLabel.getText().substring(15);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getRemarks() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return remarkLabel.getText().substring(9);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" public String getEmail() {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return emailLabel.getText();"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":8,"-":56}},{"path":"src/test/java/guitests/guihandles/TeamDisplayHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Collectors;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" * Provides a handle for {@code TeamDisplayHandle} containing the list of {@code Teams}."},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String TEAM_DISPLAY_ID \u003d \"#teams\";"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private final List\u003cLabel\u003e teamLabels;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public TeamDisplayHandle(Node teamDisplayNode) {"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" super(teamDisplayNode);"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" Region teamContainer \u003d getChildNode(TEAM_DISPLAY_ID);"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" this.teamLabels \u003d teamContainer"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" .getChildrenUnmodifiable()"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" .stream()"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" .map(Label.class::cast)"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" return teamLabels"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" .stream()"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" .map(Label::getText)"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":37}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" String defaultConfigAsString \u003d \"App title : My Team Manager\\n\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/XmlUtilTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javax.xml.bind.JAXBException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedTag;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlSerializableAddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TestUtil;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class XmlUtilTest {"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"src/test/data/XmlUtilTest/\");"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private static final File EMPTY_FILE \u003d new File(TEST_DATA_FOLDER + \"empty.xml\");"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final File MISSING_FILE \u003d new File(TEST_DATA_FOLDER + \"missing.xml\");"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final File VALID_FILE \u003d new File(TEST_DATA_FOLDER + \"validAddressBook.xml\");"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final File MISSING_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"missingPersonField.xml\");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final File INVALID_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"invalidPersonField.xml\");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private static final File VALID_PERSON_FILE \u003d new File(TEST_DATA_FOLDER + \"validPerson.xml\");"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final File TEMP_FILE \u003d new File(TestUtil.getFilePathInSandboxFolder(\"tempAddressBook.xml\"));"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"9482asf424\";"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Hans Muster\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"9482424\";"},{"lineNumber":40,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"hans@example\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"4th street\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final List\u003cXmlAdaptedTag\u003e VALID_TAGS \u003d Collections.singletonList(new XmlAdaptedTag(\"friends\"));"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullFile_throwsNullPointerException() throws Exception {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(null, AddressBook.class);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullClass_throwsNullPointerException() throws Exception {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(VALID_FILE, null);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void getDataFromFile_missingFile_fileNotFoundException() throws Exception {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(MISSING_FILE, AddressBook.class);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void getDataFromFile_emptyFile_dataFormatMismatchException() throws Exception {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" thrown.expect(JAXBException.class);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(EMPTY_FILE, AddressBook.class);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void getDataFromFile_validFile_validResult() throws Exception {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook dataFromFile \u003d XmlUtil.getDataFromFile(VALID_FILE, XmlSerializableAddressBook.class).toModelType();"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" assertEquals(0, dataFromFile.getTeamList().size());"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertEquals(0, dataFromFile.getTagList().size());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithMissingPersonField_validResult() throws Exception {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile("},{"lineNumber":81,"author":{"gitId":"-"},"content":" MISSING_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson("},{"lineNumber":83,"author":{"gitId":"-"},"content":" null, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithInvalidPersonField_validResult() throws Exception {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile("},{"lineNumber":90,"author":{"gitId":"-"},"content":" INVALID_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson("},{"lineNumber":92,"author":{"gitId":"-"},"content":" VALID_NAME, INVALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithValidPerson_validResult() throws Exception {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile("},{"lineNumber":99,"author":{"gitId":"-"},"content":" VALID_PERSON_FILE, XmlAdaptedPersonWithRootElement.class);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson("},{"lineNumber":101,"author":{"gitId":"-"},"content":" VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullFile_throwsNullPointerException() throws Exception {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(null, new AddressBook());"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullClass_throwsNullPointerException() throws Exception {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":114,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(VALID_FILE, null);"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":118,"author":{"gitId":"-"},"content":" public void saveDataToFile_missingFile_fileNotFoundException() throws Exception {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(MISSING_FILE, new AddressBook());"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void saveDataToFile_validFile_dataSaved() throws Exception {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" TEMP_FILE.createNewFile();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataToWrite \u003d new XmlSerializableAddressBook(new AddressBook());"},{"lineNumber":127,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" AddressBookBuilder builder \u003d new AddressBookBuilder(new AddressBook());"},{"lineNumber":132,"author":{"gitId":"-"},"content":" dataToWrite \u003d new XmlSerializableAddressBook("},{"lineNumber":133,"author":{"gitId":"-"},"content":" builder.withPerson(new PersonBuilder().build()).withTag(\"Friends\").build());"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);"},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Test class annotated with {@code XmlRootElement} to allow unmarshalling of .xml data to {@code XmlAdaptedPerson}"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * objects."},{"lineNumber":143,"author":{"gitId":"-"},"content":" */"},{"lineNumber":144,"author":{"gitId":"-"},"content":" @XmlRootElement(name \u003d \"person\")"},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static class XmlAdaptedPersonWithRootElement extends XmlAdaptedPerson {}"},{"lineNumber":146,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":145}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddCommandTest {"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void constructor_nullPerson_throwsNullPointerException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" new AddCommand(null);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" ModelStub modelStub \u003d new ModelStubThrowingDuplicatePersonException();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person."},{"lineNumber":94,"author":{"gitId":"-"},"content":" */"},{"lineNumber":95,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":98,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {"},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" return false;"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return null;"},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":143,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":145,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void deletePerson(Person target) throws PersonNotFoundException {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":151,"author":{"gitId":"-"},"content":" }"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":154,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":155,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":162,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":166,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {"},{"lineNumber":167,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":168,"author":{"gitId":"codeeong"},"content":" return null;"},{"lineNumber":169,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":170,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":172,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" fail(\"This method should not be called\");"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {"},{"lineNumber":183,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }"},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void createTeam(Team team) {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" fail(\"This method should not be be called.\");"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":192,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":193,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":194,"author":{"gitId":"-"},"content":" }"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":197,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {"},{"lineNumber":198,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"codeeong"},"content":" public boolean setTagColour(Tag tag, String colour) {"},{"lineNumber":213,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":214,"author":{"gitId":"codeeong"},"content":" return false;"},{"lineNumber":215,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":216,"author":{"gitId":"-"},"content":" }"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":219,"author":{"gitId":"-"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person."},{"lineNumber":220,"author":{"gitId":"-"},"content":" */"},{"lineNumber":221,"author":{"gitId":"-"},"content":" private class ModelStubThrowingDuplicatePersonException extends ModelStub {"},{"lineNumber":222,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":223,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":225,"author":{"gitId":"-"},"content":" }"},{"lineNumber":226,"author":{"gitId":"-"},"content":""},{"lineNumber":227,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":228,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":229,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":" }"},{"lineNumber":232,"author":{"gitId":"-"},"content":""},{"lineNumber":233,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * A Model stub that always accept the person being added."},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":238,"author":{"gitId":"-"},"content":""},{"lineNumber":239,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":240,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":241,"author":{"gitId":"-"},"content":" requireNonNull(person);"},{"lineNumber":242,"author":{"gitId":"-"},"content":" personsAdded.add(person);"},{"lineNumber":243,"author":{"gitId":"-"},"content":" }"},{"lineNumber":244,"author":{"gitId":"-"},"content":""},{"lineNumber":245,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName)"},{"lineNumber":247,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":249,"author":{"gitId":"-"},"content":" }"},{"lineNumber":250,"author":{"gitId":"-"},"content":""},{"lineNumber":251,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":252,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":253,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":254,"author":{"gitId":"-"},"content":" }"},{"lineNumber":255,"author":{"gitId":"-"},"content":" }"},{"lineNumber":256,"author":{"gitId":"-"},"content":""},{"lineNumber":257,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":29,"codeeong":12,"-":216}},{"path":"src/test/java/seedu/address/logic/commands/ChangeThemeCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandTest {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public void execute_validTheme_success() {"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertExecutionSuccess(listThemes[0]);"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" public void execute_invalidTheme_failure() {"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" assertExecutionFailure(\"FakeTheme\", Messages.MESSAGE_INVALID_THEME);"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public void equals() {"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand[] listThemeCommands \u003d new ChangeThemeCommand[2];"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" listThemeCommands[i] \u003d new ChangeThemeCommand(listThemes[i]);"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" // same object -\u003e returns true"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertTrue(listThemeCommands[i].equals(new ChangeThemeCommand(listThemes[i])));"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" // different types -\u003e returns false"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(1));"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" // null -\u003e returns false"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(null));"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" // different theme -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" int j \u003d 1;"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" if (i !\u003d j) {"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(listThemeCommands[j]));"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" j--;"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}."},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" private void assertExecutionSuccess(String theme) {"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" CommandResult commandResult \u003d changethemeCommand.execute();"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" assertEquals(String.format(ChangeThemeCommand.MESSAGE_THEME_SUCCESS, theme),"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" commandResult.feedbackToUser);"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}."},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" private void assertExecutionFailure(String theme, String expectedMessage) {"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" changethemeCommand.execute();"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":89}},{"path":"src/test/java/seedu/address/logic/commands/KeyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandTest {"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" private Model model;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" @Before"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public void start() {"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" model \u003d new ModelManager();"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public void checkKey() throws Exception {"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" //checks that default lock state is false"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" //checks that key can lock MTM"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" //checks that key can unlock MTM"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" //checks that toggling works"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":44}},{"path":"src/test/java/seedu/address/logic/commands/RemarkCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_EMPTY;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareRedoCommand;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareUndoCommand;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for RemarkCommand."},{"lineNumber":35,"author":{"gitId":"-"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class RemarkCommandTest {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void execute_addRemarkUnfilteredList_success() throws Exception {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_AMY).build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_deleteRemarkUnfilteredList_success() throws Exception {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_EMPTY).build();"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_DELETE_REMARK_SUCCESS, remarkedPerson);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personInFilteredList).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, remarkedPerson.getRemark().toString());"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":88,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personInFilteredList, remarkedPerson);"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Remark filtered list where index is larger than size of filtered list,"},{"lineNumber":105,"author":{"gitId":"-"},"content":" * but smaller than size of address book"},{"lineNumber":106,"author":{"gitId":"-"},"content":" */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":108,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":111,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":125,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_AMY).build();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" // remark -\u003e first person remarked"},{"lineNumber":130,"author":{"gitId":"-"},"content":" remarkCommand.execute();"},{"lineNumber":131,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" // redo -\u003e same first person remarked again"},{"lineNumber":137,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":142,"author":{"gitId":"-"},"content":" public void executeUndoRedo_invalidIndexUnfilteredList_failure() {"},{"lineNumber":143,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":144,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);"},{"lineNumber":145,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":147,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_EMPTY);"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" // execution failed -\u003e remarkCommand not pushed into undoRedoStack"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" // no commands in undoRedoStack -\u003e undoCommand and redoCommand fail"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * 1. Updates {@code Person#remark} from a filtered list."},{"lineNumber":159,"author":{"gitId":"-"},"content":" * 2. Undo the update."},{"lineNumber":160,"author":{"gitId":"-"},"content":" * 3. The unfiltered list should be shown now. Verify that the index of the previously updated person in the"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * unfiltered list is different from the index at the filtered list."},{"lineNumber":162,"author":{"gitId":"-"},"content":" * 4. Redo the update. This ensures {@code RedoCommand} updates the person object regardless of indexing."},{"lineNumber":163,"author":{"gitId":"-"},"content":" */"},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":165,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexFilteredList_samePersonRemarked() throws Exception {"},{"lineNumber":166,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":167,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);"},{"lineNumber":169,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_BOB);"},{"lineNumber":170,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_SECOND_PERSON);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" // remark -\u003e remarks second person in unfiltered person list / first person in filtered person list"},{"lineNumber":176,"author":{"gitId":"-"},"content":" remarkCommand.execute();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons"},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertNotEquals(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), personToRemark);"},{"lineNumber":184,"author":{"gitId":"-"},"content":" // redo -\u003e remarks same second person in unfiltered person list"},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":186,"author":{"gitId":"-"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" final RemarkCommand standardCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":193,"author":{"gitId":"-"},"content":" RemarkCommand commandWithSameValues \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":203,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"-"},"content":" // different index -\u003e returns false"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_SECOND_PERSON, new Remark(VALID_REMARK_AMY))));"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" // different remark -\u003e returns false"},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_FIRST_PERSON, new Remark(VALID_REMARK_BOB))));"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Returns an {@code RemarkCommand} with parameters {@code index} and {@code remark}."},{"lineNumber":214,"author":{"gitId":"-"},"content":" */"},{"lineNumber":215,"author":{"gitId":"-"},"content":" private RemarkCommand prepareCommand(Index index, String remark) {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d new RemarkCommand(index, new Remark(remark));"},{"lineNumber":217,"author":{"gitId":"-"},"content":" remarkCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":218,"author":{"gitId":"-"},"content":" return remarkCommand;"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":218}},{"path":"src/test/java/seedu/address/logic/commands/SetCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * This is the unit test for {@code SetCommand}."},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"public class SetCommandTest {"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private Model model;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Tag tagOne \u003d new Tag(\"testTagOne\");"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private Tag tagTwo \u003d new Tag(\"testTagTwo\");"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" @Before"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" public void setUp() {"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public void equals() {"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" SetCommand testCommand \u003d new SetCommand(tagOne, \"teal\");"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" SetCommand testCommandTwo \u003d new SetCommand(tagOne, \"teal\");"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" //Test to ensure command is strictly a SetCommand"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new AddCommand(CARL)));"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ClearCommand()));"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new DeleteCommand(INDEX_FIRST_PERSON)));"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HistoryCommand()));"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HelpCommand()));"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new RedoCommand()));"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new UndoCommand()));"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ListCommand()));"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_AMY)));"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" //Test to check that different tag string returns false"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagTwo, \"teal\")));"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"teal\")));"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" //Test to check that different color strings returns false"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagOne, \"red\")));"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"red\")));"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" public void checkCommandResult() throws CommandException {"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" //Check if the result message is correct when there is no tags found"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" SetCommand command \u003d new SetCommand(new Tag(\"blablabla\"), \"teal\");"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag is invalid! Please input a valid tag name!\"));"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" //When tags is present"},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"red\");"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" assertFalse(command.execute().feedbackToUser.equals(\"No such tag\"));"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to red\"));"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" //Check if friends tags are set to color"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"teal\");"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to teal\"));"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" for (Tag tag : model.getAddressBook().getTagList()) {"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" if (\"friends\".equals(tag.tagName)) {"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" assertTrue(tag.getTagColour().equals(\"teal\"));"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" assertFalse(tag.getTagColour().equals(\"pink\"));"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" resetAllTagsToDefault();"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" * This method allows all tags to be set to the default colour \"teal\""},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" public void resetAllTagsToDefault() {"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTag\u003e allTags \u003d model.getAddressBook().getTagList();"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" for (Tag t : allTags) {"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(\"teal\");"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":100}},{"path":"src/test/java/seedu/address/logic/commands/SortCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_SUCCESS;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getEmptyAddressBook;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getSortedAddressBook;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandTest {"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public ExpectedException error \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" private Model emptyModel \u003d new ModelManager(getEmptyAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByNameDesc \u003d new ModelManager("},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"name\", \"desc\"), new UserPrefs());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAdd \u003d new ModelManager("},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"asc\"), new UserPrefs());"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAddDesc \u003d new ModelManager("},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"desc\"), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmail \u003d new ModelManager(getSortedAddressBook(\"email\", \"asc\"), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmailDesc \u003d new ModelManager("},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"email\", \"desc\"), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void noPlayers() throws CommandException {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" error.expect(CommandException.class);"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" prepareCommand(\"name\", \"asc\", emptyModel).execute();"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" public void emptySortField_throwsNullPointerEx() {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", null);"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void emptySortOrder_throwsNullPointerEx() {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(null, \"asc\");"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public void sortByName_success() throws Exception {"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"asc\", model);"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"asc\");"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, model);"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public void sortByNameDesc_success() throws Exception {"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"desc\", model);"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"desc\");"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByNameDesc);"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" public void sortByAdd_success() throws Exception {"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"asc\", model);"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"asc\");"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAdd);"},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" public void sortByAddDesc_success() throws Exception {"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"desc\", model);"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"desc\");"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAddDesc);"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmail_success() throws Exception {"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"asc\", model);"},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"asc\");"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmail);"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmailDesc_success() throws Exception {"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"desc\", model);"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"desc\");"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmailDesc);"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" * Returns a {@code sortCommand} with the parameters {@code field and @code order}."},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" private SortCommand prepareCommand(String field, String order, Model model) {"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" SortCommand sortCommand \u003d new SortCommand(field, order);"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" sortCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" return sortCommand;"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":108}},{"path":"src/test/java/seedu/address/logic/commands/TogglePrivacyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandTest {"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" public void editPersonPrivacyTest() {"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertFalse(epp.anyNonNullField());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy eppBuilder \u003d new EditPersonPrivacyBuilder().setAddressPrivate(\"false\")"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" .setEmailPrivate(\"false\").setPhonePrivate(\"true\").setRatingPrivate(\"false\")"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" .setRemarkPrivate(\"true\").build();"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateAddress(), epp.getPrivateAddress());"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateEmail(), epp.getPrivateEmail());"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivatePhone(), epp.getPrivatePhone());"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRating(), epp.getPrivateRating());"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRemark(), epp.getPrivateRemark());"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" public void oneFieldToggledSuccess() throws Exception {"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" Index indexLast \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLast.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" Person listedPerson \u003d new PersonBuilder().withName(lastPerson.getName().toString())"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" .withEmail(lastPerson.getEmail().toString()).withRating(lastPerson.getRating().toString())"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" .withPhone(lastPerson.getPhone().toString()).build();"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" listedPerson.getPhone().setPrivate(true);"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder(listedPerson).setPhonePrivate(\"true\").build();"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand togglePrivacyCommand \u003d new TogglePrivacyCommand(indexLast, epp);"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" togglePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(TogglePrivacyCommand.MESSAGE_SUCCESS, listedPerson);"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" expectedModel.updatePerson(lastPerson, listedPerson);"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":67}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TEAM_ARSENAL;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" private static final boolean DEFAULT_LOCK_STATE \u003d false;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void parseCommand_add() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person), DEFAULT_LOCK_STATE);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_addAlias() throws Exception {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \""},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void parseCommand_clear() throws Exception {"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_clearAlias() throws Exception {"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void parseCommand_delete() throws Exception {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_deleteAlias() throws Exception {"},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseCommand_edit() throws Exception {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \""},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_editAlias() throws Exception {"},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \""},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":117,"author":{"gitId":"-"},"content":" public void parseCommand_exit() throws Exception {"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ExitCommand);"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ExitCommand);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" }"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void parseCommand_remark() throws Exception {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");"},{"lineNumber":125,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_WORD + \" \""},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" }"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":131,"author":{"gitId":"-"},"content":" public void parseCommand_remarkAlias() throws Exception {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");"},{"lineNumber":133,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_ALIAS + \" \""},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" }"},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":139,"author":{"gitId":"-"},"content":" public void parseCommand_find() throws Exception {"},{"lineNumber":140,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":141,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream()"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }"},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_findAlias() throws Exception {"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream()"},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":157,"author":{"gitId":"-"},"content":" public void parseCommand_help() throws Exception {"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HelpCommand);"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\","},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HelpCommand);"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public void parseCommand_history() throws Exception {"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\","},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"histories\", DEFAULT_LOCK_STATE);"},{"lineNumber":171,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":172,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_historyAlias() throws Exception {"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\","},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void parseCommand_create() throws Exception {"},{"lineNumber":186,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));"},{"lineNumber":187,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_WORD + \" \""},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);"},{"lineNumber":190,"author":{"gitId":"-"},"content":" }"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parseCommand_createAlias() throws Exception {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));"},{"lineNumber":195,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_ALIAS + \" \""},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" }"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void parseCommand_list() throws Exception {"},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\","},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":205,"author":{"gitId":"-"},"content":" }"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_listAlias() throws Exception {"},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\","},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":215,"author":{"gitId":"-"},"content":" public void parseCommand_select() throws Exception {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_selectAlias() throws Exception {"},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":229,"author":{"gitId":"-"},"content":" public void parseCommand_redoCommandWord_returnsRedoCommand() throws Exception {"},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_redoCommandAlias_returnsRedoCommand() throws Exception {"},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS + \" 1\","},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":241,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":242,"author":{"gitId":"-"},"content":" public void parseCommand_undoCommandWord_returnsUndoCommand() throws Exception {"},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":245,"author":{"gitId":"-"},"content":" }"},{"lineNumber":246,"author":{"gitId":"-"},"content":""},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_undoCommandAlias_returnsUndoCommand() throws Exception {"},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS + \" 3\","},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":255,"author":{"gitId":"-"},"content":" public void parseCommand_unrecognisedInput_throwsParseException() throws Exception {"},{"lineNumber":256,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":257,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"\", DEFAULT_LOCK_STATE);"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }"},{"lineNumber":260,"author":{"gitId":"-"},"content":""},{"lineNumber":261,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void parseCommand_unknownCommand_throwsParseException() throws Exception {"},{"lineNumber":263,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":264,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_LOCK_STATE);"},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" /** @lohtianwei */"},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sort() throws Exception {"},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \""},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \""},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);"},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sortAlias() throws Exception {"},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \""},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \""},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);"},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_key() throws Exception {"},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD"},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);"},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_keyAlias() throws Exception {"},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD"},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);"},{"lineNumber":293,"author":{"gitId":"-"},"content":" }"},{"lineNumber":294,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacy() throws Exception {"},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_WORD + \" \""},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);"},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacyAlias() throws Exception {"},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_ALIAS + \" \""},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);"},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":309,"author":{"gitId":"codeeong"},"content":" /** @@Codee */"},{"lineNumber":310,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":311,"author":{"gitId":"codeeong"},"content":" public void parseCommand_theme() throws Exception {"},{"lineNumber":312,"author":{"gitId":"codeeong"},"content":" String[] listThemes \u003d { \"Light\", \"Dark\" };"},{"lineNumber":313,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":314,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":315,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand command \u003d (ChangeThemeCommand) parser.parseCommand("},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" ChangeThemeCommand.COMMAND_WORD + \" \" + listThemes[i], DEFAULT_LOCK_STATE);"},{"lineNumber":317,"author":{"gitId":"codeeong"},"content":" assertEquals(new ChangeThemeCommand(listThemes[i]), command);"},{"lineNumber":318,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":319,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":320,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":321,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":150,"codeeong":12,"-":159}},{"path":"src/test/java/seedu/address/logic/parser/ChangeThemeCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private ChangeThemeCommandParser parser \u003d new ChangeThemeCommandParser();"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsThemeCommand() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, listThemes[i], new ChangeThemeCommand(listThemes[i]));"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" // Empty Argument"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" assertParseFailure(parser, \"\","},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangeThemeCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":30}},{"path":"src/test/java/seedu/address/logic/parser/SetCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalTags.FRIEND;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class SetCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private SetCommandParser parser \u003d new SetCommandParser();"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsSetCommand() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" String userInput \u003d \" \" + PREFIX_TAG + FRIEND.getTagName() + \" \" + PREFIX_TAG_COLOUR + \"green\";"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, userInput, new SetCommand(FRIEND, \"green\"));"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":23}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_ASCENDING;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_DESCENDING;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"//import seedu.address.logic.commands.SortCommand;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" private SortCommandParser parser \u003d new SortCommandParser();"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public void noArguments_throwsParseException() {"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" public void parse_invalidArguments_failure() {"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" //more than 1 field entered"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"address\" + \" \" + \"asc\","},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" //invalid field entered"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"invalid\" + \"asc\","},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //invalid sort order entered"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"invalid\","},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" //no field entered"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"asc\","},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" //no order entered"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\","},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" /*"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public void parse_validArguments_success() {"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in asc order"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_ASCENDING,"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_ASCENDING));"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in desc order"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_DESCENDING,"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_DESCENDING));"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in asc order"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_ASCENDING,"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_ASCENDING));"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in desc order"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_DESCENDING,"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_DESCENDING));"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in asc order"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_ASCENDING,"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_ASCENDING));"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in desc order"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_DESCENDING,"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_DESCENDING));"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in asc order"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_ASCENDING,"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_ASCENDING));"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in desc order"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_DESCENDING,"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_DESCENDING));"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":82}},{"path":"src/test/java/seedu/address/logic/parser/TogglePrivacyCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParserTest {"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d String.format"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" (MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE);"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_NO_FIELDS \u003d String.format(TogglePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private TogglePrivacyCommandParser parser \u003d new TogglePrivacyCommandParser();"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidIndex() {"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" // zero index"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //negative index"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" //invalid index"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1 random\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void parseMissingField_fail() {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" // no prefix specified"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\", MESSAGE_NO_FIELDS);"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" //no index specified"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" //nothing specified after command word"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidPrefix_fail() {"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME,"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void parseOneField_success() throws ParseException {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE;"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" public void parseValidFollowedbyInvalid_success() throws ParseException {"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE + \" \" + PREFIX_NAME;"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" * Checks if two TP commands are equal"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" * @param expected"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" * @param actual"},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" private void compareTpCommand(TogglePrivacyCommand expected, TogglePrivacyCommand actual) {"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getIndex(), actual.getIndex());"},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRemark(), actual.getEpp().getPrivateRemark());"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateAddress(), actual.getEpp().getPrivateAddress());"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRating(), actual.getEpp().getPrivateRating());"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivatePhone(), actual.getEpp().getPrivatePhone());"},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateEmail(), actual.getEpp().getPrivateEmail());"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":95}},{"path":"src/test/java/seedu/address/model/tag/TagTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class TagTest {"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public void constructor_null_throwsNullPointerException() {"},{"lineNumber":11,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new Tag(null));"},{"lineNumber":12,"author":{"gitId":"-"},"content":" }"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public void constructor_invalidTagName_throwsIllegalArgumentException() {"},{"lineNumber":16,"author":{"gitId":"-"},"content":" String invalidTagName \u003d \"\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagName));"},{"lineNumber":18,"author":{"gitId":"-"},"content":" }"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" public void constructor_invalidTagColourName_throwsIllegalArgumentException() {"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" String invalidTagColourName \u003d \"\";"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagColourName));"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void isValidTagName() {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" // null tag name"},{"lineNumber":29,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagName(null));"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public void isValidTagColour() {"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" // null tag name"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagColour(null));"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":12,"-":26}},{"path":"src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class JsonUserPrefsStorageTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/JsonUserPrefsStorageTest/\");"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void readUserPrefs_nullFilePath_throwsNullPointerException() throws DataConversionException {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" readUserPrefs(null);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Optional\u003cUserPrefs\u003e readUserPrefs(String userPrefsFileInTestDataFolder) throws DataConversionException {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d addToTestDataPathIfNotNull(userPrefsFileInTestDataFolder);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new JsonUserPrefsStorage(prefsFilePath).readUserPrefs(prefsFilePath);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void readUserPrefs_missingFile_emptyResult() throws DataConversionException {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertFalse(readUserPrefs(\"NonExistentFile.json\").isPresent());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void readUserPrefs_notJsonFormat_exceptionThrown() throws DataConversionException {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" readUserPrefs(\"NotJsonFormatUserPrefs.json\");"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored."},{"lineNumber":51,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method"},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String userPrefsFileInTestDataFolder) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return userPrefsFileInTestDataFolder !\u003d null"},{"lineNumber":57,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + userPrefsFileInTestDataFolder"},{"lineNumber":58,"author":{"gitId":"-"},"content":" : null;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void readUserPrefs_fileInOrder_successfullyRead() throws DataConversionException {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"TypicalUserPref.json\").get();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void readUserPrefs_valuesMissingFromFile_defaultValuesUsed() throws DataConversionException {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"EmptyUserPrefs.json\").get();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(new UserPrefs(), actual);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public void readUserPrefs_extraValuesInFile_extraValuesIgnored() throws DataConversionException {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"ExtraValuesUserPref.json\").get();"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" private UserPrefs getTypicalUserPrefs() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" userPrefs.setGuiSettings(1000, 500, 300, 100);"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" userPrefs.setAddressBookFilePath(\"myteammanager.xml\");"},{"lineNumber":86,"author":{"gitId":"-"},"content":" userPrefs.setAddressBookName(\"TypicalAddressBookName\");"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return userPrefs;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void savePrefs_nullPrefs_throwsNullPointerException() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveUserPrefs(null, \"SomeFile.json\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void saveUserPrefs_nullFilePath_throwsNullPointerException() {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" saveUserPrefs(new UserPrefs(), null);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Saves {@code userPrefs} at the specified {@code prefsFileInTestDataFolder} filepath."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" private void saveUserPrefs(UserPrefs userPrefs, String prefsFileInTestDataFolder) {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(addToTestDataPathIfNotNull(prefsFileInTestDataFolder))"},{"lineNumber":108,"author":{"gitId":"-"},"content":" .saveUserPrefs(userPrefs);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file\", ioe);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":115,"author":{"gitId":"-"},"content":" public void saveUserPrefs_allInOrder_success() throws DataConversionException, IOException {"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();"},{"lineNumber":118,"author":{"gitId":"-"},"content":" original.setGuiSettings(1200, 200, 0, 2);"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" String pefsFilePath \u003d testFolder.getRoot() + File.separator + \"TempPrefs.json\";"},{"lineNumber":121,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage jsonUserPrefsStorage \u003d new JsonUserPrefsStorage(pefsFilePath);"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" //Try writing when the file doesn\u0027t exist"},{"lineNumber":124,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" UserPrefs readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" //Try saving when the file exists"},{"lineNumber":129,"author":{"gitId":"-"},"content":" original.setGuiSettings(5, 5, 5, 5);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();"},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" }"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":134}},{"path":"src/test/java/seedu/address/testutil/EditPersonPrivacyBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":" * A utility class to help with building EditPersonPrivacy objects."},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"public class EditPersonPrivacyBuilder {"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" private EditPersonPrivacy epp;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder() {"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(EditPersonPrivacy epp) {"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d new EditPersonPrivacy(epp);"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" * Returns an {@code EditPersonPrivacy} with fields containing {@code person}\u0027s privacy details"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(Person p) {"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(p.getAddress().isPrivate());"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(p.getEmail().isPrivate());"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(p.getPhone().isPrivate());"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(p.getRemark().isPrivate());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(p.getRating().isPrivate());"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setPhonePrivate(String phone) {"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setEmailPrivate(String email) {"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(true);"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setAddressPrivate(String address) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(true);"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRatingPrivate(String rating) {"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (rating.equals(\"Optional[true]\") || rating.equals(\"true\")) {"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(true);"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else if (rating.equals(\"Optional[false]\") || rating.equals(\"false\")) {"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of rating should be true or false\");"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRemarkPrivate(String remark) {"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy build() {"},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" return epp;"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":89,"-":2}},{"path":"src/test/java/seedu/address/testutil/TeamBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * A utility class to help with building a TeamList."},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class TeamBuilder {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TEAM_NAME \u003d \"Arsenal\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" private TeamName teamName;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public TeamBuilder() {"},{"lineNumber":18,"author":{"gitId":"-"},"content":" teamName \u003d new TeamName(DEFAULT_TEAM_NAME);"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Initializes the TeamBuilder with the data of {@code teamToCopy}."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public TeamBuilder(Team teamToCopy) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" teamName \u003d teamToCopy.getTeamName();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Sets the {@code TeamName} of the {@code Team} that we are building."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public TeamBuilder withTeamName(String teamName) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.teamName \u003d new TeamName(teamName);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public Team build() {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new Team(teamName);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":8,"-":31}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests."},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class TypicalPersons {"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final Person ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")"},{"lineNumber":36,"author":{"gitId":"-"},"content":" .withPhone(\"85355255\").withTags(\"friends\").withRating(\"0\")"},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"1\").build();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final Person BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")"},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")"},{"lineNumber":40,"author":{"gitId":"-"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\")"},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withTags(\"owesMoney\", \"friends\").withRating(\"1\")"},{"lineNumber":42,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"2\").build();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final Person CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")"},{"lineNumber":44,"author":{"gitId":"-"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withRating(\"2\")"},{"lineNumber":45,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"3\").build();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final Person DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")"},{"lineNumber":47,"author":{"gitId":"-"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withRating(\"3\")"},{"lineNumber":48,"author":{"gitId":"-"},"content":" .withPosition(\"4\").withJerseyNumber(\"4\").build();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final Person ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")"},{"lineNumber":50,"author":{"gitId":"-"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withRating(\"4\")"},{"lineNumber":51,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"5\").build();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final Person FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withRating(\"5\")"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"6\").build();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final Person GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")"},{"lineNumber":56,"author":{"gitId":"-"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withRemark(\"Could be famous\").withRating(\"0\")"},{"lineNumber":57,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"7\").build();"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" // Manually added"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final Person HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")"},{"lineNumber":61,"author":{"gitId":"-"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").build();"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final Person IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")"},{"lineNumber":63,"author":{"gitId":"-"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").build();"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final Person AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRating(VALID_RATING_0)"},{"lineNumber":68,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2)"},{"lineNumber":69,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final Person BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRating(VALID_RATING_1)"},{"lineNumber":72,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_MIDFIELD).withJerseyNumber(VALID_JERSEY_NUMBER_17)"},{"lineNumber":73,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":81,"author":{"gitId":"-"},"content":" */"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" for (Person person : getTypicalPersons()) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" ab.addPerson(person);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new AssertionError(\"not possible\");"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return ab;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersons() {"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByAddress() {"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(DANIEL, ALICE, BENSON, GEORGE, FIONA, ELLE, CARL));"},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByEmail() {"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, GEORGE, DANIEL, CARL, BENSON, FIONA, ELLE));"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByPhone() {"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, DANIEL, ELLE, FIONA, GEORGE, CARL, BENSON));"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getSortedAddressBook(String field, String order) {"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e personList;"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" switch(field) {"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" case \"name\":"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" case \"phone\":"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByPhone();"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" case \"email\":"},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByEmail();"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case \"address\":"},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByAddress();"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" if (order.equals(\"desc\")) {"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Collections.reverse(personList);"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" for (Person person : personList) {"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" ab.addPerson(person);"},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" assert false : \"not possible\";"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" return ab;"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getEmptyAddressBook() {"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" return ab;"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":59,"-":91}},{"path":"src/test/java/seedu/address/testutil/TypicalTags.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" * A utility class containing a list of {@code Tag} objects to be used in tests."},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"public class TypicalTags {"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final Tag GOOD_ATTITUDE \u003d new Tag(\"goodAttitude\", \"teal\");"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public static final Tag FRIEND \u003d new Tag(\"friends\", \"teal\");"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" private TypicalTags() {} //prevents instantiation"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * Returns an {@code AddressBook} with all the typical teams."},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" for (Tag tag : getTypicalTags()) {"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" ab.addTag(tag);"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" } catch (UniqueTagList.DuplicateTagException e) {"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\"not possible\");"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" return ab;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public static List\u003cTag\u003e getTypicalTags() {"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(GOOD_ATTITUDE, FRIEND));"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":43}},{"path":"src/test/java/seedu/address/ui/PlayerDetailsTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertPlayerDetailsDisplaysPerson;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"//@@author Codee"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class PlayerDetailsTest extends GuiUnitTest {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" // no tags"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();"},{"lineNumber":21,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(personWithNoTags);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(playerDetails);"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertCardDisplay(playerDetails, personWithNoTags);"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(person);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(playerDetails.equals(playerDetails));"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(null));"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(0));"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(new PlayerDetails(differentPerson)));"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Asserts that {@code playerDetails} displays the details of {@code expectedPerson} correctly"},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PlayerDetails playerDetails, Person expectedPerson) {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" PlayerDetailsHandle playerDetailsHandle \u003d new PlayerDetailsHandle(playerDetails.getRoot());"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" // verify player details are displayed correctly"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertPlayerDetailsDisplaysPerson(expectedPerson, playerDetailsHandle);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":13,"-":44}},{"path":"src/test/java/seedu/address/ui/TeamDisplayTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertTeamDisplayEquals;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.TeamBuilder;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * tests for TeamDisplay UI Component."},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayTest extends GuiUnitTest {"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private static final String NEW_TEAM_NAME \u003d \"myTeam\";"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private static final ShowNewTeamNameEvent SHOW_NEW_TEAM_NAME_EVENT \u003d new ShowNewTeamNameEvent(NEW_TEAM_NAME);"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" private TeamDisplay teamDisplay;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" private TeamDisplayHandle teamDisplayHandle;"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" teamList \u003d FXCollections.observableArrayList();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Arsenal\").build());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Chelsea\").build());"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" teamDisplay \u003d new TeamDisplay(teamList);"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" uiPartRule.setUiPart(teamDisplay);"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" public void display() {"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" assertTeamDisplay(teamDisplay, teamList);"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * {@code expectedId}."},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void assertTeamDisplay(TeamDisplay teamDisplay, ObservableList\u003cTeam\u003e teamlist) {"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(teamDisplay, teamDisplayHandle);"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" public void handleShowNewTeamNameEvent() {"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" postNow(SHOW_NEW_TEAM_NAME_EVENT);"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly after event"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" teamList.add(new Team(new TeamName(NEW_TEAM_NAME)));"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" TeamDisplay expectedTeamDisplay \u003d new TeamDisplay(teamList);"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(expectedTeamDisplay, teamDisplayHandle);"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class UiPartTest {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_WITH_FX_ROOT_PATH \u003d \"UiPartTest/validFileWithFxRoot.fxml\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void constructor_nullFileUrl_throwsNullPointerException() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null, new Object()));"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void constructor_missingFileUrl_throwsAssertionError() throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl));"},{"lineNumber":41,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl, new Object()));"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void constructor_invalidFileUrl_throwsAssertionError() {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl));"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl, new Object()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void constructor_validFileUrl_loadsFile() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void constructor_validFileWithFxRootUrl_loadsFile() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_WITH_FX_ROOT_PATH);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" TestFxmlObject root \u003d new TestFxmlObject();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl, root).getRoot());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void constructor_nullFileName_throwsNullPointerException() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null));"},{"lineNumber":67,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null, new Object()));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void constructor_missingFileName_throwsNullPointerException() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH));"},{"lineNumber":73,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH, new Object()));"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void constructor_invalidFileName_throwsAssertionError() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH));"},{"lineNumber":79,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH, new Object()));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;"},{"lineNumber":84,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return testFileUrl;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * UiPart used for testing."},{"lineNumber":91,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":96,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl, T root) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" super(fxmlFileUrl, root);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName, T root) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" super(fxmlFileName, root);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" super(fxmlFileName);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" }"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"}"},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.PersonCard;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.TeamDisplay;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class GuiTestAssert {"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private static final String LABEL_DEFAULT_STYLE \u003d \"label\";"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard}."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getPosition(), actualCard.getPosition());"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getRating(), actualCard.getRating());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTeamName(), actualCard.getTeamName());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" expectedCard.getTags().forEach(tag -\u003e"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTagStyleClasses(tag), actualCard.getTagStyleClasses(tag)));"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualTeamDisplay} displays the details of {@code expectedTeamDisplay}."},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static void assertTeamDisplayEquals(TeamDisplay expectedTeamDisplay, TeamDisplayHandle actualTeamDisplay) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" expectedTeamDisplay.getTeams().forEach(team -\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedTeamDisplay.getTeams().toString(), actualTeamDisplay.getTeams().toString()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(Person expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getTeamName().toString(), actualCard.getTeamName());"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getRating().value, actualCard.getRating());"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getPosition().getPositionName(), actualCard.getPosition());"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" assertTagsEqual(expectedPerson, actualCard);"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualPlayerDetails} displays the details of {@code expectedPerson}."},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static void assertPlayerDetailsDisplaysPerson(Person expectedPerson, PlayerDetailsHandle actualPlayerPanel) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualPlayerPanel.getName());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().toString(), actualPlayerPanel.getAddress());"},{"lineNumber":69,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualPlayerPanel.getEmail());"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getJerseyNumber().value, actualPlayerPanel.getJerseyNumber());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualPlayerPanel.getPhone());"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getRemark().toString(), actualPlayerPanel.getRemarks());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Returns the color style for {@code tagName}\u0027s label. The tag\u0027s color is determined by looking up the color"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" * of {@tagColour}"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" * @see PersonCard getTagColorStyleFor(String)"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" private static String getTagColorStyleFor(String tagName) {"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" switch (tagName) {"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" case \"classmates\":"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" case \"owesMoney\":"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" case \"colleagues\":"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" case \"neighbours\":"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" case \"family\":"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" case \"friend\":"},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" case \"friends\":"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" case \"husband\":"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" case \"redCard\":"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" case \"yellowCard\":"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" case \"goodAttitude\":"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" case \"badAttitude\":"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" case \"injured\":"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" case \"fastRunner\":"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" return \"teal\";"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" default:"},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" fail(tagName + \" does not have a color assigned.\");"},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" return \"\";"},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" * Asserts that the tags in {@code actualCard} matches all the tags in {@code expectedPerson} with the correct"},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" * color."},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" private static void assertTagsEqual(Person expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e expectedTags \u003d expectedPerson.getTags().stream()"},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" .map(tag -\u003e tag.tagName).collect(Collectors.toList());"},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedTags, actualCard.getTags());"},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" expectedTags.forEach(tag -\u003e"},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" assertEquals(Arrays.asList(LABEL_DEFAULT_STYLE, getTagColorStyleFor(tag)),"},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" actualCard.getTagStyleClasses(tag)));"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":120,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":122,"author":{"gitId":"-"},"content":" */"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, Person... persons) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":131,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":132,"author":{"gitId":"-"},"content":" */"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cPerson\u003e persons) {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new Person[0]));"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":138,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}."},{"lineNumber":139,"author":{"gitId":"-"},"content":" */"},{"lineNumber":140,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {"},{"lineNumber":141,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();"},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}."},{"lineNumber":147,"author":{"gitId":"-"},"content":" */"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());"},{"lineNumber":150,"author":{"gitId":"-"},"content":" }"},{"lineNumber":151,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":70,"-":81}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_MAC_LINUX;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_WINDOWS;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_JERSEY_NUMBER_DESC;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_POSITION_DESC;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_RATING_DESC;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_MAC_LINUX;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_WINDOWS;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"import com.sun.javafx.PlatformUtil;"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":68,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":69,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":70,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":71,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":72,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":74,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":75,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":76,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":77,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":78,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":79,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void add() throws Exception {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operations on the shown unfiltered list ----------------------------- */"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * -\u003e added"},{"lineNumber":91,"author":{"gitId":"-"},"content":" */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();"},{"lineNumber":93,"author":{"gitId":"-"},"content":" Person toAdd \u003d AMY;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" String command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":95,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":105,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */"},{"lineNumber":110,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":111,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":114,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \""},{"lineNumber":115,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":120,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":121,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */"},{"lineNumber":127,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":128,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":130,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY"},{"lineNumber":131,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \""},{"lineNumber":132,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":137,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":138,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":139,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB"},{"lineNumber":140,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \""},{"lineNumber":141,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" deleteAllPersons();"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */"},{"lineNumber":149,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;"},{"lineNumber":150,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB"},{"lineNumber":151,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_HUSBAND + EMAIL_DESC_BOB + POSITION_DESC_MIDFILED + JERSEY_NUMBER_DESC_17 + RATING_DESC_1;"},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e added */"},{"lineNumber":158,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":159,"author":{"gitId":"-"},"content":" .withPhone(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)"},{"lineNumber":160,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0"},{"lineNumber":162,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e added */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":167,"author":{"gitId":"-"},"content":" .withAddress(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)"},{"lineNumber":168,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":169,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + RATING_DESC_0"},{"lineNumber":170,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":171,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: missing rating -\u003e added */"},{"lineNumber":174,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":175,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags().withRating(UNSPECIFIED_FIELD)"},{"lineNumber":176,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":178,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" if (PlatformUtil.isWindows()) {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":183,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_WINDOWS)"},{"lineNumber":184,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)"},{"lineNumber":185,"author":{"gitId":"-"},"content":" .build();"},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_WINDOWS"},{"lineNumber":187,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER"},{"lineNumber":188,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":190,"author":{"gitId":"-"},"content":" } else if (PlatformUtil.isMac() || PlatformUtil.isLinux()) {"},{"lineNumber":191,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":192,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_MAC_LINUX)"},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)"},{"lineNumber":194,"author":{"gitId":"-"},"content":" .build();"},{"lineNumber":195,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_MAC_LINUX"},{"lineNumber":196,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER"},{"lineNumber":197,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" /* -------------------------- Perform add operation on the shown filtered list ------------------------------ */"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operation while a person card is selected --------------------------- */"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */"},{"lineNumber":210,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":211,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);"},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":" /* ----------------------------------- Perform invalid add operations --------------------------------------- */"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */"},{"lineNumber":216,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON);"},{"lineNumber":217,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */"},{"lineNumber":220,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE"},{"lineNumber":221,"author":{"gitId":"-"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in"},{"lineNumber":222,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(Person)"},{"lineNumber":223,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON) + \" \" + PREFIX_TAG.getPrefix() + \"friends\";"},{"lineNumber":224,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */"},{"lineNumber":227,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0"},{"lineNumber":228,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */"},{"lineNumber":232,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0"},{"lineNumber":233,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":234,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":235,"author":{"gitId":"-"},"content":""},{"lineNumber":236,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */"},{"lineNumber":237,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":241,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":242,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":243,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":244,"author":{"gitId":"-"},"content":""},{"lineNumber":245,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":246,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":247,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":251,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC + ADDRESS_DESC_AMY"},{"lineNumber":252,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":254,"author":{"gitId":"-"},"content":""},{"lineNumber":255,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */"},{"lineNumber":256,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + INVALID_ADDRESS_DESC"},{"lineNumber":257,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Address.MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":261,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":262,"author":{"gitId":"-"},"content":" + INVALID_TAG_DESC + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":263,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":" //@@author lithiumlkid"},{"lineNumber":266,"author":{"gitId":"-"},"content":" /* Case: invalid rating -\u003e rejected */"},{"lineNumber":267,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":268,"author":{"gitId":"-"},"content":" + INVALID_RATING_DESC + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Rating.MESSAGE_RATING_CONSTRAINTS);"},{"lineNumber":270,"author":{"gitId":"-"},"content":""},{"lineNumber":271,"author":{"gitId":"-"},"content":" /* Case: invalid position -\u003e rejected */"},{"lineNumber":272,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":273,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + INVALID_POSITION_DESC + JERSEY_NUMBER_DESC_2;"},{"lineNumber":274,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Position.MESSAGE_POSITION_CONSTRAINTS);"},{"lineNumber":275,"author":{"gitId":"-"},"content":""},{"lineNumber":276,"author":{"gitId":"-"},"content":" /* Case: invalid jersey number -\u003e rejected */"},{"lineNumber":277,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":278,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + INVALID_JERSEY_NUMBER_DESC;"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandFailure(command, JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);"},{"lineNumber":280,"author":{"gitId":"-"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */"},{"lineNumber":282,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":283,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_NO_FILE;"},{"lineNumber":284,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */"},{"lineNumber":287,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":288,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_TYPE;"},{"lineNumber":289,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Avatar.MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":290,"author":{"gitId":"-"},"content":" }"},{"lineNumber":291,"author":{"gitId":"-"},"content":""},{"lineNumber":292,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":293,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and asserts that the,\u003cbr\u003e"},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 1. Command box displays an empty string.\u003cbr\u003e"},{"lineNumber":295,"author":{"gitId":"-"},"content":" * 2. Command box has the default style class.\u003cbr\u003e"},{"lineNumber":296,"author":{"gitId":"-"},"content":" * 3. Result display box displays the success message of executing {@code AddCommand} with the details of"},{"lineNumber":297,"author":{"gitId":"-"},"content":" * {@code toAdd}.\u003cbr\u003e"},{"lineNumber":298,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in"},{"lineNumber":299,"author":{"gitId":"-"},"content":" * the current model added with {@code toAdd}.\u003cbr\u003e"},{"lineNumber":300,"author":{"gitId":"-"},"content":" * 5. Browser url and selected card remain unchanged.\u003cbr\u003e"},{"lineNumber":301,"author":{"gitId":"-"},"content":" * 6. Status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":302,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by"},{"lineNumber":303,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":304,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":305,"author":{"gitId":"-"},"content":" */"},{"lineNumber":306,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Person toAdd) {"},{"lineNumber":307,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);"},{"lineNumber":308,"author":{"gitId":"-"},"content":" }"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":311,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(Person)}. Executes {@code command}"},{"lineNumber":312,"author":{"gitId":"-"},"content":" * instead."},{"lineNumber":313,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(Person)"},{"lineNumber":314,"author":{"gitId":"-"},"content":" */"},{"lineNumber":315,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Person toAdd) {"},{"lineNumber":316,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":318,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);"},{"lineNumber":319,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":320,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");"},{"lineNumber":321,"author":{"gitId":"-"},"content":" }"},{"lineNumber":322,"author":{"gitId":"-"},"content":" // TODO: place holder for success message, change to proper assert method"},{"lineNumber":323,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);"},{"lineNumber":324,"author":{"gitId":"-"},"content":""},{"lineNumber":325,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":326,"author":{"gitId":"-"},"content":" }"},{"lineNumber":327,"author":{"gitId":"-"},"content":""},{"lineNumber":328,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":329,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Person)} except asserts that"},{"lineNumber":330,"author":{"gitId":"-"},"content":" * the,\u003cbr\u003e"},{"lineNumber":331,"author":{"gitId":"-"},"content":" * 1. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":332,"author":{"gitId":"-"},"content":" * 2. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in"},{"lineNumber":333,"author":{"gitId":"-"},"content":" * {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":334,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, Person)"},{"lineNumber":335,"author":{"gitId":"-"},"content":" */"},{"lineNumber":336,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":337,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":338,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":339,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":342,"author":{"gitId":"-"},"content":" }"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":345,"author":{"gitId":"-"},"content":" * Executes {@code command} and asserts that the,\u003cbr\u003e"},{"lineNumber":346,"author":{"gitId":"-"},"content":" * 1. Command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":347,"author":{"gitId":"-"},"content":" * 2. Command box has the error style class.\u003cbr\u003e"},{"lineNumber":348,"author":{"gitId":"-"},"content":" * 3. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":349,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} remain unchanged.\u003cbr\u003e"},{"lineNumber":350,"author":{"gitId":"-"},"content":" * 5. Browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":351,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by"},{"lineNumber":352,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":353,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":354,"author":{"gitId":"-"},"content":" */"},{"lineNumber":355,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":356,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":357,"author":{"gitId":"-"},"content":""},{"lineNumber":358,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":359,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":360,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":361,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":362,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":363,"author":{"gitId":"-"},"content":" }"},{"lineNumber":364,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":5,"-":359}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * for test verification."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" @ClassRule"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initialize();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();"},{"lineNumber":62,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication(this::getInitialData, getDataFileLocation());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Returns the data to be loaded into the file in {@link #getDataFileLocation()}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" */"},{"lineNumber":77,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return TypicalPersons.getTypicalAddressBook();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Returns the directory of the data file."},{"lineNumber":83,"author":{"gitId":"-"},"content":" */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" public MainWindowHandle getMainWindowHandle() {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return mainWindowHandle;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated."},{"lineNumber":115,"author":{"gitId":"-"},"content":" */"},{"lineNumber":116,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" rememberStates();"},{"lineNumber":118,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar"},{"lineNumber":119,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command."},{"lineNumber":120,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons in the address book."},{"lineNumber":128,"author":{"gitId":"-"},"content":" */"},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showAllPersons() {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(getModel().getAddressBook().getPersonList().size(), getModel().getFilteredPersonList().size());"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive)."},{"lineNumber":136,"author":{"gitId":"-"},"content":" */"},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {"},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + keyword);"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertTrue(getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size());"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list."},{"lineNumber":144,"author":{"gitId":"-"},"content":" */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + index.getOneBased());"},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertEquals(index.getZeroBased(), getPersonListPanel().getSelectedCardIndex());"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Deletes all persons in the address book."},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected void deleteAllPersons() {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertEquals(0, getModel().getAddressBook().getPersonList().size());"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays"},{"lineNumber":160,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly."},{"lineNumber":162,"author":{"gitId":"-"},"content":" */"},{"lineNumber":163,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,"},{"lineNumber":164,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());"},{"lineNumber":167,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());"},{"lineNumber":168,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());"},{"lineNumber":170,"author":{"gitId":"-"},"content":" }"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":173,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember"},{"lineNumber":174,"author":{"gitId":"-"},"content":" * their current state."},{"lineNumber":175,"author":{"gitId":"-"},"content":" */"},{"lineNumber":176,"author":{"gitId":"-"},"content":" private void rememberStates() {"},{"lineNumber":177,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();"},{"lineNumber":178,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();"},{"lineNumber":179,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();"},{"lineNumber":180,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * of the previously selected person."},{"lineNumber":186,"author":{"gitId":"-"},"content":" */"},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at"},{"lineNumber":193,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected."},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":195,"author":{"gitId":"-"},"content":" */"},{"lineNumber":196,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":""},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged."},{"lineNumber":203,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":204,"author":{"gitId":"-"},"content":" */"},{"lineNumber":205,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style."},{"lineNumber":211,"author":{"gitId":"-"},"content":" */"},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style."},{"lineNumber":218,"author":{"gitId":"-"},"content":" */"},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":""},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same."},{"lineNumber":225,"author":{"gitId":"-"},"content":" */"},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {"},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same."},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);"},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());"},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }"},{"lineNumber":243,"author":{"gitId":"-"},"content":""},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct."},{"lineNumber":246,"author":{"gitId":"-"},"content":" */"},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());"},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());"},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());"},{"lineNumber":252,"author":{"gitId":"codeeong"},"content":" //assertEquals that the detail card is correct"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());"},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());"},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {"},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model."},{"lineNumber":262,"author":{"gitId":"-"},"content":" */"},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();"},{"lineNumber":265,"author":{"gitId":"-"},"content":" }"},{"lineNumber":266,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":264}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":59,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void edit() throws Exception {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field"},{"lineNumber":74,"author":{"gitId":"-"},"content":" * -\u003e edited"},{"lineNumber":75,"author":{"gitId":"-"},"content":" */"},{"lineNumber":76,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \""},{"lineNumber":78,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + TAG_DESC_HUSBAND + \" \""},{"lineNumber":79,"author":{"gitId":"-"},"content":" + RATING_DESC_1 + \" \" + POSITION_DESC_MIDFILED + \" \" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND)"},{"lineNumber":82,"author":{"gitId":"-"},"content":" .withRating(VALID_RATING_1).withPosition(VALID_POSITION_MIDFIELD)"},{"lineNumber":83,"author":{"gitId":"-"},"content":" .withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */"},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" model.updatePerson("},{"lineNumber":95,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":100,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + POSITION_DESC_MIDFILED + RATING_DESC_1"},{"lineNumber":101,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_17;"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":108,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().build();"},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */"},{"lineNumber":120,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":121,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":123,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;"},{"lineNumber":124,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":125,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list"},{"lineNumber":129,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":130,"author":{"gitId":"-"},"content":" */"},{"lineNumber":131,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":134,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */"},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but"},{"lineNumber":139,"author":{"gitId":"-"},"content":" * browser url changes"},{"lineNumber":140,"author":{"gitId":"-"},"content":" */"},{"lineNumber":141,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":142,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":143,"author":{"gitId":"-"},"content":" selectPerson(index);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":145,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_AMY + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the"},{"lineNumber":147,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name"},{"lineNumber":148,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,"},{"lineNumber":158,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":161,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":163,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,"},{"lineNumber":167,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */"},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":171,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,"},{"lineNumber":175,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,"},{"lineNumber":179,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":182,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,"},{"lineNumber":183,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_ADDRESS_DESC,"},{"lineNumber":187,"author":{"gitId":"-"},"content":" Address.MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,"},{"lineNumber":193,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */"},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_NO_FILE,"},{"lineNumber":197,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_TYPE,"},{"lineNumber":201,"author":{"gitId":"-"},"content":" Avatar.MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));"},{"lineNumber":206,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":207,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));"},{"lineNumber":208,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":209,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":210,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */"},{"lineNumber":213,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":214,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":216,"author":{"gitId":"-"},"content":" }"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":219,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, Person, Index)} except that"},{"lineNumber":220,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged."},{"lineNumber":221,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list"},{"lineNumber":222,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, Person, Index)"},{"lineNumber":223,"author":{"gitId":"-"},"content":" */"},{"lineNumber":224,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson) {"},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e"},{"lineNumber":230,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e"},{"lineNumber":231,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being"},{"lineNumber":232,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list."},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson,"},{"lineNumber":237,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":238,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":240,"author":{"gitId":"-"},"content":" expectedModel.updatePerson("},{"lineNumber":241,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);"},{"lineNumber":242,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":243,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {"},{"lineNumber":244,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException("},{"lineNumber":245,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }"},{"lineNumber":247,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,"},{"lineNumber":248,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);"},{"lineNumber":249,"author":{"gitId":"-"},"content":" }"},{"lineNumber":250,"author":{"gitId":"-"},"content":""},{"lineNumber":251,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":252,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the"},{"lineNumber":253,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged."},{"lineNumber":254,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":255,"author":{"gitId":"-"},"content":" */"},{"lineNumber":256,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":262,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":272,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":273,"author":{"gitId":"-"},"content":" */"},{"lineNumber":274,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":275,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":277,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":280,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":281,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":282,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":283,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":284,"author":{"gitId":"-"},"content":" }"},{"lineNumber":285,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":286,"author":{"gitId":"-"},"content":" }"},{"lineNumber":287,"author":{"gitId":"-"},"content":""},{"lineNumber":288,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":289,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":290,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":291,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":292,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":293,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":296,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":297,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":298,"author":{"gitId":"-"},"content":" */"},{"lineNumber":299,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":300,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":303,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":304,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":305,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":306,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":307,"author":{"gitId":"-"},"content":" }"},{"lineNumber":308,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":6,"-":302}},{"path":"src/test/java/systemtests/HelpCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.GuiRobot;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.HelpWindowHandle;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.ui.StatusBarFooter;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A system test class for the help window, which contains interaction with other UI components."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class HelpCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String ERROR_MESSAGE \u003d \"ATTENTION!!!! : On some computers, this test may fail when run on \""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"non-headless mode as FxRobot#clickOn(Node, MouseButton...) clicks on the wrong location. We suspect \""},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"that this is a bug with TestFX library that we are using. If this test fails, you have to run your \""},{"lineNumber":26,"author":{"gitId":"-"},"content":" + \"tests on headless mode. See UsingGradle.adoc on how to do so.\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final GuiRobot guiRobot \u003d new GuiRobot();"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void openHelpWindow() {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" //use accelerator"},{"lineNumber":33,"author":{"gitId":"-"},"content":" getCommandBox().click();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" getResultDisplay().click();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" getPersonListPanel().click();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" //use menu button"},{"lineNumber":46,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingMenu();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" //use command box"},{"lineNumber":50,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // open help window and give it focus"},{"lineNumber":54,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" // assert that while the help window is open the UI updates correctly for a command execution"},{"lineNumber":58,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertNotEquals(HelpCommand.SHOWING_HELP_MESSAGE, getResultDisplay().getText());"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" //assertNotEquals(BrowserPanel.DEFAULT_PAGE, getBrowserPanel().getLoadedUrl());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" // assert that the status bar too is updated correctly while the help window is open"},{"lineNumber":66,"author":{"gitId":"-"},"content":" // note: the select command tested above does not update the status bar"},{"lineNumber":67,"author":{"gitId":"-"},"content":" executeCommand(DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertNotEquals(StatusBarFooter.SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Asserts that the help window is open, and closes it after checking."},{"lineNumber":73,"author":{"gitId":"-"},"content":" */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" private void assertHelpWindowOpen() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertTrue(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" new HelpWindowHandle(guiRobot.getStage(HelpWindowHandle.HELP_WINDOW_TITLE)).close();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts that the help window isn\u0027t open."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private void assertHelpWindowNotOpen() {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":88}}] +[{"path":"README.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":"https://travis-ci.org/CS2103JAN2018-F14-B1/main[image:https://travis-ci.org/CS2103JAN2018-F14-B1/main.svg?branch\u003dmaster[Build Status]]","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"https://ci.appveyor.com/project/lithiumlkid/main/branch/master[image:https://ci.appveyor.com/api/projects/status/2itvfqp2b8xnaqqn/branch/master?svg\u003dtrue[Build status]]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"https://coveralls.io/github/CS2103JAN2018-F14-B1/main?branch\u003dmaster[image:https://coveralls.io/repos/github/CS2103JAN2018-F14-B1/main/badge.svg?branch\u003dmaster[Coverage Status]]","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"image:https://circleci.com/gh/CS2103JAN2018-F14-B1/main.svg?style\u003dsvg[\"CircleCI\", link\u003d\"https://circleci.com/gh/CS2103JAN2018-F14-B1/main\"]","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"https://gitter.im/se-edu/Lobby[image:https://badges.gitter.im/se-edu/Lobby.svg[Gitter chat]]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"image::docs/images/MyTeamManagerLogo.png[width\u003d\"100\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/MyTeamManagerLogo.png[width\u003d\"600\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"image::docs/images/Ui.png[width\u003d\"600\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction to MTM","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop based team managing application for football team managers. +","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"It uses a Command Line Interface (CLI).","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"MTM is equipped with multiple features in helping you efficiently","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"and effectively manage your players, while keeping track of the team\u0027s schedule. +","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"With MTM\u0027s aesthetically pleasing graphical user interface, viewing critical information will be quick and painless.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"Never lose track of your training schedule again! +","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"Say goodbye to manual tracking of information on excel sheet after excel sheet!","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"\u003d\u003d What MTM Can Do - Key Features","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"* Set up Teams","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"* Add Players to Teams","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":"* Add Player\u0027s personal details, position, rating, avatar etc.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"* View, Edit and Delete Players","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"* Sort players by field of choice","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"Come and take a look at our \u003c\u003cUserGuide#, User Guide\u003e\u003e to get started with MTM now.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"* My Team Manager is morphed from https://github.com/se-edu/addressbook-level4[AddressBook-Level4] application, a project created by SE-EDU initiative.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"_Marco Jakob_.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Libraries used: https://github.com/TomasMikula/EasyBind[EasyBind], https://github.com/TestFX/TestFX[TextFX], https://bitbucket.org/controlsfx/controlsfx/[ControlsFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/google/guava[Guava], https://github.com/junit-team/junit4[JUnit4]","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":5,"codeeong":16,"-":41}},{"path":"docs/DeveloperGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - Developer Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main/tree/master","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"By: `F14-B1`      Since: `Mar 2018`      Licence: `MIT`","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"// tag::overview[]","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a team managing application for football coaches. MTM is designed to be quick and easy for you to manage a team of players without the need of a mouse.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"This developer\u0027s guide provides information that will not only show the design principles of the project, but allow you to understand the different implementations, and give you the opportunity to get started with being a contributor or as a reference for experienced developer.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This developer\u0027s guide consist of the following sections:","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cSetting up, Setting up\u003e\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign, Design\u003e\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"* \u003c\u003cImplementation, Implementation\u003e\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"* \u003c\u003cDocumentation, Documentation\u003e\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"* \u003c\u003cTesting, Testing\u003e\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"* \u003c\u003cDev Ops, Dev Ops\u003e\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"// end::overview[]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"The following pointers teach you how to get started with developing on our application. You’ll learn how to prepare yourself with the project on IntelliJ and run it. Then, you’ll update configurations in IntelliJ to easily match the coding standards and you’ll be ready to start coding.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"But before you start, there are two fundamental prerequisites you should know about MTM:","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"MTM is written in Java 8 and with the use of an integrated development environment (IDE) such as IntelliJ, it provides you as a developer with a better environment suited for developing MTM to maintain coding standards and provide continuous integration.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". You are required to have *JDK `1.8.0_60`* or later,","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8. +","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"You can download Java 8 from link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151[here].","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":". and *IntelliJ* IDE.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them. +","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"You can download IntelliJ from link:https://www.jetbrains.com/idea/download/#section\u003dwindows[here].","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up the project on your computer","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"Before you begin setting up the project, please ensure that you’ve done the following on our GitHub repository (repo).","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Upon completion of forking from our GitHub repo, you can proceed to set up your project on IntelliJ.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":". Click `Import Project`","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":". Click `Open as Project`","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message which will generate all resources required by the application and tests.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"Now that you’ve properly setup your project, you can verify that you have done everything properly.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":". \u003c\u003cTesting,Run the tests\u003e\u003e to ensure they all pass.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"You have verified the setup and you’re all ready to dive into the code, but before you do, check out the following configurations that will help you make your coding more integrated and accurate.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.adoc[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `se-edu/addressbook-level4` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `se-edu/addressbook-level4`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"After setting up Travis, you can optionally set up coverage reporting for your team fork (see \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"Coverage reporting could be useful for a team repository that hosts the final version but it is not that useful for your personal fork.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Getting started with coding","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"When you are ready to start coding,","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading \u003c\u003cDesign-Architecture\u003e\u003e.","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"2. Dive right in and get started with programming.","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"\u003d\u003d Design","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"After you have successfully configured MTM, you are encouraged to read through the following section to understand the design of the software. The design section covers a high level overview the architecture and components of the software, as well as how common classes, configuration and logging throughout development are being used.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"[[Design-Architecture]]","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Software Architecture","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"The *_Architecture Diagram_* given below (Figure 1) explains the high-level design of the App.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":".Architecture Diagram","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"Given below is a quick overview of each component.","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"\u003c\u003cDesign-Commons,*`Commons`*\u003e\u003e represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Ui,*`UI`*\u003e\u003e: The UI of the App.","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Logic,*`Logic`*\u003e\u003e: The command executor.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Model,*`Model`*\u003e\u003e: Holds the data of the App in-memory.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Storage,*`Storage`*\u003e\u003e: Reads data from, and writes data to, the hard disk.","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"Each of the four components","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":".Class Diagram of the Logic Component","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 1)","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 2)","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"[[Design-Ui]]","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":"The UI Component contains a MainWindow that consists of various parts e.g. CommandBox, ResultDisplayer, TeamDetails, PersonListPanel, PlayerDetails etc. The UI classes are all child classes of the abstract UiPart class.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"lithiumlkid"},"content":"The structure of the UI component is shown in the figure below:","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":".Structure of the UI Component","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `PlayerDetails` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `UI` component,","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"[[Design-Logic]]","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"lithiumlkid"},"content":"The Logic Component handles how each command would be parsed and executed. The class diagrams below illustrates the structure of the Logic Component and the structure of each individual commands.","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"[[fig-LogicClassDiagram]]","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":".Structure of the Logic Component","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":".Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in \u003c\u003cfig-LogicClassDiagram\u003e\u003e","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"*API* :","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":".Interactions Inside the Logic Component for the `delete 1` Command","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"[[Design-Model]]","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"lithiumlkid"},"content":"The Model Component handles the players and teams data structures in My Team Manager. These structures also provide APIs to create, read, update and delete the details of these objects. The class diagram below shows the structure of the Model Component.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":".Structure of the Model Component","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"The `Model`,","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"* stores the Address Book data.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"[[Design-Storage]]","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"lithiumlkid"},"content":"Any changes made to the data is retained and handled by the Storage Component. The structure of this component is shown in Figure 10 below.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":".Structure of the Storage Component","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"The `Storage` component,","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"[[Design-Commons]]","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"lithiumlkid"},"content":"All classes used by the different components can be found in the `seedu.addressbook.commons` package.","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"// tag::logging[]","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"lithiumlkid"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See \u003c\u003cConfiguration,Configuration\u003e\u003e)","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"*Logging Levels*","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"[[Implementation-Configuration]]","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"// end::logging[]","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Pre-existing","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undo/Redo feature","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":".Logic Class Diagram","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" // ... list logic ...","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" // ... undo logic ...","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" executeUndoableCommand();","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" // ... delete logic ...","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 1)","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 1)","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 2)","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Sequence Diagram","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 2)","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 3)","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Activity Diagram","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"650\"]","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `UndoableCommand`","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()`.","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"** Pros: We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist.","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"** Cons: Hard for new developers to understand the template pattern.","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"* **Alternative 2:** Just override `execute()`.","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"** Pros: Does not involve the template pattern, easier for new developers to understand.","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"** Cons: Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How undo \u0026 redo executes","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Saves the entire address book.","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"** Pros: Easy to implement.","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":"** Cons: May have performance issues in terms of memory usage.","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"* **Alternative 2:** Individual command knows how to undo/redo by itself.","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"** Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"** Cons: We must ensure that the implementation of each individual command are correct.","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Type of commands that can be undone/redone","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`).","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"** Pros: We only revert changes that are hard to change back (the view can easily be re-modified as no data are * lost).","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"** Cons: User might think that undo also applies when the list is modified (undoing filtering for example), * only to realize that it does not do that, after executing `undo`.","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"* **Alternative 2:** Include all commands.","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"** Pros: Might be more intuitive for the user.","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"** Cons: User have no way of skipping such commands if he or she just want to reset the state of the address * book and not the view.","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Additional Info:** See our discussion https://github.com/se-edu/addressbook-level4/issues/390#issuecomment-298936672[here].","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Aspect: Data structure to support the undo/redo commands","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Use separate stack for undo and redo.","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"** Pros: Easy to understand for new Computer Science student undergraduates to understand, who are likely to be * the new incoming developers of our project.","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"** Cons: Logic is duplicated twice. For example, when a new command is executed, we must remember to update * both `HistoryManager` and `UndoRedoStack`.","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"* **Alternative 2:** Use `HistoryManager` for undo/redo.","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"** Pros: We do not need to maintain a separate stack, and just reuse what is already in the codebase.","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"** Cons: Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two * different things.","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Player-Related Enhancements","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"lithiumlkid"},"content":"// tag::player[]","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Player Component `[since v1.3]`","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"lithiumlkid"},"content":"`Player` is one of the core components of MTM. To implement it, we used the same `Person` object and added additional attributes to it. Shown below is the","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"lithiumlkid"},"content":"new constructor for the Person object followed by the class diagram.","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"lithiumlkid"},"content":"public Person(Name name, Phone phone, Email email, Address address, Remark remark, TeamName teamName,","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"lithiumlkid"},"content":" Set\u003cTag\u003e tags, Rating rating, Position position, JerseyNumber jerseyNumber, Avatar avatar) {","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"lithiumlkid"},"content":" ...","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"lithiumlkid"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"lithiumlkid"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"lithiumlkid"},"content":" this.rating \u003d rating;","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"lithiumlkid"},"content":" this.position \u003d position;","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"lithiumlkid"},"content":" this.jerseyNumber \u003d jerseyNumber;","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"lithiumlkid"},"content":" this.avatar \u003d avatar;","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"lithiumlkid"},"content":".Person Class Diagram","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"lithiumlkid"},"content":"image::PlayerClassDiagram.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"lithiumlkid"},"content":"The additional attributes are: \u003c\u003cteam,teamName\u003e\u003e, \u003c\u003cremark,Remark\u003e\u003e, \u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e.","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"lithiumlkid"},"content":"The add and edit command has also been updated to include \u003c\u003cteam,teamName\u003e\u003e,\u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e.","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"lithiumlkid"},"content":"One thing to note is that in `executeUndoableCommand()`","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"lithiumlkid"},"content":"in both add and edit commands now does two additional things, setting the file path for players avatar, and assigning a player to a team","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"lithiumlkid"},"content":"and adding person to current filtered list. Shown below is the code snippet of the new `executeUndoableCommand()` and sequence diagram","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"lithiumlkid"},"content":"of the new add command as an example.","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"lithiumlkid"},"content":"[[AddSequence]]","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"lithiumlkid"},"content":" @Override","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"lithiumlkid"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"lithiumlkid"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"lithiumlkid"},"content":" try {","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"lithiumlkid"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"lithiumlkid"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"lithiumlkid"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"lithiumlkid"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"lithiumlkid"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"lithiumlkid"},"content":" } else { ...","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"lithiumlkid"},"content":".Add Sequence Diagram","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"lithiumlkid"},"content":"image::AddSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"lithiumlkid"},"content":"[[rating]]","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Rating Class","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"lithiumlkid"},"content":"The `Rating` class contains a `String value`. `value` holds the players rating, an integer from 0 to 5. It uses a validation regex `[0-5]`","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"lithiumlkid"},"content":"to ensure valid input.","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Rating` is `ra/`","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"lithiumlkid"},"content":"[[position]]","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Position Class","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"lithiumlkid"},"content":"The`Position` class contains a `String value`. `value` here holds the players position, an integer from 1 to 4. It uses a validation regex `[1-4]` to ensure valid input.","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `po/`.","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"lithiumlkid"},"content":"A static hashmap is used to store and retrieve the corresponding position names of the position values. The position name can be called using the method `getPositionName()` which returns `myMap.get(value)`.","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for the `hashmap` and `getPositionName()` is shown below.","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"lithiumlkid"},"content":"private static final Map\u003cString, String\u003e myMap;","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"lithiumlkid"},"content":"static {","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"lithiumlkid"},"content":" Map\u003cString, String\u003e aMap \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"1\", \"Striker\");","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"2\", \"Midfielder\");","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"3\", \"Defender\");","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"4\", \"Goalkeeper\");","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"lithiumlkid"},"content":" myMap \u003d Collections.unmodifiableMap(aMap);","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"lithiumlkid"},"content":"}","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"lithiumlkid"},"content":"public String getPositionName() {","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"lithiumlkid"},"content":" return myMap.get(value);","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"lithiumlkid"},"content":"}","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"lithiumlkid"},"content":"[[jersey]]","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d JerseyNumber Class","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"lithiumlkid"},"content":"The`JerseyNumber` class contains a `String value`. `value` here holds the players jersey number, an integer from 0 to 99. It uses a validation regex `[0-9]|[1-8][0-9]|9[0-9]` to ensure valid input.","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `j/`.","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"lithiumlkid"},"content":"[[avatar]]","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Avatar Class","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"lithiumlkid"},"content":"The`Avatar` class contains a `String value`. `value` here holds the absolute filepath to the players avatar image file, a png of jpeg file. It uses a validation regex `([^\\s]+(\\.(?i)(jpg|png))$)` to ensure valid input.","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Avatar` is `av/`.","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"lithiumlkid"},"content":"When the class is created, the `value` stores the original location of the players avatar image file eg. `C:\\image.png` or if not specified, stores \"\u003cUNSPECIFIED\u003e\".","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"lithiumlkid"},"content":"Thereafter, if the avatar is specified when \u003c\u003cAddSequence,adding\u003e\u003e or editing a player, `setFilePath()` is called which will attempt to copy the image file to a `/image` folder that is in the same directory as the `MTM.jar` file.","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"lithiumlkid"},"content":"`value` is then updated to the new file path.","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for setFilePath() is shown below.","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"lithiumlkid"},"content":"public void setFilePath(String player) throws IOException {","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"lithiumlkid"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"lithiumlkid"},"content":" return;","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"lithiumlkid"},"content":" final File file \u003d new File(value);","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"lithiumlkid"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"lithiumlkid"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"lithiumlkid"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"lithiumlkid"},"content":" this.value \u003d dest.toString();","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"lithiumlkid"},"content":"// end::player[]","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"// tag::remark[]","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Remark a Player `[since v1.1]`","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"Leaving a remark would be ideal for the user to note down any important detail of a player that is useful in the future.","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"-"},"content":"Remarks given can be in any format and therefore would not look good if it was done using tags instead, as tags are used with minimal words.","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"-"},"content":"The remark mechanism is facilitated by `RemarkCommand` and it inherits from `UndoableCommand`, making it undoable. The mechanism allows user to perform the adding, editing, and deleting of a single remark to a specified `Person` via the `INDEX` from the list shown in the `UI`. The field `remark` is similar to the other fields of `Person`, hence some of its logic in `AddCommand.java` and `EditCommand.java` are updated.","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"The mechanism uses the command `remark` and a `r/` prefix to add, edit, and delete a single remark of a `Person`. When the user leaves the remark as empty after the `r/` prefix, it is an indication to delete the remark, and when it is valid, it either create a new remark for that `Person` or overwrites the current existing remark. Only one `remark` is saved at a time. If the user `remark` on the same person, it will be overwritten.","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"-"},"content":"The field `remark` is found in `Person`, and it is not modified via `add` or `edit` commands. All functions related to `remark` is done strictly via the `remark` command.","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remark` command:","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":".Remark Activity Diagram","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::RemarkActivityDiagram.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"The `remark` field is not required when adding or editing a `Person`, and it will be initialized to an empty string or retrieved to fit the implementation of the other fields.","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows how remark is initialized as empty.","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"-"},"content":" //...AddCommandParser code...","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"-"},"content":" Remark remark \u003d new Remark(\"\");","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":" Person person \u003d new Person(name, phone, email, address, remark, teamName, tagList, rating,","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":" position, jerseyNumber, avatar);","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":" //...AddCommandParser code...","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"lithiumlkid"},"content":"}","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"-"},"content":"Code snippet from `EditCommand.java` that shows how remark is being retrieved.","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"private static Person createEditedPerson(Person personToEdit,","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":" //...EditCommand code...","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate()) ? personToEdit.getRemark()","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":" : personToEdit.getRemark();","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber,","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":" updatedAvatar);","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` field","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Creates an additional `remark` field in `Person`.","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"** Pros: Follows the existing style of similar fields, making implementation easier.","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"** Cons: Could only have 1 remark per person, unless `remark` mechanism follows the `tag` mechanism to have multiple remarks.","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"* **Alternative 2:** Have a list of remarks that associates with the specified `Person`.","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"** Pros: Can have multiple remarks associating with a specific `Person`.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"** Cons: Harder to maintain, more complicated.","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` command","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Create a specific command for remarking `Person`.","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"** Pros: Optional for user to enter remark during add, and have an isolated command to give remarks to a player that works as an add and edit command for remark.","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"** Cons: Increases the number of commands available for the user, and could mistaken that remark can be done using add/edit command.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make it similar to how other fields are implemented in `Person`.","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"** Pros: Quick and easy implementation as it uses the same format as other fields, and can be added and modified through `add` and `edit` commands.","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"** Cons: An additional field that can be input when adding a player, making the process longer to execute the command.","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"// end::remark[]","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"// tag::privatefield[]","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Setting various player fields to private `[since v1.4]`","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"lohtianwei"},"content":"`Phone`, `Email`, `Remark`, `Rating` and `Address` of a player has an additional boolean attribute","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"lohtianwei"},"content":"`isPrivate` which tracks the privacy of the particular field. When a player is added into MTM, `isPrivate` of these","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"lohtianwei"},"content":"fields are set to \u0027false\u0027 by default.","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"lohtianwei"},"content":"Each of these fields have a different `toString` method which would return `\u003cPrivate \u0027FIELD\u0027\u003e` if privacy of","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"lohtianwei"},"content":"the field is set to \u0027true\u0027, as shown in the following code snippet:","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"lohtianwei"},"content":"@Override","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"lohtianwei"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"lohtianwei"},"content":" return value;","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"lohtianwei"},"content":"`XmlAdaptedPerson` under the storage portion has been edited to save the `isPrivate` value for the fields:","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"lohtianwei"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"lohtianwei"},"content":" private Boolean phonePrivacy;","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"lohtianwei"},"content":"Toggling of privacy works in a similar way to `Edit`. New fields will be created with privacy settings of `EditPersonPrivacy`","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"lohtianwei"},"content":" based on user input. This is done by first detecting if a particular prefix is present when command is","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"lohtianwei"},"content":"entered in `TogglePrivacyCommandParser`:","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"lohtianwei"},"content":"if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"lohtianwei"},"content":"If prefix of a field is not present, the privacy setting of that particular field in `EditPersonPrivacy` would be null.","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"lohtianwei"},"content":"In `TogglePrivacyCommand`, the new fields are created with this:","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"lohtianwei"},"content":"private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"lohtianwei"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"lohtianwei"},"content":" return phone;","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"lohtianwei"},"content":"Note that in the second portion of the code, if `epp.getPrivatePhone()` is null, this would mean that it\u0027s privacy","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"lohtianwei"},"content":"setting was not toggled and thus is set to the same as it was before. Else, it would be toggled:","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"lohtianwei"},"content":"public void togglePrivacy() {","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"lohtianwei"},"content":"A new person object is then created:","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"lohtianwei"},"content":"private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"lohtianwei"},"content":"and is used to update current person:","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"lohtianwei"},"content":"model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How field privacy is implemented","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Boolean `isPrivate` added to field classes.","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"lohtianwei"},"content":"** Pros: Privacy settings can be obtained straight from class by calling getter method.","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"lohtianwei"},"content":"** Cons: Adddtional methods are needed to set and get value of `isPrivate`.","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Field privacy settings stored in `Person` in a HashMap.","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"lohtianwei"},"content":"** Pros: Field privacy can be accessed and modified easily","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"lohtianwei"},"content":"** Cons: `Person` has to be accessed every time field privacy needs to be checked","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Privacy of fields upon adding of player","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** All newly added players\u0027 fields are not private by default.","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"lohtianwei"},"content":"** Pros: `Add` command does not need to be tweaked to allow adding player with private fields.","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"lohtianwei"},"content":"** Cons: After adding players, user has to do additional command to toggle privacy of fields.","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Include implementation of prefixes that denotes private field during `Add`.","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"lohtianwei"},"content":"** Pros: Newly added players can have private fields right away.","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"lohtianwei"},"content":"** Cons: Addtional changes has to be made to `Add` command.","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"// end::privatefield[]","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Sorting players by fields `[since v1.2]`","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"lohtianwei"},"content":"The `sort` command is currently able to sort players by name, email, address, rating, jersey and postition in either ascending or descending order. Support for more fields will be added in subsequent updates.","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"lohtianwei"},"content":"* The `sort` command is parsed through `SortCommandParser` which hands control to the `SortCommand` class.","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"lohtianwei"},"content":"* Java Collections Sort API is used together with a custom `Comparator` in this implementation","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"lohtianwei"},"content":"Sorting is facilitated by the `SortCommand` which uses method `sortPlayers` to ultimately call method `sortBy` in UniquePersonList for the actual sorting as shown in this code snippet:","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"lohtianwei"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"lohtianwei"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"lohtianwei"},"content":" //... code for other switch cases...","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"lohtianwei"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"lohtianwei"},"content":"The code above utilises a custom `Comparator` defined in the sample code below:","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"lohtianwei"},"content":"The following sequence diagram shows the program flow when `sort` is used:","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":".Sort Sequence Diagram","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"lohtianwei"},"content":"image::sortSeq.png[width\u003d\"900\"]","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"lohtianwei"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"lohtianwei"},"content":"If address book is empty, a `NoPlayerException` will be thrown by `sortBy` method in UniquePlayerList.","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `sort`","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sorting is done in `UniquePersonList`.","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"lohtianwei"},"content":"** Pros: Sorting methods resides in class that handles most operations done to list. Future changes to implementation would be easier.","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":"** Cons: Complicated flow of control passed between classes.","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sorting is done in `SortCommand`.","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":"** Pros: Easier to trace flow of control as lesser passing between classes.","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":"** Cons: Unnecessary coupling if `UniquePersonList` has to rely on `SortCommand`.","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort by multiple fields","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sort can only be done by 1 field.","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and input is straightforward.","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"** Cons: Unable to fine tune to great detail how teams are sorted and displayed.","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sort can be done by multiple fields.","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":"** Pros: Able to fine tune to great detail how teams are sorted and displayed.","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":"** Cons: Unnecessary as team managers would not need to sort players by multiple fields.","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort Persistence","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Address book is saved after sorting.","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"lohtianwei"},"content":"** Pros: Easy to implement. Allows team managers to use preferred sort pattern in every session.","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"lohtianwei"},"content":"** Cons: Previous order of players will be lost.","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Address book is not saved after sorting.","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"** Pros: Good if team manager wants to sort players for current session only.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"lohtianwei"},"content":"** Cons: Sort order is lost when program exits. More memory is used to sort a list and reverse it after.","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Team-Related Enhancements","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"// tag::team[]","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"lithiumlkid"},"content":"[[team]]","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Component `[since v1.2]`","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":"One of the core components to MTM is `Team`, and it is the base to creating more commands for the user to access capability on team management. The `Team` component provides user with better organizational methods for organizing their players and interact with multiple teams to manage them effectively.","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"We achieved the implementation of `Team` component by introducing a `UniqueTeamList` into the application which consists of a list of `Team` objects. `UniqueTeamList` is similar in context to `UniquePersonList` in which it keeps a unique list of all the `Team` objects. `Team` objects consist of `TeamName` object, which is used to uniquely identify the team. `Team` inherits `UniquePersonList` object which stores the a list of unique `Person` objects, containing information of the player.","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":"The class diagrams below shoes the relationship between the related classes. The Team Class Diagrams are an extension to the current existing Designs of \u003c\u003cDesign-Model, `Model`\u003e\u003e, \u003c\u003cDesign-Storage, `Storage`\u003e\u003e, and \u003c\u003cDesign-Ui, `UI`\u003e\u003e.","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":".Model Component: Team Class Diagram","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"image::TeamModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":".Storage Component: Team Class Diagram","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"image::TeamStorageClassDiagram.png[width\u003d\"400\"]","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":".UI Component: Team Class Diagram","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"image::TeamUiClassDiagram.png[width\u003d\"400\"]","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"Code snippet from `Team.java` that shows the constructor for `Team`.","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"public class Team {","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":" private final TeamName teamName;","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":" public Team(TeamName teamName) {","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"For the application to store the information of `Team` into a list, we will need to introduce a new `UniqueTeamList` variable into the `AddressBook.java`, so that it will have a container for all the new `Team` objects that is going to be created in MTM.","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the declaration and initialization of `UniqueTeamList`.","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":" //...AddressBook code...","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList;","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":" return teams.asObservableList();","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":" //...AddressBook code...","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"Since `Team` inherits the `UniquePersonList` class, we are able to store `Person` object into `Team` by using the super class method `add` in `UniquePersonList`. By storing a list of players inside `Team` object, future enhancements can easily make use of the data to perform functions that requires quick access to all players in a team. However, this have created a coupling in which data made to the `changes made to `AddressBook.persons` needs to be updated in `Team` to maintain synchronicity.","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the propagation of details updated in `Person` from the full player list to the `Person` objects in `Team`.","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"-"},"content":" //...syncEditedPerson initialisation...","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"An additional `TeamName` field is also added to `Person` so that the user can quickly determine the team the player is in through the use of `PREDICATE`.","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"Code snippet from `Person.java` that shows the `TeamName` field.","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"public class Person {","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":" private final TeamName teamName;","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":" public Person(Name name, Phone phone, Email email, Address address, Remark remark,","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":" TeamName teamName, Set\u003cTag\u003e tags, Rating rating, Position position,","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":" JerseyNumber jerseyNumber, Avatar avatar) {","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":" //...attributes initialisation...","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":" public TeamName getTeamName() {","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":" return teamName;","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":"Code snippet from `ModelManager.java` that shows the use of filtering the person list using the `TeamName` field in `Person`.","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"@Override","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"Additional exception classes are also created so that these new exceptions can be thrown during the program, such that when these exceptions are thrown, the code is easily comprehensible.","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":".`TeamNotFoundException.java`","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"public class TeamNotFoundException extends Exception {","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":" //...TeamNotFoundException...","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":".`DupliecateTeamException.java`","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"public class DuplicateTeamException extends DuplicateDataException {","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":" //...DuplicateTeamException...","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"-"},"content":"Implementing a new component into MTM, the data consisting of `Team` is also stored into storage using `XmlAdaptedTeam.java` to format the output.","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"Code snippet from `XmlAdaptedTeam.java` that shows the elements that will be stored into storage.","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":"public class XmlAdaptedTeam {","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":" private String teamName;","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Team`","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `Team` object stores a `Person` object that is also in `UniquePersonList` and `TeamName` is also an attribute of `Person`.","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"** Pros: Provides an easier lookup of person belonging in which team without the need of iterating through the `UniqueTeamList` for a specific `Person`, and provide ease of access to data for future enhancements.","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"** Cons: Checks to ensure synchronicity need to be done thoroughly to ensure that player information is in sync between Team and full player list","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"* **Alternative 2:** `Team` object is stored in `Person` object as an attribute.","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"-"},"content":"** Pros: Logical thought process to include `Team` as an attribute.","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"-"},"content":"** Cons: Excess storage wasted due to duplicated data of `Team` in every `Person`.","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"-"},"content":"// end::team[]","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"-"},"content":"// tag::teamfunction[]","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Functions `[since v1.4]`","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"To assist the user with manging teams, we have decided to use the design concept of Create-Read-Update-Delete (CRUD) to implement commands related to `Team`.","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"-"},"content":"This set of commands provide the basic necessities for the user to efficiently use our application.","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Based on the principles of CRUD, we have created the commands that corresponds to each principles, namely, `create`, `view`, `rename` and `assign`, `remove`.","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"-"},"content":"With these commands, the application is ready to support the features that the application is designed to be used.","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"-"},"content":"Team-related commands that modifies the data in the application, such as `create`, `rename`, `assign`, and `remove`, inherits from `UndoableCommand` class which makes all these commands undoable. Each command has its own `Parser` to uniquely parse user input arguments for the commands, so that it is validated and the command understand what it should be doing.","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"-"},"content":"For each feature, new functions are created in `AddressBook.java` and `ModelManager.java` so that the commands executed are able to manipulate the data accordingly.","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `create`: Creates a `Team`, so that other team-related commands can be executed.","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"-"},"content":"After the creation of a new team, the user will then be able to perform a new set of commands that performs team management functionality. Moreover, the `add` command can be used with the prefix `tm/` to immediately add the user into MTM and into the team specified.","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `create` command:","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":".Logic Component: Create Sequence Diagram","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram1.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"-"},"content":".Model Component: Create Sequence Diagram","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram2.png[width\u003d\"70%\"]","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `view`: Views a `Team`, which shows all players in the team.","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"The command uses the `filteredPersons` list, and an overloaded `updateFilteredPersonList` method that sets a predicate that filters the list based on a `TeamName`, in `ModelManager.java` so that it can be displayed via the UI.","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `view` command:","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":".View Sequence Diagram","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"image::TeamViewSequenceDiagram.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `rename`: Renames a given `Team`.","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":"The user can rename a specified team to a new team name only if the current team name does not existing in MTM. On a side note, it prevents the user from renaming the team to the same name that it currently have.","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"This command will update the name of the teams that are in `teams` in `AddressBook.java` and will update all the players `TeamName` field in `persons` and `Team` with the new team name.","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `rename` command:","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"-"},"content":".Logic Component: Rename Sequence Diagram","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram1.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":".Model Component: Rename Sequence Diagram","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram2.png[width\u003d\"70%\"]","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `assign`: Assign a set of `Person` to a specified `Team`.","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"The core feature that organizes the player into teams so that the user can easily view the desired team players quickly. The command have 2 functions, firstly it is able to assign an individual or a set of players to a specified team, and secondly, it is able to unassign an individual or a set of players from any team.","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"The command takes in a set of indexes that corresponds to the player in the current list, and will perform the assign operation in ascending index order. If the command is unable to process an index given, it will process all the valid index until the index that causes an issue.","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Typical issues that the command handles are,","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"* Assigning a player to the same team that it is currently in.","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":"* Assigning a player to team that does not exist.","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"* Unassigning a player that does not exist in any team.","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"* Process index starting from 1.","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"* Removes all index that exceeds the current number of player listed.","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"This command will update and synchronise all affected players in `persons` and in the specified `Team` object, such that their `TeamName` field in `Person` are updated with the new assigned or unassigned team. At the same time, the list of players in `Team` gets update if new player are assigned or unassigned.","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `assign` command:","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":".Assign Sequence Diagram","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"image::TeamAssignSequenceDiagram.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `remove`: Removes the given `Team`.","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":"The final step in completing the CRUD design is the removal of team. It will delete the `Team` from `teams` list in `AddressBook.java` and will update all affected players in the team to be unassigned from the team by having their `TeamName` field updated with an unspecifed field.","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remove` command:","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":".Logic Component: Remove Sequence Diagram","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram1.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":".Model Component: Remove Sequence Diagram","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram2.png[width\u003d\"70%\"]","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Team Functions","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Uses CRUD design concept to create new commands.","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"** Pros: Systematic approach in dealing with what functions should be created to ensure that the product has the features required to perform team management, and provides a platform to work on ideal features that target the needs of the audience.","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"-"},"content":"** Cons: Simple and only captures the basic requirements of the product.","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"-"},"content":"* **Alternative 2:** Implement commands based on suggested features.","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"** Pros: End product will have features that targets the need of the audiences.","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"** Cons: Possible to miss out basic and core features of a team management application.","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Undoable commands for Team Functions","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Make all functions that modifies data to be undoable.","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"** Pros: Follows the current implementation of `undo` such that if data are modified in MTM, it will be an undoable command.","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"-"},"content":"** Cons: Need to ensure that regression bugs are squashed when the new commands are executed, and time consuming in identifying regression.","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make all functions not undoable.","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and will produce lesser regression bugs.","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"-"},"content":"** Cons: Does not align with the current implementation of `undo` \u0026 `redo`, and the user would require more steps to revert any changes made.","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"// end::teamfunction[]","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"-"},"content":"// tag::showbestxi[]","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Show Best XI `[coming in v2.0]`","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"lohtianwei"},"content":"The `showBest` command is able to show the current team\u0027s best 11 players. There is however no functional implementation for this feature yet. Coming soon!","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"-"},"content":"// end::showbestxi[]","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Usability Enhancements","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"-"},"content":"// tag::key[]","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Toggle lock on MTM `[since v1.5]`","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"-"},"content":"Locking mechanism of MTM can be toggled on and off using the `Key` command. It utilises the Model to access","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"-"},"content":"user preferences of MTM. Current lock state and password is stored in `UserPrefs` in the Storage component.","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"lohtianwei"},"content":"This activity diagram shows the logic behind the `Key` command:","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"lohtianwei"},"content":".Key Activity Diagram","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"lohtianwei"},"content":"image::Keyactdiag.png[width\u003d\"900\"]","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"-"},"content":"Password checking done in `Key` command:","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"-"},"content":"private boolean correctPassword() {","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"-"},"content":" UserPrefs up \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"-"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"-"},"content":" return hash.equals(up.getAddressBookHashedPass());","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"-"},"content":"When password check is done, the lock on MTM is toggled to the state opposite of the current:","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"-"},"content":"if (correctPassword()) {","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"-"},"content":" if (model.getLockState()) {","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"-"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"-"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"-"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"-"},"content":"In a locked state, only certain functions of MTM can be used. This is to prevent unauthorised tampering with the details","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"-"},"content":"stored on MTM.","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"-"},"content":"This is done in `AddressBookParser`. Commands are split into low level or not. When a command is","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"-"},"content":"being executed, it is checked if it falls under the low level category. If so, it would execute. When adding new features,","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"-"},"content":"add them to this list should you feel it is \u0027low level\u0027:","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"-"},"content":"private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"-"},"content":" switch(commandWord) {","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"-"},"content":" return new ChangeThemeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"-"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"-"},"content":" return new KeyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"-"},"content":" return new ViewCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"-"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"-"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"-"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"-"},"content":"If command being executed does not fall into the category of \u0027low level\u0027, a check on the lock state of MTM is done","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"-"},"content":"before allowing or restricting access:","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"-"},"content":"if (lockState) {","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_RESTRICTED);","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of locking MTM","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Lock is toggled with only a single command `Key`.","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"-"},"content":"** Pros: Easy to implement, just check current lock state and switch it.","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"-"},"content":"** Cons: With a toggle, user might unlock MTM thinking he/she is locking it.","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"-"},"content":"* **Alternative 2:** Locking and unlocking of MTM is done with two separate commands.","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"-"},"content":"** Pros: Ensures that when a lock is done, MTM is truly locked.","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"-"},"content":"** Cons: Addtional command needs to be created, along with its command parser and implementations.","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"-"},"content":"// end::key[]","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"-"},"content":"// tag::changepass[]","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change Password `[coming in v2.0]`","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"-"},"content":"Default password used for toggling lock on MTM is currently \u0027ilikesports\u0027. In an upcoming update, user would be able","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"-"},"content":"to change this password to one of his choosing. There is currently no functional implementation for this feature yet.","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"Coming soon!","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"-"},"content":"// end::changepass[]","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d User Experience Enhancements","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"-"},"content":"// tag::autocomplete[]","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Tab Autocomplete","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"-"},"content":"The tab autocomplete feature works by handling the Tab key pressed event, searching for any commands with matching prefix and returns one if found.","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"The command strings are stored in a Trie data structure, named `CommandTrie`, for optimal search.","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"public class CommandTrie {","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"-"},"content":" String attemptAutoComplete (String input);","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":" void insert (String input);","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":" Set\u003cString\u003e getCommandSet();","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"-"},"content":"The trie is made up of `TrieNode` objects which contains three objects. The `TrieNode sibling` represents a character on the same level as the current one. The `TrieNode child` represents a next possible letter.","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"-"},"content":"For example in the words `edit` and `exit`, the node for `d` would have a child `i` and a sibling `x`. `x` would have a child `i`.","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"-"},"content":"public class TrieNode {","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"-"},"content":" private TrieNode sibling;","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"-"},"content":" private TrieNode child;","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"-"},"content":" private char key;","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"-"},"content":" ...","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"-"},"content":"Upon the pressing of the tab key, the command box calls `attemptAutoComplete`, in the `commandTrie` class. With the content of the command box as the query, attemptAutoComplete searches for the query using the standard Trie search algortihm.","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"-"},"content":"If the query prefix itself is not present in the trie, then the attempt fails. If the query reaches a `TrieNode` with a `sibling` or `child` `TrieNode`,","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"-"},"content":"it will provide the user with possible commands for a given input. In this case, a dropdown box will appear in the UI that lists the possible commands for the user.","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"-"},"content":"Upon finding a matching command, `attemptAutoComplete` returns it and replaces the text in the Command Line. If the no matching command is found, the text is turned red.","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"-"},"content":"// end::autocomplete[]","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"-"},"content":"// tag::enhancedadd[]","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Optional Field Add Command `[since v1.1]`","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"-"},"content":"MTM is designed to manage a multitude of players and the main function that would be used repetitively is the `add` command, hence it would alleviate the cumbersomeness of entering every detail of the players when you want the command to be executed quickly.","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"-"},"content":"Having the option to only entering the mandatory fields and leaving the optional ones empty will make the process of adding players more efficient.","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"-"},"content":"This mechanism enhances the original implementation of the `add` command.","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"-"},"content":"The required fields that are mandatory to be filled by the user are `n/NAME` and `e/EMAIL`.","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"-"},"content":"This implementation of making fields optional for `AddCommand` allows user to add players without their full information, and can be updated accordingly when the user retrieves their full information.","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"-"},"content":"Code snippet from `ParserUtil.java` that shows the implementation of when a field is left empty.","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"-"},"content":"\"\u003cUNSPECIFIED\u003e\" string will be return when the value passed in is empty.","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"-"},"content":"public class ParserUtil {","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"-"},"content":" public static final String UNSPECIFIED_FIELD \u003d \"\u003cUNSPECIFIED\u003e\";","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"-"},"content":" //...ParserUtil code...","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"-"},"content":" public static Optional\u003cString\u003e parseValue(Optional\u003cString\u003e value, String messageConstraints)","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"-"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"-"},"content":" if (value.isPresent() \u0026\u0026 value.get().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"-"},"content":" throw new IllegalValueException(messageConstraints);","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"-"},"content":" return Optional.of(value.orElse(UNSPECIFIED_FIELD));","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"-"},"content":" //...ParserUtil code ...","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows the usage of parsing fields that are set as optional.","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"-"},"content":" //...tokenize arguments...","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"-"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_EMAIL)","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"-"},"content":" || !argMultimap.getPreamble().isEmpty()) {","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"-"},"content":" AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"-"},"content":" //...get person details from arguments...","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"-"},"content":" Address address \u003d ParserUtil.parseAddress(ParserUtil.parseValue(argMultimap","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"-"},"content":" .getValue(PREFIX_ADDRESS), Address.MESSAGE_ADDRESS_CONSTRAINTS)).get();","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"-"},"content":" return new AddCommand(person);","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"-"},"content":" //...AddCommandParser code...","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"-"},"content":"Code snippet from `Address.java` that shows an example of an optional field being valid when not specified.","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"-"},"content":" //...Address code...","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Optional fields","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Set a default value for unspecified fields and parse fields that are mandatory.","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"-"},"content":"** Pros: Easy to implement as fields are still filled with information even though user did not specify.","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"-"},"content":"** Cons: Unattractive display of fields when it is unspecified.","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"-"},"content":"* **Alternative 2:** Require users to input all fields.","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"-"},"content":"** Pros: The current implementation is used, hence there is no additional code to ensure validity of unspecified input.","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"-"},"content":"** Cons: Less flexibility is given to the user when adding a player into the application.","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"-"},"content":"// end::enhancedadd[]","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI Enhancements","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"-"},"content":"// tag::teamDisplay[]","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Team Display Bar `[since v1.3]`","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"codeeong"},"content":"The Team Display Bar is implemented as `TeamDisplay` in the UI Component and renders `TeamDisplay.fxml`.","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"codeeong"},"content":"It is called from `MainWindow` and highlights","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"codeeong"},"content":"the current team that has been selected in the Command Line Interface by the user. +","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"codeeong"},"content":"It calls the `Team` model and displays the `Player` cards associated with that `Team`.","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"codeeong"},"content":"It contains event handler methods such as handleShowNewTeamEvent(), handleHighlightSelectedTeamEvent(),","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"codeeong"},"content":"and handleDeselectTeamEvent(), which update the UI accordingly. +","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `TeamDisplay` below, using the example of a `create` command:","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"codeeong"},"content":".Component interactions for `create Team` command","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"codeeong"},"content":"image::ShowNewTeamDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027TeamDisplay\u0027 to show initialisation of UI component and event handlers:","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"-"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"-"},"content":" public TeamDisplay() {","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"codeeong"},"content":" //...initialise Teams code...","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"codeeong"},"content":" //...handleShowNewTeamEvent code...","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"codeeong"},"content":" //...handleHighlightSelectedTeamEvent code...","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"codeeong"},"content":" //...handleDeselectTeamEvent code...","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `TeamDisplay` is placed underneath the `ResultDisplay` and above the `PersonListPanel`.","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"-"},"content":"** Pros: Located at an obvious location for the user to view the team currently selected.","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"-"},"content":"** Cons: There will be less space for the `ResultDisplay` and `CommandBox`.","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"-"},"content":"* **Alternative 2:** `TeamDisplay` is placed on the left of the `PersonListPanel` as a vertical bar.","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"-"},"content":"** Pros: There will be more space for the `ResultDisplay` and `CommandBox`.","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"-"},"content":"** Cons: It is less obvious to the user as it is at the side.","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"-"},"content":"// end::teamDisplay[]","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"-"},"content":"// tag::PlayerDetails[]","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Player Details Pane `[since v1.4]`","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"codeeong"},"content":"The `Player Details` pane is implemented as `PlayerDetails` in the UI Component.","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"codeeong"},"content":"It is called from `PlayerListPanel`. It renders `PlayerDetails.fxml` and displays the selected `PersonCard`.","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"codeeong"},"content":"It calls the `Person` model and displays the fields in the `Person` model that are not displayed in the left panel.","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"codeeong"},"content":"It contains the event handler method handlePersonDetailsChangedEvent(), which updates the UI component when the `edit `","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"codeeong"},"content":"or `remark` commands are entered. +","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `PlayerDetails` below, using the example of a `remark` command:","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"codeeong"},"content":".Component interactions for `remark 1 r/test` command","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"codeeong"},"content":"image::PlayerDetailsDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"-"},"content":"Code snippet from \u0027PlayerDetails\u0027 to show initialisation of UI component:","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"-"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"-"},"content":" public final Person person;","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"-"},"content":" public PlayerDetails(Person person) {","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"-"},"content":" //....player details code...","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"codeeong"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"codeeong"},"content":" ...handlePersonDetailsChangedEvent code...","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `PlayerDetails` is placed on the right of `Person List Panel`, replacing the `BrowserPanel`.","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"-"},"content":"** Pros: It is the only large unused space in the software left and is right beside the `Person List Panel`, thus is the logical","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"-"},"content":"place to look at after selection of a person card.","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"-"},"content":"** Cons: This is a lot of whitespace in the pane as are not many fields.","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"-"},"content":"* **Alternative 2:** `PlayerDetails` pane size is reduced and the extra space is repurposed.","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"-"},"content":"** Pros: There will be more space for another new feature e.g. calendar.","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"-"},"content":"** Cons: It can only be implemented in v2.0 due to time constraints in development.","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"codeeong"},"content":"// end::PlayerDetails[]","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"codeeong"},"content":"// tag::changeThemeCommand[]","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Change Theme Command `[since v1.5]`","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"codeeong"},"content":"The `ChangeThemeCommand` is a new feature that allows user to change the current theme to another theme. A new css class is implemented to accommodate the new theme, LightTheme.","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"codeeong"},"content":"The `MainWindow` class is also changed to contain a handleChangeThemeRequestEvent() method which is an event handler to `setAddressBookTheme`,","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"codeeong"},"content":"which is a method in `UserPrefs`. +","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"codeeong"},"content":"Below is the sequence diagram for how the `ChangeThemeCommand` works:","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `changeTheme` Command","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"codeeong"},"content":"image::ChangeThemeDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1469,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1470,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027ChangeThemeCommand\u0027:","isFullCredit":true},{"lineNumber":1471,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1472,"author":{"gitId":"codeeong"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1473,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1474,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {","isFullCredit":true},{"lineNumber":1475,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1476,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {","isFullCredit":true},{"lineNumber":1477,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();","isFullCredit":true},{"lineNumber":1478,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1479,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1480,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":1481,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":1482,"author":{"gitId":"codeeong"},"content":" //...check for valid theme code...","isFullCredit":true},{"lineNumber":1483,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));","isFullCredit":true},{"lineNumber":1484,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));","isFullCredit":true},{"lineNumber":1485,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1486,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":1487,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1488,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1489,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1490,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Command Syntax","isFullCredit":true},{"lineNumber":1491,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1492,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** The command syntax is in the form \"changeTheme Dark\" or \"changeTheme Light\".","isFullCredit":true},{"lineNumber":1493,"author":{"gitId":"codeeong"},"content":"** Pros: This supports future implementation of more themes, so that the developer can easily add the new themes without","isFullCredit":true},{"lineNumber":1494,"author":{"gitId":"codeeong"},"content":"having to change the execution.","isFullCredit":true},{"lineNumber":1495,"author":{"gitId":"codeeong"},"content":"** Cons: The command is longer than it could be. (see alternative 2)","isFullCredit":true},{"lineNumber":1496,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** The command syntax in the form \"changeTheme\", which would automatically toggle the theme.","isFullCredit":true},{"lineNumber":1497,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly.","isFullCredit":true},{"lineNumber":1498,"author":{"gitId":"codeeong"},"content":"** Cons: Future implementation of more themes would be harder for the developer as the toggle function would have to be","isFullCredit":true},{"lineNumber":1499,"author":{"gitId":"codeeong"},"content":"changed quite drastically to become a command for selecting a theme out of multiple themes.","isFullCredit":true},{"lineNumber":1500,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1501,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience","isFullCredit":true},{"lineNumber":1502,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1503,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** `ChangeThemeCommand` is implemented as a CLI command.","isFullCredit":true},{"lineNumber":1504,"author":{"gitId":"codeeong"},"content":"** Pros: Consistent with the rest of the application, of which all changes are made by the CLI.","isFullCredit":true},{"lineNumber":1505,"author":{"gitId":"codeeong"},"content":"** Cons: User has yet another command to remember the syntax of.","isFullCredit":true},{"lineNumber":1506,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** Change of theme is implemented as a button to change onClick.","isFullCredit":true},{"lineNumber":1507,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly.","isFullCredit":true},{"lineNumber":1508,"author":{"gitId":"codeeong"},"content":"** Cons: Inconsistent with the rest of the application, which is CLI-based.","isFullCredit":true},{"lineNumber":1509,"author":{"gitId":"codeeong"},"content":"// end::changeThemeCommand[]","isFullCredit":true},{"lineNumber":1510,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1511,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1512,"author":{"gitId":"codeeong"},"content":"// tag::settagcolour[]","isFullCredit":true},{"lineNumber":1513,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Set Tag Colour feature `[since v1.1]`","isFullCredit":true},{"lineNumber":1514,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1515,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1516,"author":{"gitId":"codeeong"},"content":"The `Set` Command is an entirely new command that allows the user to assign a colour to a specific tag.","isFullCredit":true},{"lineNumber":1517,"author":{"gitId":"codeeong"},"content":"This mechanism is facilitated by the `SetCommandParser`, which creates and returns a new `SetCommand`.","isFullCredit":true},{"lineNumber":1518,"author":{"gitId":"codeeong"},"content":"In `SetCommandParser`, which implements the `Parser` interface, it parses the arguments inputted into the CLI, and checks whether the arguments are valid.","isFullCredit":true},{"lineNumber":1519,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1520,"author":{"gitId":"codeeong"},"content":"`SetCommandParser` is implemented as such:","isFullCredit":true},{"lineNumber":1521,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1522,"author":{"gitId":"codeeong"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1523,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1524,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {","isFullCredit":true},{"lineNumber":1525,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1526,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1527,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1528,"author":{"gitId":"codeeong"},"content":" // ...parse arguments and check for invalid arguments...","isFullCredit":true},{"lineNumber":1529,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1530,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":1531,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1532,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1533,"author":{"gitId":"codeeong"},"content":"`SetCommand` inherits the abstract `Command` class. After `execute()` is called in `SetCommand`, the tag colour is set through the logic portions of `ModelManager` and `AddressBook`, then","isFullCredit":true},{"lineNumber":1534,"author":{"gitId":"codeeong"},"content":"lastly changes `tagColour` attribute within the `Tag` object itself. It also posts an event in `SetCommand`, to which","isFullCredit":true},{"lineNumber":1535,"author":{"gitId":"codeeong"},"content":"its handler in `PersonCard` responds and performs the UI update. +","isFullCredit":true},{"lineNumber":1536,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1537,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1538,"author":{"gitId":"codeeong"},"content":"`SetCommand` is implemented in this way:","isFullCredit":true},{"lineNumber":1539,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1540,"author":{"gitId":"codeeong"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1541,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1542,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {","isFullCredit":true},{"lineNumber":1543,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1544,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;","isFullCredit":true},{"lineNumber":1545,"author":{"gitId":"codeeong"},"content":" private final String tagColour;","isFullCredit":true},{"lineNumber":1546,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1547,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":1548,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);","isFullCredit":true},{"lineNumber":1549,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;","isFullCredit":true},{"lineNumber":1550,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;","isFullCredit":true},{"lineNumber":1551,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1552,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1553,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":1554,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":1555,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":1556,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);","isFullCredit":true},{"lineNumber":1557,"author":{"gitId":"codeeong"},"content":" //...check for valid tagName code....","isFullCredit":true},{"lineNumber":1558,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));","isFullCredit":true},{"lineNumber":1559,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));","isFullCredit":true},{"lineNumber":1560,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1561,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":1562,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1563,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1564,"author":{"gitId":"codeeong"},"content":"The following sequence diagram shows how the set command operation works:","isFullCredit":true},{"lineNumber":1565,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1566,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `setTagColour` Command","isFullCredit":true},{"lineNumber":1567,"author":{"gitId":"codeeong"},"content":"image::SetTagCommandDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1568,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1569,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1570,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Command` vs `UndoableCommand`","isFullCredit":true},{"lineNumber":1571,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1572,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** Inherit from `Command`.","isFullCredit":true},{"lineNumber":1573,"author":{"gitId":"codeeong"},"content":"** Pros: Does not involve complicated undo/redo tests, simple and quicker implementation,","isFullCredit":true},{"lineNumber":1574,"author":{"gitId":"codeeong"},"content":"lessen chances of mistakes made in implementation.","isFullCredit":true},{"lineNumber":1575,"author":{"gitId":"codeeong"},"content":"** Cons: User cannot use the `undo/redo` command.","isFullCredit":true},{"lineNumber":1576,"author":{"gitId":"codeeong"},"content":"* **Alternative 2 :** Inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":1577,"author":{"gitId":"codeeong"},"content":"** Pros: User can utilise the `undo/redo` command.","isFullCredit":true},{"lineNumber":1578,"author":{"gitId":"codeeong"},"content":"** Cons: Hard for developers to implement extra tests, not very necessary as users can just as easily type","isFullCredit":true},{"lineNumber":1579,"author":{"gitId":"codeeong"},"content":"out the colour they would like to change their tag to; it is a short command, especially with the `stc` alias.","isFullCredit":true},{"lineNumber":1580,"author":{"gitId":"codeeong"},"content":"// end::settagcolour[]","isFullCredit":true},{"lineNumber":1581,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1582,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","isFullCredit":true},{"lineNumber":1583,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1584,"author":{"gitId":"-"},"content":"We use https://asciidoctor.org[asciidoc] for writing documentation.","isFullCredit":true},{"lineNumber":1585,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1586,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1587,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","isFullCredit":true},{"lineNumber":1588,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","isFullCredit":true},{"lineNumber":1590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1591,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","isFullCredit":true},{"lineNumber":1592,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","isFullCredit":true},{"lineNumber":1593,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1594,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","isFullCredit":true},{"lineNumber":1595,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1596,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","isFullCredit":true},{"lineNumber":1597,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1598,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","isFullCredit":true},{"lineNumber":1599,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1600,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","isFullCredit":true},{"lineNumber":1601,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1602,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","isFullCredit":true},{"lineNumber":1603,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1604,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","isFullCredit":true},{"lineNumber":1605,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","isFullCredit":true},{"lineNumber":1606,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","isFullCredit":true},{"lineNumber":1607,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","isFullCredit":true},{"lineNumber":1608,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1609,"author":{"gitId":"-"},"content":".Saving documentation as PDF files in Chrome","isFullCredit":true},{"lineNumber":1610,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":1611,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1612,"author":{"gitId":"-"},"content":"[[Testing]]","isFullCredit":true},{"lineNumber":1613,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":1614,"author":{"gitId":"codeeong"},"content":"If you are intending to develop our software further, it is highly recommended that you run tests in the ways listed below.","isFullCredit":true},{"lineNumber":1615,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1616,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","isFullCredit":true},{"lineNumber":1617,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1618,"author":{"gitId":"-"},"content":"There are three ways to run tests.","isFullCredit":true},{"lineNumber":1619,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1620,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":1621,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","isFullCredit":true},{"lineNumber":1622,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1623,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","isFullCredit":true},{"lineNumber":1624,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1625,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","isFullCredit":true},{"lineNumber":1626,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","isFullCredit":true},{"lineNumber":1627,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1628,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","isFullCredit":true},{"lineNumber":1629,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1630,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","isFullCredit":true},{"lineNumber":1631,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1632,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1633,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","isFullCredit":true},{"lineNumber":1634,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1635,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","isFullCredit":true},{"lineNumber":1636,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1637,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","isFullCredit":true},{"lineNumber":1638,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1639,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","isFullCredit":true},{"lineNumber":1640,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","isFullCredit":true},{"lineNumber":1642,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1643,"author":{"gitId":"-"},"content":"We have two types of tests:","isFullCredit":true},{"lineNumber":1644,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1645,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","isFullCredit":true},{"lineNumber":1646,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","isFullCredit":true},{"lineNumber":1647,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","isFullCredit":true},{"lineNumber":1648,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","isFullCredit":true},{"lineNumber":1649,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","isFullCredit":true},{"lineNumber":1650,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","isFullCredit":true},{"lineNumber":1651,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","isFullCredit":true},{"lineNumber":1652,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","isFullCredit":true},{"lineNumber":1653,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","isFullCredit":true},{"lineNumber":1654,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","isFullCredit":true},{"lineNumber":1655,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1656,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1657,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","isFullCredit":true},{"lineNumber":1658,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","isFullCredit":true},{"lineNumber":1659,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1660,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","isFullCredit":true},{"lineNumber":1661,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","isFullCredit":true},{"lineNumber":1662,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1663,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","isFullCredit":true},{"lineNumber":1664,"author":{"gitId":"codeeong"},"content":"This section covers resources for you to develop this software with good practices and prepare it for release.","isFullCredit":true},{"lineNumber":1665,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","isFullCredit":true},{"lineNumber":1667,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1668,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","isFullCredit":true},{"lineNumber":1669,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","isFullCredit":true},{"lineNumber":1671,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1674,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coverage Reporting","isFullCredit":true},{"lineNumber":1675,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1676,"author":{"gitId":"-"},"content":"We use https://coveralls.io/[Coveralls] to track the code coverage of our projects. See \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1677,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1678,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Documentation Previews","isFullCredit":true},{"lineNumber":1679,"author":{"gitId":"-"},"content":"When a pull request has changes to asciidoc files, you can use https://www.netlify.com/[Netlify] to see a preview of how the HTML version of those asciidoc files will look like when the pull request is merged. See \u003c\u003cUsingNetlify#, UsingNetlify.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1681,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","isFullCredit":true},{"lineNumber":1682,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1683,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","isFullCredit":true},{"lineNumber":1684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1685,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","isFullCredit":true},{"lineNumber":1686,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","isFullCredit":true},{"lineNumber":1687,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","isFullCredit":true},{"lineNumber":1688,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","isFullCredit":true},{"lineNumber":1689,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","isFullCredit":true},{"lineNumber":1691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1692,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","isFullCredit":true},{"lineNumber":1693,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","isFullCredit":true},{"lineNumber":1694,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","isFullCredit":true},{"lineNumber":1695,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1696,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d Product Scope","isFullCredit":true},{"lineNumber":1698,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1699,"author":{"gitId":"codeeong"},"content":"This section tells you more details of our software, our target users, the user stories, and gives you a sneak peak into our development process.","isFullCredit":true},{"lineNumber":1700,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1701,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Target user profile:","isFullCredit":true},{"lineNumber":1702,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1703,"author":{"gitId":"lohtianwei"},"content":"* football team managers","isFullCredit":true},{"lineNumber":1704,"author":{"gitId":"-"},"content":"* has a need to manage a significant number of contacts","isFullCredit":true},{"lineNumber":1705,"author":{"gitId":"-"},"content":"* prefer desktop apps over other types","isFullCredit":true},{"lineNumber":1706,"author":{"gitId":"-"},"content":"* can type fast","isFullCredit":true},{"lineNumber":1707,"author":{"gitId":"-"},"content":"* prefers typing over mouse input","isFullCredit":true},{"lineNumber":1708,"author":{"gitId":"-"},"content":"* is reasonably comfortable using CLI apps","isFullCredit":true},{"lineNumber":1709,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1710,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Value proposition:","isFullCredit":true},{"lineNumber":1711,"author":{"gitId":"codeeong"},"content":"Exclusive application for management of footballers and football teams that provides an enhanced listing of footballers and convenient lookup on updated information of players.","isFullCredit":true},{"lineNumber":1712,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1713,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Feature Contribution","isFullCredit":true},{"lineNumber":1714,"author":{"gitId":"codeeong"},"content":"* Codee +","isFullCredit":true},{"lineNumber":1715,"author":{"gitId":"-"},"content":"** Major - Revamp MTM’s whole GUI for ease of viewing teams and players’ details.","isFullCredit":true},{"lineNumber":1716,"author":{"gitId":"-"},"content":"*** e.g. remove browser panel, add player details panel, change person card.","isFullCredit":true},{"lineNumber":1717,"author":{"gitId":"-"},"content":"** Minor - Command to set the colour of tags to colour of choice.","isFullCredit":true},{"lineNumber":1718,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1719,"author":{"gitId":"codeeong"},"content":"* Jordan","isFullCredit":true},{"lineNumber":1720,"author":{"gitId":"-"},"content":"** Major - Implementation of Team Component and Related Functions.","isFullCredit":true},{"lineNumber":1721,"author":{"gitId":"-"},"content":"*** e.g. creation of team, assignment of players, viewing of teams, removal of team, renaming of team.","isFullCredit":true},{"lineNumber":1722,"author":{"gitId":"codeeong"},"content":"** Minor","isFullCredit":true},{"lineNumber":1723,"author":{"gitId":"-"},"content":"*** Introduce `remark` command and `remark` field.","isFullCredit":true},{"lineNumber":1724,"author":{"gitId":"-"},"content":"*** Enhanced add functionality to allow optional fields.","isFullCredit":true},{"lineNumber":1725,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1726,"author":{"gitId":"codeeong"},"content":"* Syafiq","isFullCredit":true},{"lineNumber":1727,"author":{"gitId":"-"},"content":"** Major - Create a new player class that contains more information about the players.","isFullCredit":true},{"lineNumber":1728,"author":{"gitId":"-"},"content":"*** e.g. Position, Rating (0 - 5 Star), Remarks","isFullCredit":true},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*** Update add, edit ,list, sort to include these fields accordingly.","isFullCredit":true},{"lineNumber":1730,"author":{"gitId":"codeeong"},"content":"** Minor - Autocomplete command","isFullCredit":true},{"lineNumber":1731,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1732,"author":{"gitId":"codeeong"},"content":"* Tianwei","isFullCredit":true},{"lineNumber":1733,"author":{"gitId":"codeeong"},"content":"** Major - privacy","isFullCredit":true},{"lineNumber":1734,"author":{"gitId":"codeeong"},"content":"*** Set private field and passwords","isFullCredit":true},{"lineNumber":1735,"author":{"gitId":"codeeong"},"content":"*** Make accounts","isFullCredit":true},{"lineNumber":1736,"author":{"gitId":"codeeong"},"content":"** Minor - Sorting players by different fields","isFullCredit":true},{"lineNumber":1737,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1739,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","isFullCredit":true},{"lineNumber":1740,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1741,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","isFullCredit":true},{"lineNumber":1742,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1743,"author":{"gitId":"-"},"content":"[width\u003d\"75%\",cols\u003d\"^8%,^23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","isFullCredit":true},{"lineNumber":1744,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1745,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","isFullCredit":true},{"lineNumber":1746,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1747,"author":{"gitId":"-"},"content":"4.1+^s|First Time User Stories","isFullCredit":true},{"lineNumber":1748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1749,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","isFullCredit":true},{"lineNumber":1750,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1751,"author":{"gitId":"-"},"content":"|`* * *` |new user |access the user guide |find out how to use fancy features of the application","isFullCredit":true},{"lineNumber":1752,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1753,"author":{"gitId":"-"},"content":"|`* * *` |new user |see a list of instructions available |navigate and use the application easily","isFullCredit":true},{"lineNumber":1754,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1755,"author":{"gitId":"-"},"content":"4.1+^s|Player Related User Stories","isFullCredit":true},{"lineNumber":1756,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1757,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add a new player|","isFullCredit":true},{"lineNumber":1758,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1759,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s address |mail him important documents","isFullCredit":true},{"lineNumber":1760,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1761,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s contact number |contact him when needed","isFullCredit":true},{"lineNumber":1762,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1763,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s email |email him when needed","isFullCredit":true},{"lineNumber":1764,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1765,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s jersey number |easily identify them during the game","isFullCredit":true},{"lineNumber":1766,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1767,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s position |easily pick my lineup for match","isFullCredit":true},{"lineNumber":1768,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1769,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player\u0027s ratings |easily identify the better players","isFullCredit":true},{"lineNumber":1770,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1771,"author":{"gitId":"-"},"content":"|`* * *` |team manager |delete a player |remove him if I kick him out from the team or he quits","isFullCredit":true},{"lineNumber":1772,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1773,"author":{"gitId":"-"},"content":"|`* * *` |team manager |find a player by name |locate details of players without having to go through the entire list","isFullCredit":true},{"lineNumber":1774,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1775,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s contact number |","isFullCredit":true},{"lineNumber":1776,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1777,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s email |","isFullCredit":true},{"lineNumber":1778,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1779,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s jersey number |","isFullCredit":true},{"lineNumber":1780,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1781,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s match stats (e.g. goals scored) |decide the lineup, give award","isFullCredit":true},{"lineNumber":1782,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1783,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player remarks |for self note","isFullCredit":true},{"lineNumber":1784,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1785,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s avatar |for facial recognition","isFullCredit":true},{"lineNumber":1786,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1787,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s position |easily pick my lineup for match","isFullCredit":true},{"lineNumber":1788,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1789,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s address |","isFullCredit":true},{"lineNumber":1790,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1791,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s avatar |","isFullCredit":true},{"lineNumber":1792,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1793,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player remarks |for self note","isFullCredit":true},{"lineNumber":1794,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1795,"author":{"gitId":"-"},"content":"|`* *` |team manager |hide \u003c\u003cprivate-contact-detail,private contact details\u003e\u003e by default |minimize chance of someone else seeing them by accident","isFullCredit":true},{"lineNumber":1796,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1797,"author":{"gitId":"-"},"content":"|`*` |team manager |edit player’s name |","isFullCredit":true},{"lineNumber":1798,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1799,"author":{"gitId":"-"},"content":"|`*` |team manager with many players in the team managing application |sort by player name |locate a person easily","isFullCredit":true},{"lineNumber":1800,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1801,"author":{"gitId":"-"},"content":"4.1+^s|Team Related User Stories","isFullCredit":true},{"lineNumber":1802,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1803,"author":{"gitId":"-"},"content":"|`* * *` |team manager |create teams |organize and manage my players through their respective team","isFullCredit":true},{"lineNumber":1804,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1805,"author":{"gitId":"-"},"content":"|`* * *` |team manager |assign player to teams |identify the team that the player is playing for","isFullCredit":true},{"lineNumber":1806,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1807,"author":{"gitId":"-"},"content":"|`* * *` |team manager |view players in specified team |identify the lineup of the team and which player belongs to which team","isFullCredit":true},{"lineNumber":1808,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1809,"author":{"gitId":"-"},"content":"|`* * *` |team manager |remove teams |remove teams that I no longer managed","isFullCredit":true},{"lineNumber":1810,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1811,"author":{"gitId":"-"},"content":"|`* *` |team manager |set match with competing team |acknowledge and plan training session for the team","isFullCredit":true},{"lineNumber":1812,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1813,"author":{"gitId":"-"},"content":"|`* *` |team manager |view upcoming match |keep track of the upcoming matches with opponent teams","isFullCredit":true},{"lineNumber":1814,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1815,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s allocated team |move players between teams","isFullCredit":true},{"lineNumber":1816,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1817,"author":{"gitId":"-"},"content":"|`* *` |team manager |schedule training programs for team |I do not have any conflicting schedule between different teams","isFullCredit":true},{"lineNumber":1818,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1819,"author":{"gitId":"-"},"content":"|`* *` |team manager |send reminder to team of schedule |my players does not forget about training session","isFullCredit":true},{"lineNumber":1820,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1821,"author":{"gitId":"-"},"content":"|`*` |team manager |sort by team name |identify group lineup easily","isFullCredit":true},{"lineNumber":1822,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1823,"author":{"gitId":"-"},"content":"4.1+^s|Additional User Stories","isFullCredit":true},{"lineNumber":1824,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1825,"author":{"gitId":"-"},"content":"|`* *` |team manager who remembers better with visual |set colours to tags |easily identify the tag that I have set to players","isFullCredit":true},{"lineNumber":1826,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1827,"author":{"gitId":"-"},"content":"|`* *` |team manager |autofill command |perform task quickly","isFullCredit":true},{"lineNumber":1828,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1829,"author":{"gitId":"-"},"content":"|`* *` |team manager |password login |if team manager wants to protect certain information","isFullCredit":true},{"lineNumber":1830,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1831,"author":{"gitId":"-"},"content":"|`* *` |team manager |submit feedback to developers |developers can improve the application constantly","isFullCredit":true},{"lineNumber":1832,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1833,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1834,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1835,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1836,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","isFullCredit":true},{"lineNumber":1837,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1838,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `MTM` and the *Team Manager* is the `user`, unless specified otherwise)","isFullCredit":true},{"lineNumber":1839,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1840,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1841,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Add player","isFullCredit":true},{"lineNumber":1842,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1843,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1844,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1845,"author":{"gitId":"-"},"content":"1. User enter command to add","isFullCredit":true},{"lineNumber":1846,"author":{"gitId":"-"},"content":"2. MTM prompt user of format to enter player\u0027s name and details","isFullCredit":true},{"lineNumber":1847,"author":{"gitId":"-"},"content":"3. User enter player\u0027s name and details in required format","isFullCredit":true},{"lineNumber":1848,"author":{"gitId":"-"},"content":"4. User press enter to insert person into storage","isFullCredit":true},{"lineNumber":1849,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1850,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1851,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1852,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1853,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1854,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1855,"author":{"gitId":"-"},"content":"* 4a. User did not enter any details.","isFullCredit":true},{"lineNumber":1856,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1857,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1858,"author":{"gitId":"-"},"content":"** 4a1. MTM inform user that it is an invalid add command.","isFullCredit":true},{"lineNumber":1859,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1860,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1861,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1862,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1863,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Edit player\u0027s team","isFullCredit":true},{"lineNumber":1864,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1865,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1866,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1867,"author":{"gitId":"-"},"content":"1. User enter command to find","isFullCredit":true},{"lineNumber":1868,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name","isFullCredit":true},{"lineNumber":1869,"author":{"gitId":"-"},"content":"3. MTM display list of players found","isFullCredit":true},{"lineNumber":1870,"author":{"gitId":"-"},"content":"4. User enter command to edit player\u0027s team using index of displayed list","isFullCredit":true},{"lineNumber":1871,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1872,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1873,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1874,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1875,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1876,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1877,"author":{"gitId":"-"},"content":"* 2a. Player name does not exist.","isFullCredit":true},{"lineNumber":1878,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1879,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1880,"author":{"gitId":"-"},"content":"** 2a1. MTM inform user that player does not exist.","isFullCredit":true},{"lineNumber":1881,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1882,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1883,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1884,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Find player by team name","isFullCredit":true},{"lineNumber":1886,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1887,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1888,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1889,"author":{"gitId":"-"},"content":"1. User enter command to find team","isFullCredit":true},{"lineNumber":1890,"author":{"gitId":"-"},"content":"2. User enter team name","isFullCredit":true},{"lineNumber":1891,"author":{"gitId":"-"},"content":"3. MTM display list of players in team","isFullCredit":true},{"lineNumber":1892,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1893,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1894,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1895,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1896,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1897,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1898,"author":{"gitId":"-"},"content":"* 2a. Team name does not exist.","isFullCredit":true},{"lineNumber":1899,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1900,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1901,"author":{"gitId":"-"},"content":"** 2a1. MTM informs user that team name does not exist","isFullCredit":true},{"lineNumber":1902,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1903,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1904,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1905,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1906,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Remove player from team","isFullCredit":true},{"lineNumber":1907,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1908,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1909,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1910,"author":{"gitId":"-"},"content":"1. User enter command to find","isFullCredit":true},{"lineNumber":1911,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name","isFullCredit":true},{"lineNumber":1912,"author":{"gitId":"-"},"content":"3. MTM display list of players found","isFullCredit":true},{"lineNumber":1913,"author":{"gitId":"-"},"content":"4. User enter remove command and index associated with player","isFullCredit":true},{"lineNumber":1914,"author":{"gitId":"-"},"content":"5. MTM displays player that is removed and updated list of players","isFullCredit":true},{"lineNumber":1915,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1916,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1917,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1918,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1919,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1920,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1921,"author":{"gitId":"-"},"content":"* 4a. Invalid index entered.","isFullCredit":true},{"lineNumber":1922,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1923,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1924,"author":{"gitId":"-"},"content":"** 4a1. MTM informs user that index is invalid.","isFullCredit":true},{"lineNumber":1925,"author":{"gitId":"-"},"content":"** 4a2. User enters valid index.","isFullCredit":true},{"lineNumber":1926,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1927,"author":{"gitId":"-"},"content":"Use case resumes at step 5.","isFullCredit":true},{"lineNumber":1928,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1929,"author":{"gitId":"-"},"content":"* 4b. User removes wrong index unintentionally.","isFullCredit":true},{"lineNumber":1930,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1931,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1932,"author":{"gitId":"-"},"content":"** 4b1. User undo remove by entering command to undo.","isFullCredit":true},{"lineNumber":1933,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1934,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1935,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1936,"author":{"gitId":"-"},"content":"_{More to be added}_","isFullCredit":true},{"lineNumber":1937,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1938,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1939,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","isFullCredit":true},{"lineNumber":1940,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1941,"author":{"gitId":"codeeong"},"content":". Should work on any mainstream OS as long as it has Java 1.8.0_60 or higher installed.","isFullCredit":true},{"lineNumber":1942,"author":{"gitId":"-"},"content":". Should be able to hold up to 150 players without a noticeable sluggishness in performance for typical usage.","isFullCredit":true},{"lineNumber":1943,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","isFullCredit":true},{"lineNumber":1944,"author":{"gitId":"codeeong"},"content":". Works on both 32-bit and 64-bit machines","isFullCredit":true},{"lineNumber":1945,"author":{"gitId":"codeeong"},"content":". Should respond within 1 second of query","isFullCredit":true},{"lineNumber":1946,"author":{"gitId":"codeeong"},"content":". Should be intuitive and easy to use for a first-time user.","isFullCredit":true},{"lineNumber":1947,"author":{"gitId":"codeeong"},"content":". Should be able to handle any sort of input, i.e. should recover from invalid input.","isFullCredit":true},{"lineNumber":1948,"author":{"gitId":"codeeong"},"content":". Should have audience-focused user guides and developer guides.","isFullCredit":true},{"lineNumber":1949,"author":{"gitId":"codeeong"},"content":". Should have command names that concisely describe their function.","isFullCredit":true},{"lineNumber":1950,"author":{"gitId":"codeeong"},"content":". Should be an open-source project.","isFullCredit":true},{"lineNumber":1951,"author":{"gitId":"codeeong"},"content":". Development be cost effective or free.","isFullCredit":true},{"lineNumber":1952,"author":{"gitId":"codeeong"},"content":". App should be able to work offline.","isFullCredit":true},{"lineNumber":1953,"author":{"gitId":"-"},"content":". Should save and backup the state of the team managing application regularly.","isFullCredit":true},{"lineNumber":1954,"author":{"gitId":"codeeong"},"content":". Current versions must be backward compatible with older versions to support undo.","isFullCredit":true},{"lineNumber":1955,"author":{"gitId":"codeeong"},"content":". The user interface should be simple and minimise distractions so that user can continue with their work in a focused manner.","isFullCredit":true},{"lineNumber":1956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1957,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1958,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1959,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":1960,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1961,"author":{"gitId":"-"},"content":"[[mainstream-os]] Mainstream OS::","isFullCredit":true},{"lineNumber":1962,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","isFullCredit":true},{"lineNumber":1963,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1964,"author":{"gitId":"-"},"content":"[[private-contact-detail]] Private contact detail::","isFullCredit":true},{"lineNumber":1965,"author":{"gitId":"-"},"content":"A contact detail that is not meant to be shared with others","isFullCredit":true},{"lineNumber":1966,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1967,"author":{"gitId":"-"},"content":"[[lineuo]] Lineup::","isFullCredit":true},{"lineNumber":1968,"author":{"gitId":"-"},"content":"A list of players that are playing for a match, with their positions specified","isFullCredit":true},{"lineNumber":1969,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1970,"author":{"gitId":"-"},"content":"[[user-guide]] User Guide::","isFullCredit":true},{"lineNumber":1971,"author":{"gitId":"-"},"content":"A documentation on the functionality and usability of MTM","isFullCredit":true},{"lineNumber":1972,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1973,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1974,"author":{"gitId":"-"},"content":"\u003d\u003d Instructions for Manual Testing","isFullCredit":true},{"lineNumber":1975,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1976,"author":{"gitId":"-"},"content":"Given below are instructions to test the app manually.","isFullCredit":true},{"lineNumber":1977,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1978,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1979,"author":{"gitId":"-"},"content":"These instructions only provide a starting point for testers to work on; testers are expected to do more _exploratory_ testing.","isFullCredit":true},{"lineNumber":1980,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1981,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Launch and Shutdown","isFullCredit":true},{"lineNumber":1982,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1983,"author":{"gitId":"-"},"content":". Initial launch","isFullCredit":true},{"lineNumber":1984,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1985,"author":{"gitId":"-"},"content":".. Download the jar file and copy into an empty folder","isFullCredit":true},{"lineNumber":1986,"author":{"gitId":"-"},"content":".. Double-click the jar file +","isFullCredit":true},{"lineNumber":1987,"author":{"gitId":"-"},"content":" Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.","isFullCredit":true},{"lineNumber":1988,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1989,"author":{"gitId":"-"},"content":". Saving window preferences","isFullCredit":true},{"lineNumber":1990,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1991,"author":{"gitId":"-"},"content":".. Resize the window to an optimum size. Move the window to a different location. Close the window.","isFullCredit":true},{"lineNumber":1992,"author":{"gitId":"-"},"content":".. Re-launch the app by double-clicking the jar file. +","isFullCredit":true},{"lineNumber":1993,"author":{"gitId":"-"},"content":" Expected: The most recent window size and location is retained.","isFullCredit":true},{"lineNumber":1994,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1995,"author":{"gitId":"-"},"content":"_{ more test cases ... }_","isFullCredit":true},{"lineNumber":1996,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1997,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Deleting a player","isFullCredit":true},{"lineNumber":1998,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1999,"author":{"gitId":"codeeong"},"content":". Deleting a player while all players are listed","isFullCredit":true},{"lineNumber":2000,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2001,"author":{"gitId":"codeeong"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list.","isFullCredit":true},{"lineNumber":2002,"author":{"gitId":"-"},"content":".. Test case: `delete 1` +","isFullCredit":true},{"lineNumber":2003,"author":{"gitId":"codeeong"},"content":" Expected: First player is deleted from the list. Details of the deleted player shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2004,"author":{"gitId":"-"},"content":".. Test case: `delete 0` +","isFullCredit":true},{"lineNumber":2005,"author":{"gitId":"-"},"content":" Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2006,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `delete`, `delete x` (where x is larger than the list size) _{give more}_ +","isFullCredit":true},{"lineNumber":2007,"author":{"gitId":"-"},"content":" Expected: Similar to previous.","isFullCredit":true},{"lineNumber":2008,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2009,"author":{"gitId":"-"},"content":"_{ more test cases ... }_","isFullCredit":true},{"lineNumber":2010,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving data","isFullCredit":true},{"lineNumber":2012,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2013,"author":{"gitId":"-"},"content":". Dealing with missing/corrupted data files","isFullCredit":true},{"lineNumber":2014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2015,"author":{"gitId":"-"},"content":".. _{explain how to simulate a missing/corrupted file and the expected behavior}_","isFullCredit":true},{"lineNumber":2016,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2017,"author":{"gitId":"-"},"content":"_{ more test cases ... }_","isFullCredit":true},{"lineNumber":2018,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Remarking a player","isFullCredit":true},{"lineNumber":2020,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2021,"author":{"gitId":"-"},"content":". Remarking a player while all players are listed","isFullCredit":true},{"lineNumber":2022,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2023,"author":{"gitId":"-"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list.","isFullCredit":true},{"lineNumber":2024,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/This is my remark to you.` +","isFullCredit":true},{"lineNumber":2025,"author":{"gitId":"-"},"content":"Expected: First player is remarked from the list. Details of the remarked player shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2026,"author":{"gitId":"-"},"content":".. Test case: `remark 0` +","isFullCredit":true},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Expected: No person is remarked. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2028,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `remark`, `remark x` (where x is larger than the list size), `remark -1`, `remark 2 x/` (where x is not the prefix for remark) +","isFullCredit":true},{"lineNumber":2029,"author":{"gitId":"-"},"content":"Expected: Similar to previous.","isFullCredit":true},{"lineNumber":2030,"author":{"gitId":"-"},"content":".. Test case: `remark 1` +","isFullCredit":true},{"lineNumber":2031,"author":{"gitId":"-"},"content":"Expected: First player has its remark removed. Details of the remarked player shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2032,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/I want to delete this.` -\u003e `remark 1 r/` +","isFullCredit":true},{"lineNumber":2033,"author":{"gitId":"-"},"content":"Expected: Similar to previous.","isFullCredit":true},{"lineNumber":2034,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2035,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a player without all fields","isFullCredit":true},{"lineNumber":2036,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2037,"author":{"gitId":"-"},"content":". Adding a player where player is unique","isFullCredit":true},{"lineNumber":2038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2039,"author":{"gitId":"-"},"content":".. Prerequisites: Newly added player must not exist in MTM.","isFullCredit":true},{"lineNumber":2040,"author":{"gitId":"-"},"content":".. Test case: `add n/Tumeric Turner e/tt@tuner.com` +","isFullCredit":true},{"lineNumber":2041,"author":{"gitId":"-"},"content":"Expected: Player added into MTM and will be on the list. Details of the newly added player shown in the status message. Fields that are not input during addition are replaced with `\u003cUNSPECIFIED\u003e` Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2042,"author":{"gitId":"-"},"content":".. Test case: `add n/Guavi Hollae` +","isFullCredit":true},{"lineNumber":2043,"author":{"gitId":"-"},"content":"Expected: Player is not added into MTM. Errors details shown in status message. Name and email are compulsory fields that need to be entered for `add` to work.","isFullCredit":true},{"lineNumber":2044,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2045,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Functions","isFullCredit":true},{"lineNumber":2046,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a Team","isFullCredit":true},{"lineNumber":2048,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2049,"author":{"gitId":"-"},"content":". Creating a Team with current existing data in MTM","isFullCredit":true},{"lineNumber":2050,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2051,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently does not exist in MTM.","isFullCredit":true},{"lineNumber":2052,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +","isFullCredit":true},{"lineNumber":2053,"author":{"gitId":"-"},"content":"Expected: Team is created and displayed in Team Display Panel. Team name will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2054,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +","isFullCredit":true},{"lineNumber":2055,"author":{"gitId":"-"},"content":"Expected: Team is not created due to team already existing in MTM. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2056,"author":{"gitId":"-"},"content":".. Test case: `create \u0026-Team-\u0026` +","isFullCredit":true},{"lineNumber":2057,"author":{"gitId":"-"},"content":"Expected: Team does not allow names with special characters, only alphanumeric, can consist of all numbers and can contain space in name. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2058,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2059,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a Team","isFullCredit":true},{"lineNumber":2060,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2061,"author":{"gitId":"-"},"content":". Viewing a Team with current existing data in MTM","isFullCredit":true},{"lineNumber":2062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2063,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM.","isFullCredit":true},{"lineNumber":2064,"author":{"gitId":"-"},"content":"... Test case: `view Arsenal` +","isFullCredit":true},{"lineNumber":2065,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be updated with list of players that are in the Team. Team name will be shown in the status message.","isFullCredit":true},{"lineNumber":2066,"author":{"gitId":"-"},"content":"... Test case: `view NonExistingTeam` +","isFullCredit":true},{"lineNumber":2067,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM. Error details shown in the status message.","isFullCredit":true},{"lineNumber":2068,"author":{"gitId":"-"},"content":"... Test case: `view chelsea` +","isFullCredit":true},{"lineNumber":2069,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM, as team names are case sensitive. Error details shown in the status message.","isFullCredit":true},{"lineNumber":2070,"author":{"gitId":"-"},"content":".. Prerequisites: The command `create NUSTeam` was executed right before executing this test case.","isFullCredit":true},{"lineNumber":2071,"author":{"gitId":"-"},"content":"... Test case: `view NUSTeam` +","isFullCredit":true},{"lineNumber":2072,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be empty as no players are in the team yet. Team name will be shown in the status message.","isFullCredit":true},{"lineNumber":2073,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning Players to Team","isFullCredit":true},{"lineNumber":2075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2076,"author":{"gitId":"-"},"content":". Assigning players to a Team after executing `create NUSTeam`","isFullCredit":true},{"lineNumber":2077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2078,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/1 3 5` +","isFullCredit":true},{"lineNumber":2079,"author":{"gitId":"-"},"content":"Expected: Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2080,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/3` +","isFullCredit":true},{"lineNumber":2081,"author":{"gitId":"-"},"content":"Expected: No player is assigned as player already exist in the team. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2082,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/2 3 4` +","isFullCredit":true},{"lineNumber":2083,"author":{"gitId":"-"},"content":"Expected: Only the player at index 2 is assigned. Assign command will stop once it detects that a player cannot be assigned. Team Display Panel will not be updated. Person Card of index 2 will be updated with assigned team. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2084,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/9 6 4` +","isFullCredit":true},{"lineNumber":2085,"author":{"gitId":"-"},"content":"Expected: All players will be assigned by ascending index order. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2086,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/7 40` +","isFullCredit":true},{"lineNumber":2087,"author":{"gitId":"-"},"content":"Expected: Index exceeding the number of players listed in the Player List Panel will be ignored. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2088,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/-1` +","isFullCredit":true},{"lineNumber":2089,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message. Team is not viewed.","isFullCredit":true},{"lineNumber":2090,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam` +","isFullCredit":true},{"lineNumber":2091,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Invalid command format as no index is given. Team is not viewed.","isFullCredit":true},{"lineNumber":2092,"author":{"gitId":"-"},"content":".. Test case: `assign NoTeam` +","isFullCredit":true},{"lineNumber":2093,"author":{"gitId":"-"},"content":"Expected: Error deatils shown in the status message. No such team found in MTM. Team is not viewed, player list not updated.","isFullCredit":true},{"lineNumber":2094,"author":{"gitId":"-"},"content":".. Test case: `add n/Barry Putter e/bp@hotwot.com tm/NUSTeam` +","isFullCredit":true},{"lineNumber":2095,"author":{"gitId":"-"},"content":"Expected: New person is added into MTM. Team in Team Display Panel will be selected. Player list will be updated with the new added person. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2096,"author":{"gitId":"-"},"content":".. Test case: `add n/Himonie Branger e/hb@notwot.com tm/MissingTeam` +","isFullCredit":true},{"lineNumber":2097,"author":{"gitId":"-"},"content":"Expected: Person is not added into MTM. Team does not exist in MTM. Error details shown in the status message.","isFullCredit":true},{"lineNumber":2098,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2099,"author":{"gitId":"-"},"content":". Unassigning players from a Team","isFullCredit":true},{"lineNumber":2100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2101,"author":{"gitId":"-"},"content":".. Prerequisites: Players are already existing in the team","isFullCredit":true},{"lineNumber":2102,"author":{"gitId":"-"},"content":".. Test case: `view NUSTeam` -\u003e `assign i/1 2 3` +","isFullCredit":true},{"lineNumber":2103,"author":{"gitId":"-"},"content":"Expected: Player list will be updated as the specified players to be unassigned will be removed from the team. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2104,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/10 11` +","isFullCredit":true},{"lineNumber":2105,"author":{"gitId":"-"},"content":"Expected: Player list will be updated with the specified players to be unassigned will have their team name updated to `\u003cUNSPECIFIED\u003e`. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2106,"author":{"gitId":"-"},"content":".. Test case: `assign i/NUS` +","isFullCredit":true},{"lineNumber":2107,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message.","isFullCredit":true},{"lineNumber":2108,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/1` +","isFullCredit":true},{"lineNumber":2109,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Player already has no team and can\u0027t be unassigned.","isFullCredit":true},{"lineNumber":2110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2111,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Renaming a Team","isFullCredit":true},{"lineNumber":2112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2113,"author":{"gitId":"-"},"content":". Renaming a Team after assigning players above","isFullCredit":true},{"lineNumber":2114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2115,"author":{"gitId":"-"},"content":".. Prerequisites: Ensure that the team to be renamed into does not exist","isFullCredit":true},{"lineNumber":2116,"author":{"gitId":"-"},"content":".. Test case: `rename NUSTeam tm/SUNTeam` +","isFullCredit":true},{"lineNumber":2117,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be renamed to the new team name. New team name will be selected in the Team Display Panel. Player list of all the players in the new team name will be displayed. All players in the team will have their team name updated to the new team name. Team rename will be shown in the result status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2118,"author":{"gitId":"-"},"content":".. Test case: `rename NewTeam tm/MooTeam` +","isFullCredit":true},{"lineNumber":2119,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename does not exist in MTM.","isFullCredit":true},{"lineNumber":2120,"author":{"gitId":"-"},"content":".. Test case: `rename SUNTeam tm/\u0026-Team` +","isFullCredit":true},{"lineNumber":2121,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename into is invalid and should only contains alphanumeric characters.","isFullCredit":true},{"lineNumber":2122,"author":{"gitId":"-"},"content":".. Test case: `rename tm/SmoovTeam` +","isFullCredit":true},{"lineNumber":2123,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Did not specify which team to rename and will indicate invalid command format.","isFullCredit":true},{"lineNumber":2124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2125,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a Team","isFullCredit":true},{"lineNumber":2126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2127,"author":{"gitId":"-"},"content":". Removing a Team after renaming the team above","isFullCredit":true},{"lineNumber":2128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2129,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM.","isFullCredit":true},{"lineNumber":2130,"author":{"gitId":"-"},"content":".. Test case: `view SUNTeam` -\u003e `remove SUNTeam` +","isFullCredit":true},{"lineNumber":2131,"author":{"gitId":"-"},"content":"Expected: Team is removed and Team Display Panel is updated to reflect that the team has been removed. Team name that is being removed will be shown in the status message. All players in the team will have their team name updated in the Player List Panel. Player List Panel will show the full list of players in MTM. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2132,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `remove Arsenal` +","isFullCredit":true},{"lineNumber":2133,"author":{"gitId":"-"},"content":"Expected: Similar to above, will be displaying full list of players before and after `remove` command.","isFullCredit":true},{"lineNumber":2134,"author":{"gitId":"-"},"content":".. Test case: `remove SUNTeam` +","isFullCredit":true},{"lineNumber":2135,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team does not exist in MTM.","isFullCredit":true},{"lineNumber":2136,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2137,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Appearance Related Functions","isFullCredit":true},{"lineNumber":2138,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2139,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Changing a Theme","isFullCredit":true},{"lineNumber":2140,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2141,"author":{"gitId":"codeeong"},"content":". Changing the theme that MTM is currently on","isFullCredit":true},{"lineNumber":2142,"author":{"gitId":"codeeong"},"content":".. Test case: `cte Dark` (if current theme is Light) or `cte Light` (if current theme is Dark) +","isFullCredit":true},{"lineNumber":2143,"author":{"gitId":"codeeong"},"content":"Expected: MTM colour scheme will change to the respective themes as shown below:","isFullCredit":true},{"lineNumber":2144,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2145,"author":{"gitId":"codeeong"},"content":"image::DarkTheme.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":2146,"author":{"gitId":"codeeong"},"content":"image::LightTheme.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":2147,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2148,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2149,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Setting Tag Colours","isFullCredit":true},{"lineNumber":2150,"author":{"gitId":"codeeong"},"content":". Setting the tags to colour of choice","isFullCredit":true},{"lineNumber":2151,"author":{"gitId":"codeeong"},"content":".. Prerequisites: Player has tags","isFullCredit":true},{"lineNumber":2152,"author":{"gitId":"codeeong"},"content":".. Test case: `setTagColour t/redCard tc/blue`","isFullCredit":true},{"lineNumber":2153,"author":{"gitId":"codeeong"},"content":"Expected: All tags with the name `redCard` would become blue","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":189,"lohtianwei":210,"codeeong":253,"-":1501}},{"path":"docs/UserGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - User Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":toc-title: Table Of Contents","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":experimental:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":":important-caption: :white_check_mark:","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"By: `F14-B1` Since: `Mar 2018` Licence: `MIT`","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"// tag::introduction[]","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a link:https://en.wikipedia.org/wiki/Command-line_interface[Command-Line Interface] (CLI) based address book application for *football team managers*.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"It is a one-stop solution to help you manage your player\u0027s contact details in an efficient and convenient manner.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Using MTM, you can organize players into teams, view player statistics, and, generate player line-ups.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"Head to \u003c\u003cQuick Start\u003e\u003e to get started with My Team Manager!","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"\u003d\u003d Quick Start","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"Welcome! If you want to learn more about using My Team Manager, you\u0027ve come to the right place. My Team Manager is the easiest","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"way for you to manage your team efficiently, and this quick start section will help you learn the basics so you can get going.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"Your teams, their players, and all the relevant information is organized clearly in My Team Manager. Teams can be created and","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"players can be assigned to teams.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Before we begin","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". You can download Java 8 link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[here].","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"* Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"* This app will not work with *earlier* or *later* versions of Java 8.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":". Download the latest `MyTeamManager.jar` link:{repoURL}/releases[here].","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":". Copy the file to the folder you want to use as the home folder for your MTM.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":". Double-click the file to start the app. The software interface should appear in a few seconds as shown below.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"image::UiNew.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Navigating the interface","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"The figure below shows the different components in My Team Manager and the list below explains their purpose.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"image::UIGuide.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". *Command Box*: This is where you _key in the commands_ to use My Team Manager.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". *Display Box*: The display box _displays results_ to any command you input.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". *Team List* : This _displays the teams_ you have created in My Team Manager. +","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"* If a team is being viewed, it would be highlighted.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":". *Details Panel*: This _displays details of the player_ that is currently selected. +","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* Here, the player\u0027s _name_, _phone number_, _address_, _email_, _jersey number_ followed by _remarks_ are shown.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":". *Systems Panel*: This displays information regarding modification to MTM\u0027s data.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"* On the left, it displays the time and date when MTM is last updated.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"* On the right, is the location of the data.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":". *Player List*: This is the list of player cards. In each player card, +","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"* The player\u0027s _name_, _tags_, _team_, _rating_, followed by _position_ is displayed.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"* The player\u0027s _avatar_ is also shown on the right column.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lithiumlkid"},"content":"[[Using_Commands]]","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Using Commands","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":".*Getting started with Commands*","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"** An example in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"* Fields that are in enclosed with `[ ]` are optional.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"** An example, `n/NAME [t/TAG]`, can be used as, `n/John Doe t/friend`, or as, `n/John Doe`.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"** In this example, `[t/TAG]...`, these parameters are valid, `t/friend`, `t/friend t/family`, and even `{nbsp}` (no parameter).","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"* Parameters can be entered in any order.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"** For example, if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":".*The Use of Alias*","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"* Some commands have an alias that you can use to execute the command. This alias acts as a shortcut to execute the commands you want without typing the full command out.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"** For example, you can type the alias `a` instead of the `add` command word to add a player into MTM.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":".*Lookout for Tips, Notes, and Expected Outcomes*","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"TIP: This box give _tips_ that *might be useful*.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"NOTE: This box _notes_ down *important details* regarding a feature.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"IMPORTANT: This box will let you know the _outcome_ and what MTM should be *expected to do*.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lithiumlkid"},"content":"Now that you are familiar with the interface and using commands, you are now ready to begin using My Team Manager!","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Three steps to get started","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Add your first player","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lithiumlkid"},"content":". Add your first player, `Ronaldo` by typing the command `add n/Ronaldo e/Ronaldo@arsenal.com` in the command box and pressing kbd:[Enter] to execute it.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lithiumlkid"},"content":"image::add.png[width\u003d\"400\"]","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lithiumlkid"},"content":". Your new player, `Ronaldo` should appear in the player list as shown in the white box above.","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lithiumlkid"},"content":"TIP: The `Add` command has additional optional parameters for you to include more information. For the full list,","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"refer to \u003c\u003cadd, Adding a player\u003e\u003e.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Create your first team","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"Now that you have a player, let\u0027s explore teams. Teams allow you to manage and group your players together according to","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":"the teams they belong to.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":". Create your first team, `NUS` by typing the command `create NUS` in the command box and pressing kbd:[Enter] to execute it.","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"image::create.PNG[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lithiumlkid"},"content":". Your new team, `NUS` should appear in the team list.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lithiumlkid"},"content":". You can now assign `Ronaldo` to `NUS` by typing the command `assign tm/NUS i/1` in the command box and pressing kbd:[Enter] to execute it.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lithiumlkid"},"content":"- The Team List should now show NUS highlighted as shown in the white box labeled 1 above.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"- `Ronaldo` \u0027s player card should now show NUS in the team field as shown in the white box labeled 2 above.","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lithiumlkid"},"content":"- The player list shows only players assigned to the team `NUS`","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Viewing more details","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":". View more details about a player, by entering `select` followed by the \u003c\u003cIndex, `INDEX`\u003e\u003e of the player. For example, to view","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lithiumlkid"},"content":"`Ronaldo` \u0027s details, enter `select 1`.","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lithiumlkid"},"content":". The details panel should now show the player\u0027s details.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lithiumlkid"},"content":"image::select.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lithiumlkid"},"content":". You may notice that there are fields that show `\u003cUNSPECIFIED\u003e`. These are optional fields that you can edit later on.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lithiumlkid"},"content":"There are also many ways you can customize and add to My Team Manager. Here are a few ways to start:","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":".. \u003c\u003cedit, Editing a player\u003e\u003e","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003cchangeTheme, Changing MTM theme\u003e\u003e","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csetTagColour, Setting Tag Colour\u003e\u003e","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":".. \u003c\u003ctoggleprivacy, Setting privacy\u003e\u003e","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csort, Sorting players in the list\u003e\u003e","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lithiumlkid"},"content":"// end::introduction[]","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Commands in My Team Manager","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful information regarding all the commands in My Team Manager.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lithiumlkid"},"content":"If you are not familiar on how to use commands yet, you can refer to \u003c\u003cUsing_Commands\u003e\u003e","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Fundamentals","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lithiumlkid"},"content":"MTM provides tools that gives you the power to use MTM more efficiently and teach you how to navigate through MTM with ease.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lithiumlkid"},"content":"Enter commands more quickly with \u003c\u003cautocomplete,kbd:[tab] autocomplete\u003e\u003e, get \u003c\u003chelp,help\u003e\u003e or find out how to \u003c\u003cundo,undo\u003e\u003e and \u003c\u003credo,redo\u003e\u003e commands.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lithiumlkid"},"content":"You can also find information to secure your information in My Team Manger by \u003c\u003ctogglePrivacy, toggling privacy\u003e\u003e or \u003c\u003ckey,set a key to prevent tampering\u003e\u003e","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Saving the data","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"There is no need to save anything manually as My Team Manager will save","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"any data entered directly to the hard drive.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"// tag::autocomplete[]","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"[[autocomplete]]","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Using kbd:[tab] Autocomplete","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"After typing in the first few characters of a command, pressing kbd:[tab] will fill in the rest of the item.","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"To view the parameters for a command, press tab after the whole command is typed in. Pressing tab again will remove the parameters.","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"You can use the autocompleted parameters as a template after viewing them.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"lithiumlkid"},"content":"Text will turn red if the input has no parameters or if no matching command exists.","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"lithiumlkid"},"content":"If there are multiple possible commands for a given input, i.e. \u0027e\u0027 could be \u0027edit\u0027 or \u0027exit\u0027,","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"then a dropdown box will appear with the possible commands. These can be navigated using mouse or arrow keys. Press enter to select the desired command.","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"// end::autocomplete[]","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"[[help]]","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing help : `help`","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"Feeling lost? Not sure what to do? Don\u0027t worry, our friendly guide will help you! All you have to do is just type the `help` command, and you will get all the information you require.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"Format: `help` +","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"Alias: kbd:[F1]","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"[[history]]","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing entered commands : `history`","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"Have you been extensively using MTM and in the midst of entering more commands, you could not remember what commands you have entered? MTM allows you to look at all your past commands that you have entered in reverse chronological order.","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"Format: `history` +","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"Alias: `h`","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"* Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"A list of your previously entered command will be shown to you.","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"[[undo]]","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undoing previous command : `undo`","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":"Have you entered a wrong command or might have accidentally entered the wrong values to the specified fields to a command? +","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"You don\u0027t have to worry, as MTM provides you with the command to undo most mistakes that you might have made. MTM will restore itself to the state before the previous command was executed.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"Format: `undo` +","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"Alias: `u`","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"* There are a few commands that can be undoable: commands that modify MTM\u0027s content that are related to players or teams.","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"** Player related commands: `add`, `delete`, `edit`, `clear`, `remark` +","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"** Team related commands: `create`, `assign`, `remove`, `rename`","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"Commands that are _undoAble_ will be reversed and MTM will be in the state before the command was executed.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"[[redo]]","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Redoing the previously undone command : `redo`","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"codeeong"},"content":"If you accidentally call the `undo` command too many times and need a way to quickly reverse that, MTM allows you to redo the most recent `undo` command.","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"Format: `redo` +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"Alias: `r`","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"Previously executed `undo` command will be reversed and MTM will be in its previous state.","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"// tag::togglePrivacy[]","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"[[toggleprivacy]]","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling various fields to private: `toggleprivacy` `[Since v1.4]`","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"You can toggle the privacy of various fields of players in MTM.","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"Format: `toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]` +","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"Alias: `tp`","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"codeeong"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"* Current version of `toggleprivacy` supports the field to be privated: +","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"** `p/`: PHONE, `e/`: EMAIL, `r/`: REMARK, `ra/`:RATING \u0026 `a/`: ADDRESS.","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"Privacy of field will be toggled between private or public. +","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"If Phone: `p/` of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1 is private, running command: `tp 1 p/` would change phone field to public. +","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"Private fields are shown as \u003cPrivate `FIELD`\u003e.","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"Here are some examples on how you can use the `toggleprivacy` command:","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"* `tp 1 p/ ra/`","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":"Toggles privacy of phone and rating of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1.","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"// end::togglePrivacy[]","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"// tag::key[]","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"[[key]]","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling lock on MTM: `key` `[Since v1.5]`","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"You can toggle a lock on MTM to prevent unauthorised changes to your details in MTM. When MTM is in a locked state, functionality will be limited.","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"Format: `key PASSWORD` +","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"Alias: `k`","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"* Current version of `key` uses a fixed default `PASSWORD`: *ilikesports*","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"When MTM is locked, only the following commands can be executed: +","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"`changeTheme`, `exit`, `find`, `help`, `key`, `list`, `sort` and `view`","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"Here are examples on how to use `key`:","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"* `key ilikesports`","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"If MTM is in a lock state, use this command to unlock it.","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"* `key ilikesports`","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"To lock MTM, use this command to lock.","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"// end::key[]","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"[[clear]]","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Clearing all entries : `clear`","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"You can clear all entries from MTM with the \u0027clear\u0027 command.","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"Format: `clear` +","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"Alias: `c`","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"[[exit]]","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Exiting the program : `exit`","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"You can exit the program by entering the \u0027exit\u0027 command.","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"Format: `exit`","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your players and their information in My Team Manager +","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003cadd,adding a player\u003e\u003e, \u003c\u003cedit,editing a player\u003e\u003e or \u003c\u003cremark,adding a remark\u003e\u003e.","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools to \u003c\u003cfind,find\u003e\u003e a player or \u003c\u003csort,sort\u003e\u003e players in your list.","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"lithiumlkid"},"content":"// tag::addplayer[]","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"[[add]]","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Adding a player: `add`","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"lithiumlkid"},"content":"This is the command that you will be using most frequently, especially when dealing with new players. You will be able to add new players with the details that you have obtained into MTM by using the `add` command.","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"lithiumlkid"},"content":"Format: `add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"Alias: `a`","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"The table below explains the correct inputs for the parameters.","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"[width\u003d\"80%\",cols\u003d\"1,2,2\",options\u003d\"header\"]","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"|Parameter |Input type |Example","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"|n/NAME |Player name | n/Ronaldo","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"|e/EMAIL |Player\u0027s email address | a/ronaldo@soccer.com","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"|tm/TEAM |Player\u0027s Team | tm/Real Madrid","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"|a/ADDRESS |Player\u0027s address| a/Blk 123 Bukit Batok St 21","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"|p/PHONE_NUMBER| Player\u0027s phone number| p/92343433","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"|j/JERSEY_NUMBER| Player\u0027s jersey number| j/17","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"|ra/RATING| Player\u0027s performance rating (From 1 to 5)| ra/5","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"|po/POSITION| Player\u0027s postion +","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"(1 for Striker, +","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"2 for Midfiled, +","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"3 for Defender, +","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"4 for Goalkeeper)| po/1","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"|av/AVATAR| Absolute filepath to player\u0027s avatar image file| av/C:\\avatar.png (for Windows) av//User/username/path/to/image.jpg (for MacOS)","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"|t/TAG| Your tag for the player| t/Injured","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"* A player can only be added to an existing team.","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"* If you have not created the team yet, you can create one first using the \u003c\u003cCreating a team: `create` `[Since v1.2]`, `create`\u003e\u003e command.","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"A player can have any number of tags (including 0).","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"Output: The added player should appear in the player list panel.","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"* `add n/Mo Salah e/mo@soccer.com`","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"Adds a player named `Mo Salah` with email `mo@soccer.com`.","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"* `add n/Ronaldo p/92331322 e/ronaldo@soccer.com a/Portugal tm/Real Madrid j/17 ra/5 po/1`","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"Adds a player named Ronaldo with phone number `92331322`, email `ronaldo@soccer.com`, address `Portugal`,","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"team `Real Madrid`, jersey number `17`, rating `5`, and position `1` corresponding to `Striker`.","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"[[edit]]","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Editing a player : `edit`","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"lithiumlkid"},"content":"If you made a mistake when adding a player, or if there\u0027s player information that needs updating, you may edit an existing player in MTM with the \u0027edit\u0027 command.","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"Format: `edit INDEX [n/NAME] [e/EMAIL] [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]...` +","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"Alias: `e`","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"* Edits the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e.","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"* Please only edit the player that is currently being selected. If you were to edit a player who is not selected, the player\u0027s details will be updated, but the selection will remain at the currently selected player.","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"* At least one of the optional fields must be provided.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"* When you edit tags, the existing tags of the player will be removed i.e adding of tags is not cumulative.","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":"* You can remove all the player\u0027s tags by typing `t/` without specifying any tags after it.","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com`","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st player to be `91234567` and `johndoe@example.com` respectively.","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/`","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"Edits the name of the 2nd player to be `Betsy Crower` and clears all existing tags.","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"lithiumlkid"},"content":"// end::addplayer[]","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"[[delete]]","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Deleting a player : `delete`","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"codeeong"},"content":"If you want to remove a player from MTM, you may use this command to delete the player.","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"Format: `delete INDEX` +","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"Alias: `d`","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"* Deletes the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e.","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":"* `list`","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `delete 2`","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":"Deletes the 2nd player in the MTM.","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":"* `find Betsy`","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"-"},"content":"* `delete 1`","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"lohtianwei"},"content":"Deletes the 1st player in the results of the `find` command.","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"-"},"content":"[[remark]]","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Noting down a remark for player: `remark` `[Since v1.1]`","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"-"},"content":"When you need to drop yourself a self-note with regards to a specific player you\u0027re managing, you can make a self-note","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"-"},"content":"of a specific player easily by giving the player a remark for you to remember by.","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"-"},"content":"Format: `remark INDEX [r/[REMARK]]` +","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"Alias: `rm`","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"-"},"content":"* By leaving out `r/REMARK` or `REMARK`, the command acts as a remark removal.","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"-"},"content":"* Only use the `remark` command when you want to leave a remark, `add` or `edit` does not allow you to create a remark for the player.","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"-"},"content":"* Please only add remarks to the player that is currently being selected. If you were to add remarks to a player who is not selected, the player\u0027s remarks will be updated, but the selection will remain at the currently selected player.","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"-"},"content":"Your specified player will either be given a new remark or have its existing remark removed.","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `remark` command:","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"-"},"content":"* `remark 1`","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"-"},"content":"Removes the remark from the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1.","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"-"},"content":"* `remark 5 r/MVP Player`","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"-"},"content":"Give a remark to the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 5 with the remark \"MVP Player\".","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"-"},"content":"[[list]]","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing all players : `list`","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":"To view a list of all the players you are managing, you can use the `list` command to see all of your players.","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":"Format: `list` +","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"-"},"content":"Alias: `l`","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"[[sort]]","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sorting players by field: `sort` `[Since v1.2]`","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"-"},"content":"You can sort the players by fields with the \u0027sort\u0027 command. Players can be sorted in both ascending or descending order.","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"-"},"content":"Format: `sort FIELD ORDER` +","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"-"},"content":"Alias: `so`","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"-"},"content":"* Current version of `sort` supports the following fields and order:","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"-"},"content":"** `FIELD`: `name`, `email`, `address`, `rating`, `jersey` \u0026 `position`","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"-"},"content":"** `ORDER`: `asc` \u0026 `desc`","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `sort` command:","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"-"},"content":"* `sort name asc`","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"-"},"content":"This will sort MTM by names, in alphabetical order.","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"-"},"content":"* `sort name desc`","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"-"},"content":"This will sort MTM by names, in reverse alphabetical order.","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"-"},"content":"[[find]]","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Locating players by name: `find`","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"-"},"content":"You can find a player whose name contain any of the given keywords with this command within the full player listing of MTM.","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"-"},"content":"Format: `find KEYWORD [KEYWORD]...` +","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"-"},"content":"Alias: `f`","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`.","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`.","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"-"},"content":"* Only the name is searched.","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`.","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"-"},"content":"* Players matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`.","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"* `find John`","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"-"},"content":"MTM will find all players with the name `john` with uppercase/lowercase characters in it.","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"-"},"content":"* `find Betsy Tim John`","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"-"},"content":"Display all players that have the name `betsy`, `tim`, or `john`.","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"-"},"content":"[[select]]","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Selecting a player : `select`","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"-"},"content":"Identified the player you\u0027re looking for and want to see more details about the player?","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"-"},"content":"MTM offers you the ability to view details of your specified player via an \u003c\u003cIndex, `INDEX`\u003e\u003e shown in the current listing of players.","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"-"},"content":"Alternatively, you can just scroll to the player you want, click their card,","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"-"},"content":"and their details will be displayed on the right hand side of the screen.","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"-"},"content":"Format: `select INDEX` +","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"-"},"content":"Alias: `s`","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"codeeong"},"content":"The details panel will display your selected player\u0027s name, phone number, address, email address,","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"codeeong"},"content":"jersey number, and remarks on the right side of the screen.","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `select` command:","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"* `list`","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"* `select 2`","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"Displays the list of all players and selects the 2nd player in that list.","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"* `find Betsy`","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"-"},"content":"* `select 1`","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"Finds a player named `betsy` and selects the 1st player in the results of the `find` command.","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your teams and their players in My Team Manager +","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003ccreate,creating a team\u003e\u003e, \u003c\u003cassign,assigning players to a team\u003e\u003e or \u003c\u003crename,renaming a team\u003e\u003e.","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools like \u003c\u003cview,viewing a team\u003e\u003e.","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"// tag::create[]","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"[[create]]","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a team: `create` `[Since v1.2]`","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"What is a team management application without the functionality of creating a team? When you use this command, it allows you to create a team that can be assigned to players later on.","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"Format: `create TEAM_NAME` +","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"Alias: `ct`","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"* You can\u0027t create a team that already exist in MTM.","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"-"},"content":"Your newly specified team will be created with the name you have given without any players in it, and your team name will appear in the team bar below.","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"* `create Liverpool`","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":"Creates another new team with the name \"Liverpool\" by entering `create Liverpool` into the Command Box and pressing kbd:[Enter].","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":"image::TeamCreateExampleBefore.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":"\"Liverpool\" will be shown in the Team List.","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":"image::TeamCreateExampleAfter.png[width\u003d\"350\"]","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"// end::create[]","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"-"},"content":"// tag::view[]","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"[[view]]","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a team: `view` `[Since v1.3]`","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"With the ability to manage different teams, you will be able to identify all players in a team easily with the `view` command.","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"`Coming in v2.0` +","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"Details of your team will be displayed on the right panel when `view` command is executed.","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"Format: `view TEAM_NAME` +","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"Alias: `vt`","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"Displays the list of players on the left panel that are in the team specified.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `view` command:","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":"You can use the command above to easily view all the players that exist in \"Arsenal\".","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":"image::TeamViewExampleBefore.png[width\u003d\"350\"]","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"-"},"content":"The Player List will be updated with all players in the specified team, \"Arsenal\".","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"image::TeamViewExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"// end::view[]","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"-"},"content":"// tag::assign[]","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"-"},"content":"[[assign]]","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning player to teams: `assign` `[Since v1.3]`","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"-"},"content":"Have a player without a team, or have yet to assigned one during the addition of player into MTM, you can call `assign` command to assign that player to a particular team of your choice.","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"Format: `assign [TEAM_NAME] i/INDEX [INDEX]...` +","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"Alias: `at`","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"-"},"content":"* You can assign multiple players to a team by including more than one valid \u003c\u003cIndex, `INDEX`\u003e\u003e.","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"* A player can only consist of 1 team, assigning a player that have an existing team, will be re-assigned the new team.","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"-"},"content":"* Assigning a player without a given team will unassign the player from its current team.","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"Your specified player, via \u003c\u003cIndex, `INDEX`\u003e\u003e, will be assigned to the specified team or unassigned from any team.","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"* `list`","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"View the full list of players in MTM so that you can determine which player you want to assign a team.","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"-"},"content":"image::TeamAssignListExample.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"-"},"content":"* `assign Liverpool i/1 2`","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"-"},"content":"Enter the command into the Command Box which will assign the player with \u003c\u003cIndex, `INDEX`\u003e\u003e 1 and 2 to team \"Liverpool\".","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"image::TeamAssignExampleBefore.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"image::TeamAssignExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"-"},"content":"* `add n/Rembart Loeri e/remlo@tam.com tm/Liverpool`","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"Add a player with the prefix `tm/` for `Team` will automatically be assigned to the team specified.","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleBefore.png[width\u003d\"350\"]","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::assign[]","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"-"},"content":"// tag::rename[]","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"-"},"content":"[[rename]]","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Rename a team: `rename` `[Since v1.4]`","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"-"},"content":"Entered your team name wrongly or you need to update it to accordingly, you can use the `rename` command to help you make that change.","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"-"},"content":"Format: `rename TEAM_NAME tm/RENAME_TEAM_NAME` +","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"-"},"content":"Alias: `rnt`","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"Your specified team will be updated with the new team name along with the affected players in the existing team.","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `rename` command:","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"* `rename Liverpool tm/Tello Mello`","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":"You can rename a `Team` easily by entering a similar command above, which will rename \"Liverpool\" into \"Tello Mello\".","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"-"},"content":"image::TeamRenameExampleBefore.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":"After renaming, the team name will be updated in the Team List and will be update for each individual player.","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"image::TeamRenameExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":"// end::rename[]","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":"// tag::remove[]","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"[[remove]]","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a team: `remove` `[Since v1.4]`","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"No longer managing the team or the team has been disbanded, you can easily remove the team from MTM.","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"Format: `remove TEAM_NAME` +","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"Alias: `rt`","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"* Removing a team will automatically update all affected players\u0027 `Team` field.","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"* Players without a team will need to be re-assigned.","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"Remove the specified team and update all affected players.","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"Here are a few valid examples of how you can use the `remove` command:","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"-"},"content":"Here we show you what it would be like before the removal of \"Arsenal\".","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleBefore.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"-"},"content":"* `remove Arsenal`","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":"After typing the command, you will remove the the team from MTM and will be taken off the Team Display as well as updating each individual player affected to be without a team.","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":"// end::remove[]","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful commands to change the look of My Team Manager to \u003c\u003csetTagColour, set the colour of your tags\u003e\u003e and \u003c\u003cchangeTeam,change the theme\u003e\u003e.","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":"// tag::setTagColour[]","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"lithiumlkid"},"content":"[[setTagColour]]","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting colour of tags : `setTagColour` `[Since v1.2]`","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":"You can set the tags to a colour of your choice with the \u0027setColourTag\u0027 command.","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"-"},"content":"Format: `setTagColour t/TAG tc/COLOUR` +","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"-"},"content":"Alias: `stc`","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"codeeong"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"-"},"content":"* The tag must currently be in used in MTM for this command to work.","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"-"},"content":"* Current version of `setTagColour` supports only this list of preset `COLOUR`:","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"** `teal`, `red`, `yellow`, `blue`, `orange`, `brown`, `green`, `pink`, `black`, `grey`","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"-"},"content":"* The current version of `setTagColour` is *NOT* an UndoableCommand.","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a setTagCommand.","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"-"},"content":"* Instead, just enter `stc t/TAG tc/COLOUR` to change the colour back!","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"codeeong"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"codeeong"},"content":"You will see the specified tags in the left panel change to the colour of your choice.","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `setTagColour` command:","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"codeeong"},"content":"* `stc t/redCard t/red`","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"codeeong"},"content":"All the tags that say \"redCard\" in the left panel will now turn red.","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"-"},"content":"// end::setTagColour[]","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"-"},"content":"// tag::changeTheme[]","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"-"},"content":"[[changeTheme]]","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Changing theme : `changeTheme` `[Since v1.5]`","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"codeeong"},"content":"If you feel that the dark theme is not for you, and you prefer to work on a brighter interface,","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"codeeong"},"content":"you can change the theme from the default Dark Theme to Light Theme with the \u0027changeTheme\u0027 command.","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"-"},"content":"Format: `changeTheme THEME` +","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"codeeong"},"content":"Alias: `cte`","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"-"},"content":"* Current version of `changeTheme` only supports this 2 `THEME`:","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"-"},"content":"** `Light` or `Dark`","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"-"},"content":"* The current version of `changTheme` is *NOT* an UndoableCommand.","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a `changeTheme` command.","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"-"},"content":"* Instead, just enter `cte THEME` to change the colour back!","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `changeTheme` command:","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"codeeong"},"content":"* `cte Light`","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"codeeong"},"content":"You will see the whole interface change from a dark-coloured theme to become light-coloured.","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":"// end::changeTheme[]","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coming Soon","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"lohtianwei"},"content":"There is more to come with the next upcoming update! Keep a lookout for these newly implemented features soon!","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":"// tag::changePass2.0[]","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change password: `changepass` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"Should you feel that the default password used in `key` could be more secure, you may change it to a password of your","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"choosing with this command.","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"Format: `changepass CURRENT_PASSWORD NEW_PASSWORD CONFIRM_PASSWORD` +","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"Alias: `cpw`","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":"Here is how you can change the your password:","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"-"},"content":"* `changepass ilikesports Securep@ssword1 Securep@ssword1`","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":"// end::changePass2.0[]","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"// tag::showBest2.0[]","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Showing Best XI players: `showBest` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":"If you went to see your current best 11 players in your team based on their respective stats, this command","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"is for you.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"Format: `showBest` +","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":"Alias: `sb`","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"lohtianwei"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"lohtianwei"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"lohtianwei"},"content":"A lineup of the best 11 players would be displayed. It would consist of 1 Goalkeeper,","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"lohtianwei"},"content":"4 Defenders, 4 Midfielders and 2 Strikers.","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"lohtianwei"},"content":"// end::showBest2.0[]","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":"// tag::team2.0[]","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting an upcoming match with an opposing team: `setmatch` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":"With this command, it gives you a convenient way to keep track of the upcoming match of a team.","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":"Format: `setmatch TEAM_NAME OPPONENT_TEAM_NAME DATE` +","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"Alias: `sm`","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"* Date format to be entered is in `DD/MM/YYYY`. +","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"* Opponent team does not need to exist in MTM.","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":"The upcoming match of the team will be captured and displayed to you.","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":"* `setmatch Arsenal Liverpool 14/03/2018`","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":"Display the list of players in team \"Arsenal\" and set an upcoming match for Arsenal with Liverpool on 14/03/2018.","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing the team\u0027s next upcoming match: `nextmatch` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"codeeong"},"content":"You can easily determine the up and coming match with the team so that you never miss an important date.","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"Format: `nextmatch TEAM_NAME` +","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"Alias: `nm`","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"Displays the date and opponent for the upcoming match of the team specified.","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"codeeong"},"content":"Here are a few valid examples on how you can use the `nextmatch` command:","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":"* `nextmatch Arsenal`","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":"Displays the list of players in team \"Arsenal\" and view the next upcoming match for \"Arsenal\".","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":"// end::team2.0[]","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"codeeong"},"content":"// tag::showlineup[]","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Displaying lineup for next match: `showLineup` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"codeeong"},"content":"You can view the lineup for the current best 11 players.","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"Format: `showLineup TEAM_NAME` +","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"codeeong"},"content":"Alias: `sl`","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"codeeong"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"codeeong"},"content":"The panel on the right will show the avatars of the 11 players that will be playing for the next match.","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"codeeong"},"content":"Here is an valid example on how you can use the `showLineup` command:","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `showLineup Arsenal`","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"codeeong"},"content":"Displays the 11 main players that will be playing for the next match.","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"codeeong"},"content":"// end::showlineup[]","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Scheduling trainings for team `schedule` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sending reminder emails to players: `send` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving feedback to developers: `feedback` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving demerit to players based on performance: `demerit` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous MTM folder.","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"// tag::commandsummary[]","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"[[Index]]`INDEX` - The `INDEX` refers to the index number shown in the last player listing. The `INDEX` must be a positive integer 1, 2, 3, …","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d Command Summary","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":"Just a quick reference sheet for all your needs. Never forget how to use MTM ever again.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Basic Commands and Features","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"|\u003c\u003cautocomplete, `Autocomplete`\u003e\u003e","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":"|kbd:[tab]","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"-"},"content":"|kbd:[tab] kbd:[space] kbd:[\u0026uarr;] kbd:[\u0026darr;]","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":"d|Fills in your command for you","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":"|\u003c\u003chelp, `help`\u003e\u003e","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":"|kbd:[F1]","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":"|help","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"d|Shows the user guide","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"|\u003c\u003chistory, `history`\u003e\u003e","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"|`h`","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"|history","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":"d|Displays the list of commands entered previously","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"|\u003c\u003cundo, `undo`\u003e\u003e","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"|`u`","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":"|undo","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"d|Undo the previous command","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"|\u003c\u003credo, `redo`\u003e\u003e","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":"|`r`","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"|redo","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"d|Redo the previous command","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":"|\u003c\u003ctoggleprivacy, `toggleprivacy`\u003e\u003e","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":"|`tp`","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":"|toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":"|toggleprivacy 2 a/","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"|\u003c\u003ckey, `key`\u003e\u003e","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"|`k`","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":"|key PASSWORD","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":"|key ilikesports","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":"|\u003c\u003cclear, `clear`\u003e\u003e","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":"|`c`","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":"|clear","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":"d|Removes all information in the application","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":"|\u003c\u003cexit, `exit`\u003e\u003e","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"|`NONE`","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"|exit","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"d|Exits the application","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"-"},"content":"|\u003c\u003cadd, `add`\u003e\u003e","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"|`a`","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"lithiumlkid"},"content":"|add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]...","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"lithiumlkid"},"content":"|add n/Ospina e/Ospina@arsenal.com tm/Arsenal a/70 Jurong Central Circle p/90722998 j/1 ra/2 po/4 av/Capture.png t/redCard","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"-"},"content":"|\u003c\u003cedit, `edit`\u003e\u003e","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"-"},"content":"|`e`","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"-"},"content":"|edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]...","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"-"},"content":"|edit 2 n/James Lee e/jameslee@example.com","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"-"},"content":"|\u003c\u003cdelete, `delete`\u003e\u003e","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"-"},"content":"|`d`","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"-"},"content":"|delete INDEX","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"-"},"content":"|delete 3","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"-"},"content":"|\u003c\u003cremark, `remark`\u003e\u003e","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"-"},"content":"|`rm`","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"-"},"content":"|remark INDEX [r/[REMARK]]","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":"|remark 4 r/Gotta go faster","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"-"},"content":"|\u003c\u003clist, `list`\u003e\u003e","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"-"},"content":"|`l`","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"|list","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"d|List all the players","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003c\u003csort, `sort`\u003e\u003e","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|`so`","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|sort FIELD ORDER","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":"|sort name asc","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"|\u003c\u003cfind, `find`\u003e\u003e","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`f`","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":"|find KEYWORD [KEYWORD]...","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":"|find James Jake","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"|\u003c\u003cselect, `select`\u003e\u003e","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"|`s`","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"-"},"content":"|select INDEX","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"-"},"content":"|select 2","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"|\u003c\u003ccreate, `create`\u003e\u003e","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"|`ct`","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"|create TEAM_NAME","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"|create Arsenal","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"|\u003c\u003cview, `view`\u003e\u003e","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"|`vt`","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"|view TEAM_NAME","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"|view Liverpool","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"|\u003c\u003cassign, `assign`\u003e\u003e","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"|`at`","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|assign [TEAM_NAME] i/INDEX [INDEX]...","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"|assign Barcelona i/1 2 3","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"|\u003c\u003crename, `rename`\u003e\u003e","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":"|`rnt`","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"|rename TEAM_NAME tm/RENAME_TEAM_NAME","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":"|rename Arsenal tm/Neo Arsenal","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":"|\u003c\u003cremove, `remove`\u003e\u003e","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"|`rt`","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":"|remove TEAM_NAME","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"|remove Real Madrid","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"|\u003c\u003csetTagColour, `setTagColour`\u003e\u003e","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"|`stc`","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"|setTagColour t/TAG tc/COLOUR","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"|setTagColour t/friends tc/yellow","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"-"},"content":"|\u003c\u003cchangeTheme, `changeTheme`\u003e\u003e","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"-"},"content":"|`cte`","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"-"},"content":"|changeTheme THEME","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"|changeTheme Dark","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"-"},"content":"// end::commandsummary[]","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":106,"lohtianwei":26,"codeeong":64,"-":917}},{"path":"docs/team/ahmadsyafiq.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lithiumlkid"},"content":"\u003d Ahmad Syafiq - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lithiumlkid"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d PROJECT: My Team Manager","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"---","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lithiumlkid"},"content":"My Team Manager is a desktop address book application developed as part of a Software Engineering module requirement. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 6 kLoC.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Summary of contributions","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lithiumlkid"},"content":"* *Major enhancement*: added *replaced person object with player object*","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to add and edit players that contain more attributes/information such as jersey, position, rating and avatar","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lithiumlkid"},"content":"** Justification: This feature improves the product significantly because a user can fill the address book with more important information which can be used for other utility functions such as sort.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":"It is accompanied with improved GUI to increase usability. Eg. the user can see player\u0027s avatar for better identification.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lithiumlkid"},"content":"** Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lithiumlkid"},"content":"* *Minor enhancement*: added a *tab - autocomplete function*","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to enter command lines more quickly by helping them complete commands by pressing the tab key. It also allows them to view suggested command and command parameters in case","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lithiumlkid"},"content":"the forget.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lithiumlkid"},"content":"** Credits: To make the search optimal, I used Tries as suggested on geek-for-geeks.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lithiumlkid.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lithiumlkid.md[Test code]]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lithiumlkid"},"content":"* *Other contributions*:","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lithiumlkid"},"content":"** Project management:","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lithiumlkid"},"content":"*** Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"** Enhancements to existing features:","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"*** Enhanced the help function to only allow one help window at a time. (Pull request https://github.com/CS2103JAN2018-F14-B1/main/pull/169[#169])","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":"** Documentation:","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lithiumlkid"},"content":"*** Did cosmetic tweaks to existing contents of the User Guide: https://github.com/CS2103JAN2018-F14-B1/main/pull/53[#53]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lithiumlkid"},"content":"** Community:","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":"*** PRs reviewed (with non-trivial review comments): https://github.com/CS2103JAN2018-F14-B1/main/pull/172[#172]","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"*** Contributed to forum discussions (examples: https://github.com/nus-cs2103-AY1718S2/forum/issues/39[39], https://github.com/nus-cs2103-AY1718S2/forum/issues/47[#47])","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":"*** Reported bugs and suggestions for other teams in the class (example: https://github.com/CS2103JAN2018-F14-B3/main/issues/228[#228])","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lithiumlkid"},"content":"** Tools:","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lithiumlkid"},"content":"*** Integrated a new Github plugin (CircleCI) to the team repo","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the User Guide","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003daddplayer]","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003dautocomplete]","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the Developer Guide","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dplayer]","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dautocomplete]","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":60,"-":1}},{"path":"docs/team/codeeong.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"\u003d Codee Ong - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"---","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop application for *football team managers* to organise the information of players they are in charge of.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"The primary usage of this application is to add and assign players to teams, and then edit and remove information related to","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"the players as and when it is required. MTM is value added with usability features that help the team manager manage his/her","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"teams and players efficiently.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"The user interacts with MTM using a *Command Line Interface*, and it has a GUI created with JavaFX.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Summary of contributions","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"* *Major enhancement*: Revamped the original user interface to one that suits the usage of an application for *team managers*.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"** What it does: The change in UI allows the user to *keep track* of which team he/she is looking at, to *view his/her players\u0027 details*,","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"and even perform some *customisation* of the application theme.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"** Justification: The overhaul of the UI is absolutely necessary to ensure the *best user experience* for users of My Team Manager. Previously,","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"the existing UI components were neither sufficient nor suitable for management of sports teams.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"** Highlights: Addition of the *team display bar*, the *player details pane* when a player is selected, addition of *MTM logo*,","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"and *changeTheme* command.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"* *Minor enhancement*: addition of a *setTagCommand* that allows the user to change existing tags to a colour of their choice.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/Codee.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/Codee.md[Test code]]","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"* *Other contributions*:","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"** Project management:","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"*** Generated release files (.jar) in `v1.4` and `v1.5rc` (2 releases), and contributed release descriptions on GitHub.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"** Enhancements to existing features:","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"*** changed the original GUI colour scheme [https://github.com/CS2103JAN2018-F14-B1/main/pull/89[PR #89]]","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"** Documentation:","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"*** changed the project name in all the relevant files so that it will be \"My Team Manager\" and not \"Address Book App\", including the data files. [https://github.com/CS2103JAN2018-F14-B1/main/pull/120[PR #120]]","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"*** Constantly updated the README and UserGuide\u0027s application preview image. [https://github.com/CS2103JAN2018-F14-B1/main/pull/99[PR #99]][https://github.com/CS2103JAN2018-F14-B1/main/pull/160[PR #160]]","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"** Community:","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"*** PRs Reviewed (with non trivial comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/95[PR #95]][https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR #169]][https://github.com/CS2103JAN2018-F14-B1/main/pull/175[PR #175]]","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the User Guide","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting the users of MTM._","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dchangeTheme]","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dsetTagColour]","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dshowlineup]","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the Developer Guide","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dsettagcolour]","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dteamDisplay]","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dPlayerDetails]","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dchangeThemeCommand]","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":72}},{"path":"docs/team/lohtianwei.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"\u003d Loh Tian Wei - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"---","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"My Team Manager (MTM) is a dekstop address book application for *football team managers*.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"It can also be personalised to be used for other sports team management too such as basketball.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"With the features it provides, management of your players\u0027 contact details and team information is made easy. While","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"interactions between user and application is mainly by a *Command Line Interface (CLI)*, it features a JavaFx GUI display.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Summary of contributions","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"* *Major enhancement*: Added *security and privacy features*","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"** *What it does*: Ensures the information stored in MTM is *secured and kept private* when needed","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"** *Justification*: This feature is crucial for protecting the *confidentiality and integrity* of the details stored in MTM.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"It prevents unauthorised tampering of information while also maintaining confidentiality.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"** *Highlights*: Addition of a *locking mechanism* to limit functionality of MTM and changing *privacy of fields* that would maintain","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"confidentiality of certain information","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"* *Minor enhancement*:","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"** Added a sort function that allows the list to be sorted by fields for quick viewing of relevant information","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lohtianwei.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lohtianwei.md[Test code]]","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"* *Other contributions*:","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"** Project management:","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"*** Documented issues of project using GitHub\u0027s Issue Tracker and address the issues accordingly.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"** Enhancements to existing features:","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"*** Changes are mentioned in \u003c\u003cMinor Enhancement, Minor enhancement\u003e\u003e.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"** Documentation:","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"** Community:","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":"*** PRs reviewed (with non-trivial review comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR#169]]","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"*** Reported bugs and suggestions for other teams in the class (https://github.com/CS2103JAN2018-W09-B2/main/issues/198[1],","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/194[2],","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/182[3],","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/174[4])","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the User Guide","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dtogglePrivacy]","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dkey]","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the Developer Guide","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dkey]","isFullCredit":true}],"authorContributionMap":{"lohtianwei":68,"-":1}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * The main entry point to the application.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" public static final Version VERSION \u003d new Version(1, 1, 0, true);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" protected Ui ui;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Logic logic;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Config config;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void init() throws Exception {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" super.init();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" initLogging(config);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" logic \u003d new LogicManager(model);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" initEventsCenter();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" Config initializedConfig;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" String configFilePathUsed;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" return initializedConfig;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * reading from the file.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" return initializedPrefs;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" ui.start(primaryStage);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" ui.stop();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" System.exit(0);","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" this.stop();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" launch(args);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":211}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private String appTitle \u003d \"My Team Manager\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_THEME \u003d \"This theme does not exist!\\n\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TEAM_NOT_FOUND \u003d \"Team does not exist or is not specified!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_ALL_INDEX \u003d \"All person index provided is invalid\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":15}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeTagColourEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to change tag colour","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeTagColourEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String tagColour;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public ChangeTagColourEvent(String tagName, String tagColour) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":23}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**@@author Codee */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Indicates a request for theme change.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String theme;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ChangeThemeEvent(String theme) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().toString();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/ClearTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for clearing of all teams.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ClearTeamsEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public ClearTeamsEvent() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":7,"-":13}},{"path":"src/main/java/seedu/address/commons/events/ui/DeselectTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to deselected selected teams.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"public class DeselectTeamEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" public DeselectTeamEvent() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/HighlightSelectedTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to highlight selected team name.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class HighlightSelectedTeamEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public HighlightSelectedTeamEvent(String teamName) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" private final Person editedPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedEvent(Person editedPerson, Index index) {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" this.editedPerson \u003d editedPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" public Person getPerson() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" return this.editedPerson;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" return this.index;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":34}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedNoParamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel, but no paramaters.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedNoParamEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedNoParamEvent() { }","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/ShowNewTeamNameEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to show new team name.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ShowNewTeamNameEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ShowNewTeamNameEvent(String teamName) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":22}},{"path":"src/main/java/seedu/address/commons/events/ui/UndoTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for undoing clearing of all teams.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class UndoTeamsEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public UndoTeamsEvent() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":7,"-":11}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * API of the Logic component","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public interface Logic {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of list of teams */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /** Returns the command trie. */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" CommandTrie getCommandTrie();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":4,"-":32}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final CommandHistory history;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final CommandTrie commandTrie;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" commandTrie \u003d new CommandTrie();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" return result;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" } finally {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" history.add(commandText);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return model.getInitTeamList();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public CommandTrie getCommandTrie() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return commandTrie;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":6,"-":64}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TEAM_NAME;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Adds a player to the address book.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a player to the address book. \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TEAM_NAME + \"TEAMNAME] \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" + PREFIX_RATING + \"0 \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" + PREFIX_POSITION + \"1 \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + PREFIX_JERSEY_NUMBER + \"17 \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"goodAttitude\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New player added: %1$s\";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" private final Person toAdd;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code Person}","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public AddCommand(Person person) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" requireNonNull(person);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" toAdd \u003d person;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException e) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" TeamName teamName \u003d toAdd.getTeamName();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" if (!model.getAddressBook().getTeamList().stream().anyMatch(t -\u003e t.getTeamName().equals(teamName))) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (!teamName.toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" throw new CommandException((Messages.MESSAGE_TEAM_NOT_FOUND));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" || (other instanceof AddCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" \u0026\u0026 toAdd.equals(((AddCommand) other).toAdd));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":122}},{"path":"src/main/java/seedu/address/logic/commands/ChangeThemeCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Changes the theme of the Address Book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"changeTheme\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"cte\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" + \": Changes the theme of MTM.\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" + \"Parameters: THEME (must be either Light, or Dark)\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Examples: changeTheme Light, cte Dark\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_THEME_SUCCESS \u003d \"Theme updated to: %1$s\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final String theme;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" if (!isValidTheme(this.theme)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_THEME);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" if ((MainWindow.getCurrentTheme()).contains(this.theme)) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" throw new CommandException(\"Theme is already set to \" + this.theme + \"!\");","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private boolean isValidTheme(String theme) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" return theme.equals(\"Light\") || theme.equals(\"Dark\");","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" || (other instanceof ChangeThemeCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.theme.equals(((ChangeThemeCommand) other).theme)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":54}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Clears the address book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" model.resetData(new AddressBook());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // @@author Codee","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new ClearTeamsEvent());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" // @@author","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":2,"-":25}},{"path":"src/main/java/seedu/address/logic/commands/CreateCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Creates a team to the application","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class CreateCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"create\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"ct\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \"Creates a team in MTM. \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"TEAM_NAME\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Arsenal\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New team created: %1$s\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_TEAM \u003d \"This team already exist in the manager\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Team toCreate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Creates a CreateCommand to add the specified (@code Team)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CreateCommand(Team team) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" requireNonNull(team);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.toCreate \u003d team;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" model.createTeam(toCreate);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TEAM);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ShowNewTeamNameEvent(toCreate.getTeamName().toString()));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toCreate.getTeamName().toString()));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof CreateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 toCreate.equals(((CreateCommand) other).toCreate));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":3,"-":57}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Deletes a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \": Deletes the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private Person personToDelete;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public DeleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" requireNonNull(personToDelete);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" personToDelete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex) // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(this.personToDelete, ((DeleteCommand) other).personToDelete));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":69}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Edits the details of an existing player in the address book.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the player identified \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: %1$s\";","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book.\";","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" private Person personToEdit;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" private Person editedPerson;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * @param index of the player in the filtered player list to edit","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the player with","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" if (!editedPerson.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" editedPerson.getAvatar().setFilePath(editedPerson.getName().fullName);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * edited with {@code editPersonDescriptor}.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * NOTE: Private fields will not be edited.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static Person createEditedPerson(Person personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" Name updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" Phone updatedPhone \u003d (personToEdit.getPhone().isPrivate())","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" ? personToEdit.getPhone() : editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" Email updatedEmail \u003d (personToEdit.getEmail().isPrivate())","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" ? personToEdit.getEmail() : editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" Address updatedAddress \u003d (personToEdit.getAddress().isPrivate())","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" ? personToEdit.getAddress() : editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate())","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" ? personToEdit.getRemark() : personToEdit.getRemark();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" Rating updatedRating \u003d editPersonDescriptor.getRating().orElse(personToEdit.getRating());","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" JerseyNumber updatedJerseyNumber \u003d editPersonDescriptor.getJerseyNumber()","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" .orElse(personToEdit.getJerseyNumber());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" Position updatedPosition \u003d editPersonDescriptor.getPosition().orElse(personToEdit.getPosition());","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" return index.equals(e.index)","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor)","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(personToEdit, e.personToEdit);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" * Stores the details to edit the player with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" * corresponding field value of the player.","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" private Name name;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" private Phone phone;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" private Email email;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" private Address address;","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" private Rating rating;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" private Position position;","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" private JerseyNumber jerseyNumber;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" private Avatar avatar;","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Copy constructor.","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally.","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" setName(toCopy.name);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" setPhone(toCopy.phone);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" setEmail(toCopy.email);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" setAddress(toCopy.address);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" setTags(toCopy.tags);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" setRating(toCopy.rating);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" setPosition(toCopy.position);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" setJerseyNumber(toCopy.jerseyNumber);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" setAvatar(toCopy.avatar);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.tags,","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" this.rating, this.position, this.jerseyNumber, this.avatar);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Sets {@code tags} to this object\u0027s {@code tags}.","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally.","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" this.tags \u003d (tags !\u003d null) ? new HashSet\u003c\u003e(tags) : null;","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * Returns an unmodifiable tag set, which throws {@code UnsupportedOperationException}","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" * if modification is attempted.","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" * Returns {@code Optional#empty()} if {@code tags} is null.","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" return (tags !\u003d null) ? Optional.of(Collections.unmodifiableSet(tags)) : Optional.empty();","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" public void setRating(Rating rating) {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" this.rating \u003d rating;","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" public Optional\u003cRating\u003e getRating() {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" return Optional.ofNullable(rating);","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" public void setPosition(Position position) {","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" this.position \u003d position;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" public Optional\u003cPosition\u003e getPosition() {","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" return Optional.ofNullable(position);","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" public void setJerseyNumber(JerseyNumber jerseyNumber) {","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" this.jerseyNumber \u003d jerseyNumber;","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" public Optional\u003cJerseyNumber\u003e getJerseyNumber() {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" return Optional.ofNullable(jerseyNumber);","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" public void setAvatar(Avatar avatar) {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" this.avatar \u003d avatar;","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" public Optional\u003cAvatar\u003e getAvatar() {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" return Optional.ofNullable(avatar);","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags())","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" \u0026\u0026 getRating().equals(e.getRating())","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" \u0026\u0026 getPosition().equals(e.getPosition())","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":" \u0026\u0026 getJerseyNumber().equals(e.getJerseyNumber())","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar());","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":335}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Finds and lists all persons in address book whose name contains any of the argument keywords.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"KEYWORD [MORE KEYWORD]\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final NameContainsKeywordsPredicate predicate;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" this.predicate \u003d predicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" || (other instanceof FindCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 this.predicate.equals(((FindCommand) other).predicate)); // state check","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/KeyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Sets lock in model to true/false depending on current state","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"key\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"k\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the lock on MTM. \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"Functionality of MTM reduced\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Input empty password to see current lock state\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: [PASSWORD]\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \" myPassword\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"MTM lock toggled!\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_WRONG_PASS \u003d \"Password entered is incorrect. Please try again.\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"[PASSWORD]\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" private String password;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final Logger logger \u003d LogsCenter.getLogger(KeyCommand.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand(String password) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" this.password \u003d password;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" * Checks if input password is correct.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" private boolean correctPassword() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" UserPrefs up \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" return hash.equals(up.getAddressBookHashedPass());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" private boolean emptyPass() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" return password.isEmpty();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (emptyPass()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_USAGE + \"\\nLock state is now: \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" if (correctPassword()) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (model.getLockState()) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS + \"\\nLock state is now: \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_WRONG_PASS);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":74}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all persons\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":4,"-":20}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/RemarkCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Updates the remark of an existing player in the address book.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RemarkCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"remark\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"rm\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Updates the remark of the player identified \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"[REMARK]\\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"Must put on field\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADD_REMARK_SUCCESS \u003d \"Remark added to: %1$s\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_REMARK_SUCCESS \u003d \"Remark removed from: %1$s\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Remark remark;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private Person personToEdit;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Person editedPerson;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public RemarkCommand(Index index, Remark remark) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" requireNonNull(personToEdit);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Updating remark should not result in duplicate\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new CommandResult(getSuccessMessage(editedPerson));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" editedPerson \u003d new Person(personToEdit.getName(), personToEdit.getPhone(), personToEdit.getEmail(),","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" personToEdit.getAddress(), remark, personToEdit.getTeamName(), personToEdit.getTags(),","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" personToEdit.getRating(), personToEdit.getPosition(), personToEdit.getJerseyNumber(),","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" personToEdit.getAvatar());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!(other instanceof RemarkCommand)) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" RemarkCommand e \u003d (RemarkCommand) other;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return index.equals(e.index)","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" \u0026\u0026 remark.equals(e.remark);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Gets the corresponding success message based on the remark field from {@code personToEdit} after editing.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" private String getSuccessMessage(Person person) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" String message \u003d remark.value.isEmpty() ? MESSAGE_DELETE_REMARK_SUCCESS : MESSAGE_ADD_REMARK_SUCCESS;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return String.format(message, personToEdit);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":4,"-":107}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":54}},{"path":"src/main/java/seedu/address/logic/commands/SetCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" * Adds a colour to a tag in address book.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/** @@author Codee Ong Ong */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"setTagColour\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sets the colour of tags to the colour of choice \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"TAG \"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"friends \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG_COLOUR + \"green\\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" + \"Colours to choose from are : teal, red, yellow, blue, orange, brown, \\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" + \"green, pink, black, grey\\n\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_TAG + \"TAG \" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_TAG \u003d \"tag is invalid! Please input a valid tag name!\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_SUCCESS \u003d \"tag %1$s colour changed to %2$s\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private final String tagColour;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" * Creates an AddCommand to add the specified {@code Person}","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" if (!tagToSet.isValidTagName(tagToSet.getTagName()) || !isTagValid) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_INVALID_TAG));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // Check if","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" // (a) Object is the same object","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" // (b) Object is an instance of the object and that toSet, tag and color are the same","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" || (other instanceof SetCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagToSet.getTagName().equals(((SetCommand) other).tagToSet.getTagName()))","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagColour.equals(((SetCommand) other).tagColour);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Sorts all players in address book by field. Can be done in asc or desc order.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class SortCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_ASCENDING \u003d \"asc\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_DESCENDING \u003d \"desc\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts players in address book \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"by fields in either ascending or descending order.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: FIELD ORDER\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted fields for sort: name, email, address, rating, jersey, pos\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted orders: asc \u0026 desc\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" + \" name \" + BY_ASCENDING;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"FIELD ORDER\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Players in address book have been sorted.\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_EMPTY_BOOK \u003d \"No player(s) to sort.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private final String field;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final String order;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public SortCommand(String field, String order) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(field);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(order);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" this.field \u003d field;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" this.order \u003d order;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public String getField() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" return this.field;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public String getOrder() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return this.order;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" model.sortPlayers(getField(), getOrder());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" } catch (NoPlayerException npe) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_EMPTY_BOOK);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":62}},{"path":"src/main/java/seedu/address/logic/commands/TogglePrivacyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" * Toggles privacy of fields of player identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"toggleprivacy\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"tp\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the field privacy of the person\"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" + \" identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"]\"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_EMAIL + \"]\"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_REMARK + \"]\"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_RATING + \"]\"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_ADDRESS + \"]\\n\"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE + \" \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_EMAIL + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"No prefixes were specified!\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE]\"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_EMAIL + \"EMAIL]\"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_REMARK + \"REMARK]\"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_RATING + \"RATING]\"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_ADDRESS + \"ADDRESS]\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" private final EditPersonPrivacy epp;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" private Person personToEdit;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" private Person editedPerson;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" * @param index of the person in the filtered person list to edit privacy","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand(Index index, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(epp);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d epp;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" editedPerson \u003d createEditedPrivacyPerson(personToEdit, epp);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Person must have all fields!\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" * edited with {@code editPersonPrivacy}.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" * NOTE: Private fields will not be edited.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" return phone;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" private static Email createEmailPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" Email email;","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Email\");","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateEmail() !\u003d null) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" email.togglePrivacy();","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" return email;","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" private static Address createAddressPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" Address address;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Address\");","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateAddress() !\u003d null) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":" address.togglePrivacy();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" return address;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" private static Remark createRemarkPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Remark\");","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRemark() !\u003d null) {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":" remark.togglePrivacy();","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" return remark;","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Rating) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Rating) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" private static Rating createRatingPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":" Rating rating;","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Rating\");","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRating() !\u003d null) {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":" rating.togglePrivacy();","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" return rating;","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":" return index;","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy getEpp() {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" return epp;","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" return true;","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof TogglePrivacyCommand)) {","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" return false;","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"lohtianwei"},"content":" // state check","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand e \u003d (TogglePrivacyCommand) other;","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" return index.equals(e.index)","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 epp.equals(e.epp);","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" * corresponding field value of the person.","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" public static class EditPersonPrivacy {","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" private Boolean privatePhone;","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateEmail;","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateAddress;","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRemark;","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRating;","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy() {}","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":" * Copy constructor.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"lohtianwei"},"content":" * A defensive copy of {@code tags} is used internally.","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy (EditPersonPrivacy toCopy) {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d toCopy.privateAddress;","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d toCopy.privateEmail;","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d toCopy.privatePhone;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d toCopy.privateRemark;","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d toCopy.privateRating;","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"lohtianwei"},"content":" public void setPrivatePhone(boolean privatePhone) {","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d privatePhone;","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivatePhone() {","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"lohtianwei"},"content":" return privatePhone;","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateEmail(boolean privateEmail) {","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d privateEmail;","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateEmail() {","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"lohtianwei"},"content":" return privateEmail;","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateAddress(boolean privateAddress) {","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d privateAddress;","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateAddress() {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"lohtianwei"},"content":" return privateAddress;","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRemark(boolean privateRemark) {","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d privateRemark;","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRemark() {","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":" return privateRemark;","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRating(boolean privateRating) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d privateRating;","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRating() {","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"lohtianwei"},"content":" return privateRating;","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"lohtianwei"},"content":" *","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"lohtianwei"},"content":" * @return true if at least one field is not null","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":" public boolean anyNonNullField() {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"lohtianwei"},"content":" return CollectionUtil.isAnyNonNull(this.privateAddress, this.privateEmail, this.privatePhone,","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"lohtianwei"},"content":" this.privateRating, this.privateRemark);","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"lohtianwei"},"content":" return true;","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof EditPersonPrivacy)) {","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"lohtianwei"},"content":" return false;","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"lohtianwei"},"content":" // state check","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy e \u003d (EditPersonPrivacy) other;","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"lohtianwei"},"content":" return getPrivatePhone().equals(e.getPrivatePhone())","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateAddress().equals(e.getPrivateAddress())","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateEmail().equals(e.getPrivateEmail())","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRemark().equals(e.getPrivateRemark())","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRating().equals(e.getPrivateRating());","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":394,"-":2}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/ViewCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * View a team identified using it\u0027s team name from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ViewCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"view\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"vt\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \": Views the team identified by the team name.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: TEAM_NAME\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" Arsenal\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_VIEW_TEAM_SUCCESS \u003d \"Viewing Team: %1$s\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final TeamName targetTeam;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public ViewCommand(TeamName targetTeam) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.targetTeam \u003d targetTeam;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(targetTeam.toString()));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(targetTeam);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_VIEW_TEAM_SUCCESS, targetTeam.toString()));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof ViewCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetTeam.equals(((ViewCommand) other).targetTeam)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":51}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemoveCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RenameCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ViewCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Parses user input.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddressBookParser {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_RESTRICTED \u003d \"Not allowed! Please unlock MTM before execution.\\n\"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" + KeyCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * @param userInput full user input string","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @return the command based on the user input","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Command res \u003d lowLevelCommand(commandWord, arguments);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" if (res !\u003d null) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return res;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" if (lockState) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(MESSAGE_RESTRICTED);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" case AddCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" case EditCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" case SelectCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" case DeleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" case ClearCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" return new RemarkCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" case HistoryCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" return new HistoryCommand();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new CreateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return new RemoveCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new AssignCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" return new RenameCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" case UndoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" return new UndoCommand();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case RedoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new RedoCommand();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" return new SetCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" case TogglePrivacyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" return new TogglePrivacyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * Checks for low level command words or aliases that do not violate restriction of a locked MTM.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" * Else, control is returned back to original parseCommand method.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" * @param commandWord","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" * @param arguments","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" switch(commandWord) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" return new ChangeThemeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" return new ViewCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" return null;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":84,"codeeong":6,"-":93}},{"path":"src/main/java/seedu/address/logic/parser/ChangeThemeCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.ChangeThemeCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Parses input arguments and creates a new ThemeCommand object.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParser implements Parser\u003cChangeThemeCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" * Parses the given (@code String) in the context of a ThemeCommand.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" * @return ThemeCommand Object for execution","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand parse(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" if (userInput.length() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" return new ChangeThemeCommand(userInput);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":26}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final Prefix PREFIX_TAG_COLOUR \u003d new Prefix(\"tc/\");","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TEAM_NAME \u003d new Prefix(\"tm/\");","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_INDEX \u003d new Prefix(\"i/\");","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_RATING \u003d new Prefix(\"ra/\");","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_JERSEY_NUMBER \u003d new Prefix(\"j/\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_POSITION \u003d new Prefix(\"po/\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"av/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":21}},{"path":"src/main/java/seedu/address/logic/parser/KeyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Parses input and creates KeyCommand object with password provided","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandParser implements Parser\u003cKeyCommand\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the KeyCommand","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" * and returns a KeyCommand object for execution.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" /*if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }*/","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length \u003e 1) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommand(argKeywords[0]);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":31}},{"path":"src/main/java/seedu/address/logic/parser/SetCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" * This class is to check whether Set Command was input correctly","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" * Parses the given {@code String} of arguments in the context of the SetCommand","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * and returns an SetCommand object for execution.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG, PREFIX_TAG_COLOUR);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG, PREFIX_TAG_COLOUR)","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" || !argMultimap.getPreamble().isEmpty()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d ParserUtil.parseTag(argMultimap.getValue(PREFIX_TAG).get());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" String colour \u003d ParserUtil.parseTagColour(argMultimap.getValue(PREFIX_TAG_COLOUR).get());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" if (!tag.isValidTagColour(colour)) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" return new SetCommand(tag, colour);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":56}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new SortCommand object with field and order parameters provided","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_FIELDS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" \"name\", \"email\", \"address\", \"rating\", \"jersey\", \"pos\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_ORDERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" \"asc\", \"desc\"));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public SortCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" //eliminates spaces","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" //accounts for caps entries","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length !\u003d 2) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_FIELDS.contains(argKeywords[0])) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_ORDERS.contains(argKeywords[1])) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return new SortCommand(argKeywords[0], argKeywords[1]);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":51}},{"path":"src/main/java/seedu/address/logic/parser/TogglePrivacyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new TogglePrivacyCommand object","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParser implements Parser\u003cTogglePrivacyCommand\u003e {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the TogglePrivacyCommand","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" * and returns an TogglePrivacyCommand object for execution.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" ArgumentTokenizer.tokenize(args,","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" PREFIX_REMARK, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_RATING);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" Index index;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_RATING).isPresent()) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" if (!epp.anyNonNullField()) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(TogglePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" return new TogglePrivacyCommand(index, epp);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":67,"-":2}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.UniqueTeamList;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e syncedPersonList \u003d newData.getPersonList().stream()","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" .map(this::syncWithMasterTagList)","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e syncedTeamList \u003d newData.getTeamList();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(syncedPersonList);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" setTeams(syncedTeamList);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBooks should not have duplicate persons\");","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" throw new AssertionError(\"MTM should not have duplicate teams\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" //// person-level operations","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person p) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person person \u003d syncWithMasterTagList(p);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" persons.add(person);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedPerson}.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * @see #syncWithMasterTagList(Person)","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person syncedEditedPerson \u003d syncWithMasterTagList(editedPerson);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" removeUnusedTags();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayersBy(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" persons.sortBy(field, order);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" //@@author","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Updates the master tag list to include tags in {@code person} that are not in the list.","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @return a copy of this {@code person} such that every tag in this person points to a Tag object in the master","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * list.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" private Person syncWithMasterTagList(Person person) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" // used for checking person tag references","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" return new Person(","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" person.getName(), person.getPhone(), person.getEmail(), person.getAddress(), person.getRemark(),","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" person.getTeamName(), correctTagReferences, person.getRating(), person.getPosition(),","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" public boolean removePerson(Person key) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" //// tag-level operations","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" tags.add(t);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" * Sets the colour of {@code tag}.","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" public void setTagColour(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" for (Tag t : tags) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" if (t.getTagName().equals(tag.getTagName())) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(colour);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Removes {@code tag} from all persons in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void removeTag(Tag tag) {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" for (Person person : persons) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" removeTagFromPerson(tag, person);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Removes {@code tag} from {@code person} in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code person} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" private void removeTagFromPerson(Tag tag, Person person) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003c\u003e(person.getTags());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (!newTags.remove(tag)) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" return;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" Person newPerson \u003d","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" person.getRemark(), person.getTeamName(), newTags, person.getRating(), person.getPosition(),","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" updatePerson(person, newPerson);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person \"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" + \"after updating person\u0027s tag.\");","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" * Removes all {@code tag} that are not in used by any {@code Person} in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" private void removeUnusedTags() {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e tagsInPersons \u003d persons.asObservableList().stream()","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" .map(Person::getTags)","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" .flatMap(Set::stream)","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" .collect(Collectors.toSet());","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" tags.setTags(tagsInPersons);","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" //@@author jordancjq","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" * Creates a team in the manager.","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" * @throws DuplicateTeamException if an equivalent team already exists.","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void createTeam(Team t) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" teams.add(t);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Assigns a {@code person} to a {@code team}.","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" if (!person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(), person.getPosition(),","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" if (!person.getTeamName().equals(newPersonWithTeam.getTeamName())) {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" * Unassigns a {@code person} from team.","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code teamName} in {@code person} is {@code UNSPECIFIED_FIELD}.","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException(person.getName().toString());","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" * Immediately add a {@code person} to a {@code team}.","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" public void addPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":" * Removes a {@code person} from a {@code team}.","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":" private void removePersonFromTeam(Person person, TeamName teamName) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" teams.removePersonFromTeam(person, teams.getTeam(teamName));","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" * Removes a {@code team} from {@code teams}.","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" if (!teams.contains(teamName)) {","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" Team teamToRemove \u003d teams.getTeam(teamName);","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":" for (Person person : teamToRemove) {","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":" removeTeamFromPerson(person);","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" teams.remove(teamToRemove);","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" * Removes {@code teamName} from {@code person} in this {@code Team}.","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":" private void removeTeamFromPerson(Person person) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" Person personWithRemoveTeam \u003d","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRemoveTeam);","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":" * Renames {@code Team} with {@code updatedTeamName}.","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":" * @return","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e renameTeamPersonList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" for (Person person : persons) {","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":" if (person.getTeamName().equals(targetTeam.getTeamName())) {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" renameTeamPersonList.add(renameTeamInPerson(person, updatedTeamName, targetTeam));","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" Team updatedTeam \u003d new Team(updatedTeamName, renameTeamPersonList);","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" teams.setTeam(targetTeam, updatedTeam);","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException dte) {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate team after renaming\");","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Teams should contain this team\");","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":" * Renames {@code teamName} in {@code person} with {@code teamName}.","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":" private Person renameTeamInPerson(Person person, TeamName teamName, Team targetTeam) {","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" Person personWithRenameTeam \u003d","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(),","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRenameTeam);","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" return personWithRenameTeam;","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" //// util methods","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\";","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":" // TODO: refine later","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":" return persons.asObservableList();","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":" return tags.asObservableList();","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":" return teams.asObservableList();","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags));","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":" return Objects.hash(persons, tags);","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":7,"codeeong":13,"-":431}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The API of the Model component.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public interface Model {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" Predicate\u003cPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" void deletePerson(Person target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Adds the given person */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" void addPerson(Person person) throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code teamName}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" * Sorts players in address book by field in asc or desc order","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" * @param field","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" * @param order","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" void sortPlayers(String field, String order) throws NoPlayerException;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" boolean getLockState();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" UserPrefs getUserPrefs();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" /** Locks address book from model*/","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" void lockAddressBookModel();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /** Unlocks address book from model*/","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" void unlockAddressBookModel();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /** Removes the given {@code tag} from all {@code Person}s. */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" void deleteTag(Tag tag);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" /** Create the given team */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" void createTeam(Team team) throws DuplicateTeamException;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /** Assign person to team */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" void assignPersonToTeam(Person person, TeamName teamName)","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /** Unassign person from team */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" void unassignPersonFromTeam(Person person) throws TeamNotFoundException;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /** Removes the given team */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" void removeTeam(TeamName teamName) throws TeamNotFoundException;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Renames the given team */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" void renameTeam(Team targetTeam, TeamName teamName);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" /** sets the given {@code tag} to color. */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" boolean setTagColour(Tag tag, String colour);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of the team list */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":18,"codeeong":5,"-":78}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final FilteredList\u003cPerson\u003e filteredPersons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private final UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" this.userPrefs \u003d userPrefs;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(Person target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public synchronized void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" addressBook.sortPlayersBy(field, order);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" return userPrefs;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().lockAddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().unlockAddressBook();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" return getUserPrefs().getAddressBookLockState();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" //@@author","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" addressBook.removeTag(tag);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" //@@author jordancjq","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" public synchronized void createTeam(Team team) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" addressBook.createTeam(team);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" public synchronized void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" addressBook.assignPersonToTeam(person, teamName);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public synchronized void unassignPersonFromTeam(Person person) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" addressBook.unassignPersonFromTeam(person);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" public synchronized void removeTeam(TeamName teamName) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" requireNonNull(teamName);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" raise(new RemoveSelectedTeamEvent(teamName));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" addressBook.removeTeam(teamName);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" public synchronized void renameTeam(Team targetTeam, TeamName updatedTeamName) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" requireAllNonNull(targetTeam, updatedTeamName);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" addressBook.renameTeam(targetTeam, updatedTeamName);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public boolean setTagColour(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e allTags \u003d addressBook.getTagList();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" boolean isTagValid \u003d false;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" for (Tag t : allTags) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" if (t.getTagName().equals(tag.getTagName())) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" isTagValid \u003d true;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" break;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" if (!isTagValid) {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" addressBook.setTagColour(tag, colour);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" return isTagValid;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" return addressBook.getTeamList();","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code Person} backed by the internal list of","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" * {@code addressBook}","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author jordancjq","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":28,"codeeong":7,"-":197}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String addressBookFilePath \u003d \"data/myteammanager.xml\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private String addressBookName \u003d \"MyTeamManager\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private String addressBookTheme \u003d \"DarkTheme.css\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" private String addressBookHashedPass \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" .hashString(\"ilikesports\", StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public UserPrefs() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.setGuiSettings(500, 500, 0, 0);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return addressBookFilePath;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddressBookName() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressBookName;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBook() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d true;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBook() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public String getAddressBookHashedPass() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" return addressBookHashedPass;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean getAddressBookLockState() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return this.addressBookLockState;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public String getAddressBookTheme() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return addressBookTheme;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" public void setAddressBookTheme(String addressBookTheme) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" this.addressBookTheme \u003d addressBookTheme;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookHashedPass, o.addressBookHashedPass)","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nPassword: \" + addressBookHashedPass);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":28,"codeeong":9,"-":80}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs an {@code Address}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @param address A valid address.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Address(String address) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" checkArgument(isValidAddress(address), MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" public Address(String address, boolean isPrivate) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" this(address);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":73}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.nio.file.Files;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.nio.file.Path;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.nio.file.Paths;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.nio.file.StandardCopyOption;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s avatar in the address book. Contains filepath to avatar image file.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAvatar(String)}","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class Avatar {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \"Please specify the absolute filepath for the avatar image eg. av/C:\\\\image.png\\n (for Windows), \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" + \"av//User/username/path/to/image.jpg (for MacOS). \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"Image file should be 200x200 and in jpg or png format\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String AVATAR_VALIDATION_PATTERN \u003d \"([^\\\\s]+(\\\\.(?i)(jpg|png))$)\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private String value;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Constructs an {@code Avatar}.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @param avatar A valid avatar.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public Avatar(String avatar) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(avatar);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" checkArgument(isValidAvatar(avatar), MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.value \u003d avatar;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s avatar.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidAvatar(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" Pattern pattern \u003d Pattern.compile(AVATAR_VALIDATION_PATTERN);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" Matcher matcher \u003d pattern.matcher(test);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return matcher.matches() || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Copies the image file from file path entered into images/ and renames it as [name].png","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * and saves the file path in value","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" * @param player player\u0027s avatar image filepath string","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * @throws IOException thrown when file not found","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setFilePath(String player) throws IOException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" final File file \u003d new File(value);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.value \u003d dest.toString();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" public String getValue() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public static void setUpPlaceholderForTest() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" Files.copy(Avatar.class.getResourceAsStream(\"/images/placeholder_test.png\"),","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" Paths.get(\"images/placeholder_test.png\"), StandardCopyOption.REPLACE_EXISTING);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" LogsCenter.getLogger(Avatar.class).warning(\"placeholder image file missing\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":108}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s email in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Email {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" private static final String SPECIAL_CHARACTERS \u003d \"!#$%\u0026\u0027*+/\u003d?`{|}~^.-\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d \"Person emails should be of the format local-part@domain \"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" + \"and adhere to the following constraints:\\n\"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"1. The local-part should only contain alphanumeric characters and these special characters, excluding \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the parentheses, (\" + SPECIAL_CHARACTERS + \") .\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"2. This is followed by a \u0027@\u0027 and then a domain name. \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"The domain name must:\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \" - be at least 2 characters long\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" + \" - start and end with alphanumeric characters\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \" - consist of alphanumeric characters, a period or a hyphen for the characters in between, if any.\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // alphanumeric and special characters","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String LOCAL_PART_REGEX \u003d \"^[\\\\w\" + SPECIAL_CHARACTERS + \"]+\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String DOMAIN_FIRST_CHARACTER_REGEX \u003d \"[^\\\\W_]\"; // alphanumeric characters except underscore","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String DOMAIN_MIDDLE_REGEX \u003d \"[a-zA-Z0-9.-]*\"; // alphanumeric, period and hyphen","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String DOMAIN_LAST_CHARACTER_REGEX \u003d \"[^\\\\W_]$\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d LOCAL_PART_REGEX + \"@\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" + DOMAIN_FIRST_CHARACTER_REGEX + DOMAIN_MIDDLE_REGEX + DOMAIN_LAST_CHARACTER_REGEX;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Constructs an {@code Email}.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @param email A valid email address.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public Email(String email) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" checkArgument(isValidEmail(email), MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.value \u003d email;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" public Email(String email, boolean isPrivate) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" this(email);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return test.matches(EMAIL_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Email\u003e\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":81}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Phone {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Constructs a {@code Phone}.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @param phone A valid phone number.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" checkArgument(isValidPhone(phone), MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" this.value \u003d phone;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" public Phone(String phone, boolean isPrivate) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" this(phone);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Phone\u003e\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":68}},{"path":"src/main/java/seedu/address/model/person/Rating.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s rating in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRating(String)}","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class Rating {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_RATING_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Player\u0027s rating should be an integer from 0 - 5.\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String RATING_VALIDATION_REGEX \u003d \"[0-5]\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs an {@code Rating}.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param rating A valid rating.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Rating(String rating) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(rating);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidRating(rating), MESSAGE_RATING_CONSTRAINTS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.value \u003d rating;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public Rating(String rating, boolean isPrivate) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this(rating);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s rating.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static boolean isValidRating(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" return test.matches(RATING_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Rating\u003e\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" || (other instanceof Rating // instanceof handles nulls","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Rating) other).value)); // state check","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":21,"-":56}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s remark in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is always valid}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Remark {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_REMARK_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Remark can contain any values, can even be blank\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Constructs a {@code Remark}","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @param remark Any remark","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Remark(String remark) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.value \u003d remark;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" public Remark(String remark, boolean isPrivate) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" this(remark);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Remarks\u003e\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof Remark // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":57}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public boolean contains(Person toCheck) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Adds a person to the list.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void add(Person toAdd) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" internalList.add(toAdd);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void setPerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" internalList.set(index, editedPerson);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public boolean remove(Person toRemove) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" requireAllNonNull(persons);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" for (final Person person : persons) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" replacement.add(person);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" setPersons(replacement);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e asObservableList() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(internalList);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" * Sorts players by selected field in asc or desc order.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" * @return","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" public void sortBy(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" if (internalList.size() \u003c 1) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" throw new NoPlayerException();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e jerseyComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" return p1.getJerseyNumber().value.compareTo(p2.getJerseyNumber().value);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e ratingComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" return p1.getRating().toString().compareTo(p2.getRating().toString());","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e posComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" return p1.getPosition().value.compareTo(p2.getPosition().value);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e emailComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" return p1.getEmail().toString().compareTo(p2.getEmail().toString());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e addressComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" return p1.getAddress().toString().compareTo(p2.getAddress().toString());","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case \"jersey\":","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d jerseyComparator;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" case \"pos\":","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d posComparator;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" case \"rating\":","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d ratingComparator;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d emailComparator;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d addressComparator;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" //@@author","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":105,"-":118}},{"path":"src/main/java/seedu/address/model/person/exceptions/NoPlayerException.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.model.person.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":" * Singals that the operation is unable to sort due to no players in book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"public class NoPlayerException extends Exception {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":7}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Tag {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be a string\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_COLOUR_CONSTRAINTS \u003d \"Tag colours should be one of these colours:\"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" + \"teal, red, yellow, blue, orange, brown, green, pink, black, grey\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private static final String[] TAG_COLOR_STYLES \u003d","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" { \"teal\", \"red\", \"yellow\", \"blue\", \"orange\", \"brown\", \"green\", \"pink\", \"black\", \"grey\" };","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" private String tagColour;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs a {@code Tag}.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param tagName A valid tag name.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Tag(String tagName) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(tagName);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Overloaded constructor for a {@code Tag}.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" * @param tagName A valid tag name","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" * @param tagColour A valid tag colour.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" public Tag(String tagName, String tagColour) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" requireNonNull(tagName);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" public String getTagName() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" return this.tagName;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag name.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagName(String test) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return test.matches(TAG_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public String getTagColour() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" return this.tagColour;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" * Changes the {@code tagColour} for {@code tagName}\u0027s label","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" public void changeTagColour(String colour) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d colour;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag colour.","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagColour(String testColour) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (String tcs : TAG_COLOR_STYLES) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (testColour.equals(tcs)) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" return true;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" return false;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" return tagName.hashCode();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":54,"-":49}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new Person[] {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Aaron Ramsey\"), new Phone(\"87438807\"), new Email(\"aramsey@example.com\"),","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), new Remark(\"Sign him for one more year\"),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" getTagSet(\"redCard\"), new Rating(\"3\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Hector Moruno\"), new Phone(\"99272758\"), new Email(\"hectorm@example.com\"),","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cesc Fabregas\"), new Phone(\"93210283\"), new Email(\"cescfabregas@example.com\"),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ospina\"), new Phone(\"99272758\"), new Email(\"Ospina@arsenal.com\"),","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"22\"),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cech\"), new Phone(\"93210283\"), new Email(\"cech@arsenal.com\"),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mertesacker\"), new Phone(\"95432223\"), new Email(\"mertesacker@arsenal.com\"),","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Koscielny\"), new Phone(\"92352021\"), new Email(\"koscielny@example.com\"),","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Holding\"), new Phone(\"92624417\"), new Email(\"holding@example.com\"),","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Monreal\"), new Phone(\"99272758\"), new Email(\"monreal@arsenal.com\"),","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mustafi\"), new Phone(\"93215483\"), new Email(\"mustafi@arsenal.com\"),","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"4\"),","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"91031282\"), new Email(\"chambers@arsenal.com\"),","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"92492021\"), new Email(\"chambers@arsenal.com\"),","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" new TeamName(\"Chelsea\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Irfan Fandi\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mavropanos\"), new Phone(\"92624417\"), new Email(\"mavropanos@arsenal.com\"),","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"98\"),","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Kolasinac\"), new Phone(\"99272758\"), new Email(\"kolasinac@arsenal.com\"),","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"2\"), new JerseyNumber(\"52\"),","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mkhitaryan\"), new Phone(\"93210283\"), new Email(\"mkhitaryan@arsenal.com\"),","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Wilshere\"), new Phone(\"95432223\"), new Email(\"wilshere@arsenal.com\"),","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ozil\"), new Phone(\"92352021\"), new Email(\"ozil@example.com\"),","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Xhaka\"), new Phone(\"92624417\"), new Email(\"xhaka@example.com\"),","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" public static Team[] getSampleTeams() {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" return new Team[] {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Arsenal\")),","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Chelsea\"))","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" for (Team sampleTeam : getSampleTeams()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" sampleAb.createTeam(sampleTeam);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" sampleAb.addPersonToTeam(samplePerson, samplePerson.getTeamName());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" return sampleAb;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"codeeong"},"content":" } catch (DuplicateTeamException e) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\" sample data cannot contain duplicate teams\", e);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" for (String s : strings) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":86,"-":83}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Person\u0027s %s field is missing!\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String name;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private String phone;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Boolean phonePrivacy;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private String email;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Boolean emailPrivacy;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private String address;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Boolean addressPrivacy;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private String remark;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Boolean remarkPrivacy;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private String teamName;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private String rating;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" private Boolean ratingPrivacy;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" private String position;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private String jerseyNumber;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private String avatar;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" * Constructs an {@code XmlAdaptedPerson} with the given person details.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(String name, String phone, String email, String address, List\u003cXmlAdaptedTag\u003e tagged) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.remarkPrivacy \u003d false;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.phonePrivacy \u003d false;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" this.addressPrivacy \u003d false;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" this.emailPrivacy \u003d false;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" if (tagged !\u003d null) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" this.tagged \u003d new ArrayList\u003c\u003e(tagged);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Converts a given Person into this class for JAXB use.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(Person source) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" name \u003d source.getName().fullName;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" phone \u003d source.getPhone().value;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" email \u003d source.getEmail().value;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" address \u003d source.getAddress().value;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" remark \u003d source.getRemark().value;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" teamName \u003d source.getTeamName().fullName;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" phonePrivacy \u003d source.getPhone().isPrivate();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" emailPrivacy \u003d source.getEmail().isPrivate();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" addressPrivacy \u003d source.getAddress().isPrivate();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" remarkPrivacy \u003d source.getRemark().isPrivate();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d source.getRating().isPrivate();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" rating \u003d source.getRating().value;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" position \u003d source.getPosition().value;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" jerseyNumber \u003d source.getJerseyNumber().value;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" avatar \u003d source.getAvatar().getValue();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" for (Tag tag : source.getTags()) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" tagged.add(new XmlAdaptedTag(tag));","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" public Person toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag tag : tagged) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" personTags.add(tag.toModelType());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" if (phonePrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" phonePrivacy \u003d false;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" if (emailPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" emailPrivacy \u003d false;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" if (addressPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" addressPrivacy \u003d false;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" if (remarkPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" remarkPrivacy \u003d false;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" if (ratingPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d false;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" if (this.name \u003d\u003d null) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName()));","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" if (!Name.isValidName(this.name)) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" final Name name \u003d new Name(this.name);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" if (this.phone \u003d\u003d null) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName()));","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" if (!Phone.isValidPhone(this.phone)) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" final Phone phone \u003d new Phone(this.phone, this.phonePrivacy);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" if (this.email \u003d\u003d null) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName()));","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (!Email.isValidEmail(this.email)) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" final Email email \u003d new Email(this.email, this.emailPrivacy);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" if (this.address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName()));","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" if (!Address.isValidAddress(this.address)) {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Address.MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" final Address address \u003d new Address(this.address, this.addressPrivacy);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkPrivacy);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" if (this.rating \u003d\u003d null) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Rating.class.getSimpleName()));","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" if (!Rating.isValidRating(this.rating)) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Rating.MESSAGE_RATING_CONSTRAINTS);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" final Rating rating \u003d new Rating(this.rating, this.ratingPrivacy);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" if (this.position \u003d\u003d null) {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" Position.class.getSimpleName()));","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" if (!Position.isValidPosition(this.position)) {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Position.MESSAGE_POSITION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" final Position position \u003d new Position(this.position);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (this.jerseyNumber \u003d\u003d null) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" JerseyNumber.class.getSimpleName()));","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" if (!JerseyNumber.isValidJerseyNumber(this.jerseyNumber)) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" throw new IllegalValueException(JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" final JerseyNumber jerseyNumber \u003d new JerseyNumber(this.jerseyNumber);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" if (this.avatar \u003d\u003d null) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" Avatar.class.getSimpleName()));","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" if (!Avatar.isValidAvatar(this.avatar)) {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Avatar.MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" return new Person(name, phone, email, address, remark, teamName, tags, rating, position, jerseyNumber, avatar);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedPerson)) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" XmlAdaptedPerson otherPerson \u003d (XmlAdaptedPerson) other;","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" return Objects.equals(name, otherPerson.name)","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(phone, otherPerson.phone)","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(email, otherPerson.email)","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(address, otherPerson.address)","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" \u0026\u0026 tagged.equals(otherPerson.tagged);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":34,"-":209}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Tag.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class XmlAdaptedTag {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private String tagName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String tagColour;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedTag.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public XmlAdaptedTag() {}","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(String tagName) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName} and {@code tagColour}.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTag(String tagName, String tagColour) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Converts a given Tag into this class for JAXB use.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(Tag source) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" tagName \u003d source.tagName;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" tagColour \u003d source.getTagColour();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Tag object.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public Tag toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (!Tag.isValidTagName(tagName)) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" if (!Tag.isValidTagColour(tagColour)) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_COLOUR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" return new Tag(tagName, tagColour);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedTag)) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return tagName.equals(((XmlAdaptedTag) other).tagName);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":22,"-":59}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTeam.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Team","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class XmlAdaptedTeam {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Team\u0027s %s field is missing!\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private String teamName;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" * Constructs an XmlAdaptedTeam.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam() {}","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTeam} with the given {@code teamName}.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public XmlAdaptedTeam(String teamName, List\u003cXmlAdaptedPerson\u003e persons) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (persons !\u003d null) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.players \u003d new ArrayList\u003c\u003e(persons);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" * Converts a given Team into this class for JAXB use.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTeam","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam(Team source) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" teamName \u003d source.getTeamName().toString();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" players \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" for (Person person : source.getTeamPlayers()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" players.add(new XmlAdaptedPerson(person));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Team object.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" public Team toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" if (this.teamName \u003d\u003d null) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new IllegalValueException((String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" TeamName.class.getSimpleName())));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" if (!TeamName.isValidName(this.teamName)) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" throw new IllegalValueException(TeamName.MESSAGE_TEAM_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" final List\u003cPerson\u003e teamPlayers \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson player : players) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" teamPlayers.add(player.toModelType());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return new Team(teamName, teamPlayers);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" return true;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" if (!(other instanceof XmlAdaptedTeam)) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" return false;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" XmlAdaptedTeam otherTeam \u003d (XmlAdaptedTeam) other;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return Objects.equals(teamName, otherTeam.teamName)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" \u0026\u0026 players.equals(otherTeam.players);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":60,"-":33}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTeam\u003e teams;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" teams \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Conversion","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" teams.addAll(src.getTeamList().stream().map(XmlAdaptedTeam::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Converts this addressbook into the model\u0027s {@code AddressBook} object.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated or duplicates in the","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * {@code XmlAdaptedPerson} or {@code XmlAdaptedTag}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag t : tags) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" addressBook.addTag(t.toModelType());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson p : persons) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" addressBook.addPerson(p.toModelType());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" for (XmlAdaptedTeam tm : teams) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" addressBook.createTeam(tm.toModelType());","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlSerializableAddressBook)) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook otherAb \u003d (XmlSerializableAddressBook) other;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return persons.equals(otherAb.persons) \u0026\u0026 tags.equals(otherAb.tags) \u0026\u0026 teams.equals(otherAb.teams);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":83}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Menu;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.ImageView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.VBox;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cStage\u003e {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private static String currentTheme \u003d \"view/DarkTheme.css\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private Stage primaryStage;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HelpWindow helpWindow;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" private Menu mtmLogo;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" private StackPane teamDisplayPlaceholder;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" private VBox mainWindow;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" super(FXML, primaryStage);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // Set dependencies","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // Configure the UI","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" setAccelerators();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return primaryStage;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void setAccelerators() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * the TextInputControl(s).","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.consume();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" void fillInnerParts() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(currentTheme);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(\"view/Extensions.css\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" final Image image \u003d new Image(\"images/MyTeamManagerLogo.png\", true);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" mtmLogo.setGraphic(new ImageView(image));","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" mtmLogo.setDisable(true);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"codeeong"},"content":" TeamDisplay teamDisplay \u003d new TeamDisplay(logic.getInitTeamList());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"codeeong"},"content":" teamDisplayPlaceholder.getChildren().add(teamDisplay.getRoot());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(prefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" void hide() {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" primaryStage.hide();","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" * @returns the {@code currentTheme}.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":" public static String getCurrentTheme() {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"codeeong"},"content":" return currentTheme;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" public void handleChangeThemeRequestEvent(ChangeThemeEvent event) throws CommandException {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().remove(currentTheme);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" prefs.setAddressBookTheme(event.theme + \"Theme.css\");","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().add(currentTheme);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * Opens the help window.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" public void handleHelp() {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" if (helpWindow \u003d\u003d null) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" helpWindow \u003d new HelpWindow();","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" helpWindow.show();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" void show() {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" primaryStage.show();","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" * Closes the application.","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" private void handleExit() {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" return this.personListPanel;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" handleHelp();","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":35,"-":201}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.scene.paint.ImagePattern;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.scene.shape.Circle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public final Person person;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonCard.class);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private Label name;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private Label id;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private Label teamName;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private FlowPane tags;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Label rating;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private Label position;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" private Label jerseyNumber;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Circle avatar;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public PersonCard(Person person, int displayedIndex) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" name.setText(person.getName().fullName);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" rating.setText(person.getRating().toString());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" rating.setText(person.getRating().value);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" teamName.setText(person.getTeamName().fullName);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" position.setText(person.getPosition().getPositionName());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" setContactImage(person.getAvatar().getValue());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void setContactImage(String path) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Image img \u003d null;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (new File(path).isFile()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" img \u003d new Image(new File(path).toURI().toURL().toString());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" } catch (MalformedURLException e) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" avatar.setVisible(true);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" avatar.setFill(new ImagePattern(img));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" avatar.setVisible(true);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" private void initTags(Person person) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" person.getTags().forEach(tag -\u003e {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" Label tagLabel \u003d new Label(tag.getTagName());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" tagLabel.getStyleClass().add(tag.getTagColour());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(tagLabel);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" });","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" public void handleColourChangeEvent(ChangeTagColourEvent event) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"codeeong"},"content":" Set\u003cTag\u003e tagSet \u003d person.getTags();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"codeeong"},"content":" int i \u003d 0;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"codeeong"},"content":" for (Iterator\u003cTag\u003e it \u003d tagSet.iterator(); it.hasNext();) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d it.next();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"codeeong"},"content":" if (tag.getTagName().equals(event.tagName)) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"codeeong"},"content":" tags.getChildren().remove(i);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"codeeong"},"content":" Label newTagLabel \u003d new Label(event.tagName);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"codeeong"},"content":" newTagLabel.getStyleClass().add(event.tagColour);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(i, newTagLabel);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"codeeong"},"content":" i++;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":5,"codeeong":42,"-":97}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Panel containing the list of persons.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private PlayerDetails playerDetails;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Integer selectedCardIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private StackPane playerDetailsPlaceholder;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cPerson\u003e personList) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cPerson\u003e personList) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" personList, (person) -\u003e new PersonCard(person, personList.indexOf(person) + 1));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" playerDetails \u003d new PlayerDetails(newValue.person);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" this.selectedCardIndex \u003d index;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedNoParamEvent(PersonDetailsChangedNoParamEvent event) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" PersonCard newPersonCard \u003d personListView.getItems().get(selectedCardIndex);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" playerDetails \u003d new PlayerDetails(newPersonCard.person);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" //@author","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" setText(null);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":12,"-":98}},{"path":"src/main/java/seedu/address/ui/PlayerDetails.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" * The Browser Panel of the App.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public final Person person;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Person personBeforeChange;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private Label name;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" private Label address;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private Label email;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private Label jerseyNumber;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public PlayerDetails(Person person) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" name.setText(person.getName().fullName);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" jerseyNumber.setText(\"Jersey Number: \" + person.getJerseyNumber().value);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().toString());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().value);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().toString());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().value);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().toString());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().value);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().toString());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().value);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" personBeforeChange \u003d this.person;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (event.getPerson().getName().fullName.equals(person.getName().fullName)) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" name.setText((event.getPerson().getName().toString()));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" phone.setText(event.getPerson().getPhone().toString());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" jerseyNumber.setText(\"Jersey Number: \" + event.getPerson().getJerseyNumber().toString());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" address.setText(event.getPerson().getAddress().toString());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" email.setText(event.getPerson().getEmail().toString());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" remark.setText(\"Remarks: \" + event.getPerson().getRemark().toString());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true}],"authorContributionMap":{"lohtianwei":34,"codeeong":46,"-":14}},{"path":"src/main/java/seedu/address/ui/TeamDisplay.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * A ui for displaying the team currently chosen","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(TeamDisplay.class);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private FlowPane teams;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public TeamDisplay(ObservableList\u003cTeam\u003e teamList) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.teamList \u003d teamList;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" initTeams();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" getTeams();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void initTeams() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" for (Team t: this.teamList) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" Label teamLabel \u003d new Label(t.getTeamName().toString());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" teamLabel.setStyle(\"-fx-text-fill: #3f7bbf\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(teamLabel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" teams.setHgap(10);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e listOfTeams \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" for (Team t: teamList) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" listOfTeams.add(t.getTeamName().toString());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return listOfTeams;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(newTeamLabel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (event.teamName.equals(teamList.get(i).getTeamName().toString())) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass().add(\"selected\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleRemoveSelectedTeamEvent(RemoveSelectedTeamEvent event) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c teams.getChildren().size(); i++) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" if (teamList.get(i).getTeamName().equals(event.teamName)) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" private void handleClearTeamsEvent(ClearTeamsEvent event) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" private void handleUndoTeamsEvent(UndoTeamsEvent event) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" initTeams();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" getTeams();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":109,"-":15}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private static final String ICON_APPLICATION \u003d \"/images/football.png\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" //Set the application icon.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" mainWindow.hide();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" String contentText) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" alert.setTitle(title);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.showAndWait();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" System.exit(1);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" event.exception);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/guitests/guihandles/MainWindowHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Provides a handle for {@code MainWindow}.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class MainWindowHandle extends StageHandle {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" private final PersonListPanelHandle personListPanel;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" private final ResultDisplayHandle resultDisplay;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" private final TeamDisplayHandle teamDisplayBar;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" private final CommandBoxHandle commandBox;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private final StatusBarFooterHandle statusBarFooter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private final MainMenuHandle mainMenu;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public MainWindowHandle(Stage stage) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" super(stage);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanelHandle(getChildNode(PersonListPanelHandle.PERSON_LIST_VIEW_ID));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" resultDisplay \u003d new ResultDisplayHandle(getChildNode(ResultDisplayHandle.RESULT_DISPLAY_ID));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" teamDisplayBar \u003d new TeamDisplayHandle(getChildNode(TeamDisplayHandle.TEAM_DISPLAY_ID));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" commandBox \u003d new CommandBoxHandle(getChildNode(CommandBoxHandle.COMMAND_INPUT_FIELD_ID));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" statusBarFooter \u003d new StatusBarFooterHandle(getChildNode(StatusBarFooterHandle.STATUS_BAR_PLACEHOLDER));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" mainMenu \u003d new MainMenuHandle(getChildNode(MainMenuHandle.MENU_BAR_ID));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return personListPanel;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return resultDisplay;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return commandBox;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return statusBarFooter;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return mainMenu;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":46}},{"path":"src/test/java/guitests/guihandles/PersonCardHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Provides a handle to a person card in the person list panel.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class PersonCardHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String TAGS_FIELD_ID \u003d \"#tags\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private static final String RATING_FIELD_ID \u003d \"#rating\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private static final String POSITION_FIELD_ID \u003d \"#position\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String TEAMNAME_FIELD_ID \u003d \"#teamName\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label idLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label nameLabel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private final Label positionLabel;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private final Label ratingLabel;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final Label teamNameLabel;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final List\u003cLabel\u003e tagLabels;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public PersonCardHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" this.positionLabel \u003d getChildNode(POSITION_FIELD_ID);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" this.ratingLabel \u003d getChildNode(RATING_FIELD_ID);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" this.teamNameLabel \u003d getChildNode(TEAMNAME_FIELD_ID);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" Region tagsContainer \u003d getChildNode(TAGS_FIELD_ID);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.tagLabels \u003d tagsContainer","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" .getChildrenUnmodifiable()","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" .stream()","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" .map(Label.class::cast)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String getId() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" return idLabel.getText();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String getName() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return nameLabel.getText();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public String getPosition() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return positionLabel.getText();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public String getRating() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return ratingLabel.getText();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" public String getTeamName() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return teamNameLabel.getText();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public List\u003cString\u003e getTags() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" return tagLabels","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" .stream()","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" .map(Label::getText)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTagStyleClasses(String tag) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" return tagLabels","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" .stream()","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" .filter(label -\u003e label.getText().equals(tag))","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" .map(Label::getStyleClass)","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" .findFirst()","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" .orElseThrow(() -\u003e new IllegalArgumentException(\"No such tag.\"));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":25,"-":56}},{"path":"src/test/java/guitests/guihandles/PlayerDetailsHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Provides a handle to a player details pane.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class PlayerDetailsHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String PLAYER_DETAILS_DISPLAY_ID \u003d \"#playerDetails\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String JERSEY_FIELD_ID \u003d \"#jerseyNumber\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String PHONE_FIELD_ID \u003d \"#phone\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" private static final String EMAIL_FIELD_ID \u003d \"#email\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String ADDRESS_FIELD_ID \u003d \"#address\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String REMARK_FIELD_ID \u003d \"#remark\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label nameLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label jerseyLabel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private final Label addressLabel;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Label phoneLabel;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final Label emailLabel;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final Label remarkLabel;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PlayerDetailsHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.phoneLabel \u003d getChildNode(PHONE_FIELD_ID);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.addressLabel \u003d getChildNode(ADDRESS_FIELD_ID);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.emailLabel \u003d getChildNode(EMAIL_FIELD_ID);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.remarkLabel \u003d getChildNode(REMARK_FIELD_ID);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.jerseyLabel \u003d getChildNode(JERSEY_FIELD_ID);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getPhone() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return phoneLabel.getText();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public String getName() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return nameLabel.getText();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddress() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressLabel.getText();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public String getJerseyNumber() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return jerseyLabel.getText().substring(15);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getRemarks() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return remarkLabel.getText().substring(9);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public String getEmail() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return emailLabel.getText();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":8,"-":56}},{"path":"src/test/java/guitests/guihandles/TeamDisplayHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" * Provides a handle for {@code TeamDisplayHandle} containing the list of {@code Teams}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String TEAM_DISPLAY_ID \u003d \"#teams\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private final List\u003cLabel\u003e teamLabels;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public TeamDisplayHandle(Node teamDisplayNode) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" super(teamDisplayNode);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" Region teamContainer \u003d getChildNode(TEAM_DISPLAY_ID);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" this.teamLabels \u003d teamContainer","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" .getChildrenUnmodifiable()","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" .stream()","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" .map(Label.class::cast)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" return teamLabels","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" .stream()","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" .map(Label::getText)","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":37}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" String defaultConfigAsString \u003d \"App title : My Team Manager\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/XmlUtilTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javax.xml.bind.JAXBException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedTag;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlSerializableAddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TestUtil;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class XmlUtilTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"src/test/data/XmlUtilTest/\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private static final File EMPTY_FILE \u003d new File(TEST_DATA_FOLDER + \"empty.xml\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final File MISSING_FILE \u003d new File(TEST_DATA_FOLDER + \"missing.xml\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final File VALID_FILE \u003d new File(TEST_DATA_FOLDER + \"validAddressBook.xml\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final File MISSING_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"missingPersonField.xml\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final File INVALID_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"invalidPersonField.xml\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private static final File VALID_PERSON_FILE \u003d new File(TEST_DATA_FOLDER + \"validPerson.xml\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final File TEMP_FILE \u003d new File(TestUtil.getFilePathInSandboxFolder(\"tempAddressBook.xml\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"9482asf424\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Hans Muster\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"9482424\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"hans@example\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"4th street\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final List\u003cXmlAdaptedTag\u003e VALID_TAGS \u003d Collections.singletonList(new XmlAdaptedTag(\"friends\"));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullFile_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(null, AddressBook.class);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullClass_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(VALID_FILE, null);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void getDataFromFile_missingFile_fileNotFoundException() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(MISSING_FILE, AddressBook.class);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void getDataFromFile_emptyFile_dataFormatMismatchException() throws Exception {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" thrown.expect(JAXBException.class);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(EMPTY_FILE, AddressBook.class);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void getDataFromFile_validFile_validResult() throws Exception {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook dataFromFile \u003d XmlUtil.getDataFromFile(VALID_FILE, XmlSerializableAddressBook.class).toModelType();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" assertEquals(0, dataFromFile.getTeamList().size());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertEquals(0, dataFromFile.getTagList().size());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithMissingPersonField_validResult() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile(","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" MISSING_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson(","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" null, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithInvalidPersonField_validResult() throws Exception {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile(","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" INVALID_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson(","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" VALID_NAME, INVALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithValidPerson_validResult() throws Exception {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile(","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" VALID_PERSON_FILE, XmlAdaptedPersonWithRootElement.class);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson(","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullFile_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(null, new AddressBook());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullClass_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(VALID_FILE, null);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" public void saveDataToFile_missingFile_fileNotFoundException() throws Exception {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(MISSING_FILE, new AddressBook());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void saveDataToFile_validFile_dataSaved() throws Exception {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" TEMP_FILE.createNewFile();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataToWrite \u003d new XmlSerializableAddressBook(new AddressBook());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" AddressBookBuilder builder \u003d new AddressBookBuilder(new AddressBook());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" dataToWrite \u003d new XmlSerializableAddressBook(","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" builder.withPerson(new PersonBuilder().build()).withTag(\"Friends\").build());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Test class annotated with {@code XmlRootElement} to allow unmarshalling of .xml data to {@code XmlAdaptedPerson}","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * objects.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" @XmlRootElement(name \u003d \"person\")","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static class XmlAdaptedPersonWithRootElement extends XmlAdaptedPerson {}","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":145}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void constructor_nullPerson_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" new AddCommand(null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" ModelStub modelStub \u003d new ModelStubThrowingDuplicatePersonException();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person.","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" return false;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return null;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void deletePerson(Person target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"codeeong"},"content":" return null;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" fail(\"This method should not be called\");","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void createTeam(Team team) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" fail(\"This method should not be be called.\");","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"codeeong"},"content":" public boolean setTagColour(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"codeeong"},"content":" return false;","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person.","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" private class ModelStubThrowingDuplicatePersonException extends ModelStub {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * A Model stub that always accept the person being added.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" requireNonNull(person);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" personsAdded.add(person);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName)","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":29,"codeeong":12,"-":216}},{"path":"src/test/java/seedu/address/logic/commands/ChangeThemeCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public void execute_validTheme_success() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertExecutionSuccess(listThemes[0]);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" public void execute_invalidTheme_failure() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" assertExecutionFailure(\"FakeTheme\", Messages.MESSAGE_INVALID_THEME);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand[] listThemeCommands \u003d new ChangeThemeCommand[2];","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" listThemeCommands[i] \u003d new ChangeThemeCommand(listThemes[i]);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertTrue(listThemeCommands[i].equals(new ChangeThemeCommand(listThemes[i])));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(1));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(null));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" // different theme -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" int j \u003d 1;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" if (i !\u003d j) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(listThemeCommands[j]));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" j--;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" private void assertExecutionSuccess(String theme) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" CommandResult commandResult \u003d changethemeCommand.execute();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" assertEquals(String.format(ChangeThemeCommand.MESSAGE_THEME_SUCCESS, theme),","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" private void assertExecutionFailure(String theme, String expectedMessage) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" changethemeCommand.execute();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":89}},{"path":"src/test/java/seedu/address/logic/commands/KeyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" private Model model;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" @Before","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public void start() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public void checkKey() throws Exception {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" //checks that default lock state is false","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" //checks that key can lock MTM","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" //checks that key can unlock MTM","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" //checks that toggling works","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":44}},{"path":"src/test/java/seedu/address/logic/commands/RemarkCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_EMPTY;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareRedoCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareUndoCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for RemarkCommand.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class RemarkCommandTest {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void execute_addRemarkUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_AMY).build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_deleteRemarkUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_EMPTY).build();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_DELETE_REMARK_SUCCESS, remarkedPerson);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personInFilteredList).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, remarkedPerson.getRemark().toString());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personInFilteredList, remarkedPerson);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Remark filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_AMY).build();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" // remark -\u003e first person remarked","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" remarkCommand.execute();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" // redo -\u003e same first person remarked again","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" public void executeUndoRedo_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_EMPTY);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" // execution failed -\u003e remarkCommand not pushed into undoRedoStack","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // no commands in undoRedoStack -\u003e undoCommand and redoCommand fail","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * 1. Updates {@code Person#remark} from a filtered list.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * 2. Undo the update.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * 3. The unfiltered list should be shown now. Verify that the index of the previously updated person in the","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * unfiltered list is different from the index at the filtered list.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * 4. Redo the update. This ensures {@code RedoCommand} updates the person object regardless of indexing.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexFilteredList_samePersonRemarked() throws Exception {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_BOB);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" // remark -\u003e remarks second person in unfiltered person list / first person in filtered person list","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" remarkCommand.execute();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertNotEquals(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), personToRemark);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" // redo -\u003e remarks same second person in unfiltered person list","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" final RemarkCommand standardCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" RemarkCommand commandWithSameValues \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_SECOND_PERSON, new Remark(VALID_REMARK_AMY))));","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" // different remark -\u003e returns false","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_FIRST_PERSON, new Remark(VALID_REMARK_BOB))));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Returns an {@code RemarkCommand} with parameters {@code index} and {@code remark}.","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" private RemarkCommand prepareCommand(Index index, String remark) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d new RemarkCommand(index, new Remark(remark));","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" remarkCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" return remarkCommand;","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":218}},{"path":"src/test/java/seedu/address/logic/commands/SetCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * This is the unit test for {@code SetCommand}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"public class SetCommandTest {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private Model model;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Tag tagOne \u003d new Tag(\"testTagOne\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private Tag tagTwo \u003d new Tag(\"testTagTwo\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" @Before","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" SetCommand testCommand \u003d new SetCommand(tagOne, \"teal\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" SetCommand testCommandTwo \u003d new SetCommand(tagOne, \"teal\");","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" //Test to ensure command is strictly a SetCommand","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new AddCommand(CARL)));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new DeleteCommand(INDEX_FIRST_PERSON)));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HistoryCommand()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HelpCommand()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new RedoCommand()));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new UndoCommand()));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ListCommand()));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_AMY)));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" //Test to check that different tag string returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagTwo, \"teal\")));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"teal\")));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" //Test to check that different color strings returns false","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagOne, \"red\")));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"red\")));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" public void checkCommandResult() throws CommandException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" //Check if the result message is correct when there is no tags found","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" SetCommand command \u003d new SetCommand(new Tag(\"blablabla\"), \"teal\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag is invalid! Please input a valid tag name!\"));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" //When tags is present","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"red\");","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" assertFalse(command.execute().feedbackToUser.equals(\"No such tag\"));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to red\"));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" //Check if friends tags are set to color","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"teal\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to teal\"));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" for (Tag tag : model.getAddressBook().getTagList()) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" if (\"friends\".equals(tag.tagName)) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" assertTrue(tag.getTagColour().equals(\"teal\"));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" assertFalse(tag.getTagColour().equals(\"pink\"));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" resetAllTagsToDefault();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" * This method allows all tags to be set to the default colour \"teal\"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" public void resetAllTagsToDefault() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTag\u003e allTags \u003d model.getAddressBook().getTagList();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" for (Tag t : allTags) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(\"teal\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":100}},{"path":"src/test/java/seedu/address/logic/commands/SortCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getEmptyAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getSortedAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public ExpectedException error \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" private Model emptyModel \u003d new ModelManager(getEmptyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByNameDesc \u003d new ModelManager(","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"name\", \"desc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAdd \u003d new ModelManager(","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"asc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAddDesc \u003d new ModelManager(","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"desc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmail \u003d new ModelManager(getSortedAddressBook(\"email\", \"asc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmailDesc \u003d new ModelManager(","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"email\", \"desc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void noPlayers() throws CommandException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" error.expect(CommandException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" prepareCommand(\"name\", \"asc\", emptyModel).execute();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" public void emptySortField_throwsNullPointerEx() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", null);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void emptySortOrder_throwsNullPointerEx() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(null, \"asc\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public void sortByName_success() throws Exception {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"asc\", model);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"asc\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public void sortByNameDesc_success() throws Exception {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"desc\", model);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"desc\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByNameDesc);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" public void sortByAdd_success() throws Exception {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"asc\", model);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"asc\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAdd);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" public void sortByAddDesc_success() throws Exception {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"desc\", model);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"desc\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAddDesc);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmail_success() throws Exception {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"asc\", model);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"asc\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmail);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmailDesc_success() throws Exception {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"desc\", model);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"desc\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmailDesc);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" * Returns a {@code sortCommand} with the parameters {@code field and @code order}.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" private SortCommand prepareCommand(String field, String order, Model model) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" SortCommand sortCommand \u003d new SortCommand(field, order);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" sortCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" return sortCommand;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":108}},{"path":"src/test/java/seedu/address/logic/commands/TogglePrivacyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" public void editPersonPrivacyTest() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertFalse(epp.anyNonNullField());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy eppBuilder \u003d new EditPersonPrivacyBuilder().setAddressPrivate(\"false\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" .setEmailPrivate(\"false\").setPhonePrivate(\"true\").setRatingPrivate(\"false\")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" .setRemarkPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateAddress(), epp.getPrivateAddress());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateEmail(), epp.getPrivateEmail());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivatePhone(), epp.getPrivatePhone());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRating(), epp.getPrivateRating());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRemark(), epp.getPrivateRemark());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" public void oneFieldToggledSuccess() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" Index indexLast \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLast.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" Person listedPerson \u003d new PersonBuilder().withName(lastPerson.getName().toString())","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" .withEmail(lastPerson.getEmail().toString()).withRating(lastPerson.getRating().toString())","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" .withPhone(lastPerson.getPhone().toString()).build();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" listedPerson.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder(listedPerson).setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand togglePrivacyCommand \u003d new TogglePrivacyCommand(indexLast, epp);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" togglePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(TogglePrivacyCommand.MESSAGE_SUCCESS, listedPerson);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" expectedModel.updatePerson(lastPerson, listedPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":67}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TEAM_ARSENAL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" private static final boolean DEFAULT_LOCK_STATE \u003d false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void parseCommand_add() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_addAlias() throws Exception {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void parseCommand_clear() throws Exception {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_clearAlias() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void parseCommand_delete() throws Exception {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_deleteAlias() throws Exception {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseCommand_edit() throws Exception {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_editAlias() throws Exception {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" public void parseCommand_exit() throws Exception {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void parseCommand_remark() throws Exception {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" public void parseCommand_remarkAlias() throws Exception {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" public void parseCommand_find() throws Exception {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream()","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_findAlias() throws Exception {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream()","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" public void parseCommand_help() throws Exception {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\",","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public void parseCommand_history() throws Exception {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\",","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"histories\", DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_historyAlias() throws Exception {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\",","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void parseCommand_create() throws Exception {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parseCommand_createAlias() throws Exception {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void parseCommand_list() throws Exception {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\",","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_listAlias() throws Exception {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\",","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" public void parseCommand_select() throws Exception {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_selectAlias() throws Exception {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" public void parseCommand_redoCommandWord_returnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_redoCommandAlias_returnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS + \" 1\",","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" public void parseCommand_undoCommandWord_returnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_undoCommandAlias_returnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS + \" 3\",","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" public void parseCommand_unrecognisedInput_throwsParseException() throws Exception {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"\", DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void parseCommand_unknownCommand_throwsParseException() throws Exception {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" /** @lohtianwei */","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sort() throws Exception {","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sortAlias() throws Exception {","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_key() throws Exception {","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_keyAlias() throws Exception {","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacyAlias() throws Exception {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"codeeong"},"content":" /** @@Codee */","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"codeeong"},"content":" public void parseCommand_theme() throws Exception {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"codeeong"},"content":" String[] listThemes \u003d { \"Light\", \"Dark\" };","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand command \u003d (ChangeThemeCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" ChangeThemeCommand.COMMAND_WORD + \" \" + listThemes[i], DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"codeeong"},"content":" assertEquals(new ChangeThemeCommand(listThemes[i]), command);","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":150,"codeeong":12,"-":159}},{"path":"src/test/java/seedu/address/logic/parser/ChangeThemeCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private ChangeThemeCommandParser parser \u003d new ChangeThemeCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsThemeCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, listThemes[i], new ChangeThemeCommand(listThemes[i]));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" // Empty Argument","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" assertParseFailure(parser, \"\",","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangeThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":30}},{"path":"src/test/java/seedu/address/logic/parser/SetCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalTags.FRIEND;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class SetCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private SetCommandParser parser \u003d new SetCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsSetCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" String userInput \u003d \" \" + PREFIX_TAG + FRIEND.getTagName() + \" \" + PREFIX_TAG_COLOUR + \"green\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, userInput, new SetCommand(FRIEND, \"green\"));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":23}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_ASCENDING;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_DESCENDING;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"//import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public void noArguments_throwsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" public void parse_invalidArguments_failure() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" //more than 1 field entered","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"address\" + \" \" + \"asc\",","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" //invalid field entered","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"invalid\" + \"asc\",","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //invalid sort order entered","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"invalid\",","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" //no field entered","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"asc\",","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" //no order entered","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\",","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" /*","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public void parse_validArguments_success() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in asc order","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in desc order","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in asc order","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in desc order","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in asc order","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in desc order","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in asc order","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in desc order","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":82}},{"path":"src/test/java/seedu/address/logic/parser/TogglePrivacyCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParserTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d String.format","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" (MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_NO_FIELDS \u003d String.format(TogglePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private TogglePrivacyCommandParser parser \u003d new TogglePrivacyCommandParser();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidIndex() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" // zero index","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //negative index","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" //invalid index","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1 random\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void parseMissingField_fail() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" // no prefix specified","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\", MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" //no index specified","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" //nothing specified after command word","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidPrefix_fail() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME,","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void parseOneField_success() throws ParseException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" public void parseValidFollowedbyInvalid_success() throws ParseException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE + \" \" + PREFIX_NAME;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" * Checks if two TP commands are equal","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" * @param expected","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" * @param actual","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" private void compareTpCommand(TogglePrivacyCommand expected, TogglePrivacyCommand actual) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getIndex(), actual.getIndex());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRemark(), actual.getEpp().getPrivateRemark());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateAddress(), actual.getEpp().getPrivateAddress());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRating(), actual.getEpp().getPrivateRating());","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivatePhone(), actual.getEpp().getPrivatePhone());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateEmail(), actual.getEpp().getPrivateEmail());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":95}},{"path":"src/test/java/seedu/address/model/tag/TagTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class TagTest {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public void constructor_null_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new Tag(null));","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public void constructor_invalidTagName_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" String invalidTagName \u003d \"\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagName));","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" public void constructor_invalidTagColourName_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" String invalidTagColourName \u003d \"\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagColourName));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void isValidTagName() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" // null tag name","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagName(null));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public void isValidTagColour() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" // null tag name","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagColour(null));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":12,"-":26}},{"path":"src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class JsonUserPrefsStorageTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/JsonUserPrefsStorageTest/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void readUserPrefs_nullFilePath_throwsNullPointerException() throws DataConversionException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" readUserPrefs(null);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Optional\u003cUserPrefs\u003e readUserPrefs(String userPrefsFileInTestDataFolder) throws DataConversionException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d addToTestDataPathIfNotNull(userPrefsFileInTestDataFolder);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new JsonUserPrefsStorage(prefsFilePath).readUserPrefs(prefsFilePath);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void readUserPrefs_missingFile_emptyResult() throws DataConversionException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertFalse(readUserPrefs(\"NonExistentFile.json\").isPresent());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void readUserPrefs_notJsonFormat_exceptionThrown() throws DataConversionException {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" readUserPrefs(\"NotJsonFormatUserPrefs.json\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String userPrefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return userPrefsFileInTestDataFolder !\u003d null","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + userPrefsFileInTestDataFolder","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" : null;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void readUserPrefs_fileInOrder_successfullyRead() throws DataConversionException {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"TypicalUserPref.json\").get();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void readUserPrefs_valuesMissingFromFile_defaultValuesUsed() throws DataConversionException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"EmptyUserPrefs.json\").get();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(new UserPrefs(), actual);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public void readUserPrefs_extraValuesInFile_extraValuesIgnored() throws DataConversionException {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"ExtraValuesUserPref.json\").get();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private UserPrefs getTypicalUserPrefs() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" userPrefs.setGuiSettings(1000, 500, 300, 100);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" userPrefs.setAddressBookFilePath(\"myteammanager.xml\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" userPrefs.setAddressBookName(\"TypicalAddressBookName\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return userPrefs;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void savePrefs_nullPrefs_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveUserPrefs(null, \"SomeFile.json\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void saveUserPrefs_nullFilePath_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" saveUserPrefs(new UserPrefs(), null);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Saves {@code userPrefs} at the specified {@code prefsFileInTestDataFolder} filepath.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" private void saveUserPrefs(UserPrefs userPrefs, String prefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(addToTestDataPathIfNotNull(prefsFileInTestDataFolder))","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" .saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file\", ioe);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" public void saveUserPrefs_allInOrder_success() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" original.setGuiSettings(1200, 200, 0, 2);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String pefsFilePath \u003d testFolder.getRoot() + File.separator + \"TempPrefs.json\";","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage jsonUserPrefsStorage \u003d new JsonUserPrefsStorage(pefsFilePath);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" //Try writing when the file doesn\u0027t exist","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" UserPrefs readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" //Try saving when the file exists","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" original.setGuiSettings(5, 5, 5, 5);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":134}},{"path":"src/test/java/seedu/address/testutil/EditPersonPrivacyBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":" * A utility class to help with building EditPersonPrivacy objects.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"public class EditPersonPrivacyBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" private EditPersonPrivacy epp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder() {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d new EditPersonPrivacy(epp);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" * Returns an {@code EditPersonPrivacy} with fields containing {@code person}\u0027s privacy details","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(Person p) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(p.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(p.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(p.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(p.getRemark().isPrivate());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(p.getRating().isPrivate());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setPhonePrivate(String phone) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setEmailPrivate(String email) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(true);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setAddressPrivate(String address) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(true);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRatingPrivate(String rating) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (rating.equals(\"Optional[true]\") || rating.equals(\"true\")) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(true);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else if (rating.equals(\"Optional[false]\") || rating.equals(\"false\")) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of rating should be true or false\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRemarkPrivate(String remark) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy build() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" return epp;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":89,"-":2}},{"path":"src/test/java/seedu/address/testutil/TeamBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * A utility class to help with building a TeamList.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class TeamBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TEAM_NAME \u003d \"Arsenal\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private TeamName teamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public TeamBuilder() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" teamName \u003d new TeamName(DEFAULT_TEAM_NAME);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Initializes the TeamBuilder with the data of {@code teamToCopy}.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public TeamBuilder(Team teamToCopy) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" teamName \u003d teamToCopy.getTeamName();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Sets the {@code TeamName} of the {@code Team} that we are building.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public TeamBuilder withTeamName(String teamName) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.teamName \u003d new TeamName(teamName);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public Team build() {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new Team(teamName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":8,"-":31}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class TypicalPersons {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final Person ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" .withPhone(\"85355255\").withTags(\"friends\").withRating(\"0\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"1\").build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final Person BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withTags(\"owesMoney\", \"friends\").withRating(\"1\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"2\").build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final Person CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withRating(\"2\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"3\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final Person DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withRating(\"3\")","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" .withPosition(\"4\").withJerseyNumber(\"4\").build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final Person ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withRating(\"4\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"5\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final Person FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withRating(\"5\")","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"6\").build();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final Person GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withRemark(\"Could be famous\").withRating(\"0\")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"7\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // Manually added","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final Person HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").build();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final Person IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").build();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final Person AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2)","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final Person BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRating(VALID_RATING_1)","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_MIDFIELD).withJerseyNumber(VALID_JERSEY_NUMBER_17)","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" for (Person person : getTypicalPersons()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new AssertionError(\"not possible\");","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return ab;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersons() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByAddress() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(DANIEL, ALICE, BENSON, GEORGE, FIONA, ELLE, CARL));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByEmail() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, GEORGE, DANIEL, CARL, BENSON, FIONA, ELLE));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByPhone() {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, DANIEL, ELLE, FIONA, GEORGE, CARL, BENSON));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getSortedAddressBook(String field, String order) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e personList;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" switch(field) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" case \"phone\":","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByPhone();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByEmail();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByAddress();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" if (order.equals(\"desc\")) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Collections.reverse(personList);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" for (Person person : personList) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" return ab;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getEmptyAddressBook() {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" return ab;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":59,"-":91}},{"path":"src/test/java/seedu/address/testutil/TypicalTags.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" * A utility class containing a list of {@code Tag} objects to be used in tests.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"public class TypicalTags {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final Tag GOOD_ATTITUDE \u003d new Tag(\"goodAttitude\", \"teal\");","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public static final Tag FRIEND \u003d new Tag(\"friends\", \"teal\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" private TypicalTags() {} //prevents instantiation","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * Returns an {@code AddressBook} with all the typical teams.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" for (Tag tag : getTypicalTags()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" ab.addTag(tag);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" } catch (UniqueTagList.DuplicateTagException e) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\"not possible\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" return ab;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public static List\u003cTag\u003e getTypicalTags() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(GOOD_ATTITUDE, FRIEND));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":43}},{"path":"src/test/java/seedu/address/ui/PlayerDetailsTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertPlayerDetailsDisplaysPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"//@@author Codee","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class PlayerDetailsTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" // no tags","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(personWithNoTags);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(playerDetails);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertCardDisplay(playerDetails, personWithNoTags);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(person);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(playerDetails.equals(playerDetails));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(null));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(0));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(new PlayerDetails(differentPerson)));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Asserts that {@code playerDetails} displays the details of {@code expectedPerson} correctly","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PlayerDetails playerDetails, Person expectedPerson) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" PlayerDetailsHandle playerDetailsHandle \u003d new PlayerDetailsHandle(playerDetails.getRoot());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" // verify player details are displayed correctly","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertPlayerDetailsDisplaysPerson(expectedPerson, playerDetailsHandle);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":13,"-":44}},{"path":"src/test/java/seedu/address/ui/TeamDisplayTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertTeamDisplayEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.TeamBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * tests for TeamDisplay UI Component.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private static final String NEW_TEAM_NAME \u003d \"myTeam\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private static final ShowNewTeamNameEvent SHOW_NEW_TEAM_NAME_EVENT \u003d new ShowNewTeamNameEvent(NEW_TEAM_NAME);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" private TeamDisplay teamDisplay;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" private TeamDisplayHandle teamDisplayHandle;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" teamList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Arsenal\").build());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Chelsea\").build());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" teamDisplay \u003d new TeamDisplay(teamList);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" uiPartRule.setUiPart(teamDisplay);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" public void display() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" assertTeamDisplay(teamDisplay, teamList);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void assertTeamDisplay(TeamDisplay teamDisplay, ObservableList\u003cTeam\u003e teamlist) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(teamDisplay, teamDisplayHandle);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" public void handleShowNewTeamNameEvent() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" postNow(SHOW_NEW_TEAM_NAME_EVENT);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly after event","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" teamList.add(new Team(new TeamName(NEW_TEAM_NAME)));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" TeamDisplay expectedTeamDisplay \u003d new TeamDisplay(teamList);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(expectedTeamDisplay, teamDisplayHandle);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class UiPartTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_WITH_FX_ROOT_PATH \u003d \"UiPartTest/validFileWithFxRoot.fxml\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void constructor_nullFileUrl_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null, new Object()));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void constructor_missingFileUrl_throwsAssertionError() throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl, new Object()));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void constructor_invalidFileUrl_throwsAssertionError() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl, new Object()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void constructor_validFileUrl_loadsFile() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void constructor_validFileWithFxRootUrl_loadsFile() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_WITH_FX_ROOT_PATH);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" TestFxmlObject root \u003d new TestFxmlObject();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl, root).getRoot());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void constructor_nullFileName_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null, new Object()));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void constructor_missingFileName_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH, new Object()));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void constructor_invalidFileName_throwsAssertionError() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH, new Object()));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return testFileUrl;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * UiPart used for testing.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl, T root) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" super(fxmlFileUrl, root);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName, T root) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" super(fxmlFileName, root);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" super(fxmlFileName);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.PersonCard;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.TeamDisplay;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class GuiTestAssert {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private static final String LABEL_DEFAULT_STYLE \u003d \"label\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getPosition(), actualCard.getPosition());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getRating(), actualCard.getRating());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTeamName(), actualCard.getTeamName());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" expectedCard.getTags().forEach(tag -\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTagStyleClasses(tag), actualCard.getTagStyleClasses(tag)));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualTeamDisplay} displays the details of {@code expectedTeamDisplay}.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static void assertTeamDisplayEquals(TeamDisplay expectedTeamDisplay, TeamDisplayHandle actualTeamDisplay) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" expectedTeamDisplay.getTeams().forEach(team -\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedTeamDisplay.getTeams().toString(), actualTeamDisplay.getTeams().toString()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(Person expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getTeamName().toString(), actualCard.getTeamName());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getRating().value, actualCard.getRating());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getPosition().getPositionName(), actualCard.getPosition());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" assertTagsEqual(expectedPerson, actualCard);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualPlayerDetails} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static void assertPlayerDetailsDisplaysPerson(Person expectedPerson, PlayerDetailsHandle actualPlayerPanel) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualPlayerPanel.getName());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().toString(), actualPlayerPanel.getAddress());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualPlayerPanel.getEmail());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getJerseyNumber().value, actualPlayerPanel.getJerseyNumber());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualPlayerPanel.getPhone());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getRemark().toString(), actualPlayerPanel.getRemarks());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Returns the color style for {@code tagName}\u0027s label. The tag\u0027s color is determined by looking up the color","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" * of {@tagColour}","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" * @see PersonCard getTagColorStyleFor(String)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" private static String getTagColorStyleFor(String tagName) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" switch (tagName) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" case \"classmates\":","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" case \"owesMoney\":","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" case \"colleagues\":","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" case \"neighbours\":","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" case \"family\":","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" case \"friend\":","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" case \"friends\":","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" case \"husband\":","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" case \"redCard\":","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" case \"yellowCard\":","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" case \"goodAttitude\":","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" case \"badAttitude\":","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" case \"injured\":","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" case \"fastRunner\":","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" return \"teal\";","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" default:","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" fail(tagName + \" does not have a color assigned.\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" return \"\";","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" * Asserts that the tags in {@code actualCard} matches all the tags in {@code expectedPerson} with the correct","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" * color.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" private static void assertTagsEqual(Person expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e expectedTags \u003d expectedPerson.getTags().stream()","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" .map(tag -\u003e tag.tagName).collect(Collectors.toList());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedTags, actualCard.getTags());","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" expectedTags.forEach(tag -\u003e","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" assertEquals(Arrays.asList(LABEL_DEFAULT_STYLE, getTagColorStyleFor(tag)),","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" actualCard.getTagStyleClasses(tag)));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, Person... persons) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cPerson\u003e persons) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new Person[0]));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}.","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":70,"-":81}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_MAC_LINUX;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_WINDOWS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_JERSEY_NUMBER_DESC;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_POSITION_DESC;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_RATING_DESC;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_MAC_LINUX;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_WINDOWS;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"import com.sun.javafx.PlatformUtil;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void add() throws Exception {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operations on the shown unfiltered list ----------------------------- */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * -\u003e added","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" Person toAdd \u003d AMY;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" String command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" deleteAllPersons();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_HUSBAND + EMAIL_DESC_BOB + POSITION_DESC_MIDFILED + JERSEY_NUMBER_DESC_17 + RATING_DESC_1;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e added */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" .withPhone(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e added */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" .withAddress(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: missing rating -\u003e added */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags().withRating(UNSPECIFIED_FIELD)","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" if (PlatformUtil.isWindows()) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_WINDOWS)","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" .build();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_WINDOWS","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" } else if (PlatformUtil.isMac() || PlatformUtil.isLinux()) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_MAC_LINUX)","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" .build();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_MAC_LINUX","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /* -------------------------- Perform add operation on the shown filtered list ------------------------------ */","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operation while a person card is selected --------------------------- */","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" /* ----------------------------------- Perform invalid add operations --------------------------------------- */","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(Person)","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON) + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + INVALID_ADDRESS_DESC","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Address.MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" + INVALID_TAG_DESC + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" //@@author lithiumlkid","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" /* Case: invalid rating -\u003e rejected */","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" + INVALID_RATING_DESC + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Rating.MESSAGE_RATING_CONSTRAINTS);","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" /* Case: invalid position -\u003e rejected */","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + INVALID_POSITION_DESC + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Position.MESSAGE_POSITION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" /* Case: invalid jersey number -\u003e rejected */","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + INVALID_JERSEY_NUMBER_DESC;","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandFailure(command, JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_NO_FILE;","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_TYPE;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Avatar.MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and asserts that the,\u003cbr\u003e","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 1. Command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" * 2. Command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" * 3. Result display box displays the success message of executing {@code AddCommand} with the details of","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" * {@code toAdd}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" * the current model added with {@code toAdd}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" * 5. Browser url and selected card remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" * 6. Status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Person toAdd) {","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(Person)}. Executes {@code command}","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" * instead.","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(Person)","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Person toAdd) {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" // TODO: place holder for success message, change to proper assert method","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Person)} except asserts that","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" * the,\u003cbr\u003e","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" * 1. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" * 2. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":" * {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, Person)","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" * Executes {@code command} and asserts that the,\u003cbr\u003e","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":" * 1. Command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":" * 2. Command box has the error style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":" * 3. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":" * 5. Browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":5,"-":359}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * for test verification.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @ClassRule","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initialize();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication(this::getInitialData, getDataFileLocation());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Returns the data to be loaded into the file in {@link #getDataFileLocation()}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return TypicalPersons.getTypicalAddressBook();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Returns the directory of the data file.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public MainWindowHandle getMainWindowHandle() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return mainWindowHandle;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" rememberStates();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons in the address book.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showAllPersons() {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(getModel().getAddressBook().getPersonList().size(), getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive).","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + keyword);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertTrue(getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + index.getOneBased());","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertEquals(index.getZeroBased(), getPersonListPanel().getSelectedCardIndex());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Deletes all persons in the address book.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected void deleteAllPersons() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertEquals(0, getModel().getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" * their current state.","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" private void rememberStates() {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * of the previously selected person.","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged.","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style.","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same.","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"codeeong"},"content":" //assertEquals that the detail card is correct","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model.","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":264}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" * -\u003e edited","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + TAG_DESC_HUSBAND + \" \"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" + RATING_DESC_1 + \" \" + POSITION_DESC_MIDFILED + \" \" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND)","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" .withRating(VALID_RATING_1).withPosition(VALID_POSITION_MIDFIELD)","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" .withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" model.updatePerson(","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + POSITION_DESC_MIDFILED + RATING_DESC_1","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_17;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().build();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" * browser url changes","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" selectPerson(index);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_AMY + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_ADDRESS_DESC,","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" Address.MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_NO_FILE,","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_TYPE,","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" Avatar.MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, Person, Index)} except that","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, Person, Index)","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson) {","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson,","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":6,"-":302}},{"path":"src/test/java/systemtests/HelpCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.GuiRobot;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.HelpWindowHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.ui.StatusBarFooter;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A system test class for the help window, which contains interaction with other UI components.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class HelpCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String ERROR_MESSAGE \u003d \"ATTENTION!!!! : On some computers, this test may fail when run on \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"non-headless mode as FxRobot#clickOn(Node, MouseButton...) clicks on the wrong location. We suspect \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"that this is a bug with TestFX library that we are using. If this test fails, you have to run your \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" + \"tests on headless mode. See UsingGradle.adoc on how to do so.\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final GuiRobot guiRobot \u003d new GuiRobot();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void openHelpWindow() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" //use accelerator","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" getCommandBox().click();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" getResultDisplay().click();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" getPersonListPanel().click();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" //use menu button","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingMenu();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" //use command box","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // open help window and give it focus","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // assert that while the help window is open the UI updates correctly for a command execution","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertNotEquals(HelpCommand.SHOWING_HELP_MESSAGE, getResultDisplay().getText());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" //assertNotEquals(BrowserPanel.DEFAULT_PAGE, getBrowserPanel().getLoadedUrl());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" // assert that the status bar too is updated correctly while the help window is open","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" // note: the select command tested above does not update the status bar","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" executeCommand(DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertNotEquals(StatusBarFooter.SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Asserts that the help window is open, and closes it after checking.","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private void assertHelpWindowOpen() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertTrue(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" new HelpWindowHandle(guiRobot.getStage(HelpWindowHandle.HELP_WINDOW_TITLE)).close();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts that the help window isn\u0027t open.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private void assertHelpWindowNotOpen() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":88}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Alpha_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Alpha_master/authorship.json index 4a79046f92..a23cb89368 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Alpha_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Alpha_master/authorship.json @@ -1 +1 @@ -[{"path":"annotationTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"fake all the lines in this file is writtened by fakeAuthor"},{"lineNumber":2,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg"},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author"},{"lineNumber":10,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":11,"author":{"gitId":"-"},"content":"fake"}],"authorContributionMap":{"harryggg":5,"-":6}},{"path":"blameTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3"}],"authorContributionMap":{"harryggg":3,"-":1}},{"path":"newFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1"},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2"},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3"},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4"}],"authorContributionMap":{"harryggg":4}}] +[{"path":"annotationTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"fake all the lines in this file is writtened by fakeAuthor","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"harryggg"},"content":"//@@author harryggg","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"harryggg"},"content":"//@@author","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"fake","isFullCredit":true}],"authorContributionMap":{"harryggg":5,"-":6}},{"path":"blameTest.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"fake","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true}],"authorContributionMap":{"harryggg":3,"-":1}},{"path":"newFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true}],"authorContributionMap":{"harryggg":2}},{"path":"newPos/movedFile.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"harryggg"},"content":"line 1","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"harryggg"},"content":"line 2","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"harryggg"},"content":"line 3","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"harryggg"},"content":"line 4","isFullCredit":true}],"authorContributionMap":{"harryggg":4}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Beta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Beta_master/authorship.json index ff1d3dea45..bb035f2a14 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Beta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Beta_master/authorship.json @@ -1 +1 @@ -[{"path":"src/main/resources/view/InfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e"},{"lineNumber":4,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"700.0\" prefWidth\u003d\"800.0\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"browserPlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"timetablePlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"-":7,"nbr":1}},{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e"},{"lineNumber":4,"author":{"gitId":"April0616"},"content":""},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import java.net.URL?\u003e"},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Menu?\u003e"},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e"},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":16,"author":{"gitId":"April0616"},"content":" \u003cstylesheets\u003e"},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e"},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003c/stylesheets\u003e"},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" maxHeight\u003d\"22.0\" prefHeight\u003d\"22.0\" prefWidth\u003d\"2000.0\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e"},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e"},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e"},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e"},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e"},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e"},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003c/MenuBar\u003e"},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox\u003e"},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cVBox fx:id\u003d\"personList\"\u003e"},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" minWidth\u003d\"255.0\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane\u003e"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":""},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.26582278481012656\" orientation\u003d\"VERTICAL\" prefWidth\u003d\"2000.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":34,"author":{"gitId":"April0616"},"content":""},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4269269269269269\" maxHeight\u003d\"628.0\" minHeight\u003d\"230.0\" prefHeight\u003d\"600.0\" prefWidth\u003d\"1990.0\"\u003e"},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cVBox maxWidth\u003d\"1000.0\" minHeight\u003d\"81.0\" minWidth\u003d\"430.0\" prefHeight\u003d\"81.0\" prefWidth\u003d\"843.0\" SplitPane.resizableWithParent\u003d\"true\"\u003e"},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e"},{"lineNumber":40,"author":{"gitId":"April0616"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" alignment\u003d\"TOP_CENTER\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"10.0\" right\u003d\"10.0\" /\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personInfoPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003c!-- @@author April0616 --\u003e"},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cVBox minWidth\u003d\"200\" prefWidth\u003d\"323.0\"\u003e"},{"lineNumber":52,"author":{"gitId":"April0616"},"content":""},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"305.0\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e"},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e"},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e"},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"320.0\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e"},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e"},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e"},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e"},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e"},{"lineNumber":66,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" styleClass\u003d\"pane-with-border\"\u003e"},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":68,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e"},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e"},{"lineNumber":71,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":72,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":74,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e"},{"lineNumber":75,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e"}],"authorContributionMap":{"April0616":54,"-":20,"nbr":1}},{"path":"src/main/resources/view/PersonInfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"April0616"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"April0616"},"content":""},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e"},{"lineNumber":4,"author":{"gitId":"April0616"},"content":""},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.Image?\u003e"},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e"},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.shape.Circle?\u003e"},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.text.Font?\u003e"},{"lineNumber":16,"author":{"gitId":"April0616"},"content":"\u003cAnchorPane styleClass\u003d\"person-info-panel\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":17,"author":{"gitId":"April0616"},"content":""},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"250.0\" prefWidth\u003d\"448.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"250.0\" prefWidth\u003d\"198.0\"\u003e"},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane prefHeight\u003d\"216.0\" prefWidth\u003d\"210.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cImageView fitHeight\u003d\"210.0\" fitWidth\u003d\"221.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\"\u003e"},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003cimage\u003e"},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cImage url\u003d\"@../images/personInfoBg.jpg\" /\u003e"},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003c/image\u003e"},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e"},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003cCircle fx:id\u003d\"photoCircle\" fill\u003d\"WHITE\" layoutX\u003d\"111.0\" layoutY\u003d\"100.0\" radius\u003d\"86.0\" stroke\u003d\"floralwhite\" strokeType\u003d\"INSIDE\" strokeWidth\u003d\"10\" /\u003e"},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cVBox alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"250.0\" prefWidth\u003d\"574.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cStackPane alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"20.0\" prefWidth\u003d\"304.0\" VBox.vgrow\u003d\"NEVER\"\u003e"},{"lineNumber":34,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"35.0\" prefWidth\u003d\"391.0\" styleClass\u003d\"display_big_label\" text\u003d\"\\$name\"\u003e"},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cfont\u003e"},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cFont size\u003d\"24.0\" /\u003e"},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003c/font\u003e"},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003c/Label\u003e"},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":40,"author":{"gitId":"April0616"},"content":" \u003cInsets left\u003d\"15.0\" top\u003d\"20.0\" /\u003e"},{"lineNumber":41,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":42,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e"},{"lineNumber":43,"author":{"gitId":"April0616"},"content":" \u003cFlowPane fx:id\u003d\"tags\" columnHalignment\u003d\"CENTER\"\u003e"},{"lineNumber":44,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":45,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5.0\" left\u003d\"15.0\" right\u003d\"10.0\" /\u003e"},{"lineNumber":46,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":47,"author":{"gitId":"April0616"},"content":" \u003c/FlowPane\u003e"},{"lineNumber":48,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"100.0\" prefWidth\u003d\"200.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":49,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"160.0\" prefWidth\u003d\"9.0\" HBox.hgrow\u003d\"NEVER\"\u003e"},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Gender\" /\u003e"},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Matric No\" /\u003e"},{"lineNumber":52,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Phone\" /\u003e"},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Email\" /\u003e"},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Birthday\" /\u003e"},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Address\" /\u003e"},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Remark\" /\u003e"},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"200.0\" prefWidth\u003d\"100.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"phone\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"email\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"birthday\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"address\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"\u003e"},{"lineNumber":65,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":66,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":67,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e"},{"lineNumber":68,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"\u003e"},{"lineNumber":69,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":70,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":71,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e"},{"lineNumber":72,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":74,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"15.0\" /\u003e"},{"lineNumber":75,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e"},{"lineNumber":76,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":77,"author":{"gitId":"April0616"},"content":" \u003cHBox.margin\u003e"},{"lineNumber":78,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e"},{"lineNumber":79,"author":{"gitId":"April0616"},"content":" \u003c/HBox.margin\u003e"},{"lineNumber":80,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e"},{"lineNumber":81,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e"},{"lineNumber":82,"author":{"gitId":"April0616"},"content":"\u003c/AnchorPane\u003e"}],"authorContributionMap":{"April0616":82}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e"},{"lineNumber":10,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":12,"author":{"gitId":"nbr"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":19,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":21,"author":{"gitId":"nbr"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"cell_big_label\" text\u003d\"\\$first\" /\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003cFlowPane fx:id\u003d\"tags\"\u003e"},{"lineNumber":31,"author":{"gitId":"nbr"},"content":" \u003cVBox.margin\u003e"},{"lineNumber":32,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5.0\" /\u003e"},{"lineNumber":33,"author":{"gitId":"nbr"},"content":" \u003c/VBox.margin\u003e\u003c/FlowPane\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":37,"author":{"gitId":"nbr"},"content":" \u003crowConstraints\u003e"},{"lineNumber":38,"author":{"gitId":"nbr"},"content":" \u003cRowConstraints /\u003e"},{"lineNumber":39,"author":{"gitId":"nbr"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"-":29,"nbr":12}},{"path":"src/main/resources/view/PersonListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.ListView?\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":5,"author":{"gitId":"nbr"},"content":"\u003cVBox styleClass\u003d\"personListBox\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cListView fx:id\u003d\"personListView\" VBox.vgrow\u003d\"ALWAYS\" /\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e"}],"authorContributionMap":{"-":6,"nbr":1}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"nbr"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e"},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e"}],"authorContributionMap":{"-":25,"nbr":2}},{"path":"unused/CombinedTimetableDisplay.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e"},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e"},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e"},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\" xmlns\u003d\"http://javafx.com/javafx/8\""},{"lineNumber":16,"author":{"gitId":"-"},"content":" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.2\" orientation\u003d\"VERTICAL\" prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cAnchorPane styleClass\u003d\"combined-timetable-label\"\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cGridPane layoutX\u003d\"151.0\" layoutY\u003d\"26.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\""},{"lineNumber":22,"author":{"gitId":"-"},"content":" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" maxWidth\u003d\"300\" minWidth\u003d\"300.0\" prefWidth\u003d\"300\"/\u003e"},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\"/\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cRowConstraints minHeight\u003d\"10.0\" prefHeight\u003d\"30.0\" vgrow\u003d\"SOMETIMES\"/\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_RIGHT\"\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cLabel alignment\u003d\"CENTER\" styleClass\u003d\"combined-timetable-main-label\" text\u003d\"Timetables Displayed: \"\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cInsets right\u003d\"2.5\"/\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"1\"\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"names\" styleClass\u003d\"combined-timetable-names\" text\u003d\"Label\"\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cInsets left\u003d\"2.5\"/\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/Label\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" prefHeight\u003d\"100.0\" prefWidth\u003d\"160.0\"/\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"zacharytang":2,"-":46}},{"path":"unused/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e"},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":""},{"lineNumber":3,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.Label?\u003e"},{"lineNumber":4,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e"},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e"},{"lineNumber":6,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e"},{"lineNumber":7,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e"},{"lineNumber":8,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e"},{"lineNumber":9,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e"},{"lineNumber":10,"author":{"gitId":"April0616"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e"},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e"},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e"},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e"},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cchildren\u003e"},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/ImageView\u003e"},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e"},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e"},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"/\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e"},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e"},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e"},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e"},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"/\u003e"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e"},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e"},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e"},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e"},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e"}],"authorContributionMap":{"zacharytang":8,"April0616":2,"-":55}}] +[{"path":"src/main/resources/view/InfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"700.0\" prefWidth\u003d\"800.0\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"browserPlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"timetablePlaceholder\" prefHeight\u003d\"150.0\" prefWidth\u003d\"200.0\" /\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"-":7,"nbr":1}},{"path":"src/main/resources/view/MainWindow.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import java.net.URL?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Menu?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuBar?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.MenuItem?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003cVBox xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"April0616"},"content":" \u003cstylesheets\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"April0616"},"content":" \u003cURL value\u003d\"@Extensions.css\" /\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003c/stylesheets\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cMenuBar fx:id\u003d\"menuBar\" maxHeight\u003d\"22.0\" prefHeight\u003d\"22.0\" prefWidth\u003d\"2000.0\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"File\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cMenuItem mnemonicParsing\u003d\"false\" onAction\u003d\"#handleExit\" text\u003d\"Exit\" /\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cMenu mnemonicParsing\u003d\"false\" text\u003d\"Help\"\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003cMenuItem fx:id\u003d\"helpMenuItem\" mnemonicParsing\u003d\"false\" onAction\u003d\"#handleHelp\" text\u003d\"Help\" /\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/Menu\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003c/MenuBar\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cHBox\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cVBox fx:id\u003d\"personList\"\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"personListPanelPlaceholder\" minWidth\u003d\"255.0\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cSplitPane dividerPositions\u003d\"0.26582278481012656\" orientation\u003d\"VERTICAL\" prefWidth\u003d\"2000.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cSplitPane id\u003d\"splitPane\" fx:id\u003d\"splitPane\" dividerPositions\u003d\"0.4269269269269269\" maxHeight\u003d\"628.0\" minHeight\u003d\"230.0\" prefHeight\u003d\"600.0\" prefWidth\u003d\"1990.0\"\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cVBox maxWidth\u003d\"1000.0\" minHeight\u003d\"81.0\" minWidth\u003d\"430.0\" prefHeight\u003d\"81.0\" prefWidth\u003d\"843.0\" SplitPane.resizableWithParent\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"tagListPanelPlaceholder\" alignment\u003d\"TOP_CENTER\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"10.0\" right\u003d\"10.0\" /\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"personInfoPlaceholder\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003c!-- @@author April0616 --\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cVBox minWidth\u003d\"200\" prefWidth\u003d\"323.0\"\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"commandBoxPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"305.0\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cStackPane fx:id\u003d\"resultDisplayPlaceholder\" minWidth\u003d\"100\" prefWidth\u003d\"320.0\" styleClass\u003d\"pane-with-border\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"10\" right\u003d\"10\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" \u003c!-- @@author zacharytang --\u003e","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"infoPlaceholder\" styleClass\u003d\"pane-with-border\"\u003e","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"10\" left\u003d\"10\" right\u003d\"10\" top\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" \u003cStackPane fx:id\u003d\"statusbarPlaceholder\" VBox.vgrow\u003d\"NEVER\" /\u003e","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":54,"-":20,"nbr":1}},{"path":"src/main/resources/view/PersonInfoPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"April0616"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"April0616"},"content":"\u003c!-- @@author April0616 --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.Image?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.shape.Circle?\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.text.Font?\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"April0616"},"content":"\u003cAnchorPane styleClass\u003d\"person-info-panel\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"250.0\" prefWidth\u003d\"448.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"250.0\" prefWidth\u003d\"198.0\"\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"April0616"},"content":" \u003cAnchorPane prefHeight\u003d\"216.0\" prefWidth\u003d\"210.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"April0616"},"content":" \u003cImageView fitHeight\u003d\"210.0\" fitWidth\u003d\"221.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"April0616"},"content":" \u003cimage\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"April0616"},"content":" \u003cImage url\u003d\"@../images/personInfoBg.jpg\" /\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"April0616"},"content":" \u003c/image\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"April0616"},"content":" \u003c/ImageView\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"April0616"},"content":" \u003cCircle fx:id\u003d\"photoCircle\" fill\u003d\"WHITE\" layoutX\u003d\"111.0\" layoutY\u003d\"100.0\" radius\u003d\"86.0\" stroke\u003d\"floralwhite\" strokeType\u003d\"INSIDE\" strokeWidth\u003d\"10\" /\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"April0616"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"April0616"},"content":" \u003cVBox alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"250.0\" prefWidth\u003d\"574.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"April0616"},"content":" \u003cStackPane alignment\u003d\"TOP_LEFT\" prefHeight\u003d\"20.0\" prefWidth\u003d\"304.0\" VBox.vgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"name\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"35.0\" prefWidth\u003d\"391.0\" styleClass\u003d\"display_big_label\" text\u003d\"\\$name\"\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"April0616"},"content":" \u003cfont\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"April0616"},"content":" \u003cFont size\u003d\"24.0\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"April0616"},"content":" \u003c/font\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"April0616"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"April0616"},"content":" \u003cInsets left\u003d\"15.0\" top\u003d\"20.0\" /\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"April0616"},"content":" \u003c/StackPane\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"April0616"},"content":" \u003cFlowPane fx:id\u003d\"tags\" columnHalignment\u003d\"CENTER\"\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"5.0\" left\u003d\"15.0\" right\u003d\"10.0\" /\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"April0616"},"content":" \u003c/FlowPane\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"April0616"},"content":" \u003cHBox prefHeight\u003d\"100.0\" prefWidth\u003d\"200.0\" VBox.vgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"160.0\" prefWidth\u003d\"9.0\" HBox.hgrow\u003d\"NEVER\"\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Gender\" /\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Matric No\" /\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Phone\" /\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Email\" /\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Birthday\" /\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Address\" /\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"April0616"},"content":" \u003cLabel minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"80.0\" styleClass\u003d\"display_small_label\" text\u003d\"Remark\" /\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"April0616"},"content":" \u003cVBox prefHeight\u003d\"200.0\" prefWidth\u003d\"100.0\" HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"gender\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"matricNo\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"phone\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"email\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"birthday\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"20.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"address\" minHeight\u003d\"-Infinity\" minWidth\u003d\"-Infinity\" prefHeight\u003d\"54.0\" prefWidth\u003d\"326.0\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"April0616"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"\u003e","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e\u003c/Label\u003e","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"April0616"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"April0616"},"content":" \u003cInsets bottom\u003d\"10.0\" left\u003d\"15.0\" /\u003e","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"April0616"},"content":" \u003c/VBox.margin\u003e","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"April0616"},"content":" \u003cHBox.margin\u003e","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"April0616"},"content":" \u003cInsets /\u003e","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"April0616"},"content":" \u003c/HBox.margin\u003e","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"April0616"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"April0616"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"April0616"},"content":"\u003c/AnchorPane\u003e","isFullCredit":true}],"authorContributionMap":{"April0616":82}},{"path":"src/main/resources/view/PersonListCard.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.Region?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"nbr"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"nbr"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" minHeight\u003d\"105\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"nbr"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"id\" styleClass\u003d\"cell_big_label\"\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003cminWidth\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003c!-- Ensures that the label text is never truncated --\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cRegion fx:constant\u003d\"USE_PREF_SIZE\" /\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/minWidth\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"nbr"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"cell_big_label\" text\u003d\"\\$first\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"nbr"},"content":" \u003cFlowPane fx:id\u003d\"tags\"\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"nbr"},"content":" \u003cVBox.margin\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"nbr"},"content":" \u003cInsets bottom\u003d\"5.0\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"nbr"},"content":" \u003c/VBox.margin\u003e\u003c/FlowPane\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"cell_small_label\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"nbr"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"nbr"},"content":" \u003cRowConstraints /\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"nbr"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":29,"nbr":12}},{"path":"src/main/resources/view/PersonListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.ListView?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"nbr"},"content":"\u003cVBox styleClass\u003d\"personListBox\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" \u003cListView fx:id\u003d\"personListView\" VBox.vgrow\u003d\"ALWAYS\" /\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c/VBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":6,"nbr":1}},{"path":"src/main/resources/view/TagListPanel.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"nbr"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"nbr"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author nbriannl --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.FlowPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cHBox id\u003d\"cardPane\" fx:id\u003d\"cardPane\" xmlns\u003d\"http://javafx.com/javafx/8.0.141\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003cGridPane HBox.hgrow\u003d\"ALWAYS\"\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" minWidth\u003d\"10\" prefWidth\u003d\"150\" /\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cpadding\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cInsets bottom\u003d\"5\" left\u003d\"15\" right\u003d\"5\" top\u003d\"5\" /\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003c/padding\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cFlowPane fx:id\u003d\"tags\" /\u003e","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cRowConstraints /\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"\u003c/HBox\u003e","isFullCredit":true}],"authorContributionMap":{"-":25,"nbr":2}},{"path":"unused/CombinedTimetableDisplay.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"\u003c?import javafx.geometry.Insets?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.ColumnConstraints?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.GridPane?\u003e","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.RowConstraints?\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"\u003cStackPane prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\" xmlns\u003d\"http://javafx.com/javafx/8\"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.2\" orientation\u003d\"VERTICAL\" prefHeight\u003d\"400.0\" prefWidth\u003d\"600.0\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cAnchorPane styleClass\u003d\"combined-timetable-label\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" \u003cGridPane layoutX\u003d\"151.0\" layoutY\u003d\"26.0\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003ccolumnConstraints\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\" maxWidth\u003d\"300\" minWidth\u003d\"300.0\" prefWidth\u003d\"300\"/\u003e","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cColumnConstraints hgrow\u003d\"SOMETIMES\"/\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003c/columnConstraints\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003crowConstraints\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cRowConstraints minHeight\u003d\"10.0\" prefHeight\u003d\"30.0\" vgrow\u003d\"SOMETIMES\"/\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003c/rowConstraints\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_RIGHT\"\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cLabel alignment\u003d\"CENTER\" styleClass\u003d\"combined-timetable-main-label\" text\u003d\"Timetables Displayed: \"\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cInsets right\u003d\"2.5\"/\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" GridPane.columnIndex\u003d\"1\"\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"names\" styleClass\u003d\"combined-timetable-names\" text\u003d\"Label\"\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox.margin\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cInsets left\u003d\"2.5\"/\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003c/HBox.margin\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/Label\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003c/GridPane\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" prefHeight\u003d\"100.0\" prefWidth\u003d\"160.0\"/\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"zacharytang":2,"-":46}},{"path":"unused/PersonInfoOverview.fxml","fileType":"fxml","lines":[{"lineNumber":1,"author":{"gitId":"zacharytang"},"content":"\u003c?xml version\u003d\"1.0\" encoding\u003d\"UTF-8\"?\u003e","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"zacharytang"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.Label?\u003e","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.control.SplitPane?\u003e","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"April0616"},"content":"\u003c?import javafx.scene.image.ImageView?\u003e","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.AnchorPane?\u003e","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.HBox?\u003e","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.StackPane?\u003e","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"zacharytang"},"content":"\u003c?import javafx.scene.layout.VBox?\u003e","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"April0616"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"\u003c!-- @@author zacharytang-unused --\u003e","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"\u003cStackPane styleClass\u003d\"info-panel\" xmlns\u003d\"http://javafx.com/javafx/8\" xmlns:fx\u003d\"http://javafx.com/fxml/1\"\u003e","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust vertical divider position between the person info and the timetable area --\u003e","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.3\" orientation\u003d\"VERTICAL\"\u003e","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \u003cAnchorPane\u003e","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" \u003c!--Edit dividerPositions below to adjust the divider position between the person photo and the person details--\u003e","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" \u003cSplitPane dividerPositions\u003d\"0.48333333333333334\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"contactPhotoPane\" minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-name-cell\"\u003e","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" \u003cchildren\u003e","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" \u003cImageView fx:id\u003d\"contactPhoto\" layoutX\u003d\"1.0\" layoutY\u003d\"-1.0\" pickOnBounds\u003d\"true\" preserveRatio\u003d\"true\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"0.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" \u003c/ImageView\u003e","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" \u003c/children\u003e\u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" \u003cAnchorPane minHeight\u003d\"0.0\" minWidth\u003d\"0.0\" styleClass\u003d\"info-cell\"\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \u003cVBox alignment\u003d\"CENTER_LEFT\" AnchorPane.bottomAnchor\u003d\"0.0\" AnchorPane.leftAnchor\u003d\"20.0\" AnchorPane.rightAnchor\u003d\"0.0\" AnchorPane.topAnchor\u003d\"0.0\"\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Name:\" /\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"name\" styleClass\u003d\"display_small_value\" text\u003d\"\\$name\" /\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Gender:\" /\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"gender\" styleClass\u003d\"display_small_value\" text\u003d\"\\$gender\" /\u003e","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Matriculation No:\" /\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"matricNo\" styleClass\u003d\"display_small_value\" text\u003d\"\\$matricNo\" /\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Phone No:\" /\u003e","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"phone\" styleClass\u003d\"display_small_value\" text\u003d\"\\$phone\" /\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Address:\" /\u003e","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"address\" styleClass\u003d\"display_small_value\" text\u003d\"\\$address\" wrapText\u003d\"true\"/\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Email:\" /\u003e","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"email\" styleClass\u003d\"display_small_value\" text\u003d\"\\$email\" /\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Birthday:\" /\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"birthday\" styleClass\u003d\"display_small_value\" text\u003d\"\\$birthday\" /\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u003cHBox alignment\u003d\"CENTER_LEFT\" spacing\u003d\"5\"\u003e","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" \u003cLabel styleClass\u003d\"display_small_label\" text\u003d\"Remark:\" /\u003e","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" \u003cLabel fx:id\u003d\"remark\" styleClass\u003d\"display_small_value\" text\u003d\"\\$remark\" wrapText\u003d\"true\"/\u003e","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u003c/HBox\u003e","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" \u003c/VBox\u003e","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" \u003c/AnchorPane\u003e","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" \u003cAnchorPane fx:id\u003d\"timetablePlaceholder\" /\u003e","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u003c/SplitPane\u003e","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"\u003c/StackPane\u003e","isFullCredit":true}],"authorContributionMap":{"zacharytang":8,"April0616":2,"-":55}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Charlie_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Charlie_master/authorship.json index a2f19b4aae..f2f87922ca 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Charlie_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Charlie_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"ifndef::env-github[]"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"image::images/Ui.png[width\u003d\"600\"]"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"endif::[]"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface)."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"* It is a Java application primarily targeted for students doing group projects."},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls."},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Site Map"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Acknowledgements"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"_Marco Jakob_."},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_."},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]"}],"authorContributionMap":{"charlesgoh":36}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us"},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/"},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team."},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/."},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team"},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Goh Chang Kang, Charles"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[https://github.com/charlesgoh[github]]"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert, Password Security Commands"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Jeffrey Goh Keng Wee"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Lin Ziwen Kelvin"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esilocke[github]]"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Wang Yiming"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1019[github]]"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027"}],"authorContributionMap":{"charlesgoh":18,"Esilocke":4,"-":26}},{"path":"docs/ContactUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Contact Us"},{"lineNumber":2,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":3,"author":{"gitId":"-"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"* *Bug reports, Suggestions* : Post in our https://github.com/CS2103AUG2017-W09-B2/main/issues[issue tracker] if you noticed bugs or have suggestions on how to improve."},{"lineNumber":5,"author":{"gitId":"-"},"content":"* *Contributing* : We welcome pull requests. Follow the process described https://github.com/oss-generic/process[here]"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"* *Email us* : You can also reach us at `e0014961 [at] u.nus.edu`"}],"authorContributionMap":{"Esilocke":2,"-":4}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later"},{"lineNumber":22,"author":{"gitId":"-"},"content":"+"},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":26,"author":{"gitId":"-"},"content":"+"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE"},{"lineNumber":29,"author":{"gitId":"-"},"content":"+"},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them."},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer"},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)"},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle"},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`"},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK"},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`"},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`"},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`"},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings"},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +"},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests."},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands"},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)"},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`"},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code."},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork."},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up."},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e)."},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section."},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started]."},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]"},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component."},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`."},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other."},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary."},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level."},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)"},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file."},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components."},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App."},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor."},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory."},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk."},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component."},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class."},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class."},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`."},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]"},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk."},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time."},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]"},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components."},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component."},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class."},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component."},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change."},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly."},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_"},{"lineNumber":173,"author":{"gitId":"-"},"content":""},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :"},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command."},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`."},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events."},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`."},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call."},{"lineNumber":183,"author":{"gitId":"-"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]"},{"lineNumber":193,"author":{"gitId":"-"},"content":""},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences."},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data."},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change."},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyTask\u003e` that can be \u0027observed\u0027."},{"lineNumber":200,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components."},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":205,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `Storage` component,"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back."},{"lineNumber":212,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back."},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package."},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation"},{"lineNumber":219,"author":{"gitId":"-"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented."},{"lineNumber":221,"author":{"gitId":"-"},"content":""},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow"},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go."},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.1 : Using the UI to change font size_"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size:"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"1. `onAction` handlers are used to handle UI font size buttons. These handlers will post"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"new events via `ComponentManager`."},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":"2. CLI commands also post new events to handle font size changes, when the relevant command is entered (e.g. `fontsize increase`)."},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeChangeSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.2 : Sequence diagram for fontsize changing_"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"From the sequence diagram above, we can observe that the font size changes are handled by subscriber functions in PersonListPanel"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"and TaskListPanel."},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"The initial implementation required access to the model from the UI. This implementation was replaced with one that"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"standardised the handling of font size change requests through events."},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Use either UI or CLI based implementations +"},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implementing both UI and CLI functionality +"},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More options for the user. Not much increase in complexity when implementing the CLI version +"},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Cons:** This implementation required passing information between classes, which may cause unnecessary coupling. +"},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implementing only UI functionality +"},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Less tedious to implement and very intuitive for the user +"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Users who prefer typing commands will not have the option of editing their font sizes using the CLI"},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"charlesgoh"},"content":"//tag::avatar[]"},{"lineNumber":261,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatar on ViewPersonPanel"},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":"The following function allows the setting of URL for the `ImageView` attribute within the `ViewPersonPanel` class:"},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":"[source,java]"},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":"private void initializeAvatar() {"},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" String avatarPath \u003d person.getAvatar().value;"},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" if (!avatarPath.equals(\"\")) {"},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Initializing avatar to image at saved URL\");"},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" Image newImage \u003d new Image(avatarPath);"},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":" avatarImage.setImage(newImage);"},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":"The `initializeAvatar` method piggybacks on the `handlePersonPanelSelectionChangedEvent` event handler. Whenever there is"},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":"a change in the person selection panel, this function will call the `initializeAvatar` method, which will update"},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"the `ImageView` attribute."},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":"[source,java]"},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":"@Subscribe"},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":"private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" this.person \u003d event.getNewSelection().person;"},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" initializeWithPerson(person);"},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();"},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":"}"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":"----"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":"As of v1.5, the avatar field supports only URLs sourced online. References to local files may work but require the"},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"prefix \"file:\""},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":299,"author":{"gitId":"-"},"content":"//tag::undoredo[]"},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`."},{"lineNumber":303,"author":{"gitId":"-"},"content":""},{"lineNumber":304,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:"},{"lineNumber":305,"author":{"gitId":"-"},"content":""},{"lineNumber":306,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.1 : Command inheritance_"},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern]."},{"lineNumber":310,"author":{"gitId":"-"},"content":""},{"lineNumber":311,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:"},{"lineNumber":312,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":313,"author":{"gitId":"-"},"content":"----"},{"lineNumber":314,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":315,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":316,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":317,"author":{"gitId":"-"},"content":" // ... list logic ..."},{"lineNumber":318,"author":{"gitId":"-"},"content":" }"},{"lineNumber":319,"author":{"gitId":"-"},"content":"}"},{"lineNumber":320,"author":{"gitId":"-"},"content":"----"},{"lineNumber":321,"author":{"gitId":"-"},"content":""},{"lineNumber":322,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:"},{"lineNumber":323,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":324,"author":{"gitId":"-"},"content":"----"},{"lineNumber":325,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {"},{"lineNumber":326,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":327,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":328,"author":{"gitId":"-"},"content":" // ... undo logic ..."},{"lineNumber":329,"author":{"gitId":"-"},"content":""},{"lineNumber":330,"author":{"gitId":"-"},"content":" executeUndoableCommand();"},{"lineNumber":331,"author":{"gitId":"-"},"content":" }"},{"lineNumber":332,"author":{"gitId":"-"},"content":"}"},{"lineNumber":333,"author":{"gitId":"-"},"content":""},{"lineNumber":334,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":335,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":336,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":337,"author":{"gitId":"-"},"content":" // ... delete logic ..."},{"lineNumber":338,"author":{"gitId":"-"},"content":" }"},{"lineNumber":339,"author":{"gitId":"-"},"content":"}"},{"lineNumber":340,"author":{"gitId":"-"},"content":"----"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning."},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command)."},{"lineNumber":345,"author":{"gitId":"-"},"content":""},{"lineNumber":346,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.2 : Initial status of undo/redo stack_"},{"lineNumber":348,"author":{"gitId":"-"},"content":""},{"lineNumber":349,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person."},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.3 : After executing `delete 5`_"},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":355,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all."},{"lineNumber":356,"author":{"gitId":"-"},"content":""},{"lineNumber":357,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`."},{"lineNumber":358,"author":{"gitId":"-"},"content":""},{"lineNumber":359,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed."},{"lineNumber":360,"author":{"gitId":"-"},"content":""},{"lineNumber":361,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.4 : Executing undo_"},{"lineNumber":363,"author":{"gitId":"-"},"content":""},{"lineNumber":364,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":365,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`."},{"lineNumber":366,"author":{"gitId":"-"},"content":""},{"lineNumber":367,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:"},{"lineNumber":368,"author":{"gitId":"-"},"content":""},{"lineNumber":369,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.5 : Undo/redo sequence diagram_"},{"lineNumber":371,"author":{"gitId":"-"},"content":""},{"lineNumber":372,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed)."},{"lineNumber":373,"author":{"gitId":"-"},"content":""},{"lineNumber":374,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":375,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`."},{"lineNumber":376,"author":{"gitId":"-"},"content":""},{"lineNumber":377,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow)."},{"lineNumber":378,"author":{"gitId":"-"},"content":""},{"lineNumber":379,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.6 : Executing `clear`_"},{"lineNumber":381,"author":{"gitId":"-"},"content":""},{"lineNumber":382,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:"},{"lineNumber":383,"author":{"gitId":"-"},"content":""},{"lineNumber":384,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.7 : Stack is not changed after `list`_"},{"lineNumber":386,"author":{"gitId":"-"},"content":""},{"lineNumber":387,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:"},{"lineNumber":388,"author":{"gitId":"-"},"content":""},{"lineNumber":389,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.8 : Undo/Redo activity diagram_"},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":393,"author":{"gitId":"-"},"content":""},{"lineNumber":394,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +"},{"lineNumber":395,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +"},{"lineNumber":396,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +"},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":398,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +"},{"lineNumber":399,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +"},{"lineNumber":400,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +"},{"lineNumber":401,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo."},{"lineNumber":402,"author":{"gitId":"-"},"content":""},{"lineNumber":403,"author":{"gitId":"-"},"content":"---"},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +"},{"lineNumber":406,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +"},{"lineNumber":407,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +"},{"lineNumber":408,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +"},{"lineNumber":409,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":410,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +"},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +"},{"lineNumber":412,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct."},{"lineNumber":413,"author":{"gitId":"-"},"content":""},{"lineNumber":414,"author":{"gitId":"-"},"content":"---"},{"lineNumber":415,"author":{"gitId":"-"},"content":""},{"lineNumber":416,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +"},{"lineNumber":417,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +"},{"lineNumber":418,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +"},{"lineNumber":419,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +"},{"lineNumber":420,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +"},{"lineNumber":422,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +"},{"lineNumber":423,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +"},{"lineNumber":424,"author":{"gitId":"-"},"content":""},{"lineNumber":425,"author":{"gitId":"-"},"content":"---"},{"lineNumber":426,"author":{"gitId":"-"},"content":""},{"lineNumber":427,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +"},{"lineNumber":428,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +"},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +"},{"lineNumber":430,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +"},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":432,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +"},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +"},{"lineNumber":434,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +"},{"lineNumber":435,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":436,"author":{"gitId":"-"},"content":""},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"// tag::task[]"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +"},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the `add`, `delete`, `find`, `select`, and `edit` commands."},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Object inheritance is thus used to create the commands that are shared with those used to handle Person objects."},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task-related Command implementation"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"An example of using inheritance to handle Person vs Task addition:"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {"},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand(toAdd);"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {"},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand(toAdd);"},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"----"},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"The Parser in charge of the command will thus return either an AddPersonCommand, or an AddTaskCommand, depending on whether you specify to add a Task or not in the arguments."},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":" +"},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:"},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.1.1 : Sequence Diagram for adding a Task_"},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task structure and subclasses"},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"The Task object has several subclasses, which store information about the task. The following class diagram illustrates the structure of a Task object."},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"image::TaskClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.2.1 : Class Diagram for the Task class_"},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"Each subclass contains its own methods for input validation, and the Assignees class supports some methods for changing its assignedList."},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task Object Storage"},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"[source, xml]"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e"},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e"},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e"},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e"},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Task objects are stored in a similar manner to Person objects, and share the same level of hierarchy as Person objects. During startup, tasks are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book."},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +"},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use inheritance to implement different commands for Task and Person objects +"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"**Pros:** Can be easily extended to allow handling of other types of objects, and preserves Separation of Concerns. +"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"**Cons:** Minor code duplication occurs as the commands for Person and Tasks objects share the same structure. +"},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Use polymorphism to allow existing commands to implement task handling +"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"**Pros:** Code duplication is kept to a minimum as the Command will handle Task and Person objects in the same class. +"},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"**Cons:** Single Responsibility Principle is violated as each Command class now needs to handle 2 different types of objects. +"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +"},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +"},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes. +"},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa. +"},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage. +"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"// end::task[]"},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]"},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign and Dismiss Commands"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"The `assign` and `dismiss` command allows you to assign contacts to and from your tasks, thus aiding coordination and collaboration. +"},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"The Assignees class stores information related to who is assigned to a particular task through maintaining an internal ArrayList that keeps track of all the indexes of the people who are assigned to the task. +"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"The indexes stored in the Assignees class *refer to the index of the person in the UniquePersonList, not the visible index shown to the user in the UI*. This means that the indexes will not change even if the list shown in the UI changes, such as after a `find` operation. +"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"For example, given the below list of persons:"},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexMovement.png[width\u003d\"800\"]"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.1 : Mapping of indexes to a task_"},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"After a `find` operation, only the second, fourth and fifth persons are visible."},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"When you call `assign 1 2 to/1`, while the first and second persons in the visible list will be assigned to the first Task, in this case the \"Second person\" and \"Fourth person\", internally the assignee list contain Indexes corresponding the following values: +"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[source, java]"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"assignedList \u003d {1, 3}"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"The indexes 1 and 3 refer to the zero-based index of the \"Second person\" and \"Fourth person\" in the complete list."},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Due to this requirement, when the UniquePersonList changes, the assigned indexes of each task will be updated as well."},{"lineNumber":555,"author":{"gitId":"-"},"content":""},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"The `add` operation will not require the assigned indexes to be updated, as each newly added person is not assigned to any task by default, and when a person is added, he is inserted to the end of the list, thus the order of the other persons will not change."},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"After a `clear` operation that clears only the persons list, all task assignee lists will be cleared and re-initialized."},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"After a `delete` operation, the order of the persons in the persons list may change. This is especially so when the first person is deleted, as this will cause the positions of all other persons to decrease by 1."},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"The activity diagram below illustrates the process of updating task assignee lists when a person is deleted."},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexDelete.png[width\u003d\"800]"},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.2 : Activity Diagram for updating Assignees after deleting a Person_"},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"After a `sort` operation, the order of the persons in the persons list may change as well. However, in comparison to `delete`, the new position of the person is not fixed."},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"To ensure that the indexes are updated properly, the change in positions after each `sort` operation is maintained as well inside the UniquePersonList. +"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexSort.png[width\u003d\"800\"]"},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.3 : Mapping of indexes after a sort operation_"},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"All task assignee lists will thus be updated using the mappings from the sort operation. Each index in the list will be replaced by the value given in the mappings."},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"For example, if a task previously had an index of \"1\" assigned to it, it be replaced by an index of \"4\"."},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of assigned persons in the Assignee class +"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store the Indexes of the persons only +"},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"**Pros:** The assigned persons will only need to be retrieved on a per-need basis, rather than residing in the Assignee class all the time, thus making storage simpler +"},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":"**Cons:** UniquePersonList will be coupled to Tasks, as Tasks will need to retrieve information from the UniquePersonList in order to update itself after any operation that could potentially change the UniquePersonList ordering. +"},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store the whole person in the Assignees class +"},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":"**Pros:** The Assignees class will not need to depend on the UniquePersonList as its internal list is independent from that of the UniquePersonList +"},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"**Cons:** Repetition of information is incurred in the storage file, as the same person can appear multiple times if he is assigned to multiple tasks. This will increase the size of the storage file, and make read-write operations slow. +"},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]"},{"lineNumber":587,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]"},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":589,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":590,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` methods in UniquePersonList and UniqueTaskList. It supports"},{"lineNumber":591,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field."},{"lineNumber":592,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":593,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator."},{"lineNumber":594,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":595,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`"},{"lineNumber":596,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class or the UniqueTaskList class."},{"lineNumber":597,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":598,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for sort commands that trigger sorting in person listings is shown below:"},{"lineNumber":599,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":600,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandPersonDiagram.png[width\u003d\"800\"]"},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command class diagram_"},{"lineNumber":602,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":603,"author":{"gitId":"charlesgoh"},"content":"Likewise, the UML Class diagram for sort commands that trigger sorting in task listings is shown below:"},{"lineNumber":604,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":605,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandTaskDiagram.png[width\u003d\"800\"]"},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort task command class diagram_"},{"lineNumber":607,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":608,"author":{"gitId":"charlesgoh"},"content":"We can deduce from the UML diagrams diagrams above that the only difference between the implementation"},{"lineNumber":609,"author":{"gitId":"charlesgoh"},"content":"of the sorting for persons and tasks lies in the location where the sorting is actually executed."},{"lineNumber":610,"author":{"gitId":"charlesgoh"},"content":"The sorting of persons happens in `UniquePersonList` class while the sorting of tasks happens in `UniqueTaskList`."},{"lineNumber":611,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":612,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort person name desc`. The following sequence diagram"},{"lineNumber":613,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works."},{"lineNumber":614,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":615,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]"},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command sequence diagram_"},{"lineNumber":617,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":618,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods results in the actual person or task list being sorted. This list will be"},{"lineNumber":619,"author":{"gitId":"charlesgoh"},"content":"reflected in both the application\u0027s storage as well as the graphical user interface."},{"lineNumber":620,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":621,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":622,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":623,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +"},{"lineNumber":624,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":625,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` and `UniqueTaskList` class. +"},{"lineNumber":626,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the lists."},{"lineNumber":627,"author":{"gitId":"charlesgoh"},"content":"Future changes to the implementation will be easier as a consequence. +"},{"lineNumber":628,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +"},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +"},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +"},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList`"},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":"and `UniqueTaskList` will have to rely on the `SortCommand` class."},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +"},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +"},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive and reduces complexity in implementation. +"},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +"},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +"},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +"},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system."},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":"// end::sort[]"},{"lineNumber":647,"author":{"gitId":"-"},"content":""},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":"// tag::backup[]"},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":"The `backup` command uses the event handler `BackupRequestEvent`. When raised, this"},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":"event notifies the subscriber `backupAddressBook` method in Storage class."},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":"The outlining sequence diagram for this process (excluding the interaction with the"},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":"`BackupRequestEvent`) is shown below:"},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDiagram.png[width\u003d\"800]"},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"_Figure 3.7.1 : Backup command sequence diagram_"},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +"},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":664,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use an event handler to initialize the backup process +"},{"lineNumber":665,"author":{"gitId":"-"},"content":"**Pros:** Avoids coupling the logic to the storage unnecessarily. +"},{"lineNumber":666,"author":{"gitId":"-"},"content":"**Cons:** May not be as intuitive for some developers in the beginning +"},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":668,"author":{"gitId":"-"},"content":"**Alternative 2:** Access storage component directly instead of using event handlers +"},{"lineNumber":669,"author":{"gitId":"-"},"content":"**Pros:** May be more intuitive as it is a direct approach +"},{"lineNumber":670,"author":{"gitId":"-"},"content":"**Cons:** Violates the Law of Demeter."},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":"// end::backup[]"},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":"// tag::password[]"},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock and Unlock Command"},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":"The `lock` and `unlock` commands utilise the Model to access the user preferences of"},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"the application."},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"Arguments are processed in the `UnlockCommandParser` or `LockCommandParser`,"},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":"which passes control over to the `UnlockCommand` and `LockCommand` class respectively."},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":"These `Command` classes will then call the Model to toggle the lock\u0027s state."},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":683,"author":{"gitId":"-"},"content":"The activity diagram below outlines the basic logic of the lock states concept.:"},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":"image::LockStatesActivityDiagram.png[width\u003d\"800]"},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"_Figure 3.8.1 : Lock/Unlock command activity diagram_"},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":"From the activity diagram we can see that lock states are preserved in the `preferences.json`"},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":"file after the application closes by passing the lock state into the `UserPrefs` class to be"},{"lineNumber":690,"author":{"gitId":"-"},"content":"saved by the Storage component."},{"lineNumber":691,"author":{"gitId":"-"},"content":""},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":"The default state of the lock is set to False (i.e. locked) when the user first opens the"},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":"application. Subsequent changes to the lock will persist in the user preferences."},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `lock` and `unlock` Commands"},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Call methods in the Model directly to change UserPrefs +"},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive. Highest returns for minimal amount of code +"},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May be confusing to some developers in the beginning, since another"},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"intuitive approach is to use event handlers +"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Use Event Handlers +"},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for some developers +"},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will still have to access Model, which makes its advantage over direct calls next to none"},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d ChangePassword Command"},{"lineNumber":710,"author":{"gitId":"-"},"content":"The default password when users first open Address++ is `password`. The ChangePassword command"},{"lineNumber":711,"author":{"gitId":"-"},"content":"sets a new password in the temporary User Preferences. When the application is closed, this"},{"lineNumber":712,"author":{"gitId":"-"},"content":"information is passed to the Storage Component to be saved into the file `preferences.json`"},{"lineNumber":713,"author":{"gitId":"-"},"content":""},{"lineNumber":714,"author":{"gitId":"-"},"content":"To illustrate this concept better, let us have a look at the `preferences.json` file:"},{"lineNumber":715,"author":{"gitId":"-"},"content":"[source, json]"},{"lineNumber":716,"author":{"gitId":"-"},"content":"{"},{"lineNumber":717,"author":{"gitId":"-"},"content":" \"guiSettings\" : {"},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" \"windowWidth\" : 1309.0,"},{"lineNumber":719,"author":{"gitId":"-"},"content":" \"windowHeight\" : 720.0,"},{"lineNumber":720,"author":{"gitId":"-"},"content":" \"windowCoordinates\" : {"},{"lineNumber":721,"author":{"gitId":"-"},"content":" \"x\" : 0,"},{"lineNumber":722,"author":{"gitId":"-"},"content":" \"y\" : 22"},{"lineNumber":723,"author":{"gitId":"-"},"content":" }"},{"lineNumber":724,"author":{"gitId":"-"},"content":" },"},{"lineNumber":725,"author":{"gitId":"-"},"content":" \"addressBookFilePath\" : \"data/addressbook.xml\","},{"lineNumber":726,"author":{"gitId":"-"},"content":" \"addressBookName\" : \"My Address++\","},{"lineNumber":727,"author":{"gitId":"-"},"content":" \"addressBookLockState\" : false,"},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":" \"addressBookEncryptedPassword\" : \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\","},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" \"theme\" : \"/view/DarkTheme.css\""},{"lineNumber":730,"author":{"gitId":"-"},"content":"}"},{"lineNumber":731,"author":{"gitId":"-"},"content":""},{"lineNumber":732,"author":{"gitId":"-"},"content":"As shown in the cope snippet above, the password is stored as one of the entries in the JSON"},{"lineNumber":733,"author":{"gitId":"-"},"content":"file."},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":735,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":736,"author":{"gitId":"-"},"content":"SHA256 encryption was used to calculate a hash for the password. This is to delay anyone snooping around the"},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"user\u0027s file directories from seeing the real password immediately."},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":739,"author":{"gitId":"-"},"content":"**Validation Checks**"},{"lineNumber":740,"author":{"gitId":"-"},"content":"****"},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":"1. **Password Validation** -\u003e Is the password correct?"},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"2. **Password Confirmation** -\u003e Does the new password and confirmation password match?"},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"3. **Password Uniqueness** -\u003e Is the new password different from the old password?"},{"lineNumber":744,"author":{"gitId":"-"},"content":"****"},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":746,"author":{"gitId":"-"},"content":"The activity diagram below outlines the process flow for the `ChangePasswordCommand`:"},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":748,"author":{"gitId":"-"},"content":"image::ChangePasswordActivityDiagram.png[width\u003d\"800]"},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"_Figure 3.9.1 : ChangePassword command activity diagram_"},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":753,"author":{"gitId":"-"},"content":"**Aspect:** On Demand Saving vs. Save On Exit +"},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":755,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Save On Exit +"},{"lineNumber":756,"author":{"gitId":"-"},"content":"**Pros:** Simplifies process flow as the command class no longer has to access both Model and Storage components +"},{"lineNumber":757,"author":{"gitId":"-"},"content":"**Cons:** Any system/application crash may cause change password data to be lost +"},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":759,"author":{"gitId":"-"},"content":"**Alternative 2:** On Demand Saving +"},{"lineNumber":760,"author":{"gitId":"-"},"content":"**Pros:** Changes may persist even through system and application crashes +"},{"lineNumber":761,"author":{"gitId":"-"},"content":"**Cons:** May slow down application, although not significantly. Complicates process flow."},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"// end::password[]"},{"lineNumber":763,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":764,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacy[]"},{"lineNumber":765,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields"},{"lineNumber":766,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":767,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email`, `Address` and `Remark` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not."},{"lineNumber":768,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":769,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacy.png[width\u003d\"800\"]"},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.1 : Class diagram for a Person, only Name, Phone, Email, Address and Remark contain an isPrivate boolean to indicate if it is private or not_"},{"lineNumber":771,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +"},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +"},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +"},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":776,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes."},{"lineNumber":777,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field."},{"lineNumber":778,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor."},{"lineNumber":779,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`."},{"lineNumber":780,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":781,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":782,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.2 : Sequence Diagram for adding a Person with private fields_"},{"lineNumber":783,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":784,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +"},{"lineNumber":785,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:"},{"lineNumber":786,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":787,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":788,"author":{"gitId":"jeffreygohkw"},"content":"@Override"},{"lineNumber":789,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {"},{"lineNumber":790,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":791,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":792,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":793,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;"},{"lineNumber":794,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":795,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":796,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":797,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI."},{"lineNumber":798,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":799,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name."},{"lineNumber":800,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":801,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`."},{"lineNumber":802,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":803,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`."},{"lineNumber":804,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following"},{"lineNumber":805,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":806,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]"},{"lineNumber":807,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":808,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":809,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":810,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":811,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":812,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":813,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":814,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":815,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":816,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":817,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":818,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":819,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format"},{"lineNumber":820,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":821,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]"},{"lineNumber":822,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":823,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e"},{"lineNumber":824,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e"},{"lineNumber":825,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e"},{"lineNumber":826,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e"},{"lineNumber":827,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e"},{"lineNumber":828,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e"},{"lineNumber":829,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e"},{"lineNumber":830,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e"},{"lineNumber":831,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e"},{"lineNumber":832,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremark\u003echeerful lad\u003c/remark\u003e"},{"lineNumber":833,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremarkIsPrivate\u003efalse\u003c/remarkIsPrivate\u003e"},{"lineNumber":834,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e"},{"lineNumber":835,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e"},{"lineNumber":836,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":837,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same."},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +"},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was."},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":844,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`."},{"lineNumber":845,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true."},{"lineNumber":846,"author":{"gitId":"-"},"content":""},{"lineNumber":847,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false."},{"lineNumber":848,"author":{"gitId":"-"},"content":""},{"lineNumber":849,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object."},{"lineNumber":850,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":851,"author":{"gitId":"-"},"content":"----"},{"lineNumber":852,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":853,"author":{"gitId":"-"},"content":" Name updatedName;"},{"lineNumber":854,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {"},{"lineNumber":855,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":856,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":857,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":858,"author":{"gitId":"-"},"content":" }"},{"lineNumber":859,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":860,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":861,"author":{"gitId":"-"},"content":" }"},{"lineNumber":862,"author":{"gitId":"-"},"content":" return updatedName;"},{"lineNumber":863,"author":{"gitId":"-"},"content":"}"},{"lineNumber":864,"author":{"gitId":"-"},"content":"----"},{"lineNumber":865,"author":{"gitId":"-"},"content":""},{"lineNumber":866,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing."},{"lineNumber":867,"author":{"gitId":"-"},"content":""},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":869,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +"},{"lineNumber":871,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":872,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +"},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +"},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +"},{"lineNumber":875,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +"},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +"},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to."},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +"},{"lineNumber":882,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +"},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +"},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +"},{"lineNumber":886,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +"},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +"},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users."},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy"},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`."},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below."},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.11.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_"},{"lineNumber":899,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object."},{"lineNumber":901,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`."},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":"This is illustrated in the code below, which shows how the privacy of `Name` is set in `PersonPrivacySettings`:"},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {"},{"lineNumber":908,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {"},{"lineNumber":909,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {"},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`"},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`."},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`. For example, the new `Name` is created in the code snippet below:"},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {"},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);"},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);"},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":936,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":937,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":938,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");"},{"lineNumber":939,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":940,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {"},{"lineNumber":941,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());"},{"lineNumber":942,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":943,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());"},{"lineNumber":944,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":945,"author":{"gitId":"jeffreygohkw"},"content":" return name;"},{"lineNumber":946,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":947,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":948,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`."},{"lineNumber":949,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":950,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":951,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`."},{"lineNumber":952,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all."},{"lineNumber":953,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":954,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":955,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":956,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +"},{"lineNumber":957,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":958,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +"},{"lineNumber":959,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +"},{"lineNumber":960,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +"},{"lineNumber":961,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":962,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Enhance the functionality of EditCommand. +"},{"lineNumber":963,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +"},{"lineNumber":964,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data."},{"lineNumber":965,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":966,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the address book\u0027s privacy level"},{"lineNumber":967,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":968,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommand` allows the user to change the privacy level of Address++, letting users easily reveal data hidden by private fields, or hide persons containing private fields entirely."},{"lineNumber":969,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":970,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `PrivacyLevelCommand` is illustrated below."},{"lineNumber":971,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":972,"author":{"gitId":"jeffreygohkw"},"content":"image::PrivacyLevelSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":973,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.1 : Sequence Diagram for changing the privacy level of the address book_"},{"lineNumber":974,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":975,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommandParser` will accept any integer that is input in the command line, and create a `PrivacyLevelCommand` that stores the integer, which represents the privacy level to switch to."},{"lineNumber":976,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":977,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution,`PrivacyLevelCommand` will first check if the integer falls within the range of the minimum and maximum privacy level. If it does not, a new `CommandException` is thrown, reminding the user of the valid input levels."},{"lineNumber":978,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":979,"author":{"gitId":"jeffreygohkw"},"content":"If the integer is within the valid range, `PrivacyLevelCommand` will update the privacy level of `Model`. Following that, it will proceed to update the privacy level of each person."},{"lineNumber":980,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":981,"author":{"gitId":"jeffreygohkw"},"content":"`Model`, each `Person` and each field that can be set as private all contain a `privacyLevel` variable to indicate the current privacy level. This value should remain the same between all of these objects throughout the operation of Address++."},{"lineNumber":982,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":983,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacyLevel.png[width\u003d\"800\"]"},{"lineNumber":984,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.2 : Class Diagram of Person, which shows which classes contain an integer to indicate the privacy level_"},{"lineNumber":985,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":986,"author":{"gitId":"jeffreygohkw"},"content":"Finally, depending on the privacy level, `PrivacyLevelCommand` will update the call `model.updateFilteredPersonList()` with the appropriate predicate."},{"lineNumber":987,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":988,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated in the code snippet below."},{"lineNumber":989,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":990,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":991,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":992,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {"},{"lineNumber":993,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":994,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {"},{"lineNumber":995,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":996,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":997,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);"},{"lineNumber":998,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {"},{"lineNumber":999,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);"},{"lineNumber":1000,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);"},{"lineNumber":1001,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);"},{"lineNumber":1002,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":1003,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);"},{"lineNumber":1004,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":1005,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":1006,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {"},{"lineNumber":1007,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":1008,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1009,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1010,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {"},{"lineNumber":1011,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());"},{"lineNumber":1012,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1013,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":1014,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1015,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));"},{"lineNumber":1016,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1017,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1018,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1019,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1020,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1021,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Storing of the privacy level +"},{"lineNumber":1022,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1023,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have each relevant class store a privacy level integer. +"},{"lineNumber":1024,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Less coupling, less modification of existing code required. +"},{"lineNumber":1025,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify every relevant object every time `PrivacyLevelCommand` is called. Runs the risk that an object may accidentally not have its privacy level modified to match the other objects if privacy levels are not properly updated. +"},{"lineNumber":1026,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1027,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store the privacy level in the model and have any object that needs to check it query from model. +"},{"lineNumber":1028,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only one integer needs to be modified for the privacy level of the entire address book to change, which also eliminates any possibility that privacy level may be different when used by different objects. +"},{"lineNumber":1029,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases coupling, classes such as Name will need to have a Model object as one of its variables to access Model. Large scale modification of existing code and tests are necessary."},{"lineNumber":1030,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacy[]"},{"lineNumber":1031,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1032,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]"},{"lineNumber":1033,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps"},{"lineNumber":1034,"author":{"gitId":"-"},"content":""},{"lineNumber":1035,"author":{"gitId":"jeffreygohkw"},"content":"Locating a person\u0027s address allows users to take the address that is stored by a person and search it on Google Maps in the browser."},{"lineNumber":1036,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +"},{"lineNumber":1038,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:"},{"lineNumber":1039,"author":{"gitId":"-"},"content":""},{"lineNumber":1040,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1041,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1042,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":1043,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":1044,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":1045,"author":{"gitId":"-"},"content":" return new LocateCommand(index);"},{"lineNumber":1046,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":1047,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":1048,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":1049,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1050,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1051,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1052,"author":{"gitId":"-"},"content":""},{"lineNumber":1053,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of persons, a `CommandException` will be thrown."},{"lineNumber":1054,"author":{"gitId":"-"},"content":""},{"lineNumber":1055,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution."},{"lineNumber":1056,"author":{"gitId":"-"},"content":""},{"lineNumber":1057,"author":{"gitId":"-"},"content":"This code for this can be found below:"},{"lineNumber":1058,"author":{"gitId":"-"},"content":""},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1060,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1061,"author":{"gitId":"-"},"content":"public CommandResult execute() throws CommandException {"},{"lineNumber":1062,"author":{"gitId":"-"},"content":""},{"lineNumber":1063,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":1064,"author":{"gitId":"-"},"content":""},{"lineNumber":1065,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":1066,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":1067,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1068,"author":{"gitId":"-"},"content":""},{"lineNumber":1069,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":1070,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":1071,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":1072,"author":{"gitId":"-"},"content":""},{"lineNumber":1073,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1074,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:"},{"lineNumber":1077,"author":{"gitId":"-"},"content":""},{"lineNumber":1078,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1079,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1080,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":1081,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":1082,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":1083,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1084,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":1085,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":1086,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1087,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1088,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1089,"author":{"gitId":"-"},"content":""},{"lineNumber":1090,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:"},{"lineNumber":1091,"author":{"gitId":"-"},"content":""},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1093,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.13.1 : Sequence Diagram for Locating a Person\u0027s Address_"},{"lineNumber":1094,"author":{"gitId":"-"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1096,"author":{"gitId":"-"},"content":""},{"lineNumber":1097,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +"},{"lineNumber":1098,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1099,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command `locate`. +"},{"lineNumber":1100,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +"},{"lineNumber":1101,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +"},{"lineNumber":1102,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1103,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +"},{"lineNumber":1105,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users."},{"lineNumber":1106,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]"},{"lineNumber":1107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1108,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]"},{"lineNumber":1109,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another using Google Maps"},{"lineNumber":1110,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1111,"author":{"gitId":"jeffreygohkw"},"content":"When the `navigate` command is entered into the command line, `NavigateCommandParse` will first reset its internal `from`, `to`, `fromIndex`, `toIndex` to null. It will then check for the input prefixes and ensure that only one of the prefixes from the group `fp/`, `ft/`, and `fa/`, which we will subsequently call the `from` prefixes are present. It then does the same with the prefixes from the group `tp/`, `tt/` and `ta/`, which we will call the `to` prefixes. +"},{"lineNumber":1112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1113,"author":{"gitId":"jeffreygohkw"},"content":"This is done by invoking the `checkFrom` and `checkTo` methods as can be seen from the code snippet below. For the example `checkFrom`, it takes in 3 booleans on whether or not each prefix is present and checks whether or not there is exactly one kind of `from` prefix. It throws an error if there are no `from` prefixes or more than one type of `from` prefixes."},{"lineNumber":1114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1115,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1116,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1117,"author":{"gitId":"jeffreygohkw"},"content":"private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)"},{"lineNumber":1118,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {"},{"lineNumber":1119,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {"},{"lineNumber":1120,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":1121,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {"},{"lineNumber":1122,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present"},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);"},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1132,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"`checkFrom` calls `setArgsForNavigateCommand`, which sets the variables in the `NavigateCommandParser` to the appropriate values depending on whether the address originates from a person, a task or is a manual input by the user."},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":"private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person, boolean forFrom) throws IllegalValueException {"},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {"},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());"},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());"},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {"},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());"},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1153,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());"},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":1157,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());"},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1160,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());"},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1164,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1167,"author":{"gitId":"jeffreygohkw"},"content":"Finally, `NavigateCommandParser` will create a new `NavigateCommand` based on the inputs as set by `setArgsForNavigateCommand`."},{"lineNumber":1168,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1169,"author":{"gitId":"jeffreygohkw"},"content":"When `NavigateCommand` is created, it first checks if there are duplicate `from` or `to` addresses that are passed into it and throws an error if that is the case."},{"lineNumber":1170,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1173,"author":{"gitId":"jeffreygohkw"},"content":"private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex) throws IllegalArgumentException {"},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {"},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":1176,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1177,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {"},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1180,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1183,"author":{"gitId":"jeffreygohkw"},"content":"If it passes this check, `NavigateCommand` stores `fromLocation` and `toLocation`, which are the Locations of any manually added address by the user to navigate from and to respectively. It also stores `toIndex` and `fromIndex`, which are the Indexes of the `Person` or `Task` to extract the address from as well as `toIsTask` and `fromIsTask`, which are booleans that indicate whether `toIndex` and `fromIndex` are indexes of Persons or Tasks."},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `NavigateCommmand`, it will first check if it has a non-null `fromIndex`, if it does, it will create a new Location based on its `fromIndex` and `fromIsTask` values using the `setLocationByIndex` method. Otherwise, it will set the Location to be the Location in `locationfrom`. This can be seen below:"},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1187,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"if (fromIndex !\u003d null) {"},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":1190,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);"},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);"},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1194,"author":{"gitId":"jeffreygohkw"},"content":"} else {"},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;"},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1197,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"setLocationByIndex throws CommandException if the target Person or Task does not have a valid Address to extract due to the Address being blank, or it being private."},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1201,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {"},{"lineNumber":1204,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {"},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {"},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1208,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());"},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1211,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {"},{"lineNumber":1212,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":1213,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {"},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":1215,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())"},{"lineNumber":1217,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":1218,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1220,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1221,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1222,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1223,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` does the same for the Address to navigate `To` and posts a new `BrowserPanelNavigateEvent`, passing in the `Location` to navigate `From` and the `Location` to navigate `To`. +"},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` will then create a new `CommandResult` to indicate a successful `Command`."},{"lineNumber":1225,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":"`BrowserPanel` will then get the information from this `BrowserPanelNavigateEvent`, and load the appropriate Google Maps URL after replacing information such as the Unit Number and extra whitespaces. This has to be done as Google Maps does not function properly with Unit Numbers or spaces in its URL."},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1229,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"private void loadDirectionsPage(String fromLocation, String toLocation) {"},{"lineNumber":1231,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\""},{"lineNumber":1232,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\""},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":1236,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);"},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1239,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":"The overall sequence of events is illustrated by the following sequence diagram:"},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"image::NavigateSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1243,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.14.1 : Sequence Diagram for Navigating from one Address to another_"},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1246,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1247,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1248,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to pass the appropriate information to NavigateCommand +"},{"lineNumber":1249,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1250,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have a constructor that takes in a large number of arguments so that NavigateCommand can correctly identify what kind of Location to post in BrowserPanelNavigateEvent. +"},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only 1 constructor needed. +"},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional methods will be needed to properly identify which Location to use for navigation. +"},{"lineNumber":1253,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1254,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Create many constructors to segregate the different possible scenarios that might happen. +"},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear what information to use to generate the Locations +"},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires large numbers of constructors to be created, easy for mistakes to occur as Constructors all share the same name but different argument types."},{"lineNumber":1257,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to transfer information of the address from one class to another +"},{"lineNumber":1259,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1260,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Wrap the address in a `Location` class before posting the BrowserPanelNavigateEvent. +"},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only Locations, which indicates that the address is properly parsed, will be passed for the BrowserPanel to read, reducing the possibility of BrowserPanel reading stray unwanted strings as addresses to navigate to and from. The value stored inside each Location cannot be altered once that Location object has been created. +"},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** A new class has to be created and Strings, Addresses and TaskAddresses will need to be converted to Locations first. +"},{"lineNumber":1263,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1264,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Simply pass on a String containing the address from class to class +"},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easy to read and transfer information, lower overhead +"},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** It is easier for stray Strings to pollute the information, and the Strings can be unintentionally modified."},{"lineNumber":1267,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]"},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1269,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]"},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening and Saving of the .xml save file"},{"lineNumber":1271,"author":{"gitId":"jeffreygohkw"},"content":"Both `OpenCommand` and `SaveAsCommand` function in a very similar way."},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"When `open` or `save` is input by the user, `AddressBookParser` will create a new `OpenCommand` or `SaveAsCommand`."},{"lineNumber":1273,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1274,"author":{"gitId":"jeffreygohkw"},"content":"These two commands will then post a new `OpenRequestEvent` or a new `SaveAsRequestEvent` and return a successful `CommandResult`."},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` will have two methods, `HandleOpenRequestEvent` and `HandleSaveAsRequestEvent` that subscribe to the above two events and will call `handleOpen` and `handleSaveAs`."},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1280,"author":{"gitId":"jeffreygohkw"},"content":"private void handleOpen() throws IOException, DataConversionException {"},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":1282,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog"},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);"},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file"},{"lineNumber":1290,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file"},{"lineNumber":1292,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));"},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1296,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1297,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1299,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1300,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"private void handleSaveAs() throws IOException {"},{"lineNumber":1302,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":1304,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":1305,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog"},{"lineNumber":1308,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);"},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension"},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {"},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");"},{"lineNumber":1314,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1315,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file"},{"lineNumber":1316,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":1317,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences"},{"lineNumber":1318,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());"},{"lineNumber":1319,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);"},{"lineNumber":1320,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":1321,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":1322,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1324,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1326,"author":{"gitId":"jeffreygohkw"},"content":"Both `handleOpen` and `handleSaveAs` will create a new `FileChooser` extension filter that only allows the pop-up window to save files and load files in the .xml format."},{"lineNumber":1327,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1328,"author":{"gitId":"jeffreygohkw"},"content":"Upon successfully selecting a file to load or a location to save as in the pop-up window, both methods will call `changefilepath` in `Storage` to the selected file path."},{"lineNumber":1329,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"Finally, both commands diverge as `handleOpen` will call `resetData` to reset the data using the new save file, while `handleSaveAs` will call `saveAddressBook` and `saveUserPrefs` to save the data. Both methods will finally call `fillInnerParts()` to refresh the data displayed on the UI."},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated using the sequence diagram below:"},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1334,"author":{"gitId":"jeffreygohkw"},"content":"image::OpenSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1335,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.15.1 : Sequence Diagram for Opening a save file_"},{"lineNumber":1336,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1337,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1338,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How does `OpenCommand` and `SaveAsCommand` determine the file location to save or load the save file from +"},{"lineNumber":1339,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1340,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Open a `FileChooser` window, allowing the user to move through their file directory to acquire their save location and to select the name of the save file. +"},{"lineNumber":1341,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** User friendly, many other applications function similarly when saving and loading. Easier to implement and use as part of the dropdown menu in the User Interface. +"},{"lineNumber":1342,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Not entirely command line based. +"},{"lineNumber":1343,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1344,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Input the file directory and file name to save or load from as part of the command. +"},{"lineNumber":1345,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Entirely command line based, may be more preferable for users who prefer using the command line. +"},{"lineNumber":1346,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires more complex code. Command must check if the file location to save or load from is valid, and that there is a valid file of that name."},{"lineNumber":1347,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]"},{"lineNumber":1348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1349,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]"},{"lineNumber":1350,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the theme of the address book"},{"lineNumber":1351,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1352,"author":{"gitId":"jeffreygohkw"},"content":"The original style of the address book may not be for everyone. `ThemeCommand` allows users to switch between multiple preset themes."},{"lineNumber":1353,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1354,"author":{"gitId":"jeffreygohkw"},"content":"`ThemeCommandParser` trims the arguments after the word `theme` in the command line, removing any whitespaces leading up to and following that word. If the entire String ended up trimmed, then `ThemeCommandParser` will throw a `ParseException`. Otherwise, it creates a new `ThemeCommand`, passing in the trimmed word as seen below:"},{"lineNumber":1355,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1356,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1357,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1358,"author":{"gitId":"jeffreygohkw"},"content":"public ThemeCommand parse(String args) throws ParseException {"},{"lineNumber":1359,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {"},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));"},{"lineNumber":1362,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);"},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1366,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1367,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1368,"author":{"gitId":"jeffreygohkw"},"content":"When initialising the Address Book, the `AddressBook` class will create a `HashMap\u003cString, String\u003e` to store the keys and values of the themes."},{"lineNumber":1369,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1370,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1371,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1372,"author":{"gitId":"jeffreygohkw"},"content":"private void initialiseStyleMap() {"},{"lineNumber":1373,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"DarkTheme.css\");"},{"lineNumber":1374,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"DarkTheme.css\");"},{"lineNumber":1375,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"LightTheme.css\");"},{"lineNumber":1376,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"LightTheme.css\");"},{"lineNumber":1377,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1378,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1379,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"The keys correspond to the possible user inputs, such as `light` or `dark`, while the values contain the filepath of the .css files, such as `DarkTheme.css`. This way, users do not need to remember and will not have to know what the .css files are like to use the theme command."},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1382,"author":{"gitId":"jeffreygohkw"},"content":"On executing `ThemeCommand`, it first checks if the input string can be found in the set of keys in the HashMap contained by the `AddressBook` class. If it cannot be found, or if the value corresponding to the input string is identical to that of the value of the file path of the .css file stored in Model, then a `CommandException` is thrown, as users cannot change to a non-existent theme, or a theme that is already in use."},{"lineNumber":1383,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1384,"author":{"gitId":"jeffreygohkw"},"content":"If the string is valid, `ThemeCommand` will post a `ChangeThemeRequestEvent` and set the theme to the new file path corresponding to the input String in `Model`. `Model` will then continue on to set the theme in `UserPrefs` as well, so that it can be loaded on starting the application."},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` contains a method `handleChangeThemeEvent` that subscribes to the `ChangeThemeRequestEvent`. `handleChangeThemeEvent` calls `handlChangeTheme`, which first checks if there is an existing theme, if there is, it removes it, then sets adds the new theme through the file path that was passed to it."},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1388,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1390,"author":{"gitId":"jeffreygohkw"},"content":"public void handleChangeTheme(String theme) {"},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {"},{"lineNumber":1392,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);"},{"lineNumber":1393,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1394,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(VIEW_PATH + theme);"},{"lineNumber":1395,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1396,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1397,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"After all is done, `ThemeCommand` returns a `CommandResult`, indicating the success of the command."},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"The overall execution of `ThemeCommand` is seen in the following code snippet."},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]"},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {"},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;"},{"lineNumber":1406,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1407,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {"},{"lineNumber":1408,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);"},{"lineNumber":1409,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));"},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1412,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1413,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {"},{"lineNumber":1414,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));"},{"lineNumber":1415,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));"},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);"},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));"},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"----"},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for the whole process is show below:"},{"lineNumber":1424,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1425,"author":{"gitId":"jeffreygohkw"},"content":"image::ThemeSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1426,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.16.1 : Sequence Diagram for Changing Themes_"},{"lineNumber":1427,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Getting the correct file path to the .css file +"},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Store the file path in a HashMap, where the keys are the possible inputs that the user may type and the values are the actual filepaths +"},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier on the user. They do not need to remember any complicated .css names or file paths, and the input string can be customisable by changing the names of the keys added to the HashMap. +"},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Slightly more work needed to initialise the HashMap and check if the file paths are valid. +"},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Change the name of the .css file and file paths such that what the user directly inputs can correspond to the actual .css file. +"},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** A HashMap is no longer needed, instead, the input string just needs to be parsed to be turned into a file path. This makes it easier to add additional .css files, as developers do not have to keep modifying the initialisation of the HashMap +"},{"lineNumber":1435,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Less flexibility in naming the file, user may break the code if they realise the input string directly used as part of the file path."},{"lineNumber":1436,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]"},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"// tag::adddeletetag[]"},{"lineNumber":1439,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism"},{"lineNumber":1440,"author":{"gitId":"-"},"content":""},{"lineNumber":1441,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete"},{"lineNumber":1442,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`."},{"lineNumber":1443,"author":{"gitId":"-"},"content":""},{"lineNumber":1444,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`."},{"lineNumber":1445,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once."},{"lineNumber":1446,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`add tag/ 1 2 3 t/friends`) will be executed."},{"lineNumber":1447,"author":{"gitId":"-"},"content":"The same operation will happen for `delete tag/` command."},{"lineNumber":1448,"author":{"gitId":"-"},"content":""},{"lineNumber":1449,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works"},{"lineNumber":1450,"author":{"gitId":"-"},"content":"in a similar way."},{"lineNumber":1451,"author":{"gitId":"-"},"content":""},{"lineNumber":1452,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:"},{"lineNumber":1453,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1454,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1455,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":1456,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book."},{"lineNumber":1457,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1458,"author":{"gitId":"-"},"content":"public class AddTagCommand extends AddCommand {"},{"lineNumber":1459,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":1460,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":1461,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":1462,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1463,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":1464,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":1465,"author":{"gitId":"-"},"content":""},{"lineNumber":1466,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":1467,"author":{"gitId":"-"},"content":" // check whether the index within the range"},{"lineNumber":1468,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1469,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":1470,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag"},{"lineNumber":1471,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1472,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag"},{"lineNumber":1473,"author":{"gitId":"-"},"content":" return new CommandResult();"},{"lineNumber":1474,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1475,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1476,"author":{"gitId":"-"},"content":""},{"lineNumber":1477,"author":{"gitId":"-"},"content":"Suppose the user enter the `add tag/ 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:"},{"lineNumber":1478,"author":{"gitId":"-"},"content":""},{"lineNumber":1479,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":1480,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : Add Tag Sequence Diagram for Logic_ +"},{"lineNumber":1481,"author":{"gitId":"-"},"content":"The `delete tag/` command works the same as `add tag/` command with different name only."},{"lineNumber":1482,"author":{"gitId":"-"},"content":""},{"lineNumber":1483,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1484,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +"},{"lineNumber":1485,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +"},{"lineNumber":1486,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception."},{"lineNumber":1487,"author":{"gitId":"-"},"content":""},{"lineNumber":1488,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1489,"author":{"gitId":"-"},"content":""},{"lineNumber":1490,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1491,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `add tag/` and `delete tag/` +"},{"lineNumber":1492,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +"},{"lineNumber":1493,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +"},{"lineNumber":1494,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+"},{"lineNumber":1495,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1496,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +"},{"lineNumber":1497,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +"},{"lineNumber":1498,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list."},{"lineNumber":1499,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle."},{"lineNumber":1500,"author":{"gitId":"-"},"content":""},{"lineNumber":1501,"author":{"gitId":"-"},"content":"---"},{"lineNumber":1502,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +"},{"lineNumber":1503,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `add tag/` and `delete tag/` +"},{"lineNumber":1504,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +"},{"lineNumber":1505,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +"},{"lineNumber":1506,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1507,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +"},{"lineNumber":1508,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +"},{"lineNumber":1509,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner."},{"lineNumber":1510,"author":{"gitId":"-"},"content":"// end::adddeletetag[]"},{"lineNumber":1511,"author":{"gitId":"-"},"content":""},{"lineNumber":1512,"author":{"gitId":"-"},"content":"// tag::findtag[]"},{"lineNumber":1513,"author":{"gitId":"-"},"content":""},{"lineNumber":1514,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism"},{"lineNumber":1515,"author":{"gitId":"-"},"content":""},{"lineNumber":1516,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book."},{"lineNumber":1517,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`."},{"lineNumber":1518,"author":{"gitId":"-"},"content":""},{"lineNumber":1519,"author":{"gitId":"-"},"content":"The `find tag/` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`."},{"lineNumber":1520,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first."},{"lineNumber":1521,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar."},{"lineNumber":1522,"author":{"gitId":"-"},"content":""},{"lineNumber":1523,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences."},{"lineNumber":1524,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`."},{"lineNumber":1525,"author":{"gitId":"-"},"content":""},{"lineNumber":1526,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:"},{"lineNumber":1527,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String."},{"lineNumber":1528,"author":{"gitId":"-"},"content":""},{"lineNumber":1529,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1530,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1531,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":1532,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":1533,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":1534,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {"},{"lineNumber":1535,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":1536,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");"},{"lineNumber":1537,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1538,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();"},{"lineNumber":1539,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1540,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1541,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one"},{"lineNumber":1542,"author":{"gitId":"-"},"content":"is for the tags to be excluded."},{"lineNumber":1543,"author":{"gitId":"-"},"content":""},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"[source,java]"},{"lineNumber":1545,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1546,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":1547,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":1548,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":1549,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":1550,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1551,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":1552,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {"},{"lineNumber":1553,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {"},{"lineNumber":1554,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);"},{"lineNumber":1555,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1556,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));"},{"lineNumber":1557,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1558,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1559,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1560,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1561,"author":{"gitId":"-"},"content":""},{"lineNumber":1562,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +"},{"lineNumber":1563,"author":{"gitId":"-"},"content":"Suppose the user enter `find tag/ friends` command. The following sequence diagram shows how the find tag command works:"},{"lineNumber":1564,"author":{"gitId":"-"},"content":""},{"lineNumber":1565,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1566,"author":{"gitId":"-"},"content":"_Figure 3.18.1 : Find Tag Sequence Diagram for Logic_ +"},{"lineNumber":1567,"author":{"gitId":"-"},"content":""},{"lineNumber":1568,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1569,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list."},{"lineNumber":1570,"author":{"gitId":"-"},"content":""},{"lineNumber":1571,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1572,"author":{"gitId":"-"},"content":""},{"lineNumber":1573,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1574,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `find tag/` +"},{"lineNumber":1575,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `find tag/` +"},{"lineNumber":1576,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `find tag/` command will be similar to the `find` command. +"},{"lineNumber":1577,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +"},{"lineNumber":1578,"author":{"gitId":"-"},"content":""},{"lineNumber":1579,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `find tag/` in `FindCommand`. +"},{"lineNumber":1580,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +"},{"lineNumber":1581,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle"},{"lineNumber":1582,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things."},{"lineNumber":1583,"author":{"gitId":"-"},"content":"// end::findtag[]"},{"lineNumber":1584,"author":{"gitId":"-"},"content":""},{"lineNumber":1585,"author":{"gitId":"-"},"content":"// tag::favunfav[]"},{"lineNumber":1586,"author":{"gitId":"-"},"content":""},{"lineNumber":1587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favourite/Unfavourite Person mechanism"},{"lineNumber":1588,"author":{"gitId":"-"},"content":"To favourite a person is achieved by `FavouriteCommand`. It basically changes the value of the `favourite` status of a `Person` but there is no specific `Favourite` field for person."},{"lineNumber":1589,"author":{"gitId":"-"},"content":""},{"lineNumber":1590,"author":{"gitId":"-"},"content":"In this sense, a boolean value needs to be created to store the favourite status of a contact. As `AddCommand` does not involve `favourite`, the default `favourite` status for every newly added `Person` is false."},{"lineNumber":1591,"author":{"gitId":"-"},"content":""},{"lineNumber":1592,"author":{"gitId":"-"},"content":"The `favourite` status is a boolean value and it will be set as true through `FavouriteCommand`. Then, the target person will be updated."},{"lineNumber":1593,"author":{"gitId":"-"},"content":""},{"lineNumber":1594,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1595,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1596,"author":{"gitId":"-"},"content":"public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":1597,"author":{"gitId":"-"},"content":""},{"lineNumber":1598,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":1599,"author":{"gitId":"-"},"content":""},{"lineNumber":1600,"author":{"gitId":"-"},"content":" // throw invalid person index"},{"lineNumber":1601,"author":{"gitId":"-"},"content":""},{"lineNumber":1602,"author":{"gitId":"-"},"content":" // update favourite status"},{"lineNumber":1603,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":1604,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),"},{"lineNumber":1605,"author":{"gitId":"-"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),"},{"lineNumber":1606,"author":{"gitId":"-"},"content":" personToFavourite.getAddress(), true,"},{"lineNumber":1607,"author":{"gitId":"-"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),"},{"lineNumber":1608,"author":{"gitId":"-"},"content":" personToFavourite.getTags());"},{"lineNumber":1609,"author":{"gitId":"-"},"content":" // update target person"},{"lineNumber":1610,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":1611,"author":{"gitId":"-"},"content":" model.updatePerson(personToFavourite, editedPerson);"},{"lineNumber":1612,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":1613,"author":{"gitId":"-"},"content":" // throw exception"},{"lineNumber":1614,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1615,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":1616,"author":{"gitId":"-"},"content":""},{"lineNumber":1617,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));"},{"lineNumber":1618,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1619,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1620,"author":{"gitId":"-"},"content":"`FavouriteCommand` takes in an integer as its argument. The command is first being parsed in `AddressBookParser` to be identified as an instance of `FavouriteCommand`."},{"lineNumber":1621,"author":{"gitId":"-"},"content":"Then it is parsed by `FavouriteCommandParser` to parse the index. Invalid indexes will be handled by throwing an exception. This is how `FavouriteCommandParser` is implemented:"},{"lineNumber":1622,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1623,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1624,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":1625,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand"},{"lineNumber":1626,"author":{"gitId":"-"},"content":" * and returns an FavouriteCommand object for execution."},{"lineNumber":1627,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":1628,"author":{"gitId":"-"},"content":" */"},{"lineNumber":1629,"author":{"gitId":"-"},"content":" public FavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":1630,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":1631,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":1632,"author":{"gitId":"-"},"content":" return new FavouriteCommand(index);"},{"lineNumber":1633,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":1634,"author":{"gitId":"-"},"content":" throw new ParseException("},{"lineNumber":1635,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":1636,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1637,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1638,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1639,"author":{"gitId":"-"},"content":""},{"lineNumber":1640,"author":{"gitId":"-"},"content":"The following sequence diagram shows how a `FavouriteCommand` is processed: +"},{"lineNumber":1641,"author":{"gitId":"-"},"content":""},{"lineNumber":1642,"author":{"gitId":"-"},"content":"image::FavouriteSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":1643,"author":{"gitId":"-"},"content":"_Figure 3.19.1 : Favourite Sequence Diagram for Logic_ +"},{"lineNumber":1644,"author":{"gitId":"-"},"content":""},{"lineNumber":1645,"author":{"gitId":"-"},"content":"To indicate that a person has been `favoured`, `PersonCard` is modified to contain a `favouriteLabel` that changes its appearance based on the `favourite` status of the person."},{"lineNumber":1646,"author":{"gitId":"-"},"content":"It will first detect the boolean favourite status of the person. If the person is a favourite contact, a heart will be shown."},{"lineNumber":1647,"author":{"gitId":"-"},"content":"The colours of the border and the background of the label are set to transparent, so that only the background picture, which is a heart, will be shown."},{"lineNumber":1648,"author":{"gitId":"-"},"content":""},{"lineNumber":1649,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":1650,"author":{"gitId":"-"},"content":""},{"lineNumber":1651,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `favourite` +"},{"lineNumber":1652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `favourite`. +"},{"lineNumber":1653,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to modify existing command. +"},{"lineNumber":1654,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Person` class to update the person status. The constructor of `person` has been modified so all the `person` in the address book must change accordingly. +"},{"lineNumber":1655,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `favourite` in `AddCommand` +"},{"lineNumber":1656,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +"},{"lineNumber":1657,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. The `favourite` status will be treated as an optional field when using `AddCommand`. In order to change `favourite` status, `EditCommand` may be modified which is very troublesome. +"},{"lineNumber":1658,"author":{"gitId":"-"},"content":""},{"lineNumber":1659,"author":{"gitId":"-"},"content":"---"},{"lineNumber":1660,"author":{"gitId":"-"},"content":"**Aspect:** Store `Favourite` values +"},{"lineNumber":1661,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Store it as a `Boolean` value +"},{"lineNumber":1662,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to create another class. +"},{"lineNumber":1663,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` and `ModelManager` to update the person status.It is also prone to bugs when developers forget to change the ObjectProperty to `String` in UI classes. +"},{"lineNumber":1664,"author":{"gitId":"-"},"content":""},{"lineNumber":1665,"author":{"gitId":"-"},"content":"**Alternative 2:** Add a new `Favourite` field +"},{"lineNumber":1666,"author":{"gitId":"-"},"content":"**Pros:** Similar way to store other personal information. It also follows the open-close principle and exercises cohesion, where all matters related to `Favourite` field is dealt in its own class. +"},{"lineNumber":1667,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. Adding a new field will cause many changes in UI, Logic, Model and Storage. Some test cases will be rewritten."},{"lineNumber":1668,"author":{"gitId":"-"},"content":"// end::favunfav[]"},{"lineNumber":1669,"author":{"gitId":"-"},"content":""},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging"},{"lineNumber":1671,"author":{"gitId":"-"},"content":""},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations."},{"lineNumber":1673,"author":{"gitId":"-"},"content":""},{"lineNumber":1674,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])"},{"lineNumber":1675,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level"},{"lineNumber":1676,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file."},{"lineNumber":1677,"author":{"gitId":"-"},"content":""},{"lineNumber":1678,"author":{"gitId":"-"},"content":"*Logging Levels*"},{"lineNumber":1679,"author":{"gitId":"-"},"content":""},{"lineNumber":1680,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application"},{"lineNumber":1681,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution"},{"lineNumber":1682,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App"},{"lineNumber":1683,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size"},{"lineNumber":1684,"author":{"gitId":"-"},"content":""},{"lineNumber":1685,"author":{"gitId":"-"},"content":""},{"lineNumber":1686,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration"},{"lineNumber":1687,"author":{"gitId":"-"},"content":""},{"lineNumber":1688,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`)."},{"lineNumber":1689,"author":{"gitId":"-"},"content":""},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation"},{"lineNumber":1691,"author":{"gitId":"-"},"content":""},{"lineNumber":1692,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation."},{"lineNumber":1693,"author":{"gitId":"-"},"content":""},{"lineNumber":1694,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1695,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting."},{"lineNumber":1696,"author":{"gitId":"-"},"content":""},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation"},{"lineNumber":1698,"author":{"gitId":"-"},"content":""},{"lineNumber":1699,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits."},{"lineNumber":1700,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time."},{"lineNumber":1701,"author":{"gitId":"-"},"content":""},{"lineNumber":1702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation"},{"lineNumber":1703,"author":{"gitId":"-"},"content":""},{"lineNumber":1704,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis."},{"lineNumber":1705,"author":{"gitId":"-"},"content":""},{"lineNumber":1706,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format"},{"lineNumber":1707,"author":{"gitId":"-"},"content":""},{"lineNumber":1708,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages."},{"lineNumber":1709,"author":{"gitId":"-"},"content":""},{"lineNumber":1710,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format."},{"lineNumber":1711,"author":{"gitId":"-"},"content":""},{"lineNumber":1712,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format."},{"lineNumber":1713,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`."},{"lineNumber":1714,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu."},{"lineNumber":1715,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below."},{"lineNumber":1716,"author":{"gitId":"-"},"content":""},{"lineNumber":1717,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]"},{"lineNumber":1718,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_"},{"lineNumber":1719,"author":{"gitId":"-"},"content":""},{"lineNumber":1720,"author":{"gitId":"-"},"content":"\u003d\u003d Testing"},{"lineNumber":1721,"author":{"gitId":"-"},"content":""},{"lineNumber":1722,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests"},{"lineNumber":1723,"author":{"gitId":"-"},"content":""},{"lineNumber":1724,"author":{"gitId":"-"},"content":"There are three ways to run tests."},{"lineNumber":1725,"author":{"gitId":"-"},"content":""},{"lineNumber":1726,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":1727,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies."},{"lineNumber":1728,"author":{"gitId":"-"},"content":""},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*"},{"lineNumber":1730,"author":{"gitId":"-"},"content":""},{"lineNumber":1731,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`"},{"lineNumber":1732,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`"},{"lineNumber":1733,"author":{"gitId":"-"},"content":""},{"lineNumber":1734,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*"},{"lineNumber":1735,"author":{"gitId":"-"},"content":""},{"lineNumber":1736,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)"},{"lineNumber":1737,"author":{"gitId":"-"},"content":""},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1739,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle."},{"lineNumber":1740,"author":{"gitId":"-"},"content":""},{"lineNumber":1741,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*"},{"lineNumber":1742,"author":{"gitId":"-"},"content":""},{"lineNumber":1743,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running."},{"lineNumber":1744,"author":{"gitId":"-"},"content":""},{"lineNumber":1745,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)"},{"lineNumber":1746,"author":{"gitId":"-"},"content":""},{"lineNumber":1747,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests"},{"lineNumber":1748,"author":{"gitId":"-"},"content":""},{"lineNumber":1749,"author":{"gitId":"-"},"content":"We have two types of tests:"},{"lineNumber":1750,"author":{"gitId":"-"},"content":""},{"lineNumber":1751,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,"},{"lineNumber":1752,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package."},{"lineNumber":1753,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package."},{"lineNumber":1754,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,"},{"lineNumber":1755,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +"},{"lineNumber":1756,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`"},{"lineNumber":1757,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +"},{"lineNumber":1758,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`"},{"lineNumber":1759,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +"},{"lineNumber":1760,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`"},{"lineNumber":1761,"author":{"gitId":"-"},"content":""},{"lineNumber":1762,"author":{"gitId":"-"},"content":""},{"lineNumber":1763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing"},{"lineNumber":1764,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**"},{"lineNumber":1765,"author":{"gitId":"-"},"content":""},{"lineNumber":1766,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing."},{"lineNumber":1767,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`."},{"lineNumber":1768,"author":{"gitId":"-"},"content":""},{"lineNumber":1769,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops"},{"lineNumber":1770,"author":{"gitId":"-"},"content":""},{"lineNumber":1771,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation"},{"lineNumber":1772,"author":{"gitId":"-"},"content":""},{"lineNumber":1773,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation."},{"lineNumber":1774,"author":{"gitId":"-"},"content":""},{"lineNumber":1775,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration"},{"lineNumber":1776,"author":{"gitId":"-"},"content":""},{"lineNumber":1777,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details."},{"lineNumber":1778,"author":{"gitId":"-"},"content":""},{"lineNumber":1779,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release"},{"lineNumber":1780,"author":{"gitId":"-"},"content":""},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Here are the steps to create a new release."},{"lineNumber":1782,"author":{"gitId":"-"},"content":""},{"lineNumber":1783,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]."},{"lineNumber":1784,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e."},{"lineNumber":1785,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`"},{"lineNumber":1786,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created."},{"lineNumber":1787,"author":{"gitId":"-"},"content":""},{"lineNumber":1788,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies"},{"lineNumber":1789,"author":{"gitId":"-"},"content":""},{"lineNumber":1790,"author":{"gitId":"Esilocke"},"content":"A project often depends on third-party libraries. For example, Address++ depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +"},{"lineNumber":1791,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +"},{"lineNumber":1792,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)"},{"lineNumber":1793,"author":{"gitId":"-"},"content":""},{"lineNumber":1794,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1795,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories"},{"lineNumber":1796,"author":{"gitId":"-"},"content":""},{"lineNumber":1797,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`"},{"lineNumber":1798,"author":{"gitId":"-"},"content":""},{"lineNumber":1799,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]"},{"lineNumber":1800,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1801,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can..."},{"lineNumber":1802,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App"},{"lineNumber":1803,"author":{"gitId":"-"},"content":""},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new person | keep track of my contacts"},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need"},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new task | keep track of my tasks and assignments"},{"lineNumber":1809,"author":{"gitId":"-"},"content":""},{"lineNumber":1810,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need"},{"lineNumber":1811,"author":{"gitId":"-"},"content":""},{"lineNumber":1812,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts"},{"lineNumber":1813,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1814,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added"},{"lineNumber":1815,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1816,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made"},{"lineNumber":1817,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1818,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values"},{"lineNumber":1819,"author":{"gitId":"-"},"content":""},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"|`* * *` |cautious user |be able to lock my address book application whenever I want with a password | prevent people with malicious intent from making changes to my data"},{"lineNumber":1821,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1822,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident"},{"lineNumber":1823,"author":{"gitId":"-"},"content":""},{"lineNumber":1824,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location"},{"lineNumber":1825,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1826,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs"},{"lineNumber":1827,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1828,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity"},{"lineNumber":1829,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1830,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better"},{"lineNumber":1831,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1832,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me"},{"lineNumber":1833,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1834,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts"},{"lineNumber":1835,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1836,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms"},{"lineNumber":1837,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1838,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others"},{"lineNumber":1839,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1840,"author":{"gitId":"Esilocke"},"content":"|`* *` |cautious user |be able to back up my address book data | retrieve my back up data in the event I make breaking changes to my actual address book and there is no way of undoing them"},{"lineNumber":1841,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"|`* *` |user with poor eyesight |be able to increase the font size | use the application without straining my eyes"},{"lineNumber":1843,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"|`* *` |forgetful user |be able to see who is assigned to a task | find my contacts who are in charge more quickly"},{"lineNumber":1845,"author":{"gitId":"-"},"content":""},{"lineNumber":1846,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly"},{"lineNumber":1847,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1848,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like"},{"lineNumber":1849,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1850,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts"},{"lineNumber":1851,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"|`*` |user |be able to mark my favourite contacts |find them more easily"},{"lineNumber":1853,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently"},{"lineNumber":1855,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1856,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features"},{"lineNumber":1857,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1858,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1859,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1860,"author":{"gitId":"-"},"content":""},{"lineNumber":1861,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1862,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases"},{"lineNumber":1863,"author":{"gitId":"-"},"content":""},{"lineNumber":1864,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)"},{"lineNumber":1865,"author":{"gitId":"-"},"content":""},{"lineNumber":1866,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person"},{"lineNumber":1868,"author":{"gitId":"-"},"content":""},{"lineNumber":1869,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1870,"author":{"gitId":"-"},"content":""},{"lineNumber":1871,"author":{"gitId":"-"},"content":"1. User requests to list persons"},{"lineNumber":1872,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1873,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list"},{"lineNumber":1874,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person"},{"lineNumber":1875,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1876,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1877,"author":{"gitId":"-"},"content":""},{"lineNumber":1878,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1879,"author":{"gitId":"-"},"content":""},{"lineNumber":1880,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1881,"author":{"gitId":"-"},"content":"* 2a. The list is empty."},{"lineNumber":1882,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1883,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1884,"author":{"gitId":"-"},"content":""},{"lineNumber":1885,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid."},{"lineNumber":1886,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1887,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1888,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1889,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1890,"author":{"gitId":"-"},"content":"Use case resumes at step 2."},{"lineNumber":1891,"author":{"gitId":"-"},"content":""},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person"},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria"},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria"},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found."},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found."},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person"},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons"},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons"},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list"},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person."},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person."},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid."},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message."},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid."},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message."},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2."},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail."},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made."},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1956,"author":{"gitId":"-"},"content":""},{"lineNumber":1957,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1958,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps"},{"lineNumber":1959,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1960,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1961,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1962,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps"},{"lineNumber":1963,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo"},{"lineNumber":1964,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message"},{"lineNumber":1965,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone."},{"lineNumber":1966,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1967,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1968,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1969,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1970,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1971,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1972,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands."},{"lineNumber":1973,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1974,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1975,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands."},{"lineNumber":1976,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1977,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3."},{"lineNumber":1978,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1979,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1980,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands."},{"lineNumber":1981,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1982,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":1983,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands."},{"lineNumber":1984,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1985,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3"},{"lineNumber":1986,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1987,"author":{"gitId":"Esilocke"},"content":"[discrete]"},{"lineNumber":1988,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort"},{"lineNumber":1989,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1990,"author":{"gitId":"Esilocke"},"content":"*MSS*"},{"lineNumber":1991,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1992,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria"},{"lineNumber":1993,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria"},{"lineNumber":1994,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message."},{"lineNumber":1995,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":1996,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":1997,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1998,"author":{"gitId":"Esilocke"},"content":"*Extensions*"},{"lineNumber":1999,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":2000,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":2001,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty."},{"lineNumber":2002,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":2003,"author":{"gitId":"Esilocke"},"content":"Use case ends."},{"lineNumber":2004,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":2005,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid."},{"lineNumber":2006,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":2007,"author":{"gitId":"Esilocke"},"content":"[none]"},{"lineNumber":2008,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message."},{"lineNumber":2009,"author":{"gitId":"Esilocke"},"content":"+"},{"lineNumber":2010,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1."},{"lineNumber":2011,"author":{"gitId":"-"},"content":""},{"lineNumber":2012,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":2013,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements"},{"lineNumber":2014,"author":{"gitId":"-"},"content":""},{"lineNumber":2015,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed."},{"lineNumber":2016,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage."},{"lineNumber":2017,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse."},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure."},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse."},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0."},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing."},{"lineNumber":2022,"author":{"gitId":"-"},"content":""},{"lineNumber":2023,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":2024,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary"},{"lineNumber":2025,"author":{"gitId":"-"},"content":""},{"lineNumber":2026,"author":{"gitId":"-"},"content":"[[mainstream-os]]"},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Mainstream OS"},{"lineNumber":2028,"author":{"gitId":"-"},"content":""},{"lineNumber":2029,"author":{"gitId":"-"},"content":"...."},{"lineNumber":2030,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X"},{"lineNumber":2031,"author":{"gitId":"-"},"content":"...."},{"lineNumber":2032,"author":{"gitId":"-"},"content":""},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]"},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible"},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"...."},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data."},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"...."},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2040,"author":{"gitId":"-"},"content":"[appendix]"}],"authorContributionMap":{"charlesgoh":240,"jeffreygohkw":601,"Esilocke":296,"-":903}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:"},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//tag::introduction[]"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"//end::introduction[]"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer."},{"lineNumber":30,"author":{"gitId":"-"},"content":"+"},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8."},{"lineNumber":34,"author":{"gitId":"-"},"content":"+"},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here]."},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++."},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds."},{"lineNumber":38,"author":{"gitId":"-"},"content":"+"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]"},{"lineNumber":40,"author":{"gitId":"-"},"content":"+"},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +"},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window."},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window"},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++."},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list"},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command."},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`."},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`."},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc."},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable."},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too big? Address++ allows you to change your font sizes at will. Here are three"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"ways of changing the font sizes:"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"**Option 1: Menu Font Size Buttons and Keyboard Shortcuts**"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"**Option 3: Handtype command into CLI**:"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeCLI.png[width\u003d\"540\"]"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"* Increase Size Command: `fontsize increase`"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"* Decrease Size Command: `fs decrease`"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"* Reset Size Command: `fontsize reset`"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"* `fontsize` can be replaced with `fs` for faster input. +"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]"},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"If you have trouble figuring out how to do something, or would like to find out about more features, you can click"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"on the **help** menu button. You can also enter the command `help` to access the help window."},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"image::HelpButtonUI.png[width\u003d\"540\"]"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":"Format: `help` +"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1]."},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"// tag::addprivacy[]"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"// tag::avatar[]"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Adding a person: `add`"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book."},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input."},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address`, `Remark` and `Avatar`, to be private by placing a `p` in front of the prefix. +"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"* As of version v1.5, the avatar fields accepts all URLs, and filenames with the prefix \"file:\""},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"You made a new friend John Doe, and want to save him into Address++. You could type the following command to add his details:"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"v/https://helloworld.world/image.png`"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"You meet Ima Hidearu, another one of your group members, but you do not know anything about him other than his name."},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" Nevertheless, you are still able to add him into Address++:"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/Ima Hidearu r/secretive`"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 3** +"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"Sometimes, you may wish to keep some fields private (i.e. not reveal them in the application). You can use the private"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"option while typing in your command:"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate pr/A true hero` +"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"**Note:** you do not have to set all fields as private, and you can choose which specific fields you want to set as private."},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"//end::addprivacy[]"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"//tag::addtask[]"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a task: `add task/` (Since V1.2)"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"You can use the `add task/` command to add new tasks to your address book. This allows you to keep track of your"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"assignments and project objectives."},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Format: `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input."},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 0 to 5 inclusive, with 5 being the highest priority +"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"* Adding a task with a priority of 0 is the same as not adding a priority. Only priority level above 1 will be displayed in the User Interface +"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default."},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"**Examples**:"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"You are assigned the task of writing a 1500-word essay that is due in 3 weeks. You decide to add this"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"task into Address++."},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Essay d/Write a 1500-word essay on philosophical thinking t/3 weeks later p/4`"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"You are required to submit at least one forum post to the school forums each week. To remind yourself of this task,"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"you add it into Address++."},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Weekly forum post p/1`"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"// end::addtask[]"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":"// tag::addtag[]"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a tag to persons : `add tag/` (Since V1.2)"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"You can use the `add tag/` command to add tag for multiple persons in the address book. For example, you may wish to add the tag `friends` to the first two persons in the address book. +"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"`add tag/` can be replaced by `a tag/` for faster input. +"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"Format: `add tag/ INDEX... t/[TAG]` +"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":"****"},{"lineNumber":193,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":"* You can add the tag of the person at the specific `INDEX`. +"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":"* The index refers to the index number shown in the most recent listing. +"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ... +"},{"lineNumber":198,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, `add tag/` will add the tag to all contacts in the address book."},{"lineNumber":199,"author":{"gitId":"-"},"content":"****"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**"},{"lineNumber":202,"author":{"gitId":"-"},"content":"****"},{"lineNumber":203,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add tag `friends` to the 1st and 2nd persons in the address book. You can use `list` to show all the contacts in the address book first,"},{"lineNumber":205,"author":{"gitId":"-"},"content":"then use the `addtag` command to achieve it."},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":208,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ 1 2 t/friends` +"},{"lineNumber":209,"author":{"gitId":"-"},"content":"****"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":"****"},{"lineNumber":212,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add a common tag to all the persons in the address book. You can type in the following command:"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ t/acquaintance` +"},{"lineNumber":217,"author":{"gitId":"-"},"content":"****"},{"lineNumber":218,"author":{"gitId":"-"},"content":"image::AddTagCommand.png[width\u003d\"790\"]"},{"lineNumber":219,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : AddTagCommand_"},{"lineNumber":220,"author":{"gitId":"-"},"content":"// end::addtag[]"},{"lineNumber":221,"author":{"gitId":"-"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Listing all persons : `list`"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts and tasks in the address book. +"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"`list` can be replaced by `l` for faster input. +"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"Format: `list` +"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"// tag::editprivacy[]"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit`"},{"lineNumber":232,"author":{"gitId":"-"},"content":""},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +"},{"lineNumber":238,"author":{"gitId":"-"},"content":""},{"lineNumber":239,"author":{"gitId":"-"},"content":"****"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command."},{"lineNumber":242,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values."},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands."},{"lineNumber":244,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it."},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command."},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message."},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields."},{"lineNumber":248,"author":{"gitId":"-"},"content":"****"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"**Examples**:"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":"Your friend John Doe has changed his email. You decide to update his entry in Address++ to reflect this change."},{"lineNumber":254,"author":{"gitId":"-"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 1 p/91234567 e/johndoe@example.com`"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"Your friend Betsy is no longer taking part in the same project as you, and has changed her phone number to a new one"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":"that you are not aware of. You decide to update her entry in Address++ accordingly."},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 2 p/ t/`"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"// end::editprivacy[]"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"// tag::edittask[]"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit task/` (Since V1.2)"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"You can use the `edit task/` command to quickly fix mistakes in your entries, or add/remove details in your tasks. You may wish to edit your tasks when their requirements change, for example. +"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":"Format: `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided."},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values."},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"You had previously added a task reminding you to write a 1500-word essay. However you receive notification that the word requirement"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"is now 1800 words instead. You edit the task to reflect this change."},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 2 d/1800 words essay`"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"One of your assignments has been pushed back and is no longer as urgent as before. You edit the task to reflect this change."},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 4 deadline/2 months later p/2`"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"// end::edittask[]"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"// tag::edittag[]"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edit tag/` (Since v1.2)"},{"lineNumber":296,"author":{"gitId":"-"},"content":""},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"You can use `edit tag/` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"`edit tag/` can be replaced by `et` for faster input. +"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Format: `edit tag/ OLDTAGNAME NEWTAGNAME` +"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different."},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `OLDTAGNAME` value."},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**:"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"You have finished a project, and have become good friends with your project mates."},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"You decide to promote all your project mates into friends."},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit tag/ project friends`"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"// end::edittag[]"},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"// tag::changeprivacy[]"},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":"`changeprivacy` can be replaced by `cp` for faster input. +"},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":325,"author":{"gitId":"charlesgoh"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR]`"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields."},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix."},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI."},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI."},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy."},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting."},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":"You are meeting some new groupmates for your upcoming project and you are not too comfortable with exposing your family\u0027s particulars. +"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":"You decide to hide your family\u0027s phone number, email and home address by setting them to private. +"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `changeprivacy 1 p/true e/true a/true`"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":"// end::changeprivacy[]"},{"lineNumber":345,"author":{"gitId":"-"},"content":""},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacylevel[]"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy Level of the address book : `privacylevel`(Since V1.5)"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":"Changing a person\u0027s privacy just to reveal their data or to make a person fully confidential may be time-consuming. If you would like to view all the data hidden by private fields easily, or completely hide a person with private fields, you can use this command to change the Privacy Level of the address book. +"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":"At level 1, all data, regardless of whether they are set to be private or public, can be viewed. +"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":"At level 2, private fields will have their data hidden by a string, such as `\u003cPrivate Phone\u003e`. +"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":"At level 3, any person containing at least one private field will be completely hidden in the address book. +"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"`privacylevel` can be replaced by `pl` for faster input. +"},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"Format: `privacylevel LEVEL`"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"* Address++ always launches in privacy level 2."},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":"* The `LEVEL` that you input can only contain the values 1, 2, or 3."},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":"* This does not change the actual privacy setting of each field, thus, changing the privacy level to 1 does not make any of the private fields public."},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":"** Thus, even if you have set the address book to be privacy level 1, you cannot edit a field that is set as private without setting it back to public."},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":"** Similarly, since a person is completely hidden in privacy level 3, you will have to set the privacy level back to 2 or 1 to be able to modify that person."},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":"You have an address book full of various contacts with private fields, however, now you need to access the email addresses of all your contacts to ask them for help in your upcoming survey. +"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"You decide to use the privacylevel command to reveal all you contacts\u0027 hidden data."},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 1`"},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2** +"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"You wish to completely hide some of your confidential contacts from view, but your address book is too large, and you do not want to have to individually set every field for every confidential person to be private. +"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":"Using the privacylevel command, you set each contact with any private field to be hidden in the address book. +"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 3`"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacylevel[]"},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":381,"author":{"gitId":"-"},"content":"// tag::favourite[]"},{"lineNumber":382,"author":{"gitId":"-"},"content":""},{"lineNumber":383,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)"},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite contacts. For example, you may wish to set your girlfriend as your favourite contact. You will see a heart png next to your girlfriend\u0027s name"},{"lineNumber":386,"author":{"gitId":"-"},"content":"once you successfully set her as your favourite contact. +"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":388,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +"},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":390,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +"},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"-"},"content":"****"},{"lineNumber":393,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":394,"author":{"gitId":"-"},"content":""},{"lineNumber":395,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`."},{"lineNumber":396,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":397,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"* You will see a heart shape next to your favourite persons."},{"lineNumber":399,"author":{"gitId":"-"},"content":"****"},{"lineNumber":400,"author":{"gitId":"-"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +"},{"lineNumber":402,"author":{"gitId":"-"},"content":"****"},{"lineNumber":403,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":404,"author":{"gitId":"-"},"content":"Suppose you want to set the 2nd person in the address book to be your favourite contact. You should `list` all the persons first, then use `favourite` command to achieve it."},{"lineNumber":405,"author":{"gitId":"-"},"content":""},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 2` +"},{"lineNumber":408,"author":{"gitId":"-"},"content":"****"},{"lineNumber":409,"author":{"gitId":"-"},"content":""},{"lineNumber":410,"author":{"gitId":"-"},"content":"****"},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":412,"author":{"gitId":"-"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to set `Betsy Brandt` as your favourite contact."},{"lineNumber":413,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `favourite` her."},{"lineNumber":414,"author":{"gitId":"-"},"content":""},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Betsy` +"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 1` +"},{"lineNumber":417,"author":{"gitId":"-"},"content":"****"},{"lineNumber":418,"author":{"gitId":"-"},"content":"image::FavouriteCommandBeforeAndAfter.png[width\u003d\"790\"]"},{"lineNumber":419,"author":{"gitId":"-"},"content":"_Figure 3.12.1 : FavouriteCommand_"},{"lineNumber":420,"author":{"gitId":"-"},"content":"// end::favourite[]"},{"lineNumber":421,"author":{"gitId":"-"},"content":""},{"lineNumber":422,"author":{"gitId":"-"},"content":"// tag::showfavourite[]"},{"lineNumber":423,"author":{"gitId":"-"},"content":""},{"lineNumber":424,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)"},{"lineNumber":425,"author":{"gitId":"-"},"content":""},{"lineNumber":426,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":430,"author":{"gitId":"-"},"content":"Format: `showfavourite` +"},{"lineNumber":431,"author":{"gitId":"-"},"content":""},{"lineNumber":432,"author":{"gitId":"-"},"content":"****"},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":434,"author":{"gitId":"-"},"content":""},{"lineNumber":435,"author":{"gitId":"-"},"content":"* `showfavourite` command: It will return an empty list if there is no favourite persons."},{"lineNumber":436,"author":{"gitId":"-"},"content":"****"},{"lineNumber":437,"author":{"gitId":"-"},"content":"image::ShowFavouriteCommand.png[width\u003d\"250\"]"},{"lineNumber":438,"author":{"gitId":"-"},"content":"_Figure 3.13.1 : ShowFavouriteCommand_"},{"lineNumber":439,"author":{"gitId":"-"},"content":"// end::showfavourite[]"},{"lineNumber":440,"author":{"gitId":"-"},"content":""},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`"},{"lineNumber":442,"author":{"gitId":"-"},"content":""},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"*Things To Note*"},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`"},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Only the names will be searched"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`"},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"You would like to find all the people whose name contains the word \"David\". You first use `list` to show all your contacts,"},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the contacts named \"David\"."},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David` +"},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":468,"author":{"gitId":"-"},"content":"****"},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find people whose name contain the word \"David\" or \"Joe\"."},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David Joe` +"},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"// tag::findtask[]"},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Finding a task : `find task/` (Since V1.3)"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"You can use the `find task/` command to quickly find tasks that match your criteria, as well as tasks that have a certain level of urgency. +"},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"Furthermore, you can choose to only retrieve tasks that are either complete, or still in progress. +"},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +"},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Format: `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Things To Note*"},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":488,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`"},{"lineNumber":489,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`"},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"* Both the name and the description will be searched"},{"lineNumber":491,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`"},{"lineNumber":492,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"* *You must include at least 1 search keyword*, in order to filter the results by their priority, and whether or not it is completed."},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"* The `PRIORITY` must be an integer from 1 to 5, inclusive. If the priority search is included, all tasks that have a priority at least that of the specified priority will matced."},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"* `STATE` must be either `true` or `false`. If it is `true`, you will only see tasks that have been marked as complete, and if it is `false, you will only see tasks that are not complete, in addition to all other search criteria."},{"lineNumber":496,"author":{"gitId":"-"},"content":"****"},{"lineNumber":497,"author":{"gitId":"-"},"content":""},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"You would like to find all the tasks related to \"Report\". You first use `list` to show all your tasks,"},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the tasks related to \"Report\"."},{"lineNumber":503,"author":{"gitId":"-"},"content":""},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report` +"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find tasks that have a \"High\" or \"Highest\" priority."},{"lineNumber":511,"author":{"gitId":"-"},"content":""},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4` +"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Furthermore, as you have several tasks related to \"Report\" that are already complete, you only want to see the tasks that are still not done."},{"lineNumber":519,"author":{"gitId":"-"},"content":""},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4 done/false` +"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"// end::findtask[]"},{"lineNumber":524,"author":{"gitId":"-"},"content":""},{"lineNumber":525,"author":{"gitId":"-"},"content":"// tag::showtag[]"},{"lineNumber":526,"author":{"gitId":"-"},"content":""},{"lineNumber":527,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all tags : `showtag` (Since V1.5)"},{"lineNumber":528,"author":{"gitId":"-"},"content":""},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"You can use the `showtag` command to quickly show all tags in the address book. Sometimes you may forget `tags` that you have added a few weeks ago. You may use this command to help you. +"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":531,"author":{"gitId":"-"},"content":"`showtag` can be replaced by `stag` for faster input. +"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":533,"author":{"gitId":"-"},"content":"Format: `showtag` +"},{"lineNumber":534,"author":{"gitId":"-"},"content":""},{"lineNumber":535,"author":{"gitId":"-"},"content":"****"},{"lineNumber":536,"author":{"gitId":"-"},"content":"**Things To Note**"},{"lineNumber":537,"author":{"gitId":"-"},"content":""},{"lineNumber":538,"author":{"gitId":"-"},"content":"* `showtag` command: It will return an empty list if there is no tags in the address book."},{"lineNumber":539,"author":{"gitId":"-"},"content":"* You may want to use `showtag` command to help you recall all the `tags` in the address book before you try to use `findtag` to find persons."},{"lineNumber":540,"author":{"gitId":"-"},"content":"****"},{"lineNumber":541,"author":{"gitId":"-"},"content":"// end::showtag[]"},{"lineNumber":542,"author":{"gitId":"-"},"content":""},{"lineNumber":543,"author":{"gitId":"-"},"content":"// tag::findtag[]"},{"lineNumber":544,"author":{"gitId":"-"},"content":""},{"lineNumber":545,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `find tag/` (Since V1.4)"},{"lineNumber":546,"author":{"gitId":"-"},"content":""},{"lineNumber":547,"author":{"gitId":"-"},"content":"You can use the `find tag/` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +"},{"lineNumber":548,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/` in front of the `friends`. +"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":550,"author":{"gitId":"-"},"content":"`find tag/` can be replaced by `f tag/` for faster input. +"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":552,"author":{"gitId":"-"},"content":"Format: `find tag/ KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":553,"author":{"gitId":"-"},"content":""},{"lineNumber":554,"author":{"gitId":"-"},"content":"****"},{"lineNumber":555,"author":{"gitId":"-"},"content":"**Things To Note** +"},{"lineNumber":556,"author":{"gitId":"-"},"content":""},{"lineNumber":557,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`"},{"lineNumber":558,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`"},{"lineNumber":559,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons."},{"lineNumber":560,"author":{"gitId":"-"},"content":"* Only full words will be matched. e.g. `friend` will not match `friends`"},{"lineNumber":561,"author":{"gitId":"-"},"content":"* There is no space between `/` and tag name. e.g. `/ friends` will not match `/friends`."},{"lineNumber":562,"author":{"gitId":"-"},"content":"****"},{"lineNumber":563,"author":{"gitId":"-"},"content":""},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":565,"author":{"gitId":"-"},"content":"****"},{"lineNumber":566,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":567,"author":{"gitId":"-"},"content":"Suppose you want to find contatcs with tag `friends` or `colleagues`, you can just key in the following command."},{"lineNumber":568,"author":{"gitId":"-"},"content":""},{"lineNumber":569,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends colleagues`"},{"lineNumber":570,"author":{"gitId":"-"},"content":"****"},{"lineNumber":571,"author":{"gitId":"-"},"content":""},{"lineNumber":572,"author":{"gitId":"-"},"content":"****"},{"lineNumber":573,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":574,"author":{"gitId":"-"},"content":"Suppose you want to find contacts without tag `frineds`, you can key in the following command."},{"lineNumber":575,"author":{"gitId":"-"},"content":""},{"lineNumber":576,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ /friends`"},{"lineNumber":577,"author":{"gitId":"-"},"content":"****"},{"lineNumber":578,"author":{"gitId":"-"},"content":""},{"lineNumber":579,"author":{"gitId":"-"},"content":"****"},{"lineNumber":580,"author":{"gitId":"-"},"content":"**Example Scenario 3:** +"},{"lineNumber":581,"author":{"gitId":"-"},"content":"Suppose you want to find contacts with tag `friends` but without `colleagues`, you can key in the following command."},{"lineNumber":582,"author":{"gitId":"-"},"content":""},{"lineNumber":583,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends /colleagues`"},{"lineNumber":584,"author":{"gitId":"-"},"content":"****"},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::FindTagCommand.png[width\u003d\"790\"]"},{"lineNumber":586,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : FindTagCommand_"},{"lineNumber":587,"author":{"gitId":"-"},"content":"// end::findtag[]"},{"lineNumber":588,"author":{"gitId":"-"},"content":""},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`"},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts from the address book. The `delete` command will help you clean up contacts who you may not wish to associate with anymore. +"},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +"},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +"},{"lineNumber":596,"author":{"gitId":"-"},"content":""},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":599,"author":{"gitId":"-"},"content":""},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"* Deletes the person at the specified `INDEX`."},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first person from your contacts."},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1`"},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":"You wish to delete \"Maribel Edelweiss\" from your contacts. However you have many contacts, and are not sure where Maribel is."},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"You thus use `find` to find contacts who are named \"Maribel\", then delete Maribel Edelweiss accordingly."},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Maribel` +"},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 3`"},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"// tag::deletetask[]"},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a task : `delete task/` (Since V1.2)"},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"You can use the `delete task/` command to remove tasks from the address book. The `delete task/` command will help you clean up obsolete or completed tasks. +"},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"`delete task/` can be replaced by `d task/` for faster input. +"},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Format: `delete task/ INDEX` +"},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"* Deletes the task at the specified `INDEX`."},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent task listing."},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first task."},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 1`"},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":645,"author":{"gitId":"-"},"content":""},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"You wish to delete a task named \"1500-word Essay\". However you have many tasks, and are not sure where it is."},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"You thus use `find task/` to find tasks related to \"Essays\", before using `delete task/` to delete \"1500-word Essay\" accordingly."},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ Essay` +"},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 3`"},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"// end::deletetask[]"},{"lineNumber":655,"author":{"gitId":"-"},"content":"// tag::deletetag[]"},{"lineNumber":656,"author":{"gitId":"-"},"content":""},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `delete tag/` (Since V1.2)"},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"You can use `delete tag/` to delete the tag of multiple persons from the address book. +"},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":661,"author":{"gitId":"-"},"content":"`delete tag/` can be replaced by `d tag/` for faster input. +"},{"lineNumber":662,"author":{"gitId":"-"},"content":""},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Format: `delete tag/ INDEX... t/[TAG]` +"},{"lineNumber":664,"author":{"gitId":"-"},"content":""},{"lineNumber":665,"author":{"gitId":"-"},"content":""},{"lineNumber":666,"author":{"gitId":"-"},"content":"****"},{"lineNumber":667,"author":{"gitId":"-"},"content":"**Things To Note** +"},{"lineNumber":668,"author":{"gitId":"-"},"content":""},{"lineNumber":669,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`."},{"lineNumber":670,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":671,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"* If you do not key in any index, delete tag/ will delete the tag from all contacts in the address book."},{"lineNumber":673,"author":{"gitId":"-"},"content":"****"},{"lineNumber":674,"author":{"gitId":"-"},"content":""},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":676,"author":{"gitId":"-"},"content":"****"},{"lineNumber":677,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":678,"author":{"gitId":"-"},"content":"Suppose you want to delete `classmates` tag for the first two persons in the address book, you can `list` all the persons first, then"},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"use the `delete tag/` command to achieve."},{"lineNumber":680,"author":{"gitId":"-"},"content":""},{"lineNumber":681,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +"},{"lineNumber":682,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ 1 2 t/friends` +"},{"lineNumber":683,"author":{"gitId":"-"},"content":"****"},{"lineNumber":684,"author":{"gitId":"-"},"content":""},{"lineNumber":685,"author":{"gitId":"-"},"content":"****"},{"lineNumber":686,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":687,"author":{"gitId":"-"},"content":"Suppose you want to delete `friends` tag from all contacts in the address book."},{"lineNumber":688,"author":{"gitId":"-"},"content":""},{"lineNumber":689,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +"},{"lineNumber":690,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ t/friends` +"},{"lineNumber":691,"author":{"gitId":"-"},"content":"****"},{"lineNumber":692,"author":{"gitId":"-"},"content":"image::DeleTagCommand.png[width\u003d\"790\"]"},{"lineNumber":693,"author":{"gitId":"-"},"content":"_Figure 3.20.1 : DeleteTagCommand_"},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::deletetag[]"},{"lineNumber":695,"author":{"gitId":"-"},"content":""},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]"},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Sorting your contact list and tasks : `sort` (Since V1.1)"},{"lineNumber":698,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts or tasks by using the `sort` command +"},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"`sort` can be replaced with `so` for faster input. +"},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"Format: `sort LIST FIELD ORDER` +"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":705,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contacts by any field in either ascending or descending order"},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your tasks by deadline or by priority in ascending or descending order"},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for person contacts: NAME, PHONE, EMAIL, ADDRESS, REMARK, AVATAR."},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for tasks: DEADLINE, PRIORITY."},{"lineNumber":710,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC."},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts"},{"lineNumber":712,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":713,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":"You have many contacts on Address++. You decide to make it neater by sorting your contacts"},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":"by name in ascending order:"},{"lineNumber":719,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort person name asc`"},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":"You add a few tasks of different priorities. You decide to sort the tasks so you can see"},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":"the higher priority tasks on the top of the list:"},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort task priority desc`"},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":"//end::sort[]"},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":"//tag::backup[]"},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Backing up your data : `backup` (Since V1.2)"},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +"},{"lineNumber":735,"author":{"gitId":"-"},"content":""},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [FILENAME]` +"},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"`backup` can be replaced with `bk` for faster input. +"},{"lineNumber":738,"author":{"gitId":"-"},"content":""},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":"This allows you to backup your saved data on Address++ in another file."},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario**: +"},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":"You decide to backup your data just in case you accidentally make changes that"},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":"cannot be undone. You type the following code:"},{"lineNumber":746,"author":{"gitId":"-"},"content":""},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":"`backup filename.xml`"},{"lineNumber":748,"author":{"gitId":"-"},"content":""},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":"The file will then be saved in the same directory location as your `JAR` application file"},{"lineNumber":750,"author":{"gitId":"-"},"content":"****"},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"//end::backup[]"},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":"//tag::password[]"},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Protecting your data : `lock` `unlock` (Since V1.5)"},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":"Worried about security? Address++ allows your to protect your data with a password."},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":"Using the `lock` and `unlock` commands, you can toggle between security modes. +"},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":"Locked address books only allow viewing of data. If anyone attempts to tamper with"},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"your data, they will be greeted with this error:"},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"image::LockedRestriction.png[width\u003d\"800\"]"},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":"Format for `lock` Command: `lock pw/[PASSWORD]` +"},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":"`lock` can be replaced with `lk` for faster input. +"},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":"Format for `unlock` Command: `unlock pw/[PASSWORD]` +"},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":"`unlock` can be replaced with `ul` for faster input. +"},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"The default password is `password`"},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":773,"author":{"gitId":"-"},"content":"****"},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":"You have just finished editing your contacts on Address++ and you decide to have a break away from"},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"your computer. You decide to lock Address++ using the following command:"},{"lineNumber":777,"author":{"gitId":"-"},"content":""},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `lock pw/password`"},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +"},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":"When you return to your computer, you decide to continue adding contacts in Address++."},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"To unlock the Address++ application, you use the following command:"},{"lineNumber":784,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `unlock pw/password`"},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":787,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing your password : `changepassword` (Since V1.5)"},{"lineNumber":789,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":790,"author":{"gitId":"charlesgoh"},"content":"Want to choose a better password? The `changepassword` command allows you to change your"},{"lineNumber":791,"author":{"gitId":"charlesgoh"},"content":"password whenever you want, provided you know the old password."},{"lineNumber":792,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":793,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":794,"author":{"gitId":"charlesgoh"},"content":"The default password is \u0027password\u0027"},{"lineNumber":795,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":796,"author":{"gitId":"charlesgoh"},"content":"image::ChangePasswordImages.png[width\u003d\"800\"]"},{"lineNumber":797,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":798,"author":{"gitId":"charlesgoh"},"content":"Format: `changepassword pw/[PASSWORD] np/[NEWPASSWORD] cfp/[CONFIRMPASSWORD]` +"},{"lineNumber":799,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":800,"author":{"gitId":"charlesgoh"},"content":"**`changepassword` can be replaced with `cpw` for faster input.** +"},{"lineNumber":801,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":802,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:"},{"lineNumber":803,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":804,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +"},{"lineNumber":805,"author":{"gitId":"charlesgoh"},"content":"You open Address++ for the first time. After reading the user guide, you realize"},{"lineNumber":806,"author":{"gitId":"charlesgoh"},"content":"that the default password (\"password\") is not good enough. You decide to make a new"},{"lineNumber":807,"author":{"gitId":"charlesgoh"},"content":"one with the following command:"},{"lineNumber":808,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":809,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `changepassword pw/password np/newpassword cfp/newpassword`"},{"lineNumber":810,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":811,"author":{"gitId":"charlesgoh"},"content":"//end::password[]"},{"lineNumber":812,"author":{"gitId":"-"},"content":""},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`"},{"lineNumber":814,"author":{"gitId":"-"},"content":""},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact, and look at it in greater detail. +"},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +"},{"lineNumber":818,"author":{"gitId":"-"},"content":""},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":"Format: `select INDEX` +"},{"lineNumber":820,"author":{"gitId":"-"},"content":""},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"The first person in your contacts has a very long address, and you want to see if it is correct."},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select 1` +"},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"// tag::selecttask[]"},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a task : `select task/` (Since V1.4)"},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":"You can use `select task/` to pick out a task, and look at it in greater detail. +"},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +"},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"Format: `select task/ INDEX` +"},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"The first task has a very long description, and you want to see it in full."},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +"},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select task/ 1` +"},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"// end::selecttask[]"},{"lineNumber":863,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]"},{"lineNumber":864,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)"},{"lineNumber":865,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":866,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +"},{"lineNumber":867,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +"},{"lineNumber":869,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +"},{"lineNumber":871,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":872,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +"},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +"},{"lineNumber":875,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where the second person in your address book lives. +"},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `list` +"},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 2` +"},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +"},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where a specific person in your address book, Betsy, lives. +"},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Betsy` +"},{"lineNumber":882,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 1` +"},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":886,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +"},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses."},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps."},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"* A person with no address will open Google Maps, but it will not search for an address as there is no address to search for."},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing."},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]"},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]"},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another : `navigate` (Since V1.5)"},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"Although `locate` shows you where a person\u0027s address is, it does not tell you how to get there. The `navigate` command will provide directions, with the help of Google Maps, on how to get from one address to another. +"},{"lineNumber":899,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"`navigate` can be replaced by `nav` for faster input. +"},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +"},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +"},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +"},{"lineNumber":908,"author":{"gitId":"Esilocke"},"content":"You are planning to go to your friend Roy\u0027s house for their birthday party that afternoon, but you have just ended class at NUS. +"},{"lineNumber":909,"author":{"gitId":"Esilocke"},"content":"You have never been to their house before, and you enlist the aid of Address++ to find the fastest route to their house. +"},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Roy` +"},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fa/NUS tp/1`"},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +"},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":"After the birthday party, you have a group meeting scheduled for your project. You have this meeting schedules as your first task, and you seek help from Address++ to find a path from Roy\u0027s house to the group meeting. +"},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fp/1 tt/1`"},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 3:** +"},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"To conclude your long and busy day, you have to send off your sister at Changi Airport, who is going off on an exchange programme. +"},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"Using the navigate command once again, you find an efficient route from the location of your group meeting to the airport. +"},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate ft/1 ta/Changi Airport`"},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +"},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses."},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address or a person with no address cannot be navigated from or navigated to."},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"* A task with no address cannot be navigated from or navigated to."},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing."},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":"* You may only input exactly one of the 3 prefixes from `fp/` `ft/` and `fa/` to indicate the address to navigate from, and exactly one of the 3 prefixes from `tp/` `tt/` and `ta/` to indicate the address to navigate to."},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":"** If you input any less or any more than 1 of the 3 prefixes from each group, the command will fail."},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":"** There is no need to match the type of prefixes. You can navigate with any combination of prefixes as long as there is only one prefix to indicate the address to navigate from and only one prefix to indicate the address to navigate to."},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]"},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"// tag::setstate[]"},{"lineNumber":937,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as complete : `setcomplete` (Since V1.5)"},{"lineNumber":938,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +"},{"lineNumber":940,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":941,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +"},{"lineNumber":942,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":943,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +"},{"lineNumber":944,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed."},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"You have finally completed a task that involves writing a 1500-word essay."},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e\u003e `setcomplete 6` +"},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as incomplete : `setincomplete` (Since V1.5)"},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +"},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +"},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":967,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +"},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete."},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"You realised that you had marked a task as complete, even though it is still in progress."},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"Furthermore you are not sure when you had marked it as complete. However, you are still able to safely mark the task as being"},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":"in progress."},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `setincomplete 7`"},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"// end::setstate[]"},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]"},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assigning contacts to task : `assign` (Since V1.4)"},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +"},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +"},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +"},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"You have created a new task to complete a paper model. However you are unable to do it by yourself, and require the help of some of your friends."},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `assign 1 5 7 to/5`"},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismissing contacts from task : `dismiss` (Since V1.4)"},{"lineNumber":1016,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1017,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +"},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +"},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +"},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing."},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing."},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command."},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ..."},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"One of the tasks that you had created previously with many people assigned turned out to be easier than expected."},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"You believe that this task could do with less manpower and would like to remove some of the previously assigned contacts from this task."},{"lineNumber":1038,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `dismiss 1 5 7 from/5`"},{"lineNumber":1040,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1041,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Viewing contacts assigned to a task : `viewassign` (Since V1.5)"},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"You can use `viewassign` to see who is assigned to a particular task. You may wish to use `viewassign` when you want to contact only the people who are assigned to a particular task, for example. +"},{"lineNumber":1045,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"`viewassign` can be replaced by `va` for faster input. +"},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1048,"author":{"gitId":"Esilocke"},"content":"Format: `viewassign INDEX` +"},{"lineNumber":1049,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1050,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`"},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"2 weeks after assigning some of your contacts to a particular task, you decide to obtain a status report about their current progress. +"},{"lineNumber":1062,"author":{"gitId":"Esilocke"},"content":"However you have forgotten who you have assigned to that task. You thus use `viewassign` to see who is assigned to that task."},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `viewassign 4`"},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1066,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]"},{"lineNumber":1067,"author":{"gitId":"-"},"content":""},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]"},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing the Address Book\u0027s theme : `theme` (Since V1.5)"},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1071,"author":{"gitId":"jeffreygohkw"},"content":"Perhaps you may not be too fond of the existing style of the address book and you want to have something fresh. The `theme` command changes the address book between two themes, `light` and `dark`."},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]"},{"lineNumber":1073,"author":{"gitId":"jeffreygohkw"},"content":"`theme` can be replaced by `th` for faster input. +"},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1075,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +"},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1077,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +"},{"lineNumber":1078,"author":{"gitId":"jeffreygohkw"},"content":"It is late at night and the light theme is a little too brightly coloured. Preferring a darker theme, you can choose to input the theme command to make the theme into a darker colour. +"},{"lineNumber":1079,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `theme dark`"},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1081,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"Format: `theme` + THEME"},{"lineNumber":1083,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1085,"author":{"gitId":"jeffreygohkw"},"content":"* There are only two themes as of v1.5, light and dark. More themes of different colours could be added in a future release."},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1087,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]"},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1089,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`"},{"lineNumber":1090,"author":{"gitId":"-"},"content":""},{"lineNumber":1091,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +"},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1093,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +"},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"Format: `history` +"},{"lineNumber":1096,"author":{"gitId":"-"},"content":""},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1100,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box."},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1102,"author":{"gitId":"-"},"content":""},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"// tag::undo[]"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`"},{"lineNumber":1105,"author":{"gitId":"-"},"content":""},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +"},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +"},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1110,"author":{"gitId":"-"},"content":"Format: `undo` +"},{"lineNumber":1111,"author":{"gitId":"-"},"content":""},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Undoable commands: Commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`)."},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1117,"author":{"gitId":"-"},"content":""},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts."},{"lineNumber":1122,"author":{"gitId":"-"},"content":""},{"lineNumber":1123,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1124,"author":{"gitId":"-"},"content":""},{"lineNumber":1125,"author":{"gitId":"Esilocke"},"content":"You realise this immediately and undo your mistake."},{"lineNumber":1126,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1127,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`"},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1130,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts. Furthermore, not knowing this, you made a mistake when editing another person\u0027s name."},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarisa Liselote`"},{"lineNumber":1136,"author":{"gitId":"-"},"content":""},{"lineNumber":1137,"author":{"gitId":"Esilocke"},"content":"You realise that something is amiss, and find out that you made not one, but two mistakes. Nevertheless you still manage to recover your contact by using multiple `undo` commands."},{"lineNumber":1138,"author":{"gitId":"-"},"content":""},{"lineNumber":1139,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"Finally, you edit Clarissa\u0027s name correctly."},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1144,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarissa Liselotte`"},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"// end::undo[]"},{"lineNumber":1147,"author":{"gitId":"-"},"content":""},{"lineNumber":1148,"author":{"gitId":"-"},"content":"// tag::unfavourite[]"},{"lineNumber":1149,"author":{"gitId":"-"},"content":""},{"lineNumber":1150,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)"},{"lineNumber":1151,"author":{"gitId":"-"},"content":""},{"lineNumber":1152,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +"},{"lineNumber":1153,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +"},{"lineNumber":1154,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1155,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +"},{"lineNumber":1156,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1157,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +"},{"lineNumber":1158,"author":{"gitId":"-"},"content":""},{"lineNumber":1159,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1160,"author":{"gitId":"-"},"content":"**Things To Note** +"},{"lineNumber":1161,"author":{"gitId":"-"},"content":""},{"lineNumber":1162,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`."},{"lineNumber":1163,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing."},{"lineNumber":1164,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ..."},{"lineNumber":1165,"author":{"gitId":"-"},"content":"* The heart png will disappear once you `unfavourite` the person."},{"lineNumber":1166,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1167,"author":{"gitId":"-"},"content":""},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1169,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1170,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +"},{"lineNumber":1171,"author":{"gitId":"-"},"content":"Suppose you do not want to the 2nd person in the address book to be your favourite contact anymore, you should `list` all the persons first, then use `unfavourite` command to achieve it."},{"lineNumber":1172,"author":{"gitId":"-"},"content":""},{"lineNumber":1173,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +"},{"lineNumber":1174,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 2` +"},{"lineNumber":1175,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1176,"author":{"gitId":"-"},"content":""},{"lineNumber":1177,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1178,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +"},{"lineNumber":1179,"author":{"gitId":"-"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to `unfavourite` `Betsy Brandt` in the address book."},{"lineNumber":1180,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `unfavourite` `Betsy Brandt`."},{"lineNumber":1181,"author":{"gitId":"-"},"content":""},{"lineNumber":1182,"author":{"gitId":"-"},"content":"\u003e\u003e `find Betsy` +"},{"lineNumber":1183,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 1` +"},{"lineNumber":1184,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1185,"author":{"gitId":"-"},"content":"image::UnfavouriteCommand.png[width\u003d\"790\"]"},{"lineNumber":1186,"author":{"gitId":"-"},"content":"_Figure 3.37.1 : UnfavouriteCommand_"},{"lineNumber":1187,"author":{"gitId":"-"},"content":"// end::unfavourite[]"},{"lineNumber":1188,"author":{"gitId":"-"},"content":""},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"// tag::redo[]"},{"lineNumber":1190,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`"},{"lineNumber":1191,"author":{"gitId":"-"},"content":""},{"lineNumber":1192,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` was not necessary. `redo` reverses the most recent `undo` command. +"},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +"},{"lineNumber":1195,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1196,"author":{"gitId":"-"},"content":"Format: `redo` +"},{"lineNumber":1197,"author":{"gitId":"-"},"content":""},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts."},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo your mistake."},{"lineNumber":1206,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`"},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"However you realise that you have deleted the correct person. Instead of typing `delete 1`, you choose to `redo` your command instead."},{"lineNumber":1210,"author":{"gitId":"-"},"content":""},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`"},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1214,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts, as well as two of your tasks."},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +"},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 5` +"},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 8` +"},{"lineNumber":1220,"author":{"gitId":"-"},"content":""},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo all your previous commands."},{"lineNumber":1222,"author":{"gitId":"-"},"content":""},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +"},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`"},{"lineNumber":1226,"author":{"gitId":"-"},"content":""},{"lineNumber":1227,"author":{"gitId":"Esilocke"},"content":"However you realise that no mistake was made. Instead of typing your commands again, you choose to `redo` your commands instead."},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +"},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +"},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`"},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1233,"author":{"gitId":"Esilocke"},"content":"// end::redo[]"},{"lineNumber":1234,"author":{"gitId":"Esilocke"},"content":"// tag::clear[]"},{"lineNumber":1235,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`"},{"lineNumber":1236,"author":{"gitId":"-"},"content":""},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +"},{"lineNumber":1238,"author":{"gitId":"Esilocke"},"content":"Additionally, if you clear only the contacts list or the task list, you can specify which type to clear in the command. +"},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1240,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +"},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1242,"author":{"gitId":"-"},"content":"Format: `clear` +"},{"lineNumber":1243,"author":{"gitId":"-"},"content":""},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"To clear only the contacts list, type `clear person/` +"},{"lineNumber":1245,"author":{"gitId":"Esilocke"},"content":"To clear only the tasks list, type `clear task/` +"},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"**Things To Note**"},{"lineNumber":1249,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"* If both `person/` and `task` are specified, or if neither were specified, the `clear` command will delete all entries in the address book."},{"lineNumber":1251,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1252,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +"},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1255,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +"},{"lineNumber":1256,"author":{"gitId":"Esilocke"},"content":"You have completed every task in your task list, and want to clean it up."},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1258,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear task/` +"},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1261,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1262,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1263,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. However you would still like to keep smome of the tasks for further reference."},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1265,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear person/` +"},{"lineNumber":1266,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1268,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +"},{"lineNumber":1270,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. You would like to clear everything in Address++ to make space for your own contacts and tasks."},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1272,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear` +"},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1275,"author":{"gitId":"Esilocke"},"content":"// end::clear[]"},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"// tag::open[]"},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening a save file : `open`"},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"Switching between address books is made easy with the `open` command, as it allows you can load different save files into the application. +"},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"You can choose which .xml file to open from the pop up window that appears upon executing this command. +"},{"lineNumber":1280,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":"`open` can be replaced by `o` for faster input. +"},{"lineNumber":1282,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":"Format `open`"},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":"// end::open[]"},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":"// tag::saveas[]"},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Saving the data as a new save file : `save`"},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to save a copy of your data in a separate location or with a different name, the `save` command will allow you to do just that. +"},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":"You can choose what to name your save file and where to save it from the pop up window that appears upon executing this command. +"},{"lineNumber":1290,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":"`save` can be replaced by `sa` for faster input. +"},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":"Format: `save`"},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":"// end::saveas[]"},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1296,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`"},{"lineNumber":1297,"author":{"gitId":"-"},"content":""},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +"},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Format: `exit`"},{"lineNumber":1300,"author":{"gitId":"-"},"content":""},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4]."},{"lineNumber":1302,"author":{"gitId":"-"},"content":""},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]"},{"lineNumber":1304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data"},{"lineNumber":1305,"author":{"gitId":"-"},"content":""},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +"},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually."},{"lineNumber":1308,"author":{"gitId":"-"},"content":""},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, you can use the `save` command, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window."},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, you can use the `open` command, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window."},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]"},{"lineNumber":1314,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1315,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ"},{"lineNumber":1316,"author":{"gitId":"-"},"content":""},{"lineNumber":1317,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +"},{"lineNumber":1318,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location."},{"lineNumber":1319,"author":{"gitId":"-"},"content":""},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet"},{"lineNumber":1321,"author":{"gitId":"-"},"content":""},{"lineNumber":1322,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1324,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `add pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1326,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"e.g. `add task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`"},{"lineNumber":1328,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `add tag/ [INDEX...] t/[TAG]` +"},{"lineNumber":1329,"author":{"gitId":"Esilocke"},"content":"e.g. `add tag/ 1 2 t/friends`"},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +"},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false r/true`"},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `privacylevel [LEVEL]` +"},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`"},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"* *Clear persons* : `clear person/`"},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"* *Clear tasks* : `clear task/`"},{"lineNumber":1336,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +"},{"lineNumber":1337,"author":{"gitId":"-"},"content":"e.g. `delete 3`"},{"lineNumber":1338,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task/ INDEX` +"},{"lineNumber":1339,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task/ 4`"},{"lineNumber":1340,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `delete tag/ [INDEX...] t/[TAG]` +"},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"e.g. `delete tag/ 1 2 t/friends`"},{"lineNumber":1342,"author":{"gitId":"charlesgoh"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +"},{"lineNumber":1343,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`"},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1345,"author":{"gitId":"Esilocke"},"content":"e.g. `edit task/ 2 p/veryhigh`"},{"lineNumber":1346,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edit tag/ TAGTOCHANGE NEWTAGNAME` +"},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"e.g. `edit tag/ friends enemies`"},{"lineNumber":1348,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +"},{"lineNumber":1349,"author":{"gitId":"-"},"content":"e.g. `favourite 1`"},{"lineNumber":1350,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +"},{"lineNumber":1351,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`"},{"lineNumber":1352,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +"},{"lineNumber":1353,"author":{"gitId":"-"},"content":"e.g. `showfavourite`"},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":1355,"author":{"gitId":"-"},"content":"e.g. `find James Jake`"},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `find tag/ TAG [MORE_TAGS]` +"},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"e.g. `find tag/ friends`"},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +"},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"e.g. `find task/ update p/high done/false`"},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : `help`"},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `list`"},{"lineNumber":1362,"author":{"gitId":"-"},"content":"* *List tags* : `showtag`"},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate INDEX`"},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +"},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navigate fa/Tampines Mall ta/Sentosa"},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +"},{"lineNumber":1367,"author":{"gitId":"-"},"content":"e.g.`select 2`"},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task/ INDEX` +"},{"lineNumber":1369,"author":{"gitId":"Esilocke"},"content":"e.g.`select task/ 2`"},{"lineNumber":1370,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +"},{"lineNumber":1371,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`"},{"lineNumber":1372,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +"},{"lineNumber":1373,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`"},{"lineNumber":1374,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +"},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`"},{"lineNumber":1376,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +"},{"lineNumber":1377,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`"},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `viewassign INDEX` +"},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"e.g. `viewassign 1`"},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `theme THEME` +"},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `theme light`"},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"* *History* : `history`"},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":"* *Undo* : `undo`"},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"* *Redo* : `redo`"},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `open`"},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `save`"},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : `exit`"},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Command Shorthand Cheat Sheet"},{"lineNumber":1390,"author":{"gitId":"Esilocke"},"content":"* *Add* : `a n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `a n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1392,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `a pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1393,"author":{"gitId":"Esilocke"},"content":"e.g. `a pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`"},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `a task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"e.g. `a task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`"},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `a tag/ [INDEX...] t/[TAG]` +"},{"lineNumber":1397,"author":{"gitId":"Esilocke"},"content":"e.g. `a tag/ 1 2 t/friends`"},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `cp INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +"},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `cp 2 n/true p/false e/true a/false r/true`"},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `pl [LEVEL]` +"},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`"},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear persons* : `c person`"},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear tasks* : `c task`"},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":"* *Delete person* : `d INDEX` +"},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `d 3`"},{"lineNumber":1406,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `d task/ INDEX` +"},{"lineNumber":1407,"author":{"gitId":"Esilocke"},"content":"e.g. `d task/ 4`"},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `d tag/ INDEX t/[TAG]` +"},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"e.g. `d tag/ 1 2 t/friends`"},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `e INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +"},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `e 2 n/James Lee e/jameslee@example.com`"},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `e task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +"},{"lineNumber":1413,"author":{"gitId":"Esilocke"},"content":"e.g. `e task/ 2 p/veryhigh`"},{"lineNumber":1414,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `e tag/ OLDTAGNAME NEWTAGNAME` +"},{"lineNumber":1415,"author":{"gitId":"Esilocke"},"content":"e.g. `e tag/ friends enemies`"},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":"* *Favourite persons* :`fav INDEX` +"},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `fav 1`"},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":"* *Unfavourite persons* :`unfav INDEX` +"},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `unfav 1`"},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"* *Show favourite list* :`sfav` +"},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sfav`"},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":"* *Find person* : `f KEYWORD [MORE_KEYWORDS]` +"},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `f James Jake`"},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `f tag/ Tag [MORE_TAGS]` +"},{"lineNumber":1425,"author":{"gitId":"Esilocke"},"content":"e.g. `f tag/ friends`"},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `f task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +"},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":"e.g. `f task/ update p/high`"},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `l`"},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"* *List tags* : `stag`"},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `loc INDEX`"},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navi [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +"},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navi fa/Tampines Mall ta/Sentosa"},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"* *Select person* : `s INDEX` +"},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"e.g.`s 2`"},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `s task/ INDEX` +"},{"lineNumber":1436,"author":{"gitId":"Esilocke"},"content":"e.g.`s task/ 2`"},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as complete* : `stc INDEX` +"},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `stc 4`"},{"lineNumber":1439,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as incomplete* : `sti INDEX` +"},{"lineNumber":1440,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sti 5`"},{"lineNumber":1441,"author":{"gitId":"jeffreygohkw"},"content":"* *Assign to task* : `as PERSONINDEX... to/TASKINDEX` +"},{"lineNumber":1442,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `as 4 1 17 18 to/21`"},{"lineNumber":1443,"author":{"gitId":"jeffreygohkw"},"content":"* *Dismiss from task* : `ds PERSONINDEX... from/TASKINDEX` +"},{"lineNumber":1444,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `ds 4 1 from/17`"},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `va INDEX` +"},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"e.g. `va 1`"},{"lineNumber":1447,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `th THEME` +"},{"lineNumber":1448,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `th light`"},{"lineNumber":1449,"author":{"gitId":"jeffreygohkw"},"content":"* *History* : `h`"},{"lineNumber":1450,"author":{"gitId":"jeffreygohkw"},"content":"* *Undo* : `u`"},{"lineNumber":1451,"author":{"gitId":"jeffreygohkw"},"content":"* *Redo* : `r`"},{"lineNumber":1452,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `o`"},{"lineNumber":1453,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `sa`"},{"lineNumber":1454,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1455,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts"},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1457,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]"},{"lineNumber":1458,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[F1]"},{"lineNumber":1459,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]"},{"lineNumber":1460,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]"},{"lineNumber":1461,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)"},{"lineNumber":1462,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)"},{"lineNumber":1463,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)"},{"lineNumber":1464,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1465,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept"},{"lineNumber":1466,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary."},{"lineNumber":1467,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1468,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]"}],"authorContributionMap":{"charlesgoh":191,"jeffreygohkw":252,"Esilocke":662,"-":363}},{"path":"docs/team/JeffreyGoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Jeffrey Goh - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: ../images"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: ../stylesheets"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Project: Address++"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is a desktop address book application that aims to help users manage their contacts and their time. It is primarily targeted at students with projects, although it may be used in a wide variety of other settings as well. Users will be able to interact with it using a Command Line Interface, and it has a Graphic User Interface created with JavaFX."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/jeffreygohkw.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/jeffreygohkw.md[Test code]]"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Privacy of Fields"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior (Add and Edit Co-authored with Charles Goh)"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003daddprivacy]"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003deditprivacy]"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dchangeprivacy]"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dprivacylevel]"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"Users may have contacts that they would like to keep confidential or those that they do not feel comfortable displaying in public. Instead of removing the contact from the address book, setting a field to private allows users to choose exactly what information they would like to display and what they would like to hide."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"In addition, a private name cannot be searched for, and a private address cannot be used in the locate and navigate commands to prevent users from finding out the value of the private field."},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"Having a private field also doubles up as an extra layer of protection against unintentional modifications, as private fields cannot be edited without changing them back to public fields."},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"It may be inconvenient for a user to set a person\u0027s fields to public and back to private every time they would like to have a peek at the data that was hidden, or to set a person\u0027s every field to private if they want to hide them. Thus, having a command to change the privacy level of the address book will make it much more convenient for users to access private information."},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dprivacy]"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Locating a person\u0027s address"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dlocate]"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"While a person\u0027s phone and email address can be used directly, users often are unaware of where exactly their contacts\u0027 addresses are located in real life. The locate command aims to solve this problem by taking the address of a contact and searching for it on Google Maps. This allows the user to find out where exactly their contacts\u0027 addresses are located."},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dlocate]"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Navigating from one address to another"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dnavigate]"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"Locating a contact does not tell users how to arrive at that particular contact\u0027s address. Furthermore, users may face the scenario where they have to travel and meet different groups and different contacts throughout the day. The Navigate command allows users to find out the most efficient path from one address to another with the aid of Google Maps."},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"Users are able to utilize the addresses attached to a person, as well as those attached to a task, in the navigate command. They can also manually input addresses in the custom line if they are looking for directions to or from an address that is not presently stored inside the address book. This greatly enhances the flexibility of the command, and allows users to use the command without having to add a dummy task or person to store new addresses beforehand."},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dnavigate]"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Opening and Saving of the .xml save file"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopen]"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dsaveas]"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopensaveas]"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"Open and Save As will allow users to more easily manage their data. Open allows them to load their data from a .xml file, letting them easily work on multiple different address books. +"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"Save As allows users to save their address book data, letting it serve as backup or allowing them to be placed in a different location on the computer while still remaining operational. +"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"This also allows for easier transfers of save files between devices without having to manually drag and manage the save files to and from the folder where Address++ is located."},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"It can even potentially allow for syncing save files between devices if external software like Dropbox is used."},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dopensaveas]"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"---"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Other contributions"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":"* Add Menu Icons for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#10])"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"* Add Keyboard Shortcuts for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#11], https://github.com/CS2103AUG2017-W09-B2/main/pull/101[#101])"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"* Modified SortCommand to be undoable, and wrote test cases for it (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/29[#29], https://github.com/CS2103AUG2017-W09-B2/main/pull/30[#30])"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"* Created TaskAddress to store the address of tasks (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/129[#129], https://github.com/CS2103AUG2017-W09-B2/main/pull/132[#132])"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"* Added Travis, Coveralls and Appveyor links for Continuous Integration (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/4[#4], https://github.com/CS2103AUG2017-W09-B2/main/pull/22[#22])"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"* Performed Acceptance Testing for Team T16-B2 (Issue https://github.com/CS2103AUG2017-T16-B2/main/issues/102[#102])"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":"* Wrote some Manual Testing tests (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/162[#162], https://github.com/CS2103AUG2017-W09-B2/main/pull/165[#165])"}],"authorContributionMap":{"jeffreygohkw":159}},{"path":"docs/team/KelvinLin.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"\u003d Lin Ziwen Kelvin - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":":imagesDir: ../images"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":":stylesDir: ../stylesheets"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: AddressBook++"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/Esilocke.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/Esilocke.md[Test code]]"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Edit Tag"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittag]"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"#End of Extract#"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"The user may find a need to change the name of a particular name. +"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"In the context of the target user, suppose that a user wishes to change the tag `CS2103Groupmates` to `friends`, after he has completed the module. +"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"The user would need to delete the tag from all users who are tagged with `CS2103Groupmates`, and add the tag `friends` to them one-by-one. `edittag` thus aims to make this process faster by allowing users to rename all instances of the tag from the address book."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"The EditTagCommand iterates through each person in the UniquePersonList, and replaces the old tag, if found, with the new tag."},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Optional Data Input"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"Optional Data Input allows tasks and persons to have only one compulsory field, the name. All other fields in a person or task can be left unspecified, allowing for a greater range of inputs."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"We may not always have the opportunity to find contacts or tasks with complete information. +"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"This means that some contacts may not have an address, or email address, while some tasks may not have a deadline, or a description. Without Optional Data Input, the user would need to come up with random placeholder values for each prefix, which would greatly hinder user experience as the user would need to type in unnecessary values to satisfy the command format. +"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"Allowing optional data input thus lifts the restriction of making every field compulsory, and thus allows users to fill in a wider range of input."},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"When a user does not fill in a prefix for a particular field, the parser will create an object corresponding to the missing field with a placeholder value."},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"[source, java]"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"public Phone(String args) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ..."},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"public boolean isValidPhone(String args) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (args.equals(PHONE_PLACEHOLDER_VALUE) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" ..."},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"In addition, the isValid method is also updated to accept placeholder values as valid inputs."},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Tasks Management"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003daddtask]"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittask]"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003ddeletetask]"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dfindtask]"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dselecttask]"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dsetstate]"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dassignDismiss]"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dclear]"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"#End of Extract#"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"Our intended target audience are primarily NUS students, who are working on projects. In addition to managing their contact details, allowing users to manage their tasks would also greatly improve their user experience, as they would not need to keep track of their project deadlines separately."},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"---"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dtask]"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dassignDismiss]"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"#End of Extract#"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Other contributions"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* Conducted internal acceptance testing [https://github.com/CS2103AUG2017-W09-B2/main/issues/155[Issue #155]]"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"* Conducted Acceptance Testing for other teams [https://github.com/CS2103AUG2017-F09-B1/main/issues/83[F09-B1]] [https://github.com/CS2103AUG2017-F09-B1/main/issues/82[F09-B1]]"}],"authorContributionMap":{"charlesgoh":1,"Esilocke":114}},{"path":"docs/team/charlesgoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Charles Goh - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":":imagesDir: ../images"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":":stylesDir: ../stylesheets"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: Address++"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"Address++ is a desktop address book application that aims to provide students and"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"professionals with an effective tool to help them manage their contacts and their time."},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"This is a snapshot of our User Interface"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"My contributions to this project are listed below:"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/charlesgoh.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/charlesgoh.md[Test code]]"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Password Protection Commands `lock` `unlock` `changepassword`"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dpassword]"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"Many users have security related concerns. In order to slow malicious users from causing"},{"lineNumber":33,"author":{"gitId":"-"},"content":"damage to users\u0027 Address++ application, the password protection suite of commands were"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"created."},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dpassword]"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dsort]"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"As more contacts and tasks are added to the application, the lists may get long and disorganized. The Sort Command"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"allows users to sort both contacts and tasks by key fields. Examples include sorting contacts by name and"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"sorting contacts by deadlines."},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dbackup]"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"Users are able to back up their data before making any changes so that in the event of an"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"emergency (e.g. clearing all data and then closing afterwards), the old save data can be restored."},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dbackup]"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dfontsize]"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"Different monitors render the application differently. On some monitors, the words may appear to be too small. The font size"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"commands and buttons allow users to increase/decrease/reset the font sizes at any time when using the application."},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dfontsize]"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Avatar and Remark Fields"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior: Co-authored with Jeffrey Goh"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003davatar]"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":"Avatars and remarks help users to identify different contacts. It was also implemented with the intention of making the application"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"more user friendly."},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation for Avatar Field"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003davatar]"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":"---"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Other contributions"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":"* Added tests for task related implementations (https://github.com/CS2103AUG2017-W09-B2/main/pull/115/files[#115]) +"},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":"* Conducted Acceptance Testing for another team [https://github.com/CS2103AUG2017-W09-B4/main/issues/77[W09-B4]]"}],"authorContributionMap":{"charlesgoh":160,"-":2}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 5, 0, false);"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());"},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book."},{"lineNumber":88,"author":{"gitId":"-"},"content":" */"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");"},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null."},{"lineNumber":117,"author":{"gitId":"-"},"content":" */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;"},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());"},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \""},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");"},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }"},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;"},{"lineNumber":147,"author":{"gitId":"-"},"content":" }"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;"},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \""},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");"},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":169,"author":{"gitId":"-"},"content":" }"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" }"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(model.getUserPrefs());"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private String appTitle \u003d \"Address++\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well."},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/"},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;"},{"lineNumber":13,"author":{"gitId":"-"},"content":" }"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BackupRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * An Event for backing up of data to a selected location."},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class BackupRequestEvent extends BaseEvent {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private Model model;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private String args;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public BackupRequestEvent(Model model, String args) {"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public Model getModel() {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" return model;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public void setModel(Model model) {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public String getArgs() {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" return args;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void setArgs(String args) {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String toString() {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelNavigateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelNavigateEvent extends BaseEvent {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" private final Location fromLocation;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final Location toLocation;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelNavigateEvent(Location fromLocation, Location toLocation) {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.fromLocation \u003d fromLocation;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.toLocation \u003d toLocation;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Location getFromLocation() {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" return fromLocation;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Location getToLocation() {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" return toLocation;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":33}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeFontSizeEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a font size change triggered by a command or the UI"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"public class ChangeFontSizeEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static int increaseSizeEventIndex \u003d 0;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static int decreaseSizeEventIndex \u003d 1;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static int resetSizeEventIndex \u003d 2;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private int triggerOption;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public ChangeFontSizeEvent(int triggerOption) {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public String toString() {"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" return \"New Event: Font size change\";"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static int getIncreaseSizeEventIndex() {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" return increaseSizeEventIndex;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public static int getDecreaseSizeEventIndex() {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return decreaseSizeEventIndex;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static int getResetSizeEventIndex() {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return resetSizeEventIndex;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public int getTriggerOption() {"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return triggerOption;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public void setTriggerOption(int triggerOption) {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangeThemeRequestEvent extends BaseEvent {"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" private final String styleSheet;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public ChangeThemeRequestEvent(String styleSheet) {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" this.styleSheet \u003d styleSheet;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public String getStyleSheet() {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return styleSheet;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/commons/events/ui/JumpToListRequestTaskEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Indicates a request to jump to the list of tasks"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class JumpToListRequestTaskEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public final int targetIndex;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public JumpToListRequestTaskEvent(Index targetIndex) {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" //TODO optimize this class"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex.getZeroBased();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component"},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user."},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution."},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();"},{"lineNumber":31,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model) {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.history \u003d new CommandHistory();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" this.addressBookParser \u003d new AddressBookParser();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");"},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" return result;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" } finally {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" history.add(commandText);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":12,"Esilocke":8,"-":49}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that adds an object to the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class AddCommand extends UndoableCommand {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/AddPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Adds a person to the address book."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"John Doe \""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"98765432 \""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johnd@example.com \""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + PREFIX_REMARK + \"Sells sea shells on the sea shore \""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + PREFIX_AVATAR + \"avatar-filepath.png\""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"friends \""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"owesMoney\";"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public AddPersonCommand(ReadOnlyPerson person) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddPersonCommand)) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assert (((AddPersonCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddPersonCommand) other).personToAdd);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":73}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book."},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends AddCommand {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all \""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" + \"target persons in the current list.\";"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag."},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag."},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":126}},{"path":"src/main/java/seedu/address/logic/commands/AddTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \": Adds a task to the address book. \""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS]\\n\""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"12 Kent Ridge Crescent, 119275\";"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New task added: \\n%1$s\";"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Creates an AddTaskCommand to add the specified {@code ReadOnlyTask}"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public AddTaskCommand(ReadOnlyTask task) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" super();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddTaskCommand)) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assert (taskToAdd !\u003d null);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert (((AddTaskCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddTaskCommand) other).taskToAdd);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":70}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location."},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \"MyBackUpFile\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" super();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new BackupRequestEvent(model, args));"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/logic/commands/ChangePasswordCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Changes user\u0027s password provided old password is correct and new passwords match."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommand extends Command {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"changepassword\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"cpw\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Password changed successfully\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes user password. \\n\""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"NEWPASSWORD \""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"CONFIRMPASSWORD \\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\";"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_OLD_NEW_PS_SAME \u003d \"New password must be different from your old password\";"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ERROR_OCCURED \u003d \"An error occured. Please try again.\\n\";"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Your password is incorrect. Please try again.\\n\";"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_CONFIRMATION_INCORRECT \u003d \"Your new password and confirmation password \""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" + \"do not match. Please try again\\n\";"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(ChangePasswordCommand.class);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private String oldPassword;"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private String newPassword;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" private String confirmationPassword;"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" * Takes in old password, new password and confirmation password from parser and creates a new"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * ChangePasswordCommand object"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param oldPassword"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" * @param newPassword"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" * @param confirmPassword"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand(String oldPassword, String newPassword, String confirmPassword) {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.oldPassword \u003d oldPassword;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" this.newPassword \u003d newPassword;"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.confirmationPassword \u003d confirmPassword;"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes string using SHA256 encryption and returns hashed string"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * @param argument"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" private String forwardHash(String argument) {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(argument, StandardCharsets.UTF_8).toString();"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes the user input password and checks if it matches with the encrypted password saved"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldPasswordCorrect() {"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String forwardHashedInputPassword \u003d forwardHash(oldPassword);"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" String forwardHashActualPassword;"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" forwardHashActualPassword \u003d userPrefs.getAddressBookEncryptedPassword();"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" if (forwardHashActualPassword.equals(forwardHashedInputPassword)) {"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Actual password and input password matches\");"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return true;"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Actual password and input password do not match\");"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" return false;"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Takes new input passwords and checks them against one another."},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" private boolean isNewPasswordInputsSame() {"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return newPassword.equals(confirmationPassword);"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Checks if old password and new password are the same"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldAndNewPasswordTheSame() {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return oldPassword.equals(newPassword);"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" // Case where old password is incorrect"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" if (!isOldPasswordCorrect()) {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Password is incorrect. Note: Default password is \u0027password\u0027 \");"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Case where new password and confirmation password do not match"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" if (!isNewPasswordInputsSame()) {"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"New password and confirmation password do not match\");"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_CONFIRMATION_INCORRECT);"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" // Case where old and new passwords are the same"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" if (isOldAndNewPasswordTheSame()) {"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Old password and new password cannot be the same\");"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_OLD_NEW_PS_SAME);"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Case where user input passes both checks. Password is changed and UserPrefs saved"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs;"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" // Get user prefs file"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d model.getUserPrefs();"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set new password to user prefs"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(newPassword);"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" // Logs new password and saved password for debugging purposes"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String hashedNewPassword \u003d forwardHash(newPassword);"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" String userPrefsHashedPassword \u003d userPrefs.getAddressBookEncryptedPassword();"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New Password: \" + newPassword"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted New Password: \" + hashedNewPassword"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted Password From UserPrefs:\" + userPrefsHashedPassword"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" + \"\\nCommand\u0027s Password and UserPrefs saved password matches: \""},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + Boolean.toString(hashedNewPassword.equals(userPrefsHashedPassword)) + \"\\n\");"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" // Return command result"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":142}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_AVATAR + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD + \" \""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_AVATAR + FALSE_WORD;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d null;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(model.getPrivacyLevel());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Person must have all fields initialised.\");"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps)"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Name name \u003d createNameWithPrivacy(person, pps);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone \u003d createPhoneWithPrivacy(person, pps);"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" Email email \u003d createEmailWithPrivacy(person, pps);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Address address \u003d createAddressWithPrivacy(person, pps);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark \u003d createRemarkWithPrivacy(person, pps);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar \u003d person.getAvatar();"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" Boolean favourite \u003d person.getFavourite();"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tag \u003d person.getTags();"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tag);"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Name) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Name) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return name;"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createPhoneWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getPhone().getIsPrivate()) {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(false);"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(true);"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Phone\");"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(pps.getPhoneIsPrivate());"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(person.getPhone().getIsPrivate());"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return phone;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createEmailWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getEmail().getIsPrivate()) {"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(false);"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(true);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Email\");"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(pps.getEmailIsPrivate());"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(person.getEmail().getIsPrivate());"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return email;"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createAddressWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(false);"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(true);"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Address\");"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(pps.getAddressIsPrivate());"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(person.getAddress().getIsPrivate());"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" return address;"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code PersonPrivacySettings)"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createRemarkWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getRemark().getIsPrivate()) {"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(false);"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(true);"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Remark\");"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(pps.getRemarkIsPrivate());"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(person.getRemark().getIsPrivate());"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return remark;"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return index;"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person."},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {"},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}"},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {"},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;"},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;"},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;"},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;"},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;"},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null."},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {"},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,"},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);"},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate"},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {"},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;"},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {"},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);"},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;"},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;"},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":359,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":360,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":361,"author":{"gitId":"charlesgoh"},"content":" * Returns the value of remarkIsPrivate"},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" public Boolean getRemarkIsPrivate() {"},{"lineNumber":364,"author":{"gitId":"charlesgoh"},"content":" return remarkIsPrivate;"},{"lineNumber":365,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":366,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":367,"author":{"gitId":"charlesgoh"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {"},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remarkIsPrivate);"},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;"},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":371,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":372,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls"},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {"},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" // state check"},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;"},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())"},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())"},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())"},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())"},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());"},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":381}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Clears all entries in the address book."},{"lineNumber":11,"author":{"gitId":"-"},"content":" */"},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/ClearPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the contacts in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommand extends ClearCommand {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All contacts have been cleared!\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_PERSON);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/ClearTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the tasks in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommand extends ClearCommand {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All tasks have been cleared!\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_TASK);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public abstract class Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" protected CommandHistory history;"},{"lineNumber":17,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons."},{"lineNumber":21,"author":{"gitId":"-"},"content":" *"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed"},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks."},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message."},{"lineNumber":41,"author":{"gitId":"-"},"content":" *"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command."},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain"},{"lineNumber":50,"author":{"gitId":"-"},"content":" * access to the dependencies."},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":6,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that deletes an object from the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class DeleteCommand extends UndoableCommand {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/DeletePersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Deletes a person from the address book."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommand extends DeleteCommand {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person identified by the index number used in the last listing.\\n\""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Person: %1$s\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand(Index targetIndex) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size()) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToDelete));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeletePersonCommand // instanceof handles nulls"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeletePersonCommand) other).targetIndex)); // state check"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book."},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends DeleteCommand {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"The target persons do not have input tags.\";"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons."},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list."},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" // state check"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":125}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a task from the address book."},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommand extends DeleteCommand {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the task identified by the index number used in the last listing.\\n\""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Task: %1$s\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand(Index targetIndex) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToDelete));"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeleteTaskCommand // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteTaskCommand) other).targetIndex)); // state check"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":56}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends UndoableCommand {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + \"TASK \";"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" if (!personsToDismiss.contains(toDismiss)) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":89}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that edits an object in the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class EditCommand extends UndoableCommand {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";"},{"lineNumber":11,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/EditPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * Edits a person in the address book."},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommand extends EditCommand {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last person listing. \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"91234567 \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Person: \\n%1$s\";"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static boolean areFieldsAllPrivate \u003d true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final EditPersonDescriptor editPersonDescriptor;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private final Index index;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * @param index of the person in the filtered person list to edit"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * @param editPersonDescriptor details to edit the person with"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand(Index index, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editPersonDescriptor);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" editedPerson.setPrivacyLevel(model.getPrivacyLevel());"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}."},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" updatedAvatar \u003d createUpdatedAvatar(personToEdit, editPersonDescriptor);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedAvatar, updatedTags);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().getIsPrivate()) {"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().getIsPrivate()) {"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().getIsPrivate()) {"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().getIsPrivate()) {"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" //**author charlesgoh"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().getIsPrivate()) {"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;"},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Avatar) for use in createEditedPerson"},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Avatar) from either the personToEdit or the editPersonDescriptor"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input"},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar createUpdatedAvatar(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());"},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAvatar().isPresent()) {"},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAvatar;"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" //author"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson"},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit"},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,"},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());"},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;"},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonCommand)) {"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand e \u003d (EditPersonCommand) other;"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the person."},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" public static class EditPersonDescriptor {"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" private Name name;"},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" private Phone phone;"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" private Email email;"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" private Address address;"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" private Boolean favourite;"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" private Remark remark;"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" private Avatar avatar;"},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" private Set\u003cTag\u003e tags;"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor() {}"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" this.name \u003d toCopy.name;"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d toCopy.phone;"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" this.email \u003d toCopy.email;"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" this.address \u003d toCopy.address;"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" this.favourite \u003d toCopy.favourite;"},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d toCopy.remark;"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d toCopy.avatar;"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d toCopy.tags;"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited."},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark,"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" this.avatar, this.tags);"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" public void setName(Name name) {"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":" this.name \u003d name;"},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cName\u003e getName() {"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(name);"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d phone;"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPhone\u003e getPhone() {"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(phone);"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void setEmail(Email email) {"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" this.email \u003d email;"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cEmail\u003e getEmail() {"},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(email);"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" public void setAddress(Address address) {"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" this.address \u003d address;"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAddress\u003e getAddress() {"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(address);"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":368,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":369,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":370,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;"},{"lineNumber":371,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":372,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {"},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);"},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":376,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d remark;"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cRemark\u003e getRemark() {"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(remark);"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" public void setAvatar(Avatar avatar) {"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d avatar;"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAvatar\u003e getAvatar() {"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(avatar);"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d tags;"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(tags);"},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonDescriptor)) {"},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" return getName().equals(e.getName())"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())"},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar())"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTags().equals(e.getTags());"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":190,"Esilocke":227,"wangyiming1019":9}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends EditCommand {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \": Edits the specified tag \""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/EditTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Edits a task in the address book."},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommand extends EditCommand {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \": Edits the details of the task identified \""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Task: \\n%1$s\";"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private final Index index;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand(Index index, EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownTaskList.size()) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedTask));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * edited with {@code editTaskDescriptor}."},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor) {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assert taskToEdit !\u003d null;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" TaskName updatedTaskName;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Description updatedDescription;"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" Deadline updatedDeadline;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Priority updatedPriority;"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Assignees assignees;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" Boolean updatedState;"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" TaskAddress updatedTaskAddress;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // You cannot edit assignees or state using edit command"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assignees \u003d taskToEdit.getAssignees();"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" updatedState \u003d taskToEdit.getCompleteState();"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress \u003d editTaskDescriptor.getTaskAddress().orElse(taskToEdit.getTaskAddress());"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState,"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress);"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskCommand)) {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand e \u003d (EditTaskCommand) other;"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task."},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private Description description;"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" private Priority priority;"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" private TaskAddress taskAddress;"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d toCopy.taskAddress;"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited."},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority,"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" this.taskAddress);"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d taskAddress;"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskAddress\u003e getTaskAddress() {"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskAddress);"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority())"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTaskAddress().equals(e.getTaskAddress());"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":224}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getAddress(), true,"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getTags());"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToFavourite, editedPerson);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that finds objects in the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class FindCommand extends Command {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/FindPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" * Finds people in the address book."},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommand extends FindCommand {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand(NameContainsKeywordsPredicate predicate) {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindPersonCommand"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personPredicate.equals(((FindPersonCommand) other).personPredicate);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":32}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords."},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive."},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends FindCommand {"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" + \": Finds all persons whose tags contain any of \""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" friends colleagues\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/FindTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Finds tasks in the address book."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommand extends FindCommand {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \": Finds all tasks whose names or descriptions \""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]... [p/MINIMUM_PRIORITY] [done/TASK_STATE]\\n\""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_COMPLETE_VALUE \u003d \"The task status should either be \u0027true\u0027 or \u0027false\u0027\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PRIORITY \u003d \"The specified priority should be an integer from 1 to 5\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand(TaskContainsKeywordPredicate predicate) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindTaskCommand"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskPredicate.equals(((FindTaskCommand) other).taskPredicate);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/commands/FontSizeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 5;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"fontsize\";"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"fs\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String INCREASE_SIZE_PARAMETER \u003d \"increase\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String DECREASE_SIZE_PARAMETER \u003d \"decrease\";"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String RESET_SIZE_PARAMETER \u003d \"reset\";"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" INCREASE_SIZE_PARAMETER, DECREASE_SIZE_PARAMETER, RESET_SIZE_PARAMETER));"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Increases, decreases or resets font sizes \\n\""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [OPTION]\\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" increase\\n\""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" reset\\n\";"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\" + MESSAGE_USAGE;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_INCREASE_FONT \u003d \"Font size increased successfully\";"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_DECREASE_FONT \u003d \"Font size decreased successfully\";"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_RESET_FONT \u003d \"Font size reset successfully\";"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" private final String option;"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand(String option) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.option \u003d option;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getOption() {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return this.option;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" switch (option) {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" case INCREASE_SIZE_PARAMETER:"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_INCREASE_FONT);"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" case DECREASE_SIZE_PARAMETER:"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_DECREASE_FONT);"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" case RESET_SIZE_PARAMETER:"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_RESET_FONT);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" System.err.println(\"Parameter is invalid\");"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_INVALID_INPUT + MESSAGE_USAGE);"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":68}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user."},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person at Index: %1$s\";"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_ADDRESS_FAILURE \u003d \"Person %1$s has no Address\";"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().getIsPrivate()) {"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().toString().equals(\"\")) {"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_NO_ADDRESS_FAILURE, targetIndex.getOneBased()));"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent("},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":62}},{"path":"src/main/java/seedu/address/logic/commands/LockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class LockCommand extends Command {"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"lock\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"lk\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Locks the application. \""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ locked successfully\";"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public LockCommand(String password) {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs."},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to lock"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/NavigateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Navigates from one address to another with the help of Google Maps"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"navigate\";"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"nav\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" + \": Get directions from one address to another.\\n\""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three)\""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \" AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three)\\n\""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" fp/2 ta/University Town\";"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NAVIGATE_SUCCESS \u003d \"Navigating from %1$s to %2$s\";"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_FROM_ERROR \u003d \"Only one type of From prefix allowed.\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_TO_ERROR \u003d \"Only one type of To prefix allowed.\";"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR \u003d \"Address of the Person at index %1$s is private.\";"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR \u003d \"Person at index %1$s does not have an address.\";"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_HAS_NO_ADDRESS_ERROR \u003d \"Task at index %1$s does not have an address.\";"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationFrom;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationTo;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private final Index fromIndex;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private final Index toIndex;"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean fromIsTask;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean toIsTask;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d null;"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d null;"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" checkDuplicateFromAndToLocation(locationFrom, locationTo, fromIndex, toIndex);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null) {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null) {"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" this.locationFrom \u003d from;"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" this.locationTo \u003d to;"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" this.toIndex \u003d toIndex;"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIndex \u003d fromIndex;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" this.toIsTask \u003d toIsTask;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIsTask \u003d fromIsTask;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Throws an IllegalArgumentException if there is both locationFrom and fromIndex are not null,"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * or if both locationTo and toIndex are not null."},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo,"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" Index fromIndex, Index toIndex) throws IllegalArgumentException {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" Location from;"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" Location to;"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" if (fromIndex !\u003d null) {"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" if (toIndex !\u003d null) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d setLocationByIndex(toIndex, toIsTask);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelNavigateEvent(from, to));"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_NAVIGATE_SUCCESS, from, to));"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationFrom() {"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" return locationFrom;"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationTo() {"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" return locationTo;"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" public Index getFromIndex() {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" return fromIndex;"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" public Index getToIndex() {"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" return toIndex;"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isFromIsTask() {"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return fromIsTask;"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isToIsTask() {"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" return toIsTask;"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NavigateCommand // instanceof handles nulls"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationFrom(other)"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationTo(other)"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIndex(other)"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIndex(other)"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIsTask(other)"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIsTask(other)); // state check"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationFrom) of this object is equal to that of the other Object"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationFrom(Object other) {"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationFrom \u003d\u003d null) {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationFrom \u003d\u003d null;"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationFrom.equals(((NavigateCommand) other).locationFrom);"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationTo) of this object is equal to that of the other Object"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationTo(Object other) {"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationTo \u003d\u003d null) {"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationTo \u003d\u003d null;"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationTo.equals(((NavigateCommand) other).locationTo);"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIndex) of this object is equal to that of the other Object"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIndex(Object other) {"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" if (this.fromIndex \u003d\u003d null) {"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).fromIndex \u003d\u003d null;"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIndex.equals(((NavigateCommand) other).fromIndex);"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIndex) of this object is equal to that of the other Object"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIndex(Object other) {"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" if (this.toIndex \u003d\u003d null) {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).toIndex \u003d\u003d null;"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIndex.equals(((NavigateCommand) other).toIndex);"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIsTask) of this object is equal to that of the other Object"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIsTask(Object other) {"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIsTask \u003d\u003d (((NavigateCommand) other).fromIsTask);"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIsTask) of this object is equal to that of the other Object"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIsTask(Object other) {"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIsTask \u003d\u003d (((NavigateCommand) other).toIsTask);"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":224}},{"path":"src/main/java/seedu/address/logic/commands/OpenCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommand extends Command {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"open\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"o\";"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String OPEN_COMMAND_SUCCESS \u003d \"Successfully opened file.\";"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new OpenRequestEvent());"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(OPEN_COMMAND_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/PrivacyLevelCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Handles the changing of Privacy Levels in the address book"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"privacylevel\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"pl\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String CHANGE_PRIVACY_LEVEL_SUCCESS \u003d \"Successfully changed privacy level to %1$s.\";"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String WRONG_PRIVACY_LEVEL_MESSAGE \u003d \"Privacy Level can only be 1, 2 or 3\";"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MIN_PRIVACY_LEVEL \u003d 1;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MAX_PRIVACY_LEVEL \u003d 3;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \": Changes the privacy level of the address book. Level 1 shows all data, level 2 hides private fields\""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" + \" and level 3 hides persons with at least 1 private field.\\n\""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: LEVEL (must be 1, 2 or 3)\\n\""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final int level;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand(int level) {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.level \u003d level;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public int getLevel() {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return level;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof PrivacyLevelCommand // instanceof handles nulls"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.level \u003d\u003d ((PrivacyLevelCommand) other).level); // state check"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":77}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SaveAsCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data to a new save file at a desired location"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommand extends Command {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"save\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"sa\";"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String SAVE_AS_COMMAND_SUCCESS \u003d \"Successfully saved file.\";"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new SaveAsRequestEvent());"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(SAVE_AS_COMMAND_SUCCESS);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that selects an object in the address book."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class SelectCommand extends Command {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/SelectPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Selects a person in the address book and loads the view panel for that person."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommand extends SelectCommand {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Person: %1$s\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand(Index targetIndex) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectPersonCommand // instanceof handles nulls"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectPersonCommand) other).targetIndex)); // state check"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":47}},{"path":"src/main/java/seedu/address/logic/commands/SelectTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * Selects a task in the address book and loads the view panel for that task."},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommand extends SelectCommand {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \": Selects the task identified by the index number used in the last task listing.\\n\""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Task: %1$s\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand(Index targetIndex) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownTaskList.size()) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestTaskEvent(targetIndex));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectTaskCommand // instanceof handles nulls"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectTaskCommand) other).targetIndex)); // state check"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":49}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as complete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as incomplete */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_LIST_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"person\", \"task\"));"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\", \"priority\", \"deadline\"));"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons or all tasks by chosen \""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive\\n\""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [LIST] [FIELD] [ORDER]\\n\""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" person email desc\\n\""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_WORD + \" task deadline desc\\n\";"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Person Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Task Field Values: DEADLINE, PRIORITY\\n\""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_PERSONS \u003d \"All persons in address book successfully sorted\";"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_TASKS \u003d \"All tasks in address book successfully sorted\";"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" private final String list;"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private final String field;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private final String order;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String list, String field, String order) {"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" this.list \u003d list;"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * Checks if argument command has the same parameter properties"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param commandB"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public boolean sameCommandAs(SortCommand commandB) {"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return commandB.getList().equals(this.list) \u0026\u0026 commandB.getField()"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .equals(this.field) \u0026\u0026 commandB.getOrder().equals(this.order);"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public String getField() {"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" return this.field;"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" return this.order;"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public String getList() {"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" return this.list;"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" if (this.list.equals(ACCEPTED_LIST_PARAMETERS.get(0))) {"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_PERSONS);"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" model.sortTasks(getField(), getOrder());"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_TASKS);"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":2}},{"path":"src/main/java/seedu/address/logic/commands/TagListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * List all tags in the address book to the user"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommand extends Command {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showtag\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"stag\";"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAILURE \u003d \"There is no tag!\";"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All the tags are here: \";"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(displayTags());"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * display all the tags to user"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * @return String displayTags"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String displayTags() {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" String displayTags;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e tagList \u003d getAllTagsInAddressBook();"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" if (tagList.isEmpty()) {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_FAILURE;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_SUCCESS + convertTagToString(tagList);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return displayTags;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * get all the tags in the address book without duplication"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" * @return allTagList"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" private ArrayList\u003cTag\u003e getAllTagsInAddressBook() {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e allTagList \u003d new ArrayList\u003cTag\u003e();"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" if (!allTagList.contains(tag)) {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" allTagList.add(tag);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" return allTagList;"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" * convert a list of tags to a String"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * @return String tags"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ArrayList\u003cTag\u003e tagList) {"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagNameList \u003d new ArrayList\u003cString\u003e();"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : tagList) {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" tagNameList.add(tag.getTagName());"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Collections.sort(tagNameList);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder tagNameString \u003d new StringBuilder();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" for (String tagName : tagNameList) {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" tagNameString.append(\"\u003c\").append(tagName).append(\"\u003e \");"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" return tagNameString.toString().trim();"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/ThemeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommand extends Command {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"theme\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"th\";"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" + \": Sets the theme based on the specified style.\\n\""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: STYLE\\n\""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" dark\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_CHANGE_SUCCESS \u003d \"Theme Changed to: %1$s\";"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_NOT_AVAILABLE \u003d \"Theme %1$s is not available.\";"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_IN_USE \u003d \"Theme %1$s is currently in use.\";"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private final String style;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand (String style) {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" this.style \u003d style;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return style;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ThemeCommand // instanceof handles nulls"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.style.equals(((ThemeCommand) other).style)); // state check"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":64}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToUnfavourite.getName(),"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getPhone(), personToUnfavourite.getEmail(),"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getAddress(), false,"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getRemark(), personToUnfavourite.getAvatar(),"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getTags());"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToUnfavourite, editedPerson);"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/UnlockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommand extends Command {"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"unlock\";"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"ul\";"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Unlocks the application. \""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ unlocked successfully\";"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand(String password) {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs."},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to unlocked"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/ViewAssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Displays a list of all persons assigned to a specified task"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"viewassign\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"va\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Shows all persons assigned to a task\\n\""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX\\n\""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index taskIndex;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand(Index taskIndex) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToFind \u003d tasksList.get(taskIndex.getZeroBased());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.viewAssignees(taskToFind);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" || other instanceof ViewAssignCommand"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((ViewAssignCommand) other).taskIndex);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":48}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object"},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution."},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK, PREFIX_TAG_FULL)) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d AddTaskCommandParser.constructTask(args);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new AddTaskCommand(taskToAdd);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TAG_FULL)) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AddTagCommandParser().parse(filteredArgs);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d AddPersonCommandParser.constructPerson(args);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new AddPersonCommand(personToAdd);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":28,"-":23}},{"path":"src/main/java/seedu/address/logic/parser/AddPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR_PRIVATE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ReadOnlyPerson object in the context of AddPersonCommand."},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"public class AddPersonCommandParser extends AddCommandParser {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided."},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static ReadOnlyPerson constructPerson(String args) throws ParseException {"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_AVATAR, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_AVATAR_PRIVATE);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d makeName(argMultimap);"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d makePhone(argMultimap);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d makeEmail(argMultimap);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d mmakeAddress(argMultimap);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d makeAvatar(argMultimap);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d makeRemark(argMultimap);"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, avatar, tagList);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" return person;"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Name based on the input arguments"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static Name makeName(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Name name;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return name;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Phone based on the input arguments"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone makePhone(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)) {"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(null);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" return phone;"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Email based on the input arguments"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" private static Email makeEmail(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Email email;"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)) {"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(null);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" return email;"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Address based on the input arguments"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" private static Address mmakeAddress(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" Address address;"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)) {"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(null);"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return address;"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Avatar based on the input arguments"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar makeAvatar(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_AVATAR))) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).get();"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d new Avatar(null);"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return avatar;"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Remark based on the input arguments"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark makeRemark(ArgumentMultimap argMultimap) throws IllegalValueException {"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)) {"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(null);"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return remark;"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":164,"Esilocke":2}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser extends AddCommandParser {"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution."},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" protected static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/parser/AddTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ReadOnlyTask object in the context of AddTaskCommand."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParser extends AddCommandParser {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyTask from the arguments provided."},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static ReadOnlyTask constructTask(String args) throws ParseException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY,"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" PREFIX_ADDRESS, PREFIX_TASK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" TaskName name;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Description description;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Priority priority;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" TaskAddress address;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" description \u003d arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION)"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get()"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" : new Description(null);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" deadline \u003d arePrefixesPresent(argMultimap, PREFIX_DEADLINE)"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get()"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" : new Deadline(null);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" priority \u003d arePrefixesPresent(argMultimap, PREFIX_PRIORITY)"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get()"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" : new Priority(null);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" address \u003d arePrefixesPresent(argMultimap, PREFIX_ADDRESS)"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS)).get()"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" : new TaskAddress(null);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, address);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":67}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":"public class AddressBookParser {"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_NO_ACCESS \u003d \"Not allowed! You must unlock before\""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" + \" making any changes.\\n\" + UnlockCommand.MESSAGE_USAGE;"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args."},{"lineNumber":58,"author":{"gitId":"-"},"content":" */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Parses user input into command for execution."},{"lineNumber":65,"author":{"gitId":"-"},"content":" *"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @param userInput full user input string"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @return the command based on the user input"},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // Check lock state"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Parsing command. Lock state is currently: \" + Boolean.toString(lockState));"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());"},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");"},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" Command result \u003d processNonCrudCommands(commandWord, arguments);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" if (result !\u003d null) {"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" return result;"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // Test for lock. If locked, return no access message"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" if (lockState) {"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(MESSAGE_NO_ACCESS);"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_WORD:"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_ALIAS:"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommandParser().parse(arguments);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_WORD:"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_ALIAS:"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommandParser().parse(arguments);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:"},{"lineNumber":120,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:"},{"lineNumber":132,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_WORD:"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_ALIAS:"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" return new TagListCommand();"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":154,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:"},{"lineNumber":156,"author":{"gitId":"-"},"content":" return new HistoryCommand();"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:"},{"lineNumber":160,"author":{"gitId":"-"},"content":" return new UndoCommand();"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:"},{"lineNumber":164,"author":{"gitId":"-"},"content":" return new RedoCommand();"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_WORD:"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_ALIAS:"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommandParser().parse(arguments);"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_WORD:"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_ALIAS:"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommandParser().parse(arguments);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":179,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" * Checks for non crud command words or aliases and returns the relevant commmand if there is one."},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" * Otherwise control is returned back to the original parseCommand method."},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" * Note: Code was refactored due to codacy\u0027s recommendation that there was a problem with parseCommand\u0027s"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" * NPath complexity (i.e. it the code was too long. Makes it less readable and prone to errors)"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" * @param commandWord"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" * @param arguments"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" private Command processNonCrudCommands(String commandWord, String arguments) throws ParseException {"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality and for locking and unlocking"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_WORD:"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_ALIAS:"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return new OpenCommand();"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_WORD:"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_ALIAS:"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" return new SaveAsCommand();"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return new ExitCommand();"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" return new HelpCommand();"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_WORD:"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_ALIAS:"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return new SelectCommandParser().parse(arguments);"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_WORD:"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_ALIAS:"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" return new LocateCommandParser().parse(arguments);"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_WORD:"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_ALIAS:"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" return new NavigateCommandParser().parse(arguments);"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_WORD:"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_ALIAS:"},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommandParser().parse(arguments);"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_WORD:"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_ALIAS:"},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return new LockCommandParser().parse(arguments);"},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_WORD:"},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_ALIAS:"},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommandParser().parse(arguments);"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" return new ListCommand();"},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" return null;"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":249,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":106,"jeffreygohkw":19,"Esilocke":25,"wangyiming1019":29,"-":70}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * filepath."},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 1;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Parses the given user input and backs up data into a separate file name."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @param userInput"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ChangePasswordCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new ChangePassword object"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandParser implements Parser\u003cChangePasswordCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePasswordCommand"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a ChangePasswordCommand object for execution."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" .tokenize(args, PREFIX_PASSWORD, PREFIX_NEW_PASSWORD, PREFIX_CONFIRM_PASSWORD);"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" // Check and split arguments before passing them to ChangePasswordCommand"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_NEW_PASSWORD).isPresent()"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).isPresent()) {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException("},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String password \u003d argMultimap.getValue(PREFIX_PASSWORD).get();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String newPassword \u003d argMultimap.getValue(PREFIX_NEW_PASSWORD).get();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" String confirmPassword \u003d argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).get();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommand(password, newPassword, confirmPassword);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":38}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePrivacyCommand"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ChangePrivacyCommand object for execution."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ClearCommand object"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser implements Parser\u003cClearCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearPersonCommand();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new ClearTaskCommand();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person/\");"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TAG_FULL \u003d new Prefix(\"tag/\");"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"v/\");"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR_PRIVATE \u003d new Prefix(\"pv/\");"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task/\");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"p/\");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_STATE \u003d new Prefix(\"done/\");"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_PERSON \u003d new Prefix(\"fp/\");"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_TASK \u003d new Prefix(\"ft/\");"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_ADDRESS \u003d new Prefix(\"fa/\");"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_PERSON \u003d new Prefix(\"tp/\");"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_TASK \u003d new Prefix(\"tt/\");"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_ADDRESS \u003d new Prefix(\"ta/\");"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_NEW_PASSWORD \u003d new Prefix(\"np/\");"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_CONFIRM_PASSWORD \u003d new Prefix(\"cfp/\");"},{"lineNumber":45,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":14,"Esilocke":9,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommandParser().parse(filteredString);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return new DeleteTagCommandParser().parse(filteredArgs);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommandParser().parse(args);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/DeletePersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParser extends DeleteCommandParser {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand."},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand parse(String args) throws ParseException {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommand(index);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution."},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return indexList;"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":69}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParser {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object in the context of DeleteTaskCommand."},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand parse(String args) throws ParseException {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommand(index);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object"},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution."},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" requireNonNull(args);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommandParser().constructTaskDescriptor(filteredArgs);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(filteredArgs);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommandParser().constructPersonDescriptor(args);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":16,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/EditPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditPersonCommand object"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParser extends EditCommandParser {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditPersonCommand that edits a Person object. **/"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand constructPersonDescriptor(String args) throws ParseException {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" PREFIX_REMARK, PREFIX_AVATAR, PREFIX_TAG);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.EditPersonDescriptor editPersonDescriptor \u003d new EditPersonCommand.EditPersonDescriptor();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).ifPresent(editPersonDescriptor::setAvatar);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommand(index, editPersonDescriptor);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty."},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * {@code Set\u003cTag\u003e} containing zero tags."},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert tags !\u003d null;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (tags.isEmpty()) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return Optional.empty();"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":74}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditTagCommand"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * and returns an EditTagCommand object for execution."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return tagList;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/logic/parser/EditTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditTaskCommand object"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParser extends EditCommandParser {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditTaskCommand that edits a Task object. **/"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand constructTaskDescriptor(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY, PREFIX_ADDRESS);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Index index;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor editTaskDescriptor \u003d new EditTaskCommand.EditTaskDescriptor();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS))"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setTaskAddress);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommand(index, editTaskDescriptor);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommandParser().parse(args);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new FindTagCommandParser().parse(filteredArgs);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommandParser().parse(args);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/FindPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindPersonCommand object"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParser extends FindCommandParser {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindPersonCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an FindPersonCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindPersonCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution."},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/FindTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_STATE;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindTaskCommand object"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandParser extends FindCommandParser {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindTaskCommand"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * and returns an FindTaskCommand object for execution."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand parse(String args) throws ParseException {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(argsWithNoTaskPrefix, PREFIX_PRIORITY, PREFIX_STATE);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String keywords \u003d argMultimap.getPreamble();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d keywords.trim();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityFindRequired \u003d argMultimap.getValue(PREFIX_PRIORITY).isPresent();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" boolean isStateFindRequired \u003d argMultimap.getValue(PREFIX_STATE).isPresent();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" int minPriority \u003d 0;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" boolean isComplete \u003d false;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (isPriorityFindRequired) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" minPriority \u003d parsePriority(argMultimap.getValue(PREFIX_PRIORITY).get());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" if (isStateFindRequired) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" isComplete \u003d parseState(argMultimap.getValue(PREFIX_STATE).get());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords),"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" isStateFindRequired, isPriorityFindRequired, isComplete, minPriority));"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns an integer corresponding to its value"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Guarantees: The specified value is valid as a priority value"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private int parsePriority(String args) throws ParseException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(Priority.MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" int priority;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.parseInt(args.trim());"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (priority \u003c 1 || priority \u003e 5) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return priority;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns a boolean value corresponding to its value"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" private boolean parseState(String args) throws ParseException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" if (\"true\".equals(trimmed) || \"false\".equals(trimmed)) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return Boolean.valueOf(trimmed);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_COMPLETE_VALUE);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/logic/parser/FontSizeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParser implements Parser\u003cFontSizeCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final int PARAMETER_POSITION \u003d 0;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the FontSizeCommand"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a FontSizeCommand object for execution."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 1) {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" if (!FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])) {"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, FontSizeCommand.MESSAGE_USAGE));"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommand(argKeywords[PARAMETER_POSITION]);"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":48}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new LocateCommand object"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the LocateCommand"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an LocateCommand object for execution."},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/LockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class LockCommandParser implements Parser\u003cLockCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the LockCommand"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * and returns a LockCommand object for execution."},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public LockCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[0]);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[1]);"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":36}},{"path":"src/main/java/seedu/address/logic/parser/NavigateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.stream.Stream;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new NavigateCommand object"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParser implements Parser\u003cNavigateCommand\u003e {"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" private Location from \u003d null;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private Location to \u003d null;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Index fromIndex \u003d null;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Index toIndex \u003d null;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the NavigateCommand"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an NavigateCommand object for execution."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand parse(String args) throws ParseException {"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" resetValues();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argumentMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_NAVIGATE_FROM_PERSON,"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_FROM_TASK, PREFIX_NAVIGATE_FROM_ADDRESS, PREFIX_NAVIGATE_TO_PERSON,"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_TO_TASK, PREFIX_NAVIGATE_TO_ADDRESS);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_ADDRESS);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_PERSON);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_TASK);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" boolean toAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_ADDRESS);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" boolean toPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_PERSON);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" boolean toTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_TASK);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkFrom(argumentMultimap, fromAddress, fromPerson, fromTask);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" checkTo(argumentMultimap, toAddress, toPerson, toTask);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return new NavigateCommand(from, to, fromIndex, toIndex, fromTask, toTask);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * Resets the values stored in NavigateCommandParser object to null"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void resetValues() {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d null;"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d null;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d null;"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d null;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Checksif only 1 To argument is provided"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no To arguments or there are more than 1 To arguements"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" private void checkTo(ArgumentMultimap argumentMultimap, boolean toAddress, boolean toPerson, boolean toTask)"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (!(toAddress || toPerson || toTask)) {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((toAddress \u0026\u0026 (toPerson || toTask)) || (toPerson \u0026\u0026 toTask)) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more to prefixes are present"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, toAddress, toPerson, false);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if only 1 From argument is provided"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no From arguments or there are more than 1 From arguments"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person,"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" boolean forFrom) throws IllegalValueException {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress("},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":144}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Collection;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes."},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type."},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtil {"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * trimmed."},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer)."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present."},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Name to be private if true."},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present."},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Phone to be private if true."},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":101,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":102,"author":{"gitId":"-"},"content":" */"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present."},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Address to be private if true."},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e avatar} into an {@code Optional\u003cAddress\u003e} if {@code avatar} is present."},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAvatar\u003e parseAvatar(Optional\u003cString\u003e avatar) throws IllegalValueException {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(avatar);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" return avatar.isPresent() ? Optional.of(new Avatar(avatar.get())) : Optional.empty();"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present."},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Remark to be private if true."},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":152,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":153,"author":{"gitId":"-"},"content":" */"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present."},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Email to be private if true."},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters."},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":171,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":172,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}."},{"lineNumber":173,"author":{"gitId":"-"},"content":" */"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" requireNonNull(tags);"},{"lineNumber":176,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" for (String tagName : tags) {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":" return tagSet;"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present."},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present."},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present."},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present."},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a {@code TaskAddress} if it is present."},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cTaskAddress\u003e parseTaskAddress(Optional\u003cString\u003e address) throws IllegalValueException {"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new TaskAddress(address.get())) : Optional.empty();"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a (@code Location) if it is present."},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cLocation\u003e parseLocationFromAddress(Optional\u003cString\u003e location) throws IllegalValueException {"},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(location);"},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return location.isPresent() ? Optional.of(new Location(location.get())) : Optional.empty();"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" * the value in the String."},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" public static ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" int parsedInt;"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" if (!s.isEmpty()) {"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":123,"Esilocke":64,"-":66}},{"path":"src/main/java/seedu/address/logic/parser/PrivacyLevelCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new PrivacyLevelCommand object"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParser implements Parser\u003cPrivacyLevelCommand\u003e {"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the PrivacyLevelCommand"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an PrivacyLevelCommand object for execution."},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand parse(String args) throws ParseException {"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" int level \u003d ParserUtil.parseIndex(args).getOneBased();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommand(level);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException("},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, PrivacyLevelCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":27}},{"path":"src/main/java/seedu/address/logic/parser/SelectCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new SelectCommand object"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class SelectCommandParser implements Parser\u003cSelectCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * and returns an SelectCommand object for execution."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public SelectCommand parse(String args) throws ParseException {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\").trim();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommandParser().parse(trimmed);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommandParser().parse(args);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/SelectPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectPersonCommand object"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParser extends SelectCommandParser {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectPersonCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectPersonCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommand(index);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SelectTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectTaskCommand object"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParser extends SelectCommandParser {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectTaskCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectTaskCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommand(index);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int LIST_ARG_POSITION \u003d 0;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 1;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 2;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 3;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e PERSON_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(0, 4);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e TASK_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(4, 6);"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution."},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Eliminate spaces"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(0))"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 TASK_FIELD_ARGS.contains(argKeywords[1]))"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(1))"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 PERSON_FIELD_ARGS.contains(argKeywords[1]))) {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_LIST_PARAMETERS.contains(argKeywords[LIST_ARG_POSITION])) {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[LIST_ARG_POSITION],"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":66}},{"path":"src/main/java/seedu/address/logic/parser/ThemeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ThemeCommand object"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParser implements Parser\u003cThemeCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ThemeCommand"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ThemeCommand object for execution."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand parse(String args) throws ParseException {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution."},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException("},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/UnlockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommandParser implements Parser\u003cUnlockCommand\u003e {"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d \"Password is required\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the UnlockCommand"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a UnlockCommand object for execution."},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand parse(String args) throws ParseException {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException("},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[0]);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[1]);"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ViewAssignCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ViewAssignCommand object"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParser implements Parser\u003cViewAssignCommand\u003e {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand parse(String args) throws ParseException {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommand(index);"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" throw new ParseException("},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":24}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashMap;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)"},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private HashMap\u003cString, String\u003e styleMap;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"},{"lineNumber":45,"author":{"gitId":"-"},"content":" *"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * among constructors."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" styleMap \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public AddressBook() {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" initialiseStyleMap();"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}"},{"lineNumber":62,"author":{"gitId":"-"},"content":" */"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" resetData(toBeCopied);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" //// list overwrite operations"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" requireNonNull(newData);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":97,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}."},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasks.clearAssignees();"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":125,"author":{"gitId":"-"},"content":" //// person-level operations"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":128,"author":{"gitId":"-"},"content":" * Adds a person to the address book."},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,"},{"lineNumber":130,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}."},{"lineNumber":131,"author":{"gitId":"-"},"content":" *"},{"lineNumber":132,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists."},{"lineNumber":133,"author":{"gitId":"-"},"content":" */"},{"lineNumber":134,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);"},{"lineNumber":137,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":138,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":139,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":140,"author":{"gitId":"-"},"content":" persons.add(newPerson);"},{"lineNumber":141,"author":{"gitId":"-"},"content":" }"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}."},{"lineNumber":145,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}."},{"lineNumber":146,"author":{"gitId":"-"},"content":" *"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":149,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":150,"author":{"gitId":"-"},"content":" *"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)"},{"lineNumber":154,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);"},{"lineNumber":158,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":160,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":161,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":162,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" public void sortTasksBy(String field, String order) {"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" tasks.sortBy(field, order);"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the index of {@code ReadOnlyPerson} specified"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractPersonIndexes(ArrayList\u003cReadOnlyPerson\u003e personsToExtract) {"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return persons.extractIndexes(personsToExtract);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}."},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":201,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);"},{"lineNumber":202,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":203,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":204,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":205,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}."},{"lineNumber":206,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}."},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":208,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":209,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);"},{"lineNumber":210,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":211,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:"},{"lineNumber":214,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":216,"author":{"gitId":"-"},"content":" */"},{"lineNumber":217,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {"},{"lineNumber":218,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());"},{"lineNumber":219,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list"},{"lineNumber":222,"author":{"gitId":"-"},"content":" // used for checking person tag references"},{"lineNumber":223,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();"},{"lineNumber":224,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list."},{"lineNumber":227,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();"},{"lineNumber":228,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));"},{"lineNumber":229,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}"},{"lineNumber":235,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list"},{"lineNumber":236,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)"},{"lineNumber":237,"author":{"gitId":"-"},"content":" */"},{"lineNumber":238,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {"},{"lineNumber":239,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":244,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":245,"author":{"gitId":"-"},"content":" */"},{"lineNumber":246,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {"},{"lineNumber":247,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":249,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":250,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":251,"author":{"gitId":"-"},"content":" }"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the UniquePersonList"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" return persons.getMappings();"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":264,"author":{"gitId":"-"},"content":" //// tag-level operations"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {"},{"lineNumber":267,"author":{"gitId":"-"},"content":" tags.add(t);"},{"lineNumber":268,"author":{"gitId":"-"},"content":" }"},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" //// task-level operations"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book."},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists."},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified person from all assignment lists for every task **/"},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" public void removePersonFromAssignees(Index target) {"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" tasks.removeAssignee(target);"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" * Updates the Assignees for all tasks in the internal tasks list with their new mappings"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" public void updateTaskAssigneeMappings(Index[] mappings) {"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" tasks.updateAssignees(mappings);"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}."},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":325,"author":{"gitId":"-"},"content":" //// theme-level operations"},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Initialises the style map by adding the key value pairs"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" * for the strings that will be input in ThemeCommand and the file name of the .css file"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void initialiseStyleMap() {"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"/view/DarkTheme.css\");"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"/view/DarkTheme.css\");"},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"/view/LightTheme.css\");"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"/view/LightTheme.css\");"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" return styleMap;"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":" //// util methods"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":345,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\""},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";"},{"lineNumber":348,"author":{"gitId":"-"},"content":" // TODO: refine later"},{"lineNumber":349,"author":{"gitId":"-"},"content":" }"},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":352,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":353,"author":{"gitId":"-"},"content":" return persons.asObservableList();"},{"lineNumber":354,"author":{"gitId":"-"},"content":" }"},{"lineNumber":355,"author":{"gitId":"-"},"content":""},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromPersonList(int index) {"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" return persons.asObservableList().get(index);"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":368,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":369,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":370,"author":{"gitId":"-"},"content":" return tags.asObservableList();"},{"lineNumber":371,"author":{"gitId":"-"},"content":" }"},{"lineNumber":372,"author":{"gitId":"-"},"content":""},{"lineNumber":373,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":374,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":375,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":376,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls"},{"lineNumber":377,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);"},{"lineNumber":380,"author":{"gitId":"-"},"content":" }"},{"lineNumber":381,"author":{"gitId":"-"},"content":""},{"lineNumber":382,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":383,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":384,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);"},{"lineNumber":386,"author":{"gitId":"-"},"content":" }"},{"lineNumber":387,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":25,"Esilocke":131,"wangyiming1019":17,"-":193}},{"path":"src/main/java/seedu/address/model/Location.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Location in the address book."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidLocation(String)}"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class Location {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" \"Location can take any value, and it should not be blank\";"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" /*"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String LOCATION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given location."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given location string is invalid."},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public Location(String location) throws IllegalValueException {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (location \u003d\u003d null) {"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidLocation(location)) {"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d location;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid location."},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidLocation(String test) {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(LOCATION_VALIDATION_REGEX);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof Location // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Location) other).value)); // state check"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The API of the Model component."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public interface Model {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */"},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" /** Deletes the given person. */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Adds the given person */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}."},{"lineNumber":64,"author":{"gitId":"-"},"content":" *"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":70,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}."},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list."},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /** Displays all persons assigned to the specified task */"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" void viewAssignees(ReadOnlyTask task);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}."},{"lineNumber":114,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":115,"author":{"gitId":"-"},"content":" */"},{"lineNumber":116,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}."},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by chosen field in ascending (asc) or descending (desc) order"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" * Sorts all tasks in task list by chosen field in ascending (asc) or descending (desc) order"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" void sortTasks(String field, String order);"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Returns lock state. True means locked. False means unlocked"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" boolean getLockState();"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" * Locks address book from model"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" void lockAddressBookFromModel();"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Unlock address book from model"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" void unlockAddressBookFromModel();"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" * Returns a copy of the UserPrefs"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" UserPrefs getUserPrefs();"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson getPersonAtIndexFromAddressBook(int index);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" void setTheme(String theme);"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" String getTheme();"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" HashMap\u003cString, String\u003e getStyleMap();"},{"lineNumber":174,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":15,"Esilocke":58,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePrivacyLevelPredicate;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPrivacyLevelPredicate;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPrivacyLevelPredicate;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.PersonCompleteMatchPredicate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data."},{"lineNumber":50,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized."},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" private final UserPrefs userPrefs;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs."},{"lineNumber":64,"author":{"gitId":"-"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.userPrefs \u003d userPrefs;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d userPrefs.getTheme();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" public ModelManager() {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":103,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":105,"author":{"gitId":"-"},"content":" }"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */"},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":113,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" persons.add(target);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d addressBook.extractPersonIndexes(persons);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" Index personIndex \u003d personIndexes.get(0);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" addressBook.removePersonFromAssignees(personIndex);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list."},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":142,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":143,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":145,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list."},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {"},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":166,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":167,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":168,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);"},{"lineNumber":172,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" Index[] updatedIndexes \u003d addressBook.getMappings();"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" System.out.println(updatedIndexes.length);"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" addressBook.updateTaskAssigneeMappings(updatedIndexes);"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks(String field, String order) {"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(field, order);"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" return userPrefs;"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public boolean getLockState() {"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return getUserPrefs().getAddressBookLockState();"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBookFromModel() {"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().lockAddressBook();"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBookFromModel() {"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().unlockAddressBook();"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes."},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag."},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" int index;"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":235,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);"},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);"},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();"},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToAssign);"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d newAssignees.assign(positions);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneAdded) {"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToAssignTo, newAssignees);"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToAssignTo, updatedTask);"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToDismiss);"},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneDismissed \u003d newAssignees.dismiss(positions);"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneDismissed) {"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToDismissFrom, newAssignees);"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToDismissFrom, updatedTask);"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();"},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d toSet.getTaskAddress();"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state, taskAddress);"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d task.getAssignees();"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e internalList \u003d assignees.getList();"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToShow \u003d new ArrayList\u003c\u003e();"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" for (Index i : internalList) {"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" assert(i.getZeroBased() \u003c filteredPersons.size());"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" personsToShow.add(filteredPersons.get(i.getZeroBased()));"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" PersonCompleteMatchPredicate assignedPredicate \u003d new PersonCompleteMatchPredicate(personsToShow);"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" updateFilteredPersonList(assignedPredicate);"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":337,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":338,"author":{"gitId":"-"},"content":""},{"lineNumber":339,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":340,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of"},{"lineNumber":341,"author":{"gitId":"-"},"content":" * {@code addressBook}"},{"lineNumber":342,"author":{"gitId":"-"},"content":" */"},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":344,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":345,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);"},{"lineNumber":346,"author":{"gitId":"-"},"content":" }"},{"lineNumber":347,"author":{"gitId":"-"},"content":""},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(predicate);"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 3) {"},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" if (predicate instanceof NameContainsKeywordsPredicate) {"},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsKeywordsPrivacyLevelPredicate((("},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPredicate) predicate).getKeywords()));"},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsTagsPredicate) {"},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsTagsPrivacyLevelPredicate((("},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsTagsPredicate) predicate).getTags()));"},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsFavouritePredicate) {"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsFavouritePrivacyLevelPredicate());"},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate \u003d\u003d PREDICATE_SHOW_ALL_PERSONS) {"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());"},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":386,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":387,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {"},{"lineNumber":388,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":389,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {"},{"lineNumber":390,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":391,"author":{"gitId":"-"},"content":" }"},{"lineNumber":392,"author":{"gitId":"-"},"content":""},{"lineNumber":393,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":394,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {"},{"lineNumber":395,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":396,"author":{"gitId":"-"},"content":" }"},{"lineNumber":397,"author":{"gitId":"-"},"content":""},{"lineNumber":398,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":399,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;"},{"lineNumber":400,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)"},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);"},{"lineNumber":403,"author":{"gitId":"-"},"content":" }"},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Utility methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" * Constructs a new {@code ReadOnlyTask} from an existing ReadOnlyTask, with the specified assignees list."},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyTask constructTaskWithNewAssignee(ReadOnlyTask originalTask, Assignees updatedAssignees) {"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d originalTask.getTaskName();"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" Description description \u003d originalTask.getDescription();"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d originalTask.getDeadline();"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d originalTask.getPriority();"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d originalTask.getCompleteState();"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d originalTask.getTaskAddress();"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, updatedAssignees,"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" state, taskAddress);"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" return updatedTask;"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":424,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":425,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":426,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":427,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c 1 || level \u003e 3) {"},{"lineNumber":428,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy Level can only be 0, 1 or 2\");"},{"lineNumber":429,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":430,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":431,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":432,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":434,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":435,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":436,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":437,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":438,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":439,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {"},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getPersonAtIndexFromPersonList(index);"},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {"},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;"},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" userPrefs.setTheme(theme);"},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" return theme;"},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {"},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getStyleMap();"},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":461,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":72,"Esilocke":186,"wangyiming1019":58,"-":110}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list."},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();"},{"lineNumber":29,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String addressBookFilePath \u003d \"data/addressbook.xml\";"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private String addressBookName \u003d \"My Address++\";"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private boolean addressBookLockState \u003d false;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private String addressBookEncryptedPassword \u003d Hashing.sha256()"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" .hashString(\"password\", StandardCharsets.UTF_8).toString();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" public UserPrefs() {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" this.setGuiSettings(1080, 720, 0, 0);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return addressBookFilePath;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" public String getAddressBookName() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" return addressBookName;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public String getAddressBookEncryptedPassword() {"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" return addressBookEncryptedPassword;"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void setAddressBookEncryptedPassword(String addressBookPasswordInput) {"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" this.addressBookEncryptedPassword \u003d Hashing.sha256()"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" .hashString(addressBookPasswordInput, StandardCharsets.UTF_8).toString();"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBook() {"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d true;"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBook() {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d false;"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean getAddressBookLockState() {"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return this.addressBookLockState;"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well."},{"lineNumber":82,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":83,"author":{"gitId":"-"},"content":" }"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)"},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookEncryptedPassword, o.addressBookEncryptedPassword)"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":100,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());"},{"lineNumber":103,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nPassword : \" + addressBookEncryptedPassword);"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));"},{"lineNumber":107,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (theme \u003d\u003d null) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return \"/view/DarkTheme.css\";"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return theme;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":12,"-":74}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given address."},{"lineNumber":27,"author":{"gitId":"-"},"content":" *"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address) throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.value \u003d address;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this(address);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid person address."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s avatar filepath in the address book."},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"public class Avatar {"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" \"Person avatar can take any values, and it should not be blank\";"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" * Validates given address."},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public Avatar(String address) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d AVATAR_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" if (!isValidAvatar(address)) {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d address;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidAvatar(String test) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return test.matches(AVATAR_VALIDATION_REGEX) || test.equals(AVATAR_PLACEHOLDER_VALUE);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Avatar // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":57,"jeffreygohkw":6}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given email."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email) throws IllegalValueException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this(email);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":42,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Validates given name."},{"lineNumber":28,"author":{"gitId":"-"},"content":" *"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name) throws IllegalValueException {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d trimmedName;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(name);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":71,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Name) other).value)); // state check"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":47,"-":48}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured."},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured and has no private fields"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsFavouritePrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsFavouritePrivacyLevelPredicate() {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return (person.getFavourite() \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsFavouritePrivacyLevelPredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given."},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameContainsKeywordsPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public NameContainsKeywordsPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" this.keywords \u003d keywords;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" }"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" return keywords.stream()"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword));"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getKeywords() {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" return keywords;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":33,"author":{"gitId":"-"},"content":" || (other instanceof NameContainsKeywordsPredicate // instanceof handles nulls"},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPredicate) other).keywords)); // state check"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":7,"-":30}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" * and has no private fields"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsKeywordsPrivacyLevelPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.keywords \u003d keywords;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return (keywords.stream()"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword))"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsKeywordsPrivacyLevelPredicate // instanceof handles nulls"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPrivacyLevelPredicate) other).keywords)); //state check"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given."},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/\")) {"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(1));"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getTags() {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return tags;"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":6,"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags and hasno private fields."},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsTagsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e tags;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsTagsPrivacyLevelPredicate(List\u003cString\u003e tags) {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.tags \u003d tags;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" String allTagString \u003d convertTagToString(person);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (isOnlyUnwantedTags) {"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" return (!(unwantedTag.stream()"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))))"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" return (wantedTag.stream()"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !(unwantedTag.stream()"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))))"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" * check only unwanted tag list has elements"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" * @return a boolean value"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e unwantedTag) {"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return false;"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Update the wantedTag and unwantedTag list"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * @param wantedTag list of tags to be searched"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param unwantedTag list of tags to not be searched"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" for (String everyTag : tags) {"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (!everyTag.startsWith(\"/\")) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" wantedTag.add(everyTag);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" unwantedTag.add(everyTag.substring(1));"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * Convert a set of tags to Strings"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private String convertTagToString(ReadOnlyPerson person) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" StringBuilder allTagNames \u003d new StringBuilder();"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : personTags) {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(tag.getTagName());"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(\" \");"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return allTagNames.toString().trim();"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":86}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cAvatar\u003e avatar;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Every field must be present and not null."},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Boolean favourite, Remark remark, Avatar avatar, Set\u003cTag\u003e tags) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" this.avatar \u003d new SimpleObjectProperty\u003c\u003e(avatar);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" source.getRemark(), source.getAvatar(), source.getTags());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return name;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public Name getName() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return name.get();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return phone;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public Phone getPhone() {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" return phone.get();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return email;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public Email getEmail() {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" return email.get();"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" return address;"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public Address getAddress() {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return address.get();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return favourite;"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" return remark.get();"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void setAvatar(Avatar avatar) {"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" this.avatar.set(requireNonNull(avatar));"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cAvatar\u003e avatarProperty() {"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" return avatar;"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" public Avatar getAvatar() {"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" return avatar.get();"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":155,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}"},{"lineNumber":157,"author":{"gitId":"-"},"content":" * if modification is attempted."},{"lineNumber":158,"author":{"gitId":"-"},"content":" */"},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" }"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":166,"author":{"gitId":"-"},"content":" }"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set."},{"lineNumber":170,"author":{"gitId":"-"},"content":" */"},{"lineNumber":171,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":176,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":177,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":178,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls"},{"lineNumber":179,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":183,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":184,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags, avatar);"},{"lineNumber":186,"author":{"gitId":"-"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" return getAsText();"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.getName().setPrivacyLevel(level);"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" this.getPhone().setPrivacyLevel(level);"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" this.getEmail().setPrivacyLevel(level);"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" this.getAddress().setPrivacyLevel(level);"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" this.getRemark().setPrivacyLevel(level);"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if the Person has at least one private field and false otherwise"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" public boolean hasPrivateField() {"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return (this.getName().getIsPrivate() || this.getPhone().getIsPrivate() || this.getAddress().getIsPrivate()"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" || this.getEmail().getIsPrivate() || this.getRemark().getIsPrivate());"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":37,"jeffreygohkw":25,"wangyiming1019":20,"-":134}},{"path":"src/main/java/seedu/address/model/person/PersonCompleteMatchPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s matches any one of the keywords"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class PersonCompleteMatchPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" private final List\u003cReadOnlyPerson\u003e keywords;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public PersonCompleteMatchPredicate(List\u003cReadOnlyPerson\u003e keywords) {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return keywords.stream()"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" .anyMatch(person::equals);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || (other instanceof PersonCompleteMatchPredicate // instanceof handles nulls"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((PersonCompleteMatchPredicate) other).keywords)); // state check"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Validates given phone number."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone) throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number."},{"lineNumber":47,"author":{"gitId":"-"},"content":" */"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":69,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls"},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook."},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();"},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();"},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();"},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();"},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cAvatar\u003e avatarProperty();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" Avatar getAvatar();"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" boolean hasPrivateField();"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":42,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards"},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())"},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark())"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getAvatar().equals(this.getAvatar());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details."},{"lineNumber":54,"author":{"gitId":"-"},"content":" */"},{"lineNumber":55,"author":{"gitId":"-"},"content":" default String getAsText() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" builder.append(getName())"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Phone: \")"},{"lineNumber":59,"author":{"gitId":"-"},"content":" .append(getPhone())"},{"lineNumber":60,"author":{"gitId":"-"},"content":" .append(\" Email: \")"},{"lineNumber":61,"author":{"gitId":"-"},"content":" .append(getEmail())"},{"lineNumber":62,"author":{"gitId":"-"},"content":" .append(\" Address: \")"},{"lineNumber":63,"author":{"gitId":"-"},"content":" .append(getAddress())"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" .append(\" Avatar: \")"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" .append(getAvatar())"},{"lineNumber":68,"author":{"gitId":"-"},"content":" .append(\" Tags: \");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" return builder.toString();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book."},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private int privacyLevel \u003d 2;"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark."},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" *"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid."},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this(remark);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Remark\u003e\";"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return value;"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":66,"jeffreygohkw":29}},{"path":"src/main/java/seedu/address/model/person/ShowAllPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured after taking into account privacy level."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class ShowAllPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public ShowAllPrivacyLevelPredicate() {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return !person.hasPrivateField();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ShowAllPrivacyLevelPredicate); // instanceof handles nulls"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Iterator;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":23,"author":{"gitId":"-"},"content":" *"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations."},{"lineNumber":25,"author":{"gitId":"-"},"content":" *"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cPerson\u003e internalCopy \u003d FXCollections.observableArrayList();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" // used by asObservableList()"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public boolean contains(ReadOnlyPerson toCheck) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Adds a person to the list."},{"lineNumber":46,"author":{"gitId":"-"},"content":" *"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list."},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" internalList.add(new Person(toAdd));"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}."},{"lineNumber":59,"author":{"gitId":"-"},"content":" *"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list."},{"lineNumber":61,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":62,"author":{"gitId":"-"},"content":" */"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" internalList.set(index, new Person(editedPerson));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list."},{"lineNumber":81,"author":{"gitId":"-"},"content":" *"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":83,"author":{"gitId":"-"},"content":" */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list."},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list."},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" *"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));"},{"lineNumber":131,"author":{"gitId":"-"},"content":" }"},{"lineNumber":132,"author":{"gitId":"-"},"content":" setPersons(replacement);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" }"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":136,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":137,"author":{"gitId":"-"},"content":" */"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the {@code ReadOnlyPerson} specified"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractIndexes(ArrayList\u003cReadOnlyPerson\u003e persons) {"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : persons) {"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" int position \u003d internalList.indexOf(p);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromZeroBased(position));"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return indexes;"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the internalList before sorting"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index[] mappings \u003d new Index[internalCopy.size()];"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" int count \u003d 0;"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" for (Person p : internalCopy) {"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(p);"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" mappings[count] \u003d Index.fromZeroBased(index);"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" count++;"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" return mappings;"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" * @param field"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * @param order"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalList.size());"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" internalCopy.clear();"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" for (Person p : internalList) {"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" internalCopy.add(p);"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalCopy.size());"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);"},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" switch (field) {"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" case \"name\":"},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;"},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;"},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" case \"email\":"},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" case \"address\":"},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;"},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering"},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" switch (order) {"},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":"},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":"},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":258,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":259,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {"},{"lineNumber":260,"author":{"gitId":"-"},"content":" return internalList.iterator();"},{"lineNumber":261,"author":{"gitId":"-"},"content":" }"},{"lineNumber":262,"author":{"gitId":"-"},"content":""},{"lineNumber":263,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":264,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":265,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":266,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls"},{"lineNumber":267,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));"},{"lineNumber":268,"author":{"gitId":"-"},"content":" }"},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":271,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":272,"author":{"gitId":"-"},"content":" return internalList.hashCode();"},{"lineNumber":273,"author":{"gitId":"-"},"content":" }"},{"lineNumber":274,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":89,"Esilocke":35,"wangyiming1019":31,"-":119}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name."},{"lineNumber":20,"author":{"gitId":"-"},"content":" *"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls"},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing."},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Assignees {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e assignedList;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public Assignees(ArrayList\u003cIndex\u003e assignees) {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public Assignees() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public Assignees(Assignees toCopy) {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(toCopy.getList());"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean assign(ArrayList\u003cIndex\u003e personsToAssign) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d false;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" for (Index i : personsToAssign) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!assignedList.contains(i)) {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assignedList.add(i);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" atLeastOneAdded \u003d true;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return atLeastOneAdded;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /** Updates the internal assignedList with the correct Index values after a sort operation */"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void updateList(Index[] mappings) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e updatedList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" for (Index i : assignedList) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Index updatedPosition \u003d mappings[i.getZeroBased()];"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" updatedList.add(updatedPosition);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedList.clear();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(updatedList);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list, and returns true if at least 1 person was removed */"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public boolean dismiss(ArrayList\u003cIndex\u003e personsToDismiss) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return assignedList.removeAll(personsToDismiss);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e getList() {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this.assignedList;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Deletes the specified index from the internal list, and decrements all other indexes in the assigned list"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * that have a value lower than the deleted index by 1."},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void decrementIndex(Index deletedIndex) {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(deletedIndex);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c assignedList.size(); i++) {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index current \u003d assignedList.get(i);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (current.getZeroBased() \u003e deletedIndex.getZeroBased()) {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" int indexValue \u003d current.getZeroBased() - 1;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index decrementedIndex \u003d Index.fromZeroBased(indexValue);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assignedList.set(i, decrementedIndex);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return assignedList.hashCode();"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":90}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Date;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.DateGroup;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.Parser;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class Deadline {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_DATE \u003d"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" \"The specified date is invalid.\";"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public final Date date;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null || deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.date \u003d null;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" this.date \u003d setDateFromArgs(deadline);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d date.toString();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" setDateFromArgs(test);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Returns a Date object that represents the given date string."},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static Date setDateFromArgs(String date) throws IllegalValueException {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Parser deadlineParser \u003d new Parser();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cDateGroup\u003e groups \u003d deadlineParser.parse(date);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cDate\u003e dates \u003d null;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" for (DateGroup group : groups) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" dates \u003d group.getDates();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (dates \u003d\u003d null) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_INVALID_DATE);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return dates.get(0);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":86}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description."},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Priority {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String[] PRIORITY_TEXT_STRINGS \u003d {\"\", \"Lowest\", \"Low\", \"Medium\", \"High\", \"Highest\"};"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 0;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final int value;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given priority."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null || priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d 0;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d Integer.parseInt(trimmedPriority);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return PRIORITY_TEXT_STRINGS[value];"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value \u003d\u003d ((Priority) other).value); // state check"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":75}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" TaskAddress getTaskAddress();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskAddress\u003e taskAddressProperty();"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e changeStateProperty();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" void changeState();"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .append(\" Address: \")"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .append(getTaskAddress())"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .append(\" \")"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return builder.toString();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState()"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskAddress().equals(this.getTaskAddress());"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskAddress\u003e taskAddress;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete, TaskAddress taskAddress) {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * by default."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState(), task.getTaskAddress());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return taskName.get();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return description.get();"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return deadline.get();"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return priority.get();"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return assignees.get();"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return state.get();"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public TaskAddress getTaskAddress() {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return taskAddress.get();"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return getAsText();"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" return description;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return deadline;"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return priority;"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return assignees;"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskAddress\u003e taskAddressProperty() {"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" return taskAddress;"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e changeStateProperty() {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d getCompleteState();"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (state) {"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as incomplete\");"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as complete\");"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" public void changeState() {"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" this.setState(!this.getCompleteState());"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" this.taskAddress.set(taskAddress);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String printableState;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" return printableState;"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":200}},{"path":"src/main/java/seedu/address/model/task/TaskAddress.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Task\u0027s address in the address book."},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidTaskAddress(String)}"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class TaskAddress {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" \"Task addresses can take any values, and it should not be blank\";"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /*"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public final String taskAddress;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given address."},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given address string is invalid."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public TaskAddress(String address) throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" if (address \u003d\u003d null) {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d ADDRESS_PLACEHOLDER_VALUE;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidTaskAddress(address)) {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_TASK_ADDRESS_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d address;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid task address."},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidTaskAddress(String test) {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof TaskAddress // instanceof handles nulls"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.taskAddress.equals(((TaskAddress) other).taskAddress)); // state check"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress.hashCode();"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"}"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByState;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByPriority;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private boolean isComplete;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private int basePriority;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords, boolean isStateCheckRequired,"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityCheckRequired, boolean isComplete, int basePriority) {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d isPriorityCheckRequired;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d isStateCheckRequired;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d isComplete;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d basePriority;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d false;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d false;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d false;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d 0;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" for (String keyword : keywords) {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (needFilterByState \u0026\u0026 task.getCompleteState() !\u003d isComplete) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } else if (needFilterByPriority \u0026\u0026 task.getPriority().value \u003c basePriority) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } else if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByPriority \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByPriority"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByState \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByState"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isComplete \u003d\u003d ((TaskContainsKeywordPredicate) other).isComplete"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.basePriority \u003d\u003d ((TaskContainsKeywordPredicate) other).basePriority); // state check"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book."},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class TaskName {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public final String taskName;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Validates given name."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public String toString() {"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return taskName;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument."},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}."},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list."},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list."},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list."},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" * Removes all assignees from all tasks."},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" t.clearAssignees();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified assignee from all tasks **/"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void removeAssignee(Index personIndex) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" updated.decrementIndex(personIndex);"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" internalList.clear();"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" * Updates the assignee list within each task to match that of the newPersonIndexes."},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * This method is called after a sort persons operation due to the order change"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public void updateAssignees(Index[] newPersonIndexes) {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" updated.updateList(newPersonIndexes);"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" internalList.clear();"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * Sorts person list by all persons by any field in ascending or descending order"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e comparator \u003d null;"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" /*"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e priorityComparator \u003d Comparator.comparingInt(o -\u003e o.getPriority().value);"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e deadlineComparator \u003d (o1, o2) -\u003e {"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" if (o1.getDeadline().date \u003d\u003d null || o2.getDeadline().date \u003d\u003d null) {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return 0;"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" switch (field) {"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" case \"priority\":"},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d priorityComparator;"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" case \"deadline\":"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d deadlineComparator;"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" switch (order) {"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");"},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");"},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {"},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();"},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":60,"Esilocke":179}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects."},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task."},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class SampleDataUtil {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" return new Person[] {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"), new Avatar(\"\"),"},{"lineNumber":29,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),"},{"lineNumber":30,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"), new Avatar(\"\"),"},{"lineNumber":33,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),"},{"lineNumber":34,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"), new Avatar(\"\"),"},{"lineNumber":37,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),"},{"lineNumber":38,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"), new Avatar(\"\"),"},{"lineNumber":41,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),"},{"lineNumber":42,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"), new Avatar(\"\"),"},{"lineNumber":45,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),"},{"lineNumber":46,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"), new Avatar(\"\"),"},{"lineNumber":49,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))"},{"lineNumber":50,"author":{"gitId":"-"},"content":" };"},{"lineNumber":51,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return sampleAb;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given."},{"lineNumber":70,"author":{"gitId":"-"},"content":" */"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" for (String s : strings) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}."},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found."},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format."},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage."},{"lineNumber":35,"author":{"gitId":"-"},"content":" * @param addressBook cannot be null."},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem writing to the file."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" void changeFilePath(String fp, UserPrefs u);"},{"lineNumber":46,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":2,"-":43}},{"path":"src/main/java/seedu/address/storage/Storage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * API of the Storage component"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public interface Storage extends AddressBookStorage, UserPrefsStorage {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":19,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":22,"author":{"gitId":"-"},"content":" void saveUserPrefs(UserPrefs userPrefs) throws IOException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":25,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location. Subscribes to BackupRequestEvent"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" void handleBackupAddressBook(BackupRequestEvent event) throws IOException;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Saves the current version of the Address Book to the hard disk."},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Creates the data file if it is missing."},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Raises {@link DataSavingExceptionEvent} if there was an error during saving."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" void handleAddressBookChangedEvent(AddressBookChangedEvent abce);"},{"lineNumber":46,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":8,"-":38}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" @Subscribe"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" public void handleBackupAddressBook(BackupRequestEvent event) throws IOException {"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyAddressBook addressBook \u003d event.getModel().getAddressBook();"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" String args \u003d event.getArgs();"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, args);"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));"},{"lineNumber":97,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":11,"jeffreygohkw":8,"-":91}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedIndex.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlValue;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * JAXB-friendly adapted version of the Index."},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedIndex {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" @XmlValue"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private int index;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedIndex."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex() {}"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Converts a given Index into this class for JAXB use."},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex(Index source) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d source.getZeroBased();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted tag object into an Index object."},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints\\"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public Index toModelType() throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return Index.fromZeroBased(index);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private String name;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;"},{"lineNumber":29,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private String phone;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private String email;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String address;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" private String remark;"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private String avatar;"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson."},{"lineNumber":55,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use."},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().value;"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d source.getAvatar().value;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().getIsPrivate();"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().getIsPrivate();"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().getIsPrivate();"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().getIsPrivate();"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().getIsPrivate();"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object."},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tags);"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":71,"wangyiming1019":3,"-":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private String name;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private String description;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private String deadline;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private String priority;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String state;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @XmlElement"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedIndex\u003e assignees \u003d new ArrayList\u003c\u003e();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private String address;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask."},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use."},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.toString(source.getPriority().value);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" address \u003d source.getTaskAddress().taskAddress;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assignees \u003d new ArrayList\u003c\u003e();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (Index i : source.getAssignees().getList()) {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assignees.add(new XmlAdaptedIndex(i));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object."},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" final TaskAddress address \u003d new TaskAddress(this.address);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cIndex\u003e assigneeIndexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" for (XmlAdaptedIndex index : assignees) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assigneeIndexes.add(index.toModelType());"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" final Assignees assignees \u003d new Assignees(assigneeIndexes);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, assignees, state, address);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format."},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,"},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);"},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a custom save file name"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.info(filePath);"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":12,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format"},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook."},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion"},{"lineNumber":43,"author":{"gitId":"-"},"content":" */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":19,"-":73}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_PREFIX \u003d \"https://www.google.com.sg/maps/dir/?api\u003d1\";"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_SUFFIX \u003d \"/\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private WebView browser;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public BrowserPanel() {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page."},{"lineNumber":50,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" loadDefaultPage();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().value.replaceAll(\" \", \"+\")"},{"lineNumber":66,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s address if their address is not private"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Loads Google Maps with directions on how to go from one location to another"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * @param fromLocation The location we want to start from"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * @param toLocation The location we want to reach"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDirectionsPage(String fromLocation, String toLocation) {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\""},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":101,"author":{"gitId":"-"},"content":" public void loadPage(String url) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"-"},"content":" * Loads a default HTML file with a background that matches the general theme."},{"lineNumber":107,"author":{"gitId":"-"},"content":" */"},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void loadDefaultPage() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" loadPage(defaultPage.toExternalForm());"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Frees resources allocated to the browser."},{"lineNumber":115,"author":{"gitId":"-"},"content":" */"},{"lineNumber":116,"author":{"gitId":"-"},"content":" public void freeResources() {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" browser \u003d null;"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" loadDirectionsPage(event.getFromLocation().toString(), event.getToLocation().toString());"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":68,"Esilocke":1,"-":65}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";"},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Stage primaryStage;"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container"},{"lineNumber":64,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private ViewTaskPanel viewTaskPanel;"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private ViewPersonPanel viewPersonPanel;"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":73,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":76,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":100,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":106,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":109,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" // Set dependencies"},{"lineNumber":116,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;"},{"lineNumber":117,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":118,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" // Configure the UI"},{"lineNumber":122,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());"},{"lineNumber":123,"author":{"gitId":"-"},"content":" setIcon(ICON);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" setWindowMinSize();"},{"lineNumber":125,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" setWindowDefaultTheme(prefs);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());"},{"lineNumber":128,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" setAccelerators();"},{"lineNumber":131,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" return primaryStage;"},{"lineNumber":136,"author":{"gitId":"-"},"content":" }"},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem."},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator"},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":157,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK."},{"lineNumber":160,"author":{"gitId":"-"},"content":" *"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will"},{"lineNumber":162,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and"},{"lineNumber":163,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by"},{"lineNumber":165,"author":{"gitId":"-"},"content":" * the TextInputControl(s)."},{"lineNumber":166,"author":{"gitId":"-"},"content":" *"},{"lineNumber":167,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open"},{"lineNumber":168,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay."},{"lineNumber":170,"author":{"gitId":"-"},"content":" */"},{"lineNumber":171,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" event.consume();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":" });"},{"lineNumber":177,"author":{"gitId":"-"},"content":" }"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself."},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" *"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window."},{"lineNumber":208,"author":{"gitId":"-"},"content":" */"},{"lineNumber":209,"author":{"gitId":"-"},"content":" void fillInnerParts() {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" browserPanel \u003d new BrowserPanel();"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" viewTaskPanel \u003d new ViewTaskPanel();"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" viewPersonPanel \u003d new ViewPersonPanel();"},{"lineNumber":213,"author":{"gitId":"-"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());"},{"lineNumber":216,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();"},{"lineNumber":222,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();"},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());"},{"lineNumber":226,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);"},{"lineNumber":229,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" void hide() {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" primaryStage.hide();"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }"},{"lineNumber":235,"author":{"gitId":"-"},"content":""},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);"},{"lineNumber":238,"author":{"gitId":"-"},"content":" }"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Sets the given image as the icon of the main window."},{"lineNumber":242,"author":{"gitId":"-"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}"},{"lineNumber":243,"author":{"gitId":"-"},"content":" */"},{"lineNumber":244,"author":{"gitId":"-"},"content":" private void setIcon(String iconSource) {"},{"lineNumber":245,"author":{"gitId":"-"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":249,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences."},{"lineNumber":250,"author":{"gitId":"-"},"content":" */"},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {"},{"lineNumber":252,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());"},{"lineNumber":253,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());"},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());"},{"lineNumber":256,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default theme based on user preferences."},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultTheme(UserPrefs prefs) {"},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(prefs.getTheme());"},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":267,"author":{"gitId":"-"},"content":" private void setWindowMinSize() {"},{"lineNumber":268,"author":{"gitId":"-"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);"},{"lineNumber":269,"author":{"gitId":"-"},"content":" primaryStage.setMinWidth(MIN_WIDTH);"},{"lineNumber":270,"author":{"gitId":"-"},"content":" }"},{"lineNumber":271,"author":{"gitId":"-"},"content":""},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" return getRoot().getStylesheets().get(1);"},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":276,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":277,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window."},{"lineNumber":278,"author":{"gitId":"-"},"content":" */"},{"lineNumber":279,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {"},{"lineNumber":280,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),"},{"lineNumber":281,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());"},{"lineNumber":282,"author":{"gitId":"-"},"content":" }"},{"lineNumber":283,"author":{"gitId":"-"},"content":""},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command for menu item"},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {"},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");"},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));"},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command for menu item"},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":298,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {"},{"lineNumber":299,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling decrease in font size\");"},{"lineNumber":300,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));"},{"lineNumber":301,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":302,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":304,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command"},{"lineNumber":305,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":306,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":307,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {"},{"lineNumber":308,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling reset in font size\");"},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));"},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":311,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":312,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":313,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":314,"author":{"gitId":"-"},"content":" * Opens the help window."},{"lineNumber":315,"author":{"gitId":"-"},"content":" */"},{"lineNumber":316,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":317,"author":{"gitId":"-"},"content":" public void handleHelp() {"},{"lineNumber":318,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();"},{"lineNumber":319,"author":{"gitId":"-"},"content":" helpWindow.show();"},{"lineNumber":320,"author":{"gitId":"-"},"content":" }"},{"lineNumber":321,"author":{"gitId":"-"},"content":""},{"lineNumber":322,"author":{"gitId":"-"},"content":" void show() {"},{"lineNumber":323,"author":{"gitId":"-"},"content":" primaryStage.show();"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location"},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {"},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file"},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpenRequestEvent(OpenRequestEvent event) throws IOException, DataConversionException {"},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" handleOpen();"},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location"},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" @FXML"},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {"},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter"},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter("},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");"},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);"},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog"},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);"},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {"},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension"},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {"},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");"},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file"},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);"},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences"},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());"},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);"},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI"},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();"},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAsRequestEvent(SaveAsRequestEvent event) throws IOException, DataConversionException {"},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" handleSaveAs();"},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the existing theme to the input theme"},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" public void handleChangeTheme(String theme) {"},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {"},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);"},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":397,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(theme);"},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":399,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":""},{"lineNumber":401,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":402,"author":{"gitId":"-"},"content":" private void handleExit() {"},{"lineNumber":403,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());"},{"lineNumber":404,"author":{"gitId":"-"},"content":" }"},{"lineNumber":405,"author":{"gitId":"-"},"content":""},{"lineNumber":406,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {"},{"lineNumber":407,"author":{"gitId":"-"},"content":" return this.personListPanel;"},{"lineNumber":408,"author":{"gitId":"-"},"content":" }"},{"lineNumber":409,"author":{"gitId":"-"},"content":""},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":414,"author":{"gitId":"-"},"content":" void releaseResources() {"},{"lineNumber":415,"author":{"gitId":"-"},"content":" browserPanel.freeResources();"},{"lineNumber":416,"author":{"gitId":"-"},"content":" }"},{"lineNumber":417,"author":{"gitId":"-"},"content":""},{"lineNumber":418,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":419,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {"},{"lineNumber":420,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":421,"author":{"gitId":"-"},"content":" handleHelp();"},{"lineNumber":422,"author":{"gitId":"-"},"content":" }"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewTaskPanel.getRoot());"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewPersonPanel.getRoot());"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();"},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());"},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" private void handleChangeThemeEvent(ChangeThemeRequestEvent event) {"},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" handleChangeTheme(event.getStyleSheet());"},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":461,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":172,"Esilocke":35,"-":212}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.ImageView;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later."},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":40,"author":{"gitId":"-"},"content":" *"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" initTags(person);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" initFavourite(person);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));"},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" });"},{"lineNumber":89,"author":{"gitId":"-"},"content":" person.favouriteProperty().addListener((observable, oldValue, newValue) -\u003e initFavourite(person));"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * display the heart for favourite person"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private void initFavourite(ReadOnlyPerson person) {"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" boolean favouriteStatus \u003d person.getFavourite();"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Label favouriteLabel \u003d new Label();"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" Image starFilled \u003d new Image(getClass().getResource(\"/images/heart.png\").toExternalForm());"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" if (favouriteStatus) {"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setGraphic(new ImageView(starFilled));"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setStyle(\"-fx-background-color: transparent; -fx-border-color: transparent\");"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" cardPane.getChildren().add(favouriteLabel);"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @param tag"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" * @return"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" * @param person"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" });"},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":155,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":157,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":158,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":162,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":164,"author":{"gitId":"-"},"content":" }"},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":167,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;"},{"lineNumber":168,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":169,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);"},{"lineNumber":170,"author":{"gitId":"-"},"content":" }"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" return name;"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" return phone;"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" return address;"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {"},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" return remark;"},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" return email;"},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" //author"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":67,"Esilocke":2,"wangyiming1019":52,"-":84}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Panel containing the list of persons."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" setConnections(personList);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));"},{"lineNumber":51,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":58,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":61,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":" });"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier + 1);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier - 1);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // Set new font size"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New person font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for person cards"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * @param event"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" @Subscribe"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" private void handlePersonCardChangeFontSizeEvent (ChangeFontSizeEvent event) {"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" case 0:"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" case 1:"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" case 2:"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it."},{"lineNumber":145,"author":{"gitId":"-"},"content":" */"},{"lineNumber":146,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {"},{"lineNumber":147,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":148,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);"},{"lineNumber":149,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":150,"author":{"gitId":"-"},"content":" });"},{"lineNumber":151,"author":{"gitId":"-"},"content":" }"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" * Listens for change of font size events"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" * @param event"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":158,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":160,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}."},{"lineNumber":183,"author":{"gitId":"-"},"content":" */"},{"lineNumber":184,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {"},{"lineNumber":185,"author":{"gitId":"-"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);"},{"lineNumber":189,"author":{"gitId":"-"},"content":""},{"lineNumber":190,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {"},{"lineNumber":191,"author":{"gitId":"-"},"content":" setGraphic(null);"},{"lineNumber":192,"author":{"gitId":"-"},"content":" setText(null);"},{"lineNumber":193,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }"},{"lineNumber":196,"author":{"gitId":"-"},"content":" }"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":92,"jeffreygohkw":7,"Esilocke":14,"-":86}},{"path":"src/main/java/seedu/address/ui/StatusBarFooter.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.time.Clock;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.controlsfx.control.StatusBar;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A ui for the status bar that is displayed at the footer of the application."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class StatusBarFooter extends UiPart\u003cRegion\u003e {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_INITIAL \u003d \"Not updated yet in this session\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_UPDATED \u003d \"Last Updated: %s\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Used to generate time stamps."},{"lineNumber":26,"author":{"gitId":"-"},"content":" *"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * TODO: change clock to an instance variable."},{"lineNumber":28,"author":{"gitId":"-"},"content":" * We leave it as a static variable because manual dependency injection"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * will require passing down the clock reference all the way from MainApp,"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * but it should be easier once we have factories/DI frameworks."},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static Clock clock \u003d Clock.systemDefaultZone();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StatusBarFooter.class);"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"StatusBarFooter.fxml\";"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private StatusBar syncStatus;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private StatusBar totalPersons;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @FXML"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private StatusBar saveLocationStatus;"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public StatusBarFooter(String saveLocation, int initialTotalPersons) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" setSyncStatus(SYNC_STATUS_INITIAL);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" setSaveLocation(\"./\" + saveLocation);"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" setTotalPersons(initialTotalPersons);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the clock used to determine the current time."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static void setClock(Clock clock) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" StatusBarFooter.clock \u003d clock;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Returns the clock currently in use."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static Clock getClock() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return clock;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void setSaveLocation(String location) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.saveLocationStatus.setText(location));"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" private void setSyncStatus(String status) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.syncStatus.setText(status));"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent abce) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" long now \u003d clock.millis();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" String lastUpdated \u003d new Date(now).toString();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(abce, \"Setting last updated status to \" + lastUpdated));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" setSyncStatus(String.format(SYNC_STATUS_UPDATED, lastUpdated));"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" this.setTotalPersons(abce.data.getPersonList().size());"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" private void setTotalPersons(int totalPersons) {"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.totalPersons.setText(totalPersons + \" person(s) listed\");"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":9,"-":79}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private Label taskAddress;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" taskAddress.textProperty().bind(Bindings.convert(task.taskAddressProperty()));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" taskAddress.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" assignCount.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" state.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof TaskCard)) {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" TaskCard card \u003d (TaskCard) other;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 task.equals(card.task);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return taskName;"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return id;"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return description;"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return deadline;"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" return priority;"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public Label getTaskAddress() {"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":47,"jeffreygohkw":4,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map("},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier + 1);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier - 1);"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set new font size"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New task font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for task cards"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" * @param event"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" @Subscribe"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" private void handleTaskCardChangeFontSizeEvent (ChangeFontSizeEvent event) {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" case 0:"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" case 1:"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" case 2:"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" break;"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" default:"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it."},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" });"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestTaskEvent(JumpToListRequestTaskEvent event) {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in task list view\");"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}."},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" setText(null);"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" } else {"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":1,"Esilocke":114}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component"},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */"},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */"},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private static UserPrefs prefs;"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");"},{"lineNumber":51,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" //Set the application icon."},{"lineNumber":54,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts"},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (Throwable e) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" prefs.setTheme(mainWindow.getTheme());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" mainWindow.hide();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters."},{"lineNumber":94,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog."},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,"},{"lineNumber":97,"author":{"gitId":"-"},"content":" String contentText) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" alert.getDialogPane().getStylesheets().add(String.format(\"view/\", prefs.getTheme()));"},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.initOwner(owner);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setTitle(title);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);"},{"lineNumber":105,"author":{"gitId":"-"},"content":" alert.showAndWait();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},"},{"lineNumber":110,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog."},{"lineNumber":111,"author":{"gitId":"-"},"content":" */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());"},{"lineNumber":115,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":116,"author":{"gitId":"-"},"content":" System.exit(1);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":122,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":124,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,"},{"lineNumber":125,"author":{"gitId":"-"},"content":" event.exception);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"-":118}},{"path":"src/main/java/seedu/address/ui/ViewPersonPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.HashMap;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.Random;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.Image;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.ImageView;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.VBox;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Contains the details of a person."},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewPersonPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewPersonPanel.fxml\";"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" * Preset values for random selection later."},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private enum Colours {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private static Random randomNumber \u003d new Random();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyPerson person;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private VBox personPanel;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private Label name;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private Label phone;"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" private Label address;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private Label remark;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private ImageView avatarImage;"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Label email;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel(ReadOnlyPerson person, int fontSizeMultiplier) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" this.person \u003d person;"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" initializeAvatar();"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel() {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private void initializeWithPerson(ReadOnlyPerson person) {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" //author charlesgoh"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" * Sets avatar to a URL or filepath and falls back to the placeholder avatar if specified path fits in"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * neither categories"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" private void initializeAvatar() {"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String avatarPath \u003d person.getAvatar().value;"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to set avatar to image at specified URL or filepath\");"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" Image newImage \u003d new Image(avatarPath);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(newImage);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException ex) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" logger.warning(\"Saved path is not a valid filepath or URL path. Setting avatar to placeholder\");"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" Image imagePlaceholder \u003d new Image(\"file:docs/images/Avatar.png\");"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(imagePlaceholder);"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" return true;"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof ViewPersonPanel)) {"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // state check"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" ViewPersonPanel card \u003d (ViewPersonPanel) other;"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" return person.equals(card.person);"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" public Label getName() {"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return name;"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public Label getPhone() {"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return phone;"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" public Label getAddress() {"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" return address;"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public Label getRemark() {"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" return remark;"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public Label getEmail() {"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" return email;"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.person \u003d event.getNewSelection().person;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":28,"Esilocke":155}},{"path":"src/main/java/seedu/address/ui/ViewTaskPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Contains details of a Task."},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class ViewTaskPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewTaskPanel.fxml\";"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Label taskName;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Label description;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Label deadline;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Label priority;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @FXML"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Label state;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyTask task;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel(ReadOnlyTask task) {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (task !\u003d null) {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(task);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel() {"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" super(FXML);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes."},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private void initializeWithTask(ReadOnlyTask task) {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Subscribe"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(event.getNewSelection().task);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":67}},{"path":"src/test/data/ManualTesting/[W09-B2][Address++]TestScript.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++ - Test Script"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":toc-placement: preamble"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":":sectnums:"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: images"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: stylesheets"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":":experimental:"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github[]"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":":tip-caption: :bulb:"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":":note-caption: :information_source:"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Getting Started"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"Ensure that you have the [W09-B2][Address++].jar file and the [W09-B2][Address++]SampleData.xml available on your computer and a working internet connection."},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Importing the test data"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":". Launch [W09-B2][Address++].jar."},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":". On initial launch, it should contain sample data of 6 different persons and 0 tasks."},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":". Type `open` to open a pop up window."},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":". Navigate to the location of the [W09-B2][Address++]SampleData.xml file and click Open to open it."},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":". The sample data containing 20 different persons and 7 different tasks should be loaded."},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":". You are now ready to begin testing."},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d User Interface"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"* The Menu on the top of the screen contains 3 buttons: `File`, `Help` and `Font Size`."},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"* Below the menu is the command line, you can type your commands in here."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"* The box below the command line will show feedback when you type in commands, such as if the command is successful or if you have typed an erroneous command."},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"* The leftmost panel contains the list of persons in the address book."},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* The middle panel contains the list of tasks in the address book."},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"* The rightmost panel contains either the details of the selected task or person, or the in-application browser."},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"* The bottom bar contains miscellaneous information about the address book, such as the file where the save data will be stored and the number of persons in the address book."},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Testing"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"Unless explicitly stated, each test section for each command is assumed to be carried out continuously. +"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"This means that you *should carry out the tests in the given order*. +"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"Each test section is carried out independently. This means that you are recommended to `undo` to restore the address book after each test section."},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d HelpCommand"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"*Opening the help window*"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"help"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"The User Guide appears in a separate window."},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"Opened help window."},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddPersonCommand"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"*Adding a person with all details*"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"add n/Svea Lisenhower p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"A person named Svea Lisenhower, with the details as stated above is added to the address book at index 21. +"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"New person added: +"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"Svea Lisenhower Phone: 98009621 Email: svea_li@example.com Address: Jurong West Street 65 Blk 667A Remark: Russian Exchange Student Avatar: https://example.com/image.png Tags:"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing compulsory details*"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"add p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing."},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"add: Adds a person to the address book. Parameters: n/NAME [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]... +"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"Example: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 r/Sells sea shells on the sea shore v/avatar-filepath.pngt/friends t/owesMoney"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing optional details*"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"add n/Kent Seethis"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"A person named Kent Seethis, but with no other details is added to the address book at index 22. +"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"New person added: +"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"Kent Seethis Phone: Email: Address: Remark: Avatar: Tags:"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid phones*"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl p/@"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid."},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid emails*"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl e/here"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid."},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid tags*"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl t/@"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified tag is invalid."},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTaskCommand"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"*Adding a task with all details*"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":"add task/ n/Buy pencils d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"A task named \"Buy pencils\", with a description of \"Buy 4 pencils from Popular\", with a deadline of \"Sat Nov 18 19:00:00 SGT 2017\","},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"a priority of \"Low\", and an address of \"West Point\" is added to the addresss book at index 8 in the task list. +"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"New task added: +"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"Buy pencils Description: Buy 4 pencils from Popular Deadline: Sat Nov 18 19:00:00 SGT 2017 Priority: Low Address: West Point \u003cIncomplete\u003e +"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing compulsory details*"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"add task/ d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing."},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"add task/: Adds a task to the address book. Parameters: n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS] +"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Example: add task/ n/Buy pencil d/Buy a new pencil from ABS by/10-10-2017 p/4 a/12 Kent Ridge Crescent, 119275"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing optional details*"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"A task with the name \"Create better task\", and no other details present is added to the address book at index 9 in the task list. +"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"New task added:"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"Create better task Description: Deadline: Priority: Address: \u003cIncomplete\u003e"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid deadlines*"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task by/AAAAAAAAAAAAA"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified deadline is invalid."},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid."},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid priority*"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task p/99999999"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified priority is invalid."},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTagCommand"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":"*Adding tags to persons in Address++*"},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 2 t/friends"},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":"The first two person in the person list will have the tag `friends` but it will not show in the person panel."},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"add tag/ t/friends"},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will have the tag `friends`."},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons if all of them having the input tags*"},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 3 t/friends"},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since all of them have the tag `friends` already."},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"This tag already exists in all target persons in the current list."},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with invalid index*"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"add tag/ 23 t/friends"},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list."},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid."},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with no input tags*"},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 t/"},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags."},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ListCommand"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":"*List all entries*"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"list"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"All tasks and persons in the address book are listed."},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Listed all entries"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditPersonCommand"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"*Editing a person for all entries*"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Laura Edelweiss p/1111111 a/House of Edelweiss e/laura@example.com r/Heiress to the House of Edelweiss t/Heiress v/https://example.com/validimage2.png"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"The person at index 7 (Elizabeth Edelweiss) is updated and now has new details matching the command."},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":"Edited Person: +"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"Laura Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]"},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":"*Editing a person with only 1 entry*"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Elizabath Edelweiss"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":"Only the name of the person at index 7 (Now named Laura Edelweiss) is changed to Elizabeth Edelweiss. All other details remain the same."},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":"Edited Person: +"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":"Elizabath Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":"edit 7 n/"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid."},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"Person names should only contain alphanumeric characters and spaces, and it should not be blank"},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"edit 7 p/ppp"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid."},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"edit 7 e/ppp"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid."},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":"edit 7 t/@@@@@@"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid."},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"*Editing a private person*"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"edit 11 n/Unhide me"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person\u0027s name is private."},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"At least one field to be edited must be public."},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid person*"},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"edit 19999 n/Unhide me"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid."},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTaskCommand"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"*Editing a task for all entries*"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Paper Castle d/Castle Garde by/9 December 2017 8pm p/1 a/NUS"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The task at index 7 is updated and now has new details matching the command."},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"Edited Task: +"},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"Paper Castle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e"},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"*Editing a task with only 1 entry*"},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Sandcastle"},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"Only the name of the task at index 7 (Now named Paper Castle) is changed to Sandcastle. All other details remain the same."},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"Edited Task: +"},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"Sandcastle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e"},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*"},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/"},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid."},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"Task names can be in any format, and should not be blank"},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 by/AAAAAAAA"},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid."},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid."},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 e/ppp"},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid."},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority"},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid task*"},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"edit task/ 19999 n/Tiny, tiny house"},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid."},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTagCommand"},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag in the address book*"},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends goodFriends"},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"All instances of \"friends\" tags are replaced with \"goodFriends\" tags (at indexes 1, 3, 10, 11, 12, 17). +"},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Replaced tag friends with goodFriends"},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"*Renaming a non-existant tag in the address book*"},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends nemesis"},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"As \"friends\" were renamed to \"goodFriends\", there are no more \"friends\" tags. +"},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the tag \"friends\" is not in any of the contacts."},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"No such tag was found in the address book."},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with the exact same name*"},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends goodFriends"},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the two tag names are exactly the same. +"},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"The new name of the tag cannot be the same as the old name."},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*"},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@"},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +"},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +"},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +"},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies"},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*"},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@"},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +"},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +"},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +"},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies"},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ChangePrivacyCommand"},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of public fields*"},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/true p/true e/true a/true r/true"},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":588,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as private, and the original data is hidden in the UI."},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":590,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: \u003cPrivate Name\u003e Phone: \u003cPrivate Phone\u003e Email: \u003cPrivate Email\u003e Address: \u003cPrivate Address\u003e Remark: \u003cPrivate Remark\u003e Avatar: Tags: [project]"},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":596,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 n/false"},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":599,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s name, being originally public, remains public."},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:"},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of private fields*"},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/false p/false e/false a/false r/false"},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as public, revealing all the original data in the UI."},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]"},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 a/true"},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s address, being originally private, remains private."},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:"},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of empty fields*"},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/true"},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to private."},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: \u003cPrivate Remark\u003e Avatar: Tags: [GEQ2000]"},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/false"},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to public, but since it is empty, it does not display any data."},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":655,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":656,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]"},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d PrivacyLevelCommand"},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":661,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy level*"},{"lineNumber":662,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":664,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":665,"author":{"gitId":"Esilocke"},"content":"privacylevel 1"},{"lineNumber":666,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":667,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":668,"author":{"gitId":"Esilocke"},"content":"All persons are listed with any private data revealed."},{"lineNumber":669,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":670,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":671,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 1."},{"lineNumber":673,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":674,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":676,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":677,"author":{"gitId":"Esilocke"},"content":"privacylevel 3"},{"lineNumber":678,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":680,"author":{"gitId":"Esilocke"},"content":"Lists all persons except those that have at least one private field."},{"lineNumber":681,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":682,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":683,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":684,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 3."},{"lineNumber":685,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":687,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":688,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":689,"author":{"gitId":"Esilocke"},"content":"privacylevel 2"},{"lineNumber":690,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":691,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":692,"author":{"gitId":"Esilocke"},"content":"List all persons. Fields that are private will have their data hidden."},{"lineNumber":693,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":694,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":695,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":696,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 2."},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":698,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":699,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteCommand"},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":701,"author":{"gitId":"Esilocke"},"content":"*Setting a person in the Address++ to be the favourite person*"},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":703,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":704,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":705,"author":{"gitId":"Esilocke"},"content":"list +"},{"lineNumber":706,"author":{"gitId":"Esilocke"},"content":"favourite 2"},{"lineNumber":707,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":708,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":709,"author":{"gitId":"Esilocke"},"content":"The 2nd person in the Address++ will be favoured and a heart picture will be shown next to his name."},{"lineNumber":710,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":711,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"Favourited Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]"},{"lineNumber":713,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person if he has been favoured*"},{"lineNumber":715,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":716,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":717,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"list +"},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"favourite 1"},{"lineNumber":720,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":721,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":722,"author":{"gitId":"Esilocke"},"content":"An error message will display since the first person in the Address++ has been favoured."},{"lineNumber":723,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":725,"author":{"gitId":"Esilocke"},"content":"Person is already favourited."},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":727,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person with invalid index*"},{"lineNumber":728,"author":{"gitId":"-"},"content":""},{"lineNumber":729,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":730,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":731,"author":{"gitId":"Esilocke"},"content":"favourite 56"},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":733,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"An error message will display since there is no 56th person in the current list."},{"lineNumber":735,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":736,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":738,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteListCommand"},{"lineNumber":740,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":"*Listing all favoured persons in the Address++*"},{"lineNumber":742,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":743,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":745,"author":{"gitId":"Esilocke"},"content":"showfavourite"},{"lineNumber":746,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":747,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"List all the favoured persons."},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":750,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons."},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":753,"author":{"gitId":"Esilocke"},"content":"*Listing empty list with no favoured person in the Address++*"},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":755,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"showfavourite"},{"lineNumber":758,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":759,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":760,"author":{"gitId":"Esilocke"},"content":"An empty list but with successful message."},{"lineNumber":761,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons."},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindPersonCommand"},{"lineNumber":766,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":767,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*"},{"lineNumber":768,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":"find plumley"},{"lineNumber":772,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":773,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":774,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\", case insensitive, in their name are displayed. +"},{"lineNumber":775,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":776,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":777,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":778,"author":{"gitId":"Esilocke"},"content":"2 persons listed!"},{"lineNumber":779,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":780,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":781,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*"},{"lineNumber":782,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":783,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":784,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":785,"author":{"gitId":"Esilocke"},"content":"find plumley edelweiss"},{"lineNumber":786,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":787,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\" or \"edelweiss\", case insensitive, in their name are displayed. +"},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":"4 persons listed!"},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindTaskCommand"},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*"},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":"find task/ on"},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\", case insensitive, in their name or description are displayed. +"},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!"},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*"},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"find task/ on stew"},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description are displayed. +"},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":820,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"3 tasks listed!"},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with priority search*"},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"find task/ on stew p/4"},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and have a priority of \"High\" or above are displayed. +"},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!"},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state search*"},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true"},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and are currently complete are displayed. +"},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!"},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state and priority search*"},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true p/3"},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, with a priority of at least \"medium\", and are currently complete are displayed. +"},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":863,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":864,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!"},{"lineNumber":865,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":866,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d TagListCommand"},{"lineNumber":868,"author":{"gitId":"-"},"content":""},{"lineNumber":869,"author":{"gitId":"-"},"content":"*Listing all the tag in the Address++*"},{"lineNumber":870,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":871,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":873,"author":{"gitId":"-"},"content":"showtag"},{"lineNumber":874,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":875,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":876,"author":{"gitId":"-"},"content":"Tags contain capital letter will displayed in front. All the tags (with or without capital letter) will be displayed in alphabetical order."},{"lineNumber":877,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":878,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":879,"author":{"gitId":"-"},"content":"All the tags are here: \u003cGEQ2000\u003e \u003cacquaintance\u003e \u003cclassmates\u003e \u003cenemy\u003e \u003cfamily\u003e \u003cfriends\u003e \u003cneighbours\u003e \u003cproject\u003e \u003csecretive\u003e \u003ctutee\u003e"},{"lineNumber":880,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":881,"author":{"gitId":"-"},"content":"*Listing empty tag list with no tags in Address++*"},{"lineNumber":882,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":883,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":884,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":885,"author":{"gitId":"-"},"content":"showtag"},{"lineNumber":886,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":887,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":888,"author":{"gitId":"-"},"content":"There is no tag list."},{"lineNumber":889,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":890,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":891,"author":{"gitId":"-"},"content":"There is no tag!"},{"lineNumber":892,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":893,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d FindTagCommand"},{"lineNumber":894,"author":{"gitId":"-"},"content":""},{"lineNumber":895,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with specific tags*"},{"lineNumber":896,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":897,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":898,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":899,"author":{"gitId":"-"},"content":"find tag/ friends"},{"lineNumber":900,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":902,"author":{"gitId":"-"},"content":"List all the persons who have tag `friends`."},{"lineNumber":903,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":904,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":905,"author":{"gitId":"-"},"content":"6 persons listed!"},{"lineNumber":906,"author":{"gitId":"-"},"content":""},{"lineNumber":907,"author":{"gitId":"-"},"content":"*Finding person in the Address++ without specific tags*"},{"lineNumber":908,"author":{"gitId":"-"},"content":""},{"lineNumber":909,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":910,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":911,"author":{"gitId":"-"},"content":"find tag/ /friends"},{"lineNumber":912,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":913,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":914,"author":{"gitId":"-"},"content":"List all the persons without tag `friends`."},{"lineNumber":915,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":916,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":917,"author":{"gitId":"-"},"content":"14 persons listed!"},{"lineNumber":918,"author":{"gitId":"-"},"content":""},{"lineNumber":919,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with \"TAGA\" but without \"TAGB\"*"},{"lineNumber":920,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":921,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":922,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":923,"author":{"gitId":"-"},"content":"find tag/ friends /classmates"},{"lineNumber":924,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":925,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":926,"author":{"gitId":"-"},"content":"Persons have tag `friends` but do not have tag `classmates` will be listed."},{"lineNumber":927,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":928,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":929,"author":{"gitId":"-"},"content":"5 persons listed!"},{"lineNumber":930,"author":{"gitId":"-"},"content":""},{"lineNumber":931,"author":{"gitId":"-"},"content":"*Failing to find persons in the Address++ with valid tags*"},{"lineNumber":932,"author":{"gitId":"-"},"content":""},{"lineNumber":933,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":934,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":935,"author":{"gitId":"-"},"content":"find tag/ fff"},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":937,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":938,"author":{"gitId":"-"},"content":"Although it is a valid tag, there is no person with tag `fff`. Hence, no person will be listed."},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":940,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":941,"author":{"gitId":"-"},"content":"0 persons listed!"},{"lineNumber":942,"author":{"gitId":"-"},"content":""},{"lineNumber":943,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeletePersonCommand"},{"lineNumber":944,"author":{"gitId":"-"},"content":""},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*"},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"delete 20"},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":"The contact at index 20, Myuria Plumley is deleted from the address book. +"},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"Deleted Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]"},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*"},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"delete 2000"},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":967,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTaskCommand"},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*"},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"delete task/ 7"},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is deleted from the address book. +"},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"Deleted Task: Paper Model for project Description: Paper model of Himeji castle for project. Myucel/Myuria twins in charge Deadline: Wed Dec 13 17:00:00 SGT 2017 Priority: Medium Address: \u003cIncomplete\u003e"},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*"},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"delete task/ 7000"},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTagCommand"},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"*Deleting tags from persons in the Address++*"},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/friends"},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"The tag `friends` for the first person will be deleted. The rest tags remain no change."},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]"},{"lineNumber":1016,"author":{"gitId":"-"},"content":""},{"lineNumber":1017,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"delete tag/ t/friends"},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will not have the tag `friends`."},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]"},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons if none of them have the input tags*"},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/neighbour"},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"An error message will display since target persons do not have tag `neighbour`."},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"The target persons do not have input tags."},{"lineNumber":1038,"author":{"gitId":"-"},"content":""},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with invalid index*"},{"lineNumber":1040,"author":{"gitId":"-"},"content":""},{"lineNumber":1041,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":"delete tag/ 23 t/friends"},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1045,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list."},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1048,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1049,"author":{"gitId":"-"},"content":"The person index provided is invalid"},{"lineNumber":1050,"author":{"gitId":"-"},"content":""},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with no input tags*"},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 t/"},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags."},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric"},{"lineNumber":1062,"author":{"gitId":"-"},"content":""},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectPersonCommand"},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"*Selecting a person*"},{"lineNumber":1066,"author":{"gitId":"-"},"content":""},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1068,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"select 19"},{"lineNumber":1070,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1071,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1072,"author":{"gitId":"Esilocke"},"content":"The person at index 19, \"Myucel Plumley\" is selected, and her details are listed in the UI panel. +"},{"lineNumber":1073,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1074,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1075,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1076,"author":{"gitId":"Esilocke"},"content":"Selected Person: 19"},{"lineNumber":1077,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1078,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1079,"author":{"gitId":"Esilocke"},"content":"*Selecting a person with an invalid index*"},{"lineNumber":1080,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1081,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1082,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1083,"author":{"gitId":"Esilocke"},"content":"select 19999"},{"lineNumber":1084,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1085,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1086,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1087,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1088,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1089,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1090,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid"},{"lineNumber":1091,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1093,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectTaskCommand"},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1095,"author":{"gitId":"Esilocke"},"content":"*Selecting a task*"},{"lineNumber":1096,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"select task/ 7"},{"lineNumber":1100,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1102,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is selected and its details are shown in the UI panel. +"},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1104,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1105,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Selected Task: 7"},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"*Selecting a task with an invalid index*"},{"lineNumber":1110,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1111,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"select task/ 7000"},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d LocateCommand"},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":"*Locating a person\u0027s address on Google Maps*"},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":"locate 1"},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and searches for the first person\u0027s address. +"},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"Searching for Person at Index: 1"},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":"*Failing to locate a person with no address*"},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":"locate 2"},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":"An error message is printed, as the person at index 2 has no address. +"},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":"Person 2 has no Address"},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"*Failing to locate a person with a private address*"},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"locate 6"},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +"},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1164,"author":{"gitId":"Esilocke"},"content":"Person 6 has a Private Address"},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d NavigateCommand"},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Person*"},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"navigate fp/1 tp/3"},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first person\u0027s address to the third person\u0027s address. +"},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 30 Geylang Street 29, #06-40 to Blk 30 Lorong 3 Serangoon Gardens, #07-18"},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Task*"},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 tt/1"},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to the first task\u0027s address. +"},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to Blk 45 Aljunied Street 85, #11-31"},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1197,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Address*"},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 ta/NUS"},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to NUS. +"},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to NUS"},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Person*"},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tp/3"},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the third person\u0027s address. +"},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1222,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to Blk 30 Lorong 3 Serangoon Gardens, #07-18"},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Task*"},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tt/4"},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the fourth task\u0027s address. +"},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1236,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to SR-1, COM-1 NUS"},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Address*"},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1243,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 ta/NUS"},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +"},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to NUS. +"},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1249,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to NUS"},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Person*"},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +"},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":"navigate fa/NUS tp/3"},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NUS to the third person\u0027s address. +"},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +"},{"lineNumber":1263,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":"Navigating from NUS to Blk 30 Lorong 3 Serangoon Gardens, #07-18"},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Task*"},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":"navigate fa/NTU tt/4"},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"****"},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NTU to the fourth task\u0027s address. +"},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1276,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1277,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1278,"author":{"gitId":"Esilocke"},"content":"Navigating from NTU to SR-1, COM-1 NUS"},{"lineNumber":1279,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1280,"author":{"gitId":"-"},"content":""},{"lineNumber":1281,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Address*"},{"lineNumber":1282,"author":{"gitId":"-"},"content":""},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1284,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1285,"author":{"gitId":"Esilocke"},"content":"navigate fa/SMU ta/NUS"},{"lineNumber":1286,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1287,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1288,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from SMU to NUS. +"},{"lineNumber":1289,"author":{"gitId":"-"},"content":""},{"lineNumber":1290,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1291,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":"Navigating from SMU to NUS"},{"lineNumber":1293,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1294,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1295,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has a private address*"},{"lineNumber":1296,"author":{"gitId":"-"},"content":""},{"lineNumber":1297,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1298,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1299,"author":{"gitId":"Esilocke"},"content":"navigate fp/6 ta/Changi Airport"},{"lineNumber":1300,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1301,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1302,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +"},{"lineNumber":1303,"author":{"gitId":"-"},"content":""},{"lineNumber":1304,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1305,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1306,"author":{"gitId":"Esilocke"},"content":"Address of the Person at index 6 is private."},{"lineNumber":1307,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1308,"author":{"gitId":"-"},"content":""},{"lineNumber":1309,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has no address*"},{"lineNumber":1310,"author":{"gitId":"-"},"content":""},{"lineNumber":1311,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1312,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1313,"author":{"gitId":"Esilocke"},"content":"navigate fp/8 ta/Changi Airport"},{"lineNumber":1314,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1315,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1316,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 8 has no address. +"},{"lineNumber":1317,"author":{"gitId":"-"},"content":""},{"lineNumber":1318,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1319,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"Person at index 8 does not have an address."},{"lineNumber":1321,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1322,"author":{"gitId":"-"},"content":""},{"lineNumber":1323,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a task has no address*"},{"lineNumber":1324,"author":{"gitId":"-"},"content":""},{"lineNumber":1325,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1326,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"navigate ft/2 ta/Changi Airport"},{"lineNumber":1328,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1329,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1330,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the task at index 2 has no address. +"},{"lineNumber":1331,"author":{"gitId":"-"},"content":""},{"lineNumber":1332,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1333,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"Task at index 2 does not have an address."},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1336,"author":{"gitId":"-"},"content":""},{"lineNumber":1337,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*"},{"lineNumber":1338,"author":{"gitId":"-"},"content":""},{"lineNumber":1339,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1340,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"navigate"},{"lineNumber":1342,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1343,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1345,"author":{"gitId":"-"},"content":""},{"lineNumber":1346,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1348,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":1349,"author":{"gitId":"Esilocke"},"content":"navigate: Get directions from one address to another. +"},{"lineNumber":1350,"author":{"gitId":"Esilocke"},"content":"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three) AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three) +"},{"lineNumber":1351,"author":{"gitId":"Esilocke"},"content":"Example: navigate fp/2 ta/University Town"},{"lineNumber":1352,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1353,"author":{"gitId":"-"},"content":""},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"*Error when no address after a fa/ or ta/ prefix is entered*"},{"lineNumber":1355,"author":{"gitId":"-"},"content":""},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"navigate fa/ tp/1"},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1360,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1361,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1362,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1363,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1364,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1365,"author":{"gitId":"Esilocke"},"content":"Location can take any value, and it should not be blank"},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1367,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"*Error when no integer after a fp/, tp/, ft/ or tt/ prefix is entered*"},{"lineNumber":1369,"author":{"gitId":"-"},"content":""},{"lineNumber":1370,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1371,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1372,"author":{"gitId":"Esilocke"},"content":"navigate ft/ tp/1"},{"lineNumber":1373,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1374,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1376,"author":{"gitId":"-"},"content":""},{"lineNumber":1377,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"Index is not a non-zero unsigned integer."},{"lineNumber":1380,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1381,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetCompleteCommand"},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as complete*"},{"lineNumber":1385,"author":{"gitId":"-"},"content":""},{"lineNumber":1386,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1387,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":"setcomplete 3"},{"lineNumber":1389,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1390,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1391,"author":{"gitId":"Esilocke"},"content":"The task at index 3, \"Visit David\u0027s house\" is marked as completed. +"},{"lineNumber":1392,"author":{"gitId":"-"},"content":""},{"lineNumber":1393,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"Marked Task as completed: Visit David\u0027s house Description: Visit to David Li\u0027s house next Saturday Deadline: Sat Nov 18 12:00:00 SGT 2017 Priority: Low Address: Blk 436 Serangoon Gardens Street 26, #16-43 \u003cIncomplete\u003e"},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1397,"author":{"gitId":"-"},"content":""},{"lineNumber":1398,"author":{"gitId":"Esilocke"},"content":"*Marking an already complete task as complete*"},{"lineNumber":1399,"author":{"gitId":"-"},"content":""},{"lineNumber":1400,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1401,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1402,"author":{"gitId":"Esilocke"},"content":"setcomplete 3"},{"lineNumber":1403,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1404,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1405,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already complete +"},{"lineNumber":1406,"author":{"gitId":"-"},"content":""},{"lineNumber":1407,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"The specified task is already completed"},{"lineNumber":1410,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1411,"author":{"gitId":"-"},"content":""},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*"},{"lineNumber":1413,"author":{"gitId":"-"},"content":""},{"lineNumber":1414,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1415,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1416,"author":{"gitId":"Esilocke"},"content":"setcomplete 7000"},{"lineNumber":1417,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1418,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1419,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1420,"author":{"gitId":"-"},"content":""},{"lineNumber":1421,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1422,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1423,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1425,"author":{"gitId":"-"},"content":""},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetInompleteCommand"},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1428,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as incomplete*"},{"lineNumber":1429,"author":{"gitId":"-"},"content":""},{"lineNumber":1430,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1431,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1432,"author":{"gitId":"Esilocke"},"content":"setincomplete 1"},{"lineNumber":1433,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1434,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"The task at index 1, \"Tuition\" is marked as incomplete. +"},{"lineNumber":1436,"author":{"gitId":"-"},"content":""},{"lineNumber":1437,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1438,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1439,"author":{"gitId":"Esilocke"},"content":"Marked Task as incomplete: Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1440,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1441,"author":{"gitId":"-"},"content":""},{"lineNumber":1442,"author":{"gitId":"Esilocke"},"content":"*Marking an already incomplete task as incomplete*"},{"lineNumber":1443,"author":{"gitId":"-"},"content":""},{"lineNumber":1444,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"setincomplete 1"},{"lineNumber":1447,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1448,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1449,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already incomplete +"},{"lineNumber":1450,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1451,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1452,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1453,"author":{"gitId":"Esilocke"},"content":"The specified task is already incomplete"},{"lineNumber":1454,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1455,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*"},{"lineNumber":1457,"author":{"gitId":"-"},"content":""},{"lineNumber":1458,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1459,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1460,"author":{"gitId":"Esilocke"},"content":"setincomplete 7000"},{"lineNumber":1461,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1462,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1463,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1464,"author":{"gitId":"-"},"content":""},{"lineNumber":1465,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1466,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1467,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1468,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1469,"author":{"gitId":"-"},"content":""},{"lineNumber":1470,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AssignCommand"},{"lineNumber":1471,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1472,"author":{"gitId":"Esilocke"},"content":"*Assigning 1 contact to a task*"},{"lineNumber":1473,"author":{"gitId":"-"},"content":""},{"lineNumber":1474,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1475,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1476,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1"},{"lineNumber":1477,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1478,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1479,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Myucel Plumley is assigned to the first task, Tuition. The task now has 4 people assigned to it instead of 3. +"},{"lineNumber":1480,"author":{"gitId":"-"},"content":""},{"lineNumber":1481,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1482,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1483,"author":{"gitId":"Esilocke"},"content":"Assigned 1 people to +"},{"lineNumber":1484,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1485,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1486,"author":{"gitId":"-"},"content":""},{"lineNumber":1487,"author":{"gitId":"Esilocke"},"content":"*Assigning multiple contacts to a task*"},{"lineNumber":1488,"author":{"gitId":"-"},"content":""},{"lineNumber":1489,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1490,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1491,"author":{"gitId":"Esilocke"},"content":"assign 18 20 to/1"},{"lineNumber":1492,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1493,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1494,"author":{"gitId":"Esilocke"},"content":"The contacts at index 18 and 20, Myuria Plumley and Clarissa Liselotte are assigned to the first task, Tuition. The task now has 6 people assigned to it instead of 4. +"},{"lineNumber":1495,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1496,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1497,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1498,"author":{"gitId":"Esilocke"},"content":"Assigned 2 people to +"},{"lineNumber":1499,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1500,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1501,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1502,"author":{"gitId":"Esilocke"},"content":"*Assigning contacts who are already assigned to a task*"},{"lineNumber":1503,"author":{"gitId":"-"},"content":""},{"lineNumber":1504,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1505,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1506,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1"},{"lineNumber":1507,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1508,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1509,"author":{"gitId":"Esilocke"},"content":"Myucel Plumley was already assigned to the task Tuition. An error message is printed out as she is already assigned to the task. +"},{"lineNumber":1510,"author":{"gitId":"-"},"content":""},{"lineNumber":1511,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1512,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1513,"author":{"gitId":"Esilocke"},"content":"All the specified persons are already assigned to this task"},{"lineNumber":1514,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1515,"author":{"gitId":"-"},"content":""},{"lineNumber":1516,"author":{"gitId":"Esilocke"},"content":"*Assigning no contacts to a task*"},{"lineNumber":1517,"author":{"gitId":"-"},"content":""},{"lineNumber":1518,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1519,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1520,"author":{"gitId":"Esilocke"},"content":"assign to/1"},{"lineNumber":1521,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1522,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1523,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified."},{"lineNumber":1524,"author":{"gitId":"-"},"content":""},{"lineNumber":1525,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1526,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1527,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified"},{"lineNumber":1528,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1529,"author":{"gitId":"-"},"content":""},{"lineNumber":1530,"author":{"gitId":"Esilocke"},"content":"*Assigning to a task with an invalid index*"},{"lineNumber":1531,"author":{"gitId":"-"},"content":""},{"lineNumber":1532,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1533,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1534,"author":{"gitId":"Esilocke"},"content":"assign 5 to/7000"},{"lineNumber":1535,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1536,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1537,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1538,"author":{"gitId":"-"},"content":""},{"lineNumber":1539,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1540,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1541,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1542,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1543,"author":{"gitId":"-"},"content":""},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DismissCommand"},{"lineNumber":1545,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1546,"author":{"gitId":"Esilocke"},"content":"*Dismissing 1 contact from a task*"},{"lineNumber":1547,"author":{"gitId":"-"},"content":""},{"lineNumber":1548,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1549,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1550,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1"},{"lineNumber":1551,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1552,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1553,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Alex Yeoh is assigned to the first task, Tuition. The task now has 2 people assigned to it instead of 3. +"},{"lineNumber":1554,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1555,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1556,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1557,"author":{"gitId":"Esilocke"},"content":"Dismissed 1 people from task +"},{"lineNumber":1558,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1559,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1560,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1561,"author":{"gitId":"Esilocke"},"content":"*Dismissing multiple contacts from a task*"},{"lineNumber":1562,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1563,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1564,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1565,"author":{"gitId":"Esilocke"},"content":"dismiss 6 8 from/1"},{"lineNumber":1566,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1567,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1568,"author":{"gitId":"Esilocke"},"content":"The contacts at index 6 and 8, David Ng and Ima Hidearu are assigned to the first task, Tuition. The task now has 0 people assigned to it instead of 2. +"},{"lineNumber":1569,"author":{"gitId":"-"},"content":""},{"lineNumber":1570,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1571,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1572,"author":{"gitId":"Esilocke"},"content":"Dismissed 2 people from task +"},{"lineNumber":1573,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e"},{"lineNumber":1574,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1575,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1576,"author":{"gitId":"Esilocke"},"content":"*Dismissing contacts who are already assigned from a task*"},{"lineNumber":1577,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1578,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1579,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1580,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1"},{"lineNumber":1581,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1582,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1583,"author":{"gitId":"Esilocke"},"content":"There are no contacts assigned to the task Tuition."},{"lineNumber":1584,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as none of the specified contacts were assigned to the task."},{"lineNumber":1585,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1586,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1587,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1588,"author":{"gitId":"Esilocke"},"content":"None of the specified persons are assigned to this task"},{"lineNumber":1589,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1590,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1591,"author":{"gitId":"Esilocke"},"content":"*Dismissing no contacts from a task*"},{"lineNumber":1592,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1593,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1594,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1595,"author":{"gitId":"Esilocke"},"content":"dismiss from/1"},{"lineNumber":1596,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1597,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1598,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified."},{"lineNumber":1599,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1600,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1601,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1602,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified"},{"lineNumber":1603,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1604,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1605,"author":{"gitId":"Esilocke"},"content":"*Dismissing from a task with an invalid index*"},{"lineNumber":1606,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1607,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1608,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1609,"author":{"gitId":"Esilocke"},"content":"dismiss 5 from/7000"},{"lineNumber":1610,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1611,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1612,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1613,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1614,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1615,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1616,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1617,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1618,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1619,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ViewAssignCommand"},{"lineNumber":1620,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1621,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with no persons assigned to it*"},{"lineNumber":1622,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1623,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1624,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1625,"author":{"gitId":"Esilocke"},"content":"viewassign 2"},{"lineNumber":1626,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1627,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1628,"author":{"gitId":"Esilocke"},"content":"No contacts are listed +"},{"lineNumber":1629,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1630,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1631,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1632,"author":{"gitId":"-"},"content":"0 persons listed!"},{"lineNumber":1633,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1634,"author":{"gitId":"-"},"content":""},{"lineNumber":1635,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with some persons assigned to it*"},{"lineNumber":1636,"author":{"gitId":"-"},"content":""},{"lineNumber":1637,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1638,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1639,"author":{"gitId":"Esilocke"},"content":"viewassign 1"},{"lineNumber":1640,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1641,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1642,"author":{"gitId":"Esilocke"},"content":"3 contacts are listed, Alex Yeoh, David Ng, Ima Hidearu +"},{"lineNumber":1643,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1644,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1645,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1646,"author":{"gitId":"Esilocke"},"content":"3 persons listed!"},{"lineNumber":1647,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1648,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1649,"author":{"gitId":"Esilocke"},"content":"*Viewing from a task with an invalid index*"},{"lineNumber":1650,"author":{"gitId":"-"},"content":""},{"lineNumber":1651,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1652,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1653,"author":{"gitId":"Esilocke"},"content":"viewassign 99999"},{"lineNumber":1654,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1655,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1656,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +"},{"lineNumber":1657,"author":{"gitId":"-"},"content":""},{"lineNumber":1658,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1659,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1660,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid"},{"lineNumber":1661,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1662,"author":{"gitId":"-"},"content":""},{"lineNumber":1663,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ThemeCommand"},{"lineNumber":1664,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1665,"author":{"gitId":"Esilocke"},"content":"*Changing the theme of the address book*"},{"lineNumber":1666,"author":{"gitId":"-"},"content":""},{"lineNumber":1667,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1668,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1669,"author":{"gitId":"Esilocke"},"content":"theme light"},{"lineNumber":1670,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1671,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1672,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a bright colour. +"},{"lineNumber":1673,"author":{"gitId":"-"},"content":""},{"lineNumber":1674,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1675,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1676,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: light"},{"lineNumber":1677,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1678,"author":{"gitId":"-"},"content":""},{"lineNumber":1679,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1680,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1681,"author":{"gitId":"Esilocke"},"content":"theme dark"},{"lineNumber":1682,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1683,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1684,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a dark colour.+"},{"lineNumber":1685,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1686,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1687,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: dark"},{"lineNumber":1688,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1689,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1690,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*"},{"lineNumber":1691,"author":{"gitId":"-"},"content":""},{"lineNumber":1692,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1693,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1694,"author":{"gitId":"Esilocke"},"content":"theme"},{"lineNumber":1695,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1696,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1697,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input."},{"lineNumber":1698,"author":{"gitId":"-"},"content":""},{"lineNumber":1699,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1700,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1701,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +"},{"lineNumber":1702,"author":{"gitId":"Esilocke"},"content":"theme: Sets the theme based on the specified style. +"},{"lineNumber":1703,"author":{"gitId":"Esilocke"},"content":"Parameters: STYLE +"},{"lineNumber":1704,"author":{"gitId":"Esilocke"},"content":"Example: theme dark"},{"lineNumber":1705,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1706,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1707,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d HistoryCommand"},{"lineNumber":1708,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1709,"author":{"gitId":"Esilocke"},"content":"*Lists all commands done in reverser chronological order*"},{"lineNumber":1710,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1711,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1712,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1713,"author":{"gitId":"Esilocke"},"content":"notacommand +"},{"lineNumber":1714,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +"},{"lineNumber":1715,"author":{"gitId":"Esilocke"},"content":"history"},{"lineNumber":1716,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1717,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1718,"author":{"gitId":"Esilocke"},"content":"The two previous commands are listed in the box below the command line in reverse chronological order from top to bottom. +"},{"lineNumber":1719,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1720,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1721,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1722,"author":{"gitId":"Esilocke"},"content":"Entered commands (from most recent to earliest): +"},{"lineNumber":1723,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +"},{"lineNumber":1724,"author":{"gitId":"Esilocke"},"content":"notacommand"},{"lineNumber":1725,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1726,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1727,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d UndoCommand"},{"lineNumber":1728,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1729,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1730,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1731,"author":{"gitId":"Esilocke"},"content":"delete 1 +"},{"lineNumber":1732,"author":{"gitId":"Esilocke"},"content":"undo"},{"lineNumber":1733,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1734,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1735,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo. +"},{"lineNumber":1736,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1737,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1738,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1739,"author":{"gitId":"Esilocke"},"content":"Undo success!"},{"lineNumber":1740,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1741,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1742,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1743,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1744,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1745,"author":{"gitId":"Esilocke"},"content":"add n/Reed Richards p/94444444 e/reed@futurefoundation.com a/Baxter Building r/Loves to stretch +"},{"lineNumber":1746,"author":{"gitId":"Esilocke"},"content":"undo"},{"lineNumber":1747,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1748,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1749,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo."},{"lineNumber":1750,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1751,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1752,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1753,"author":{"gitId":"Esilocke"},"content":"Undo success!"},{"lineNumber":1754,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1755,"author":{"gitId":"-"},"content":""},{"lineNumber":1756,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UnfavouriteCommand"},{"lineNumber":1757,"author":{"gitId":"-"},"content":""},{"lineNumber":1758,"author":{"gitId":"-"},"content":"*Setting a favoured person in the Address++ to be the unfavoured person*"},{"lineNumber":1759,"author":{"gitId":"-"},"content":""},{"lineNumber":1760,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1761,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1762,"author":{"gitId":"-"},"content":"list +"},{"lineNumber":1763,"author":{"gitId":"-"},"content":"unfavourite 1"},{"lineNumber":1764,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1765,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1766,"author":{"gitId":"-"},"content":"The 1st person in the Address++ will be unfavoured and the heart picture will disappear."},{"lineNumber":1767,"author":{"gitId":"-"},"content":""},{"lineNumber":1768,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1769,"author":{"gitId":"-"},"content":"Unfavourited Person: Alex Yeoh Phone: 87438807 Email: alexyeoh@example.com Address: Blk 30 Geylang Street 29, #06-40 Remark: Cheerful lad Avatar: Tags: [friends]"},{"lineNumber":1770,"author":{"gitId":"-"},"content":""},{"lineNumber":1771,"author":{"gitId":"-"},"content":"*Failing to set a unfavored person if he has not been favoured*"},{"lineNumber":1772,"author":{"gitId":"-"},"content":""},{"lineNumber":1773,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1774,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1775,"author":{"gitId":"-"},"content":"list +"},{"lineNumber":1776,"author":{"gitId":"-"},"content":"unfavourite 2"},{"lineNumber":1777,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1778,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1779,"author":{"gitId":"-"},"content":"An error message will display since the second person in the Address++ has bot been favoured."},{"lineNumber":1780,"author":{"gitId":"-"},"content":""},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1782,"author":{"gitId":"-"},"content":"Person is not favourited yet."},{"lineNumber":1783,"author":{"gitId":"-"},"content":""},{"lineNumber":1784,"author":{"gitId":"-"},"content":"*Failing to set a unfavoured person with invalid index*"},{"lineNumber":1785,"author":{"gitId":"-"},"content":""},{"lineNumber":1786,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1787,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1788,"author":{"gitId":"-"},"content":"unfavourite 56"},{"lineNumber":1789,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1790,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1791,"author":{"gitId":"-"},"content":"An error message will display since there is no 56th person in the current list."},{"lineNumber":1792,"author":{"gitId":"-"},"content":""},{"lineNumber":1793,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1794,"author":{"gitId":"-"},"content":"The person index provided is invalid"},{"lineNumber":1795,"author":{"gitId":"-"},"content":""},{"lineNumber":1796,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d RedoCommand"},{"lineNumber":1797,"author":{"gitId":"-"},"content":""},{"lineNumber":1798,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1799,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1800,"author":{"gitId":"Esilocke"},"content":"delete 1 +"},{"lineNumber":1801,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1802,"author":{"gitId":"Esilocke"},"content":"redo"},{"lineNumber":1803,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo and deleted again after a redo. +"},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1809,"author":{"gitId":"Esilocke"},"content":"Redo success!"},{"lineNumber":1810,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1811,"author":{"gitId":"-"},"content":""},{"lineNumber":1812,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1813,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1814,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1815,"author":{"gitId":"Esilocke"},"content":"add n/Peter Parker p/92241783 e/ceo@parkerindustries.com a/New York City r/Top 10 smartest people in the world +"},{"lineNumber":1816,"author":{"gitId":"Esilocke"},"content":"undo +"},{"lineNumber":1817,"author":{"gitId":"Esilocke"},"content":"redo"},{"lineNumber":1818,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1819,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo and added again with a redo."},{"lineNumber":1821,"author":{"gitId":"-"},"content":""},{"lineNumber":1822,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1823,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1824,"author":{"gitId":"Esilocke"},"content":"Redo success!"},{"lineNumber":1825,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1826,"author":{"gitId":"-"},"content":""},{"lineNumber":1827,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1828,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book to its original state before continuing with testing."},{"lineNumber":1829,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1830,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ClearCommand"},{"lineNumber":1831,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1832,"author":{"gitId":"Esilocke"},"content":"*Clearing all entries*"},{"lineNumber":1833,"author":{"gitId":"-"},"content":""},{"lineNumber":1834,"author":{"gitId":"-"},"content":"Input Command: +"},{"lineNumber":1835,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1836,"author":{"gitId":"Esilocke"},"content":"clear"},{"lineNumber":1837,"author":{"gitId":"-"},"content":"****"},{"lineNumber":1838,"author":{"gitId":"-"},"content":"Expected Result: +"},{"lineNumber":1839,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +"},{"lineNumber":1840,"author":{"gitId":"-"},"content":""},{"lineNumber":1841,"author":{"gitId":"-"},"content":"Expected Message: +"},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1843,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!"},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1845,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1846,"author":{"gitId":"Esilocke"},"content":"*Clearing persons only*"},{"lineNumber":1847,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1848,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1849,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1850,"author":{"gitId":"Esilocke"},"content":"clear person/"},{"lineNumber":1851,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1853,"author":{"gitId":"Esilocke"},"content":"All persons vanish from the leftmost column, leaving them empty. +"},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1855,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1856,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1857,"author":{"gitId":"Esilocke"},"content":"All contacts have been cleared!"},{"lineNumber":1858,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1859,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1860,"author":{"gitId":"Esilocke"},"content":"*Clearing tasks only*"},{"lineNumber":1861,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1862,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1863,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1864,"author":{"gitId":"Esilocke"},"content":"clear task/"},{"lineNumber":1865,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1866,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1867,"author":{"gitId":"Esilocke"},"content":"All tasks vanish from the middle columns, leaving them empty. +"},{"lineNumber":1868,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1869,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1870,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1871,"author":{"gitId":"Esilocke"},"content":"All tasks have been cleared!"},{"lineNumber":1872,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1873,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1874,"author":{"gitId":"Esilocke"},"content":"*Both person and task specified*"},{"lineNumber":1875,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1876,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1877,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1878,"author":{"gitId":"Esilocke"},"content":"clear task/ person/ task/ task/ person/"},{"lineNumber":1879,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1880,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1881,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +"},{"lineNumber":1882,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1883,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1884,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1885,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!"},{"lineNumber":1886,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1887,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1888,"author":{"gitId":"Esilocke"},"content":"[NOTE]"},{"lineNumber":1889,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book before continuing with testing."},{"lineNumber":1890,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1891,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d OpenCommand and SaveAsCommand"},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"*Saves data as a new .xml file and switches to that file*"},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"save +"},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"Save the new save file as test.xml. +"},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Click save."},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the file followed by test.xml. +"},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Successfully saved file."},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"*Opens and switches to a new .xml save file*"},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"Following the above save command:"},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":"clear"},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"To differentiate the test.xml with the [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"Expected Result: +"},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"The address book contains no more persons or tasks."},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"Input Command: +"},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"open +"},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml and select [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":"Click open."},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the [W09-B2][Address++]SampleData.xml followed by the name [W09-B2][Address++]SampleData.xml. +"},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"The original data is restored in the address book. +"},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"Expected Message: +"},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":"Successfully opened file."},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ExitCommand"},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"*Exits Address++*"},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":"Input Command:"},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"exit"},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"****"},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"Expected Result: Address++ closes."},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":1956,"author":{"gitId":"-"},"content":""},{"lineNumber":1957,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command"},{"lineNumber":1958,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":1959,"author":{"gitId":"charlesgoh"},"content":"*Sorts persons by name in ascending order*"},{"lineNumber":1960,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1961,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":1962,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1963,"author":{"gitId":"charlesgoh"},"content":"sort person name asc"},{"lineNumber":1964,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1965,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":1966,"author":{"gitId":"charlesgoh"},"content":"Person list panel will sort all persons by their names in ascending order +"},{"lineNumber":1967,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1968,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":1969,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1970,"author":{"gitId":"charlesgoh"},"content":"All persons in address book successfully sorted"},{"lineNumber":1971,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1972,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1973,"author":{"gitId":"charlesgoh"},"content":"*Sorts tasks by priority in descending order*"},{"lineNumber":1974,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1975,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":1976,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1977,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +"},{"lineNumber":1978,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1979,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":1980,"author":{"gitId":"charlesgoh"},"content":"Task list panel will sort all tasks by their priorities in descending order +"},{"lineNumber":1981,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1982,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":1983,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1984,"author":{"gitId":"charlesgoh"},"content":"All tasks in address book successfully sorted"},{"lineNumber":1985,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1986,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1987,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*"},{"lineNumber":1988,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1989,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":1990,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1991,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +"},{"lineNumber":1992,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1993,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":1994,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +"},{"lineNumber":1995,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":1996,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":1997,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":1998,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":1999,"author":{"gitId":"charlesgoh"},"content":"sort: Sorts all persons or all tasks by chosen field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive +"},{"lineNumber":2000,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [LIST] [FIELD] [ORDER] +"},{"lineNumber":2001,"author":{"gitId":"charlesgoh"},"content":"Example: sort person email desc +"},{"lineNumber":2002,"author":{"gitId":"charlesgoh"},"content":"Example 2: sort task deadline desc +"},{"lineNumber":2003,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2004,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2005,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command"},{"lineNumber":2006,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2007,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2008,"author":{"gitId":"charlesgoh"},"content":"Currently supports mac relative file paths. No guarantee of support for other operating system."},{"lineNumber":2009,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2010,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*"},{"lineNumber":2011,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2012,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2013,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2014,"author":{"gitId":"charlesgoh"},"content":"backup +"},{"lineNumber":2015,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2016,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2017,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +"},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":2022,"author":{"gitId":"charlesgoh"},"content":"backup: Backs up data to a user input location field [FILEPATH] +"},{"lineNumber":2023,"author":{"gitId":"charlesgoh"},"content":"Parameter: KEYWORD [FILEPATH] +"},{"lineNumber":2024,"author":{"gitId":"charlesgoh"},"content":"Example: backupMyBackUpFile +"},{"lineNumber":2025,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2026,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2027,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to same file path*"},{"lineNumber":2028,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2029,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2030,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2031,"author":{"gitId":"charlesgoh"},"content":"backup filename.xml"},{"lineNumber":2032,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the same directory as the jar file +"},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully."},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2040,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2041,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to relative file path*"},{"lineNumber":2042,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2043,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2044,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2045,"author":{"gitId":"charlesgoh"},"content":"backup ./../filename.xml +"},{"lineNumber":2046,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2047,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2048,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the directory preceding one level above the jar file +"},{"lineNumber":2049,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2050,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2051,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2052,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully."},{"lineNumber":2053,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2054,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2055,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Change Password Command"},{"lineNumber":2056,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2057,"author":{"gitId":"charlesgoh"},"content":"*Invalid Command Format Input*"},{"lineNumber":2058,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2059,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2060,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2061,"author":{"gitId":"charlesgoh"},"content":"changepassword +"},{"lineNumber":2062,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2063,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2064,"author":{"gitId":"charlesgoh"},"content":"Invalid command format error message with usage message +"},{"lineNumber":2065,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2066,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2067,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2068,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":2069,"author":{"gitId":"charlesgoh"},"content":"changepassword: Changes user password. +"},{"lineNumber":2070,"author":{"gitId":"charlesgoh"},"content":"pw/PASSWORD np/NEWPASSWORD cfp/CONFIRMPASSWORD +"},{"lineNumber":2071,"author":{"gitId":"charlesgoh"},"content":"Example: changepassword pw/password np/mynewpassword111 cfp/mynewpassword111 +"},{"lineNumber":2072,"author":{"gitId":"charlesgoh"},"content":"Example 2: cpw pw/password np/mynewpassword111 cfp/mynewpassword111 +"},{"lineNumber":2073,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2074,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2075,"author":{"gitId":"charlesgoh"},"content":"*Change Password with valid inputs*"},{"lineNumber":2076,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2077,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2078,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2079,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +"},{"lineNumber":2080,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2081,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2082,"author":{"gitId":"charlesgoh"},"content":"Application password will change to `newpassword` +"},{"lineNumber":2083,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2084,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2085,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2086,"author":{"gitId":"charlesgoh"},"content":"Password changed successfully"},{"lineNumber":2087,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2088,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2089,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Password entered*"},{"lineNumber":2090,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2091,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2092,"author":{"gitId":"charlesgoh"},"content":"Run this after running the previous command. Otherwise change the password to something incorrect. Default password"},{"lineNumber":2093,"author":{"gitId":"charlesgoh"},"content":"is `password`"},{"lineNumber":2094,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2095,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2096,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2097,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +"},{"lineNumber":2098,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2099,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2100,"author":{"gitId":"charlesgoh"},"content":"Application password will remain as `newpassword` and reject input +"},{"lineNumber":2101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2102,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2103,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2104,"author":{"gitId":"charlesgoh"},"content":"Your password is incorrect. Please try again."},{"lineNumber":2105,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2107,"author":{"gitId":"charlesgoh"},"content":"*Old and new passwords are the same*"},{"lineNumber":2108,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2109,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2110,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2111,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/newpassword cfp/newpassword +"},{"lineNumber":2112,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2113,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2114,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +"},{"lineNumber":2115,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2116,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2117,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2118,"author":{"gitId":"charlesgoh"},"content":"New password must be different from your old password"},{"lineNumber":2119,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2121,"author":{"gitId":"charlesgoh"},"content":"*New password and confirmation passwords do not match*"},{"lineNumber":2122,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2123,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2124,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2125,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/evennewerpassword cfp/wutwutWUUUUUT? +"},{"lineNumber":2126,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2127,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2128,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +"},{"lineNumber":2129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2130,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2131,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2132,"author":{"gitId":"charlesgoh"},"content":"Your new password and confirmation password do not match. Please try again"},{"lineNumber":2133,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2135,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock Command"},{"lineNumber":2136,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2137,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2138,"author":{"gitId":"charlesgoh"},"content":"The following tests assume that the password has been set to `newpassword` from the above tests. If you opened the application"},{"lineNumber":2139,"author":{"gitId":"charlesgoh"},"content":"for the first time, use the default password `password`."},{"lineNumber":2140,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2141,"author":{"gitId":"charlesgoh"},"content":"*Lock Application failure with incorrect password*"},{"lineNumber":2142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2143,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2144,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2145,"author":{"gitId":"charlesgoh"},"content":"lock pw/wrongpasswordlol +"},{"lineNumber":2146,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2147,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2148,"author":{"gitId":"charlesgoh"},"content":"Application will fail to lock +"},{"lineNumber":2149,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2150,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2151,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2152,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again"},{"lineNumber":2153,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2154,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2155,"author":{"gitId":"charlesgoh"},"content":"*Lock Application with correct password*"},{"lineNumber":2156,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2157,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2158,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2159,"author":{"gitId":"charlesgoh"},"content":"lock pw/newpassword"},{"lineNumber":2160,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2161,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2162,"author":{"gitId":"charlesgoh"},"content":"Locks application. Try performing any CRUD statements after locking (i.e. add or edit. It will fail) +"},{"lineNumber":2163,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2164,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2165,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2166,"author":{"gitId":"charlesgoh"},"content":"Address++ locked successfully"},{"lineNumber":2167,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2168,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2169,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Unlock Command"},{"lineNumber":2170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2171,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2172,"author":{"gitId":"charlesgoh"},"content":"This section is a continuation of the previous section on the Lock Command"},{"lineNumber":2173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2174,"author":{"gitId":"charlesgoh"},"content":"*Fail to unlock application with incorrect password*"},{"lineNumber":2175,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2176,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2177,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2178,"author":{"gitId":"charlesgoh"},"content":"unlock pw/wrongpassword:P"},{"lineNumber":2179,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2180,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2181,"author":{"gitId":"charlesgoh"},"content":"Fails to unlock application. You will still not be able to execute CRUD commands +"},{"lineNumber":2182,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2183,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2184,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2185,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again"},{"lineNumber":2186,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2188,"author":{"gitId":"charlesgoh"},"content":"*Unlock application with correct password*"},{"lineNumber":2189,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2190,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2191,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2192,"author":{"gitId":"charlesgoh"},"content":"unlock pw/newpassword:P"},{"lineNumber":2193,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2194,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2195,"author":{"gitId":"charlesgoh"},"content":"Unlocks application. You can now execute CRUD commands +"},{"lineNumber":2196,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2197,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2198,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2199,"author":{"gitId":"charlesgoh"},"content":"Address++ unlocked successfully"},{"lineNumber":2200,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2201,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2202,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command"},{"lineNumber":2203,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2204,"author":{"gitId":"charlesgoh"},"content":"*Increase font size*"},{"lineNumber":2205,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2206,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2207,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2208,"author":{"gitId":"charlesgoh"},"content":"fontsize increase"},{"lineNumber":2209,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2210,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2211,"author":{"gitId":"charlesgoh"},"content":"Increases font size by 1 level +"},{"lineNumber":2212,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2213,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2214,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2215,"author":{"gitId":"charlesgoh"},"content":"Font size increased successfully"},{"lineNumber":2216,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2217,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2218,"author":{"gitId":"charlesgoh"},"content":"*Decrease font size*"},{"lineNumber":2219,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2220,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2221,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2222,"author":{"gitId":"charlesgoh"},"content":"fs decrease"},{"lineNumber":2223,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2224,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2225,"author":{"gitId":"charlesgoh"},"content":"Decrease font size by 1 level +"},{"lineNumber":2226,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2227,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2228,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2229,"author":{"gitId":"charlesgoh"},"content":"Font size decreased successfully"},{"lineNumber":2230,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2231,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2232,"author":{"gitId":"charlesgoh"},"content":"*Reset font size*"},{"lineNumber":2233,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2234,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2235,"author":{"gitId":"charlesgoh"},"content":"You can try increasing the font size a few more times. There will be a max font size to prevent you from"},{"lineNumber":2236,"author":{"gitId":"charlesgoh"},"content":"increasing too much."},{"lineNumber":2237,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2238,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2239,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2240,"author":{"gitId":"charlesgoh"},"content":"fontsize reset +"},{"lineNumber":2241,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2242,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2243,"author":{"gitId":"charlesgoh"},"content":"Resets font size in the application +"},{"lineNumber":2244,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2245,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2246,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2247,"author":{"gitId":"charlesgoh"},"content":"Font size reset successfully"},{"lineNumber":2248,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2249,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2250,"author":{"gitId":"charlesgoh"},"content":"*Incorrect input format*"},{"lineNumber":2251,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2252,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2253,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2254,"author":{"gitId":"charlesgoh"},"content":"fontsize +"},{"lineNumber":2255,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2256,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2257,"author":{"gitId":"charlesgoh"},"content":"Displays invalid command format error and the usage message +"},{"lineNumber":2258,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2259,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +"},{"lineNumber":2260,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2261,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +"},{"lineNumber":2262,"author":{"gitId":"charlesgoh"},"content":"fontsize: Increases, decreases or resets font sizes +"},{"lineNumber":2263,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [OPTION] +"},{"lineNumber":2264,"author":{"gitId":"charlesgoh"},"content":"Example: fontsize increase +"},{"lineNumber":2265,"author":{"gitId":"charlesgoh"},"content":"Example 2: fs reset +"},{"lineNumber":2266,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2267,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2268,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatars"},{"lineNumber":2269,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2270,"author":{"gitId":"charlesgoh"},"content":"[NOTE]"},{"lineNumber":2271,"author":{"gitId":"charlesgoh"},"content":"There is full support for URLs. No guarantee for local file paths. Local file paths must add a local prefix `file:`"},{"lineNumber":2272,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2273,"author":{"gitId":"charlesgoh"},"content":"*Add avatar URL*"},{"lineNumber":2274,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":2275,"author":{"gitId":"charlesgoh"},"content":"Input Command: +"},{"lineNumber":2276,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2277,"author":{"gitId":"charlesgoh"},"content":"edit 1 v/[URL] +"},{"lineNumber":2278,"author":{"gitId":"charlesgoh"},"content":"Replace [URL] with a valid image online."},{"lineNumber":2279,"author":{"gitId":"charlesgoh"},"content":"****"},{"lineNumber":2280,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +"},{"lineNumber":2281,"author":{"gitId":"charlesgoh"},"content":"Replaces placeholder avatar with the online image +"}],"authorContributionMap":{"charlesgoh":324,"jeffreygohkw":186,"Esilocke":1500,"-":271}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" });"},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));"},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data."},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully."},{"lineNumber":97,"author":{"gitId":"-"},"content":" */"},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel."},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}."},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}."},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time."},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected."},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card."},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected."},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task."},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list."},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list."},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list."},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list."},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call."},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list."},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" String defaultConfigAsString \u003d \"App title : Address++\\n\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code AddPersonCommand}."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandIntegrationTest {"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), expectedModel);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" }"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code AddPersonCommand} which upon execution, adds {@code person} into the {@code model}."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand prepareCommand(Person person, Model model) {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":9,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandTest {"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommand \u003d new AddPersonCommand(alice);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addBobCommand \u003d new AddPersonCommand(bob);"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommandCopy \u003d new AddPersonCommand(alice);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddPersonCommand with the details of the given person."},{"lineNumber":81,"author":{"gitId":"-"},"content":" */"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand getAddCommandForPerson(Person person, Model model) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person or task."},{"lineNumber":90,"author":{"gitId":"-"},"content":" */"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":98,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added."},{"lineNumber":105,"author":{"gitId":"-"},"content":" */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":115,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":116,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":2,"-":100}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}."},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AddTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandTest {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" AddTaskCommandTest.ModelStubAcceptingTaskAdded modelStub \u003d new AddTaskCommandTest.ModelStubAcceptingTaskAdded();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d prepareCommand(validTask, modelStub).execute();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddTaskCommand.MESSAGE_SUCCESS, validTask), commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new AddTaskCommandTest.ModelStubAlwaysThrowingDuplicateException();"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddTaskCommand.MESSAGE_DUPLICATE_TASK);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" prepareCommand(validTask, modelStub).execute();"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommand \u003d new AddTaskCommand(paper);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPencilCommand \u003d new AddTaskCommand(pencil);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommandCopy \u003d new AddTaskCommand(paper);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddTaskCommand with the details of the given task."},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" private AddTaskCommand prepareCommand(Task task, Model model) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand command \u003d new AddTaskCommand(task);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateTaskException when trying to add a task."},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the task being added."},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingTaskAdded extends ModelStub {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":119}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_success() throws Exception {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_success() throws Exception {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assignedTask);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_success() throws Exception {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void execute_allPersonsAlreadyAssigned_throwsCommandException() throws Exception {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assignCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, expectedModel, AssignCommand.MESSAGE_NONE_ASSIGNED);"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets."},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index taskIndex) {"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, taskIndex);"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":156}},{"path":"src/test/java/seedu/address/logic/commands/ChangePasswordCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.ChangePasswordCommandParser;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandTest {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_PASSWORD \u003d \"password\";"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_SECOND_PASSWORD \u003d \"password2\";"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private UserPrefs userPrefs;"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ChangePasswordCommandParser parser;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d new UserPrefs();"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" parser \u003d new ChangePasswordCommandParser();"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void parseWrongArgumentsFailure() {"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" // No arguments failure"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Wrong number of arguments"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"one two?\", String"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // No prefixes"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"password password2 password3\", String"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void testUserPrefsPasswords() {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Check original password"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" String expectedPassword \u003d getHashed256(DEFAULT_PASSWORD);"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // Lock address book and check if state has changed"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(DEFAULT_SECOND_PASSWORD);"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" expectedPassword \u003d getHashed256(DEFAULT_SECOND_PASSWORD);"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Helps to convert string to SHA256 counterpart"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" private String getHashed256(String password) {"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":74}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\")"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" .setRemarkPrivate(\"false\").build();"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getRemarkIsPrivate(), pps.getRemarkIsPrivate());"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsCopy \u003d new PersonPrivacySettings(pps);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getAddressIsPrivate(), pps.getAddressIsPrivate());"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getEmailIsPrivate(), pps.getEmailIsPrivate());"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getNameIsPrivate(), pps.getNameIsPrivate());"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getPhoneIsPrivate(), pps.getPhoneIsPrivate());"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getRemarkIsPrivate(), pps.getRemarkIsPrivate());"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(true);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(true);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(true);"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"true\")"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").setRemarkPrivate(\"true\")"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").setRemarkPrivate(\"false\")"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(false);"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(false);"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(false);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(false);"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" .build();"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);"},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":149}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class ClearCommandTest {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":18,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/ClearPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommandTest {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearPersonCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ClearPersonCommand prepareCommand(Model model) {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ClearPersonCommand command \u003d new ClearPersonCommand();"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/commands/ClearTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommandTest {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, model);"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // Verify that only the tasks are cleared"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearTaskCommand} which upon execution, clears the contents in {@code model}."},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ClearTaskCommand prepareCommand(Model model) {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ClearTaskCommand command \u003d new ClearTaskCommand();"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":39}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands."},{"lineNumber":35,"author":{"gitId":"-"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_NAME_CHRIS \u003d \"Chris Chan\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_PHONE_CHRIS \u003d \"33333333\";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_EMAIL_CHRIS \u003d \"chris@example.com\";"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_ADDRESS_CHRIS \u003d \"Block 132, Chris Street 5\";"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_REMARK_CHRIS \u003d \"He likes swimming\";"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_AMY \u003d \"amyavatar\";"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_BOB \u003d \"bobavatar\";"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_CHRIS \u003d \"chirsavatar\";"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_ALICE \u003d \"false\";"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_BOB \u003d \"true\";"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_TAG_CHRISTAG \u003d \"special\";"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017 12pm\";"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017 12pm\";"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PENCIL \u003d \"12 Kent Ridge Cres\";"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PAPER \u003d \"Bedok Mall\";"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final String NAME_DESC_CHRIS \u003d \" \" + PREFIX_NAME + VALID_NAME_CHRIS;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public static final String PHONE_DESC_CHRIS \u003d \" \" + PREFIX_PHONE + VALID_PHONE_CHRIS;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" public static final String EMAIL_DESC_CHRIS \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_CHRIS;"},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" public static final String ADDRESS_DESC_CHRIS \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_CHRIS;"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" public static final String REMARK_DESC_CHRIS \u003d \" \" + PREFIX_REMARK + VALID_REMARK_CHRIS;"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_AMY \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_AMY;"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_BOB \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_BOB;"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_CHRIS \u003d \" \" + PREFIX_AVATAR + VALID_REMARK_CHRIS;"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PENCIL \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PAPER \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_TASK_NAME_DESC \u003d \" \" + PREFIX_NAME + \" \"; // task name cannot be blank"},{"lineNumber":109,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones"},{"lineNumber":111,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"TIMELESS AGES\"; // not a date"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_ADDRESS_DESC \u003d \" \" + PREFIX_ADDRESS + \" \"; // priority is out of bounds"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_AMY;"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_BOB;"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PENCIL;"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PAPER;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" static {"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //TODO: Change avatar filename to a real filename"},{"lineNumber":126,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)"},{"lineNumber":127,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_AMY).withAvatar(VALID_AVATAR_AMY).withFavourite(VALID_FAVOURITE_ALICE)"},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":130,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":131,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_BOB).withAvatar(VALID_AVATAR_BOB).withFavourite(VALID_FAVOURITE_ALICE)"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}"},{"lineNumber":146,"author":{"gitId":"-"},"content":" */"},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,"},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);"},{"lineNumber":153,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e"},{"lineNumber":160,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e"},{"lineNumber":162,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged"},{"lineNumber":163,"author":{"gitId":"-"},"content":" */"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can"},{"lineNumber":166,"author":{"gitId":"-"},"content":" // only do so by copying its components."},{"lineNumber":167,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());"},{"lineNumber":168,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":171,"author":{"gitId":"-"},"content":" command.execute();"},{"lineNumber":172,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (CommandException e) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());"},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());"},{"lineNumber":176,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());"},{"lineNumber":177,"author":{"gitId":"-"},"content":" }"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":181,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book."},{"lineNumber":182,"author":{"gitId":"-"},"content":" */"},{"lineNumber":183,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {"},{"lineNumber":184,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" final String[] splitName \u003d person.getName().value.split(\"\\\\s+\");"},{"lineNumber":186,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":193,"author":{"gitId":"-"},"content":" */"},{"lineNumber":194,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":199,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":200,"author":{"gitId":"-"},"content":" }"},{"lineNumber":201,"author":{"gitId":"-"},"content":" }"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book."},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public static void showFirstTaskOnly(Model model) {"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(0);"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book."},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" public static void showSecondTaskOnly(Model model) {"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(1);"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * Deletes the first task in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public static void deleteFirstTask(Model model) {"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask firstTask \u003d model.getFilteredTaskList().get(0);"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(firstTask);"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {"},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Task in filtered list must exist in model.\", pnfe);"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book."},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {"},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);"},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);"},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);"},{"lineNumber":247,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":250,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":15,"jeffreygohkw":5,"Esilocke":81,"wangyiming1019":25,"-":124}},{"path":"src/test/java/seedu/address/logic/commands/DeletePersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeletePersonCommand}."},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandTest {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":71,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommand \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteSecondCommand \u003d new DeletePersonCommand(INDEX_SECOND_PERSON);"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommandCopy \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeletePersonCommand} with the parameter {@code index}."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" private DeletePersonCommand prepareCommand(Index index) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d new DeletePersonCommand(index);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" deletePersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" return deletePersonCommand;"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one."},{"lineNumber":112,"author":{"gitId":"-"},"content":" */"},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":22,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}."},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {"},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);"},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false"},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));"},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false"},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));"},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}"},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {"},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);"},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;"},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() throws Exception {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" showNoTask(expectedModel);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommand \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteSecondCommand \u003d new DeleteTaskCommand(INDEX_SECOND_TASK);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommandCopy \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(1));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(null));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeleteTaskCommand} with the parameter {@code index}."},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private DeleteTaskCommand prepareCommand(Index index) {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d new DeleteTaskCommand(index);"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" deleteTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return deleteTaskCommand;"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show no tasks."},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" private void showNoTask(Model model) {"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(p -\u003e false);"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().isEmpty();"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":115}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_success() throws Exception {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_success() throws Exception {"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" dismissedTask);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_success() throws Exception {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void execute_noneDismissed_throwsCommandException() throws Exception {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, DismissCommand.MESSAGE_NONE_ASSIGNED);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets."},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index taskIndex) {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, taskIndex);"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":151}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditPersonCommand."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandTest {"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(indexLastPerson, descriptor);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);"},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());"},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));"},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" }"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book"},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,"},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {"},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex, descriptor);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book"},{"lineNumber":185,"author":{"gitId":"-"},"content":" */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex,"},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" final EditPersonCommand standardCommand \u003d new EditPersonCommand(INDEX_FIRST_PERSON, DESC_AMY);"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand commandWithSameValues \u003d new EditPersonCommand(INDEX_FIRST_PERSON, copyDescriptor);"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_SECOND_PERSON, DESC_AMY)));"},{"lineNumber":219,"author":{"gitId":"-"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_FIRST_PERSON, DESC_BOB)));"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditPersonCommand} with parameters {@code index} and {@code descriptor}"},{"lineNumber":226,"author":{"gitId":"-"},"content":" */"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" private EditPersonCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d new EditPersonCommand(index, descriptor);"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" editPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return editPersonCommand;"},{"lineNumber":231,"author":{"gitId":"-"},"content":" }"},{"lineNumber":232,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":31,"-":140}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_BOB;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorTest {"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":26,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptorWithSameValues \u003d new EditPersonDescriptor(DESC_AMY);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(descriptorWithSameValues));"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(DESC_AMY));"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(null));"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(5));"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different values -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(DESC_BOB));"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different name -\u003e returns false"},{"lineNumber":42,"author":{"gitId":"-"},"content":" EditPersonDescriptor editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withName(VALID_NAME_BOB).build();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" // different phone -\u003e returns false"},{"lineNumber":46,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withPhone(VALID_PHONE_BOB).build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" // different email -\u003e returns false"},{"lineNumber":50,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withEmail(VALID_EMAIL_BOB).build();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // different address -\u003e returns false"},{"lineNumber":54,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAddress(VALID_ADDRESS_BOB).build();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" // different tags -\u003e returns false"},{"lineNumber":58,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // different remarks -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // different avatar -\u003e returns false"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAvatar(VALID_AVATAR_BOB).build();"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // different favourite status -\u003e returns false"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withFavourite(VALID_FAVOURITE_BOB).build();"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":16,"-":57}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent_throwsCommandException() throws IllegalValueException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset_success() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll_success() throws IllegalValueException, PersonNotFoundException {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" private AddressBook prepareAddressBook() throws DuplicatePersonException {"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditTaskCommand."},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandTest {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder().build();"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder(editedTask).build();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(Index.fromZeroBased(3), descriptor);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(3), editedTask);"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Index indexLastTask \u003d Index.fromOneBased(model.getFilteredTaskList().size());"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask lastTask \u003d model.getFilteredTaskList().get(indexLastTask.getZeroBased());"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" TaskBuilder taskInList \u003d new TaskBuilder(lastTask);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d taskInList.withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(indexLastTask, descriptor);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(lastTask, editedTask);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskInFilteredList \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder(taskInFilteredList).withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK,"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(0), editedTask);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexUnfilteredList_failure() {"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex, descriptor);"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" * Edit filtered list where index is larger than size of filtered list,"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * but smaller than size of address book"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexFilteredList_failure() {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex,"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" final EditTaskCommand standardCommand \u003d new EditTaskCommand(INDEX_FIRST_TASK, DESC_PENCIL);"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor copyDescriptor \u003d new EditTaskCommand.EditTaskDescriptor(DESC_PENCIL);"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand commandWithSameValues \u003d new EditTaskCommand(INDEX_FIRST_TASK, copyDescriptor);"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different index -\u003e returns false"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_SECOND_TASK, DESC_PENCIL)));"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // different descriptor -\u003e returns false"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_FIRST_TASK, DESC_PAPER)));"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskCommand} with parameters {@code index} and {@code descriptor}"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private EditTaskCommand prepareCommand(Index index, EditTaskCommand.EditTaskDescriptor descriptor) {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d new EditTaskCommand(index, descriptor);"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" editTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return editTaskCommand;"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":152}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" // different task address -\u003e returns false"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":59}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code FindPersonCommand}."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandTest {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d"},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d"},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommand \u003d new FindPersonCommand(firstPredicate);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findSecondCommand \u003d new FindPersonCommand(secondPredicate);"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommandCopy \u003d new FindPersonCommand(firstPredicate);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\" \");"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindPersonCommand}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" */"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" private FindPersonCommand prepareCommand(String userInput) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":89,"author":{"gitId":"-"},"content":" */"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindPersonCommand command, String expectedMessage,"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":15,"-":84}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}."},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}."},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;"},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/FindTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_TASKS_LISTED_OVERVIEW;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.ACCEPT;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.DATE;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.GRADLE;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandTest {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"first\"));"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"second\"));"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommand \u003d new FindTaskCommand(firstPredicate);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findSecondCommand \u003d new FindTaskCommand(secondPredicate);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommandCopy \u003d new FindTaskCommand(firstPredicate);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(1));"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(null));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void execute_zeroKeywords_noTaskFound() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 0);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\" \");"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public void execute_multipleKeywords_multipleTasksFound() {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 3);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\"Resolve Acceptance Date\");"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ACCEPT, DATE, GRADLE));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindTaskCommand}."},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" private FindTaskCommand prepareCommand(String userInput) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * - the {@code FilteredList\u003cReadOnlyTask\u003e} is equal to {@code expectedList}\u003cbr\u003e"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindTaskCommand command, String expectedMessage,"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e expectedList) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedList, model.getFilteredTaskList());"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":97}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}."},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code BrowserPanelLocateEvent}"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index."},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}."},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}."},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/NavigateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code NavigateCommand}."},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandTest {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromAddress_success() throws IllegalValueException {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to, null, null, false, false);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromPersons_success() throws IllegalValueException {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromTasks_success() throws IllegalValueException {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidArgs_failure() throws IllegalValueException {"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to,"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand naviOne \u003d prepareCommand(from, to,"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_SECOND_PERSON, false, false);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Executes the input (@code NavigateCommand) and checks that (@code BrowserPanelNavigateEvent) is raised with"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * the correct locations"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(NavigateCommand navi) throws IllegalValueException {"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" Location from;"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Location to;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationFrom() !\u003d null) {"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d navi.getLocationFrom();"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isFromIsTask()) {"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredTaskList().get(navi.getFromIndex().getZeroBased())"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredPersonList().get(navi.getFromIndex().getZeroBased())"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationTo() !\u003d null) {"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d navi.getLocationTo();"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isToIsTask()) {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredTaskList().get(navi.getToIndex().getZeroBased())"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredPersonList().get(navi.getToIndex().getZeroBased())"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d navi.execute();"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(NavigateCommand.MESSAGE_NAVIGATE_SUCCESS,"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" from, to),"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelNavigateEvent lastEvent \u003d"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelNavigateEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(from, lastEvent.getFromLocation());"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(to, lastEvent.getToLocation());"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code NavigateCommand} based on input parameters."},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommand prepareCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d new NavigateCommand(locationFrom, locationTo, fromIndex, toIndex, fromIsTask, toIsTask);"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" navi.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return navi;"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":135}},{"path":"src/test/java/seedu/address/logic/commands/OpenCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.OpenCommand.OPEN_COMMAND_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommandTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new OpenCommand().execute();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(OPEN_COMMAND_SUCCESS, result.feedbackToUser);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof OpenRequestEvent);"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/PrivacyLevelCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Assert;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code PrivacyLevelCommand}."},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandTest {"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Before"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndex_success() {"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //valid levels"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand onePlc \u003d prepareCommand(1);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand twoPlc \u003d prepareCommand(2);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand threePlc \u003d prepareCommand(3);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(onePlc);"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(twoPlc);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(threePlc);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndex_failure() {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //Negative level"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand negativePlc \u003d prepareCommand(-1);"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //Zero level"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand zeroPlc \u003d prepareCommand(0);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //Level greater than the maximum level allowed"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand tooBigPlc \u003d prepareCommand(5);"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(negativePlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(zeroPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(tooBigPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that the privacy level of the model and each person has been"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * changed to that of the level as specified in the input (@code PrivacyLevelCommand)"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(PrivacyLevelCommand plc) {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult;"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" commandResult \u003d plc.execute();"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(PrivacyLevelCommand.CHANGE_PRIVACY_LEVEL_SUCCESS, plc.getLevel()),"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //Check the model\u0027s privacy level"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(model.getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //Iterate through the list of persons in the model"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" //Check the person\u0027s Privacy Level"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getAddressBook().getPersonList().get(i);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" //Check Privacy Level of all fields of each person that can be private"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getName().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getPhone().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getEmail().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getAddress().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getRemark().getPrivacyLevel() \u003d\u003d plc.getLevel());"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that a {@code CommandException}"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(PrivacyLevelCommand plc, String expectedMessage) {"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" try {"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" plc.execute();"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Assert.assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}."},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommand prepareCommand(int level) {"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand privacyLevelCommand \u003d new PrivacyLevelCommand(level);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" privacyLevelCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return privacyLevelCommand;"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":116}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RedoCommandTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Collections.emptyList(), Arrays.asList(deletePersonCommandTwo, deletePersonCommandOne));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();"},{"lineNumber":41,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" // multiple commands in redoStack"},{"lineNumber":45,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" // single command in redoStack"},{"lineNumber":49,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" // no command in redoStack"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":8,"-":47}},{"path":"src/test/java/seedu/address/logic/commands/SaveAsCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SaveAsCommand.SAVE_AS_COMMAND_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommandTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new SaveAsCommand().execute();"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(SAVE_AS_COMMAND_SUCCESS, result.feedbackToUser);"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof SaveAsRequestEvent);"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/SelectPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectPersonCommand}."},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandTest {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Rule"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" @Before"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public void setUp() {"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastPersonIndex);"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommand \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectSecondCommand \u003d new SelectPersonCommand(INDEX_SECOND_PERSON);"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommandCopy \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestEvent} is raised with the correct index."},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectPersonCommand.MESSAGE_SUCCESS, index.getOneBased());"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectPersonCommand.execute();"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestEvent lastEvent \u003d"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" * is thrown with the ."},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.execute();"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectPersonCommand} with parameters {@code index}."},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" private SelectPersonCommand prepareCommand(Index index) {"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d new SelectPersonCommand(index);"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" return selectPersonCommand;"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":139}},{"path":"src/test/java/seedu/address/logic/commands/SelectTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandTest {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Before"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void setUp() {"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index lastTaskIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size());"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_TASK);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastTaskIndex);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommand \u003d new SelectTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectSecondCommand \u003d new SelectTaskCommand(INDEX_SECOND_TASK);"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommandCopy \u003d new SelectTaskCommand(INDEX_FIRST_TASK);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestTaskEvent} is raised with the correct index."},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectTaskCommand.MESSAGE_SUCCESS, index.getOneBased());"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectTaskCommand.execute();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent lastEvent \u003d"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestTaskEvent) eventsCollectorRule.eventsCollector.getMostRecent();"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that a {@code CommandException}"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" * is thrown with the ."},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.execute();"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectTaskCommand} with parameters {@code index}."},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" private SelectTaskCommand prepareCommand(Index index) {"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d new SelectTaskCommand(index);"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" return selectTaskCommand;"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":136}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListValidIndex_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListInvalidIndex_failure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, SetCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(expectedModel);"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}."},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":118}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showSecondTaskOnly;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_changeIncompleteTask_failure() throws Exception {"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, SetIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(model);"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(expectedModel);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}."},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return command;"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":117}},{"path":"src/test/java/seedu/address/logic/commands/TagListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS_WITH_NEW_TAG;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommandTest {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model;"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" private TagListCommand listTagsCommand;"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String expectedMessage;"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Before"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cTag\u003e tagList \u003d new ArrayList\u003cTag\u003e();"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand \u003d new TagListCommand();"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder expectedMessageString \u003d new StringBuilder(listTagsCommand.MESSAGE_SUCCESS);"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (!tagList.contains(tag)) {"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" tagList.add(tag);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageString.append(\"\u003c\").append(tag.getTagName()).append(\"\u003e \");"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" expectedMessage \u003d expectedMessageString.toString().trim();"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void executeTagListNotEmpty() {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyTagListShowNothing() throws DuplicatePersonException {"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModelWithNoTags \u003d new ModelManager();"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessageWithNoTags \u003d listTagsCommand.MESSAGE_FAILURE;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" TagListCommand tagListCommandWithNoTags \u003d new TagListCommand();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" tagListCommandWithNoTags.setData(expectedModelWithNoTags, new CommandHistory(),"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" new UndoRedoStack());"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(tagListCommandWithNoTags, expectedModelWithNoTags,"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageWithNoTags, expectedModelWithNoTags);"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithPersonAdd() throws DuplicatePersonException {"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithTagEdited() throws"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" PersonNotFoundException, DuplicatePersonException {"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":88}},{"path":"src/test/java/seedu/address/logic/commands/ThemeCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_CHANGE_SUCCESS;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_IN_USE;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_NOT_AVAILABLE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandTest {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommand \u003d new ThemeCommand(\"light\");"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkThemeCommand \u003d new ThemeCommand(\"Dark\");"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommand));"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommandCopy \u003d new ThemeCommand(\"light\");"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommandCopy));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(1));"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(null));"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" // different theme -\u003e returns false"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(darkThemeCommand));"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_correctTheme_success() throws CommandException {"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"light\");"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(command, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"light\"));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkCommand \u003d prepareCommand(\"dark\");"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(darkCommand, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"dark\"));"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_wrongArguments_failure() {"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"notATheme\");"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_NOT_AVAILABLE, \"notATheme\"));"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_themeAlreadyLoaded_failure() {"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"dark\");"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_IN_USE, \"dark\"));"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightCommand \u003d prepareCommand(\"light\");"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(lightCommand, model, String.format(MESSAGE_THEME_IN_USE, \"light\"));"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses {@code userInput} into a {@code ThemeCommand}."},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommand prepareCommand(String userInput) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d new ThemeCommand(userInput);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return command;"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Asserts that {@code command} is successfully executed"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void assertCommandSuccess(ThemeCommand command, String expectedMessage) throws CommandException {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d command.execute();"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getTheme());"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getUserPrefs().getTheme());"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":98}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}."},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class UndoCommandTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() throws Exception {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack("},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Arrays.asList(deletePersonCommandOne, deletePersonCommandTwo), Collections.emptyList());"},{"lineNumber":40,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();"},{"lineNumber":41,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.execute();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.execute();"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in undoStack"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":47,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // single command in undoStack"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" // no command in undoStack"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":11,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons"},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list."},{"lineNumber":50,"author":{"gitId":"-"},"content":" */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/commands/UnlockLockCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class UnlockLockCommandTest {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private Model model;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" model \u003d new ModelManager();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public void checkLockFunctionality() throws Exception {"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Check initial state is unlocked"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Check that lock works"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Check double lock"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Check that unlock works"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // Check double unlock"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":46}},{"path":"src/test/java/seedu/address/logic/commands/ViewAssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandTest {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToShow \u003d model.getFilteredTaskList().get(5);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(Index.fromZeroBased(5));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, 3);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.viewAssignees(taskToShow);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(viewAssignCommand, model, expectedMessage, expectedModel);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommand \u003d new ViewAssignCommand(INDEX_FIRST_TASK);"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewSecondCommand \u003d new ViewAssignCommand(INDEX_SECOND_TASK);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommand));"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommandCopy \u003d new ViewAssignCommand(INDEX_FIRST_TASK);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommandCopy));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(1));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(null));"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(viewSecondCommand));"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code ViewAssignCommand} with the parameter {@code index}."},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommand prepareCommand(Index index) {"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d new ViewAssignCommand(index);"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" viewAssignCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return viewAssignCommand;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":90}},{"path":"src/test/java/seedu/address/logic/parser/AddPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandParserTest {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // multiple names - last name accepted"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // multiple tags - all accepted"},{"lineNumber":77,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPersonMultipleTags));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" // zero tags"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY,"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPerson));"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":98,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE);"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" // missing name prefix"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB"},{"lineNumber":103,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" // all prefixes missing"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB"},{"lineNumber":107,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":111,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" // invalid phone"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" // invalid email"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":" // invalid tag"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":28,"Esilocke":22,"-":86}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParserTest {"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private AddCommandParser parser \u003d new AddCommandParser();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // multiple addresses - last address accepted"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + TASK_ADDRESS_DESC_PAPER + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE);"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // invalid deadline"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" // invalid priority"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Priority.MESSAGE_PRIORITY_CONSTRAINTS);"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // two invalid values, only first invalid value reported"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;"},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":81,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;"},{"lineNumber":84,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":86,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":88,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":92,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":94,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":96,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" private static final boolean DEFAULT_STATE_LOCK \u003d false;"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" AddCommand command \u003d (AddPersonCommand) parser"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(PersonUtil.getAddCommand(person), DEFAULT_STATE_LOCK);"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddPersonCommand(person), command);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(TaskUtil.getAddCommand(task), DEFAULT_STATE_LOCK);"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddTaskCommand(task), command);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddPersonCommand) parser.parseCommand(AddPersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":125,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(new AddPersonCommand(person), command);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(AddTaskCommand.COMMAND_ALIAS + \" \""},{"lineNumber":130,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(new AddTaskCommand(task), command);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \""},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {"},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();"},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand("},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())"},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandPrivacyLevel() throws Exception {"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 1\", DEFAULT_STATE_LOCK)"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 2\", DEFAULT_STATE_LOCK)"},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK)"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasPrivacyLevel() throws Exception {"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 1\", DEFAULT_STATE_LOCK)"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 2\", DEFAULT_STATE_LOCK)"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK)"},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);"},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandTheme() throws Exception {"},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" dark\", DEFAULT_STATE_LOCK)"},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" light\", DEFAULT_STATE_LOCK)"},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasTheme() throws Exception {"},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" dark\", DEFAULT_STATE_LOCK)"},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" light\", DEFAULT_STATE_LOCK)"},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);"},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {"},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ClearCommand);"},{"lineNumber":228,"author":{"gitId":"-"},"content":" }"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":231,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {"},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ClearCommand);"},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":235,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand("},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \""},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand("},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \""},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {"},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand("},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand("},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand"},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \""},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":260,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":261,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \""},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));"},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \""},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":282,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":283,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {"},{"lineNumber":284,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":285,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \""},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \""},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \""},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);"},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":296,"author":{"gitId":"-"},"content":" }"},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {"},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();"},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \""},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \""},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {"},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);"},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandOpen() throws Exception {"},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(OpenCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof OpenCommand);"},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser"},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(OpenCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof OpenCommand);"},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandSaveAs() throws Exception {"},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(SaveAsCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof SaveAsCommand);"},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser"},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(SaveAsCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof SaveAsCommand);"},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":350,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":352,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {"},{"lineNumber":353,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ExitCommand);"},{"lineNumber":354,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser"},{"lineNumber":355,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ExitCommand);"},{"lineNumber":356,"author":{"gitId":"-"},"content":" }"},{"lineNumber":357,"author":{"gitId":"-"},"content":""},{"lineNumber":358,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {"},{"lineNumber":360,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand("},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + keywords.stream()"},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \""},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate(keywords,"},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" DEFAULT_STATE_LOCK, DEFAULT_STATE_LOCK, false, 0)), command);"},{"lineNumber":371,"author":{"gitId":"-"},"content":" }"},{"lineNumber":372,"author":{"gitId":"-"},"content":""},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {"},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand("},{"lineNumber":377,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + keywords"},{"lineNumber":378,"author":{"gitId":"charlesgoh"},"content":" .stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \""},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate("},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" keywords, DEFAULT_STATE_LOCK, false, false, 0)), command);"},{"lineNumber":386,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":387,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":388,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":389,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":390,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAddTag() throws Exception {"},{"lineNumber":391,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":392,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":393,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":395,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":396,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_WORD"},{"lineNumber":397,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":398,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":399,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":400,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);"},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":402,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":403,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":404,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasAddTag() throws Exception {"},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":406,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":407,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":408,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":409,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);"},{"lineNumber":410,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_ALIAS"},{"lineNumber":411,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":412,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":413,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":414,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);"},{"lineNumber":415,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":416,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":417,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":418,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDeleteTag() throws Exception {"},{"lineNumber":419,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":420,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":421,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":422,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":423,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":424,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_WORD"},{"lineNumber":425,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":426,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":427,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":428,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);"},{"lineNumber":429,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":430,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":431,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":432,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDeleteTag() throws Exception {"},{"lineNumber":433,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":434,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":435,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":436,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);"},{"lineNumber":438,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_ALIAS"},{"lineNumber":439,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL"},{"lineNumber":440,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":441,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);"},{"lineNumber":442,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);"},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":444,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":445,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":446,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandTagList() throws Exception {"},{"lineNumber":447,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_WORD,"},{"lineNumber":448,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand"},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasTagList() throws Exception {"},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_ALIAS,"},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":457,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand"},{"lineNumber":458,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);"},{"lineNumber":459,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":460,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":461,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":462,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {"},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":465,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":466,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":467,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":468,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":469,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":470,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":471,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":472,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {"},{"lineNumber":473,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");"},{"lineNumber":474,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand("},{"lineNumber":475,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + PREFIX_TAG_FULL + \" \""},{"lineNumber":476,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);"},{"lineNumber":477,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand("},{"lineNumber":478,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);"},{"lineNumber":479,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":480,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":481,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":482,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavourite() throws Exception {"},{"lineNumber":483,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand("},{"lineNumber":484,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":485,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":486,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":487,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":488,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":489,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":490,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavourite() throws Exception {"},{"lineNumber":491,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand("},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":493,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":494,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":495,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":496,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":497,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":498,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnfavourite() throws Exception {"},{"lineNumber":499,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand("},{"lineNumber":500,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":501,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":502,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":503,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":504,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":505,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":506,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasUnfavourite() throws Exception {"},{"lineNumber":507,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand("},{"lineNumber":508,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":509,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);"},{"lineNumber":510,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":511,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":512,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":513,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":514,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavouriteList() throws Exception {"},{"lineNumber":515,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_WORD,"},{"lineNumber":516,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":517,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand"},{"lineNumber":518,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":519,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":520,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":521,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":522,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavouriteList() throws Exception {"},{"lineNumber":523,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_ALIAS,"},{"lineNumber":524,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":525,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand"},{"lineNumber":526,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);"},{"lineNumber":527,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":528,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":529,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":530,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":531,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {"},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HelpCommand);"},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HelpCommand);"},{"lineNumber":534,"author":{"gitId":"-"},"content":" }"},{"lineNumber":535,"author":{"gitId":"-"},"content":""},{"lineNumber":536,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":537,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {"},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand"},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":541,"author":{"gitId":"-"},"content":""},{"lineNumber":542,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);"},{"lineNumber":544,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":545,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {"},{"lineNumber":546,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":547,"author":{"gitId":"-"},"content":" }"},{"lineNumber":548,"author":{"gitId":"-"},"content":" }"},{"lineNumber":549,"author":{"gitId":"-"},"content":""},{"lineNumber":550,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":551,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {"},{"lineNumber":552,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":553,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand"},{"lineNumber":554,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);"},{"lineNumber":555,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":556,"author":{"gitId":"wangyiming1019"},"content":" try {"},{"lineNumber":557,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);"},{"lineNumber":558,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":559,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {"},{"lineNumber":560,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":561,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":562,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":563,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":564,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":565,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {"},{"lineNumber":566,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":567,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand"},{"lineNumber":568,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":569,"author":{"gitId":"-"},"content":" }"},{"lineNumber":570,"author":{"gitId":"-"},"content":""},{"lineNumber":571,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":572,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {"},{"lineNumber":573,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":574,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand"},{"lineNumber":575,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);"},{"lineNumber":576,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":577,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":578,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":579,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {"},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand("},{"lineNumber":581,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":583,"author":{"gitId":"-"},"content":" }"},{"lineNumber":584,"author":{"gitId":"-"},"content":""},{"lineNumber":585,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":586,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {"},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand("},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":590,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":591,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {"},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {"},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand("},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandNavigate() throws Exception {"},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand("},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);"},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),"},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" command);"},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasNavigate() throws Exception {"},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand("},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_ALIAS + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);"},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");"},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");"},{"lineNumber":625,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),"},{"lineNumber":626,"author":{"gitId":"jeffreygohkw"},"content":" command);"},{"lineNumber":627,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":628,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandWord() throws Exception {"},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \""},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)"},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);"},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandAlias() throws Exception {"},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \""},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)"},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);"},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackup() throws Exception {"},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand"},{"lineNumber":647,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);"},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand"},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);"},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeWord() throws Exception {"},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {"},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser"},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand"},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);"},{"lineNumber":658,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeAlias() throws Exception {"},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {"},{"lineNumber":664,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser"},{"lineNumber":665,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand"},{"lineNumber":666,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);"},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":668,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":669,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":670,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandValid() throws Exception {"},{"lineNumber":672,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix"},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix"},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias"},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand"},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);"},{"lineNumber":686,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandWordInvalid() throws Exception {"},{"lineNumber":690,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":691,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));"},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);"},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandAliasInvalid() throws Exception {"},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));"},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);"},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandValid() throws Exception {"},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix"},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix"},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":710,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \""},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":712,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":713,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias"},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand"},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD"},{"lineNumber":719,"author":{"gitId":"charlesgoh"},"content":" + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);"},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandWordInvalid() throws Exception {"},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));"},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);"},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandAliasInvalid() throws Exception {"},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":732,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));"},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);"},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":735,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":" public void parseChangePasswordCommand() throws Exception {"},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are correct and valid"},{"lineNumber":739,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are wrong but valid"},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":746,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":748,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that have the wrong order (i.e. fields are in the wrong order)"},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \""},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":" // Do the same thing for alias counterparts"},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \""},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":770,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":773,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \""},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand"},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \""},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \""},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);"},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":783,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":784,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {"},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof RedoCommand);"},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_STATE_LOCK) instanceof RedoCommand);"},{"lineNumber":787,"author":{"gitId":"-"},"content":" }"},{"lineNumber":788,"author":{"gitId":"-"},"content":""},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {"},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD"},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {"},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS"},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {"},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {"},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS"},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);"},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);"},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":" //@@author"},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":819,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":820,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {"},{"lineNumber":821,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof UndoCommand);"},{"lineNumber":822,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_STATE_LOCK) instanceof UndoCommand);"},{"lineNumber":823,"author":{"gitId":"-"},"content":" }"},{"lineNumber":824,"author":{"gitId":"-"},"content":""},{"lineNumber":825,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":826,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {"},{"lineNumber":827,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":828,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":829,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"\", DEFAULT_STATE_LOCK);"},{"lineNumber":830,"author":{"gitId":"-"},"content":" }"},{"lineNumber":831,"author":{"gitId":"-"},"content":""},{"lineNumber":832,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":833,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {"},{"lineNumber":834,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":835,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":836,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_STATE_LOCK);"},{"lineNumber":837,"author":{"gitId":"-"},"content":" }"},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal"},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command"},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command"},{"lineNumber":844,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal"},{"lineNumber":845,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":846,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {"},{"lineNumber":847,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());"},{"lineNumber":848,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":849,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":850,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":851,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":852,"author":{"gitId":"jeffreygohkw"},"content":" return true;"},{"lineNumber":853,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":854,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":223,"jeffreygohkw":156,"Esilocke":164,"wangyiming1019":201,"-":110}},{"path":"src/test/java/seedu/address/logic/parser/AssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private AssignTaskCommandParser parser \u003d new AssignTaskCommandParser();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new AssignCommand(indexes, INDEX_FIRST_TASK));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + \"aaaaa\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" AssignCommand.MESSAGE_USAGE));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\","},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\","},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\","},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\","},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\","},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {"},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {"},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\""},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")"},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();"},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {"},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";"},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();"},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);"},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);"},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);"},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents"},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand"},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand"},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {"},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());"},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());"},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/ClearCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ClearCommandParser parser \u003d new ClearCommandParser();"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidType_failure() throws ParseException {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" some invalid value\","},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void parseValidTypes_success() throws ParseException {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ClearCommand expectedClearAll \u003d new ClearCommand();"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_PERSON.getPrefix()) instanceof ClearPersonCommand);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_TASK.getPrefix()) instanceof ClearTaskCommand);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ClearCommand multipleTypesSpecified \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearPersonCommand);"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearTaskCommand);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ClearCommand repeatedTypes \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix() + PREFIX_PERSON.getPrefix() + \" \" + PREFIX_TASK.getPrefix() + \" \");"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearPersonCommand);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearTaskCommand);"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":43}},{"path":"src/test/java/seedu/address/logic/parser/DeletePersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * outside of the DeletePersonCommand code. For example, inputs \"1\" and \"1 abc\" take the"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * same path through the DeletePersonCommand, and therefore we test only one of them."},{"lineNumber":16,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParserTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeletePersonCommand(INDEX_FIRST_PERSON));"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\","},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":8,"-":25}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";"},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;"},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,"},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":""}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\","},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new DeleteTaskCommand(INDEX_FIRST_TASK));"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\","},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/DismissCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandParserTest {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private DismissTaskCommandParser parser \u003d new DismissTaskCommandParser();"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new DismissCommand(indexes, INDEX_FIRST_TASK));"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + \"aaaaa\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" DismissCommand.MESSAGE_USAGE));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix();"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_TARGET_ARGS);"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/EditPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParserTest {"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final String TAG_EMPTY \u003d \" \" + PREFIX_TAG;"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" private EditCommandParser parser \u003d new EditCommandParser();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no index specified"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" // no field specified"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"1\", EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" // no index and no field specified"},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" // negative index"},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" // zero index"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS); // invalid name"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS); // invalid phone"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS); // invalid email"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS); // invalid tag"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" // invalid phone followed by valid email"},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC + EMAIL_DESC_AMY, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone"},{"lineNumber":91,"author":{"gitId":"-"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + PHONE_DESC_BOB + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" // while parsing {@code PREFIX_TAG} alone will reset the tags of the {@code Person} being edited,"},{"lineNumber":95,"author":{"gitId":"-"},"content":" // parsing it together with a valid tag results in error"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + TAG_EMPTY, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_EMPTY + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_EMPTY + TAG_DESC_FRIEND + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" // multiple invalid values, but only the first invalid value is captured"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC + INVALID_EMAIL_DESC + VALID_ADDRESS_AMY + VALID_PHONE_AMY,"},{"lineNumber":102,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void parse_allFieldsSpecified_success() {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":108,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + TAG_DESC_HUSBAND"},{"lineNumber":109,"author":{"gitId":"-"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + NAME_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":113,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void parse_someFieldsSpecified_success() {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + EMAIL_DESC_AMY;"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)"},{"lineNumber":125,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).build();"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" }"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":132,"author":{"gitId":"-"},"content":" public void parse_oneFieldSpecified_success() {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" // name"},{"lineNumber":134,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":135,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + NAME_DESC_AMY;"},{"lineNumber":136,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY).build();"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" // phone"},{"lineNumber":141,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY;"},{"lineNumber":142,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_AMY).build();"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" // email"},{"lineNumber":147,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_AMY;"},{"lineNumber":148,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withEmail(VALID_EMAIL_AMY).build();"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" // address"},{"lineNumber":153,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + ADDRESS_DESC_AMY;"},{"lineNumber":154,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withAddress(VALID_ADDRESS_AMY).build();"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" // tags"},{"lineNumber":159,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":160,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":168,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":169,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND"},{"lineNumber":170,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)"},{"lineNumber":173,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND)"},{"lineNumber":174,"author":{"gitId":"-"},"content":" .build();"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":181,"author":{"gitId":"-"},"content":" public void parse_invalidValueFollowedByValidValue_success() {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" // no other valid values specified"},{"lineNumber":183,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;"},{"lineNumber":184,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + INVALID_PHONE_DESC + PHONE_DESC_BOB;"},{"lineNumber":185,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).build();"},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":187,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" // other valid values specified"},{"lineNumber":190,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_BOB + INVALID_PHONE_DESC + ADDRESS_DESC_BOB"},{"lineNumber":191,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB;"},{"lineNumber":192,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).build();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" }"},{"lineNumber":197,"author":{"gitId":"-"},"content":""},{"lineNumber":198,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":199,"author":{"gitId":"-"},"content":" public void parse_resetTags_success() {"},{"lineNumber":200,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;"},{"lineNumber":201,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + TAG_EMPTY;"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withTags().build();"},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":16,"-":192}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/EditTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TASK_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParserTest {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE);"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private EditCommandParser parser \u003d new EditCommandParser();"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parse_missingParts_failure() {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no index specified"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + VALID_TASK_NAME_PAPER, MESSAGE_INVALID_FORMAT);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no field specified"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\", EditTaskCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" // no index and no field specified"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidPreamble_failure() {"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" // negative index"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"-5\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // zero index"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"0\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // invalid arguments being parsed as preamble"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 some random string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // invalid prefix being parsed as preamble"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 i/ string\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValue_failure() {"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC,"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" TaskName.MESSAGE_NAME_CONSTRAINTS); // invalid name"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC,"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE); // invalid deadline"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_PRIORITY_DESC,"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Priority.MESSAGE_PRIORITY_CONSTRAINTS); // invalid priority"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // invalid phone followed by valid email"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC + PRIORITY_DESC_PAPER,"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + DEADLINE_DESC_PAPER + INVALID_DEADLINE_DESC,"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // multiple invalid values, but only the first invalid value is captured"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC + INVALID_PRIORITY_DESC"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + VALID_DEADLINE_PAPER + VALID_DESCRIPTION_PAPER, TaskName.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public void parse_allFieldsSpecified_success() {"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_SECOND_TASK;"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER + DESCRIPTION_DESC_PAPER"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" + DEADLINE_DESC_PAPER + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void parse_someFieldsSpecified_success() {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER).withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void parse_oneFieldSpecified_success() {"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" // name"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_THIRD_TASK;"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER;"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // phone"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER;"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER).build();"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // email"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DEADLINE_DESC_PAPER;"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" // address"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER;"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" // tags"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_ADDRESS_DESC_PAPER;"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL;"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValueFollowedByValidValue_success() {"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" // no other valid values specified"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + INVALID_DEADLINE_DESC + DEADLINE_DESC_PAPER;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();"},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" // other valid values specified"},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER + INVALID_DEADLINE_DESC"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();"},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":194}},{"path":"src/test/java/seedu/address/logic/parser/FIndTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class FIndTaskCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private FindCommandParser parser \u003d new FindCommandParser();"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void parse_emptyArg_throwsParseException() {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsFindCommand() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // no leading and trailing whitespaces"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand expectedFindTaskCommand \u003d"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(\"Lucy\", \"Date\")));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"Lucy Date\", expectedFindTaskCommand);"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // multiple whitespaces between keywords"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \" \\n Lucy \\n \\t Date \\t\", expectedFindTaskCommand);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParserTest {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" private FindCommandParser parser \u003d new FindCommandParser();"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void parse_emptyArg_throwsParseException() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsFindCommand() {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" // no leading and trailing whitespaces"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand expectedFindPersonCommand \u003d"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(\"Alice\", \"Bob\")));"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"Alice Bob\", expectedFindPersonCommand);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" // multiple whitespaces between keywords"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \\n Alice \\n \\t Bob \\t\", expectedFindPersonCommand);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":8,"-":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;"},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \","},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d"},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate("},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));"},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/FontSizeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.ACCEPTED_PARAMETERS;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_USAGE;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" private FontSizeCommandParser parser \u003d new FontSizeCommandParser();"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void parse_wrongArguments_failure() {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" // No arguments specified"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" // Wrong arguments specified"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"random input\","},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand expectedCommand;"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand actualCommand;"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" for (String arg: ACCEPTED_PARAMETERS) {"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new FontSizeCommand(arg);"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" // Check for command word"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" // Check for command alias"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectPersonCommandParserTest}."},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectPersonCommandParserTest"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/NavigateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@autho jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParserTest {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommandParser parser \u003d new NavigateCommandParser();"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsPresent_success() throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //From address to address"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fata \u003d new NavigateCommand(new Location(\"NUS\"), new Location(\"Sentosa\"),"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" null, null, false, false);"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fata);"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //From address to person"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatp \u003d new NavigateCommand(new Location(\"NUS\"), null,"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_PERSON, false, false);"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\", fatp);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //From address to task"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatt \u003d new NavigateCommand(new Location(\"NUS\"), null,"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_TASK, false, true);"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fatt);"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //From person to address"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fpta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, null, false, false);"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fpta);"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //From person to person"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptp \u003d new NavigateCommand(null, null,"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON, false, false);"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\""},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fptp);"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" //From person to task"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptt \u003d new NavigateCommand(null, null,"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_SECOND_TASK, false, true);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\", fptt);"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //From task to address"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand ftta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, null, true, false);"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\""},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", ftta);"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" //From task to person"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttp \u003d new NavigateCommand(null, null,"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_THIRD_PERSON, true, false);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fttp);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //From task to task"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttt \u003d new NavigateCommand(null, null,"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\""},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fttt);"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_repeatedFromAndTos_failure() {"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Froms"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\""},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Tos"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\","},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\","},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\""},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);"},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingFromOrTo_failure() {"},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" //No To"},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\","},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" //No From"},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"NUS\","},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));"},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_failure() {"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" //Non positive indices"},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\""},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"-1\", ParserUtil.MESSAGE_INVALID_INDEX);"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":139}},{"path":"src/test/java/seedu/address/logic/parser/ParserUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtilTest {"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static final boolean PRIVATE_FIELD \u003d true;"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String INVALID_NAME \u003d \"R@chel\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"+651234\";"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String INVALID_ADDRESS \u003d \" \";"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final String INVALID_EMAIL \u003d \"example.com\";"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_REMARK \u003d \" \";"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_AVATAR \u003d \" \";"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final String INVALID_TAG \u003d \"#friend\";"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_NAME \u003d \" \";"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_DEADLINE \u003d \"The distant, distant past\";"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_PRIORITY \u003d \"99\";"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_ADDRESS \u003d \" \";"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Rachel Walker\";"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"123456\";"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"123 Main Street #0505\";"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"rachel@example.com\";"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_REMARK \u003d \"Thinks that P\u003dNP\";"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_AVATAR \u003d \"valid_file.png\";"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_1 \u003d \"friend\";"},{"lineNumber":60,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_2 \u003d \"neighbour\";"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_NAME \u003d \"Launcher\";"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DESCRIPTION \u003d \"An arbitrary decision\";"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DEADLINE \u003d \"2 weeks later\";"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_PRIORITY \u003d \"3\";"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_ADDRESS \u003d \"NUS\";"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public final ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void parseIndex_invalidInput_throwsIllegalValueException() throws Exception {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(\"10 a\");"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void parseIndex_outOfRangeInput_throwsIllegalValueException() throws Exception {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_INVALID_INDEX);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(Long.toString(Integer.MAX_VALUE + 1));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void parseIndex_validInput_success() throws Exception {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" // No whitespaces"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\"1\"));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // Leading and trailing whitespaces"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\" 1 \"));"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void parseName_null_throwsNullPointerException() throws Exception {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" ParserUtil.parseName(null);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseName_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(INVALID_NAME));"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public void parseName_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseName(Optional.empty()).isPresent());"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void parseName_validValue_returnsName() throws Exception {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" Name expectedName \u003d new Name(VALID_NAME);"},{"lineNumber":112,"author":{"gitId":"-"},"content":" Optional\u003cName\u003e actualName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" Name expectedPrivateName \u003d new Name(VALID_NAME, PRIVATE_FIELD);"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" Optional\u003cName\u003e actualPrivateName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertEquals(expectedName, actualName.get());"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateName, actualPrivateName.get());"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void parsePhone_null_throwsNullPointerException() throws Exception {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(null);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void parsePhone_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(INVALID_PHONE));"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parsePhone_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parsePhone(Optional.empty()).isPresent());"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void parsePhone_validValue_returnsPhone() throws Exception {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" Phone expectedPhone \u003d new Phone(VALID_PHONE);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" Optional\u003cPhone\u003e actualPhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Phone expectedPrivatePhone \u003d new Phone(VALID_PHONE, PRIVATE_FIELD);"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPhone\u003e actualPrivatePhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(expectedPhone, actualPhone.get());"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivatePhone, actualPrivatePhone.get());"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void parseAddress_null_throwsNullPointerException() throws Exception {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":151,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(null);"},{"lineNumber":152,"author":{"gitId":"-"},"content":" }"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"-"},"content":" public void parseAddress_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":157,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(INVALID_ADDRESS));"},{"lineNumber":158,"author":{"gitId":"-"},"content":" }"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"-"},"content":" public void parseAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseAddress(Optional.empty()).isPresent());"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parseAddress_validValue_returnsAddress() throws Exception {"},{"lineNumber":167,"author":{"gitId":"-"},"content":" Address expectedAddress \u003d new Address(VALID_ADDRESS);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" Optional\u003cAddress\u003e actualAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" Address expectedPrivateAddress \u003d new Address(VALID_ADDRESS, PRIVATE_FIELD);"},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAddress\u003e actualPrivateAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertEquals(expectedAddress, actualAddress.get());"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateAddress, actualPrivateAddress.get());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void parseEmail_null_throwsNullPointerException() throws Exception {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":179,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(null);"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":183,"author":{"gitId":"-"},"content":" public void parseEmail_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":184,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":185,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(INVALID_EMAIL));"},{"lineNumber":186,"author":{"gitId":"-"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void parseEmail_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseEmail(Optional.empty()).isPresent());"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void parseEmail_validValue_returnsEmail() throws Exception {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" Email expectedEmail \u003d new Email(VALID_EMAIL);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" Optional\u003cEmail\u003e actualEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" Email expectedPrivateEmail \u003d new Email(VALID_EMAIL, PRIVATE_FIELD);"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" Optional\u003cEmail\u003e actualPrivateEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertEquals(expectedEmail, actualEmail.get());"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateEmail, actualPrivateEmail.get());"},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke"},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_null_throwsNullPointerException() throws Exception {"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(null);"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(Optional.of(INVALID_REMARK));"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseRemark(Optional.empty()).isPresent());"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_validValue_returnsRemark() throws Exception {"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" Remark expectedRemark \u003d new Remark(VALID_REMARK);"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" Remark expectedPrivateRemark \u003d new Remark(VALID_REMARK, PRIVATE_FIELD);"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualPrivateRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedRemark, actualRemark.get());"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateRemark, actualPrivateRemark.get());"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_null_throwsNullPointerException() throws Exception {"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(null);"},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(Optional.of(INVALID_AVATAR));"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseAvatar(Optional.empty()).isPresent());"},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_validValue_returnsAvatar() throws Exception {"},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" Avatar expectedAvatar \u003d new Avatar(VALID_AVATAR);"},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAvatar\u003e actualAvatar \u003d ParserUtil.parseAvatar(Optional.of(VALID_AVATAR));"},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAvatar, actualAvatar.get());"},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void parseTags_null_throwsNullPointerException() throws Exception {"},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(null);"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithInvalidTags_throwsIllegalValueException() throws Exception {"},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, INVALID_TAG));"},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" public void parseTags_emptyCollection_returnsEmptySet() throws Exception {"},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertTrue(ParserUtil.parseTags(Collections.emptyList()).isEmpty());"},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithValidTags_returnsTagSet() throws Exception {"},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e actualTagSet \u003d ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, VALID_TAG_2));"},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e expectedTagSet \u003d new HashSet\u003c\u003e(Arrays.asList(new Tag(VALID_TAG_1), new Tag(VALID_TAG_2)));"},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTagSet, actualTagSet);"},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_null_throwsNullPointerException() throws Exception {"},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(null);"},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(INVALID_TASK_NAME));"},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskName(Optional.empty()).isPresent());"},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_validValue_returnsTaskName() throws Exception {"},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" TaskName expectedTaskName \u003d new TaskName(VALID_TASK_NAME);"},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskName\u003e actualTaskName \u003d ParserUtil.parseTaskName(Optional.of(VALID_TASK_NAME));"},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskName, actualTaskName.get());"},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_null_throwsNullPointerException() throws Exception {"},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(null);"},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDescription(Optional.empty()).isPresent());"},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_validValue_returnsDescription() throws Exception {"},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Description expectedDescription \u003d new Description(VALID_DESCRIPTION);"},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDescription\u003e actualDescription \u003d ParserUtil.parseDescription(Optional.of(VALID_DESCRIPTION));"},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDescription, actualDescription.get());"},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_null_throwsNullPointerException() throws Exception {"},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(null);"},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(INVALID_DEADLINE));"},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDeadline(Optional.empty()).isPresent());"},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_validValue_returnsDeadline() throws Exception {"},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" Deadline expectedDeadline \u003d new Deadline(VALID_DEADLINE);"},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDeadline\u003e actualDeadline \u003d ParserUtil.parseDeadline(Optional.of(VALID_DEADLINE));"},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDeadline, actualDeadline.get());"},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_null_throwsNullPointerException() throws Exception {"},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(null);"},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(INVALID_PRIORITY));"},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parsePriority(Optional.empty()).isPresent());"},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_validValue_returnsPriority() throws Exception {"},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" Priority expectedPriority \u003d new Priority(VALID_PRIORITY);"},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPriority\u003e actualPriority \u003d ParserUtil.parsePriority(Optional.of(VALID_PRIORITY));"},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPriority, actualPriority.get());"},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_null_throwsNullPointerException() throws Exception {"},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(null);"},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_invalidValue_throwsIllegalValueException() throws Exception {"},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);"},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(INVALID_TASK_ADDRESS));"},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {"},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskAddress(Optional.empty()).isPresent());"},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_validValue_returnsTaskAddress() throws Exception {"},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" TaskAddress expectedTaskAddress \u003d new TaskAddress(VALID_TASK_ADDRESS);"},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskAddress\u003e actualTaskAddress \u003d ParserUtil.parseTaskAddress(Optional.of(VALID_TASK_ADDRESS));"},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskAddress, actualTaskAddress.get());"},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_null_throwsNullPointerException() throws Exception {"},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(null);"},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_invalidValue_throwsParseException() throws Exception {"},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(\"1 2 a b c\");"},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_validValue_returnsIndexes() throws Exception {"},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e expectedIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON,"},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" INDEX_THIRD_PERSON));"},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\"1 2 3\"));"},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\" 1 2 3 \"));"},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":260,"-":162}},{"path":"src/test/java/seedu/address/logic/parser/PrivacyLevelCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParserTest {"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommandParser parser \u003d new PrivacyLevelCommandParser();"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new PrivacyLevelCommand(INDEX_FIRST_PERSON.getOneBased()));"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"2\", new PrivacyLevelCommand(INDEX_SECOND_PERSON.getOneBased()));"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"3\", new PrivacyLevelCommand(INDEX_THIRD_PERSON.getOneBased()));"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"???\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/test/java/seedu/address/logic/parser/SelectPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Test scope: similar to {@code DeletePersonCommandParserTest}."},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandParserTest"},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParserTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new SelectPersonCommand(INDEX_FIRST_PERSON));"},{"lineNumber":23,"author":{"gitId":"-"},"content":" }"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":7,"-":23}},{"path":"src/test/java/seedu/address/logic/parser/SelectTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \" + PREFIX_TASK.getPrefix() + \" 1\","},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new SelectTaskCommand(INDEX_FIRST_TASK));"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \" + PREFIX_TASK.getPrefix() + \" -1\","},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/SetCompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskCompleteCommandParser parser \u003d new SetTaskCompleteCommandParser();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\","},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetCompleteCommand(INDEX_FIRST_TASK));"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\","},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SetIncompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskIncompleteCommandParser parser \u003d new SetTaskIncompleteCommandParser();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\","},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetIncompleteCommand(INDEX_FIRST_TASK));"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\","},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_ORDER_PARAMETERS;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" // no list specified"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_FIELD_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0),"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // list is person but field is for tasks"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(5)"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" // list is task but field is for person"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(1) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0)"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // Incorrect test"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\","},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" SortCommand expectedCommand;"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" SortCommand actualCommand;"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // For person sorts"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" String list \u003d ACCEPTED_LIST_PARAMETERS.get(0);"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" String field \u003d ACCEPTED_FIELD_PARAMETERS.get(0);"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" String order \u003d ACCEPTED_ORDER_PARAMETERS.get(0);"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // For task sorts"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" list \u003d ACCEPTED_LIST_PARAMETERS.get(1);"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" field \u003d ACCEPTED_FIELD_PARAMETERS.get(5);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" order \u003d ACCEPTED_ORDER_PARAMETERS.get(1);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":26,"jeffreygohkw":53}},{"path":"src/test/java/seedu/address/logic/parser/ThemeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParserTest {"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommandParser parser \u003d new ThemeCommandParser();"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_emptyArg_throwsParseException() {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand.MESSAGE_USAGE));"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsFindCommand() {"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" // no leading and trailing whitespaces"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand expectedFindPersonCommand \u003d"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" new ThemeCommand(\"light\");"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"light\", expectedFindPersonCommand);"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // multiple whitespaces between keywords"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \" light \", expectedFindPersonCommand);"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019"},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();"},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}"}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/ViewAssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommandParser parser \u003d new ViewAssignCommandParser();"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsDeleteCommand() {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new ViewAssignCommand(INDEX_FIRST_PERSON));"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\","},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":26}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice"},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));"},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");"},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));"},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {"},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();"},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));"},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);"},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);"},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints."},{"lineNumber":190,"author":{"gitId":"-"},"content":" */"},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();"},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();"},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":" }"},{"lineNumber":216,"author":{"gitId":"-"},"content":""},{"lineNumber":217,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":111,"Esilocke":18,"-":88}},{"path":"src/test/java/seedu/address/model/ModelManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class ModelManagerTest {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void getFilteredPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" modelManager.getFilteredPersonList().remove(0);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /*"},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of deleteTag is equals to the expected"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to delete."},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTagValidIndexesAndTagSuccess() throws Exception {"},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"someTag\", \"friends\").build();"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();"},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);"},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();"},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(\"someTag\");"},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());"},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(toDelete, indexes);"},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"friends\").build();"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();"},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);"},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();"},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);"},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" /*"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of addTag is equals to the expected"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to add."},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void addTagValidIndexesAndTagSuccess() throws Exception {"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\").build();"},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();"},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);"},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);"},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();"},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);"},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();"},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);"},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);"},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(\"newTag\");"},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());"},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(toAdd, indexes);"},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\", \"newTag\").build();"},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\", \"newTag\").build();"},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();"},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);"},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);"},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();"},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);"},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());"},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),"},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());"},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBookBuilder().withPerson(ALICE).withPerson(BENSON).build();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" AddressBook differentAddressBook \u003d new AddressBook();"},{"lineNumber":115,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":118,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager(addressBook, userPrefs);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" ModelManager modelManagerCopy \u003d new ModelManager(addressBook, userPrefs);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManagerCopy));"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManager));"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(null));"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(5));"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" // different addressBook -\u003e returns false"},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(differentAddressBook, userPrefs)));"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" // different filteredList -\u003e returns false"},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String[] keywords \u003d ALICE.getName().value.split(\"\\\\s+\");"},{"lineNumber":136,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(keywords)));"},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(addressBook, userPrefs)));"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" // resets modelManager to initial state for upcoming tests"},{"lineNumber":140,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" // different userPrefs -\u003e returns true"},{"lineNumber":143,"author":{"gitId":"-"},"content":" UserPrefs differentUserPrefs \u003d new UserPrefs();"},{"lineNumber":144,"author":{"gitId":"-"},"content":" differentUserPrefs.setAddressBookName(\"differentName\");"},{"lineNumber":145,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(new ModelManager(addressBook, differentUserPrefs)));"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":1,"wangyiming1019":82,"-":64}},{"path":"src/test/java/seedu/address/model/UniquePersonListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class UniquePersonListTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" UniquePersonList uniquePersonList \u003d new UniquePersonList();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" uniquePersonList.asObservableList().remove(0);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byName_bothOrders() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e nameComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, nameComparator);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"asc\");"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(nameComparator));"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"desc\");"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byPhone_bothOrders() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e phoneComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, phoneComparator);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"asc\");"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(phoneComparator));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"desc\");"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byEmail_bothOrders() {"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e emailComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, emailComparator);"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"asc\");"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(emailComparator));"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"desc\");"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byAddress_bothOrders() {"},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e addressComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);"},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, addressComparator);"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"asc\");"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(addressComparator));"},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);"},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"desc\");"},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();"},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":155,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":136,"-":19}},{"path":"src/test/java/seedu/address/model/UniqueTaskListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Rule;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.UniqueTaskList;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalTasks;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class UniqueTaskListTest {"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Rule"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" UniqueTaskList uniquePersonList \u003d new UniqueTaskList();"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" uniquePersonList.asObservableList().remove(0);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byDeadline_bothOrders() {"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"asc\");"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"desc\");"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byPriority_bothOrders() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {"},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return Integer.compare(o1.getPriority().value, o2.getPriority().value);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"asc\");"},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort"},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"desc\");"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.getIsPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":19}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol"},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name"},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.getIsPrivate());"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");"},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":38}},{"path":"src/test/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicateTest {"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");"},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicate \u003d"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate secondPredicate \u003d"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(secondPredicateKeywordList);"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicate));"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicateCopy \u003d"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(1));"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(null));"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(secondPredicate));"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameContainsKeywords_returnsTrue() throws IllegalValueException {"},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // One keyword"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.singletonList(\"Alice\"));"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(testee));"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" testee.getPhone().setPrivate(true);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // Multiple keywords"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Alice\", \"Bob\"));"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);"},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Carol\").build();"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // Only one matching keyword"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Bob\", \"Carol\"));"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Carol\").build()));"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" testee.getAddress().setPrivate(true);"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // Mixed-case keywords"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"aLIce\", \"bOB\"));"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));"},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // Zero keywords"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.emptyList());"},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" // Non-matching keyword"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Carol\"));"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" testee.getRemark().setPrivate(true);"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice\").withPhone(\"12345\")"},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" .withEmail(\"alice@email.com\").withAddress(\"Main Street\").build();"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" // Keywords match phone, email and address, but does not match name"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList("},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" \"12345\", \"alice@email.com\", \"Main\", \"Street\"));"},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);"},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));"},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":113}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name"},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.getIsPrivate());"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":24}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers"},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only"},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers"},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric"},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits"},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getIsPrivate());"},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":12,"-":23}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" // valid deadlines"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"the day after tomorrow\")); // slashes"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"4-11\"));"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":25}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"-1\")); // priority out of range"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskContainsKeywordPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicateTest {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public void equals() {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d new TaskContainsKeywordPredicate(secondPredicateKeywordList);"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate thirdPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicate));"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicateCopy \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(1));"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(null));"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different keywords -\u003e returns false"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(secondPredicate));"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(thirdPredicate));"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void test_nameContainsKeywords_returnsTrue() {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // One keyword"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pen\").build()));"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // Zero keywords"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.emptyList());"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy\").build()));"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // Non-matching keyword"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pen\"));"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void test_descriptionContainsKeywords_returnsTrue() {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // One keyword"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy 3 Pencil\").build()));"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pen\").build()));"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void priorityMatches() {"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // Priority level equal to required level"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // Priority level greater than required level"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"4\").build()));"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // Priority level less than required level"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" // Name matches, priority check not required, even though priority level does not match"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" false, false, false, 3);"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Priority matches, but name does not match"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));"},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" public void stateMatches() {"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" // States are equivalent"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // States are different"},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" // Name matches, state check not required, even though state does not match"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // State matches, but name does not match"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" public void combinationTests() {"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" // At most 1 invalid input per test case"},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" // Matches all"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencil now\")"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));"},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" // Name does not match, but description does"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Get something\").withDescription(\"Get 3 Pencil now\")"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" // Description does not match, but name does"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy 3 Pencil\").withDescription(\"Get something\")"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));"},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but priority does not"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")"},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"2\").withState(true).build()));"},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but state does not"},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),"},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);"},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(false).build()));"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":182}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));"},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class."},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the"},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class."},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),"},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called"},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null"},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder"},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored."},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method"},{"lineNumber":61,"author":{"gitId":"-"},"content":" */"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();"},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back"},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back"},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));"},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));"},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path"},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));"},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified"},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}."},{"lineNumber":112,"author":{"gitId":"-"},"content":" */"},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));"},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {"},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details"},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();"},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());"},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" descriptor.setAvatar(person.getAvatar());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":54,"author":{"gitId":"-"},"content":" */"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":66,"author":{"gitId":"-"},"content":" */"},{"lineNumber":67,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"remark is expected to be unique.\");"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Avatar} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withAvatar(String avatar) {"},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseAvatar(Optional.of(avatar)).ifPresent(descriptor::setAvatar);"},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"avatar is expected to be unique.\");"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" //@author"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * that we are building."},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {"},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));"},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building."},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":135,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {"},{"lineNumber":136,"author":{"gitId":"-"},"content":" return descriptor;"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":40,"Esilocke":1,"wangyiming1019":9,"-":88}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects."},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskAddress(task.getTaskAddress());"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code EditTaskDescriptor} that we are building."},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskAddress(String address) {"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(address)).ifPresent(descriptor::setTaskAddress);"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return descriptor;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":101}},{"path":"src/test/java/seedu/address/testutil/ModelStub.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * A default model stub that have all of the methods failing."},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class ModelStub implements Model {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public void setMainWindow(MainWindow mainWindow) {"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throws DuplicatePersonException {"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,"},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public void sortPersons(String field, String order) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public void sortTasks(String field, String order) {"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" @Override"},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {"},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {"},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)"},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)"},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {"},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {"},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" return 0;"},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {"},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" return null;"},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" //@@author"},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {"},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {"},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return null;"},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" @Override"},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {"},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" return null;"},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public boolean getLockState() {"},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" return false;"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public void lockAddressBookFromModel() {"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void unlockAddressBookFromModel() {"},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return null;"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override"},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {"},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called\");"},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"charlesgoh":17,"jeffreygohkw":37,"Esilocke":153,"wangyiming1019":24,"-":1}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class PersonBuilder {"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";"},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_AVATAR \u003d \"\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private Person person;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" public PersonBuilder() {"},{"lineNumber":34,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);"},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Avatar defaultAvatar \u003d new Avatar(DEFAULT_AVATAR);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" defaultRemark, defaultAvatar, defaultTags);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building."},{"lineNumber":59,"author":{"gitId":"-"},"content":" */"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building."},{"lineNumber":71,"author":{"gitId":"-"},"content":" */"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));"},{"lineNumber":75,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building."},{"lineNumber":83,"author":{"gitId":"-"},"content":" */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));"},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withAvatar(String filepath) {"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" try {"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.person.setAvatar(new Avatar(filepath));"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Avatar is invalid\");"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" return this;"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building."},{"lineNumber":119,"author":{"gitId":"-"},"content":" */"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));"},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building."},{"lineNumber":131,"author":{"gitId":"-"},"content":" */"},{"lineNumber":132,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));"},{"lineNumber":135,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" /**"},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building."},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" */"},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {"},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));"},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" return this;"},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" }"},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":149,"author":{"gitId":"-"},"content":" public Person build() {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" return this.person;"},{"lineNumber":151,"author":{"gitId":"-"},"content":" }"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":34,"wangyiming1019":12,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw"},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;"},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects."},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {"},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {"},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);"},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {"},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().getIsPrivate());"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().getIsPrivate());"},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().getIsPrivate());"},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().getIsPrivate());"},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(person.getRemark().getIsPrivate());"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {"},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);"},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {"},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");"},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {"},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);"},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {"},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);"},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");"},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code remarkIsPrivate} of the {@code PersonPrivacySettings} that we are building."},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */"},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setRemarkPrivate(String remark) {"},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {"},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);"},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {"},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);"},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" } else {"},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");"},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" return this;"},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {"},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" return pps;"},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":106}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * A utility class for Person."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonUtil {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand.COMMAND_WORD + \" \" + getPersonDetails(person);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details."},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" sb.append(PREFIX_NAME + person.getName().value + \" \");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");"},{"lineNumber":34,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_AVATAR + person.getAvatar().value + \" \");"},{"lineNumber":37,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach("},{"lineNumber":38,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")"},{"lineNumber":39,"author":{"gitId":"-"},"content":" );"},{"lineNumber":40,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":1,"Esilocke":2,"-":35}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects."},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_ADDRESS \u003d \"12 Kent Ridge Crescent, 119275\";"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Task task;"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" TaskAddress defaultAddress \u003d new TaskAddress(DEFAULT_ADDRESS);"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState, defaultAddress);"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}."},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building."},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building."},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building."},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));"},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building."},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));"},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building."},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code Task} that we are building."},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskAddress(String address) {"},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskAddress(new TaskAddress(address));"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Assignees} of the {@code Task} that we are building."},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withAssignees(String... args) {"},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" for (String s : args) {"},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromOneBased(Integer.parseInt(s)));"},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" this.task.setAssignees(new Assignees(indexes));"},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return this;"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public Task build() {"},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return this.task;"},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":135}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}."},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details."},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + Integer.toString(task.getPriority().value) + \" \");"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_ADDRESS + task.getTaskAddress().taskAddress + \" \");"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return sb.toString();"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":38}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests."},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {"},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests."},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);"},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);"},{"lineNumber":16,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_CHRIS;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_CHRIS;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_ALICE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_CHRIS;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_CHRIS;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_CHRIS;"},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;"},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":32,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests."},{"lineNumber":33,"author":{"gitId":"-"},"content":" */"},{"lineNumber":34,"author":{"gitId":"-"},"content":"public class TypicalPersons {"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")"},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")"},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")"},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")"},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")"},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")"},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")"},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")"},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")"},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")"},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")"},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")"},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_AMY)"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_BOB)"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019"},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)"},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS).withEmail(VALID_EMAIL_CHRIS)"},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" .withAddress(VALID_ADDRESS_CHRIS).withFavourite(VALID_FAVOURITE_ALICE)"},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_CHRIS)"},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_CHRISTAG).build();"},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS_WITH_NEW_TAG \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)"},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS)"},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_CHRIS).withAddress(VALID_ADDRESS_CHRIS)"},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_CHRIS)"},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" .withTags(\"friends\").build();"},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":87,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":88,"author":{"gitId":"-"},"content":" */"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":91,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" ab.addPerson(person);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assert false : \"not possible\";"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" return ab;"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {"},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":4,"Esilocke":18,"wangyiming1019":32,"-":64}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke"},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;"},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;"},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;"},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;"},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;"},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;"},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;"},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;"},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;"},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;"},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;"},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests."},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")"},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").withAssignees(\"4\")"},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"21 Heng Mui Keng Terrace, #02-01-01 I-Cube Building\").build();"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")"},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\").withState(true)"},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").withTaskAddress(\"Tampines Mall\").build();"},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).withTaskAddress(\"27 Prince George\u0027s Park\")"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .build();"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").withTaskAddress(\"Central Park\").build();"},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")"},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").withTaskAddress(\"16 Gemmill Ln\").build();"},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")"},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).withAssignees(\"1\", \"2\", \"3\")"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"NUS School of Computing, COM1, 13 Computing Drive, 117417\").build();"},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")"},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")"},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\")"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"Changi Airport\").build();"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)"},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)"},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL)"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)"},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)"},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String KEYWORD_MATCHING_LUCY \u003d \"Lucy\"; // A keyword that matches LUCY"},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" /**"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */"},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" try {"},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);"},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {"},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";"},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return ab;"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":""},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}"}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;"},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_PREFIX;"},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_SUFFIX;"},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;"},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;"},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;"},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;"},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelNavigateEvent panelNavigateEventStub;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() throws IllegalValueException {"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));"},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);"},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" panelNavigateEventStub \u003d new BrowserPanelNavigateEvent(new Location(\"NUS\"),"},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" new Location(BENSON.getAddress().toString()));"},{"lineNumber":44,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());"},{"lineNumber":45,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw"},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {"},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // default web page"},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);"},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person"},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);"},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX"},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX"},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");"},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person"},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelNavigateEventStub);"},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDirUrl \u003d new URL(GOOGLE_MAPS_DIRECTIONS_PREFIX"},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026origin\u003d\""},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getFromLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\""},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getToLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")"},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);"},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":""},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);"},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDirUrl, browserPanelHandle.getLoadedUrl());"},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }"},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}"}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":47,"-":31}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultiplier());"},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags"},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags"},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card"},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" });"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false"},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();"},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}."},{"lineNumber":96,"author":{"gitId":"-"},"content":" */"},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock"},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock"},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state"},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated"},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,"},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}."},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());"},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // no tags"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public void equals() {"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);"},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false"},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));"},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches"},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}."},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {"},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());"},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly"},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly"},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);"},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"}"}],"authorContributionMap":{"charlesgoh":89,"Esilocke":1}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;"},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;"},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;"},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;"},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh"},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {"},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d"},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());"},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final JumpToListRequestTaskEvent JUMP_TO_SECOND_EVENT \u003d new"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent(INDEX_SECOND_PERSON);"},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" @Before"},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);"},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public void display() {"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {"},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void handleJumpToListRequestTaskEvent() {"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"}"},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":""}],"authorContributionMap":{"charlesgoh":57,"Esilocke":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {"},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {"},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);"},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());"},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);"},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing."},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);"},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":22,"-":80}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests."},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());"},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards."},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {"},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());"},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());"},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());"},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPerson.getName().value, actualCard.getName());"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());"},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());"},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),"},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}."},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */"},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {"},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());"},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());"},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());"},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTask.getPriority().toString(), actualCard.getPriority());"},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":1,"Esilocke":1,"-":71}},{"path":"src/test/java/systemtests/AddPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * -\u003e added"},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + AddPersonCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \""},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */"},{"lineNumber":90,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE"},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in"},{"lineNumber":92,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";"},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void addSecondTest() throws Exception {"},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;"},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY"},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void addThirdTest() throws Exception {"},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;"},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */"},{"lineNumber":134,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;"},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */"},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()"},{"lineNumber":150,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);"},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public void addFourthTest() throws Exception {"},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;"},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */"},{"lineNumber":161,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB"},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */"},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" 1\");"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */"},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */"},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */"},{"lineNumber":184,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);"},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY"},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY"},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":196,"author":{"gitId":"-"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC"},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":206,"author":{"gitId":"-"},"content":" }"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Executes the {@code AddPersonCommand} that adds {@code toAdd} to the model and verifies that the command box"},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * displays an empty string, the result display box displays the success message of executing"},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * {@code AddPersonCommand} with the details of {@code toAdd}, and the model related components equal to the"},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" * current model added with {@code toAdd}."},{"lineNumber":213,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":214,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,"},{"lineNumber":216,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged."},{"lineNumber":217,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":218,"author":{"gitId":"-"},"content":" */"},{"lineNumber":219,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":""},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}"},{"lineNumber":225,"author":{"gitId":"-"},"content":" * instead."},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)"},{"lineNumber":227,"author":{"gitId":"-"},"content":" */"},{"lineNumber":228,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {"},{"lineNumber":229,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(AddPersonCommand.MESSAGE_SUCCESS, toAdd);"},{"lineNumber":236,"author":{"gitId":"-"},"content":""},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":238,"author":{"gitId":"-"},"content":" }"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to"},{"lineNumber":243,"author":{"gitId":"-"},"content":" * {@code expectedModel}."},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)"},{"lineNumber":245,"author":{"gitId":"-"},"content":" */"},{"lineNumber":246,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":247,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":255,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":256,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":257,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":258,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":260,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":261,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":262,"author":{"gitId":"-"},"content":" */"},{"lineNumber":263,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":265,"author":{"gitId":"-"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":268,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":270,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":271,"author":{"gitId":"-"},"content":" }"},{"lineNumber":272,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":50,"Esilocke":30,"-":192}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * for test verification."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @ClassRule"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d"},{"lineNumber":52,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initializeStage();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" public BrowserPanelHandle getBrowserPanel() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated."},{"lineNumber":106,"author":{"gitId":"-"},"content":" */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" rememberStates();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar"},{"lineNumber":110,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command."},{"lineNumber":111,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());"},{"lineNumber":116,"author":{"gitId":"-"},"content":" }"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":119,"author":{"gitId":"-"},"content":" * Displays all persons in the address book."},{"lineNumber":120,"author":{"gitId":"-"},"content":" */"},{"lineNumber":121,"author":{"gitId":"-"},"content":" protected void showAllPersons() {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d getModel().getFilteredPersonList().size();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive)."},{"lineNumber":128,"author":{"gitId":"-"},"content":" */"},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + keyword);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size();"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list."},{"lineNumber":136,"author":{"gitId":"-"},"content":" */"},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {"},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" \" + index.getOneBased());"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getPersonListPanel().getSelectedCardIndex() \u003d\u003d index.getZeroBased();"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays"},{"lineNumber":144,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly."},{"lineNumber":146,"author":{"gitId":"-"},"content":" */"},{"lineNumber":147,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,"},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());"},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":157,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * their current state."},{"lineNumber":159,"author":{"gitId":"-"},"content":" */"},{"lineNumber":160,"author":{"gitId":"-"},"content":" private void rememberStates() {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" getBrowserPanel().rememberUrl();"},{"lineNumber":163,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();"},{"lineNumber":164,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();"},{"lineNumber":165,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();"},{"lineNumber":166,"author":{"gitId":"-"},"content":" }"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details"},{"lineNumber":170,"author":{"gitId":"-"},"content":" * of the previously selected person."},{"lineNumber":171,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()"},{"lineNumber":172,"author":{"gitId":"-"},"content":" */"},{"lineNumber":173,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());"},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at"},{"lineNumber":180,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected."},{"lineNumber":181,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":183,"author":{"gitId":"-"},"content":" */"},{"lineNumber":184,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {"},{"lineNumber":185,"author":{"gitId":"-"},"content":" String selectedCardName \u003d getPersonListPanel().getHandleToSelectedCard().getName();"},{"lineNumber":186,"author":{"gitId":"-"},"content":" URL expectedUrl;"},{"lineNumber":187,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" expectedUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX + selectedCardName.replaceAll(\" \", \"+\")"},{"lineNumber":189,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);"},{"lineNumber":190,"author":{"gitId":"-"},"content":" } catch (MalformedURLException mue) {"},{"lineNumber":191,"author":{"gitId":"-"},"content":" throw new AssertionError(\"URL expected to be valid.\");"},{"lineNumber":192,"author":{"gitId":"-"},"content":" }"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" //TODO Might need to remove this as the person panel no longer involves google search."},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //assertEquals(expectedUrl, getBrowserPanel().getLoadedUrl());"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":200,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged."},{"lineNumber":201,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":203,"author":{"gitId":"-"},"content":" */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style."},{"lineNumber":211,"author":{"gitId":"-"},"content":" */"},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style."},{"lineNumber":218,"author":{"gitId":"-"},"content":" */"},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":""},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same."},{"lineNumber":225,"author":{"gitId":"-"},"content":" */"},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {"},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same."},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);"},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());"},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }"},{"lineNumber":243,"author":{"gitId":"-"},"content":""},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct."},{"lineNumber":246,"author":{"gitId":"-"},"content":" */"},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());"},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());"},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());"},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertEquals(MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE), getBrowserPanel().getLoadedUrl());"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());"},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());"},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {"},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model."},{"lineNumber":262,"author":{"gitId":"-"},"content":" */"},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();"},{"lineNumber":265,"author":{"gitId":"-"},"content":" }"},{"lineNumber":266,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":6,"-":260}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void clear() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared"},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");"},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void clearTestTwo() throws Exception {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":44,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book"},{"lineNumber":50,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model."},{"lineNumber":65,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes."},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {"},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS);"},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}."},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)"},{"lineNumber":79,"author":{"gitId":"-"},"content":" */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":88,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":89,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":90,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":91,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":3,"Esilocke":5,"-":97}},{"path":"src/test/java/systemtests/DeletePersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeletePersonCommand.MESSAGE_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getLastIndex;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getMidIndex;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getPerson;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_DELETE_COMMAND_FORMAT \u003d"},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void delete() {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" /* ----------------- Performing delete operation while an unfiltered list is being shown -------------------- */"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: delete the first person in the list, command with leading spaces and trailing spaces -\u003e deleted */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + DeletePersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";"},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, INDEX_FIRST_PERSON);"},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: delete the last person in the list -\u003e deleted */"},{"lineNumber":41,"author":{"gitId":"-"},"content":" Model modelBeforeDeletingLast \u003d getModel();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d getLastIndex(modelBeforeDeletingLast);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(lastPersonIndex);"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" /* Case: undo deleting the last person in the list -\u003e last person restored */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: redo deleting the last person in the list -\u003e last person deleted again */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" removePerson(modelBeforeDeletingLast, lastPersonIndex);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: delete the middle person in the list -\u003e deleted */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" Index middlePersonIndex \u003d getMidIndex(getModel());"},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(middlePersonIndex);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ------------------ Performing delete operation while a filtered list is being shown ---------------------- */"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book and person list -\u003e deleted */"},{"lineNumber":63,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":66,"author":{"gitId":"-"},"content":" assertCommandSuccess(index);"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book but out of bounds of person list"},{"lineNumber":69,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":70,"author":{"gitId":"-"},"content":" */"},{"lineNumber":71,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + invalidIndex;"},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /* --------------------- Performing delete operation while a person card is selected ------------------------ */"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: delete the selected person -\u003e person list panel selects the person before the deleted person */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" Index selectedIndex \u003d getLastIndex(expectedModel);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" Index expectedIndex \u003d Index.fromZeroBased(selectedIndex.getZeroBased() - 1);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" selectPerson(selectedIndex);"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + selectedIndex.getOneBased();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" deletedPerson \u003d removePerson(expectedModel, selectedIndex);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, expectedIndex);"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid delete operation ------------------------------------ */"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" 0\";"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" -1\";"},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":100,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased("},{"lineNumber":101,"author":{"gitId":"-"},"content":" getModel().getAddressBook().getPersonList().size() + 1);"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + outOfBoundsIndex.getOneBased();"},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */"},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */"},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" 1 abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertCommandFailure(\"DelETE 1\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Removes the {@code ReadOnlyPerson} at the specified {@code index} in {@code model}\u0027s address book."},{"lineNumber":117,"author":{"gitId":"-"},"content":" * @return the removed person"},{"lineNumber":118,"author":{"gitId":"-"},"content":" */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" private ReadOnlyPerson removePerson(Model model, Index index) {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" ReadOnlyPerson targetPerson \u003d getPerson(model, index);"},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" model.deletePerson(targetPerson);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new AssertionError(\"targetPerson is retrieved from model.\");"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"-"},"content":" return targetPerson;"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" * Deletes the person at {@code toDelete} by creating a default {@code DeletePersonCommand} using"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" * {@code toDelete} and performs the same verification as {@code assertCommandSuccess(String, Model, String)}."},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)"},{"lineNumber":133,"author":{"gitId":"-"},"content":" */"},{"lineNumber":134,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Index toDelete) {"},{"lineNumber":135,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":136,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, toDelete);"},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertCommandSuccess("},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand.COMMAND_WORD + \" \" + toDelete.getOneBased(),"},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" expectedModel, expectedResultMessage);"},{"lineNumber":142,"author":{"gitId":"-"},"content":" }"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":145,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":149,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card remains unchanged.\u003cbr\u003e"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":153,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}."},{"lineNumber":154,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":155,"author":{"gitId":"-"},"content":" */"},{"lineNumber":156,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":158,"author":{"gitId":"-"},"content":" }"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String)} except that the browser url"},{"lineNumber":162,"author":{"gitId":"-"},"content":" * and selected card are expected to update accordingly depending on the card at {@code expectedSelectedCardIndex}."},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":165,"author":{"gitId":"-"},"content":" */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":168,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":186,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":187,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":188,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":189,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":190,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":191,"author":{"gitId":"-"},"content":" */"},{"lineNumber":192,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":193,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":199,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":200,"author":{"gitId":"-"},"content":" }"},{"lineNumber":201,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":21,"-":180}},{"path":"src/test/java/systemtests/EditPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;"},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field"},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited"},{"lineNumber":64,"author":{"gitId":"-"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \""},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB"},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson("},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */"},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();"},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public void editThree() throws Exception {"},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */"},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":128,"author":{"gitId":"-"},"content":" */"},{"lineNumber":129,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":132,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" public void editFourth() throws Exception {"},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" int invalidIndex;"},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * browser url changes"},{"lineNumber":148,"author":{"gitId":"-"},"content":" */"},{"lineNumber":149,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":150,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":151,"author":{"gitId":"-"},"content":" selectPerson(index);"},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY"},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;"},{"lineNumber":154,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the"},{"lineNumber":155,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name"},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" //TODO rewrite GUI check for this as select no longer displays google searches"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */"},{"lineNumber":160,"author":{"gitId":"-"},"content":""},{"lineNumber":161,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,"},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,"},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":170,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":172,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public void editFive() throws Exception {"},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */"},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + NAME_DESC_BOB,"},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */"},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" public void editSix() throws Exception {"},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();"},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Index index;"},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;"},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()"},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */"},{"lineNumber":217,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));"},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));"},{"lineNumber":219,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));"},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */"},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB"},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":232,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged."},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list"},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)"},{"lineNumber":236,"author":{"gitId":"-"},"content":" */"},{"lineNumber":237,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);"},{"lineNumber":239,"author":{"gitId":"-"},"content":" }"},{"lineNumber":240,"author":{"gitId":"-"},"content":""},{"lineNumber":241,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":242,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e"},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditPersonCommand}.\u003cbr\u003e"},{"lineNumber":244,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e"},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list."},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":248,"author":{"gitId":"-"},"content":" */"},{"lineNumber":249,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,"},{"lineNumber":250,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":251,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":252,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":253,"author":{"gitId":"-"},"content":" expectedModel.updatePerson("},{"lineNumber":254,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);"},{"lineNumber":255,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {"},{"lineNumber":257,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException("},{"lineNumber":258,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }"},{"lineNumber":260,"author":{"gitId":"-"},"content":""},{"lineNumber":261,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,"},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson), expectedSelectedCardIndex);"},{"lineNumber":263,"author":{"gitId":"-"},"content":" }"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged."},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":269,"author":{"gitId":"-"},"content":" */"},{"lineNumber":270,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":271,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":272,"author":{"gitId":"-"},"content":" }"},{"lineNumber":273,"author":{"gitId":"-"},"content":""},{"lineNumber":274,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":275,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":276,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":277,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":278,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":279,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at"},{"lineNumber":280,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e"},{"lineNumber":281,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":282,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":283,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":284,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":285,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":286,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":287,"author":{"gitId":"-"},"content":" */"},{"lineNumber":288,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":289,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":290,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":291,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":292,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":293,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":296,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":297,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":298,"author":{"gitId":"-"},"content":" }"},{"lineNumber":299,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":300,"author":{"gitId":"-"},"content":" }"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":303,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":304,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":305,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":306,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":307,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":308,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":309,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":310,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":311,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":312,"author":{"gitId":"-"},"content":" */"},{"lineNumber":313,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":314,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":315,"author":{"gitId":"-"},"content":""},{"lineNumber":316,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":317,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":318,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":319,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":320,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":321,"author":{"gitId":"-"},"content":" }"},{"lineNumber":322,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":49,"Esilocke":40,"-":233}},{"path":"src/test/java/systemtests/FindPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;"},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void find() {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, command with leading spaces and trailing spaces"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found"},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER + \" \";"},{"lineNumber":32,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL); // first names of Benson and Daniel are \"Meier\""},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" /* Case: repeat previous find command where person list is displaying the persons we are finding"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found"},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /* Case: find person where person list is not displaying the person we are finding -\u003e 1 person found */"},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Carl\";"},{"lineNumber":46,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, CARL);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords -\u003e 2 persons found */"},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Benson Daniel\";"},{"lineNumber":52,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL);"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords in reversed order -\u003e 2 persons found */"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson\";"},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords with 1 repeat -\u003e 2 persons found */"},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson Daniel\";"},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 matching keywords and 1 non-matching keyword"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found"},{"lineNumber":68,"author":{"gitId":"-"},"content":" */"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson NonMatchingKeyWord\";"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo previous find command -\u003e rejected */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo previous find command -\u003e rejected */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: find same persons in address book after deleting 1 of them -\u003e 1 person found */"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" executeCommand(DeletePersonCommand.COMMAND_WORD + \" 1\");"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert !getModel().getAddressBook().getPersonList().contains(BENSON);"},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is same as name but of different case -\u003e 1 person found */"},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" MeIeR\";"},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is substring of name -\u003e 0 persons found */"},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mei\";"},{"lineNumber":99,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: find person in address book, name is substring of keyword -\u003e 0 persons found */"},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Meiers\";"},{"lineNumber":105,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: find person not in address book -\u003e 0 persons found */"},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mark\";"},{"lineNumber":111,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /* Case: find phone number of person in address book -\u003e 0 persons found */"},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getPhone().value;"},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: find address of person in address book -\u003e 0 persons found */"},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getAddress().value;"},{"lineNumber":121,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" /* Case: find email of person in address book -\u003e 0 persons found */"},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getEmail().value;"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /* Case: find tags of person in address book -\u003e 0 persons found */"},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cTag\u003e tags \u003d new ArrayList\u003c\u003e(DANIEL.getTags());"},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + tags.get(0).tagName;"},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: find while a person is selected -\u003e selected card deselected */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":137,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" assert !getPersonListPanel().getHandleToSelectedCard().getName().equals(DANIEL.getName().value);"},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel\";"},{"lineNumber":140,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);"},{"lineNumber":141,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: find person in empty address book -\u003e 0 persons found */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;"},{"lineNumber":148,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();"},{"lineNumber":149,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);"},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":154,"author":{"gitId":"-"},"content":" command \u003d \"FiNd Meier\";"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":160,"author":{"gitId":"-"},"content":" * box displays {@code Messages#MESSAGE_PERSONS_LISTED_OVERVIEW} with the number of people in the filtered list,"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the model related components equal to {@code expectedModel}."},{"lineNumber":162,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":163,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Also verifies that the status bar remains unchanged, and the command box has the default style class, and the"},{"lineNumber":165,"author":{"gitId":"-"},"content":" * selected card updated accordingly, depending on {@code cardStatus}."},{"lineNumber":166,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":167,"author":{"gitId":"-"},"content":" */"},{"lineNumber":168,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel) {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format("},{"lineNumber":170,"author":{"gitId":"-"},"content":" MESSAGE_PERSONS_LISTED_OVERVIEW, expectedModel.getFilteredPersonList().size());"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":180,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":181,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":182,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":185,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":186,"author":{"gitId":"-"},"content":" */"},{"lineNumber":187,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":189,"author":{"gitId":"-"},"content":""},{"lineNumber":190,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":193,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":195,"author":{"gitId":"-"},"content":" }"},{"lineNumber":196,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"jeffreygohkw":1,"Esilocke":22,"-":173}},{"path":"src/test/java/systemtests/SelectPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.SelectPersonCommand.MESSAGE_SUCCESS;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void select() {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" /* Case: select the first card in the person list, command with leading spaces and trailing spaces"},{"lineNumber":24,"author":{"gitId":"-"},"content":" * -\u003e selected"},{"lineNumber":25,"author":{"gitId":"-"},"content":" */"},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, INDEX_FIRST_PERSON);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /* Case: select the last card in the person list -\u003e selected */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + personCount.getOneBased();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, personCount);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: undo previous selection -\u003e rejected */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /* Case: redo selecting last card in the list -\u003e rejected */"},{"lineNumber":40,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);"},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public void selectSecondTest() throws Exception {"},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: select the middle card in the person list -\u003e selected */"},{"lineNumber":51,"author":{"gitId":"-"},"content":" Index middleIndex \u003d Index.fromOneBased(personCount.getOneBased() / 2);"},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + middleIndex.getOneBased();"},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":56,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,"},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* Case: select the current selected card -\u003e selected */"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book but out of bounds of person list"},{"lineNumber":64,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":65,"author":{"gitId":"-"},"content":" */"},{"lineNumber":66,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,"},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" public void selectThirdTest() throws Exception {"},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book and person list -\u003e selected */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Index validIndex \u003d Index.fromOneBased(1);"},{"lineNumber":79,"author":{"gitId":"-"},"content":" assert validIndex.getZeroBased() \u003c getModel().getFilteredPersonList().size();"},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + validIndex.getOneBased();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, validIndex);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + 0,"},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + -1,"},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */"},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" abc\","},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" }"},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":""},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void selectFourthTest() throws Exception {"},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" String command;"},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */"},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" 1 abc\","},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */"},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandFailure(\"SeLeCt 1\", MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: select from empty address book -\u003e rejected */"},{"lineNumber":109,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;"},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":112,"author":{"gitId":"-"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" }"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * box displays the success message of executing select command with the {@code expectedSelectedCardIndex}"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * of the selected person, and the model related components equal to the current model."},{"lineNumber":119,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":120,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar remain unchanged. The resulting"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * browser url and selected card will be verified if the current selected card and the card at"},{"lineNumber":123,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex} are different."},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":126,"author":{"gitId":"-"},"content":" */"},{"lineNumber":127,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index expectedSelectedCardIndex) {"},{"lineNumber":128,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format("},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" MESSAGE_SUCCESS, expectedSelectedCardIndex.getOneBased());"},{"lineNumber":131,"author":{"gitId":"-"},"content":" int preExecutionSelectedCardIndex \u003d getPersonListPanel().getSelectedCardIndex();"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" if (preExecutionSelectedCardIndex \u003d\u003d expectedSelectedCardIndex.getZeroBased()) {"},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":138,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":143,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":144,"author":{"gitId":"-"},"content":" }"},{"lineNumber":145,"author":{"gitId":"-"},"content":""},{"lineNumber":146,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":147,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model."},{"lineNumber":149,"author":{"gitId":"-"},"content":" * These verifications are done by"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the"},{"lineNumber":152,"author":{"gitId":"-"},"content":" * error style."},{"lineNumber":153,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":154,"author":{"gitId":"-"},"content":" */"},{"lineNumber":155,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":160,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"charlesgoh":18,"Esilocke":21,"-":125}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require."},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,"},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it."},{"lineNumber":46,"author":{"gitId":"-"},"content":" */"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" });"},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();"},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages."},{"lineNumber":63,"author":{"gitId":"-"},"content":" */"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {"},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"Esilocke":1,"-":70}}] +[{"path":"README.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"https://travis-ci.org/CS2103AUG2017-W09-B2/main[image:https://travis-ci.org/CS2103AUG2017-W09-B2/main.svg?branch\u003dmaster[Build Status]]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"https://ci.appveyor.com/project/jeffreygohkw/addressbook-level4-x6ah4[image:https://ci.appveyor.com/api/projects/status/duqy9ai449wl80n2?svg\u003dtrue[Build Status]]","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"https://coveralls.io/github/CS2103AUG2017-W09-B2/main[image:https://coveralls.io/repos/github/CS2103AUG2017-W09-B2/main/badge.svg?branch\u003dmaster[Coverage Status]]","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"https://www.codacy.com/app/charlesgoh/main?utm_source\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dCS2103AUG2017-W09-B2/main\u0026amp;utm_campaign\u003dBadge_Grade[image:https://api.codacy.com/project/badge/Grade/a5878f0b77e34e7eac031ed882cac3cb[Codacy Status]]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"image::docs/images/Ui.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"image::images/Ui.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"endif::[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface).","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"* It is a Java application primarily targeted for students doing group projects.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"* It is *written in OOP fashion*. The code base is *reasonably well-written* and is *significantly big* (around 6 KLoC)","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"* Contains support for _Build Automation_ using Gradle and for _Continuous Integration_ using Travis CI, AppVeyor and Codacy, with coverage checks using Coveralls.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Site Map","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Acknowledgements","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"_Marco Jakob_.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"* This application was built using the source code found in https://github.com/nus-cs2103-AY1718S1/addressbook-level4/[AddressBook-level4] by _SE-EDU_.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":36}},{"path":"docs/AboutUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d About Us","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":relfileprefix: team/","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ - Developed by the https://github.com/CS2103T-W09B2/main/blob/master/docs/AboutUs.adoc[CS2103T-W09B2] team.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"Initial source code this project was based on was from AddressBook-Level4 project created by SE-EDU initiative at https://github.com/se-edu/.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project Team","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Goh Chang Kang, Charles","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"{empty}[https://github.com/charlesgoh[github]]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"Role: Project Integration, Git Expert, Password Security Commands","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Storage Component","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Jeffrey Goh Keng Wee","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/jeffreygohkw[github]]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"Role: Testing","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: UI Component","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Lin Ziwen Kelvin","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/esilocke[github]]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"Role: Code Quality","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Model Component","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Wang Yiming","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"{empty}[http://github.com/wangyiming1019[github]]","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"Role: Developer","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"Responsibilities: Logic Component","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u0027\u0027\u0027","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18,"Esilocke":4,"-":26}},{"path":"docs/ContactUs.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Contact Us","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"* *Bug reports, Suggestions* : Post in our https://github.com/CS2103AUG2017-W09-B2/main/issues[issue tracker] if you noticed bugs or have suggestions on how to improve.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"* *Contributing* : We welcome pull requests. Follow the process described https://github.com/oss-generic/process[here]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"* *Email us* : You can also reach us at `e0014961 [at] u.nus.edu`","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":4}},{"path":"docs/DeveloperGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d Address++ - Developer Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":":repoURL: https://github.com/CS2103T-W09B2/addressbook-level4","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"By: `Team W09-B2`      Since: `August 2017`      Licence: `MIT`","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":". *JDK `1.8.0_60`* or later","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":". *IntelliJ* IDE","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up Address++ in your computer","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":". Click `Import Project`","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":". Click `Open as Project`","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message. +","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"This will generate all resources required by the application and tests.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". link:#testing[Run the tests] to ensure they all pass.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.md[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `CS2103AUG2017-W09-B2/main` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `CS2103AUG2017-W09-B2/main`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Getting started with coding","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"When you are ready to start coding,","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading the link:#architecture[Architecture] section.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"2. Take a look at the section link:#suggested-programming-tasks-to-get-started[Suggested Programming Tasks to Get Started].","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"\u003d\u003d Design","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Architecture","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"_Figure 2.1.1 : Architecture Diagram_","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"link:#common-classes[*`Commons`*] represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"* link:#ui-component[*`UI`*] : The UI of the App.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"* link:#logic-component[*`Logic`*] : The command executor.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"* link:#model-component[*`Model`*] : Holds the data of the App in-memory.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"* link:#storage-component[*`Storage`*] : Reads data from, and writes data to, the hard disk.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"Each of the four components","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"_Figure 2.1.2 : Class Diagram of the Logic Component_","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"_Figure 2.1.3a : Component interactions for `delete 1` command (part 1)_","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"_Figure 2.1.3b : Component interactions for `delete 1` command (part 2)_","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"_Figure 2.2.1 : Structure of the UI Component_","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `BrowserPanel` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"The `UI` component,","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Structure of the Logic Component_","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"_Figure 2.3.2 : Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in Figure 2.3.1_","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"*API* :","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"_Figure 2.3.1 : Interactions Inside the Logic Component for the `delete 1` Command_","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"_Figure 2.4.1 : Structure of the Model Component_","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"The `Model`,","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"* stores the Address Book data.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"* exposes an unmodifiable `ObservableList\u003cReadOnlyTask\u003e` that can be \u0027observed\u0027.","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"_Figure 2.5.1 : Structure of the Storage Component_","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `Storage` component,","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"Classes used by multiple components are in the `seedu.addressbook.commons` package.","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Increase/Decrease/Reset Font Size","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"On some screens, the text appear to be too small. The aim of the increase/decrease/reset font size feature is to allow","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":"users to customize the application\u0027s font size quickly on the go.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.1 : Using the UI to change font size_","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"There are two methods of calling changes in font size:","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"1. `onAction` handlers are used to handle UI font size buttons. These handlers will post","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":"new events via `ComponentManager`.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":"2. CLI commands also post new events to handle font size changes, when the relevant command is entered (e.g. `fontsize increase`).","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeChangeSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"_Figure 3.1.2 : Sequence diagram for fontsize changing_","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"From the sequence diagram above, we can observe that the font size changes are handled by subscriber functions in PersonListPanel","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":"and TaskListPanel.","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":"The initial implementation required access to the model from the UI. This implementation was replaced with one that","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":"standardised the handling of font size change requests through events.","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Use either UI or CLI based implementations +","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implementing both UI and CLI functionality +","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More options for the user. Not much increase in complexity when implementing the CLI version +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":"**Cons:** This implementation required passing information between classes, which may cause unnecessary coupling. +","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implementing only UI functionality +","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Less tedious to implement and very intuitive for the user +","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Users who prefer typing commands will not have the option of editing their font sizes using the CLI","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"charlesgoh"},"content":"//tag::avatar[]","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatar on ViewPersonPanel","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"charlesgoh"},"content":"The following function allows the setting of URL for the `ImageView` attribute within the `ViewPersonPanel` class:","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"charlesgoh"},"content":"[source,java]","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"charlesgoh"},"content":"private void initializeAvatar() {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"charlesgoh"},"content":" String avatarPath \u003d person.getAvatar().value;","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"charlesgoh"},"content":" if (!avatarPath.equals(\"\")) {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Initializing avatar to image at saved URL\");","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"charlesgoh"},"content":" Image newImage \u003d new Image(avatarPath);","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"charlesgoh"},"content":" avatarImage.setImage(newImage);","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"charlesgoh"},"content":"The `initializeAvatar` method piggybacks on the `handlePersonPanelSelectionChangedEvent` event handler. Whenever there is","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"charlesgoh"},"content":"a change in the person selection panel, this function will call the `initializeAvatar` method, which will update","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"charlesgoh"},"content":"the `ImageView` attribute.","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"charlesgoh"},"content":"[source,java]","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":"@Subscribe","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":"private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" this.person \u003d event.getNewSelection().person;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" initializeWithPerson(person);","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":"----","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":"As of v1.5, the avatar field supports only URLs sourced online. References to local files may work but require the","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":"prefix \"file:\"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"//tag::undoredo[]","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undo/Redo mechanism","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.1 : Command inheritance_","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" // ... list logic ...","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" // ... undo logic ...","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" executeUndoableCommand();","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" // ... delete logic ...","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.2 : Initial status of undo/redo stack_","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.3 : After executing `delete 5`_","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.4 : Executing undo_","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.5 : Undo/redo sequence diagram_","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.6 : Executing `clear`_","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.7 : Stack is not changed after `list`_","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"_Figure 3.3.8 : Undo/Redo activity diagram_","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `UndoableCommand` +","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()` +","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"**Pros:** We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist. +","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"**Cons:** Hard for new developers to understand the template pattern. +","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"**Alternative 2:** Just override `execute()` +","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"**Pros:** Does not involve the template pattern, easier for new developers to understand. +","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"**Cons:** Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"**Aspect:** How undo \u0026 redo executes +","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Saves the entire address book. +","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"**Pros:** Easy to implement. +","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"**Cons:** May have performance issues in terms of memory usage. +","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"**Alternative 2:** Individual command knows how to undo/redo by itself. +","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Pros:** Will use less memory (e.g. for `delete`, just save the person being deleted). +","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"**Cons:** We must ensure that the implementation of each individual command are correct.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"**Aspect:** Type of commands that can be undone/redone +","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`). +","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"**Pros:** We only revert changes that are hard to change back (the view can easily be re-modified as no data are lost). +","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"**Cons:** User might think that undo also applies when the list is modified (undoing filtering for example), only to realize that it does not do that, after executing `undo`. +","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"**Alternative 2:** Include all commands. +","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"**Pros:** Might be more intuitive for the user. +","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"**Cons:** User have no way of skipping such commands if he or she just want to reset the state of the address book and not the view. +","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"**Aspect:** Data structure to support the undo/redo commands +","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use separate stack for undo and redo +","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Pros:** Easy to understand for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. +","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"**Cons:** Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `UndoRedoStack`. +","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"**Alternative 2:** Use `HistoryManager` for undo/redo +","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Pros:** We do not need to maintain a separate stack, and just reuse what is already in the codebase. +","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"**Cons:** Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. +","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"// tag::task[]","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Task Object","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"The Task object stores information related to a single deadline or task, in a manner similar to how Person information is stored. +","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"As such, it also shares the same types of commands as the Person object, namely the `add`, `delete`, `find`, `select`, and `edit` commands.","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Object inheritance is thus used to create the commands that are shared with those used to handle Person objects.","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task-related Command implementation","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"An example of using inheritance to handle Person vs Task addition:","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":" int objectType \u003d checkType(args);","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":" if (objectType \u003d\u003d HANDLE_TYPE_PERSON) {","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":" Person toAdd \u003d createNewPerson(args);","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand(toAdd);","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":" } else if (objectType \u003d\u003d HANDLE_TYPE_TASK) {","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":" Task toAdd \u003d createNewTask(args);","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand(toAdd);","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"----","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"The Parser in charge of the command will thus return either an AddPersonCommand, or an AddTaskCommand, depending on whether you specify to add a Task or not in the arguments.","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":" +","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"The sequence diagram below shows how this is done:","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"image::AddTaskSeq.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.1.1 : Sequence Diagram for adding a Task_","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task structure and subclasses","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"The Task object has several subclasses, which store information about the task. The following class diagram illustrates the structure of a Task object.","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"image::TaskClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"_Figure 3.4.2.1 : Class Diagram for the Task class_","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"Each subclass contains its own methods for input validation, and the Assignees class supports some methods for changing its assignedList.","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Task Object Storage","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"[source, xml]","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":" \u003cpersons\u003e","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003esomeone else\u003c/name\u003e","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":" \u003cphone\u003e\u003c/phone\u003e","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":" \u003cemail\u003e\u003c/email\u003e","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":" \u003caddress\u003e\u003c/address\u003e","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":" \u003c/persons\u003e","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":" \u003ctasks\u003e","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":" \u003cname\u003eBuy new pencil\u003c/name\u003e","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":" \u003cdescription\u003eBuy new pencil for writing purposes\u003c/description\u003e","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":" \u003cdeadline\u003e\u003c/deadline\u003e","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":" \u003cpriority\u003e2\u003c/priority\u003e","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":" \u003c/tasks\u003e","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"Task objects are stored in a similar manner to Person objects, and share the same level of hierarchy as Person objects. During startup, tasks are read and entered into the UniqueTaskList, which handles all the tasks that are present in the address book.","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Implementation of Task-related commands +","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Use inheritance to implement different commands for Task and Person objects +","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"**Pros:** Can be easily extended to allow handling of other types of objects, and preserves Separation of Concerns. +","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"**Cons:** Minor code duplication occurs as the commands for Person and Tasks objects share the same structure. +","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Use polymorphism to allow existing commands to implement task handling +","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"**Pros:** Code duplication is kept to a minimum as the Command will handle Task and Person objects in the same class. +","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"**Cons:** Single Responsibility Principle is violated as each Command class now needs to handle 2 different types of objects. +","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of Task objects +","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store Task objects together in the default XML storage file +","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"**Pros** Only 1 storage file is needed. The storage manager thus only needs to refer to one storage +","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"**Cons** Any changes to the Person or Task will affect the storage of both the Person and Task objects. This will increase coupling between the Person and Task classes. +","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store Tasks objects in a separate XML file +","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"**Pros:** Easier to manage as Person storage will not interfere with Task storage, and vice versa. +","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"**Cons:** All existing save/load functions will require an additional method to handle Task storage. +","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"// end::task[]","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assign and Dismiss Commands","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"The `assign` and `dismiss` command allows you to assign contacts to and from your tasks, thus aiding coordination and collaboration. +","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"The Assignees class stores information related to who is assigned to a particular task through maintaining an internal ArrayList that keeps track of all the indexes of the people who are assigned to the task. +","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"The indexes stored in the Assignees class *refer to the index of the person in the UniquePersonList, not the visible index shown to the user in the UI*. This means that the indexes will not change even if the list shown in the UI changes, such as after a `find` operation. +","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"For example, given the below list of persons:","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexMovement.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.1 : Mapping of indexes to a task_","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"After a `find` operation, only the second, fourth and fifth persons are visible.","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"When you call `assign 1 2 to/1`, while the first and second persons in the visible list will be assigned to the first Task, in this case the \"Second person\" and \"Fourth person\", internally the assignee list contain Indexes corresponding the following values: +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[source, java]","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"assignedList \u003d {1, 3}","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"The indexes 1 and 3 refer to the zero-based index of the \"Second person\" and \"Fourth person\" in the complete list.","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Due to this requirement, when the UniquePersonList changes, the assigned indexes of each task will be updated as well.","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"The `add` operation will not require the assigned indexes to be updated, as each newly added person is not assigned to any task by default, and when a person is added, he is inserted to the end of the list, thus the order of the other persons will not change.","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"After a `clear` operation that clears only the persons list, all task assignee lists will be cleared and re-initialized.","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"After a `delete` operation, the order of the persons in the persons list may change. This is especially so when the first person is deleted, as this will cause the positions of all other persons to decrease by 1.","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"The activity diagram below illustrates the process of updating task assignee lists when a person is deleted.","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexDelete.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.2 : Activity Diagram for updating Assignees after deleting a Person_","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"After a `sort` operation, the order of the persons in the persons list may change as well. However, in comparison to `delete`, the new position of the person is not fixed.","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"To ensure that the indexes are updated properly, the change in positions after each `sort` operation is maintained as well inside the UniquePersonList. +","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"image::AssignIndexSort.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"_Figure 3.5.3 : Mapping of indexes after a sort operation_","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"All task assignee lists will thus be updated using the mappings from the sort operation. Each index in the list will be replaced by the value given in the mappings.","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"For example, if a task previously had an index of \"1\" assigned to it, it be replaced by an index of \"4\".","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"**Aspect:** Storage of assigned persons in the Assignee class +","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"**Alternative 1 (current choice):** Store the Indexes of the persons only +","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"**Pros:** The assigned persons will only need to be retrieved on a per-need basis, rather than residing in the Assignee class all the time, thus making storage simpler +","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":"**Cons:** UniquePersonList will be coupled to Tasks, as Tasks will need to retrieve information from the UniquePersonList in order to update itself after any operation that could potentially change the UniquePersonList ordering. +","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"**Alternative 2:** Store the whole person in the Assignees class +","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":"**Pros:** The Assignees class will not need to depend on the UniquePersonList as its internal list is independent from that of the UniquePersonList +","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"**Cons:** Repetition of information is incurred in the storage file, as the same person can appear multiple times if he is assigned to multiple tasks. This will increase the size of the storage file, and make read-write operations slow. +","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"charlesgoh"},"content":"The sort command is facilitated by the `sortBy` methods in UniquePersonList and UniqueTaskList. It supports","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"charlesgoh"},"content":"sort by ascending or by descending order in any field.","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"charlesgoh"},"content":"The sort enhancement utilises the Java Collections Sort API by passing it a custom Comparator.","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"charlesgoh"},"content":"The sort command is parsed through `SortCommandParser`, which passes control over to the `SortCommand`","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"charlesgoh"},"content":"class. The actual sorting happens via the UniquePersonList class or the UniqueTaskList class.","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"charlesgoh"},"content":"The UML Class diagram for sort commands that trigger sorting in person listings is shown below:","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandPersonDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command class diagram_","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"charlesgoh"},"content":"Likewise, the UML Class diagram for sort commands that trigger sorting in task listings is shown below:","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"charlesgoh"},"content":"image::SortCommandTaskDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort task command class diagram_","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"charlesgoh"},"content":"We can deduce from the UML diagrams diagrams above that the only difference between the implementation","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"charlesgoh"},"content":"of the sorting for persons and tasks lies in the location where the sorting is actually executed.","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"charlesgoh"},"content":"The sorting of persons happens in `UniquePersonList` class while the sorting of tasks happens in `UniqueTaskList`.","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"charlesgoh"},"content":"Suppose a user enters a new command `sort person name desc`. The following sequence diagram","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"charlesgoh"},"content":"demonstrates how the sort command works.","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"charlesgoh"},"content":"image::SortSequenceDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"_Figure 3.6.1 : Sort command sequence diagram_","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"charlesgoh"},"content":"Note that the execution of the sort methods results in the actual person or task list being sorted. This list will be","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"charlesgoh"},"content":"reflected in both the application\u0027s storage as well as the graphical user interface.","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `sort Command` +","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Implement sorting functionality in `UniquePersonList` and `UniqueTaskList` class. +","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Delegates the concern of sorting to the class that is responsible for the core of most operations done to the lists.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"charlesgoh"},"content":"Future changes to the implementation will be easier as a consequence. +","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Hard for new developers to understand the flow of control passed between classes at first. +","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Implement the sorting functionality within other classes like `AddressBook` or `SortCommand`. +","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":"**Pros:** May be more intuitive for new developers and it is easier to trace function calls between lesser classes involved. +","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Violates Separation of Concern principle and causes unnecessary content coupling whereby the `UniquePersonList`","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":"and `UniqueTaskList` will have to rely on the `SortCommand` class.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Temporary Sort Implementation vs. Persistent Sort Implementation +","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Saves the entire address book after sorting. +","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive and reduces complexity in implementation. +","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Old order of contact instances in the address book will be lost +","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Duplicate a temporary version of the list and sort it for viewing (i.e. the actual list is not sorted) +","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":"**Pros:** Old order of contact instances remains intact. +","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will use more memory and may be less intuitive for developer to understand and in terms of user experience. Also, sorting will not persist in the system.","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":"// end::sort[]","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":"// tag::backup[]","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":"The `backup` command uses the event handler `BackupRequestEvent`. When raised, this","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":"event notifies the subscriber `backupAddressBook` method in Storage class.","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":"The outlining sequence diagram for this process (excluding the interaction with the","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":"`BackupRequestEvent`) is shown below:","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":"image::BackupSequenceDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"_Figure 3.7.1 : Backup command sequence diagram_","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `backup Command` +","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Use an event handler to initialize the backup process +","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"**Pros:** Avoids coupling the logic to the storage unnecessarily. +","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"**Cons:** May not be as intuitive for some developers in the beginning +","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"**Alternative 2:** Access storage component directly instead of using event handlers +","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"**Pros:** May be more intuitive as it is a direct approach +","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"**Cons:** Violates the Law of Demeter.","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":"// end::backup[]","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":"// tag::password[]","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock and Unlock Command","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":"The `lock` and `unlock` commands utilise the Model to access the user preferences of","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":"the application.","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"Arguments are processed in the `UnlockCommandParser` or `LockCommandParser`,","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":"which passes control over to the `UnlockCommand` and `LockCommand` class respectively.","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":"These `Command` classes will then call the Model to toggle the lock\u0027s state.","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"The activity diagram below outlines the basic logic of the lock states concept.:","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":"image::LockStatesActivityDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"_Figure 3.8.1 : Lock/Unlock command activity diagram_","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":"From the activity diagram we can see that lock states are preserved in the `preferences.json`","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":"file after the application closes by passing the lock state into the `UserPrefs` class to be","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"saved by the Storage component.","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":"The default state of the lock is set to False (i.e. locked) when the user first opens the","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":"application. Subsequent changes to the lock will persist in the user preferences.","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":"**Aspect:** Implementation of `lock` and `unlock` Commands","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":"**Alternative 1 (current choice):** Call methods in the Model directly to change UserPrefs +","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive. Highest returns for minimal amount of code +","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":"**Cons:** May be confusing to some developers in the beginning, since another","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"intuitive approach is to use event handlers +","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":"**Alternative 2:** Use Event Handlers +","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"**Pros:** More intuitive for some developers +","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"**Cons:** Will still have to access Model, which makes its advantage over direct calls next to none","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d ChangePassword Command","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":"The default password when users first open Address++ is `password`. The ChangePassword command","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":"sets a new password in the temporary User Preferences. When the application is closed, this","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":"information is passed to the Storage Component to be saved into the file `preferences.json`","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":"To illustrate this concept better, let us have a look at the `preferences.json` file:","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":"[source, json]","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":"{","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"-"},"content":" \"guiSettings\" : {","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" \"windowWidth\" : 1309.0,","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":" \"windowHeight\" : 720.0,","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":" \"windowCoordinates\" : {","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":" \"x\" : 0,","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":" \"y\" : 22","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":" },","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":" \"addressBookFilePath\" : \"data/addressbook.xml\",","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":" \"addressBookName\" : \"My Address++\",","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":" \"addressBookLockState\" : false,","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":" \"addressBookEncryptedPassword\" : \"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8\",","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" \"theme\" : \"/view/DarkTheme.css\"","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"As shown in the cope snippet above, the password is stored as one of the entries in the JSON","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"file.","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"SHA256 encryption was used to calculate a hash for the password. This is to delay anyone snooping around the","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"user\u0027s file directories from seeing the real password immediately.","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"**Validation Checks**","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":"1. **Password Validation** -\u003e Is the password correct?","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"2. **Password Confirmation** -\u003e Does the new password and confirmation password match?","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"3. **Password Uniqueness** -\u003e Is the new password different from the old password?","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"The activity diagram below outlines the process flow for the `ChangePasswordCommand`:","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"image::ChangePasswordActivityDiagram.png[width\u003d\"800]","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"_Figure 3.9.1 : ChangePassword command activity diagram_","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"-"},"content":"**Aspect:** On Demand Saving vs. Save On Exit +","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Save On Exit +","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"-"},"content":"**Pros:** Simplifies process flow as the command class no longer has to access both Model and Storage components +","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"-"},"content":"**Cons:** Any system/application crash may cause change password data to be lost +","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"**Alternative 2:** On Demand Saving +","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"**Pros:** Changes may persist even through system and application crashes +","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"-"},"content":"**Cons:** May slow down application, although not significantly. Complicates process flow.","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"// end::password[]","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacy[]","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Privacy of fields","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"jeffreygohkw"},"content":"The `Name`, `Phone`, `Email`, `Address` and `Remark` of a `Person` contains a boolean `isPrivate`, which will determine if the field belonging to that person is private or not.","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacy.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.1 : Class diagram for a Person, only Name, Phone, Email, Address and Remark contain an isPrivate boolean to indicate if it is private or not_","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"jeffreygohkw"},"content":"Adding a person with private fields uses the same `AddCommand` as adding a person with no public fields. +","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"jeffreygohkw"},"content":"To determine if the field that is added should be set to private, a `p` is added to the start of the prefix. +","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"jeffreygohkw"},"content":"Hence, `pe/[EMAIL]` will set that person\u0027s email to be private, whereas if `e/[EMAIL]` was used, that person\u0027s email would be public. +","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"jeffreygohkw"},"content":"These new prefixes can be found in `CliSyntax`, and `AddCommandParser` will take data with these prefixes.","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"jeffreygohkw"},"content":"`AddCommandParser` will then call the appropriate method in `ParserUtil`, which will parse the string provided into a new field.","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"jeffreygohkw"},"content":"Depending on whether or not the field is supposed to be private, `ParsetUtil` will call the appropriate constructor.","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"jeffreygohkw"},"content":"Upon obtaining all the fields anc creating a new `Person`, `AddCommandParser` will create a new `AddCommand` to handle the addition of the new `Person`.","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"jeffreygohkw"},"content":"image::AddPrivateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.10.2 : Sequence Diagram for adding a Person with private fields_","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"jeffreygohkw"},"content":"If a field is private, then the `toString` method will return a string `\u003cPrivate [FIELD]\u003e`, where `[FIELD]` is the name of that field. +","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"jeffreygohkw"},"content":"This can be seen from the `toString` method in `Name`:","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"jeffreygohkw"},"content":"@Override","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"jeffreygohkw"},"content":"public String toString() {","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"jeffreygohkw"},"content":" return fullName;","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"jeffreygohkw"},"content":"Since the information displayed in a person\u0027s card in the UI gets the value of the field through the `toString()` method, this hides the actual value of the field in the UI.","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"jeffreygohkw"},"content":"In addition, if `isPrivate` is `true` for `Name`, clicking on a person\u0027s card in the UI will not trigger a search on Google for that person\u0027s name.","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"jeffreygohkw"},"content":"Instead, a `NewResultAvailableEvent` will be raised by `BrowserPanel` to inform the user that they are not allowed to search for a person possessing a private `Name`.","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"jeffreygohkw"},"content":"To keep track of whether each field is private or not, `XmlAdaptedPerson` will have to store the `isPrivate` value for each field of `Person`.","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"jeffreygohkw"},"content":"This is done by adding the following","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"jeffreygohkw"},"content":"[source,java]","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"jeffreygohkw"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"jeffreygohkw"},"content":"Which results in a `Person` being saved in the xml file in the following format","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"jeffreygohkw"},"content":"[source, html]","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"jeffreygohkw"},"content":"\u003cpersons\u003e","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"jeffreygohkw"},"content":" \u003cname\u003eAlex Yeoh\u003c/name\u003e","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"jeffreygohkw"},"content":" \u003cnameIsPrivate\u003efalse\u003c/nameIsPrivate\u003e","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphone\u003e87438807\u003c/phone\u003e","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"jeffreygohkw"},"content":" \u003cphoneIsPrivate\u003efalse\u003c/phoneIsPrivate\u003e","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemail\u003ealexyeoh@example.com\u003c/email\u003e","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"jeffreygohkw"},"content":" \u003cemailIsPrivate\u003efalse\u003c/emailIsPrivate\u003e","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddress\u003eBlk 30 Geylang Street 29, #06-40\u003c/address\u003e","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"jeffreygohkw"},"content":" \u003caddressIsPrivate\u003efalse\u003c/addressIsPrivate\u003e","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremark\u003echeerful lad\u003c/remark\u003e","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"jeffreygohkw"},"content":" \u003cremarkIsPrivate\u003efalse\u003c/remarkIsPrivate\u003e","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"jeffreygohkw"},"content":" \u003ctagged\u003efriends\u003c/tagged\u003e","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"jeffreygohkw"},"content":"\u003c/persons\u003e","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":"If an old save file without privacy data is loaded, then the `toModelType()` method in `XmlAdaptedPerson` will set `isPrivate` to be `false` for each field of `Person`, to keep the displayed information the same.","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":"If a private field is to be edited by `EditCommand`, `createEditedPerson()` in `EditCommand` will not modify the data of that field, even though `EditCommand` will create a new `CommandResult` with a success message. +","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":"Hence, a private field will remain private and the value stored by that field will remain the same as it originally was.","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":"This is done through the `createEditedPerson` method in `EditCommand`.","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"`createEditedPerson` sets the boolean `areFieldsAllPrivate` to initially be true.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"-"},"content":"As the new instance of each field is being generated, if any field contains a value in the input `EditPersonDescriptor` and that field was not originally private, `areFieldsAllPrivate` is set to false.","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"-"},"content":"This can be seen from the following code, which is used for the generation of a new `Name` object.","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"-"},"content":"private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":" if (!personToEdit.getName().isPrivate()) {","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":"Upon generation of all the fields, if `areFieldsAllPrivate` is still true, `createEditedPerson` will throw an `IllegalArgumentException`, which will cause `EditCommand` to throw a `CommandException` and prevent the command from continuing.","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Implementation of `isPrivate` +","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Add a boolean to each field class. +","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Similar implementation to how the fields are currently being implemented. Privacy settings can be obtained directly from the field class itself. +","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Repetitive code. Additional overloaded constructor and methods are needed to set and get the value of `isPrivate`. +","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store a person\u0027s privacy settings outside of the field classes in an Array or a HashMap in `Person`. +","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can access and modify the privacy settings of all fields easily. +","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** The fields themselves do not have any indication of whether or not they are private, and will have to check with the `Person` the belong to.","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to determine if a field for a newly added person should be private. +","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Add a `p` to the start of each field\u0027s prefix to signify that that field should be private. +","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can add `Person` containing any combination of private and public fields in 1 command line. +","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify `AddCommand`, `AddCommandParser`, `ParserUtil` and other classes to detect the new prefix and call a separate constructor when a field is private. +","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** A `Person` is added with all field public, a separate command will then have to be used to set the desired fields to be private. +","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier implementation, do not have to modify `AddCommand`. +","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires 2 command lines to create a `Person` with private fields, which takes more time and is more inconvenient for users.","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing of a Person\u0027s Privacy","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommand` facilitates the setting of an existing person\u0027s field\u0027s privacy. Depending on the user\u0027s input, `ChangePrivacyCommand` will use each field\u0027s `setPrivate()` method to set the value of `isPrivate`.","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `ChangePrivacyCommand` is illustrated below.","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":"image::ChangePrivacySequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.11.1 : Sequence Diagram for changing the privacy of a Person\u0027s fields_","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"Upon receiving a String containing the arguments from `AddressBookParser`, `ChangePrivacyCommandParser` will create a `PersonPrivacySettings` object.","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Depending on the input, the `ChangePrivacyCommandParser` will set the privacy values, represented by Booleans, in the `PersonPrivacySettings` object to be `true` or `false`.","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":"This is illustrated in the code below, which shows how the privacy of `Name` is set in `PersonPrivacySettings`:","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"`ChangePrivacyCommandParser` will then create a new `ChangePrivacyCommand` using the input `Index` and the `PersonPrivacySettings`","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":"When `ChangePrivacyCommand` starts executing, it will create a new `Person` based on the data of the `Person` at the specified `Index`.","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"It will then adjust the privacy values based on the input `PersonPrivacySettings`. For example, the new `Name` is created in the code snippet below:","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"jeffreygohkw"},"content":" return name;","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"jeffreygohkw"},"content":"Once it is done, it will update the original `Person` with the newly created `Person` in `Model`.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"jeffreygohkw"},"content":"If there are missing fields in the input string, the getter methods in `PersonPrivacySettings` will return `false`, but the actual value stored will remain as `null`.","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"jeffreygohkw"},"content":"This allows `isAnyFieldNonNull` to check if the user has input any field at all.","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of changing of a person\u0027s privacy. +","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command to do so. +","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear to users and developers that `changeprivacy` is to modify a person\u0027s privacy while `edit` changes the actual data if the relevant field is not private. +","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional command, parser and tests must be created. +","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Enhance the functionality of EditCommand. +","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Can make use of existing code to aid the implementation. +","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases the complexity of EditCommand for both users and developers. More ambiguous as to how editing a private field will affect the data.","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the address book\u0027s privacy level","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommand` allows the user to change the privacy level of Address++, letting users easily reveal data hidden by private fields, or hide persons containing private fields entirely.","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for `PrivacyLevelCommand` is illustrated below.","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"jeffreygohkw"},"content":"image::PrivacyLevelSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.1 : Sequence Diagram for changing the privacy level of the address book_","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"jeffreygohkw"},"content":"`PrivacyLevelCommandParser` will accept any integer that is input in the command line, and create a `PrivacyLevelCommand` that stores the integer, which represents the privacy level to switch to.","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution,`PrivacyLevelCommand` will first check if the integer falls within the range of the minimum and maximum privacy level. If it does not, a new `CommandException` is thrown, reminding the user of the valid input levels.","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"jeffreygohkw"},"content":"If the integer is within the valid range, `PrivacyLevelCommand` will update the privacy level of `Model`. Following that, it will proceed to update the privacy level of each person.","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"jeffreygohkw"},"content":"`Model`, each `Person` and each field that can be set as private all contain a `privacyLevel` variable to indicate the current privacy level. This value should remain the same between all of these objects throughout the operation of Address++.","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"jeffreygohkw"},"content":"image::PersonClassDiagramPrivacyLevel.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.12.2 : Class Diagram of Person, which shows which classes contain an integer to indicate the privacy level_","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"jeffreygohkw"},"content":"Finally, depending on the privacy level, `PrivacyLevelCommand` will update the call `model.updateFilteredPersonList()` with the appropriate predicate.","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated in the code snippet below.","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Storing of the privacy level +","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have each relevant class store a privacy level integer. +","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Less coupling, less modification of existing code required. +","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Have to modify every relevant object every time `PrivacyLevelCommand` is called. Runs the risk that an object may accidentally not have its privacy level modified to match the other objects if privacy levels are not properly updated. +","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Store the privacy level in the model and have any object that needs to check it query from model. +","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only one integer needs to be modified for the privacy level of the entire address book to change, which also eliminates any possibility that privacy level may be different when used by different objects. +","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Increases coupling, classes such as Name will need to have a Model object as one of its variables to access Model. Large scale modification of existing code and tests are necessary.","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacy[]","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating a Person on Google Maps","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"jeffreygohkw"},"content":"Locating a person\u0027s address allows users to take the address that is stored by a person and search it on Google Maps in the browser.","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"Upon calling the `locate` command, `LocateCommandParser` will parse the input string into an `Index`, and create a new `LocateCommand`. Should the arguments be a non-integer, a `ParseException` will be thrown. +","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"This can be seen from the code snippet below:","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `LocateCommand`, it will search the `Model` for the `Person` at the input `Index`. If the `Index` is out of range of the list of persons, a `CommandException` will be thrown.","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"Otherwise, `LocateCommand` will post a new `BrowserPanelLocateEvent` and pass in the `Person` found to that event. It will then return a `CommandResult` indicating the success of its execution.","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"This code for this can be found below:","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"BrowserPanel will then use `handleBrowserPanelLocationEvent` to process this newly created event. It will call `loadMapsPage`, which will check if the `Person`\u0027s `Address` is private or not. If their `Address` is public, it will launch the browser, showing the `Address` of that `Person` on Google Maps. Otherwise, an error message will be printed, as can be seen below:","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::LocateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.13.1 : Sequence Diagram for Locating a Person\u0027s Address_","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the Google Maps to search for a person\u0027s `Address` +","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Create a separate command `locate`. +","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"**Pros:** No modification needed for existing commands, which makes it clear the purpose of each command. +","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"**Cons:** Additional commands will need to be learnt for both developers and users. +","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"**Alternative 2:** Add the functionality into `SelectCommand`. +","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"**Pros:** Expands the utility of `SelectCommand` beyond performing a Google search on their name. +","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"**Cons:** Will require significant modification of existing code, and may make it more confusing for users.","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another using Google Maps","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"jeffreygohkw"},"content":"When the `navigate` command is entered into the command line, `NavigateCommandParse` will first reset its internal `from`, `to`, `fromIndex`, `toIndex` to null. It will then check for the input prefixes and ensure that only one of the prefixes from the group `fp/`, `ft/`, and `fa/`, which we will subsequently call the `from` prefixes are present. It then does the same with the prefixes from the group `tp/`, `tt/` and `ta/`, which we will call the `to` prefixes. +","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"jeffreygohkw"},"content":"This is done by invoking the `checkFrom` and `checkTo` methods as can be seen from the code snippet below. For the example `checkFrom`, it takes in 3 booleans on whether or not each prefix is present and checks whether or not there is exactly one kind of `from` prefix. It throws an error if there are no `from` prefixes or more than one type of `from` prefixes.","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"jeffreygohkw"},"content":"private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"`checkFrom` calls `setArgsForNavigateCommand`, which sets the variables in the `NavigateCommandParser` to the appropriate values depending on whether the address originates from a person, a task or is a manual input by the user.","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":"private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person, boolean forFrom) throws IllegalValueException {","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"jeffreygohkw"},"content":"Finally, `NavigateCommandParser` will create a new `NavigateCommand` based on the inputs as set by `setArgsForNavigateCommand`.","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"jeffreygohkw"},"content":"When `NavigateCommand` is created, it first checks if there are duplicate `from` or `to` addresses that are passed into it and throws an error if that is the case.","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"jeffreygohkw"},"content":"private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex) throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"jeffreygohkw"},"content":"If it passes this check, `NavigateCommand` stores `fromLocation` and `toLocation`, which are the Locations of any manually added address by the user to navigate from and to respectively. It also stores `toIndex` and `fromIndex`, which are the Indexes of the `Person` or `Task` to extract the address from as well as `toIsTask` and `fromIsTask`, which are booleans that indicate whether `toIndex` and `fromIndex` are indexes of Persons or Tasks.","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Upon execution of `NavigateCommmand`, it will first check if it has a non-null `fromIndex`, if it does, it will create a new Location based on its `fromIndex` and `fromIsTask` values using the `setLocationByIndex` method. Otherwise, it will set the Location to be the Location in `locationfrom`. This can be seen below:","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"if (fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"jeffreygohkw"},"content":"} else {","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"setLocationByIndex throws CommandException if the target Person or Task does not have a valid Address to extract due to the Address being blank, or it being private.","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` does the same for the Address to navigate `To` and posts a new `BrowserPanelNavigateEvent`, passing in the `Location` to navigate `From` and the `Location` to navigate `To`. +","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":"`NavigateCommand` will then create a new `CommandResult` to indicate a successful `Command`.","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":"`BrowserPanel` will then get the information from this `BrowserPanelNavigateEvent`, and load the appropriate Google Maps URL after replacing information such as the Unit Number and extra whitespaces. This has to be done as Google Maps does not function properly with Unit Numbers or spaces in its URL.","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"private void loadDirectionsPage(String fromLocation, String toLocation) {","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\"","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\"","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":"The overall sequence of events is illustrated by the following sequence diagram:","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"image::NavigateSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.14.1 : Sequence Diagram for Navigating from one Address to another_","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to pass the appropriate information to NavigateCommand +","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Have a constructor that takes in a large number of arguments so that NavigateCommand can correctly identify what kind of Location to post in BrowserPanelNavigateEvent. +","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only 1 constructor needed. +","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Additional methods will be needed to properly identify which Location to use for navigation. +","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Create many constructors to segregate the different possible scenarios that might happen. +","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** It is clear what information to use to generate the Locations +","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires large numbers of constructors to be created, easy for mistakes to occur as Constructors all share the same name but different argument types.","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How to transfer information of the address from one class to another +","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Wrap the address in a `Location` class before posting the BrowserPanelNavigateEvent. +","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Only Locations, which indicates that the address is properly parsed, will be passed for the BrowserPanel to read, reducing the possibility of BrowserPanel reading stray unwanted strings as addresses to navigate to and from. The value stored inside each Location cannot be altered once that Location object has been created. +","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** A new class has to be created and Strings, Addresses and TaskAddresses will need to be converted to Locations first. +","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Simply pass on a String containing the address from class to class +","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easy to read and transfer information, lower overhead +","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** It is easier for stray Strings to pollute the information, and the Strings can be unintentionally modified.","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening and Saving of the .xml save file","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"jeffreygohkw"},"content":"Both `OpenCommand` and `SaveAsCommand` function in a very similar way.","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"When `open` or `save` is input by the user, `AddressBookParser` will create a new `OpenCommand` or `SaveAsCommand`.","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"jeffreygohkw"},"content":"These two commands will then post a new `OpenRequestEvent` or a new `SaveAsRequestEvent` and return a successful `CommandResult`.","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` will have two methods, `HandleOpenRequestEvent` and `HandleSaveAsRequestEvent` that subscribe to the above two events and will call `handleOpen` and `handleSaveAs`.","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"jeffreygohkw"},"content":"private void handleOpen() throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"private void handleSaveAs() throws IOException {","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"jeffreygohkw"},"content":"Both `handleOpen` and `handleSaveAs` will create a new `FileChooser` extension filter that only allows the pop-up window to save files and load files in the .xml format.","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"jeffreygohkw"},"content":"Upon successfully selecting a file to load or a location to save as in the pop-up window, both methods will call `changefilepath` in `Storage` to the selected file path.","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"Finally, both commands diverge as `handleOpen` will call `resetData` to reset the data using the new save file, while `handleSaveAs` will call `saveAddressBook` and `saveUserPrefs` to save the data. Both methods will finally call `fillInnerParts()` to refresh the data displayed on the UI.","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"This process is illustrated using the sequence diagram below:","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"jeffreygohkw"},"content":"image::OpenSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.15.1 : Sequence Diagram for Opening a save file_","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** How does `OpenCommand` and `SaveAsCommand` determine the file location to save or load the save file from +","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Open a `FileChooser` window, allowing the user to move through their file directory to acquire their save location and to select the name of the save file. +","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** User friendly, many other applications function similarly when saving and loading. Easier to implement and use as part of the dropdown menu in the User Interface. +","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Not entirely command line based. +","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Input the file directory and file name to save or load from as part of the command. +","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Entirely command line based, may be more preferable for users who prefer using the command line. +","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Requires more complex code. Command must check if the file location to save or load from is valid, and that there is a valid file of that name.","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the theme of the address book","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"jeffreygohkw"},"content":"The original style of the address book may not be for everyone. `ThemeCommand` allows users to switch between multiple preset themes.","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"jeffreygohkw"},"content":"`ThemeCommandParser` trims the arguments after the word `theme` in the command line, removing any whitespaces leading up to and following that word. If the entire String ended up trimmed, then `ThemeCommandParser` will throw a `ParseException`. Otherwise, it creates a new `ThemeCommand`, passing in the trimmed word as seen below:","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"jeffreygohkw"},"content":"public ThemeCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"jeffreygohkw"},"content":"When initialising the Address Book, the `AddressBook` class will create a `HashMap\u003cString, String\u003e` to store the keys and values of the themes.","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"jeffreygohkw"},"content":"private void initialiseStyleMap() {","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"DarkTheme.css\");","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"DarkTheme.css\");","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"LightTheme.css\");","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"LightTheme.css\");","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"The keys correspond to the possible user inputs, such as `light` or `dark`, while the values contain the filepath of the .css files, such as `DarkTheme.css`. This way, users do not need to remember and will not have to know what the .css files are like to use the theme command.","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"jeffreygohkw"},"content":"On executing `ThemeCommand`, it first checks if the input string can be found in the set of keys in the HashMap contained by the `AddressBook` class. If it cannot be found, or if the value corresponding to the input string is identical to that of the value of the file path of the .css file stored in Model, then a `CommandException` is thrown, as users cannot change to a non-existent theme, or a theme that is already in use.","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"jeffreygohkw"},"content":"If the string is valid, `ThemeCommand` will post a `ChangeThemeRequestEvent` and set the theme to the new file path corresponding to the input String in `Model`. `Model` will then continue on to set the theme in `UserPrefs` as well, so that it can be loaded on starting the application.","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"`MainWindow` contains a method `handleChangeThemeEvent` that subscribes to the `ChangeThemeRequestEvent`. `handleChangeThemeEvent` calls `handlChangeTheme`, which first checks if there is an existing theme, if there is, it removes it, then sets adds the new theme through the file path that was passed to it.","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"jeffreygohkw"},"content":"public void handleChangeTheme(String theme) {","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(VIEW_PATH + theme);","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"After all is done, `ThemeCommand` returns a `CommandResult`, indicating the success of the command.","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"The overall execution of `ThemeCommand` is seen in the following code snippet.","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"----","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"The sequence diagram for the whole process is show below:","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"jeffreygohkw"},"content":"image::ThemeSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"jeffreygohkw"},"content":"_Figure 3.16.1 : Sequence Diagram for Changing Themes_","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"**Aspect:** Getting the correct file path to the .css file +","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 1 (current choice):** Store the file path in a HashMap, where the keys are the possible inputs that the user may type and the values are the actual filepaths +","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** Easier on the user. They do not need to remember any complicated .css names or file paths, and the input string can be customisable by changing the names of the keys added to the HashMap. +","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Slightly more work needed to initialise the HashMap and check if the file paths are valid. +","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"**Alternative 2:** Change the name of the .css file and file paths such that what the user directly inputs can correspond to the actual .css file. +","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"**Pros:** A HashMap is no longer needed, instead, the input string just needs to be parsed to be turned into a file path. This makes it easier to add additional .css files, as developers do not have to keep modifying the initialisation of the HashMap +","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"jeffreygohkw"},"content":"**Cons:** Less flexibility in naming the file, user may break the code if they realise the input string directly used as part of the file path.","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"// tag::adddeletetag[]","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Add/Delete Tag mechanism","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"-"},"content":"The add/delete tag mechanism is facilitated by `personArrayList`, which resides inside `LogicManager`. It supports add/delete","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"-"},"content":"tag for all persons in the address book. This command will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"-"},"content":"The add/delete tag command are executed by `AddTagCommand` and `DeleteTagCommand` are parsed through `AddTagCommandParser` and `DeleteTagCommandParser`.","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"-"},"content":"It is different from `edit [INDEX] [TAG]` since it allows the user to perform the addition and deletion of tags for multiple people at once.","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"-"},"content":"If the user wants to add the `t/friends` tag for the first 3 persons in the address book, the `AddTagCommand` (`add tag/ 1 2 3 t/friends`) will be executed.","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"-"},"content":"The same operation will happen for `delete tag/` command.","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"-"},"content":"The `AddTagCommand` goes through all the persons in the address book and add tag to the persons with specific index. The `DeleteTagCommand` works","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"-"},"content":"in a similar way.","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"-"},"content":"The example of how `AddTagCommand` is working:","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"-"},"content":" * Adds a tag to the persons in the list from the address book.","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"-"},"content":"public class AddTagCommand extends AddCommand {","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"-"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"-"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"-"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"-"},"content":" // check whether the index within the range","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1469,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":1470,"author":{"gitId":"-"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":1471,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1472,"author":{"gitId":"-"},"content":" // throw exception for duplicated tag","isFullCredit":true},{"lineNumber":1473,"author":{"gitId":"-"},"content":" return new CommandResult();","isFullCredit":true},{"lineNumber":1474,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1475,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1476,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1477,"author":{"gitId":"-"},"content":"Suppose the user enter the `add tag/ 1 2 t/friends` command. The following sequence diagram shows how the add tag command works:","isFullCredit":true},{"lineNumber":1478,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1479,"author":{"gitId":"-"},"content":"image::AddTagSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1480,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : Add Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":1481,"author":{"gitId":"-"},"content":"The `delete tag/` command works the same as `add tag/` command with different name only.","isFullCredit":true},{"lineNumber":1482,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1483,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1484,"author":{"gitId":"-"},"content":"If the input index does not exist, the `AddTagCommand` and `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":1485,"author":{"gitId":"-"},"content":"If the tag to be deleted does not exist, the `DeleteTagCommand` will throw an exception. +","isFullCredit":true},{"lineNumber":1486,"author":{"gitId":"-"},"content":"If the tag to be added exists in every target person in the address book, the `AddTagCommand` will throw an exception.","isFullCredit":true},{"lineNumber":1487,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1488,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1489,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1490,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1491,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `add tag/` and `delete tag/` +","isFullCredit":true},{"lineNumber":1492,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement the methods in `ModelManager` +","isFullCredit":true},{"lineNumber":1493,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `ModelManager` includes all the methods and variables. +","isFullCredit":true},{"lineNumber":1494,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` also to fit the `ModelManager`. Beginner may have difficulty to understand the different functions in Model component+","isFullCredit":true},{"lineNumber":1495,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1496,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `addtag` and `deletetag` in `AddTagCommand` and `DeleteTagCommand` respectively. +","isFullCredit":true},{"lineNumber":1497,"author":{"gitId":"-"},"content":"**Pros:** Easier to understand. +","isFullCredit":true},{"lineNumber":1498,"author":{"gitId":"-"},"content":"**Cons:** Repetitive code. Additional overload constructor needs to be implement. The `AddTagCommand` and `DeleteTagCommand` will have to update the person list.","isFullCredit":true},{"lineNumber":1499,"author":{"gitId":"-"},"content":"This violates the Single Responsibility Principle.","isFullCredit":true},{"lineNumber":1500,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1501,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":1502,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `AddTagCommand` and `DeleteTagCommand` +","isFullCredit":true},{"lineNumber":1503,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** create new command `add tag/` and `delete tag/` +","isFullCredit":true},{"lineNumber":1504,"author":{"gitId":"-"},"content":"**Pros:** Less modification of existing command and parser +","isFullCredit":true},{"lineNumber":1505,"author":{"gitId":"-"},"content":"**Cons:** Users have to learn how to use the additional commands +","isFullCredit":true},{"lineNumber":1506,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1507,"author":{"gitId":"-"},"content":"**Alternative 2:** Modify the existing `add` and `delete` command +","isFullCredit":true},{"lineNumber":1508,"author":{"gitId":"-"},"content":"**Pros:** Users could use the same commands to achieve different purpose +","isFullCredit":true},{"lineNumber":1509,"author":{"gitId":"-"},"content":"**Cons:** Additional override the constructor for the existing command. It might not be easy for the beginner.","isFullCredit":true},{"lineNumber":1510,"author":{"gitId":"-"},"content":"// end::adddeletetag[]","isFullCredit":true},{"lineNumber":1511,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1512,"author":{"gitId":"-"},"content":"// tag::findtag[]","isFullCredit":true},{"lineNumber":1513,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1514,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Find Tag mechanism","isFullCredit":true},{"lineNumber":1515,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1516,"author":{"gitId":"-"},"content":"The find tag mechanism is facilitated by an ArrayList of Tags, which resides inside `LogicManager`. It supports finding persons by their tags in the address book.","isFullCredit":true},{"lineNumber":1517,"author":{"gitId":"-"},"content":"This command will not inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":1518,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1519,"author":{"gitId":"-"},"content":"The `find tag/` command is executed by `FindTagCommand` and is parsed through `FindTagCommandParser`.","isFullCredit":true},{"lineNumber":1520,"author":{"gitId":"-"},"content":"After parsing through `FindTagCommandParser`, it does not goes to the `FindTagCommand` straightly. The list of tags input will be processed by `NameContainsTagsPredicate` first.","isFullCredit":true},{"lineNumber":1521,"author":{"gitId":"-"},"content":"It is similar to the `find` command since find persons through their names and find persons through their tags are quite similar.","isFullCredit":true},{"lineNumber":1522,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1523,"author":{"gitId":"-"},"content":"Please take not that although `FindTagCommand` is similar to `FindCommand`, there are still some differences.","isFullCredit":true},{"lineNumber":1524,"author":{"gitId":"-"},"content":"`FindTagCommand` provides exclusive finding whereas `FindCommand` does not. It is achieved in the `NameContainsTagsPredicate`.","isFullCredit":true},{"lineNumber":1525,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1526,"author":{"gitId":"-"},"content":"This is the example of how `NameContainsTagsPredicate` is working:","isFullCredit":true},{"lineNumber":1527,"author":{"gitId":"-"},"content":"Firstly, it will convert a Set of Tag to String.","isFullCredit":true},{"lineNumber":1528,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1529,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1530,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1531,"author":{"gitId":"-"},"content":"private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":1532,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":1533,"author":{"gitId":"-"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":1534,"author":{"gitId":"-"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":1535,"author":{"gitId":"-"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":1536,"author":{"gitId":"-"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":1537,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1538,"author":{"gitId":"-"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":1539,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1540,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1541,"author":{"gitId":"-"},"content":"After having a list of string, it will then split strings into two ArrayList. One is for the tags we are looking for and another one","isFullCredit":true},{"lineNumber":1542,"author":{"gitId":"-"},"content":"is for the tags to be excluded.","isFullCredit":true},{"lineNumber":1543,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1545,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1546,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":1547,"author":{"gitId":"-"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":1548,"author":{"gitId":"-"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":1549,"author":{"gitId":"-"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":1550,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1551,"author":{"gitId":"-"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":1552,"author":{"gitId":"-"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":1553,"author":{"gitId":"-"},"content":" if (!everyTag.startsWith(\"/not\")) {","isFullCredit":true},{"lineNumber":1554,"author":{"gitId":"-"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":1555,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1556,"author":{"gitId":"-"},"content":" unwantedTag.add(everyTag.substring(4));","isFullCredit":true},{"lineNumber":1557,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1558,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1559,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1560,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1561,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1562,"author":{"gitId":"-"},"content":"Lastly, it will return the result according to the user input. +","isFullCredit":true},{"lineNumber":1563,"author":{"gitId":"-"},"content":"Suppose the user enter `find tag/ friends` command. The following sequence diagram shows how the find tag command works:","isFullCredit":true},{"lineNumber":1564,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1565,"author":{"gitId":"-"},"content":"image::FindTagSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1566,"author":{"gitId":"-"},"content":"_Figure 3.18.1 : Find Tag Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":1567,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1568,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1569,"author":{"gitId":"-"},"content":"If the input index tags do not exist, the `FindTagCommand` will give a empty list.","isFullCredit":true},{"lineNumber":1570,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1571,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1572,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1573,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1574,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of the `find tag/` +","isFullCredit":true},{"lineNumber":1575,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `find tag/` +","isFullCredit":true},{"lineNumber":1576,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. `find tag/` command will be similar to the `find` command. +","isFullCredit":true},{"lineNumber":1577,"author":{"gitId":"-"},"content":"**Cons:** Must create `NameContainsTagsPredicate` in model. It does not fully utilize the existing `NameContainsKeywordsPredicate`. +","isFullCredit":true},{"lineNumber":1578,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1579,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `find tag/` in `FindCommand`. +","isFullCredit":true},{"lineNumber":1580,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","isFullCredit":true},{"lineNumber":1581,"author":{"gitId":"-"},"content":"**Cons:** The existing `FindCommand` will not only response for finding persons through names only. This Violates Single Responsibility Principle","isFullCredit":true},{"lineNumber":1582,"author":{"gitId":"-"},"content":"and Separation of Concerns as FindCommand now needs to do two different things.","isFullCredit":true},{"lineNumber":1583,"author":{"gitId":"-"},"content":"// end::findtag[]","isFullCredit":true},{"lineNumber":1584,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1585,"author":{"gitId":"-"},"content":"// tag::favunfav[]","isFullCredit":true},{"lineNumber":1586,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favourite/Unfavourite Person mechanism","isFullCredit":true},{"lineNumber":1588,"author":{"gitId":"-"},"content":"To favourite a person is achieved by `FavouriteCommand`. It basically changes the value of the `favourite` status of a `Person` but there is no specific `Favourite` field for person.","isFullCredit":true},{"lineNumber":1589,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1590,"author":{"gitId":"-"},"content":"In this sense, a boolean value needs to be created to store the favourite status of a contact. As `AddCommand` does not involve `favourite`, the default `favourite` status for every newly added `Person` is false.","isFullCredit":true},{"lineNumber":1591,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1592,"author":{"gitId":"-"},"content":"The `favourite` status is a boolean value and it will be set as true through `FavouriteCommand`. Then, the target person will be updated.","isFullCredit":true},{"lineNumber":1593,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1594,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1595,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1596,"author":{"gitId":"-"},"content":"public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":1597,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1598,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":1599,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1600,"author":{"gitId":"-"},"content":" // throw invalid person index","isFullCredit":true},{"lineNumber":1601,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1602,"author":{"gitId":"-"},"content":" // update favourite status","isFullCredit":true},{"lineNumber":1603,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":1604,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),","isFullCredit":true},{"lineNumber":1605,"author":{"gitId":"-"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),","isFullCredit":true},{"lineNumber":1606,"author":{"gitId":"-"},"content":" personToFavourite.getAddress(), true,","isFullCredit":true},{"lineNumber":1607,"author":{"gitId":"-"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),","isFullCredit":true},{"lineNumber":1608,"author":{"gitId":"-"},"content":" personToFavourite.getTags());","isFullCredit":true},{"lineNumber":1609,"author":{"gitId":"-"},"content":" // update target person","isFullCredit":true},{"lineNumber":1610,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":1611,"author":{"gitId":"-"},"content":" model.updatePerson(personToFavourite, editedPerson);","isFullCredit":true},{"lineNumber":1612,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":1613,"author":{"gitId":"-"},"content":" // throw exception","isFullCredit":true},{"lineNumber":1614,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1615,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":1616,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1617,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","isFullCredit":true},{"lineNumber":1618,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1619,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1620,"author":{"gitId":"-"},"content":"`FavouriteCommand` takes in an integer as its argument. The command is first being parsed in `AddressBookParser` to be identified as an instance of `FavouriteCommand`.","isFullCredit":true},{"lineNumber":1621,"author":{"gitId":"-"},"content":"Then it is parsed by `FavouriteCommandParser` to parse the index. Invalid indexes will be handled by throwing an exception. This is how `FavouriteCommandParser` is implemented:","isFullCredit":true},{"lineNumber":1622,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1623,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1624,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":1625,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","isFullCredit":true},{"lineNumber":1626,"author":{"gitId":"-"},"content":" * and returns an FavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":1627,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":1628,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":1629,"author":{"gitId":"-"},"content":" public FavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1630,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":1631,"author":{"gitId":"-"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":1632,"author":{"gitId":"-"},"content":" return new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":1633,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":1634,"author":{"gitId":"-"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":1635,"author":{"gitId":"-"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1636,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1637,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1638,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1639,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1640,"author":{"gitId":"-"},"content":"The following sequence diagram shows how a `FavouriteCommand` is processed: +","isFullCredit":true},{"lineNumber":1641,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1642,"author":{"gitId":"-"},"content":"image::FavouriteSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1643,"author":{"gitId":"-"},"content":"_Figure 3.19.1 : Favourite Sequence Diagram for Logic_ +","isFullCredit":true},{"lineNumber":1644,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1645,"author":{"gitId":"-"},"content":"To indicate that a person has been `favoured`, `PersonCard` is modified to contain a `favouriteLabel` that changes its appearance based on the `favourite` status of the person.","isFullCredit":true},{"lineNumber":1646,"author":{"gitId":"-"},"content":"It will first detect the boolean favourite status of the person. If the person is a favourite contact, a heart will be shown.","isFullCredit":true},{"lineNumber":1647,"author":{"gitId":"-"},"content":"The colours of the border and the background of the label are set to transparent, so that only the background picture, which is a heart, will be shown.","isFullCredit":true},{"lineNumber":1648,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1649,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":1650,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1651,"author":{"gitId":"-"},"content":"**Aspect:** Implementation of `favourite` +","isFullCredit":true},{"lineNumber":1652,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** implement a new command `favourite`. +","isFullCredit":true},{"lineNumber":1653,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to modify existing command. +","isFullCredit":true},{"lineNumber":1654,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Person` class to update the person status. The constructor of `person` has been modified so all the `person` in the address book must change accordingly. +","isFullCredit":true},{"lineNumber":1655,"author":{"gitId":"-"},"content":"**Alternative 2:** Implement the `favourite` in `AddCommand` +","isFullCredit":true},{"lineNumber":1656,"author":{"gitId":"-"},"content":"**Pros:** Easier for user. They do not have to memorize some many commands. +","isFullCredit":true},{"lineNumber":1657,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. The `favourite` status will be treated as an optional field when using `AddCommand`. In order to change `favourite` status, `EditCommand` may be modified which is very troublesome. +","isFullCredit":true},{"lineNumber":1658,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1659,"author":{"gitId":"-"},"content":"---","isFullCredit":true},{"lineNumber":1660,"author":{"gitId":"-"},"content":"**Aspect:** Store `Favourite` values +","isFullCredit":true},{"lineNumber":1661,"author":{"gitId":"-"},"content":"**Alternative 1 (current choice):** Store it as a `Boolean` value +","isFullCredit":true},{"lineNumber":1662,"author":{"gitId":"-"},"content":"**Pros:** Easier to implement. Does not need to create another class. +","isFullCredit":true},{"lineNumber":1663,"author":{"gitId":"-"},"content":"**Cons:** Must modify `Model` and `ModelManager` to update the person status.It is also prone to bugs when developers forget to change the ObjectProperty to `String` in UI classes. +","isFullCredit":true},{"lineNumber":1664,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1665,"author":{"gitId":"-"},"content":"**Alternative 2:** Add a new `Favourite` field +","isFullCredit":true},{"lineNumber":1666,"author":{"gitId":"-"},"content":"**Pros:** Similar way to store other personal information. It also follows the open-close principle and exercises cohesion, where all matters related to `Favourite` field is dealt in its own class. +","isFullCredit":true},{"lineNumber":1667,"author":{"gitId":"-"},"content":"**Cons:** Difficult to implement. Adding a new field will cause many changes in UI, Logic, Model and Storage. Some test cases will be rewritten.","isFullCredit":true},{"lineNumber":1668,"author":{"gitId":"-"},"content":"// end::favunfav[]","isFullCredit":true},{"lineNumber":1669,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","isFullCredit":true},{"lineNumber":1671,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","isFullCredit":true},{"lineNumber":1673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1674,"author":{"gitId":"-"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See link:#configuration[Configuration])","isFullCredit":true},{"lineNumber":1675,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","isFullCredit":true},{"lineNumber":1676,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","isFullCredit":true},{"lineNumber":1677,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1678,"author":{"gitId":"-"},"content":"*Logging Levels*","isFullCredit":true},{"lineNumber":1679,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1680,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","isFullCredit":true},{"lineNumber":1681,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","isFullCredit":true},{"lineNumber":1682,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","isFullCredit":true},{"lineNumber":1683,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","isFullCredit":true},{"lineNumber":1684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1685,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1686,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","isFullCredit":true},{"lineNumber":1687,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1688,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","isFullCredit":true},{"lineNumber":1689,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","isFullCredit":true},{"lineNumber":1691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1692,"author":{"gitId":"-"},"content":"We use asciidoc for writing documentation.","isFullCredit":true},{"lineNumber":1693,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1694,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1695,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","isFullCredit":true},{"lineNumber":1696,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","isFullCredit":true},{"lineNumber":1698,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1699,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","isFullCredit":true},{"lineNumber":1700,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","isFullCredit":true},{"lineNumber":1701,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1702,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","isFullCredit":true},{"lineNumber":1703,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1704,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","isFullCredit":true},{"lineNumber":1705,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1706,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","isFullCredit":true},{"lineNumber":1707,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1708,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","isFullCredit":true},{"lineNumber":1709,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1710,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","isFullCredit":true},{"lineNumber":1711,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1712,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","isFullCredit":true},{"lineNumber":1713,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","isFullCredit":true},{"lineNumber":1714,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","isFullCredit":true},{"lineNumber":1715,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","isFullCredit":true},{"lineNumber":1716,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1717,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":1718,"author":{"gitId":"-"},"content":"_Figure 5.6.1 : Saving documentation as PDF files in Chrome_","isFullCredit":true},{"lineNumber":1719,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1720,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":1721,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1722,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","isFullCredit":true},{"lineNumber":1723,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1724,"author":{"gitId":"-"},"content":"There are three ways to run tests.","isFullCredit":true},{"lineNumber":1725,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1726,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":1727,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","isFullCredit":true},{"lineNumber":1728,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","isFullCredit":true},{"lineNumber":1730,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1731,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","isFullCredit":true},{"lineNumber":1732,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","isFullCredit":true},{"lineNumber":1733,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1734,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","isFullCredit":true},{"lineNumber":1735,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1736,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","isFullCredit":true},{"lineNumber":1737,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1739,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","isFullCredit":true},{"lineNumber":1740,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1741,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","isFullCredit":true},{"lineNumber":1742,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1743,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","isFullCredit":true},{"lineNumber":1744,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1745,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","isFullCredit":true},{"lineNumber":1746,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1747,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","isFullCredit":true},{"lineNumber":1748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1749,"author":{"gitId":"-"},"content":"We have two types of tests:","isFullCredit":true},{"lineNumber":1750,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1751,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","isFullCredit":true},{"lineNumber":1752,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","isFullCredit":true},{"lineNumber":1753,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","isFullCredit":true},{"lineNumber":1754,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","isFullCredit":true},{"lineNumber":1755,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","isFullCredit":true},{"lineNumber":1756,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","isFullCredit":true},{"lineNumber":1757,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","isFullCredit":true},{"lineNumber":1758,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","isFullCredit":true},{"lineNumber":1759,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","isFullCredit":true},{"lineNumber":1760,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","isFullCredit":true},{"lineNumber":1761,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1762,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1763,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","isFullCredit":true},{"lineNumber":1764,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","isFullCredit":true},{"lineNumber":1765,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1766,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","isFullCredit":true},{"lineNumber":1767,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","isFullCredit":true},{"lineNumber":1768,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1769,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","isFullCredit":true},{"lineNumber":1770,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1771,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","isFullCredit":true},{"lineNumber":1772,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1773,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","isFullCredit":true},{"lineNumber":1774,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1775,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","isFullCredit":true},{"lineNumber":1776,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1777,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1778,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1779,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","isFullCredit":true},{"lineNumber":1780,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","isFullCredit":true},{"lineNumber":1782,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1783,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","isFullCredit":true},{"lineNumber":1784,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","isFullCredit":true},{"lineNumber":1785,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","isFullCredit":true},{"lineNumber":1786,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","isFullCredit":true},{"lineNumber":1787,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1788,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","isFullCredit":true},{"lineNumber":1789,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1790,"author":{"gitId":"Esilocke"},"content":"A project often depends on third-party libraries. For example, Address++ depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","isFullCredit":true},{"lineNumber":1791,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","isFullCredit":true},{"lineNumber":1792,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","isFullCredit":true},{"lineNumber":1793,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1794,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1795,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","isFullCredit":true},{"lineNumber":1796,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1797,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","isFullCredit":true},{"lineNumber":1798,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1799,"author":{"gitId":"-"},"content":"[width\u003d\"59%\",cols\u003d\"22%,\u003c23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","isFullCredit":true},{"lineNumber":1800,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1801,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","isFullCredit":true},{"lineNumber":1802,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","isFullCredit":true},{"lineNumber":1803,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new person | keep track of my contacts","isFullCredit":true},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","isFullCredit":true},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"|`* * *` |user |add a new task | keep track of my tasks and assignments","isFullCredit":true},{"lineNumber":1809,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1810,"author":{"gitId":"-"},"content":"|`* * *` |user |delete a person |remove entries that I no longer need","isFullCredit":true},{"lineNumber":1811,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1812,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have a search function |easily search for the contact I am looking for without browsing through thousands of contacts","isFullCredit":true},{"lineNumber":1813,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1814,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user |have the option to edit my created contacts |make changes to the contacts that I have added","isFullCredit":true},{"lineNumber":1815,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1816,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |error-prone user |have the ability to Undo and Redo |automatically undo or redo the changes that I have made","isFullCredit":true},{"lineNumber":1817,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1818,"author":{"gitId":"jeffreygohkw"},"content":"|`* * *` |user with secretive friends |be able to add contacts with incomplete data |operate without the need to create dummy values","isFullCredit":true},{"lineNumber":1819,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"|`* * *` |cautious user |be able to lock my address book application whenever I want with a password | prevent people with malicious intent from making changes to my data","isFullCredit":true},{"lineNumber":1821,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1822,"author":{"gitId":"-"},"content":"|`* *` |user |hide link:#private-contact-detail[private contact details] by default |minimize chance of someone else seeing them by accident","isFullCredit":true},{"lineNumber":1823,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1824,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |load contact data from any file of my choosing | have more flexibility for my file\u0027s storage location","isFullCredit":true},{"lineNumber":1825,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1826,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |save contact data in a directory of my choosing |save the file in a location that fits my needs","isFullCredit":true},{"lineNumber":1827,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1828,"author":{"gitId":"charlesgoh"},"content":"|`* *` |user |type commands partially and have the application fill in the rest for me | increase typing productivity","isFullCredit":true},{"lineNumber":1829,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1830,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |multi-tasking user |be able to record things other than contacts, such as tasks |manage myself better","isFullCredit":true},{"lineNumber":1831,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1832,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user |be able to filter my contacts based on tags |view the people who are relevant to me","isFullCredit":true},{"lineNumber":1833,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1834,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |organized user |be able to sort my contacts by different fields such as by name and birthday |better organize my contacts","isFullCredit":true},{"lineNumber":1835,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1836,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user with multiple devices |be able to import and export my address book |use the address book without having to add all my contacts when I switch platforms","isFullCredit":true},{"lineNumber":1837,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1838,"author":{"gitId":"jeffreygohkw"},"content":"|`* *` |user who values privacy |be able to to choose and modify which contacts and what information are to be displayed |hide information I do not want to share from others","isFullCredit":true},{"lineNumber":1839,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1840,"author":{"gitId":"Esilocke"},"content":"|`* *` |cautious user |be able to back up my address book data | retrieve my back up data in the event I make breaking changes to my actual address book and there is no way of undoing them","isFullCredit":true},{"lineNumber":1841,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"|`* *` |user with poor eyesight |be able to increase the font size | use the application without straining my eyes","isFullCredit":true},{"lineNumber":1843,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"|`* *` |forgetful user |be able to see who is assigned to a task | find my contacts who are in charge more quickly","isFullCredit":true},{"lineNumber":1845,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1846,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |lazy user |have an easy way to add a person with his full details into my address book |add new contacts quickly","isFullCredit":true},{"lineNumber":1847,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1848,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user who values aesthetics |be able to customize my layout |display self-identity, and use a layout that I like","isFullCredit":true},{"lineNumber":1849,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1850,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |have the ability to add a short description to my contacts |add more information about my contacts","isFullCredit":true},{"lineNumber":1851,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"|`*` |user |be able to mark my favourite contacts |find them more easily","isFullCredit":true},{"lineNumber":1853,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":"|`*` |long-time user |be able to access shortcut commands |use the address book more efficiently","isFullCredit":true},{"lineNumber":1855,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1856,"author":{"gitId":"jeffreygohkw"},"content":"|`*` |user |be able to update the address book application easily when new updates are published |continue using the address book easily with any newly added features","isFullCredit":true},{"lineNumber":1857,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1858,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1859,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1860,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1861,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1862,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","isFullCredit":true},{"lineNumber":1863,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1864,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise)","isFullCredit":true},{"lineNumber":1865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1866,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Delete person","isFullCredit":true},{"lineNumber":1868,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1869,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1870,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1871,"author":{"gitId":"-"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1872,"author":{"gitId":"-"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1873,"author":{"gitId":"-"},"content":"3. User requests to delete a specific person in the list","isFullCredit":true},{"lineNumber":1874,"author":{"gitId":"-"},"content":"4. AddressBook deletes the person","isFullCredit":true},{"lineNumber":1875,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1876,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1877,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1878,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1879,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1880,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1881,"author":{"gitId":"-"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1882,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1883,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1884,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1885,"author":{"gitId":"-"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1886,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1887,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1888,"author":{"gitId":"-"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1889,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1890,"author":{"gitId":"-"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1891,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Search for person","isFullCredit":true},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"1. User requests to search for a person with criteria","isFullCredit":true},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons who match the criteria","isFullCredit":true},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"* 2b. No such person was found.","isFullCredit":true},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook informs the user that no matching users were found.","isFullCredit":true},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Edit person","isFullCredit":true},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"1. User requests to list persons","isFullCredit":true},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"2. AddressBook shows a list of persons","isFullCredit":true},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":"3. User requests to change the details of a specific person in the list","isFullCredit":true},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"4. AddressBook changes the details of the specified person.","isFullCredit":true},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"5. AddressBook shows the new details of the person.","isFullCredit":true},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"* 3a. The given index is invalid.","isFullCredit":true},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":"** 3a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"* 3b. The specified detail to change is invalid.","isFullCredit":true},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"** 3b1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 2.","isFullCredit":true},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":"* 4a. The specified detail to change is exactly the same as the previous detail.","isFullCredit":true},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":"** 4a1. AddressBook informs the user that no change was made.","isFullCredit":true},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1957,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1958,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Undo/Redo by multiple steps","isFullCredit":true},{"lineNumber":1959,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1960,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1961,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1962,"author":{"gitId":"Esilocke"},"content":"1. User requests to undo/redo a specified number of steps","isFullCredit":true},{"lineNumber":1963,"author":{"gitId":"Esilocke"},"content":"2. AddressBook undos/redos the last X commands, where X was the number of commands to undo/redo","isFullCredit":true},{"lineNumber":1964,"author":{"gitId":"Esilocke"},"content":"3. AddressBook displays a success message","isFullCredit":true},{"lineNumber":1965,"author":{"gitId":"Esilocke"},"content":"4. AddressBook displays a list of all the commands that were undone/redone.","isFullCredit":true},{"lineNumber":1966,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1967,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1968,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1969,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1970,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1971,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1972,"author":{"gitId":"Esilocke"},"content":"* 2a. The number of commands entered were less than the specified number of undo commands.","isFullCredit":true},{"lineNumber":1973,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1974,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1975,"author":{"gitId":"Esilocke"},"content":"** 2a1. AddressBook undos all previous commands.","isFullCredit":true},{"lineNumber":1976,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1977,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3.","isFullCredit":true},{"lineNumber":1978,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1979,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1980,"author":{"gitId":"Esilocke"},"content":"* 2b. The number of commands entered were less than the specified number of redo commands.","isFullCredit":true},{"lineNumber":1981,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1982,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":1983,"author":{"gitId":"Esilocke"},"content":"** 2b1. AddressBook redos all previously undone commands.","isFullCredit":true},{"lineNumber":1984,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1985,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 3","isFullCredit":true},{"lineNumber":1986,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1987,"author":{"gitId":"Esilocke"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1988,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Use case: Sort","isFullCredit":true},{"lineNumber":1989,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1990,"author":{"gitId":"Esilocke"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1991,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1992,"author":{"gitId":"Esilocke"},"content":"1. User requests to sort by a criteria","isFullCredit":true},{"lineNumber":1993,"author":{"gitId":"Esilocke"},"content":"2. AddressBook sorts the contacts by the criteria","isFullCredit":true},{"lineNumber":1994,"author":{"gitId":"Esilocke"},"content":"3. AddressBook shows a success message.","isFullCredit":true},{"lineNumber":1995,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":1996,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1997,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1998,"author":{"gitId":"Esilocke"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1999,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":2000,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":2001,"author":{"gitId":"Esilocke"},"content":"* 2a. The list is empty.","isFullCredit":true},{"lineNumber":2002,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":2003,"author":{"gitId":"Esilocke"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":2004,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":2005,"author":{"gitId":"Esilocke"},"content":"* 1a. The given criteria is invalid.","isFullCredit":true},{"lineNumber":2006,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":2007,"author":{"gitId":"Esilocke"},"content":"[none]","isFullCredit":true},{"lineNumber":2008,"author":{"gitId":"Esilocke"},"content":"** 1a1. AddressBook shows an error message.","isFullCredit":true},{"lineNumber":2009,"author":{"gitId":"Esilocke"},"content":"+","isFullCredit":true},{"lineNumber":2010,"author":{"gitId":"Esilocke"},"content":"Use case resumes at step 1.","isFullCredit":true},{"lineNumber":2011,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2012,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":2013,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","isFullCredit":true},{"lineNumber":2014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2015,"author":{"gitId":"-"},"content":". Should work on any link:#mainstream-os[mainstream OS] as long as it has Java `1.8.0_60` or higher installed.","isFullCredit":true},{"lineNumber":2016,"author":{"gitId":"-"},"content":". Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.","isFullCredit":true},{"lineNumber":2017,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","isFullCredit":true},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":". Feature sets are to be rolled out on a regular weekly basis, following the proper forking workflow procedure.","isFullCredit":true},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":". The application should be intuitive the target users: students (and professionals) who prefer typing over using the mouse.","isFullCredit":true},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":". Future versions of the application should be backwards compatible with data saved in versions after v1.0.","isFullCredit":true},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":". The application is not required to handle physical printing.","isFullCredit":true},{"lineNumber":2022,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2023,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":2024,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":2025,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2026,"author":{"gitId":"-"},"content":"[[mainstream-os]]","isFullCredit":true},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Mainstream OS","isFullCredit":true},{"lineNumber":2028,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2029,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":2030,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","isFullCredit":true},{"lineNumber":2031,"author":{"gitId":"-"},"content":"....","isFullCredit":true},{"lineNumber":2032,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"[[backwards-compatible]]","isFullCredit":true},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"Backwards Compatible","isFullCredit":true},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"....","isFullCredit":true},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"In the context of this project, backwards compatible save data refers to the ability for multiple versions of this application to use the same saved data.","isFullCredit":true},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"....","isFullCredit":true},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2040,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":240,"jeffreygohkw":601,"Esilocke":296,"-":903}},{"path":"docs/UserGuide.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Address++ - User Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":experimental:","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//tag::introduction[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d About","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"After reading this user guide, you should be more familiar with how Address++ can be used to maintain your contacts and tasks. +","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"No technical knowledge is required when running the application, although basic knowledge of installation is required to install the prerequisite libraries for Address++ (Java). +","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"//end::introduction[]","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Getting Started","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":". Download the latest `addressbook.jar` link:{repoURL}/releases[here].","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":". Copy the file to the folder you want to use as the home folder for your Address++.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":". Double-click the file to start the app. The GUI should appear in a few seconds.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":". Type the command in the command box and press kbd:[Enter] to execute it. +","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"e.g. typing *`help`* and pressing kbd:[Enter] will open the help window.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":". Some example commands you can try:","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"* *`help`*: opens this page in a new window","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"* *`list`* : lists all contacts","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 r/This remark is a stub` :","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"adds a contact named `John Doe` to Address++.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"* **`delete`**`3` : deletes the 3rd contact shown in the current list","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* *`exit`* : exits the app","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":". Refer to the link:#features[Features] section below for details of each command.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"\u003d\u003d Features","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"*Command Format*","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"//tag::fontsize[]","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Changing Font Sizes","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"Are the font sizes too small or too big? Address++ allows you to change your font sizes at will. Here are three","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"ways of changing the font sizes:","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"**Option 1: Menu Font Size Buttons and Keyboard Shortcuts**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"**Option 3: Handtype command into CLI**:","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"image::FontSizeCLI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"* Increase Size Command: `fontsize increase`","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"* Decrease Size Command: `fs decrease`","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"* Reset Size Command: `fontsize reset`","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"* `fontsize` can be replaced with `fs` for faster input. +","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"//end::fontsize[]","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Viewing help : `help`","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"If you have trouble figuring out how to do something, or would like to find out about more features, you can click","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"on the **help** menu button. You can also enter the command `help` to access the help window.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"image::HelpButtonUI.png[width\u003d\"540\"]","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"Format: `help` +","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[F1].","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"// tag::addprivacy[]","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"// tag::avatar[]","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Adding a person: `add`","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"You can use the `add` command to add new people to your address book.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input.","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"* A person can have any number of tags (including 0) +","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* The `EMAIL` should be in the format address@email.domain +","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":"* You can set a person\u0027s `Name`, `Phone`, `Email`, `Address`, `Remark` and `Avatar`, to be private by placing a `p` in front of the prefix. +","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"* As of version v1.5, the avatar fields accepts all URLs, and filenames with the prefix \"file:\"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"You made a new friend John Doe, and want to save him into Address++. You could type the following command to add his details:","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 b/11-11-1995 r/Likes panda bears","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"v/https://helloworld.world/image.png`","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"You meet Ima Hidearu, another one of your group members, but you do not know anything about him other than his name.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" Nevertheless, you are still able to add him into Address++:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add n/Ima Hidearu r/secretive`","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 3** +","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"Sometimes, you may wish to keep some fields private (i.e. not reveal them in the application). You can use the private","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"option while typing in your command:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add pn/Neville Shorttop pp/46492787 pe/nevilleS@gmail.com pa/Gryphon Gate pr/A true hero` +","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"**Note:** you do not have to set all fields as private, and you can choose which specific fields you want to set as private.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"//end::avatar[]","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"//end::addprivacy[]","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"//tag::addtask[]","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a task: `add task/` (Since V1.2)","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"You can use the `add task/` command to add new tasks to your address book. This allows you to keep track of your","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"assignments and project objectives.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"Format: `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"`add` can be replaced by `a` for faster input.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"* A task priority must be a positive integer from 0 to 5 inclusive, with 5 being the highest priority +","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"* Adding a task with a priority of 0 is the same as not adding a priority. Only priority level above 1 will be displayed in the User Interface +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"* Newly added tasks are marked as incomplete by default.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"**Examples**:","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"You are assigned the task of writing a 1500-word essay that is due in 3 weeks. You decide to add this","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"task into Address++.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Essay d/Write a 1500-word essay on philosophical thinking t/3 weeks later p/4`","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"You are required to submit at least one forum post to the school forums each week. To remind yourself of this task,","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"you add it into Address++.","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `add task/ n/Weekly forum post p/1`","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"// end::addtask[]","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"// tag::addtag[]","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Adding a tag to persons : `add tag/` (Since V1.2)","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"You can use the `add tag/` command to add tag for multiple persons in the address book. For example, you may wish to add the tag `friends` to the first two persons in the address book. +","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"`add tag/` can be replaced by `a tag/` for faster input. +","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"Format: `add tag/ INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":"* You can add the tag of the person at the specific `INDEX`. +","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":"* The index refers to the index number shown in the most recent listing. +","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ... +","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"* If you don not key in any indexes, `add tag/` will add the tag to all contacts in the address book.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add tag `friends` to the 1st and 2nd persons in the address book. You can use `list` to show all the contacts in the address book first,","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"then use the `addtag` command to achieve it.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ 1 2 t/friends` +","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"Suppose you want to add a common tag to all the persons in the address book. You can type in the following command:","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003e\u003e `add tag/ t/acquaintance` +","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"image::AddTagCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"_Figure 3.5.1 : AddTagCommand_","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"// end::addtag[]","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Listing all persons : `list`","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"Need a quick overview of what needs to be done? You can use the `list` command to quickly show all your contacts and tasks in the address book. +","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"`list` can be replaced by `l` for faster input. +","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"Format: `list` +","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":"// tag::editprivacy[]","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit`","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":"You can use the `edit` command to quickly fix mistakes in your entries, or add/remove details in your contacts. You may wish to edit your contacts when they change their phone numbers, for example. +","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"* You must provide at least one field to edit for each command.","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":"* When editing tags, the existing tags of the person will be removed. This means that you cannot cumulatively add tags using multiple `edit` commands.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"* You can remove all the person\u0027s tags by typing `t/` without specifying any tags after it.","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"* A private field will not be modified by the Edit command.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command containing only private fields will result in a error message.","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":"* An Edit command with both private and public fields will only modify the public fields.","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"**Examples**:","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":"Your friend John Doe has changed his email. You decide to update his entry in Address++ to reflect this change.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 1 p/91234567 e/johndoe@example.com`","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"Your friend Betsy is no longer taking part in the same project as you, and has changed her phone number to a new one","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":"that you are not aware of. You decide to update her entry in Address++ accordingly.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 2 p/ t/`","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"// end::editprivacy[]","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"// tag::edittask[]","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Editing a person : `edit task/` (Since V1.2)","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"You can use the `edit task/` command to quickly fix mistakes in your entries, or add/remove details in your tasks. You may wish to edit your tasks when their requirements change, for example. +","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"`edit` can be replaced by `e` for faster input. +","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":"Format: `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the last listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"* At least one of the optional fields must be provided.","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"You had previously added a task reminding you to write a 1500-word essay. However you receive notification that the word requirement","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"is now 1800 words instead. You edit the task to reflect this change.","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 2 d/1800 words essay`","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"One of your assignments has been pushed back and is no longer as urgent as before. You edit the task to reflect this change.","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit task/ 4 deadline/2 months later p/2`","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"// end::edittask[]","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"// tag::edittag[]","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Renaming existing tags : `edit tag/` (Since v1.2)","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"You can use `edit tag/` to rename one existing tag. For example, you may wish to promote all existing \"acquaintances\" into \"friends\", or change all \"CS2103\" project mates to \"CS2101\" project mates instead. +","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"`edit tag/` can be replaced by `et` for faster input. +","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Format: `edit tag/ OLDTAGNAME NEWTAGNAME` +","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"* The two tag names must be different.","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"* This command will not work if none of your contacts have a tag with the `OLDTAGNAME` value.","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:**:","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"You have finished a project, and have become good friends with your project mates.","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"You decide to promote all your project mates into friends.","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit tag/ project friends`","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"// end::edittag[]","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"// tag::changeprivacy[]","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy of a person\u0027s details : `changeprivacy`(Since V1.3)","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":"You can use the `changeprivacy` command to set the privacy settings for each field of an existing `Person` in the address book, which allows you to choose specifically what information will be displayed. +","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":"`changeprivacy` can be replaced by `cp` for faster input. +","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"charlesgoh"},"content":"Format: `changeprivacy INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR]`","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":"* This command allows you to change the privacy settings for the person at the specified `INDEX`. The index refers to the index number shown in the last person listing. The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":"* You must provide at least one of the optional fields.","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"* You can only provide `true` or `false` as inputs after each prefix.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `false`, you will set the privacy of that field for that person to be public. The data in that field will be visible in the UI.","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":"* If you choose to input `true`, you will set the privacy of that field for that person to be private. The data in that field cannot be modified and will not be visible in the UI.","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":"* Fields that do not originally contain any data will still remain empty after changing their privacy.","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":"* If you do not add a prefix for the field in the command, that field will keep its original privacy setting.","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":"You are meeting some new groupmates for your upcoming project and you are not too comfortable with exposing your family\u0027s particulars. +","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":"You decide to hide your family\u0027s phone number, email and home address by setting them to private. +","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `changeprivacy 1 p/true e/true a/true`","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":"// end::changeprivacy[]","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":"// tag::privacylevel[]","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Changing the Privacy Level of the address book : `privacylevel`(Since V1.5)","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":"Changing a person\u0027s privacy just to reveal their data or to make a person fully confidential may be time-consuming. If you would like to view all the data hidden by private fields easily, or completely hide a person with private fields, you can use this command to change the Privacy Level of the address book. +","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":"At level 1, all data, regardless of whether they are set to be private or public, can be viewed. +","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":"At level 2, private fields will have their data hidden by a string, such as `\u003cPrivate Phone\u003e`. +","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":"At level 3, any person containing at least one private field will be completely hidden in the address book. +","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"`privacylevel` can be replaced by `pl` for faster input. +","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"Format: `privacylevel LEVEL`","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":"* Address++ always launches in privacy level 2.","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":"* The `LEVEL` that you input can only contain the values 1, 2, or 3.","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":"* This does not change the actual privacy setting of each field, thus, changing the privacy level to 1 does not make any of the private fields public.","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":"** Thus, even if you have set the address book to be privacy level 1, you cannot edit a field that is set as private without setting it back to public.","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":"** Similarly, since a person is completely hidden in privacy level 3, you will have to set the privacy level back to 2 or 1 to be able to modify that person.","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:**:","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":"You have an address book full of various contacts with private fields, however, now you need to access the email addresses of all your contacts to ask them for help in your upcoming survey. +","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"You decide to use the privacylevel command to reveal all you contacts\u0027 hidden data.","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 1`","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"You wish to completely hide some of your confidential contacts from view, but your address book is too large, and you do not want to have to individually set every field for every confidential person to be private. +","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":"Using the privacylevel command, you set each contact with any private field to be hidden in the address book. +","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `privacylevel 3`","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"// end::privacylevel[]","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"// tag::favourite[]","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Favouriting persons : `favourite` (since V1.3)","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"You can use `favourite` command to make persons in the address book become your favourite contacts. For example, you may wish to set your girlfriend as your favourite contact. You will see a heart png next to your girlfriend\u0027s name","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"once you successfully set her as your favourite contact. +","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"`favourite` can be replaced by `fav` for faster input. +","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"Format: `favourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"* You can set a person to be the favourite person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"* You will see a heart shape next to your favourite persons.","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"Suppose you want to set the 2nd person in the address book to be your favourite contact. You should `list` all the persons first, then use `favourite` command to achieve it.","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 2` +","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to set `Betsy Brandt` as your favourite contact.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `favourite` her.","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Betsy` +","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `favourite 1` +","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"image::FavouriteCommandBeforeAndAfter.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"_Figure 3.12.1 : FavouriteCommand_","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"// end::favourite[]","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"// tag::showfavourite[]","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all favourite persons : `showfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"You can use the `showfavourite` command to quickly show all your favourite contacts in the address book. +","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"`showfavourite` can be replaced by `sfav` for faster input. +","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"Format: `showfavourite` +","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"* `showfavourite` command: It will return an empty list if there is no favourite persons.","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"image::ShowFavouriteCommand.png[width\u003d\"250\"]","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"_Figure 3.13.1 : ShowFavouriteCommand_","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"// end::showfavourite[]","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Locating persons by name : `find`","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"You can use the `find` command to quickly filter out contacts, or tasks who match your criteria. For example, you may wish to find all the tasks marked with the highest priority, or all your contacts who have a certain family name. +","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"Format: `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"*Things To Note*","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"* Only the names will be searched","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"You would like to find all the people whose name contains the word \"David\". You first use `list` to show all your contacts,","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the contacts named \"David\".","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David` +","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find people whose name contain the word \"David\" or \"Joe\".","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find David Joe` +","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"// tag::findtask[]","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Finding a task : `find task/` (Since V1.3)","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"You can use the `find task/` command to quickly find tasks that match your criteria, as well as tasks that have a certain level of urgency. +","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"Furthermore, you can choose to only retrieve tasks that are either complete, or still in progress. +","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"`find` can be replaced by `f` for faster input. +","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Format: `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Things To Note*","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"* Both the name and the description will be searched","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"-"},"content":"* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"* *You must include at least 1 search keyword*, in order to filter the results by their priority, and whether or not it is completed.","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"* The `PRIORITY` must be an integer from 1 to 5, inclusive. If the priority search is included, all tasks that have a priority at least that of the specified priority will matced.","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"* `STATE` must be either `true` or `false`. If it is `true`, you will only see tasks that have been marked as complete, and if it is `false, you will only see tasks that are not complete, in addition to all other search criteria.","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"**Examples Scenario:** +","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"You would like to find all the tasks related to \"Report\". You first use `list` to show all your tasks,","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"then use `find` to find all the tasks related to \"Report\".","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report` +","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"Additionally, you would also like to find tasks that have a \"High\" or \"Highest\" priority.","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4` +","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Furthermore, as you have several tasks related to \"Report\" that are already complete, you only want to see the tasks that are still not done.","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ report p/4 done/false` +","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"// end::findtask[]","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"-"},"content":"// tag::showtag[]","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing all tags : `showtag` (Since V1.5)","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"You can use the `showtag` command to quickly show all tags in the address book. Sometimes you may forget `tags` that you have added a few weeks ago. You may use this command to help you. +","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"-"},"content":"`showtag` can be replaced by `stag` for faster input. +","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"-"},"content":"Format: `showtag` +","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"-"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"-"},"content":"* `showtag` command: It will return an empty list if there is no tags in the address book.","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"-"},"content":"* You may want to use `showtag` command to help you recall all the `tags` in the address book before you try to use `findtag` to find persons.","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"// end::showtag[]","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"-"},"content":"// tag::findtag[]","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Locating persons by tag : `find tag/` (Since V1.4)","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"-"},"content":"You can use the `find tag/` command to quickly filter out contacts who match your criteria. For example, you may wish to find contacts who are your `classmates`. +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"-"},"content":"If you want to find contacts who are your `classmates` but not your `friends`, you just need to add `/` in front of the `friends`. +","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"-"},"content":"`find tag/` can be replaced by `f tag/` for faster input. +","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"-"},"content":"Format: `find tag/ KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"-"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"-"},"content":"* The search is not case insensitive. e.g `friends` will match `FRIENDS`","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `friends classmates` will match `classmates friends`","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"-"},"content":"* Only the tag is searched for persons.","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"-"},"content":"* Only full words will be matched. e.g. `friend` will not match `friends`","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"-"},"content":"* There is no space between `/` and tag name. e.g. `/ friends` will not match `/friends`.","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"Suppose you want to find contatcs with tag `friends` or `colleagues`, you can just key in the following command.","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends colleagues`","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"Suppose you want to find contacts without tag `frineds`, you can key in the following command.","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ /friends`","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"-"},"content":"**Example Scenario 3:** +","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"Suppose you want to find contacts with tag `friends` but without `colleagues`, you can key in the following command.","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"\u003e\u003e `find tag/ friends /colleagues`","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::FindTagCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"_Figure 3.17.1 : FindTagCommand_","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"// end::findtag[]","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a person : `delete`","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"You can use the `delete` command to remove contacts from the address book. The `delete` command will help you clean up contacts who you may not wish to associate with anymore. +","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"`delete` can be replaced by `d` for faster input. +","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Format: `delete INDEX` +","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"* Deletes the person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first person from your contacts.","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1`","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":"You wish to delete \"Maribel Edelweiss\" from your contacts. However you have many contacts, and are not sure where Maribel is.","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"You thus use `find` to find contacts who are named \"Maribel\", then delete Maribel Edelweiss accordingly.","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find Maribel` +","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 3`","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"// tag::deletetask[]","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a task : `delete task/` (Since V1.2)","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"You can use the `delete task/` command to remove tasks from the address book. The `delete task/` command will help you clean up obsolete or completed tasks. +","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"`delete task/` can be replaced by `d task/` for faster input. +","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Format: `delete task/ INDEX` +","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"* Deletes the task at the specified `INDEX`.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent task listing.","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":"You wish to delete the first task.","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 1`","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"You wish to delete a task named \"1500-word Essay\". However you have many tasks, and are not sure where it is.","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"You thus use `find task/` to find tasks related to \"Essays\", before using `delete task/` to delete \"1500-word Essay\" accordingly.","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `find task/ Essay` +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 3`","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"// end::deletetask[]","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"// tag::deletetag[]","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Deleting a tag of persons : `delete tag/` (Since V1.2)","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"You can use `delete tag/` to delete the tag of multiple persons from the address book. +","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"`delete tag/` can be replaced by `d tag/` for faster input. +","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Format: `delete tag/ INDEX... t/[TAG]` +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"* You can delete the tag of the person at the specific `INDEX`.","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"* If you do not key in any index, delete tag/ will delete the tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":"Suppose you want to delete `classmates` tag for the first two persons in the address book, you can `list` all the persons first, then","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"use the `delete tag/` command to achieve.","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ 1 2 t/friends` +","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"-"},"content":"Suppose you want to delete `friends` tag from all contacts in the address book.","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"\u003e\u003e `delete tag/ t/friends` +","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"-"},"content":"image::DeleTagCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"-"},"content":"_Figure 3.20.1 : DeleteTagCommand_","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::deletetag[]","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Sorting your contact list and tasks : `sort` (Since V1.1)","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":"Sort your contacts or tasks by using the `sort` command +","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"`sort` can be replaced with `so` for faster input. +","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":"Format: `sort LIST FIELD ORDER` +","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your contacts by any field in either ascending or descending order","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"* Allows you to sort your tasks by deadline or by priority in ascending or descending order","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for person contacts: NAME, PHONE, EMAIL, ADDRESS, REMARK, AVATAR.","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":"* Field parameters for tasks: DEADLINE, PRIORITY.","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"jeffreygohkw"},"content":"* Order parameters are limited to the following fields: ASC, DESC.","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":"* You can undo this command if you want to revert to the pre-sort ordering of contacts","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":"You have many contacts on Address++. You decide to make it neater by sorting your contacts","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":"by name in ascending order:","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort person name asc`","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":"You add a few tasks of different priorities. You decide to sort the tasks so you can see","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":"the higher priority tasks on the top of the list:","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `sort task priority desc`","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":"//end::sort[]","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":"//tag::backup[]","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Backing up your data : `backup` (Since V1.2)","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":"You can backup your saved data on Address++ by using the `backup` command. +","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":"Format: `backup [FILENAME]` +","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":"`backup` can be replaced with `bk` for faster input. +","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":"This allows you to backup your saved data on Address++ in another file.","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario**: +","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":"You decide to backup your data just in case you accidentally make changes that","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":"cannot be undone. You type the following code:","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":"`backup filename.xml`","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":"The file will then be saved in the same directory location as your `JAR` application file","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":"//end::backup[]","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":"//tag::password[]","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Protecting your data : `lock` `unlock` (Since V1.5)","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":"Worried about security? Address++ allows your to protect your data with a password.","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":"Using the `lock` and `unlock` commands, you can toggle between security modes. +","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":"Locked address books only allow viewing of data. If anyone attempts to tamper with","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"your data, they will be greeted with this error:","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":"image::LockedRestriction.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":"Format for `lock` Command: `lock pw/[PASSWORD]` +","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":"`lock` can be replaced with `lk` for faster input. +","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":"Format for `unlock` Command: `unlock pw/[PASSWORD]` +","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":"`unlock` can be replaced with `ul` for faster input. +","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"The default password is `password`","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":"You have just finished editing your contacts on Address++ and you decide to have a break away from","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"your computer. You decide to lock Address++ using the following command:","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `lock pw/password`","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 2** +","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":"When you return to your computer, you decide to continue adding contacts in Address++.","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"charlesgoh"},"content":"To unlock the Address++ application, you use the following command:","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `unlock pw/password`","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing your password : `changepassword` (Since V1.5)","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"charlesgoh"},"content":"Want to choose a better password? The `changepassword` command allows you to change your","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"charlesgoh"},"content":"password whenever you want, provided you know the old password.","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"charlesgoh"},"content":"The default password is \u0027password\u0027","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"charlesgoh"},"content":"image::ChangePasswordImages.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"charlesgoh"},"content":"Format: `changepassword pw/[PASSWORD] np/[NEWPASSWORD] cfp/[CONFIRMPASSWORD]` +","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"charlesgoh"},"content":"**`changepassword` can be replaced with `cpw` for faster input.** +","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"charlesgoh"},"content":"**Example Scenarios**:","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"charlesgoh"},"content":"**Example Scenario 1** +","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"charlesgoh"},"content":"You open Address++ for the first time. After reading the user guide, you realize","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"charlesgoh"},"content":"that the default password (\"password\") is not good enough. You decide to make a new","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"charlesgoh"},"content":"one with the following command:","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"charlesgoh"},"content":"\u003e\u003e `changepassword pw/password np/newpassword cfp/newpassword`","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"charlesgoh"},"content":"//end::password[]","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a person : `select`","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"You can use `select` to pick out one contact, and look at it in greater detail. +","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":"Format: `select INDEX` +","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"The first person in your contacts has a very long address, and you want to see if it is correct.","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select 1` +","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"// tag::selecttask[]","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Selecting a task : `select task/` (Since V1.4)","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":"You can use `select task/` to pick out a task, and look at it in greater detail. +","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"`select` can be replaced by `s` for faster input. +","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"Format: `select task/ INDEX` +","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"The first task has a very long description, and you want to see it in full.","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `select task/ 1` +","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"// end::selecttask[]","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"jeffreygohkw"},"content":"// tag::locate[]","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Locating a person\u0027s address : `locate` (Since V1.4)","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"jeffreygohkw"},"content":"If you ever need to visit one of your contacts, you can use `locate` to choose a contact, and search for their address online using Google Maps. +","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"jeffreygohkw"},"content":"`locate` can be replaced by `loc` for faster input. +","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `locate INDEX` +","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where the second person in your address book lives. +","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 2` +","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"jeffreygohkw"},"content":"You wish to know where a specific person in your address book, Betsy, lives. +","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Betsy` +","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `locate 1` +","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses.","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address cannot be searched on Google Maps.","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"jeffreygohkw"},"content":"* A person with no address will open Google Maps, but it will not search for an address as there is no address to search for.","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing.","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"jeffreygohkw"},"content":"// end::locate[]","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"jeffreygohkw"},"content":"// tag::navigate[]","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Navigating from one address to another : `navigate` (Since V1.5)","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"jeffreygohkw"},"content":"Although `locate` shows you where a person\u0027s address is, it does not tell you how to get there. The `navigate` command will provide directions, with the help of Google Maps, on how to get from one address to another. +","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"jeffreygohkw"},"content":"`navigate` can be replaced by `nav` for faster input. +","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"jeffreygohkw"},"content":"Format (person): `navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"Esilocke"},"content":"You are planning to go to your friend Roy\u0027s house for their birthday party that afternoon, but you have just ended class at NUS. +","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"Esilocke"},"content":"You have never been to their house before, and you enlist the aid of Address++ to find the fastest route to their house. +","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `find Roy` +","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fa/NUS tp/1`","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"jeffreygohkw"},"content":"After the birthday party, you have a group meeting scheduled for your project. You have this meeting schedules as your first task, and you seek help from Address++ to find a path from Roy\u0027s house to the group meeting. +","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate fp/1 tt/1`","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 3:** +","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"jeffreygohkw"},"content":"To conclude your long and busy day, you have to send off your sister at Changi Airport, who is going off on an exchange programme. +","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"jeffreygohkw"},"content":"Using the navigate command once again, you find an efficient route from the location of your group meeting to the airport. +","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `navigate ft/1 ta/Changi Airport`","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"jeffreygohkw"},"content":"* Depending on the stored value of the address, Google Maps may be unable to find the correct address or may display multiple addresses of the same name. +","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"jeffreygohkw"},"content":"** It is up to you to provide specific and valid addresses.","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"jeffreygohkw"},"content":"* A person with a private address or a person with no address cannot be navigated from or navigated to.","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"jeffreygohkw"},"content":"* A task with no address cannot be navigated from or navigated to.","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"jeffreygohkw"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"jeffreygohkw"},"content":"* The index *must be a positive integer* `1, 2, 3, ...` and must be within the range of people in the most recent listing.","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"jeffreygohkw"},"content":"* You may only input exactly one of the 3 prefixes from `fp/` `ft/` and `fa/` to indicate the address to navigate from, and exactly one of the 3 prefixes from `tp/` `tt/` and `ta/` to indicate the address to navigate to.","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"jeffreygohkw"},"content":"** If you input any less or any more than 1 of the 3 prefixes from each group, the command will fail.","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"jeffreygohkw"},"content":"** There is no need to match the type of prefixes. You can navigate with any combination of prefixes as long as there is only one prefix to indicate the address to navigate from and only one prefix to indicate the address to navigate to.","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"jeffreygohkw"},"content":"// end::navigate[]","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"// tag::setstate[]","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as complete : `setcomplete` (Since V1.5)","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":"Have you finally completed a task in the address book? You can use `setcomplete` to mark the specified task as complete. +","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"Esilocke"},"content":"`setcomplete` can be replaced by `stc` for faster input. +","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":"Format: `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as completed.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"You have finally completed a task that involves writing a 1500-word essay.","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e\u003e `setcomplete 6` +","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Marking tasks as incomplete : `setincomplete` (Since V1.5)","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"Did you accidentally mark a task as completed? You can use `setincomplete` to mark the specified task as incomplete. +","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"`setincomplete` can be replaced by `sti` for faster input. +","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"Format: `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":"* Marks the task at the specified `INDEX` as incomplete.","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"You realised that you had marked a task as complete, even though it is still in progress.","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"Furthermore you are not sure when you had marked it as complete. However, you are still able to safely mark the task as being","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":"in progress.","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `setincomplete 7`","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"// end::setstate[]","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"// tag::assignDismiss[]","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Assigning contacts to task : `assign` (Since V1.4)","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"You can use `assign` to assign contacts to an ongoing task. You may wish to use `assign` when collaborating with others for projects, for example. +","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"`assign` can be replaced by `as` for faster input. +","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"Format: `assign PEOPLEINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"You have created a new task to complete a paper model. However you are unable to do it by yourself, and require the help of some of your friends.","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `assign 1 5 7 to/5`","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Dismissing contacts from task : `dismiss` (Since V1.4)","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"charlesgoh"},"content":"You can use `dismiss` to remove assignment from tasks. You may wish to use `dismiss` when a contact is no longer in charge of a task, for example. +","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"`dismiss` can be replaced by `ds` for faster input. +","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Format: `dismiss PEOPLEINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":"* The PEOPLEINDEX refers to the index numbers shown in the most recent *person* listing.","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"* The TASKINDEX refers to the index number shown in the most recent *task* listing.","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":"* At least 1 or more PEOPLEINDEX must be present in the command.","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"* PERSONINDEX and TASKINDEX *must be positive integers* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"One of the tasks that you had created previously with many people assigned turned out to be easier than expected.","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"You believe that this task could do with less manpower and would like to remove some of the previously assigned contacts from this task.","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `dismiss 1 5 7 from/5`","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Viewing contacts assigned to a task : `viewassign` (Since V1.5)","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"You can use `viewassign` to see who is assigned to a particular task. You may wish to use `viewassign` when you want to contact only the people who are assigned to a particular task, for example. +","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"`viewassign` can be replaced by `va` for faster input. +","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"Esilocke"},"content":"Format: `viewassign INDEX` +","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"* The index *must be a positive integer* `1, 2, 3, ...`","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"2 weeks after assigning some of your contacts to a particular task, you decide to obtain a status report about their current progress. +","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"Esilocke"},"content":"However you have forgotten who you have assigned to that task. You thus use `viewassign` to see who is assigned to that task.","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `viewassign 4`","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"Esilocke"},"content":"// end::assignDismiss[]","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"jeffreygohkw"},"content":"// tag::theme[]","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Changing the Address Book\u0027s theme : `theme` (Since V1.5)","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"jeffreygohkw"},"content":"Perhaps you may not be too fond of the existing style of the address book and you want to have something fresh. The `theme` command changes the address book between two themes, `light` and `dark`.","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"jeffreygohkw"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"jeffreygohkw"},"content":"`theme` can be replaced by `th` for faster input. +","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"jeffreygohkw"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"jeffreygohkw"},"content":"It is late at night and the light theme is a little too brightly coloured. Preferring a darker theme, you can choose to input the theme command to make the theme into a darker colour. +","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"jeffreygohkw"},"content":"\u003e\u003e `theme dark`","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"jeffreygohkw"},"content":"Format: `theme` + THEME","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"jeffreygohkw"},"content":"* There are only two themes as of v1.5, light and dark. More themes of different colours could be added in a future release.","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"jeffreygohkw"},"content":"// end::theme[]","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Listing entered commands : `history`","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"Lists all the commands that you have entered in reverse chronological order. +","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"-"},"content":"`history` can be replaced by `h` for faster input. +","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"Format: `history` +","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"// tag::undo[]","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Undoing previous command : `undo`","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Did you make a mistake somewhere? `undo` restores the address book to the state before the previous _undoable_ command was executed. +","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"`undo` can be replaced by `u` for faster input. +","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"Format: `undo` +","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Undoable commands: Commands that modify the address book\u0027s content (`add`, `delete`, `edit` and `clear`).","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts.","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"Esilocke"},"content":"You realise this immediately and undo your mistake.","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"You have accidentally deleted one of your contacts. Furthermore, not knowing this, you made a mistake when editing another person\u0027s name.","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarisa Liselote`","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"Esilocke"},"content":"You realise that something is amiss, and find out that you made not one, but two mistakes. Nevertheless you still manage to recover your contact by using multiple `undo` commands.","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"Esilocke"},"content":"Finally, you edit Clarissa\u0027s name correctly.","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `edit 5 n/Clarissa Liselotte`","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"Esilocke"},"content":"// end::undo[]","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"-"},"content":"// tag::unfavourite[]","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Unfavouriting persons : `unfavourite` (since V1.3)","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"-"},"content":"You can use `unfavourite` command to set your previous favourite persons become the normal persons. For example, +","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"-"},"content":"after you break up with your girlfriend, you may wish to set your girlfriend back to normal person. +","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"-"},"content":"`unfavourite` can be replaced by `unfav` for faster input. +","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"-"},"content":"Format: `unfavourite INDEX [MORE INDEX]` +","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"-"},"content":"**Things To Note** +","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"-"},"content":"* You can unfavourites the person at the specified `INDEX`.","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"-"},"content":"* The index refers to the index number shown in the most recent listing.","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"-"},"content":"* The index you key in *must be a positive integer* 1, 2, 3, ...","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"-"},"content":"* The heart png will disappear once you `unfavourite` the person.","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"-"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"-"},"content":"Suppose you do not want to the 2nd person in the address book to be your favourite contact anymore, you should `list` all the persons first, then use `unfavourite` command to achieve it.","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"-"},"content":"\u003e\u003e `list` +","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 2` +","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"-"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"-"},"content":"Suppose you have `Betsy Brandt, Betsy Devos and Betsy Ross` in your address book. You want to `unfavourite` `Betsy Brandt` in the address book.","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"-"},"content":"Instead of `listing` all the contacts, you can `find` all the `Besty` first, then `unfavourite` `Betsy Brandt`.","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"-"},"content":"\u003e\u003e `find Betsy` +","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"-"},"content":"\u003e\u003e `unfavourite 1` +","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"-"},"content":"image::UnfavouriteCommand.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"-"},"content":"_Figure 3.37.1 : UnfavouriteCommand_","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"-"},"content":"// end::unfavourite[]","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"Esilocke"},"content":"// tag::redo[]","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Redoing the previously undone command : `redo`","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"Esilocke"},"content":"Perhaps an `undo` was not necessary. `redo` reverses the most recent `undo` command. +","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"`redo` can be replaced by `r` for faster input. +","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"-"},"content":"Format: `redo` +","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts.","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo your mistake.","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"Esilocke"},"content":"However you realise that you have deleted the correct person. Instead of typing `delete 1`, you choose to `redo` your command instead.","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"You have deleted one of your contacts, as well as two of your tasks.","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete 1` +","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 5` +","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `delete task/ 8` +","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"You think that you made a mistake, and undo all your previous commands.","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo` +","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `undo`","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"Esilocke"},"content":"However you realise that no mistake was made. Instead of typing your commands again, you choose to `redo` your commands instead.","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo` +","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `redo`","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"Esilocke"},"content":"// end::redo[]","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"Esilocke"},"content":"// tag::clear[]","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Clearing all entries : `clear`","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to start fresh on a clean slate, you can use this command to clear all entries from the address book. +","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"Esilocke"},"content":"Additionally, if you clear only the contacts list or the task list, you can specify which type to clear in the command. +","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"`clear` can be replaced by `c` for faster input. +","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":"Format: `clear` +","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"Esilocke"},"content":"To clear only the contacts list, type `clear person/` +","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"Esilocke"},"content":"To clear only the tasks list, type `clear task/` +","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"**Things To Note**","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"* If both `person/` and `task` are specified, or if neither were specified, the `clear` command will delete all entries in the address book.","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"**Example Scenarios:** +","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 1:** +","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"Esilocke"},"content":"You have completed every task in your task list, and want to clean it up.","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear task/` +","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. However you would still like to keep smome of the tasks for further reference.","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear person/` +","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"**Example Scenario 2:** +","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"Esilocke"},"content":"You first start up Address++, and after getting used to how the app works, find that you do not need the initial sample data anymore. You would like to clear everything in Address++ to make space for your own contacts and tasks.","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"\u003e\u003e `clear` +","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"Esilocke"},"content":"// end::clear[]","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"jeffreygohkw"},"content":"// tag::open[]","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Opening a save file : `open`","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"jeffreygohkw"},"content":"Switching between address books is made easy with the `open` command, as it allows you can load different save files into the application. +","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"jeffreygohkw"},"content":"You can choose which .xml file to open from the pop up window that appears upon executing this command. +","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"jeffreygohkw"},"content":"`open` can be replaced by `o` for faster input. +","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"jeffreygohkw"},"content":"Format `open`","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"jeffreygohkw"},"content":"// end::open[]","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"jeffreygohkw"},"content":"// tag::saveas[]","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Saving the data as a new save file : `save`","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"jeffreygohkw"},"content":"If you would like to save a copy of your data in a separate location or with a different name, the `save` command will allow you to do just that. +","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"jeffreygohkw"},"content":"You can choose what to name your save file and where to save it from the pop up window that appears upon executing this command. +","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"jeffreygohkw"},"content":"`save` can be replaced by `sa` for faster input. +","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"jeffreygohkw"},"content":"Format: `save`","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"jeffreygohkw"},"content":"// end::saveas[]","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Exiting the program : `exit`","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"jeffreygohkw"},"content":"Once you have finished using Address++, you may use this command to exit the program. +","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Format: `exit`","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"jeffreygohkw"},"content":"Alternatively, you may opt to use the keyboard shortcut kbd:[ALT]+kbd:[F4].","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"jeffreygohkw"},"content":"// tag::opensaveas[]","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving the data","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"jeffreygohkw"},"content":"Address book data is saved in the hard disk automatically after any command that changes the data. +","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"jeffreygohkw"},"content":"There is no need for you to save manually.","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"jeffreygohkw"},"content":"If you want to change the location of the save file, you can use the `save` command, click on `File -\u003e Save As` or use the keyboard shortcut kbd:[CTRL]+kbd:[S] and select the new location and file name for the save file in the pop-up window.","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"jeffreygohkw"},"content":"If you want to open a different save file, you can use the `open` command, click on `File -\u003e Open` or use the keyboard shortcut kbd:[CTRL]+kbd:[O] and select the new save file to use from the pop-up window.","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"jeffreygohkw"},"content":"// end::opensaveas[]","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. The Open command kbd:[CTRL]+kbd:[O] can also be used instead of manually overwriting the file if you wish to keep the original data file or store the new data file in a seperate location.","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d Command Summary and Cheat Sheet","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"Esilocke"},"content":"* *Add* : `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `add pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `add pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `add task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"e.g. `add task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `add tag/ [INDEX...] t/[TAG]` +","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"Esilocke"},"content":"e.g. `add tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `changeprivacy INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `changeprivacy 2 n/true p/false e/true a/false r/true`","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `privacylevel [LEVEL]` +","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"* *Clear persons* : `clear person/`","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"* *Clear tasks* : `clear task/`","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"Esilocke"},"content":"* *Delete person* : `delete INDEX` +","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"-"},"content":"e.g. `delete 3`","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `delete task/ INDEX` +","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"Esilocke"},"content":"e.g. `delete task/ 4`","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `delete tag/ [INDEX...] t/[TAG]` +","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"e.g. `delete tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"charlesgoh"},"content":"* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"-"},"content":"e.g. `edit 2 n/James Lee e/jameslee@example.com`","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `edit task/ INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"Esilocke"},"content":"e.g. `edit task/ 2 p/veryhigh`","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `edit tag/ TAGTOCHANGE NEWTAGNAME` +","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"e.g. `edit tag/ friends enemies`","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"-"},"content":"* *Favourite persons* :`favourite INDEX` +","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"-"},"content":"e.g. `favourite 1`","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"-"},"content":"* *Unfavourite persons* :`unfavourite INDEX` +","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"-"},"content":"e.g. `unfavourite 1`","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"-"},"content":"* *Show favourite list* :`showfavourite` +","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"-"},"content":"e.g. `showfavourite`","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"* *Find person* : `find KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"-"},"content":"e.g. `find James Jake`","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `find tag/ TAG [MORE_TAGS]` +","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"e.g. `find tag/ friends`","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `find task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY] [done/STATE]` +","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"e.g. `find task/ update p/high done/false`","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : `help`","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `list`","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"-"},"content":"* *List tags* : `showtag`","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `locate INDEX`","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navigate [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navigate fa/Tampines Mall ta/Sentosa","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"* *Select person* : `select INDEX` +","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"-"},"content":"e.g.`select 2`","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `select task/ INDEX` +","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"Esilocke"},"content":"e.g.`select task/ 2`","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"-"},"content":"* *Set task as complete* : `setcomplete INDEX` +","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"-"},"content":"e.g. `setcomplete 4`","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"-"},"content":"* *Set task as incomplete* : `setincomplete INDEX` +","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"-"},"content":"e.g. `setincomplete 5`","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"Esilocke"},"content":"* *Assign to task* : `assign PERSONINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"e.g. `assign 4 1 17 18 to/21`","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"Esilocke"},"content":"* *Dismiss from task* : `dismiss PERSONINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"Esilocke"},"content":"e.g. `dismiss 4 1 from/17`","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `viewassign INDEX` +","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"e.g. `viewassign 1`","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `theme THEME` +","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `theme light`","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"* *History* : `history`","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":"* *Undo* : `undo`","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"* *Redo* : `redo`","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `open`","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `save`","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : `exit`","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Command Shorthand Cheat Sheet","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"Esilocke"},"content":"* *Add* : `a n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `a n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"Esilocke"},"content":"* *Add person with private fields* : `a pn/NAME [pp/PHONE_NUMBER] [pe/EMAIL] [pa/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"Esilocke"},"content":"e.g. `a pn/James Ho pp/22224444 pe/jamesho@example.com pa/123, Clementi Rd, 1234665 r/Sleeps at 3am t/friend t/colleague`","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"* *Add task* : `a task/ n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"e.g. `a task/ n/Update Documentation d/Update documentations for V1.1 for CS2103T t/30/10/17 p/high a/NUS`","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"* *Add tag* : `a tag/ [INDEX...] t/[TAG]` +","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"Esilocke"},"content":"e.g. `a tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"jeffreygohkw"},"content":"* *Change a person\u0027s details\u0027 privacy* : `cp INDEX [n/TRUE or FALSE] [p/TRUE or FALSE] [e/TRUE or FALSE] [a/TRUE or FALSE] [r/TRUE or FALSE]` +","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `cp 2 n/true p/false e/true a/false r/true`","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"jeffreygohkw"},"content":"* *Changing the privacy level of the address book*: `pl [LEVEL]` +","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear all data* : `clear`","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear persons* : `c person`","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"jeffreygohkw"},"content":"* *Clear tasks* : `c task`","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"jeffreygohkw"},"content":"* *Delete person* : `d INDEX` +","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `d 3`","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"Esilocke"},"content":"* *Delete task* : `d task/ INDEX` +","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"Esilocke"},"content":"e.g. `d task/ 4`","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"* *Delete tag* : `d tag/ INDEX t/[TAG]` +","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"e.g. `d tag/ 1 2 t/friends`","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"jeffreygohkw"},"content":"* *Edit* : `e INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [r/REMARK] [t/TAG]...` +","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `e 2 n/James Lee e/jameslee@example.com`","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"* *Edit task* : `e task INDEX [n/NAME] [d/DESCRIPTION] [t/DEADLINE] [p/PRIORITY] [a/ADDRESS]` +","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"Esilocke"},"content":"e.g. `e task/ 2 p/veryhigh`","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"Esilocke"},"content":"* *Edit tag* : `e tag/ OLDTAGNAME NEWTAGNAME` +","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"Esilocke"},"content":"e.g. `e tag/ friends enemies`","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"jeffreygohkw"},"content":"* *Favourite persons* :`fav INDEX` +","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `fav 1`","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"jeffreygohkw"},"content":"* *Unfavourite persons* :`unfav INDEX` +","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `unfav 1`","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"jeffreygohkw"},"content":"* *Show favourite list* :`sfav` +","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sfav`","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"jeffreygohkw"},"content":"* *Find person* : `f KEYWORD [MORE_KEYWORDS]` +","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `f James Jake`","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"* *Find tag* : `f tag/ Tag [MORE_TAGS]` +","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"Esilocke"},"content":"e.g. `f tag/ friends`","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"* *Find task* : `f task/ KEYWORD [MORE_KEYWORDS] [p/PRIORITY]` +","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":"e.g. `f task/ update p/high`","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"jeffreygohkw"},"content":"* *List persons and tasks* : `l`","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"jeffreygohkw"},"content":"* *List tags* : `stag`","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"jeffreygohkw"},"content":"* *Locate a person\u0027s address* : `loc INDEX`","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"jeffreygohkw"},"content":"* *Navigating from one address to another* : ``navi [fp/INDEX] [ft/INDEX] [fa/ADDRESS] (Must have only one of three) [tp/INDEX] [tt/INDEX] [ta/ADDRESS] (Must have only one of three)` +","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"jeffreygohkw"},"content":"e.g. navi fa/Tampines Mall ta/Sentosa","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"jeffreygohkw"},"content":"* *Select person* : `s INDEX` +","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"jeffreygohkw"},"content":"e.g.`s 2`","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"* *Select task* : `s task/ INDEX` +","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"Esilocke"},"content":"e.g.`s task/ 2`","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as complete* : `stc INDEX` +","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `stc 4`","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"jeffreygohkw"},"content":"* *Set task as incomplete* : `sti INDEX` +","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `sti 5`","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"jeffreygohkw"},"content":"* *Assign to task* : `as PERSONINDEX... to/TASKINDEX` +","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `as 4 1 17 18 to/21`","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"jeffreygohkw"},"content":"* *Dismiss from task* : `ds PERSONINDEX... from/TASKINDEX` +","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `ds 4 1 from/17`","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"* *View contacts assigned to a task* : `va INDEX` +","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"e.g. `va 1`","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"jeffreygohkw"},"content":"* *Theme* : `th THEME` +","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"jeffreygohkw"},"content":"e.g. `th light`","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"jeffreygohkw"},"content":"* *History* : `h`","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"jeffreygohkw"},"content":"* *Undo* : `u`","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"jeffreygohkw"},"content":"* *Redo* : `r`","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : `o`","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : `sa`","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Keyboard Shortcuts","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"jeffreygohkw"},"content":"* *Exit* : kbd:[ALT]+kbd:[F4]","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"jeffreygohkw"},"content":"* *Help* : kbd:[F1]","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"jeffreygohkw"},"content":"* *Open* : kbd:[CTRL]+kbd:[O]","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"jeffreygohkw"},"content":"* *Save As* : kbd:[CTRL]+kbd:[S]","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"charlesgoh"},"content":"* *Increase Size:* kbd:[CTRL] + kbd:[W] (kbd:[CMD] + kbd:[W] on MacOS)","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"charlesgoh"},"content":"* *Decrease Size:* kbd:[CTRL] + kbd:[E] (kbd:[CMD] + kbd:[E] on MacOS)","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"charlesgoh"},"content":"* *Reset Size:* kbd:[CTRL] + kbd:[R] (kbd:[CMD] + kbd:[R] on MacOS)","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d v2.0 UI Concept","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"charlesgoh"},"content":"This is the concept design of our v2.0 end product. Actual design may vary.","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"charlesgoh"},"content":"image::v2UIMockup.png[width\u003d\"800\"]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":191,"jeffreygohkw":252,"Esilocke":662,"-":363}},{"path":"docs/team/JeffreyGoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Jeffrey Goh - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Project: Address++","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"Address++ is a desktop address book application that aims to help users manage their contacts and their time. It is primarily targeted at students with projects, although it may be used in a wide variety of other settings as well. Users will be able to interact with it using a Command Line Interface, and it has a Graphic User Interface created with JavaFX.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/jeffreygohkw.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/jeffreygohkw.md[Test code]]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Privacy of Fields","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior (Add and Edit Co-authored with Charles Goh)","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003daddprivacy]","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003deditprivacy]","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dchangeprivacy]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dprivacylevel]","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"Users may have contacts that they would like to keep confidential or those that they do not feel comfortable displaying in public. Instead of removing the contact from the address book, setting a field to private allows users to choose exactly what information they would like to display and what they would like to hide.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"In addition, a private name cannot be searched for, and a private address cannot be used in the locate and navigate commands to prevent users from finding out the value of the private field.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"Having a private field also doubles up as an extra layer of protection against unintentional modifications, as private fields cannot be edited without changing them back to public fields.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"It may be inconvenient for a user to set a person\u0027s fields to public and back to private every time they would like to have a peek at the data that was hidden, or to set a person\u0027s every field to private if they want to hide them. Thus, having a command to change the privacy level of the address book will make it much more convenient for users to access private information.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dprivacy]","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Locating a person\u0027s address","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dlocate]","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"While a person\u0027s phone and email address can be used directly, users often are unaware of where exactly their contacts\u0027 addresses are located in real life. The locate command aims to solve this problem by taking the address of a contact and searching for it on Google Maps. This allows the user to find out where exactly their contacts\u0027 addresses are located.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dlocate]","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Navigating from one address to another","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dnavigate]","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"Locating a contact does not tell users how to arrive at that particular contact\u0027s address. Furthermore, users may face the scenario where they have to travel and meet different groups and different contacts throughout the day. The Navigate command allows users to find out the most efficient path from one address to another with the aid of Google Maps.","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"Users are able to utilize the addresses attached to a person, as well as those attached to a task, in the navigate command. They can also manually input addresses in the custom line if they are looking for directions to or from an address that is not presently stored inside the address book. This greatly enhances the flexibility of the command, and allows users to use the command without having to add a dummy task or person to store new addresses beforehand.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dnavigate]","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Enhancement Added: Opening and Saving of the .xml save file","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopen]","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dsaveas]","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"include::../UserGuide.adoc[tag\u003dopensaveas]","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"Open and Save As will allow users to more easily manage their data. Open allows them to load their data from a .xml file, letting them easily work on multiple different address books. +","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"Save As allows users to save their address book data, letting it serve as backup or allowing them to be placed in a different location on the computer while still remaining operational. +","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"This also allows for easier transfers of save files between devices without having to manually drag and manage the save files to and from the folder where Address++ is located.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"It can even potentially allow for syncing save files between devices if external software like Dropbox is used.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"include::../DeveloperGuide.adoc[tag\u003dopensaveas]","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"---","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Other contributions","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":"* Add Menu Icons for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#10])","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"* Add Keyboard Shortcuts for Open, Save As, Exit and Help (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/10[#11], https://github.com/CS2103AUG2017-W09-B2/main/pull/101[#101])","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"* Modified SortCommand to be undoable, and wrote test cases for it (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/29[#29], https://github.com/CS2103AUG2017-W09-B2/main/pull/30[#30])","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":"* Created TaskAddress to store the address of tasks (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/129[#129], https://github.com/CS2103AUG2017-W09-B2/main/pull/132[#132])","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"* Added Travis, Coveralls and Appveyor links for Continuous Integration (Pull requests https://github.com/CS2103AUG2017-W09-B2/main/pull/4[#4], https://github.com/CS2103AUG2017-W09-B2/main/pull/22[#22])","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"* Performed Acceptance Testing for Team T16-B2 (Issue https://github.com/CS2103AUG2017-T16-B2/main/issues/102[#102])","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":"* Wrote some Manual Testing tests (Pull request https://github.com/CS2103AUG2017-W09-B2/main/pull/162[#162], https://github.com/CS2103AUG2017-W09-B2/main/pull/165[#165])","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":159}},{"path":"docs/team/KelvinLin.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"\u003d Lin Ziwen Kelvin - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: AddressBook++","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"Address++ is an application that keeps track of your contacts and your daily to-dos for you. It is targeted","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"at students who work on projects or assignments frequently, but it can also be used for other purposes.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/Esilocke.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/Esilocke.md[Test code]]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Edit Tag","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittag]","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"The user may find a need to change the name of a particular name. +","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"In the context of the target user, suppose that a user wishes to change the tag `CS2103Groupmates` to `friends`, after he has completed the module. +","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"The user would need to delete the tag from all users who are tagged with `CS2103Groupmates`, and add the tag `friends` to them one-by-one. `edittag` thus aims to make this process faster by allowing users to rename all instances of the tag from the address book.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"The EditTagCommand iterates through each person in the UniquePersonList, and replaces the old tag, if found, with the new tag.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Optional Data Input","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"Optional Data Input allows tasks and persons to have only one compulsory field, the name. All other fields in a person or task can be left unspecified, allowing for a greater range of inputs.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"We may not always have the opportunity to find contacts or tasks with complete information. +","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"This means that some contacts may not have an address, or email address, while some tasks may not have a deadline, or a description. Without Optional Data Input, the user would need to come up with random placeholder values for each prefix, which would greatly hinder user experience as the user would need to type in unnecessary values to satisfy the command format. +","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"Allowing optional data input thus lifts the restriction of making every field compulsory, and thus allows users to fill in a wider range of input.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"When a user does not fill in a prefix for a particular field, the parser will create an object corresponding to the missing field with a placeholder value.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"[source, java]","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"public Phone(String args) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ...","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"public boolean isValidPhone(String args) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (args.equals(PHONE_PLACEHOLDER_VALUE) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" ...","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"In addition, the isValid method is also updated to accept placeholder values as valid inputs.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Enhancement Added: Tasks Management","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003daddtask]","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dedittask]","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003ddeletetask]","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dfindtask]","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dselecttask]","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dsetstate]","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dassignDismiss]","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"include::../UserGuide.adoc[tag\u003dclear]","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"Our intended target audience are primarily NUS students, who are working on projects. In addition to managing their contact details, allowing users to manage their tasks would also greatly improve their user experience, as they would not need to keep track of their project deadlines separately.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"---","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dtask]","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"include::../DeveloperGuide.adoc[tag\u003dassignDismiss]","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d Other contributions","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"* Conducted internal acceptance testing [https://github.com/CS2103AUG2017-W09-B2/main/issues/155[Issue #155]]","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"* Conducted Acceptance Testing for other teams [https://github.com/CS2103AUG2017-F09-B1/main/issues/83[F09-B1]] [https://github.com/CS2103AUG2017-F09-B1/main/issues/82[F09-B1]]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"Esilocke":114}},{"path":"docs/team/charlesgoh.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"\u003d Charles Goh - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"ifdef::env-github,env-browser[:outfilesuffix: .adoc]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d Project: Address++","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"Address++ is a desktop address book application that aims to provide students and","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"professionals with an effective tool to help them manage their contacts and their time.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"This is a snapshot of our User Interface","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"image::Ui.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"My contributions to this project are listed below:","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"*Code contributed*: [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/main/charlesgoh.md[Functional code]] [https://github.com/CS2103AUG2017-W09-B2/main/blob/master/collated/test/charlesgoh.md[Test code]]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Password Protection Commands `lock` `unlock` `changepassword`","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dpassword]","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"Many users have security related concerns. In order to slow malicious users from causing","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"damage to users\u0027 Address++ application, the password protection suite of commands were","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"created.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dpassword]","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dsort]","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"As more contacts and tasks are added to the application, the lists may get long and disorganized. The Sort Command","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"allows users to sort both contacts and tasks by key fields. Examples include sorting contacts by name and","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"sorting contacts by deadlines.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dbackup]","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"Users are able to back up their data before making any changes so that in the event of an","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"emergency (e.g. clearing all data and then closing afterwards), the old save data can be restored.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dbackup]","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003dfontsize]","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"Different monitors render the application differently. On some monitors, the words may appear to be too small. The font size","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"commands and buttons allow users to increase/decrease/reset the font sizes at any time when using the application.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003dfontsize]","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Avatar and Remark Fields","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d External behavior: Co-authored with Jeffrey Goh","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: User Guide]#","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"include::../UserGuide.adoc[tag\u003davatar]","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Justification","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":"Avatars and remarks help users to identify different contacts. It was also implemented with the intention of making the application","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":"more user friendly.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d\u003d Implementation for Avatar Field","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"#Start of Extract [from: Developer Guide]#","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":"include::../DeveloperGuide.adoc[tag\u003davatar]","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"#End of Extract#","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":"---","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Other contributions","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":"* Added tests for task related implementations (https://github.com/CS2103AUG2017-W09-B2/main/pull/115/files[#115]) +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"charlesgoh"},"content":"* Conducted Acceptance Testing for another team [https://github.com/CS2103AUG2017-W09-B4/main/issues/77[W09-B4]]","isFullCredit":true}],"authorContributionMap":{"charlesgoh":160,"-":2}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The main entry point to the application.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Version VERSION \u003d new Version(1, 5, 0, false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Ui ui;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Logic logic;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected Config config;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void init() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" super.init();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" initLogging(config);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logic \u003d new LogicManager(model);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" initEventsCenter();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" Config initializedConfig;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String configFilePathUsed;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" return initializedConfig;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * reading from the file.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" return initializedPrefs;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" ui.start(primaryStage);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow mw \u003d ui.getMainWindow();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" mw.setMainApp(this);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" mw.setStorage(storage);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" mw.setModel(model);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" ui.stop();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(model.getUserPrefs());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" System.exit(0);","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" this.stop();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" public static void main(String[] args) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" launch(args);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":35,"-":181}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private String appTitle \u003d \"Address++\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TASK_DISPLAYED_INDEX \u003d \"The task index provided is invalid\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASKS_LISTED_OVERVIEW \u003d \"%1$d tasks listed!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":13}},{"path":"src/main/java/seedu/address/commons/events/model/AddressBookChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.events.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/** Indicates the AddressBook in the model has changed*/","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class AddressBookChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public final ReadOnlyAddressBook data;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public AddressBookChangedEvent(ReadOnlyAddressBook data) {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" this.data \u003d data;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" return \"number of persons \" + data.getPersonList().size() + \", number of tags \" + data.getTagList().size()","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \", number of tasks \" + data.getTasksList().size();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":18}},{"path":"src/main/java/seedu/address/commons/events/ui/BackupRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" * An Event for backing up of data to a selected location.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class BackupRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private Model model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private String args;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public BackupRequestEvent(Model model, String args) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public Model getModel() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" return model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public void setModel(Model model) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public String getArgs() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" return args;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void setArgs(String args) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d args;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelLocateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelLocateEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelLocateEvent(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":26}},{"path":"src/main/java/seedu/address/commons/events/ui/BrowserPanelNavigateEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class BrowserPanelNavigateEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" private final Location fromLocation;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final Location toLocation;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public BrowserPanelNavigateEvent(Location fromLocation, Location toLocation) {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.fromLocation \u003d fromLocation;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.toLocation \u003d toLocation;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Location getFromLocation() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" return fromLocation;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Location getToLocation() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" return toLocation;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":33}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeFontSizeEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a font size change triggered by a command or the UI","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"public class ChangeFontSizeEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static int increaseSizeEventIndex \u003d 0;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static int decreaseSizeEventIndex \u003d 1;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static int resetSizeEventIndex \u003d 2;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private int triggerOption;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public ChangeFontSizeEvent(int triggerOption) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" return \"New Event: Font size change\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static int getIncreaseSizeEventIndex() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" return increaseSizeEventIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public static int getDecreaseSizeEventIndex() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return decreaseSizeEventIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static int getResetSizeEventIndex() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return resetSizeEventIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public int getTriggerOption() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" return triggerOption;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public void setTriggerOption(int triggerOption) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.triggerOption \u003d triggerOption;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a selection change in the Person List Panel","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangeThemeRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" private final String styleSheet;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public ChangeThemeRequestEvent(String styleSheet) {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" this.styleSheet \u003d styleSheet;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public String getStyleSheet() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return styleSheet;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/commons/events/ui/JumpToListRequestTaskEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Indicates a request to jump to the list of tasks","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class JumpToListRequestTaskEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public final int targetIndex;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public JumpToListRequestTaskEvent(Index targetIndex) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" //TODO optimize this class","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex.getZeroBased();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/main/java/seedu/address/commons/events/ui/OpenRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the opening of a save file from a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/SaveAsRequestEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * An Event for the saving of data to a selected location.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsRequestEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":15}},{"path":"src/main/java/seedu/address/commons/events/ui/TaskPanelSelectionChangedEvent.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a selection change in the Task List Panel","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class TaskPanelSelectionChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final TaskCard newSelection;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public TaskPanelSelectionChangedEvent(TaskCard newSelection) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" this.newSelection \u003d newSelection;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public TaskCard getNewSelection() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return newSelection;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * API of the Logic component","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface Logic {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered list of tasks */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":27}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private final Storage storage;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final CommandHistory history;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public LogicManager(Model model) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d null;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" this.history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" this.addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" command.setStorageInfo(this.storage);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" return result;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" } finally {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" history.add(commandText);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":12,"Esilocke":8,"-":49}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that adds an object to the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class AddCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/AddPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommand extends AddCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a person to the address book. \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"John Doe \"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"98765432 \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + PREFIX_REMARK + \"Sells sea shells on the sea shore \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + PREFIX_AVATAR + \"avatar-filepath.png\"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"friends \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TAG + \"owesMoney\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New person added: \\n%1$s\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private final Person personToAdd;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Creates an AddCommand to add the specified {@code ReadOnlyPerson}","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" public AddPersonCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" personToAdd \u003d new Person(person);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" model.addPerson(personToAdd);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToAdd));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddPersonCommand)) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assert (((AddPersonCommand) other).personToAdd !\u003d null); // The personToAdd cannot be null","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" return personToAdd.equals(((AddPersonCommand) other).personToAdd);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":73}},{"path":"src/main/java/seedu/address/logic/commands/AddTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Adds a tag to the persons in the latest list from the address book.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommand extends AddCommand {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Adds the tag to the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer)\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_ADD_TAG_SUCCESS \u003d \"Added Tag: %1$s\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_TAG \u003d \"This tag already exists in all \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" + \"target persons in the current list.\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" private final Tag addTag;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to given target indexes","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" * @param addTag tag to add to all entries in the address book","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand(Tag addTag) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(addTag);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" this.addTag \u003d addTag;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the specific persons have the tag.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" * If not, add the tag to the person that doesn\u0027t have the given tag.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" boolean allPersonsContainGivenTag \u003d true;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" // check whether all persons have the given tag","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" int personIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToAddTag \u003d lastShownList.get(personIndex);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" if (!personToAddTag.getTags().contains(addTag)) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" allPersonsContainGivenTag \u003d false;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" if (allPersonsContainGivenTag) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" model.addTag(this.addTag, this.targetIndexes);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_ADD_TAG_SUCCESS, addTag));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof AddTagCommand)) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand e \u003d (AddTagCommand) other;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 addTag.equals(e.addTag);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":126}},{"path":"src/main/java/seedu/address/logic/commands/AddTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommand extends AddCommand {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \": Adds a task to the address book. \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS]\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" + PREFIX_NAME + \"Buy pencil \"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"Buy a new pencil from ABS \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DEADLINE + \"10-10-2017 \"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"4 \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" + PREFIX_ADDRESS + \"12 Kent Ridge Crescent, 119275\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New task added: \\n%1$s\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Task taskToAdd;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Creates an AddTaskCommand to add the specified {@code ReadOnlyTask}","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public AddTaskCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" super();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" taskToAdd \u003d new Task(task);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" model.addTask(taskToAdd);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" } else if (!(other instanceof AddTaskCommand)) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assert (taskToAdd !\u003d null);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert (((AddTaskCommand) other).taskToAdd !\u003d null); // The taskToAdd cannot be null","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return taskToAdd.equals(((AddTaskCommand) other).taskToAdd);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":70}},{"path":"src/main/java/seedu/address/logic/commands/AssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"/** Assigns at least 1 person to a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"assign\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"as\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Assigns people to a task in the Address Book. \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + \"TASK \";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Assigned %1$s people to \\n%2$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"All the specified persons are already assigned to this task\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public AssignCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToAssign(this.personIndexes);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" model.assignToTask(personIndexes, assignedTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), assignedTask));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" || (other instanceof AssignCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((AssignCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((AssignCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToAssign (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" HashSet\u003cReadOnlyPerson\u003e addedPersons \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToAssign \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" for (Index i : personIndexes) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toAssign \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" if (!addedPersons.contains(toAssign)) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" addedPersons.add(toAssign);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" personsToAssign.add(toAssign);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return personsToAssign;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":92}},{"path":"src/main/java/seedu/address/logic/commands/BackupCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Backs up current addressbook into a user input location.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"backup\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"bk\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Backs up data to a user input \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" + \"location field [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" + \"Parameter: KEYWORD [FILEPATH]\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \"MyBackUpFile\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"AddressBook++ data backed up successfully.\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private String args;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand(String trimmedArgs) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" super();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.args \u003d trimmedArgs;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model.getAddressBook());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new BackupRequestEvent(model, args));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":40}},{"path":"src/main/java/seedu/address/logic/commands/ChangePasswordCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Changes user\u0027s password provided old password is correct and new passwords match.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommand extends Command {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"changepassword\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"cpw\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Password changed successfully\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes user password. \\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"NEWPASSWORD \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"CONFIRMPASSWORD \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"mynewpassword111 \" + PREFIX_CONFIRM_PASSWORD + \"mynewpassword111\\n\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_OLD_NEW_PS_SAME \u003d \"New password must be different from your old password\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ERROR_OCCURED \u003d \"An error occured. Please try again.\\n\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Your password is incorrect. Please try again.\\n\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_CONFIRMATION_INCORRECT \u003d \"Your new password and confirmation password \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" + \"do not match. Please try again\\n\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(ChangePasswordCommand.class);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" private String oldPassword;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private String newPassword;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" private String confirmationPassword;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" * Takes in old password, new password and confirmation password from parser and creates a new","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * ChangePasswordCommand object","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param oldPassword","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" * @param newPassword","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" * @param confirmPassword","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand(String oldPassword, String newPassword, String confirmPassword) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.oldPassword \u003d oldPassword;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" this.newPassword \u003d newPassword;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" this.confirmationPassword \u003d confirmPassword;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes string using SHA256 encryption and returns hashed string","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" * @param argument","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" private String forwardHash(String argument) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(argument, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" * Forward hashes the user input password and checks if it matches with the encrypted password saved","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldPasswordCorrect() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String forwardHashedInputPassword \u003d forwardHash(oldPassword);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" String forwardHashActualPassword;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" forwardHashActualPassword \u003d userPrefs.getAddressBookEncryptedPassword();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" if (forwardHashActualPassword.equals(forwardHashedInputPassword)) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Actual password and input password matches\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return true;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Actual password and input password do not match\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" return false;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" * Takes new input passwords and checks them against one another.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" private boolean isNewPasswordInputsSame() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return newPassword.equals(confirmationPassword);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Checks if old password and new password are the same","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private boolean isOldAndNewPasswordTheSame() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return oldPassword.equals(newPassword);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" // Case where old password is incorrect","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" if (!isOldPasswordCorrect()) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Password is incorrect. Note: Default password is \u0027password\u0027 \");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Case where new password and confirmation password do not match","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" if (!isNewPasswordInputsSame()) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"New password and confirmation password do not match\");","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_CONFIRMATION_INCORRECT);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" // Case where old and new passwords are the same","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" if (isOldAndNewPasswordTheSame()) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" logger.warning(\"Old password and new password cannot be the same\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_OLD_NEW_PS_SAME);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Case where user input passes both checks. Password is changed and UserPrefs saved","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" // Get user prefs file","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" // Set new password to user prefs","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(newPassword);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" // Logs new password and saved password for debugging purposes","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String hashedNewPassword \u003d forwardHash(newPassword);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" String userPrefsHashedPassword \u003d userPrefs.getAddressBookEncryptedPassword();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New Password: \" + newPassword","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted New Password: \" + hashedNewPassword","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" + \"\\nEncrypted Password From UserPrefs:\" + userPrefsHashedPassword","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" + \"\\nCommand\u0027s Password and UserPrefs saved password matches: \"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + Boolean.toString(hashedNewPassword.equals(userPrefsHashedPassword)) + \"\\n\");","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" // Return command result","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":142}},{"path":"src/main/java/seedu/address/logic/commands/ChangePrivacyCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the privacy setting of a person\u0027s details in the address book","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"changeprivacy\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"cp\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TRUE_WORD \u003d \"true\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final String FALSE_WORD \u003d \"false\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Changes the privacy of the details of the person\"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_NAME + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_PHONE + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_EMAIL + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_ADDRESS + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" + \"[\" + PREFIX_AVATAR + TRUE_WORD + \" OR \" + FALSE_WORD + \"]\\n\"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_NAME + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_PHONE + FALSE_WORD + \" \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + TRUE_WORD + \" \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_ADDRESS + FALSE_WORD + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_AVATAR + FALSE_WORD;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_CHANGE_PRIVACY_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"At least one field to change must be provided.\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private final PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * @param index of the person in the filtered person list to change the privacy of","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand(Index index, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(pps);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d pps;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personToChange \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d null;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" newPerson \u003d createPersonWithChangedPrivacy(personToChange, pps);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(model.getPrivacyLevel());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Person must have all fields initialised.\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(personToChange, newPerson);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" * Changes a person\u0027s fields\u0027 privacy","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" * @param person the person whose privacy we would like to change","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps the settings of privacy for each field","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createPersonWithChangedPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps)","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" assert person !\u003d null;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Name name \u003d createNameWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone \u003d createPhoneWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" Email email \u003d createEmailWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Address address \u003d createAddressWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark \u003d createRemarkWithPrivacy(person, pps);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar \u003d person.getAvatar();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" Boolean favourite \u003d person.getFavourite();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tag \u003d person.getTags();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tag);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Name) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Name) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createNameWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" person.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d new Name(person.getName().toString());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Name\");","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getNameIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" name.setPrivate(person.getName().getIsPrivate());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return name;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createPhoneWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getPhone().getIsPrivate()) {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" person.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Phone\");","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getPhoneIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" phone.setPrivate(person.getPhone().getIsPrivate());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return phone;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createEmailWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getEmail().getIsPrivate()) {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" person.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Email\");","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getEmailIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" email.setPrivate(person.getEmail().getIsPrivate());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return email;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createAddressWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" person.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Address\");","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getAddressIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" address.setPrivate(person.getAddress().getIsPrivate());","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" return address;","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" * of the (@code PersonPrivacySettings)","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createRemarkWithPrivacy(ReadOnlyPerson person, PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getRemark().getIsPrivate()) {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" person.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"Invalid Remark\");","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" if (pps.getRemarkIsPrivate() !\u003d null) {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" remark.setPrivate(person.getRemark().getIsPrivate());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" return remark;","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" return index;","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings getPps() {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof ChangePrivacyCommand)) {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand c \u003d (ChangePrivacyCommand) other;","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" return index.equals(c.index)","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 pps.equals(c.pps);","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":" * Stores the privacy settings for each field of a person.","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":" public static class PersonPrivacySettings {","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings() {}","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings(PersonPrivacySettings toCopy) {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d toCopy.nameIsPrivate;","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d toCopy.phoneIsPrivate;","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d toCopy.emailIsPrivate;","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d toCopy.addressIsPrivate;","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"jeffreygohkw"},"content":" this.remarkIsPrivate \u003d toCopy.remarkIsPrivate;","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if at least one field is not null.","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isAnyFieldNonNull() {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"jeffreygohkw"},"content":" return CollectionUtil.isAnyNonNull(this.nameIsPrivate, this.phoneIsPrivate,","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate, this.addressIsPrivate, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of nameIsPrivate","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getNameIsPrivate() {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"jeffreygohkw"},"content":" return nameIsPrivate;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"jeffreygohkw"},"content":" public void setNameIsPrivate(boolean nameIsPrivate) {","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(nameIsPrivate);","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"jeffreygohkw"},"content":" this.nameIsPrivate \u003d nameIsPrivate;","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of phoneIsPrivate","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getPhoneIsPrivate() {","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" return phoneIsPrivate;","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" public void setPhoneIsPrivate(boolean phoneIsPrivate) {","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phoneIsPrivate);","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" this.phoneIsPrivate \u003d phoneIsPrivate;","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of emailIsPrivate","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getEmailIsPrivate() {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" return emailIsPrivate;","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" public void setEmailIsPrivate(boolean emailIsPrivate) {","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(emailIsPrivate);","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" this.emailIsPrivate \u003d emailIsPrivate;","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" * Returns the value of addressIsPrivate","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" public Boolean getAddressIsPrivate() {","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" return addressIsPrivate;","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" public void setAddressIsPrivate(boolean addressIsPrivate) {","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(addressIsPrivate);","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" this.addressIsPrivate \u003d addressIsPrivate;","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"charlesgoh"},"content":" * Returns the value of remarkIsPrivate","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" public Boolean getRemarkIsPrivate() {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"charlesgoh"},"content":" return remarkIsPrivate;","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"charlesgoh"},"content":" public void setRemarkIsPrivate(boolean remarkIsPrivate) {","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(remarkIsPrivate);","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" this.remarkIsPrivate \u003d remarkIsPrivate;","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" if (!(other instanceof PersonPrivacySettings)) {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" // state check","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings c \u003d (PersonPrivacySettings) other;","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":" return getNameIsPrivate().equals(c.getNameIsPrivate())","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getPhoneIsPrivate().equals(c.getPhoneIsPrivate())","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getEmailIsPrivate().equals(c.getEmailIsPrivate())","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getAddressIsPrivate().equals(c.getAddressIsPrivate())","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 getRemarkIsPrivate().equals(c.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":14,"jeffreygohkw":381}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Clears all entries in the address book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Clears the address book. \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PERSON + \"] \"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TASK + \"] \";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" model.resetData(new AddressBook());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"wangyiming1019":1,"-":13}},{"path":"src/main/java/seedu/address/logic/commands/ClearPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the contacts in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommand extends ClearCommand {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All contacts have been cleared!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_PERSON);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/ClearTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Clears only the tasks in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommand extends ClearCommand {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All tasks have been cleared!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" model.resetPartialData(new AddressBook(), PREFIX_TASK);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":22}},{"path":"src/main/java/seedu/address/logic/commands/Command.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a command with hidden internal logic and the ability to be executed.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public abstract class Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" protected CommandHistory history;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" protected UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of persons.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @return summary message for persons displayed","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static String getMessageForPersonListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" return String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Constructs a feedback message to summarise an operation that displayed a listing of tasks.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * @param displaySize used to generate summary","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * @return summary message for tasks displayed","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" public static String getMessageForTaskListShownSummary(int displaySize) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return String.format(Messages.MESSAGE_TASKS_LISTED_OVERVIEW, displaySize);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Executes the command and returns the result message.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @return feedback message of the operation result for display","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public abstract CommandResult execute() throws CommandException;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Provides any needed dependencies to the command.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Commands making use of any of these should override this method to gain","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * access to the dependencies.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void setStorageInfo(Storage storage) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" this.storage \u003d storage;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":6,"Esilocke":10,"-":43}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that deletes an object from the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/DeletePersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Deletes a person from the address book.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommand extends DeleteCommand {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the person identified by the index number used in the last listing.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Person: %1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d personsList.size()) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToDelete \u003d personsList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personToDelete));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeletePersonCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeletePersonCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":51}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * Deletes a tag from identified persons using the last displayed indexes from the address book.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommand extends DeleteCommand {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" + \": Deletes the tag from the persons with the index numbers used in the last person list.\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \" Command is case-sensitive. \\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"[INDEX] [MORE INDEXES] (index must be a positive integer) \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" + \"[\" + PREFIX_TAG + \"TAG]... \\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" 1 2 t/friends \\n\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DELETE_TAG_SUCCESS \u003d \"Deleted Tag: %1$s\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NONEXISTENT_TAG \u003d \"The target persons do not have input tags.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private final ArrayList\u003cIndex\u003e targetIndexes;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" private final Tag toDelete;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" * @param targetIndexes of the persons in the filtered person list to edit","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(targetIndexes);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d targetIndexes;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" * @param toDelete tag to delete from given target indexes","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand(Tag toDelete) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toDelete);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" this.toDelete \u003d toDelete;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * Check whether the index within the range then checks whether the tag exists among the specific persons.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" * If yes, delete the tag from the specific person in the person list.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" boolean nonexistentTag \u003d true;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndexes.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" reinitlializeArray(lastShownList.size());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" for (Index targetIndex : targetIndexes) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" // check any person have the tag","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c targetIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" int targetIndex \u003d targetIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson readOnlyPerson \u003d lastShownList.get(targetIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" if (readOnlyPerson.getTags().contains(toDelete)) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" nonexistentTag \u003d false;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" if (nonexistentTag) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" model.deleteTag(this.toDelete, this.targetIndexes);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_TAG_SUCCESS, toDelete));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void reinitlializeArray(int size) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c size; i++) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" targetIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (!(other instanceof DeleteTagCommand)) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" // state check","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand e \u003d (DeleteTagCommand) other;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return targetIndexes.equals(e.targetIndexes)","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 toDelete.equals(e.toDelete);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":125}},{"path":"src/main/java/seedu/address/logic/commands/DeleteTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Deletes a task from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommand extends DeleteCommand {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \": Deletes the task identified by the index number used in the last listing.\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Deleted Task: %1$s\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d tasksList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToDelete));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DeleteTaskCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteTaskCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":56}},{"path":"src/main/java/seedu/address/logic/commands/DismissCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"/** Dismisses at least 1 person from a specified task in the Address Book**/","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DismissCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"dismiss\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"ds\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Dismisses people from a task in the Address Book. \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"PERSON INDEXES... \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + \"TASK \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Dismissed %1$s people from task \\n%2$s\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TARGET_ARGS \u003d \"Only 1 task index should be specified\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PERSONS_ARGS \u003d \"At least 1 person index must be specified\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NONE_ASSIGNED \u003d \"None of the specified persons are assigned to this task\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e personIndexes;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Index taskIndex;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public DismissCommand(ArrayList\u003cIndex\u003e personIndexes, Index taskIndex) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assert(personIndexes.size() \u003e 0);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.personIndexes \u003d personIndexes;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personIndexes \u003d createPersonsToDismiss(this.personIndexes);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" model.dismissFromTask(personIndexes, dismissedTask);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The specified task cannot be missing\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, personIndexes.size(), dismissedTask));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" || (other instanceof DismissCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personIndexes.equals(((DismissCommand) other).personIndexes)","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((DismissCommand) other).taskIndex)); // state check","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" * Creates a {@code ArrayList} that contains all the {@code ReadOnlyPerson} converted from the {@Code Index}","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * @throws CommandException if the specified Index is out of range","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cReadOnlyPerson\u003e createPersonsToDismiss (ArrayList\u003cIndex\u003e indexes) throws CommandException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToDismiss \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e personsList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toDismiss \u003d personsList.get(i.getZeroBased());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" if (!personsToDismiss.contains(toDismiss)) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" personsToDismiss.add(toDismiss);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" } catch (IndexOutOfBoundsException e) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return personsToDismiss;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":89}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents an undoable command that edits an object in the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class EditCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/EditPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * Edits a person in the address book.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommand extends EditCommand {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the person identified \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last person listing. \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_REMARK + \"REMARK] \"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PHONE + \"91234567 \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Person: \\n%1$s\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_ALL_FIELDS_PRIVATE \u003d \"At least one field to be edited must be public.\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static boolean areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final EditPersonDescriptor editPersonDescriptor;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * @param index of the person in the filtered person list to edit","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * @param editPersonDescriptor details to edit the person with","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editPersonDescriptor);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" Person editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" editedPerson.setPrivacyLevel(model.getPrivacyLevel());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * edited with {@code editPersonDescriptor}.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * A person with private fields cannot be edited","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private static Person createEditedPerson(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor)","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d true;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d createUpdatedName(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d createUpdatedPhone(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d createUpdatedEmail(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d createUpdatedAddress(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d createUpdatedRemark(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" updatedTags \u003d createUpdatedTags(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite \u003d createUpdatedFavourite(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" updatedAvatar \u003d createUpdatedAvatar(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" if (areFieldsAllPrivate) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress,","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" updateFavourite, updatedRemark, updatedAvatar, updatedTags);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Name) for use in createEditedPerson","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Name) from either the personToEdit or the editPersonDescriptor depending on privacy","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" private static Name createUpdatedName(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" Name updatedName;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getName().isPresent()) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return updatedName;","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Phone) for use in createEditedPerson","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Phone) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone createUpdatedPhone(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" Phone updatedPhone;","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getPhone().getIsPrivate()) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getPhone().isPresent()) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" updatedPhone \u003d personToEdit.getPhone();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" return updatedPhone;","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Email) for use in createEditedPerson","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Email) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private static Email createUpdatedEmail(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" Email updatedEmail;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getEmail().getIsPrivate()) {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getEmail().isPresent()) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" updatedEmail \u003d personToEdit.getEmail();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return updatedEmail;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Address) for use in createEditedPerson","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Address) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" private static Address createUpdatedAddress(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" Address updatedAddress;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAddress().isPresent()) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" updatedAddress \u003d personToEdit.getAddress();","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAddress;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" //**author charlesgoh","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Remark) for use in createEditedPerson","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Remark) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark createUpdatedRemark(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" Remark updatedRemark;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" if (!personToEdit.getRemark().getIsPrivate()) {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d editPersonDescriptor.getRemark().orElse(personToEdit.getRemark());","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getRemark().isPresent()) {","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":" updatedRemark \u003d personToEdit.getRemark();","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"jeffreygohkw"},"content":" return updatedRemark;","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Avatar) for use in createEditedPerson","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Avatar) from either the personToEdit or the editPersonDescriptor","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":" * depending on privacy and the input","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar createUpdatedAvatar(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getAvatar().isPresent()) {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"jeffreygohkw"},"content":" return updatedAvatar;","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":" //author","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Tag) for use in createEditedPerson","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Tag) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" private static Set\u003cTag\u003e createUpdatedTags(ReadOnlyPerson personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getTags().isPresent()) {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":" return updatedTags;","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an updated (@code Favourite) for use in createEditedPerson","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"jeffreygohkw"},"content":" * @param personToEdit The person to edit","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" * @param editPersonDescriptor Edited with this editPersonDescriptor","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" * @return A new (@code Favourite) from either the personToEdit or the editPersonDescriptor depending on the input","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":" private static Boolean createUpdatedFavourite(ReadOnlyPerson personToEdit,","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":" Boolean updateFavourite \u003d editPersonDescriptor.getFavourite().orElse(personToEdit.getFavourite());","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":" if (editPersonDescriptor.getFavourite().isPresent()) {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":" areFieldsAllPrivate \u003d false;","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":" return updateFavourite;","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonCommand)) {","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand e \u003d (EditPersonCommand) other;","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor);","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the person.","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" public static class EditPersonDescriptor {","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" private Name name;","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" private Phone phone;","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" private Email email;","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" private Address address;","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" private Boolean favourite;","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" private Remark remark;","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" private Avatar avatar;","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" private Set\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor() {}","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" this.name \u003d toCopy.name;","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d toCopy.phone;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" this.email \u003d toCopy.email;","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" this.address \u003d toCopy.address;","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" this.favourite \u003d toCopy.favourite;","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d toCopy.remark;","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d toCopy.avatar;","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d toCopy.tags;","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.remark,","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" this.avatar, this.tags);","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cName\u003e getName() {","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(name);","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPhone\u003e getPhone() {","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(phone);","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cEmail\u003e getEmail() {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(email);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAddress\u003e getAddress() {","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(address);","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d favourite;","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" public Optional\u003cBoolean\u003e getFavourite() {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" return Optional.ofNullable(favourite);","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cRemark\u003e getRemark() {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(remark);","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" public void setAvatar(Avatar avatar) {","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" this.avatar \u003d avatar;","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cAvatar\u003e getAvatar() {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(avatar);","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(tags);","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditPersonDescriptor)) {","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" return getName().equals(e.getName())","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getFavourite().equals(e.getFavourite())","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getRemark().equals(e.getRemark())","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar())","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTags().equals(e.getTags());","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":190,"Esilocke":227,"wangyiming1019":9}},{"path":"src/main/java/seedu/address/logic/commands/EditTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Renames and edits the specified tag in the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommand extends EditCommand {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" + \": Edits the specified tag \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" + \"and updates all existing contacts that shares this tag with the new value.\\n\"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: TAGTOCHANGE (must be alphanumerical) \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" + \"TAGNEWNAME (must be alphanumerical)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" friends enemies\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_EDIT_TAG_SUCCESS \u003d \"Replaced tag %1$s with %2$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TAG_NOT_FOUND \u003d \"No such tag was found in the address book.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INSUFFICIENT_ARGS \u003d \"Only 2 arguments should be provided!\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_TAG_NAME \u003d \"Tag names must be alphanumerical.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TAGS \u003d \"The new name of the tag cannot be the same as the old name.\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cIndex\u003e affectedIndexes;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private final Tag toEdit;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private final Tag newTag;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * @param toEdit The value of the tag to be changed","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" * @param newTag The new value for the tag","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand(Tag toEdit, Tag newTag) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toEdit);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newTag);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.toEdit \u003d toEdit;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.newTag \u003d newTag;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.affectedIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson currentlyViewed;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e tagSet;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" boolean tagNotPresent \u003d true;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c lastShownList.size(); i++) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" currentlyViewed \u003d lastShownList.get(i);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagSet \u003d currentlyViewed.getTags();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (tagSet.contains(toEdit)) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" tagNotPresent \u003d false;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" affectedIndexes.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (tagNotPresent) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" model.editTag(toEdit, newTag, affectedIndexes);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_TAG_SUCCESS, toEdit.tagName, newTag.tagName));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTagCommand)) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" EditTagCommand e \u003d (EditTagCommand) other;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return toEdit.equals(e.toEdit)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 newTag.equals(e.newTag);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":98}},{"path":"src/main/java/seedu/address/logic/commands/EditTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * Edits a task in the address book.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommand extends EditCommand {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \": Edits the details of the task identified \"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" + \"by the index number used in the last task listing. \"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DESCRIPTION + \"DESCRIPTION] \"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_DEADLINE + \"DEADLINE] \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" + \"[\" + PREFIX_PRIORITY + \"PRIORITY] \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" + PREFIX_DESCRIPTION + \"write 1200-word essay \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_PRIORITY + \"1\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Edited Task: \\n%1$s\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DUPLICATE_TASK \u003d \"This task already exists in the address book.\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private final EditTaskDescriptor editTaskDescriptor;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * @param index of the task in the filtered task list to edit","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * @param editTaskDescriptor details to edit the task with","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand(Index index, EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editTaskDescriptor);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" this.editTaskDescriptor \u003d new EditTaskDescriptor(editTaskDescriptor);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (index.getZeroBased() \u003e\u003d lastShownTaskList.size()) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToEdit \u003d lastShownTaskList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d createEditedTask(taskToEdit, editTaskDescriptor);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" model.updateTask(taskToEdit, editedTask);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedTask));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dpe) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"The target task cannot be missing\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Creates and returns a {@code Task} with the details of {@code taskToEdit}","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * edited with {@code editTaskDescriptor}.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private static Task createEditedTask(ReadOnlyTask taskToEdit,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editTaskDescriptor) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assert taskToEdit !\u003d null;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" TaskName updatedTaskName;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" Description updatedDescription;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" Deadline updatedDeadline;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Priority updatedPriority;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Assignees assignees;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" Boolean updatedState;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" TaskAddress updatedTaskAddress;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" updatedTaskName \u003d editTaskDescriptor.getTaskName().orElse(taskToEdit.getTaskName());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" updatedDescription \u003d editTaskDescriptor.getDescription().orElse(taskToEdit.getDescription());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" updatedDeadline \u003d editTaskDescriptor.getDeadline().orElse(taskToEdit.getDeadline());","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" updatedPriority \u003d editTaskDescriptor.getPriority().orElse(taskToEdit.getPriority());","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // You cannot edit assignees or state using edit command","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assignees \u003d taskToEdit.getAssignees();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" updatedState \u003d taskToEdit.getCompleteState();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress \u003d editTaskDescriptor.getTaskAddress().orElse(taskToEdit.getTaskAddress());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return new Task(updatedTaskName, updatedDescription, updatedDeadline, updatedPriority, assignees, updatedState,","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" updatedTaskAddress);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskCommand)) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand e \u003d (EditTaskCommand) other;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" return index.equals(e.index) \u0026\u0026 editTaskDescriptor.equals(e.editTaskDescriptor);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Stores the details to edit the task with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" * corresponding field value of the task.","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" public static class EditTaskDescriptor {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" private TaskName taskName;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" private Description description;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" private Deadline deadline;","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" private Priority priority;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" private Assignees assignees;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" private TaskAddress taskAddress;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor() {}","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor(EditTaskDescriptor toCopy) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d toCopy.taskName;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" this.description \u003d toCopy.description;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d toCopy.deadline;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d toCopy.priority;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d toCopy.assignees;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d toCopy.taskAddress;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" return CollectionUtil.isAnyNonNull(this.taskName, this.description, this.deadline, this.priority,","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" this.taskAddress);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d taskName;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskName\u003e getTaskName() {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskName);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" this.description \u003d description;","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDescription\u003e getDescription() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(description);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d deadline;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cDeadline\u003e getDeadline() {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(deadline);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d priority;","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cPriority\u003e getPriority() {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(priority);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d taskAddress;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" public Optional\u003cTaskAddress\u003e getTaskAddress() {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" return Optional.ofNullable(taskAddress);","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof EditTaskDescriptor)) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor e \u003d (EditTaskDescriptor) other;","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" return getTaskName().equals(e.getTaskName())","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDescription().equals(e.getDescription())","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getDeadline().equals(e.getDeadline())","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getPriority().equals(e.getPriority())","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 getTaskAddress().equals(e.getTaskAddress());","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":224}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Favourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"favourite\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"fav\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Favourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAVOURITE_PERSON_SUCCESS \u003d \"Favourited Person: %1$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_DUPLICATE_FAVOURITE \u003d \"Person is already favourited.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToFavourite.getName(),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getPhone(), personToFavourite.getEmail(),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getAddress(), true,","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getRemark(), personToFavourite.getAvatar(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToFavourite.getTags());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToFavourite.getFavourite().equals(true)) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToFavourite, editedPerson);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_DUPLICATE_FAVOURITE);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((FavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/FavouriteListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Lists all favourited persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showfavourite\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"sfav\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all favourited persons.\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private static final NameContainsFavouritePredicate predicate \u003d new NameContainsFavouritePredicate();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":23}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that finds objects in the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class FindCommand extends Command {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":7}},{"path":"src/main/java/seedu/address/logic/commands/FindPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" * Finds people in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommand extends FindCommand {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private final NameContainsKeywordsPredicate personPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand(NameContainsKeywordsPredicate predicate) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" this.personPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert(personPredicate !\u003d null);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(personPredicate);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindPersonCommand","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.personPredicate.equals(((FindPersonCommand) other).personPredicate);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":32}},{"path":"src/main/java/seedu/address/logic/commands/FindTagCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" * Finds and lists all persons in address book who has a tag that contains any of the argument keywords.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommand extends FindCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" + \": Finds all persons whose tags contain any of \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" + \"the specified tags (not case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" friends colleagues\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private final NameContainsTagsPredicate predicate;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand(NameContainsTagsPredicate predicate) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" this.predicate \u003d predicate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof FindTagCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.predicate.equals(((FindTagCommand) other).predicate)); // state check","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":38}},{"path":"src/main/java/seedu/address/logic/commands/FindTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Finds tasks in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommand extends FindCommand {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" + \": Finds all tasks whose names or descriptions \"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" + \"contain any of the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]... [p/MINIMUM_PRIORITY] [done/TASK_STATE]\\n\"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" task make\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_COMPLETE_VALUE \u003d \"The task status should either be \u0027true\u0027 or \u0027false\u0027\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_PRIORITY \u003d \"The specified priority should be an integer from 1 to 5\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private final TaskContainsKeywordPredicate taskPredicate;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand(TaskContainsKeywordPredicate predicate) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.taskPredicate \u003d predicate;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" assert(taskPredicate !\u003d null);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(taskPredicate);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForTaskListShownSummary(model.getFilteredTaskList().size()));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" || other instanceof FindTaskCommand","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskPredicate.equals(((FindTaskCommand) other).taskPredicate);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":37}},{"path":"src/main/java/seedu/address/logic/commands/FontSizeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final int MINIMUM_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final int MAXIMUM_FONT_SIZE_MULTIPLIER \u003d 5;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"fontsize\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"fs\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String INCREASE_SIZE_PARAMETER \u003d \"increase\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final String DECREASE_SIZE_PARAMETER \u003d \"decrease\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String RESET_SIZE_PARAMETER \u003d \"reset\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" INCREASE_SIZE_PARAMETER, DECREASE_SIZE_PARAMETER, RESET_SIZE_PARAMETER));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Increases, decreases or resets font sizes \\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [OPTION]\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" increase\\n\"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_ALIAS + \" reset\\n\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\" + MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_INCREASE_FONT \u003d \"Font size increased successfully\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_DECREASE_FONT \u003d \"Font size decreased successfully\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_RESET_FONT \u003d \"Font size reset successfully\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" private final String option;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand(String option) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.option \u003d option;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getOption() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return this.option;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" switch (option) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" case INCREASE_SIZE_PARAMETER:","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_INCREASE_FONT);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" case DECREASE_SIZE_PARAMETER:","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_DECREASE_FONT);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" case RESET_SIZE_PARAMETER:","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" EventsCenter.getInstance().post(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_RESET_FONT);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" System.err.println(\"Parameter is invalid\");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_INVALID_INPUT + MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":68}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_TASKS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all entries\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":3,"wangyiming1019":1,"-":19}},{"path":"src/main/java/seedu/address/logic/commands/LocateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Locates a person\u0027s address on Google Maps identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"locate\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"loc\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \": Locates the address of the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_LOCATE_PERSON_SUCCESS \u003d \"Searching for Person at Index: %1$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_ADDRESS_FAILURE \u003d \"Person %1$s has a Private Address\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NO_ADDRESS_FAILURE \u003d \"Person %1$s has no Address\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_ADDRESS_FAILURE, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(targetIndex.getZeroBased()).getAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_NO_ADDRESS_FAILURE, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelLocateEvent(","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" model.getFilteredPersonList().get(targetIndex.getZeroBased())));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_LOCATE_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof LocateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.targetIndex.equals(((LocateCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":62}},{"path":"src/main/java/seedu/address/logic/commands/LockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class LockCommand extends Command {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"lock\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"lk\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Locks the application. \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ locked successfully\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public LockCommand(String password) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to lock","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/NavigateCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Navigates from one address to another with the help of Google Maps","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"navigate\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"nav\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" + \": Get directions from one address to another.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three)\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" + \" AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three)\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" fp/2 ta/University Town\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_NAVIGATE_SUCCESS \u003d \"Navigating from %1$s to %2$s\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_FROM_ERROR \u003d \"Only one type of From prefix allowed.\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_MULTIPLE_TO_ERROR \u003d \"Only one type of To prefix allowed.\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR \u003d \"Address of the Person at index %1$s is private.\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR \u003d \"Person at index %1$s does not have an address.\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_HAS_NO_ADDRESS_ERROR \u003d \"Task at index %1$s does not have an address.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationFrom;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final Location locationTo;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private final Index fromIndex;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private final Index toIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean fromIsTask;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" private final boolean toIsTask;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d null;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d null;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" checkDuplicateFromAndToLocation(locationFrom, locationTo, fromIndex, toIndex);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" this.locationFrom \u003d from;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" this.locationTo \u003d to;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" this.toIndex \u003d toIndex;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIndex \u003d fromIndex;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" this.toIsTask \u003d toIsTask;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" this.fromIsTask \u003d fromIsTask;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Throws an IllegalArgumentException if there is both locationFrom and fromIndex are not null,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * or if both locationTo and toIndex are not null.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" private void checkDuplicateFromAndToLocation(Location locationFrom, Location locationTo,","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" Index fromIndex, Index toIndex) throws IllegalArgumentException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" if (locationFrom !\u003d null \u0026\u0026 fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" if (locationTo !\u003d null \u0026\u0026 toIndex !\u003d null) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" private Location setLocationByIndex(Index index, boolean isTask) throws IllegalValueException, CommandException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (isTask) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_TASK_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredTaskList().get(index.getZeroBased()).getTaskAddress().toString());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().toString().equals(\"\")) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PERSON_HAS_NO_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" } else if (model.getFilteredPersonList().get(index.getZeroBased()).getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR, index.getOneBased()));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" return new Location(model.getFilteredPersonList().get(index.getZeroBased())","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" Location from;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" Location to;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" if (fromIndex !\u003d null) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d setLocationByIndex(fromIndex, fromIsTask);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d locationFrom;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" if (toIndex !\u003d null) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d setLocationByIndex(toIndex, toIsTask);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(MESSAGE_PRIVATE_PERSON_ADDRESS_ERROR);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d locationTo;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new BrowserPanelNavigateEvent(from, to));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_NAVIGATE_SUCCESS, from, to));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationFrom() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" return locationFrom;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" public Location getLocationTo() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" return locationTo;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" public Index getFromIndex() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" return fromIndex;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" public Index getToIndex() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" return toIndex;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isFromIsTask() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return fromIsTask;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" public boolean isToIsTask() {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" return toIsTask;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NavigateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationFrom(other)","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsLocationTo(other)","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIndex(other)","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIndex(other)","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsFromIsTask(other)","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 equalsToIsTask(other)); // state check","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationFrom) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationFrom(Object other) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationFrom \u003d\u003d null) {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationFrom \u003d\u003d null;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationFrom.equals(((NavigateCommand) other).locationFrom);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde locationTo) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsLocationTo(Object other) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" if (this.locationTo \u003d\u003d null) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).locationTo \u003d\u003d null;","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" return this.locationTo.equals(((NavigateCommand) other).locationTo);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIndex) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIndex(Object other) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" if (this.fromIndex \u003d\u003d null) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).fromIndex \u003d\u003d null;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIndex.equals(((NavigateCommand) other).fromIndex);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIndex) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIndex(Object other) {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" if (this.toIndex \u003d\u003d null) {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" return ((NavigateCommand) other).toIndex \u003d\u003d null;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIndex.equals(((NavigateCommand) other).toIndex);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde fromIsTask) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsFromIsTask(Object other) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return this.fromIsTask \u003d\u003d (((NavigateCommand) other).fromIsTask);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if the (@codde toIsTask) of this object is equal to that of the other Object","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * @param other The other Object we are comparing against","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" * @return True if both are null or both have the same value","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" private boolean equalsToIsTask(Object other) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return this.toIsTask \u003d\u003d (((NavigateCommand) other).toIsTask);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":224}},{"path":"src/main/java/seedu/address/logic/commands/OpenCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommand extends Command {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"open\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"o\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String OPEN_COMMAND_SUCCESS \u003d \"Successfully opened file.\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new OpenRequestEvent());","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(OPEN_COMMAND_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/PrivacyLevelCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Handles the changing of Privacy Levels in the address book","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"privacylevel\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"pl\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String CHANGE_PRIVACY_LEVEL_SUCCESS \u003d \"Successfully changed privacy level to %1$s.\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String WRONG_PRIVACY_LEVEL_MESSAGE \u003d \"Privacy Level can only be 1, 2 or 3\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MIN_PRIVACY_LEVEL \u003d 1;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public static final int MAX_PRIVACY_LEVEL \u003d 3;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \": Changes the privacy level of the address book. Level 1 shows all data, level 2 hides private fields\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" + \" and level 3 hides persons with at least 1 private field.\\n\"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: LEVEL (must be 1, 2 or 3)\\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" private final int level;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand(int level) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.level \u003d level;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c MIN_PRIVACY_LEVEL || level \u003e MAX_PRIVACY_LEVEL) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" model.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson toReplace \u003d model.getPersonAtIndexFromAddressBook(i);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new Person(toReplace);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" model.updatePerson(toReplace, newPerson);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } catch (PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003d\u003d 3) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(CHANGE_PRIVACY_LEVEL_SUCCESS, Integer.toString(level)));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" public int getLevel() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" return level;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof PrivacyLevelCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.level \u003d\u003d ((PrivacyLevelCommand) other).level); // state check","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":77}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/SaveAsCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data to a new save file at a desired location","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommand extends Command {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"save\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"sa\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String SAVE_AS_COMMAND_SUCCESS \u003d \"Successfully saved file.\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new SaveAsRequestEvent());","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(SAVE_AS_COMMAND_SUCCESS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":23}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":" * Represents a command that selects an object in the address book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"public abstract class SelectCommand extends Command {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"wangyiming1019":1,"-":8}},{"path":"src/main/java/seedu/address/logic/commands/SelectPersonCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Selects a person in the address book and loads the view panel for that person.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommand extends SelectCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Person: %1$s\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectPersonCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectPersonCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":47}},{"path":"src/main/java/seedu/address/logic/commands/SelectTaskCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * Selects a task in the address book and loads the view panel for that task.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommand extends SelectCommand {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \" \" + PREFIX_TASK","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" + \": Selects the task identified by the index number used in the last task listing.\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Selected Task: %1$s\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownTaskList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownTaskList.size()) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EventsCenter.getInstance().post(new JumpToListRequestTaskEvent(targetIndex));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SelectTaskCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectTaskCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":49}},{"path":"src/main/java/seedu/address/logic/commands/SetCompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as complete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setcomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cCompleted\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as completed: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already completed\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, true);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetCompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetCompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/logic/commands/SetIncompleteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Marks the task at the specified {@code Index} as incomplete */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"setincomplete\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"sti\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \": Marks the task at the specified index as \u003cIncomplete\u003e\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Marked Task as incomplete: %1$s\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_TASK_ALREADY_COMPLETE \u003d \"The specified task is already incomplete\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e lastShownList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToComplete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" model.setAsComplete(taskToComplete, false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException dte) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"This task cannot be missing\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, taskToComplete));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" || (other instanceof SetIncompleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.targetIndex.equals(((SetIncompleteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in address book by any field. Sorting can be done in ascending or descending order","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class SortCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_LIST_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" \"person\", \"task\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_FIELD_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" \"name\", \"phone\", \"email\", \"address\", \"priority\", \"deadline\"));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final ArrayList\u003cString\u003e ACCEPTED_ORDER_PARAMETERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" \"asc\", \"desc\"));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts all persons or all tasks by chosen \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" + \"field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: KEYWORD [LIST] [FIELD] [ORDER]\\n\"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" + \"Example: \" + COMMAND_WORD + \" person email desc\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" + \"Example 2: \" + COMMAND_WORD + \" task deadline desc\\n\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_INVALID_INPUT \u003d \"Invalid Input.\\n\"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Person Field Values: NAME, PHONE, EMAIL, ADDRESS \\n\"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Task Field Values: DEADLINE, PRIORITY\\n\"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" + \"Accepted Order Values: ASC, DESC\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_PERSONS \u003d \"All persons in address book successfully sorted\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS_TASKS \u003d \"All tasks in address book successfully sorted\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" private final String list;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private final String field;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private final String order;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public SortCommand(String list, String field, String order) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" this.field \u003d field;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" this.order \u003d order;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" this.list \u003d list;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" * Checks if argument command has the same parameter properties","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" * @param commandB","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public boolean sameCommandAs(SortCommand commandB) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return commandB.getList().equals(this.list) \u0026\u0026 commandB.getField()","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" .equals(this.field) \u0026\u0026 commandB.getOrder().equals(this.order);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public String getField() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" return this.field;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public String getOrder() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" return this.order;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public String getList() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" return this.list;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" if (this.list.equals(ACCEPTED_LIST_PARAMETERS.get(0))) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" model.sortPersons(getField(), getOrder());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_PERSONS);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" model.sortTasks(getField(), getOrder());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS_TASKS);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":2}},{"path":"src/main/java/seedu/address/logic/commands/TagListCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * List all tags in the address book to the user","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommand extends Command {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"showtag\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"stag\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_FAILURE \u003d \"There is no tag!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_SUCCESS \u003d \"All the tags are here: \";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(displayTags());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * display all the tags to user","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * @return String displayTags","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String displayTags() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" String displayTags;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e tagList \u003d getAllTagsInAddressBook();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" if (tagList.isEmpty()) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" displayTags \u003d MESSAGE_SUCCESS + convertTagToString(tagList);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return displayTags;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" * get all the tags in the address book without duplication","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" * @return allTagList","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" private ArrayList\u003cTag\u003e getAllTagsInAddressBook() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cTag\u003e allTagList \u003d new ArrayList\u003cTag\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" if (!allTagList.contains(tag)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" allTagList.add(tag);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" return allTagList;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" * convert a list of tags to a String","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" * @return String tags","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ArrayList\u003cTag\u003e tagList) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagNameList \u003d new ArrayList\u003cString\u003e();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : tagList) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" tagNameList.add(tag.getTagName());","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Collections.sort(tagNameList);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder tagNameString \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" for (String tagName : tagNameList) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" tagNameString.append(\"\u003c\").append(tagName).append(\"\u003e \");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" return tagNameString.toString().trim();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/ThemeCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommand extends Command {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_WORD \u003d \"theme\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" public static final String COMMAND_ALIAS \u003d \"th\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" + \": Sets the theme based on the specified style.\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" + \"Parameters: STYLE\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" + \"Example: \" + COMMAND_WORD + \" dark\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_CHANGE_SUCCESS \u003d \"Theme Changed to: %1$s\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_NOT_AVAILABLE \u003d \"Theme %1$s is not available.\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_THEME_IN_USE \u003d \"Theme %1$s is currently in use.\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private final String style;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand (String style) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" this.style \u003d style;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" String styleSheet;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getStyleMap().containsKey(style)) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" styleSheet \u003d model.getStyleMap().get(style);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_NOT_AVAILABLE, style));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" if (model.getTheme().equals(styleSheet)) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" throw new CommandException(String.format(MESSAGE_THEME_IN_USE, style));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" EventsCenter.getInstance().post(new ChangeThemeRequestEvent(styleSheet));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(styleSheet);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return new CommandResult(String.format(MESSAGE_THEME_CHANGE_SUCCESS, style));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" return style;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ThemeCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.style.equals(((ThemeCommand) other).style)); // state check","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":64}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":1,"-":36}},{"path":"src/main/java/seedu/address/logic/commands/UnfavouriteCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_WORD \u003d \"unfavourite\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public static final String COMMAND_ALIAS \u003d \"unfav\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" + \": Unfavourites the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_UNFAVOURITE_PERSON_SUCCESS \u003d \"Unfavourited Person: %1$s\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" public static final String MESSAGE_NOTFAVOURITEYET_PERSON \u003d \"Person is not favourited yet.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new Person(personToUnfavourite.getName(),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getPhone(), personToUnfavourite.getEmail(),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getAddress(), false,","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getRemark(), personToUnfavourite.getAvatar(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite.getTags());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" if (personToUnfavourite.getFavourite().equals(false)) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(personToUnfavourite, editedPerson);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" throw new CommandException(MESSAGE_NOTFAVOURITEYET_PERSON);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" return new CommandResult(String.format(MESSAGE_UNFAVOURITE_PERSON_SUCCESS, personToUnfavourite));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof UnfavouriteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.targetIndex.equals(((UnfavouriteCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":75}},{"path":"src/main/java/seedu/address/logic/commands/UnlockCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Sets lock in model to true or false, which allows or restricts the usage of all commands","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommand extends Command {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_WORD \u003d \"unlock\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final String COMMAND_ALIAS \u003d \"ul\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Unlocks the application. \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" + \"No commands can be executed\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"PASSWORD \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address++ unlocked successfully\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PASSWORD_INCORRECT \u003d \"Password is incorrect. Please try again\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(UnlockCommand.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private String password;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand(String password) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" this.password \u003d password;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" * Checks if input password matches the one saved in user prefs.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" private boolean isPasswordCorrect() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" UserPrefs userPrefs \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" String hashedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" .hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return hashedPassword.equals(userPrefs.getAddressBookEncryptedPassword());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (isPasswordCorrect()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Case where password is correct","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // Access model to unlocked","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Logs current state","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" //Return command result","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" // Case where password is incorrect","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" throw new CommandException(MESSAGE_PASSWORD_INCORRECT);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":67}},{"path":"src/main/java/seedu/address/logic/commands/ViewAssignCommand.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Displays a list of all persons assigned to a specified task","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_WORD \u003d \"viewassign\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String COMMAND_ALIAS \u003d \"va\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Shows all persons assigned to a task\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" + \"Parameters: INDEX\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private final Index taskIndex;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" this.taskIndex \u003d taskIndex;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e tasksList \u003d model.getFilteredTaskList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" if (taskIndex.getZeroBased() \u003e\u003d tasksList.size()) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToFind \u003d tasksList.get(taskIndex.getZeroBased());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model.viewAssignees(taskToFind);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" || other instanceof ViewAssignCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskIndex.equals(((ViewAssignCommand) other).taskIndex);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":48}},{"path":"src/main/java/seedu/address/logic/parser/AddCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new AddCommand object","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class AddCommandParser implements Parser\u003cAddCommand\u003e {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the AddCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * and returns an AddCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (arePrefixesPresent(argMultimap, PREFIX_TASK, PREFIX_TAG_FULL)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToAdd \u003d AddTaskCommandParser.constructTask(args);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new AddTaskCommand(taskToAdd);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_TAG_FULL)) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return new AddTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson personToAdd \u003d AddPersonCommandParser.constructPerson(args);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return new AddPersonCommand(personToAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28,"-":23}},{"path":"src/main/java/seedu/address/logic/parser/AddPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS_PRIVATE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR_PRIVATE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL_PRIVATE;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME_PRIVATE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE_PRIVATE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK_PRIVATE;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_PRIVATE;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ReadOnlyPerson object in the context of AddPersonCommand.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"public class AddPersonCommandParser extends AddCommandParser {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" * Constructs a ReadOnlyPerson from the arguments provided.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public static ReadOnlyPerson constructPerson(String args) throws ParseException {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_REMARK,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_AVATAR, PREFIX_TAG, PREFIX_NAME_PRIVATE, PREFIX_PHONE_PRIVATE, PREFIX_EMAIL_PRIVATE,","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_ADDRESS_PRIVATE, PREFIX_REMARK_PRIVATE, PREFIX_TAG_PRIVATE, PREFIX_AVATAR_PRIVATE);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME)","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" || (arePrefixesPresent(argMultimap, PREFIX_NAME_PRIVATE)))) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d makeName(argMultimap);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d makePhone(argMultimap);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d makeEmail(argMultimap);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d mmakeAddress(argMultimap);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d makeAvatar(argMultimap);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d makeRemark(argMultimap);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e tagList \u003d ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson person \u003d new Person(name, phone, email, address, false, remark, avatar, tagList);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" return person;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Name based on the input arguments","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" private static Name makeName(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" Name name;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return name;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Phone based on the input arguments","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" private static Phone makePhone(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_PHONE))) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).get();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_PHONE_PRIVATE)) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d new Phone(null);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" return phone;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Email based on the input arguments","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" private static Email makeEmail(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" Email email;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_EMAIL))) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).get();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_EMAIL_PRIVATE)) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d new Email(null);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" return email;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Address based on the input arguments","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" private static Address mmakeAddress(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" Address address;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_ADDRESS))) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).get();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_ADDRESS_PRIVATE)) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d new Address(null);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return address;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Creates an Avatar based on the input arguments","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" private static Avatar makeAvatar(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" Avatar avatar;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_AVATAR))) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).get();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d new Avatar(null);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" return avatar;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" * Creates a Remark based on the input arguments","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" private static Remark makeRemark(ArgumentMultimap argMultimap) throws IllegalValueException {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" if ((arePrefixesPresent(argMultimap, PREFIX_REMARK))) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).get();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" } else if (arePrefixesPresent(argMultimap, PREFIX_REMARK_PRIVATE)) {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK_PRIVATE), true).get();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d new Remark(null);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" return remark;","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":164,"Esilocke":2}},{"path":"src/main/java/seedu/address/logic/parser/AddTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new AddTagCommand object","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParser extends AddCommandParser {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the AddTagCommand","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * and returns a AddTagCommand object for execution.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public AddTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d toArrayList(indexes);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" return new AddTagCommand(toAdd, indexList);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" protected static ArrayList\u003cIndex\u003e toArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":63}},{"path":"src/main/java/seedu/address/logic/parser/AddTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ReadOnlyTask object in the context of AddTaskCommand.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParser extends AddCommandParser {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Constructs a ReadOnlyTask from the arguments provided.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static ReadOnlyTask constructTask(String args) throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_DESCRIPTION, PREFIX_DEADLINE, PREFIX_PRIORITY,","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" PREFIX_ADDRESS, PREFIX_TASK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" if (!(arePrefixesPresent(argMultimap, PREFIX_NAME))) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" TaskName name;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Description description;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Deadline deadline;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Priority priority;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" TaskAddress address;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" name \u003d ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).get();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" description \u003d arePrefixesPresent(argMultimap, PREFIX_DESCRIPTION)","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION)).get()","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" : new Description(null);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" deadline \u003d arePrefixesPresent(argMultimap, PREFIX_DEADLINE)","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).get()","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" : new Deadline(null);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" priority \u003d arePrefixesPresent(argMultimap, PREFIX_PRIORITY)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).get()","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" : new Priority(null);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" address \u003d arePrefixesPresent(argMultimap, PREFIX_ADDRESS)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" ? ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS)).get()","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" : new TaskAddress(null);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, address);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":67}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"public class AddressBookParser {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_NO_ACCESS \u003d \"Not allowed! You must unlock before\"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" + \" making any changes.\\n\" + UnlockCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * @param userInput full user input string","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @return the command based on the user input","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // Check lock state","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Parsing command. Lock state is currently: \" + Boolean.toString(lockState));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" Command result \u003d processNonCrudCommands(commandWord, arguments);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" if (result !\u003d null) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" return result;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // Test for lock. If locked, return no access message","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" if (lockState) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(MESSAGE_NO_ACCESS);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" case AddCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" case AssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" return new AssignTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" case DismissCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return new DismissTaskCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" case ChangePrivacyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" case PrivacyLevelCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" case ThemeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" case EditCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" case SetCompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" return new SetTaskCompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" case SetIncompleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" return new SetTaskIncompleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" case DeleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" case ClearCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" return new ClearCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" case FavouriteListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteListCommand();","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" case UnfavouriteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" case TagListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" return new TagListCommand();","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" case HistoryCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" return new HistoryCommand();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" case UndoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" return new UndoCommand();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" case RedoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" return new RedoCommand();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" case ChangePasswordCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" case ViewAssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" * Checks for non crud command words or aliases and returns the relevant commmand if there is one.","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" * Otherwise control is returned back to the original parseCommand method.","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" * Note: Code was refactored due to codacy\u0027s recommendation that there was a problem with parseCommand\u0027s","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" * NPath complexity (i.e. it the code was too long. Makes it less readable and prone to errors)","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" * @param commandWord","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" * @param arguments","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" private Command processNonCrudCommands(String commandWord, String arguments) throws ParseException {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" // Cases for CRUD related functionality and for locking and unlocking","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" case OpenCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return new OpenCommand();","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" case SaveAsCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" return new SaveAsCommand();","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" case SelectCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return new SelectCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" case LocateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" return new LocateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" case NavigateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" return new NavigateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" case BackupCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" case FontSizeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":" case LockCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" return new LockCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":" case UnlockCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" return null;","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":106,"jeffreygohkw":19,"Esilocke":25,"wangyiming1019":29,"-":70}},{"path":"src/main/java/seedu/address/logic/parser/AssignTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code AssignCommand} object**/","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class AssignTaskCommandParser implements Parser\u003cAssignCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the AssignCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an AssignCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public AssignCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TARGET);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_TARGET).isPresent()) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_TARGET).get();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new AssignCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/main/java/seedu/address/logic/parser/BackupCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":" * Parses arguments for backup command and returns a BackupCommand instance. Arguments should consist of only one","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * filepath.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class BackupCommandParser implements Parser\u003cBackupCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 1;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * Parses the given user input and backs up data into a separate file name.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @param userInput","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public BackupCommand parse(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d userInput.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BackupCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new BackupCommand(trimmedArgs);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ChangePasswordCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new ChangePassword object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandParser implements Parser\u003cChangePasswordCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePasswordCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a ChangePasswordCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public ChangePasswordCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" .tokenize(args, PREFIX_PASSWORD, PREFIX_NEW_PASSWORD, PREFIX_CONFIRM_PASSWORD);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" // Check and split arguments before passing them to ChangePasswordCommand","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_NEW_PASSWORD).isPresent()","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" || !argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).isPresent()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String password \u003d argMultimap.getValue(PREFIX_PASSWORD).get();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String newPassword \u003d argMultimap.getValue(PREFIX_NEW_PASSWORD).get();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" String confirmPassword \u003d argMultimap.getValue(PREFIX_CONFIRM_PASSWORD).get();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new ChangePasswordCommand(password, newPassword, confirmPassword);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":38}},{"path":"src/main/java/seedu/address/logic/parser/ChangePrivacyCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ChangePrivacyCommand object","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParser implements Parser\u003cChangePrivacyCommand\u003e {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ChangePrivacyCommand","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ChangePrivacyCommand object for execution.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public ChangePrivacyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_REMARK);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" Index index;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" checkName(argMultimap, pps);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" checkPhone(argMultimap, pps);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" checkEmail(argMultimap, pps);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" checkAddress(argMultimap, pps);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkRemark(argMultimap, pps);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" if (!pps.isAnyFieldNonNull()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return new ChangePrivacyCommand(index, pps);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the name prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" private void checkName(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).isPresent()) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_NAME).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the phone prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" private void checkPhone(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_PHONE).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the email prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" private void checkEmail(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_EMAIL).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" private void checkAddress(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_ADDRESS).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" * Checks the input under the address prefix and sets the PersonPrivacySettings depending on the input","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * @param argMultimap The input arguments of the Command","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" * @param pps The PersonPrivacySettings to modify","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the input is neither true nor false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" private void checkRemark(ArgumentMultimap argMultimap, PersonPrivacySettings pps) throws ParseException {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[true]\")) {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" } else if (argMultimap.getValue(PREFIX_REMARK).toString().equals(\"Optional[false]\")) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":152}},{"path":"src/main/java/seedu/address/logic/parser/ClearCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ClearCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParser implements Parser\u003cClearCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments and returns a {@code ClearCommand}","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * that either clears the {@code Person} list, the {@code Task} list, or both.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public ClearCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null || args.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_PERSON).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_PERSON).isPresent()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new ClearPersonCommand();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return new ClearTaskCommand();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PERSON \u003d new Prefix(\"person/\");","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TAG_FULL \u003d new Prefix(\"tag/\");","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"v/\");","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAME_PRIVATE \u003d new Prefix(\"pn/\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_PHONE_PRIVATE \u003d new Prefix(\"pp/\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_EMAIL_PRIVATE \u003d new Prefix(\"pe/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_ADDRESS_PRIVATE \u003d new Prefix(\"pa/\");","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_REMARK_PRIVATE \u003d new Prefix(\"pr/\");","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_TAG_PRIVATE \u003d new Prefix(\"pt/\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_AVATAR_PRIVATE \u003d new Prefix(\"pv/\");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TASK \u003d new Prefix(\"task/\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DEADLINE \u003d new Prefix(\"by/\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_DESCRIPTION \u003d new Prefix(\"d/\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_PRIORITY \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_TARGET \u003d new Prefix(\"to/\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_FROM \u003d new Prefix(\"from/\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public static final Prefix PREFIX_STATE \u003d new Prefix(\"done/\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_PERSON \u003d new Prefix(\"fp/\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_TASK \u003d new Prefix(\"ft/\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_FROM_ADDRESS \u003d new Prefix(\"fa/\");","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_PERSON \u003d new Prefix(\"tp/\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_TASK \u003d new Prefix(\"tt/\");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static final Prefix PREFIX_NAVIGATE_TO_ADDRESS \u003d new Prefix(\"ta/\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_NEW_PASSWORD \u003d new Prefix(\"np/\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public static final Prefix PREFIX_CONFIRM_PASSWORD \u003d new Prefix(\"cfp/\");","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":14,"Esilocke":9,"-":15}},{"path":"src/main/java/seedu/address/logic/parser/DeleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new DeleteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class DeleteCommandParser implements Parser\u003cDeleteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an DeleteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public DeleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String filteredString \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommandParser().parse(filteredString);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return new DeleteTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommandParser().parse(args);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/DeletePersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParser extends DeleteCommandParser {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeletePersonCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeletePersonCommand(index);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new DeleteTagCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParser implements Parser\u003cDeleteTagCommand\u003e {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the DeleteTagCommand","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" * and returns a DeleteTagCommand object for execution.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public DeleteTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" String indexes \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String tagName \u003d argMultimap.getValue(PREFIX_TAG).orElse(\"\");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" if (indexes.trim().isEmpty()) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d convertToArrayList(indexes);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" return new DeleteTagCommand(toDelete, indexList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" * Returns an ArrayList of the indexes in the given {@code String}","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" private static ArrayList\u003cIndex\u003e convertToArrayList(String indexes) throws IllegalValueException {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexList \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" String[] indexArray \u003d indexes.split(\" \");","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" for (String s: indexArray) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" if (!s.isEmpty()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexList.add(ParserUtil.parseIndex(s));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" return indexList;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":69}},{"path":"src/main/java/seedu/address/logic/parser/DeleteTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParser {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeleteTaskCommand object in the context of DeleteTaskCommand.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public DeleteTaskCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" return new DeleteTaskCommand(index);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":25}},{"path":"src/main/java/seedu/address/logic/parser/DismissTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments, and creates a new {@code DismissCommand} object**/","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class DismissTaskCommandParser implements Parser\u003cDismissCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the DismissCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * and returns an DismissCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public DismissCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_FROM);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" if (!argMultimap.getValue(PREFIX_FROM).isPresent()) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, DismissCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String target \u003d argMultimap.getValue(PREFIX_FROM).get();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String persons \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetIndexes \u003d ParserUtil.parseIndexes(target);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d ParserUtil.parseIndexes(persons);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (targetIndexes.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } else if (personIndexes.size() \u003c 1) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Index taskIndex \u003d targetIndexes.get(0);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return new DismissCommand(personIndexes, taskIndex);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":39}},{"path":"src/main/java/seedu/address/logic/parser/EditCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new EditCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class EditCommandParser implements Parser\u003cEditCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the EditCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * and returns an EditCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TASK.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommandParser().constructTaskDescriptor(filteredArgs);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommandParser().constructPersonDescriptor(args);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":16,"-":22}},{"path":"src/main/java/seedu/address/logic/parser/EditPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditPersonCommand object","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParser extends EditCommandParser {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditPersonCommand that edits a Person object. **/","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public EditPersonCommand constructPersonDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" PREFIX_REMARK, PREFIX_AVATAR, PREFIX_TAG);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.EditPersonDescriptor editPersonDescriptor \u003d new EditPersonCommand.EditPersonDescriptor();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editPersonDescriptor::setName);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE)).ifPresent(editPersonDescriptor::setPhone);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseEmail(argMultimap.getValue(PREFIX_EMAIL)).ifPresent(editPersonDescriptor::setEmail);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAddress(argMultimap.getValue(PREFIX_ADDRESS)).ifPresent(editPersonDescriptor::setAddress);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK)).ifPresent(editPersonDescriptor::setRemark);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(argMultimap.getValue(PREFIX_AVATAR)).ifPresent(editPersonDescriptor::setAvatar);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" parseTagsForEdit(argMultimap.getAllValues(PREFIX_TAG)).ifPresent(editPersonDescriptor::setTags);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" if (!editPersonDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return new EditPersonCommand(index, editPersonDescriptor);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e} if {@code tags} is non-empty.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" * If {@code tags} contain only one element which is an empty string, it will be parsed into a","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * {@code Set\u003cTag\u003e} containing zero tags.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Optional\u003cSet\u003cTag\u003e\u003e parseTagsForEdit(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assert tags !\u003d null;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" if (tags.isEmpty()) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" Collection\u003cString\u003e tagSet \u003d tags.size() \u003d\u003d 1 \u0026\u0026 tags.contains(\"\") ? Collections.emptySet() : tags;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return Optional.of(ParserUtil.parseTags(tagSet));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":74}},{"path":"src/main/java/seedu/address/logic/parser/EditTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INVALID_TAG_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and creates a new EditTagCommand object */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParser implements Parser\u003cEditTagCommand\u003e {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String EDITTAG_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}\\\\s]+[\\\\p{Alnum}]+\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public static final int EXPECTED_NUMBER_OF_ARGS \u003d 2;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the EditTagCommand","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * and returns an EditTagCommand object for execution.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!args.matches(EDITTAG_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" tags \u003d readTags(trimmed);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_TAG_NAME);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" if (tags.size() !\u003d EXPECTED_NUMBER_OF_ARGS) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Tag toChange \u003d tags.get(0);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d tags.get(1);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (toChange.equals(newTag)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTagCommand(toChange, newTag);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /** Atempts to read the string and parse it into a Tag set*/","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cTag\u003e readTags(String args) throws IllegalValueException {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" String[] splittedArgs \u003d args.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cTag\u003e tagList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (String s : splittedArgs) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(s);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" tagList.add(newTag);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return tagList;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/main/java/seedu/address/logic/parser/EditTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new EditTaskCommand object","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParser extends EditCommandParser {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /** Constructs a new EditTaskCommand that edits a Task object. **/","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskCommand constructTaskDescriptor(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_NAME, PREFIX_DESCRIPTION,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" PREFIX_DEADLINE, PREFIX_PRIORITY, PREFIX_ADDRESS);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Index index;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor editTaskDescriptor \u003d new EditTaskCommand.EditTaskDescriptor();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(argMultimap.getValue(PREFIX_NAME)).ifPresent(editTaskDescriptor::setTaskName);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(argMultimap.getValue(PREFIX_DESCRIPTION))","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setDescription);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(argMultimap.getValue(PREFIX_DEADLINE)).ifPresent(editTaskDescriptor::setDeadline);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(argMultimap.getValue(PREFIX_PRIORITY)).ifPresent(editTaskDescriptor::setPriority);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(argMultimap.getValue(PREFIX_ADDRESS))","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .ifPresent(editTaskDescriptor::setTaskAddress);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(ive.getMessage(), ive);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (!editTaskDescriptor.isAnyFieldEdited()) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return new EditTaskCommand(index, editTaskDescriptor);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/main/java/seedu/address/logic/parser/FavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParser implements Parser\u003cFavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public FavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/FindCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new FindCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class FindCommandParser implements Parser\u003cFindCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the FindCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * and returns an FindCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public FindCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK, PREFIX_TAG_FULL);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent() \u0026\u0026 argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommandParser().parse(args);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" } else if (argMultimap.getValue(PREFIX_TAG_FULL).isPresent()) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String filteredArgs \u003d args.replace(PREFIX_TAG_FULL.getPrefix(), \" \");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return new FindTagCommandParser().parse(filteredArgs);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommandParser().parse(args);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/FindPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindPersonCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParser extends FindCommandParser {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindPersonCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an FindPersonCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public FindPersonCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" return new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(nameKeywords)));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/FindTagCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new FindTagCommand object","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParser implements Parser\u003cFindTagCommand\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the FindTagCommand","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * and returns an FindTagCommand object for execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" public FindTagCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" String[] tagKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cString\u003e tagToFindList \u003d new ArrayList\u003cString\u003e();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" for (String tagToFind : tagKeywords) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" tagToFindList.add(tagToFind);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" return new FindTagCommand(new NameContainsTagsPredicate(tagToFindList));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":37}},{"path":"src/main/java/seedu/address/logic/parser/FindTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_STATE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new FindTaskCommand object","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandParser extends FindCommandParser {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the FindTaskCommand","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * and returns an FindTaskCommand object for execution.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public FindTaskCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String argsWithNoTaskPrefix \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\");","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(argsWithNoTaskPrefix, PREFIX_PRIORITY, PREFIX_STATE);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String keywords \u003d argMultimap.getPreamble();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" String trimmedArgs \u003d keywords.trim();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityFindRequired \u003d argMultimap.getValue(PREFIX_PRIORITY).isPresent();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" boolean isStateFindRequired \u003d argMultimap.getValue(PREFIX_STATE).isPresent();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" int minPriority \u003d 0;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" boolean isComplete \u003d false;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (isPriorityFindRequired) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" minPriority \u003d parsePriority(argMultimap.getValue(PREFIX_PRIORITY).get());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" if (isStateFindRequired) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" isComplete \u003d parseState(argMultimap.getValue(PREFIX_STATE).get());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" String[] nameKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" return new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(nameKeywords),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" isStateFindRequired, isPriorityFindRequired, isComplete, minPriority));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns an integer corresponding to its value","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Guarantees: The specified value is valid as a priority value","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private int parsePriority(String args) throws ParseException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" if (args \u003d\u003d null) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(Priority.MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" int priority;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.parseInt(args.trim());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (priority \u003c 1 || priority \u003e 5) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_PRIORITY);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return priority;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" * Parses the given string, and returns a boolean value corresponding to its value","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" private boolean parseState(String args) throws ParseException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" if (\"true\".equals(trimmed) || \"false\".equals(trimmed)) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return Boolean.valueOf(trimmed);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(FindTaskCommand.MESSAGE_INVALID_COMPLETE_VALUE);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/logic/parser/FontSizeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParser implements Parser\u003cFontSizeCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final int PARAMETER_POSITION \u003d 0;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the FontSizeCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a FontSizeCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public FontSizeCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d 1) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FontSizeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" if (!FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" || !FontSizeCommand.ACCEPTED_PARAMETERS.contains(argKeywords[PARAMETER_POSITION])) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, FontSizeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" return new FontSizeCommand(argKeywords[PARAMETER_POSITION]);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":48}},{"path":"src/main/java/seedu/address/logic/parser/LocateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new LocateCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParser implements Parser\u003cLocateCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the LocateCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an LocateCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public LocateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" return new LocateCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/main/java/seedu/address/logic/parser/LockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"public class LockCommandParser implements Parser\u003cLockCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the LockCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * and returns a LockCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public LockCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[0]);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return new LockCommand(passwordKeywords[1]);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":36}},{"path":"src/main/java/seedu/address/logic/parser/NavigateCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new NavigateCommand object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParser implements Parser\u003cNavigateCommand\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" private Location from \u003d null;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" private Location to \u003d null;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Index fromIndex \u003d null;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Index toIndex \u003d null;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the NavigateCommand","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an NavigateCommand object for execution.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public NavigateCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" resetValues();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" ArgumentMultimap argumentMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_NAVIGATE_FROM_PERSON,","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_FROM_TASK, PREFIX_NAVIGATE_FROM_ADDRESS, PREFIX_NAVIGATE_TO_PERSON,","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" PREFIX_NAVIGATE_TO_TASK, PREFIX_NAVIGATE_TO_ADDRESS);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_ADDRESS);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_PERSON);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_FROM_TASK);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" boolean toAddress \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_ADDRESS);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" boolean toPerson \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_PERSON);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" boolean toTask \u003d arePrefixesPresent(argumentMultimap, PREFIX_NAVIGATE_TO_TASK);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" checkFrom(argumentMultimap, fromAddress, fromPerson, fromTask);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" checkTo(argumentMultimap, toAddress, toPerson, toTask);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" return new NavigateCommand(from, to, fromIndex, toIndex, fromTask, toTask);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" * Resets the values stored in NavigateCommandParser object to null","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void resetValues() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d null;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d null;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d null;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d null;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * Checksif only 1 To argument is provided","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no To arguments or there are more than 1 To arguements","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" private void checkTo(ArgumentMultimap argumentMultimap, boolean toAddress, boolean toPerson, boolean toTask)","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" if (!(toAddress || toPerson || toTask)) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((toAddress \u0026\u0026 (toPerson || toTask)) || (toPerson \u0026\u0026 toTask)) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more to prefixes are present","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, toAddress, toPerson, false);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if only 1 From argument is provided","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if there are no From arguments or there are more than 1 From arguments","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" private void checkFrom(ArgumentMultimap argumentMultimap, boolean fromAddress, boolean fromPerson, boolean fromTask)","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" throws ParseException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (!(fromAddress || fromPerson || fromTask)) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if ((fromAddress \u0026\u0026 (fromPerson || fromTask)) || (fromPerson \u0026\u0026 fromTask)) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" // If 2 or more from prefixes are present","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" setArgsForNavigateCommand(argumentMultimap, fromAddress, fromPerson, true);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(e.getMessage(), e);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" private void setArgsForNavigateCommand(ArgumentMultimap argumentMultimap, boolean address, boolean person,","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" boolean forFrom) throws IllegalValueException {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" if (address) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_FROM_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(ParserUtil.parseLocationFromAddress(","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" argumentMultimap.getValue(PREFIX_NAVIGATE_TO_ADDRESS)).get().toString());","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" } else if (person) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_PERSON).get());","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_PERSON).get());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" if (forFrom) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fromIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_FROM_TASK).get());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" toIndex \u003d ParserUtil.parseIndex(argumentMultimap","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" .getValue(PREFIX_NAVIGATE_TO_TASK).get());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":144}},{"path":"src/main/java/seedu/address/logic/parser/ParserUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Contains utility methods used for parsing strings in the various *Parser classes.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * {@code ParserUtil} contains methods that take in {@code Optional} as parameters. However, it goes against Java\u0027s","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * convention (see https://stackoverflow.com/a/39005452) as {@code Optional} should only be used a return type.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Justification: The methods in concern receive {@code Optional} return values from other methods as parameters and","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * return {@code Optional} values based on whether the parameters were present. Therefore, it is redundant to unwrap the","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * initial {@code Optional} before passing to {@code ParserUtil} as a parameter and then re-wrap it into an","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * {@code Optional} return value inside {@code ParserUtil} methods.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtil {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_INDEX \u003d \"Index is not a non-zero unsigned integer.\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INSUFFICIENT_PARTS \u003d \"Number of parts must be more than 1.\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME \u003d \"task\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Parses {@code oneBasedIndex} into an {@code Index} and returns it. Leading and trailing whitespaces will be","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * trimmed.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the specified index is invalid (not non-zero unsigned integer).","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static Index parseIndex(String oneBasedIndex) throws IllegalValueException {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" String trimmedIndex \u003d oneBasedIndex.trim();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (!StringUtil.isNonZeroUnsignedInteger(trimmedIndex)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return Index.fromOneBased(Integer.parseInt(trimmedIndex));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e name} into an {@code Optional\u003cName\u003e} if {@code name} is present.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Name to be private if true.","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cName\u003e parseName(Optional\u003cString\u003e name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" return name.isPresent() ? Optional.of(new Name(name.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e phone} into an {@code Optional\u003cPhone\u003e} if {@code phone} is present.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Phone to be private if true.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cPhone\u003e parsePhone(Optional\u003cString\u003e phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" return phone.isPresent() ? Optional.of(new Phone(phone.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e address} into an {@code Optional\u003cAddress\u003e} if {@code address} is present.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Address to be private if true.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAddress\u003e parseAddress(Optional\u003cString\u003e address, boolean isPrivate)","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new Address(address.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e avatar} into an {@code Optional\u003cAddress\u003e} if {@code avatar} is present.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cAvatar\u003e parseAvatar(Optional\u003cString\u003e avatar) throws IllegalValueException {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(avatar);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" return avatar.isPresent() ? Optional.of(new Avatar(avatar.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e remark} into an {@code Optional\u003cRemark\u003e} if {@code remark} is present.","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Remark to be private if true.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cRemark\u003e parseRemark(Optional\u003cString\u003e remark, boolean isPrivate)","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" return remark.isPresent() ? Optional.of(new Remark(remark.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a {@code Optional\u003cString\u003e email} into an {@code Optional\u003cEmail\u003e} if {@code email} is present.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Takes in a (@code boolean getIsPrivate) which will set the Email to be private if true.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * See header comment of this class regarding the use of {@code Optional} parameters.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cEmail\u003e parseEmail(Optional\u003cString\u003e email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" return email.isPresent() ? Optional.of(new Email(email.get(), isPrivate)) : Optional.empty();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" * Parses {@code Collection\u003cString\u003e tags} into a {@code Set\u003cTag\u003e}.","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e parseTags(Collection\u003cString\u003e tags) throws IllegalValueException {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" requireNonNull(tags);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tagSet \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" for (String tagName : tags) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" tagSet.add(new Tag(tagName));","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" return tagSet;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code TaskName} if it is present.","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cTaskName\u003e parseTaskName(Optional\u003cString\u003e name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" return name.isPresent() ? Optional.of(new TaskName(name.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Description} if it is present.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDescription\u003e parseDescription(Optional\u003cString\u003e description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" requireNonNull(description);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" return description.isPresent() ? Optional.of(new Description(description.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Deadline} if it is present.","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cDeadline\u003e parseDeadline(Optional\u003cString\u003e deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" requireNonNull(deadline);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" return deadline.isPresent() ? Optional.of(new Deadline(deadline.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Parses a string into a {@code Priority} if it is present.","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" public static Optional\u003cPriority\u003e parsePriority(Optional\u003cString\u003e priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" requireNonNull(priority);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return priority.isPresent() ? Optional.of(new Priority(priority.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a {@code TaskAddress} if it is present.","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cTaskAddress\u003e parseTaskAddress(Optional\u003cString\u003e address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" return address.isPresent() ? Optional.of(new TaskAddress(address.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"jeffreygohkw"},"content":" * Parses a string into a (@code Location) if it is present.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"jeffreygohkw"},"content":" public static Optional\u003cLocation\u003e parseLocationFromAddress(Optional\u003cString\u003e location) throws IllegalValueException {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(location);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"jeffreygohkw"},"content":" return location.isPresent() ? Optional.of(new Location(location.get())) : Optional.empty();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} and returns an ArrayList of Indexes that correspond to","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" * the value in the String.","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if any of the values in the String cannot be converted into an {@code Index}","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" public static ArrayList\u003cIndex\u003e parseIndexes(String args) throws ParseException {","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" String[] splitted \u003d args.split(\" \");","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e targetsToAdd \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" int parsedInt;","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" for (String s : splitted) {","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" if (!s.isEmpty()) {","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" parsedInt \u003d Integer.parseInt(s);","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" targetsToAdd.add(Index.fromOneBased(parsedInt));","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException nfe) {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" return targetsToAdd;","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":123,"Esilocke":64,"-":66}},{"path":"src/main/java/seedu/address/logic/parser/PrivacyLevelCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new PrivacyLevelCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParser implements Parser\u003cPrivacyLevelCommand\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the PrivacyLevelCommand","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an PrivacyLevelCommand object for execution.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public PrivacyLevelCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" int level \u003d ParserUtil.parseIndex(args).getOneBased();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return new PrivacyLevelCommand(level);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, PrivacyLevelCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":27}},{"path":"src/main/java/seedu/address/logic/parser/SelectCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Parses input arguments and creates a new SelectCommand object","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class SelectCommandParser implements Parser\u003cSelectCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Parses the given {@code String} of arguments in the context of the SelectCommand","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * and returns an SelectCommand object for execution.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public SelectCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_TASK);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" if (argMultimap.getValue(PREFIX_TASK).isPresent()) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String trimmed \u003d args.replaceFirst(PREFIX_TASK.getPrefix(), \"\").trim();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommandParser().parse(trimmed);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommandParser().parse(args);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":20}},{"path":"src/main/java/seedu/address/logic/parser/SelectPersonCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectPersonCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParser extends SelectCommandParser {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectPersonCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectPersonCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectPersonCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectPersonCommand(index);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SelectTaskCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new SelectTaskCommand object","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParser extends SelectCommandParser {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SelectTaskCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SelectTaskCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SelectTaskCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" Index index \u003d extractIndex(args);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return new SelectTaskCommand(index);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Extracts one index from the provided string and returns it","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the string does not contain a valid index","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Index extractIndex(String args) throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskCompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetCompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskCompleteCommandParser implements Parser\u003cSetCompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetCompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetCompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetCompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SetTaskIncompleteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"/** Parses input arguments and returns a {@code SetIncompleteCommand} that changes the state of the given command */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SetTaskIncompleteCommandParser implements Parser\u003cSetIncompleteCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Parses the given {@code String} of arguments in the context of the SetIncompleteCommand","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * and returns an SetIncompleteCommand object for execution.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return new SetIncompleteCommand(index);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_INVALID_INPUT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and creates a new SortCommand object based on the field and order parameters provided","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final int LIST_ARG_POSITION \u003d 0;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int FIELD_ARG_POSITION \u003d 1;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int ORDER_ARG_POSITION \u003d 2;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int SIZE_OF_ARG_ARRAY \u003d 3;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e PERSON_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(0, 4);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public static final List\u003cString\u003e TASK_FIELD_ARGS \u003d ACCEPTED_FIELD_PARAMETERS.subList(4, 6);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the SortCommand","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" * and returns a SortCommand object for execution.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public SortCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Eliminate spaces","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s\");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" // Converts arg arrays to lower case to account for caps entries","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" if (argKeywords.length !\u003d SIZE_OF_ARG_ARRAY","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(0))","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 TASK_FIELD_ARGS.contains(argKeywords[1]))","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" || (argKeywords[0].equals(ACCEPTED_LIST_PARAMETERS.get(1))","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 PERSON_FIELD_ARGS.contains(argKeywords[1]))) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" if (!SortCommand.ACCEPTED_FIELD_PARAMETERS.contains(argKeywords[FIELD_ARG_POSITION])","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_ORDER_PARAMETERS.contains(argKeywords[ORDER_ARG_POSITION])","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" || !SortCommand.ACCEPTED_LIST_PARAMETERS.contains(argKeywords[LIST_ARG_POSITION])) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_INPUT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // If there are no problems with the input, return a new instance of SortCommand","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return new SortCommand(argKeywords[LIST_ARG_POSITION],","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" argKeywords[FIELD_ARG_POSITION], argKeywords[ORDER_ARG_POSITION]);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":66}},{"path":"src/main/java/seedu/address/logic/parser/ThemeCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" * Parses input arguments and creates a new ThemeCommand object","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParser implements Parser\u003cThemeCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" * Parses the given {@code String} of arguments in the context of the ThemeCommand","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * and returns an ThemeCommand object for execution.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public ThemeCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" String trimmed \u003d args.trim();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" if (trimmed.isEmpty() || trimmed \u003d\u003d null) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return new ThemeCommand(trimmed);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/logic/parser/UnfavouriteCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" * Parses input arguments and creates a new UnfavouriteCommand object","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParser implements Parser\u003cUnfavouriteCommand\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" * Parses the given {@code String} of arguments in the context of the UnfavouriteCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" * and returns an UnfavouriteCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" public UnfavouriteCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" return new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":30}},{"path":"src/main/java/seedu/address/logic/parser/UnlockCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" * Parses input arguments and returns a new LockCommand object","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"public class UnlockCommandParser implements Parser\u003cUnlockCommand\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d \"Password is required\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" * Parses the given {@code String} of arguments in the context of the UnlockCommand","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" * and returns a UnlockCommand object for execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public UnlockCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" ArgumentMultimap argMultimap \u003d ArgumentTokenizer.tokenize(args, PREFIX_PASSWORD);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" if (!argMultimap.getValue(PREFIX_PASSWORD).isPresent()) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[0]);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" String[] passwordKeywords \u003d trimmedArgs.split(PREFIX_PASSWORD.getPrefix());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return new UnlockCommand(passwordKeywords[1]);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":37}},{"path":"src/main/java/seedu/address/logic/parser/ViewAssignCommandParser.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new ViewAssignCommand object","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParser implements Parser\u003cViewAssignCommand\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Parses input arguments and creates a new DeletePersonCommand object in the context of DeletePersonCommand.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public ViewAssignCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" Index index \u003d ParserUtil.parseIndex(args);","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return new ViewAssignCommand(index);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":24}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.UniqueTaskList;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private final UniqueTaskList tasks;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private HashMap\u003cString, String\u003e styleMap;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * among constructors.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" styleMap \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public AddressBook() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" initialiseStyleMap();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" //// list overwrite operations","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" this.tasks.setTasks(tasks);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" assert false : \"AddressBooks should not have duplicate persons\";","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assert false : \"AddressBooks should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Resets only the existing contact or task data of this {@code AddressBook}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" requireNonNull(type);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" setTasks(newData.getTasksList());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" } else if (type.equals(PREFIX_PERSON)) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasks.clearAssignees();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" setPersons(newData.getPersonList());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" syncMasterTagListWith(persons);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Type must either be persons or tasks\");","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate persons\";","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assert false : \"Address books should not have duplicate tasks\";","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" //// person-level operations","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson p) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Person newPerson \u003d new Person(p);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" syncMasterTagListWith(newPerson);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" persons.add(newPerson);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedReadOnlyPerson}.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedReadOnlyPerson)","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" requireNonNull(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new Person(editedReadOnlyPerson);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" syncMasterTagListWith(editedPerson);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" persons.setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void sortPersonsBy(String field, String order) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" persons.sortBy(field, order);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * Sorts persons in person list by any field, in either ascending or descending order","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" public void sortTasksBy(String field, String order) {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" tasks.sortBy(field, order);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the index of {@code ReadOnlyPerson} specified","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractPersonIndexes(ArrayList\u003cReadOnlyPerson\u003e personsToExtract) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" return persons.extractIndexes(personsToExtract);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the given person {@code target} to this {@code AddressBook}.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"wangyiming1019"},"content":" persons.favouritePerson(target);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the given person {@code target} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if the {@code target} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"wangyiming1019"},"content":" persons.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Ensures that every tag in this person:","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(Person person) {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" // used for checking person tag references","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" person.setTags(correctTagReferences);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Ensures that every tag in these persons:","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * - exists in the master list {@link #tags}","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" * - points to a Tag object in the master list","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" * @see #syncMasterTagListWith(Person)","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" private void syncMasterTagListWith(UniquePersonList persons) {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" persons.forEach(this::syncMasterTagListWith);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" public boolean removePerson(ReadOnlyPerson key) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the UniquePersonList","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" return persons.getMappings();","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" //// tag-level operations","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" tags.add(t);","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" //// task-level operations","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the address book.","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if an equivalent task already exists.","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask t) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" Task newTask \u003d new Task(t);","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" tasks.add(newTask);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" public boolean removeTask(ReadOnlyTask key) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" if (tasks.remove(key)) {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified person from all assignment lists for every task **/","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" public void removePersonFromAssignees(Index target) {","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" tasks.removeAssignee(target);","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" * Updates the Assignees for all tasks in the internal tasks list with their new mappings","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" public void updateTaskAssigneeMappings(Index[] mappings) {","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" tasks.updateAssignees(mappings);","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} in the list with {@code editedReadOnlyTask}.","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedReadOnlyTask)","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new Task(editedReadOnlyTask);","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" tasks.setTask(target, editedTask);","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" //// theme-level operations","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Initialises the style map by adding the key value pairs","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" * for the strings that will be input in ThemeCommand and the file name of the .css file","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void initialiseStyleMap() {","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"dark\", \"/view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Dark\", \"/view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"light\", \"/view/LightTheme.css\");","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" styleMap.put(\"Light\", \"/view/LightTheme.css\");","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" return styleMap;","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" //// util methods","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\"","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" + tasks.asObservableList().size() + \" tasks\";","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":" // TODO: refine later","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" return persons.asObservableList();","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromPersonList(int index) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" return persons.asObservableList().get(index);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" return tasks.asObservableList();","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":" return tags.asObservableList();","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags))","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.tasks.equals(((AddressBook) other).tasks);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(persons, tags, tasks);","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":21,"jeffreygohkw":25,"Esilocke":131,"wangyiming1019":17,"-":193}},{"path":"src/main/java/seedu/address/model/Location.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Location in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidLocation(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class Location {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" \"Location can take any value, and it should not be blank\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" /*","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public static final String LOCATION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given location.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given location string is invalid.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public Location(String location) throws IllegalValueException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (location \u003d\u003d null) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidLocation(location)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d location;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid location.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidLocation(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(LOCATION_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof Location // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Location) other).value)); // state check","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The API of the Model component.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public interface Model {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" Predicate\u003cReadOnlyPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Predicate\u003cReadOnlyTask\u003e PREDICATE_SHOW_ALL_TASKS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /** Clears only part of the existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" void resetPartialData(ReadOnlyAddressBook newData, Prefix type);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /** Deletes given tag from specific persons */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Adds the given person */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" void addPerson(ReadOnlyPerson person) throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" /** Adds given tag to specific persons */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /** Edits the specified tag, and updates all instances in the address book */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" /** Favourites the given person */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" /** Unfavourites the given person */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" /** Adds the given task */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" void addTask(ReadOnlyTask task) throws DuplicateTaskException;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /** Deletes the given task */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Replaces the given task {@code target} with {@code editedTask}.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if updating the task\u0027s details causes the task to be equivalent to","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * another existing task in the list.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask assignedTask)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" /** Assigns all specified persons to the specified task */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask dismissedTask)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /** Changes the state of the specified task */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" void setAsComplete(ReadOnlyTask toSet, boolean isComplete) throws TaskNotFoundException, DuplicateTaskException;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /** Displays all persons assigned to the specified task */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" void viewAssignees(ReadOnlyTask task);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /** Returns an unmodifiable view of the filtered tasks list */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" * Updates the filter of the filtered task list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" * Sorts all persons in person list by chosen field in ascending (asc) or descending (desc) order","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" void sortPersons(String field, String order);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" * Sorts all tasks in task list by chosen field in ascending (asc) or descending (desc) order","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" void sortTasks(String field, String order);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" * Returns lock state. True means locked. False means unlocked","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" boolean getLockState();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" * Locks address book from model","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" void lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" * Unlock address book from model","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" void unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" * Returns a copy of the UserPrefs","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" UserPrefs getUserPrefs();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson getPersonAtIndexFromAddressBook(int index);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" void setTheme(String theme);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" String getTheme();","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" HashMap\u003cString, String\u003e getStyleMap();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":15,"Esilocke":58,"wangyiming1019":20,"-":46}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsFavouritePrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsKeywordsPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.NameContainsTagsPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.PersonCompleteMatchPredicate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ShowAllPrivacyLevelPredicate;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private final FilteredList\u003cReadOnlyPerson\u003e filteredPersons;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private final FilteredList\u003cReadOnlyTask\u003e filteredTasks;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" private final UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" this.userPrefs \u003d userPrefs;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" filteredTasks \u003d new FilteredList\u003c\u003e(this.addressBook.getTasksList());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d userPrefs.getTheme();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public ModelManager() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix type) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assert(type.equals(PREFIX_TASK) || type.equals(PREFIX_PERSON));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" if (type.equals(PREFIX_TASK)) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_TASK);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" addressBook.resetPartialData(newData, PREFIX_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" persons.add(target);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d addressBook.extractPersonIndexes(persons);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" Index personIndex \u003d personIndexes.get(0);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" addressBook.removePersonFromAssignees(personIndex);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Delete input tag from the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Person personWithoutTag \u003d new Person(personWithTag);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithoutTag.getTags());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" newTags.remove(toDelete);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" personWithoutTag.setTags(newTags);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithTag, personWithoutTag);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" public synchronized void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" * Adds input tag to the specific persons shown in the last list.","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" public synchronized void addTag(Tag toAdd, ArrayList\u003cIndex\u003e personIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":" for (int i \u003d 0; i \u003c personIndexes.size(); i++) {","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d personIndexes.get(i).getZeroBased();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personWithoutTag \u003d this.getFilteredPersonList().get(index);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" Person personWithTag \u003d new Person(personWithoutTag);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003cTag\u003e(personWithTag.getTags());","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" newTags.add(toAdd);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" personWithTag.setTags(newTags);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" addressBook.updatePerson(personWithoutTag, personWithTag);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(field, order);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" Index[] updatedIndexes \u003d addressBook.getMappings();","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" System.out.println(updatedIndexes.length);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" addressBook.updateTaskAssigneeMappings(updatedIndexes);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks(String field, String order) {","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(field, order);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" return userPrefs;","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return getUserPrefs().getAddressBookLockState();","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().lockAddressBook();","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" getUserPrefs().unlockAddressBook();","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * Replaces the toChange Tag with the newTag Tag, for all Person objects denoted by the indexes.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * Guarantees: indexes contains at least 1 person that has the toChange Tag.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public synchronized void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e indexes)","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" throws PersonNotFoundException, DuplicatePersonException {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e allPersons \u003d this.getFilteredPersonList();","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e personTags;","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" Person toUpdate;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson toRead;","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" int index;","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" for (Index i : indexes) {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" index \u003d i.getZeroBased();","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" toRead \u003d allPersons.get(index);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" toUpdate \u003d new Person(toRead);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" personTags \u003d new HashSet\u003c\u003e(toRead.getTags());","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" personTags.remove(toChange);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" personTags.add(newTag);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" toUpdate.setTags(personTags);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" addressBook.updatePerson(toRead, toUpdate);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" addressBook.favouritePerson(target);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" addressBook.unfavouritePerson(target);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":" public synchronized void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" addressBook.addTask(toAdd);","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" updateFilteredTaskList(PREDICATE_SHOW_ALL_TASKS);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":" public synchronized void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" addressBook.removeTask(toDelete);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" requireAllNonNull(target, editedTask);","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(target, editedTask);","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssignTo)","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToAssignTo.getAssignees();","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToAssign);","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d newAssignees.assign(positions);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneAdded) {","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToAssignTo, newAssignees);","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToAssignTo, updatedTask);","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismissFrom)","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d taskToDismissFrom.getAssignees();","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":" Assignees newAssignees \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e positions \u003d addressBook.extractPersonIndexes(personsToDismiss);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneDismissed \u003d newAssignees.dismiss(positions);","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" if (!atLeastOneDismissed) {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d constructTaskWithNewAssignee(taskToDismissFrom, newAssignees);","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" addressBook.updateTask(taskToDismissFrom, updatedTask);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d toSet.getTaskName();","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" Description description \u003d toSet.getDescription();","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d toSet.getDeadline();","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d toSet.getPriority();","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d toSet.getAssignees();","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d toSet.getTaskAddress();","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d isComplete;","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" if (state \u003d\u003d toSet.getCompleteState()) {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, assignees, state, taskAddress);","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" updateTask(toSet, updatedTask);","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d task.getAssignees();","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e internalList \u003d assignees.getList();","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e personsToShow \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" for (Index i : internalList) {","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" assert(i.getZeroBased() \u003c filteredPersons.size());","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" personsToShow.add(filteredPersons.get(i.getZeroBased()));","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" PersonCompleteMatchPredicate assignedPredicate \u003d new PersonCompleteMatchPredicate(personsToShow);","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" updateFilteredPersonList(assignedPredicate);","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code ReadOnlyPerson} backed by the internal list of","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" * {@code addressBook}","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(filteredTasks);","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 3) {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" if (predicate instanceof NameContainsKeywordsPredicate) {","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsKeywordsPrivacyLevelPredicate(((","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPredicate) predicate).getKeywords()));","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsTagsPredicate) {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsTagsPrivacyLevelPredicate(((","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsTagsPredicate) predicate).getTags()));","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate instanceof NameContainsFavouritePredicate) {","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new NameContainsFavouritePrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" } else if (predicate \u003d\u003d PREDICATE_SHOW_ALL_PERSONS) {","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" this.updateFilteredPersonList(new ShowAllPrivacyLevelPredicate());","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" filteredTasks.setPredicate(predicate);","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons)","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 filteredTasks.equals(other.filteredTasks);","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Utility methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" * Constructs a new {@code ReadOnlyTask} from an existing ReadOnlyTask, with the specified assignees list.","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyTask constructTaskWithNewAssignee(ReadOnlyTask originalTask, Assignees updatedAssignees) {","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" TaskName taskName \u003d originalTask.getTaskName();","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":" Description description \u003d originalTask.getDescription();","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d originalTask.getDeadline();","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d originalTask.getPriority();","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" Boolean state \u003d originalTask.getCompleteState();","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d originalTask.getTaskAddress();","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask updatedTask \u003d new Task(taskName, description, deadline, priority, updatedAssignees,","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" state, taskAddress);","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" return updatedTask;","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"jeffreygohkw"},"content":" if (level \u003c 1 || level \u003e 3) {","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy Level can only be 0, 1 or 2\");","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getPersonAtIndexFromPersonList(index);","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" userPrefs.setTheme(theme);","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" return theme;","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" return addressBook.getStyleMap();","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":72,"Esilocke":186,"wangyiming1019":58,"-":110}},{"path":"src/main/java/seedu/address/model/ReadOnlyAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Unmodifiable view of an address book","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public interface ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the persons list.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate persons.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObservableList\u003cReadOnlyPerson\u003e getPersonList();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the tags list.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This list will not contain any duplicate tags.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e getTagList();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns an unmodifiable view of the tasks list.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cReadOnlyTask\u003e getTasksList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":5,"-":24}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String addressBookFilePath \u003d \"data/addressbook.xml\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private String addressBookName \u003d \"My Address++\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private boolean addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private String addressBookEncryptedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" .hashString(\"password\", StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" private String theme;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public UserPrefs() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" this.setGuiSettings(1080, 720, 0, 0);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return addressBookFilePath;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public String getAddressBookName() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return addressBookName;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public String getAddressBookEncryptedPassword() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" return addressBookEncryptedPassword;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void setAddressBookEncryptedPassword(String addressBookPasswordInput) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" this.addressBookEncryptedPassword \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" .hashString(addressBookPasswordInput, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public void lockAddressBook() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d true;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public void unlockAddressBook() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" this.addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" public boolean getAddressBookLockState() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" return this.addressBookLockState;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookEncryptedPassword, o.addressBookEncryptedPassword)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nPassword : \" + addressBookEncryptedPassword);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" if (theme \u003d\u003d null) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" return \"/view/DarkTheme.css\";","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return theme;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" this.theme \u003d theme;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":35,"jeffreygohkw":12,"-":74}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.value \u003d ADDRESS_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" if (!isValidAddress(address)) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" public Address(String address, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this(address);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid person address.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":46}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s avatar filepath in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"public class Avatar {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" \"Person avatar can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public Avatar(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d AVATAR_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" if (!isValidAvatar(address)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidAvatar(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return test.matches(AVATAR_VALIDATION_REGEX) || test.equals(AVATAR_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Avatar // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":57,"jeffreygohkw":6}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Email {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" \"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d \"[\\\\w\\\\.]+@[\\\\w\\\\.]+\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String EMAIL_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Validates given email.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given email address string is invalid.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email) throws IllegalValueException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" if (email \u003d\u003d null) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.value \u003d EMAIL_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" String trimmedEmail \u003d email.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" if (!isValidEmail(trimmedEmail)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.value \u003d trimmedEmail;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" public Email(String email, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" this(email);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return test.matches(EMAIL_VALIDATION_REGEX) || test.equals(EMAIL_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Email\u003e\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":42,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/Name.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s name in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Name {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person names should only contain alphanumeric characters and spaces, and it should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[\\\\p{Alnum}][\\\\p{Alnum} ]*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public final String value;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" this.value \u003d trimmedName;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" public Name(String name, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" this(name);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person name.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Name\u003e\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" || (other instanceof Name // instanceof handles nulls","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.value.equals(((Name) other).value)); // state check","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":47,"-":48}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsFavouritePredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsFavouritePredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" return person.getFavourite();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsFavouritePredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsFavouritePrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured and has no private fields","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsFavouritePrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsFavouritePrivacyLevelPredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return (person.getFavourite() \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsFavouritePrivacyLevelPredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":24}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameContainsKeywordsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public NameContainsKeywordsPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" return keywords.stream()","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getKeywords() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" return keywords;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" || (other instanceof NameContainsKeywordsPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPredicate) other).keywords)); // state check","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":7,"-":30}},{"path":"src/main/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} matches any of the keywords given","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" * and has no private fields","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsKeywordsPrivacyLevelPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" return (keywords.stream()","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(person.getName().value, keyword))","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof NameContainsKeywordsPrivacyLevelPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.keywords.equals(((NameContainsKeywordsPrivacyLevelPredicate) other).keywords)); //state check","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags given.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class NameContainsTagsPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":" private final List\u003cString\u003e tags;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public NameContainsTagsPredicate(List\u003cString\u003e tags) {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" String allTagString \u003d convertTagToString(person);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" if (isOnlyUnwantedTags) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" return !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" return wantedTag.stream()","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * check only unwanted tag list has elements","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" * @return a boolean value","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" return true;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" return false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" if (!everyTag.startsWith(\"/\")) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" unwantedTag.add(everyTag.substring(1));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" * Convert a set of tags to Strings","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public List\u003cString\u003e getTags() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" return tags;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" || (other instanceof NameContainsTagsPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 this.tags.equals(((NameContainsTagsPredicate) other).tags)); // state check","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":6,"wangyiming1019":93}},{"path":"src/main/java/seedu/address/model/person/NameContainsTagsPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Tag} matches any of the tags and hasno private fields.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsTagsPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" private final List\u003cString\u003e tags;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public NameContainsTagsPrivacyLevelPredicate(List\u003cString\u003e tags) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.tags \u003d tags;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" String allTagString \u003d convertTagToString(person);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e wantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cString\u003e unwantedTag \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" updateWantedTagUnwantedTag(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" boolean isOnlyUnwantedTags \u003d isOnlyUnwantedTagsCheck(wantedTag, unwantedTag);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" if (isOnlyUnwantedTags) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" return (!(unwantedTag.stream()","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((inputTag -\u003e StringUtil.containsWordIgnoreCase(allTagString, inputTag))))","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" return (wantedTag.stream()","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch(keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !(unwantedTag.stream()","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" .anyMatch((keyword -\u003e StringUtil.containsWordIgnoreCase(allTagString, keyword))))","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 !person.hasPrivateField());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" * check only unwanted tag list has elements","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" * @return a boolean value","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isOnlyUnwantedTagsCheck(List\u003cString\u003e wantedTag,","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" if (wantedTag.isEmpty() \u0026\u0026 !unwantedTag.isEmpty()) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" return false;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Update the wantedTag and unwantedTag list","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * @param wantedTag list of tags to be searched","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param unwantedTag list of tags to not be searched","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" private void updateWantedTagUnwantedTag(List\u003cString\u003e wantedTag, List\u003cString\u003e unwantedTag) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" for (String everyTag : tags) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" if (!everyTag.startsWith(\"/\")) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" wantedTag.add(everyTag);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" unwantedTag.add(everyTag.substring(1));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * Convert a set of tags to Strings","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" private String convertTagToString(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Set\u003cTag\u003e personTags \u003d person.getTags();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" StringBuilder allTagNames \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : personTags) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(tag.getTagName());","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" allTagNames.append(\" \");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return allTagNames.toString().trim();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":86}},{"path":"src/main/java/seedu/address/model/person/Person.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Represents a Person in the address book.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Guarantees: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class Person implements ReadOnlyPerson {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cName\u003e name;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cPhone\u003e phone;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cEmail\u003e email;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cAddress\u003e address;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" private ObjectProperty\u003cBoolean\u003e favourite;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cRemark\u003e remark;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private ObjectProperty\u003cUniqueTagList\u003e tags;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ObjectProperty\u003cAvatar\u003e avatar;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Every field must be present and not null.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public Person(Name name, Phone phone, Email email, Address address,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Boolean favourite, Remark remark, Avatar avatar, Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.name \u003d new SimpleObjectProperty\u003c\u003e(name);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.phone \u003d new SimpleObjectProperty\u003c\u003e(phone);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" this.email \u003d new SimpleObjectProperty\u003c\u003e(email);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.address \u003d new SimpleObjectProperty\u003c\u003e(address);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" this.favourite \u003d new SimpleObjectProperty\u003c\u003e(favourite);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" this.remark \u003d new SimpleObjectProperty\u003c\u003e(remark);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // protect internal tags from changes in the arg list","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.tags \u003d new SimpleObjectProperty\u003c\u003e(new UniqueTagList(tags));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" this.avatar \u003d new SimpleObjectProperty\u003c\u003e(avatar);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Creates a copy of the given ReadOnlyPerson.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public Person(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" this(source.getName(), source.getPhone(), source.getEmail(), source.getAddress(), source.getFavourite(),","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" source.getRemark(), source.getAvatar(), source.getTags());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" this.name.set(requireNonNull(name));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cName\u003e nameProperty() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return name;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public Name getName() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return name.get();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.phone.set(requireNonNull(phone));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cPhone\u003e phoneProperty() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return phone;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public Phone getPhone() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" return phone.get();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" this.email.set(requireNonNull(email));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cEmail\u003e emailProperty() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return email;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public Email getEmail() {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" return email.get();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" this.address.set(requireNonNull(address));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cAddress\u003e addressProperty() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" return address;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public Address getAddress() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return address.get();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" public void setFavourite(Boolean favourite) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" this.favourite.set(requireNonNull(favourite));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" public ObjectProperty\u003cBoolean\u003e favouriteProperty() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" return favourite;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public Boolean getFavourite() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" return favourite.get();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void setRemark(Remark remark) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" this.remark.set(requireNonNull(remark));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cRemark\u003e remarkProperty() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" public Remark getRemark() {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" return remark.get();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void setAvatar(Avatar avatar) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" this.avatar.set(requireNonNull(avatar));","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" public ObjectProperty\u003cAvatar\u003e avatarProperty() {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" return avatar;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" public Avatar getAvatar() {","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" return avatar.get();","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" * Returns an immutable tag set, which throws {@code UnsupportedOperationException}","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" * if modification is attempted.","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public Set\u003cTag\u003e getTags() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" return Collections.unmodifiableSet(tags.get().toSet());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public ObjectProperty\u003cUniqueTagList\u003e tagProperty() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Replaces this person\u0027s tags with the tags in the argument tag set.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e replacement) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" tags.set(new UniqueTagList(replacement));","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" || (other instanceof ReadOnlyPerson // instanceof handles nulls","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyPerson) other));","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" return Objects.hash(name, phone, email, address, favourite, remark, tags, avatar);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" this.getName().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" this.getPhone().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" this.getEmail().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" this.getAddress().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" this.getRemark().setPrivacyLevel(level);","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if the Person has at least one private field and false otherwise","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" public boolean hasPrivateField() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" return (this.getName().getIsPrivate() || this.getPhone().getIsPrivate() || this.getAddress().getIsPrivate()","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" || this.getEmail().getIsPrivate() || this.getRemark().getIsPrivate());","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":37,"jeffreygohkw":25,"wangyiming1019":20,"-":134}},{"path":"src/main/java/seedu/address/model/person/PersonCompleteMatchPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s matches any one of the keywords","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class PersonCompleteMatchPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" private final List\u003cReadOnlyPerson\u003e keywords;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public PersonCompleteMatchPredicate(List\u003cReadOnlyPerson\u003e keywords) {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" return keywords.stream()","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" .anyMatch(person::equals);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" || (other instanceof PersonCompleteMatchPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((PersonCompleteMatchPredicate) other).keywords)); // state check","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":29}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Phone {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String PHONE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Validates given phone number.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if given phone string is invalid.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone) throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" if (phone \u003d\u003d null) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.value \u003d PHONE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" String trimmedPhone \u003d phone.trim();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" if (!isValidPhone(trimmedPhone)) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.value \u003d trimmedPhone;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" public Phone(String phone, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" this(phone);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(PHONE_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Phone\u003e\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":44,"Esilocke":6,"-":43}},{"path":"src/main/java/seedu/address/model/person/ReadOnlyPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * A read-only immutable interface for a Person in the addressbook.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Implementations should guarantee: details are present and not null, field values are validated.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface ReadOnlyPerson {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" ObjectProperty\u003cName\u003e nameProperty();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" Name getName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" ObjectProperty\u003cPhone\u003e phoneProperty();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Phone getPhone();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" ObjectProperty\u003cEmail\u003e emailProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Email getEmail();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" ObjectProperty\u003cAddress\u003e addressProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" Address getAddress();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cRemark\u003e remarkProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" Remark getRemark();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObjectProperty\u003cUniqueTagList\u003e tagProperty();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e getTags();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" ObjectProperty\u003cBoolean\u003e favouriteProperty();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" Boolean getFavourite();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" ObjectProperty\u003cAvatar\u003e avatarProperty();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" Avatar getAvatar();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" void setPrivacyLevel(int level);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" int getPrivacyLevel();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" boolean hasPrivateField();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" default boolean isSameStateAs(ReadOnlyPerson other) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getName().equals(this.getName()) // state checks here onwards","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getPhone().equals(this.getPhone())","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" \u0026\u0026 other.getEmail().equals(this.getEmail())","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getAddress().equals(this.getAddress()))","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" \u0026\u0026 other.getFavourite().equals(this.getFavourite())","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getRemark().equals(this.getRemark())","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 other.getAvatar().equals(this.getAvatar());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Formats the person as text, showing all contact details.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" builder.append(getName())","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .append(\" Phone: \")","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" .append(getPhone())","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" .append(\" Email: \")","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" .append(getEmail())","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" .append(\" Address: \")","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" .append(getAddress())","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" .append(\" Remark: \")","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .append(getRemark())","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" .append(\" Avatar: \")","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" .append(getAvatar())","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" .append(\" Tags: \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" getTags().forEach(builder::append);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":10,"jeffreygohkw":5,"wangyiming1019":4,"-":54}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":" * Represents a Person\u0027s remark in the address book.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRemark(String)}","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class Remark {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" \"Person remarks can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" * The first character of the remark must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public final String value;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private boolean isPrivate \u003d false;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private int privacyLevel \u003d 2;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * Validates given remark.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" * @throws IllegalValueException if given remark string is invalid.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark) throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (remark \u003d\u003d null) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d REMARK_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" if (!isValidRemark(remark)) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" this.value \u003d remark;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public Remark(String remark, boolean isPrivate) throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this(remark);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public static boolean isValidRemark(String test) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return test.matches(REMARK_VALIDATION_REGEX) || test.equals(REMARK_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" if (privacyLevel \u003d\u003d 1) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" return \"\u003cPrivate Remark\u003e\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" return value;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" || (other instanceof Remark // instanceof handles nulls","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" public boolean getIsPrivate() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" this.privacyLevel \u003d level;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" return this.privacyLevel;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":66,"jeffreygohkw":29}},{"path":"src/main/java/seedu/address/model/person/ShowAllPrivacyLevelPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Tests that a {@code ReadOnlyPerson}\u0027s {@code Name} are favoured after taking into account privacy level.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"public class ShowAllPrivacyLevelPredicate implements Predicate\u003cReadOnlyPerson\u003e {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public ShowAllPrivacyLevelPredicate() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public boolean test(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" return !person.hasPrivateField();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof ShowAllPrivacyLevelPredicate); // instanceof handles nulls","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cPerson\u003e internalCopy \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e mappedList \u003d EasyBind.map(internalList, (person) -\u003e person);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public boolean contains(ReadOnlyPerson toCheck) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Adds a person to the list.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void add(ReadOnlyPerson toAdd) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" internalList.add(new Person(toAdd));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public void setPerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" internalList.set(index, new Person(editedPerson));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean remove(ReadOnlyPerson toRemove) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the equivalent person in the list.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson toFavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toFavourite);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toFavourite);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(true);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" * Unfavourites the equivalent person from the list.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" *","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson toUnfavourite) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" requireNonNull(toUnfavourite);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" int index \u003d internalList.indexOf(toUnfavourite);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" internalList.get(index).setFavourite(false);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void setPersons(List\u003c? extends ReadOnlyPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" for (final ReadOnlyPerson person : persons) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" replacement.add(new Person(person));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" setPersons(replacement);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e asObservableList() {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" * Returns an array list of {@code Index} corresponding to the {@code ReadOnlyPerson} specified","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e extractIndexes(ArrayList\u003cReadOnlyPerson\u003e persons) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson p : persons) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" int position \u003d internalList.indexOf(p);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromZeroBased(position));","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return indexes;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" * Returns an array containing:","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" * Index - The old index of each person in the internalList before sorting","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" * Value - The new index of each person after a sort operation","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public Index[] getMappings() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index[] mappings \u003d new Index[internalCopy.size()];","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" int count \u003d 0;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" for (Person p : internalCopy) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" assert(internalList.contains(p));","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(p);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" mappings[count] \u003d Index.fromZeroBased(index);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" count++;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" return mappings;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" * Sorts person list by all persons by any field in ascending or descending order","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" * @param field","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" * @param order","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalList.size());","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" internalCopy.clear();","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" for (Person p : internalList) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" internalCopy.add(p);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" System.out.println(internalCopy.size());","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personNameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personPhoneComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personEmailComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cPerson\u003e personAddressComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" public int compare(Person o1, Person o2) {","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personNameComparator;","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"charlesgoh"},"content":" case \"phone\":","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personPhoneComparator;","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"charlesgoh"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personEmailComparator;","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"charlesgoh"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d personAddressComparator;","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":89,"Esilocke":35,"wangyiming1019":31,"-":119}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Tag {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be alphanumeric\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Validates given tag name.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if the given tag name string is invalid.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Tag(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (!isValidTagName(trimmedName)) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" throw new IllegalValueException(MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.tagName \u003d trimmedName;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public String getTagName() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" return tagName;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid tag name.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static boolean isValidTagName(String test) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return test.matches(TAG_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return tagName.hashCode();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"-":58}},{"path":"src/main/java/seedu/address/model/task/Assignees.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents the list of {@code ReadOnlyPerson} assigned to a task.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Contains support for some limited modification operations","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Assignees {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" private ArrayList\u003cIndex\u003e assignedList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public Assignees(ArrayList\u003cIndex\u003e assignees) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d assignees;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public Assignees() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public Assignees(Assignees toCopy) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.assignedList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(toCopy.getList());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /** Assigns all {@code ReadOnlyPerson} in the specified list */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public boolean assign(ArrayList\u003cIndex\u003e personsToAssign) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" boolean atLeastOneAdded \u003d false;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" for (Index i : personsToAssign) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" if (!assignedList.contains(i)) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assignedList.add(i);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" atLeastOneAdded \u003d true;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" return atLeastOneAdded;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /** Updates the internal assignedList with the correct Index values after a sort operation */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void updateList(Index[] mappings) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e updatedList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" for (Index i : assignedList) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Index updatedPosition \u003d mappings[i.getZeroBased()];","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" updatedList.add(updatedPosition);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedList.clear();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assignedList.addAll(updatedList);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" /** Removes all {@code ReadOnlyPerson} from the specified list, and returns true if at least 1 person was removed */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public boolean dismiss(ArrayList\u003cIndex\u003e personsToDismiss) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return assignedList.removeAll(personsToDismiss);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public ArrayList\u003cIndex\u003e getList() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" return this.assignedList;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * Deletes the specified index from the internal list, and decrements all other indexes in the assigned list","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * that have a value lower than the deleted index by 1.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void decrementIndex(Index deletedIndex) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assignedList.remove(deletedIndex);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c assignedList.size(); i++) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index current \u003d assignedList.get(i);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" if (current.getZeroBased() \u003e deletedIndex.getZeroBased()) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" int indexValue \u003d current.getZeroBased() - 1;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index decrementedIndex \u003d Index.fromZeroBased(indexValue);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assignedList.set(i, decrementedIndex);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" return assignedList.size() + \" persons assigned\";","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Assignees // instanceof handles nulls","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.assignedList.equals(((Assignees) other).assignedList)); // state check","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return assignedList.hashCode();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":90}},{"path":"src/main/java/seedu/address/model/task/Deadline.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.DateGroup;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.joestelmach.natty.Parser;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * Represents the deadline of a task in the address book.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class Deadline {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_INVALID_DATE \u003d","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" \"The specified date is invalid.\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public final Date date;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given deadline.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given deadline string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Deadline(String deadline) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (deadline \u003d\u003d null || deadline.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DEADLINE_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.date \u003d null;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" this.date \u003d setDateFromArgs(deadline);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d date.toString();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if the given string is a valid date.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Guarantees: given string format is valid","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDeadline(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" if (test.equals(DEADLINE_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" setDateFromArgs(test);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" * Returns a Date object that represents the given date string.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" private static Date setDateFromArgs(String date) throws IllegalValueException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" Parser deadlineParser \u003d new Parser();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" List\u003cDateGroup\u003e groups \u003d deadlineParser.parse(date);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" List\u003cDate\u003e dates \u003d null;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" for (DateGroup group : groups) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" dates \u003d group.getDates();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" if (dates \u003d\u003d null) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return dates.get(0);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Deadline // instanceof handles nulls","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Deadline) other).value)); // state check","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":86}},{"path":"src/main/java/seedu/address/model/task/Description.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Represents a task description in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class Description {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_DESCRIPTION_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" \"Task descriptions can be in any format\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final String value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given description.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given description string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Description(String description) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (description \u003d\u003d null) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d DESCRIPTION_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedDescription \u003d description.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" if (!isValidDescription(trimmedDescription)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_DESCRIPTION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" this.value \u003d trimmedDescription;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid description.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidDescription(String test) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" return test.equals(DESCRIPTION_PLACEHOLDER_VALUE) || test.matches(DESCRIPTION_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return value;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Description // instanceof handles nulls","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value.equals(((Description) other).value)); // state check","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":64}},{"path":"src/main/java/seedu/address/model/task/Priority.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a task priority in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class Priority {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_PRIORITY_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String[] PRIORITY_TEXT_STRINGS \u003d {\"\", \"Lowest\", \"Low\", \"Medium\", \"High\", \"Highest\"};","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_LOWER_BOUND \u003d 0;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int PRIORITY_UPPER_BOUND \u003d 5;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_VALIDATION_REGEX \u003d \"[\\\\d].*\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public final int value;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Validates given priority.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given priority string is invalid.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public Priority(String priority) throws IllegalValueException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" if (priority \u003d\u003d null || priority.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.value \u003d 0;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" return;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" String trimmedPriority \u003d priority.trim();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.value \u003d Integer.parseInt(trimmedPriority);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" } catch (NumberFormatException e) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (!isValidPriority(trimmedPriority)) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task priority.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidPriority(String test) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" if (test.equals(PRIORITY_PLACEHOLDER_VALUE)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" } else if (!test.matches(PRIORITY_VALIDATION_REGEX)) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" int intTest \u003d Integer.parseInt(test);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" return isWithinBounds(intTest);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" * Returns true if the value is within the upper and lower bounds of priority","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static boolean isWithinBounds(int test) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return test \u003c\u003d PRIORITY_UPPER_BOUND \u0026\u0026 test \u003e\u003d PRIORITY_LOWER_BOUND;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" return PRIORITY_TEXT_STRINGS[value];","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" || (other instanceof Priority // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.value \u003d\u003d ((Priority) other).value); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":75}},{"path":"src/main/java/seedu/address/model/task/ReadOnlyTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Provides an immutable interface for a Task in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public interface ReadOnlyTask {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" TaskName getTaskName();","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" Description getDescription();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" Deadline getDeadline();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" Priority getPriority();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" Assignees getAssignees();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" boolean getCompleteState();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" String getPrintableState();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" TaskAddress getTaskAddress();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskName\u003e taskNameProperty();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDescription\u003e descriptionProperty();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cDeadline\u003e deadlineProperty();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cPriority\u003e priorityProperty();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cAssignees\u003e assigneeProperty();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cTaskAddress\u003e taskAddressProperty();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e stateProperty();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ObjectProperty\u003cString\u003e changeStateProperty();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" void changeState();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" default String getAsText() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" final StringBuilder builder \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" builder.append(getTaskName())","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .append(\" Description: \")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .append(getDescription())","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" .append(\" Deadline: \")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .append(getDeadline())","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .append(\" Priority: \")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .append(getPriority())","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" .append(\" Address: \")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .append(getTaskAddress())","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .append(\" \")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .append(getPrintableState());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" return builder.toString();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Returns true if both have the same state. (interfaces cannot override .equals)","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" default boolean isSameStateAs(ReadOnlyTask other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" || (other !\u003d null // this is first to avoid NPE below","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskName().equals(this.getTaskName()) // state checks here onwards","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDescription().equals(this.getDescription())","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getDeadline().equals(this.getDeadline())","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getPriority().equals(this.getPriority()))","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getAssignees().equals(this.getAssignees())","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getCompleteState() \u003d\u003d this.getCompleteState()","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 other.getTaskAddress().equals(this.getTaskAddress());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/main/java/seedu/address/model/task/Task.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.ObjectProperty;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.property.SimpleObjectProperty;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Represents a task object in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class Task implements ReadOnlyTask {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_INCOMPLETE \u003d \"\u003cIncomplete\u003e\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_COMPLETE \u003d \"\u003cComplete\u003e\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskName\u003e taskName;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDescription\u003e description;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cDeadline\u003e deadline;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cPriority\u003e priority;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cAssignees\u003e assignees;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cBoolean\u003e state;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private ObjectProperty\u003cTaskAddress\u003e taskAddress;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Assignees assignees, boolean isComplete, TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(assignees);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(isComplete);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Creates a new Task object from the given arguments","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" * New tasks will not have anyone assigned to them by default, and will be marked as incomplete","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * by default.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public Task(TaskName taskName, Description description, Deadline deadline, Priority priority,","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d new SimpleObjectProperty\u003c\u003e(taskName);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.description \u003d new SimpleObjectProperty\u003c\u003e(description);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" this.deadline \u003d new SimpleObjectProperty\u003c\u003e(deadline);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" this.priority \u003d new SimpleObjectProperty\u003c\u003e(priority);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" this.state \u003d new SimpleObjectProperty\u003c\u003e(false);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" this.taskAddress \u003d new SimpleObjectProperty\u003c\u003e(taskAddress);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public Task(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" this(task.getTaskName(), task.getDescription(), task.getDeadline(), task.getPriority(),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" task.getAssignees(), task.getCompleteState(), task.getTaskAddress());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskName getTaskName() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" return taskName.get();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public Description getDescription() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" return description.get();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public Deadline getDeadline() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return deadline.get();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" public Priority getPriority() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" return priority.get();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public Assignees getAssignees() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" return assignees.get();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public boolean getCompleteState() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" return state.get();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public TaskAddress getTaskAddress() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return taskAddress.get();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" return getAsText();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" // JavaFX property functions","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskName\u003e taskNameProperty() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDescription\u003e descriptionProperty() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" return description;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cDeadline\u003e deadlineProperty() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" return deadline;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cPriority\u003e priorityProperty() {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" return priority;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cAssignees\u003e assigneeProperty() {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" return assignees;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" this.assignees \u003d new SimpleObjectProperty\u003c\u003e(new Assignees());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cTaskAddress\u003e taskAddressProperty() {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" return taskAddress;","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e stateProperty() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" String printableState \u003d getPrintableState();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(printableState);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public ObjectProperty\u003cString\u003e changeStateProperty() {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d getCompleteState();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (state) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as incomplete\");","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" return new SimpleObjectProperty\u003c\u003e(\"Set as complete\");","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" // Setters for TaskBuilder testing","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void setTaskName(TaskName taskName) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" this.taskName.set(taskName);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" public void setDeadline(Deadline deadline) {","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" this.deadline.set(deadline);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" public void setDescription(Description description) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" this.description.set(description);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" public void setPriority(Priority priority) {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" this.priority.set(priority);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" public void setAssignees(Assignees assignees) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" this.assignees.set(assignees);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" public void setState(boolean state) {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" this.state.set(state);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" public void changeState() {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" this.setState(!this.getCompleteState());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" public void setTaskAddress(TaskAddress taskAddress) {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" this.taskAddress.set(taskAddress);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" public String getPrintableState() {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String printableState;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" if (state.get()) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_COMPLETE;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" printableState \u003d TASK_INCOMPLETE;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" return printableState;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" || (other instanceof ReadOnlyTask // instanceof handles nulls","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isSameStateAs((ReadOnlyTask) other));","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" return Objects.hash(taskName, description, deadline, priority, assignees, state);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":200}},{"path":"src/main/java/seedu/address/model/task/TaskAddress.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":" * Represents a Task\u0027s address in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidTaskAddress(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class TaskAddress {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":" public static final String MESSAGE_TASK_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" \"Task addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" /*","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public static final String ADDRESS_PLACEHOLDER_VALUE \u003d \"\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" public final String taskAddress;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Validates given address.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if given address string is invalid.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public TaskAddress(String address) throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" if (address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d ADDRESS_PLACEHOLDER_VALUE;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" return;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" if (!isValidTaskAddress(address)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalValueException(MESSAGE_TASK_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" this.taskAddress \u003d address;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" * Returns true if a given string is a valid task address.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public static boolean isValidTaskAddress(String test) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(ADDRESS_PLACEHOLDER_VALUE);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" || (other instanceof TaskAddress // instanceof handles nulls","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" \u0026\u0026 this.taskAddress.equals(((TaskAddress) other).taskAddress)); // state check","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress.hashCode();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61}},{"path":"src/main/java/seedu/address/model/task/TaskContainsKeywordPredicate.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * Tests that a {@code ReadOnlyTask}\u0027s {@code TaskName} or {@code Description} matches any of the keywords given.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicate implements Predicate\u003cReadOnlyTask\u003e {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" private final List\u003cString\u003e keywords;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByState;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private boolean needFilterByPriority;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private boolean isComplete;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private int basePriority;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords, boolean isStateCheckRequired,","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" boolean isPriorityCheckRequired, boolean isComplete, int basePriority) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d isPriorityCheckRequired;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d isStateCheckRequired;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d isComplete;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d basePriority;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public TaskContainsKeywordPredicate(List\u003cString\u003e keywords) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" this.keywords \u003d keywords;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" this.needFilterByPriority \u003d false;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" this.needFilterByState \u003d false;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" this.isComplete \u003d false;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" this.basePriority \u003d 0;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public boolean test(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" for (String keyword : keywords) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (needFilterByState \u0026\u0026 task.getCompleteState() !\u003d isComplete) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } else if (needFilterByPriority \u0026\u0026 task.getPriority().value \u003c basePriority) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" } else if (StringUtil.containsWordIgnoreCase(task.getTaskName().taskName, keyword)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" || StringUtil.containsWordIgnoreCase(task.getDescription().value, keyword)) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskContainsKeywordPredicate // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.keywords.equals(((TaskContainsKeywordPredicate) other).keywords)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByPriority \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByPriority","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.needFilterByState \u003d\u003d ((TaskContainsKeywordPredicate) other).needFilterByState","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.isComplete \u003d\u003d ((TaskContainsKeywordPredicate) other).isComplete","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.basePriority \u003d\u003d ((TaskContainsKeywordPredicate) other).basePriority); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":60}},{"path":"src/main/java/seedu/address/model/task/TaskName.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" * Represents a Task name in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"public class TaskName {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" public static final String MESSAGE_NAME_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" \"Task names can be in any format, and should not be blank\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" /*","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final String NAME_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public final String taskName;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Validates given name.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if given name string is invalid.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public TaskName(String name) throws IllegalValueException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" requireNonNull(name);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String trimmedName \u003d name.trim();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" if (!isValidName(trimmedName)) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" throw new IllegalValueException(MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" this.taskName \u003d trimmedName;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Returns true if a given string is a valid task name.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public static boolean isValidName(String test) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" return test.matches(NAME_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return taskName;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" || (other instanceof TaskName // instanceof handles nulls","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.taskName.equals(((TaskName) other).taskName)); // state check","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return taskName.hashCode();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":62}},{"path":"src/main/java/seedu/address/model/task/UniqueTaskList.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" * A list of tasks that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * @see Task#equals(Object)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"public class UniqueTaskList implements Iterable\u003cTask\u003e {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cTask\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // used by asObservableList()","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e mappedList \u003d EasyBind.map(internalList, (task) -\u003e task);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" * Returns true if the list contains an equivalent task as the given argument.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public boolean contains(ReadOnlyTask toCheck) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * Adds a task to the list.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the task to add is a duplicate of an existing task in the list.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void add(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" internalList.add(new Task(toAdd));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" * Replaces the task {@code target} in the list with {@code editedTask}.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" * @throws DuplicateTaskException if the replacement is equivalent to another existing task in the list.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void setTask(ReadOnlyTask target, ReadOnlyTask editedTask)","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" throws DuplicateTaskException, TaskNotFoundException {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" requireNonNull(editedTask);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" if (!target.equals(editedTask) \u0026\u0026 internalList.contains(editedTask)) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" internalList.set(index, new Task(editedTask));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Removes the equivalent task from the list.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" * @throws TaskNotFoundException if no such task could be found in the list.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public boolean remove(ReadOnlyTask toRemove) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" final boolean taskFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" if (!taskFoundAndDeleted) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" throw new TaskNotFoundException();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" public void setTasks(UniqueTaskList replacement) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void setTasks(List\u003c? extends ReadOnlyTask\u003e tasks) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" final UniqueTaskList replacement \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" for (final ReadOnlyTask task : tasks) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" replacement.add(new Task(task));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" setTasks(replacement);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" * Removes all assignees from all tasks.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void clearAssignees() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" t.clearAssignees();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" /** Removes the specified assignee from all tasks **/","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void removeAssignee(Index personIndex) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" updated.decrementIndex(personIndex);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" internalList.clear();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" * Updates the assignee list within each task to match that of the newPersonIndexes.","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" * This method is called after a sort persons operation due to the order change","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" public void updateAssignees(Index[] newPersonIndexes) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTask\u003e internalListCopy \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" for (Task t : internalList) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" TaskName name \u003d t.getTaskName();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Description description \u003d t.getDescription();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Deadline deadline \u003d t.getDeadline();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" Priority priority \u003d t.getPriority();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" TaskAddress taskAddress \u003d t.getTaskAddress();","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" boolean state \u003d t.getCompleteState();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" Assignees assignees \u003d t.getAssignees();","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Assignees updated \u003d new Assignees(assignees);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" updated.updateList(newPersonIndexes);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" internalListCopy.add(new Task(name, description, deadline, priority, updated, state, taskAddress));","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" internalList.clear();","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" internalList.addAll(internalListCopy);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e asObservableList() {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(mappedList);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * Sorts person list by all persons by any field in ascending or descending order","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":" public void sortBy(String field, String order) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //sortyBy first chooses the right comparator","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" /*","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" * Comparators for the various fields available for sorting","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e priorityComparator \u003d Comparator.comparingInt(o -\u003e o.getPriority().value);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cTask\u003e deadlineComparator \u003d (o1, o2) -\u003e {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" if (o1.getDeadline().date \u003d\u003d null || o2.getDeadline().date \u003d\u003d null) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" return 0;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":" case \"priority\":","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d priorityComparator;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":" case \"deadline\":","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" comparator \u003d deadlineComparator;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" //sortBy then chooses the right ordering","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"charlesgoh"},"content":" System.out.println(\"An error occured\");","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"charlesgoh"},"content":" throw new Exception(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"charlesgoh"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"charlesgoh"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" public Iterator\u003cTask\u003e iterator() {","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" || (other instanceof UniqueTaskList // instanceof handles nulls","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 this.internalList.equals(((UniqueTaskList) other).internalList));","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":60,"Esilocke":179}},{"path":"src/main/java/seedu/address/model/task/exceptions/DuplicateTaskException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.DuplicateDataException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation will result in duplicate Person objects.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"public class DuplicateTaskException extends DuplicateDataException {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" public DuplicateTaskException() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" super(\"Operation would result in duplicate tasks\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":13}},{"path":"src/main/java/seedu/address/model/task/exceptions/TaskNotFoundException.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":" * Signals that the operation could not find the specified task.","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"public class TaskNotFoundException extends Exception {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" return new Person[] {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" new Person(new Name(\"Alex Yeoh\"), new Phone(\"87438807\"), new Email(\"alexyeoh@example.com\"),","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), false,","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Cheerful lad\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" getTagSet(\"friends\")),","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" new Person(new Name(\"Bernice Yu\"), new Phone(\"99272758\"), new Email(\"berniceyu@example.com\"),","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), false,","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Very friendly\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\", \"friends\")),","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" new Person(new Name(\"Charlotte Oliveiro\"), new Phone(\"93210283\"), new Email(\"charlotte@example.com\"),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), false,","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"She sells sea shells on the sea shore\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" getTagSet(\"neighbours\")),","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), false,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Laughs too much\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" getTagSet(\"family\")),","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" new Person(new Name(\"Irfan Ibrahim\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), false,","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Goes to the same coffee shop every morning\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" getTagSet(\"classmates\")),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), false,","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" new Remark(\"Disappearing act?\"), new Avatar(\"\"),","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" getTagSet(\"colleagues\"))","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot be invalid\", e);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return sampleAb;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) throws IllegalValueException {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" for (String s : strings) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"wangyiming1019":6,"-":66}},{"path":"src/main/java/seedu/address/storage/AddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents a storage for {@link seedu.address.model.AddressBook}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public interface AddressBookStorage {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Returns the file path of the data file.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Returns AddressBook data as a {@link ReadOnlyAddressBook}.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Returns {@code Optional.empty()} if storage file is not found.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the data in storage is not in the expected format.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem when reading from the storage.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * @see #getAddressBookFilePath()","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Saves the given {@link ReadOnlyAddressBook} to the storage.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * @param addressBook cannot be null.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @throws IOException if there was any problem writing to the file.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see #saveAddressBook(ReadOnlyAddressBook)","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" void changeFilePath(String fp, UserPrefs u);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":2,"-":43}},{"path":"src/main/java/seedu/address/storage/Storage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * API of the Storage component","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public interface Storage extends AddressBookStorage, UserPrefsStorage {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" void saveUserPrefs(UserPrefs userPrefs) throws IOException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" String getAddressBookFilePath();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a remote location. Subscribes to BackupRequestEvent","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" void handleBackupAddressBook(BackupRequestEvent event) throws IOException;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Saves the current version of the Address Book to the hard disk.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Creates the data file if it is missing.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Raises {@link DataSavingExceptionEvent} if there was an error during saving.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" void handleAddressBookChangedEvent(AddressBookChangedEvent abce);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":8,"-":38}},{"path":"src/main/java/seedu/address/storage/StorageManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.BackupRequestEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Manages storage of AddressBook data in local storage.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class StorageManager extends ComponentManager implements Storage {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StorageManager.class);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private AddressBookStorage addressBookStorage;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private UserPrefsStorage userPrefsStorage;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public StorageManager(AddressBookStorage addressBookStorage, UserPrefsStorage userPrefsStorage) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.addressBookStorage \u003d addressBookStorage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.userPrefsStorage \u003d userPrefsStorage;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d UserPrefs methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return userPrefsStorage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public Optional\u003cUserPrefs\u003e readUserPrefs() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return userPrefsStorage.readUserPrefs();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void saveUserPrefs(UserPrefs userPrefs) throws IOException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" userPrefsStorage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d AddressBook methods \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return addressBookStorage.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return readAddressBook(addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to read data from file: \" + filePath);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBookStorage.readAddressBook(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, addressBookStorage.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.fine(\"Attempting to write to data file: \" + filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" addressBookStorage.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" public void handleBackupAddressBook(BackupRequestEvent event) throws IOException {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyAddressBook addressBook \u003d event.getModel().getAddressBook();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" String args \u003d event.getArgs();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, args);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent event) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event, \"Local data changed, saving to file\"));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" saveAddressBook(event.data);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" raise(new DataSavingExceptionEvent(e));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String fp, UserPrefs u) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(fp);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" u.setAddressBookFilePath(fp);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" addressBookStorage.changeFilePath(fp, u);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":11,"jeffreygohkw":8,"-":91}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedIndex.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlValue;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":" * JAXB-friendly adapted version of the Index.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedIndex {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" @XmlValue","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private int index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedIndex.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex() {}","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" * Converts a given Index into this class for JAXB use.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedIndex(Index source) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" index \u003d source.getZeroBased();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted tag object into an Index object.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints\\","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public Index toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return Index.fromZeroBased(index);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private String name;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean nameIsPrivate;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private String phone;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean phoneIsPrivate;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private String email;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean emailIsPrivate;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String address;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" private Boolean addressIsPrivate;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement (required \u003d true)","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" private String favourite;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" private String remark;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" private Boolean remarkIsPrivate;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private String avatar;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" * Converts a given Person into this class for JAXB use.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" public XmlAdaptedPerson(ReadOnlyPerson source) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" name \u003d source.getName().value;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" phone \u003d source.getPhone().value;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" email \u003d source.getEmail().value;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" address \u003d source.getAddress().value;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" favourite \u003d source.getFavourite().toString();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" remark \u003d source.getRemark().value;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" avatar \u003d source.getAvatar().value;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d source.getName().getIsPrivate();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d source.getPhone().getIsPrivate();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d source.getEmail().getIsPrivate();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d source.getAddress().getIsPrivate();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d source.getRemark().getIsPrivate();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (Tag tag : source.getTags()) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" tagged.add(new XmlAdaptedTag(tag));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" public Person toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" for (XmlAdaptedTag tag : tagged) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" personTags.add(tag.toModelType());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" if (nameIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" nameIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" if (phoneIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" phoneIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" if (emailIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" emailIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" if (addressIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" addressIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" if (remarkIsPrivate \u003d\u003d null) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" remarkIsPrivate \u003d false;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" final Name name \u003d new Name(this.name, this.nameIsPrivate);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" final Phone phone \u003d new Phone(this.phone, this.phoneIsPrivate);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" final Email email \u003d new Email(this.email, this.emailIsPrivate);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" final Address address \u003d new Address(this.address, this.addressIsPrivate);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" final Boolean favourite \u003d new Boolean(this.favourite);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkIsPrivate);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" return new Person(name, phone, email, address, favourite, remark, avatar, tags);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":7,"jeffreygohkw":71,"wangyiming1019":3,"-":40}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTask.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/** JAXB-friendly version of a Task */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class XmlAdaptedTask {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private String name;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private String description;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private String deadline;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private String priority;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private String state;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedIndex\u003e assignees \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" private String address;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" * Constructs an XmlAdaptedTask.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask() {}","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" * Converts a given Task into this class for JAXB use.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTask","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public XmlAdaptedTask(ReadOnlyTask source) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" name \u003d source.getTaskName().taskName;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" description \u003d source.getDescription().value;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" deadline \u003d source.getDeadline().value;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" priority \u003d Integer.toString(source.getPriority().value);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" state \u003d String.valueOf(source.getCompleteState());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" address \u003d source.getTaskAddress().taskAddress;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assignees \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" for (Index i : source.getAssignees().getList()) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assignees.add(new XmlAdaptedIndex(i));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Task object.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public Task toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" final TaskName name \u003d new TaskName(this.name);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" final Description description \u003d new Description(this.description);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" final Deadline deadline \u003d new Deadline(this.deadline);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" final Priority priority \u003d new Priority(this.priority);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" final Boolean state \u003d Boolean.valueOf(this.state);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" final TaskAddress address \u003d new TaskAddress(this.address);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" final ArrayList\u003cIndex\u003e assigneeIndexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" for (XmlAdaptedIndex index : assignees) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assigneeIndexes.add(index.toModelType());","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" final Assignees assignees \u003d new Assignees(assigneeIndexes);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return new Task(name, description, deadline, priority, assignees, state, address);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":81}},{"path":"src/main/java/seedu/address/storage/XmlAddressBookStorage.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A class to access AddressBook data stored as an xml file on the hard disk.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorage implements AddressBookStorage {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(XmlAddressBookStorage.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private String filePath;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public XmlAddressBookStorage(String filePath) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" this.filePath \u003d filePath;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return filePath;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return readAddressBook(filePath);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Similar to {@link #readAddressBook()}","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * @throws DataConversionException if the file is not in the correct format.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws DataConversionException,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" FileNotFoundException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" File addressBookFile \u003d new File(filePath);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" if (!addressBookFile.exists()) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" logger.info(\"AddressBook file \" + addressBookFile + \" not found\");","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return Optional.empty();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook addressBookOptional \u003d XmlFileStorage.loadDataFromSaveFile(new File(filePath));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return Optional.of(addressBookOptional);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook) throws IOException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Similar to {@link #saveAddressBook(ReadOnlyAddressBook)}","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * @param filePath location of the data. Cannot be null","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" requireNonNull(addressBook);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" requireNonNull(filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" File file \u003d new File(filePath);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" FileUtil.createIfMissing(file);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" XmlFileStorage.saveDataToFile(file, new XmlSerializableAddressBook(addressBook));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" * Backs up data to a custom save file name","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * @param addressBook","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" * @param filePath","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" * @throws IOException","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" public void backupAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" logger.fine(\"Attempting to write to backup data file in custom location\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" logger.info(filePath);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" this.saveAddressBook(addressBook, filePath);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the file path of the save file","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" * @param filepath the new file path of the save file. Cannot be null","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" public void changeFilePath(String filepath, UserPrefs u) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" requireNonNull(filepath);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" filePath \u003d filepath;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":12,"jeffreygohkw":9,"-":77}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private List\u003cXmlAdaptedTask\u003e tasks;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" tasks \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" * Conversion","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" tasks.addAll(src.getTasksList().stream().map(XmlAdaptedTask::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" final ObservableList\u003cReadOnlyPerson\u003e persons \u003d this.persons.stream().map(p -\u003e {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" return p.toModelType();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(persons);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" final ObservableList\u003cTag\u003e tags \u003d this.tags.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" //TODO: better error handling","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(tags);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" final ObservableList\u003cReadOnlyTask\u003e tasks \u003d this.tasks.stream().map(t -\u003e {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return t.toModelType();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }).collect(Collectors.toCollection(FXCollections::observableArrayList));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" return FXCollections.unmodifiableObservableList(tasks);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":19,"-":73}},{"path":"src/main/java/seedu/address/ui/BrowserPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.Event;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.web.WebView;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.NewResultAvailableEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * The Browser Panel of the App.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class BrowserPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PAGE \u003d \"default.html\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_PREFIX \u003d \"https://www.google.com.sg/search?safe\u003doff\u0026q\u003d\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String GOOGLE_SEARCH_URL_SUFFIX \u003d \"\u0026cad\u003dh\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_NAME_CANNOT_SEARCH \u003d \"Cannot perform a search on that person. \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their name is private.\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_PREFIX \u003d \"https://www.google.com.sg/maps/search/\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_URL_SUFFIX \u003d \"/\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public static final String PRIVATE_ADDRESS_CANNOT_SEARCH \u003d \"Cannot perform a search on that person\u0027s address. \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" + \"Their address is private.\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_PREFIX \u003d \"https://www.google.com.sg/maps/dir/?api\u003d1\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public static final String GOOGLE_MAPS_DIRECTIONS_SUFFIX \u003d \"/\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"BrowserPanel.fxml\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private WebView browser;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public BrowserPanel() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // To prevent triggering events for typing inside the loaded Web page.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" getRoot().setOnKeyPressed(Event::consume);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" loadDefaultPage();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s name if their name is not private","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person we want to search for","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private void loadPersonPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getName().getIsPrivate()) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_NAME_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_SEARCH_URL_PREFIX + person.getName().value.replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" * Loads a google search for a person\u0027s address if their address is not private","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" * Prints out a message on the result display otherwise","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" * @param person The person\u0027s address we want to search for","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" private void loadMapsPage(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" if (person.getAddress().getIsPrivate()) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" raise(new NewResultAvailableEvent(PRIVATE_ADDRESS_CANNOT_SEARCH));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_URL_PREFIX + person.getAddress().toString().replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_URL_SUFFIX);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Loads Google Maps with directions on how to go from one location to another","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * @param fromLocation The location we want to start from","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * @param toLocation The location we want to reach","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void loadDirectionsPage(String fromLocation, String toLocation) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" loadPage(GOOGLE_MAPS_DIRECTIONS_PREFIX + \"\u0026origin\u003d\"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" + fromLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" + toLocation.replaceAll(\"#(\\\\w+)\\\\s*\", \"\").replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" public void loadPage(String url) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e browser.getEngine().load(url));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" * Loads a default HTML file with a background that matches the general theme.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void loadDefaultPage() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" URL defaultPage \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" loadPage(defaultPage.toExternalForm());","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Frees resources allocated to the browser.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" public void freeResources() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" browser \u003d null;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" loadMapsPage(event.getNewSelection());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" loadDirectionsPage(event.getFromLocation().toString(), event.getToLocation().toString());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":68,"Esilocke":1,"-":65}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.Scene;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import javafx.stage.FileChooser;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.ChangeThemeRequestEvent;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FxViewUtil;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.storage.XmlFileStorage;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final int MIN_HEIGHT \u003d 600;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final int MIN_WIDTH \u003d 450;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" private final FileChooser fileChooser \u003d new FileChooser();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" private MainApp mainApp;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" private Storage storage;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Stage primaryStage;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" private TaskListPanel taskListPanel;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private ViewTaskPanel viewTaskPanel;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" private ViewPersonPanel viewPersonPanel;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" private StackPane browserPlaceholder;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem openMenuItem;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem saveMenuItem;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" private MenuItem exitMenuItem;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" private MenuItem increaseSizeMenuItem;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" private MenuItem decreaseSizeMenuItem;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" private MenuItem resetSizeMenuItem;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" private StackPane taskListPanelPlaceholder;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" // Set dependencies","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" // Configure the UI","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" setIcon(ICON);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" setWindowMinSize();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" setWindowDefaultTheme(prefs);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" Scene scene \u003d new Scene(getRoot());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" primaryStage.setScene(scene);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" setAccelerators();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" return primaryStage;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" private void setAccelerators() {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(openMenuItem, KeyCombination.valueOf(\"SHORTCUT+O\"));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(saveMenuItem, KeyCombination.valueOf(\"SHORTCUT+S\"));","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(exitMenuItem, KeyCombination.valueOf(\"ALT+F4\"));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(increaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+W\"));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(decreaseSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+E\"));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" setAccelerator(resetSizeMenuItem, KeyCombination.valueOf(\"SHORTCUT+R\"));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" * the TextInputControl(s).","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" event.consume();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to give a reference back to itself.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" * @param mainApp the MainApp itself","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" public void setMainApp(MainApp mainApp) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" this.mainApp \u003d mainApp;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Storage","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" * @param s the Storage used by MainApp","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" public void setStorage(Storage s) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" this.storage \u003d s;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" * Is called by the main application to provide MainWindow with Model","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" *","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" * @param m the Model used by MainApp","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" public void setModel(Model m) {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" this.model \u003d m;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window.","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" void fillInnerParts() {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" browserPanel \u003d new BrowserPanel();","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" viewTaskPanel \u003d new ViewTaskPanel();","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" viewPersonPanel \u003d new ViewPersonPanel();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" taskListPanel \u003d new TaskListPanel(logic.getFilteredTaskList());","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" taskListPanelPlaceholder.getChildren().add(taskListPanel.getRoot());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"charlesgoh"},"content":" String preferredFilePath \u003d this.prefs.getAddressBookFilePath();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(preferredFilePath, logic.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" void hide() {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" primaryStage.hide();","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Sets the given image as the icon of the main window.","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * @param iconSource e.g. {@code \"/images/help_icon.png\"}","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" private void setIcon(String iconSource) {","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" FxViewUtil.setStageIcon(primaryStage, iconSource);","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences.","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the default theme based on user preferences.","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"jeffreygohkw"},"content":" private void setWindowDefaultTheme(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(prefs.getTheme());","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" private void setWindowMinSize() {","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" primaryStage.setMinHeight(MIN_HEIGHT);","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" primaryStage.setMinWidth(MIN_WIDTH);","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"jeffreygohkw"},"content":" return getRoot().getStylesheets().get(1);","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window.","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"charlesgoh"},"content":" * Handle increase font size command for menu item","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"charlesgoh"},"content":" public void handleIncreaseFontSize() {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling increase in font size\");","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getIncreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"charlesgoh"},"content":" * Handle decrease font size command for menu item","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"charlesgoh"},"content":" public void handleDecreaseFontSize() {","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling decrease in font size\");","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getDecreaseSizeEventIndex()));","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"charlesgoh"},"content":" * Handle reset font size command","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"charlesgoh"},"content":" public void handleResetFontSize() {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Handling reset in font size\");","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" raise(new ChangeFontSizeEvent(ChangeFontSizeEvent.getResetSizeEventIndex()));","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" * Opens the help window.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" public void handleHelp() {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" HelpWindow helpWindow \u003d new HelpWindow();","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" helpWindow.show();","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" void show() {","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" primaryStage.show();","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"jeffreygohkw"},"content":" * Opens the data from a desired location","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpen() throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" // Show open file dialog","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showOpenDialog(primaryStage);","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the opened file","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":" // Reset data in the model to the data from the opened file","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" model.resetData(XmlFileStorage.loadDataFromSaveFile(file));","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"jeffreygohkw"},"content":" private void handleOpenRequestEvent(OpenRequestEvent event) throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"jeffreygohkw"},"content":" handleOpen();","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"jeffreygohkw"},"content":" * Saves the data at a desired location","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"jeffreygohkw"},"content":" @FXML","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAs() throws IOException {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"jeffreygohkw"},"content":" // Set extension filter","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"jeffreygohkw"},"content":" FileChooser.ExtensionFilter extFilter \u003d new FileChooser.ExtensionFilter(","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"jeffreygohkw"},"content":" \"XML files (*.xml)\", \"*.xml\");","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"jeffreygohkw"},"content":" fileChooser.getExtensionFilters().add(extFilter);","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"jeffreygohkw"},"content":" // Show save file dialog","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"jeffreygohkw"},"content":" File file \u003d fileChooser.showSaveDialog(primaryStage);","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"jeffreygohkw"},"content":" if (file !\u003d null) {","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"jeffreygohkw"},"content":" // Make sure it has the correct extension","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"jeffreygohkw"},"content":" if (!file.getPath().endsWith(\".xml\")) {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"jeffreygohkw"},"content":" file \u003d new File(file.getPath() + \".xml\");","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"jeffreygohkw"},"content":" // Change file path to the new save file","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"jeffreygohkw"},"content":" storage.changeFilePath(file.getPath(), prefs);","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"jeffreygohkw"},"content":" // Save the address book data and the user preferences","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveAddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"jeffreygohkw"},"content":" storage.saveUserPrefs(prefs);","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"jeffreygohkw"},"content":" // Update the UI","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"jeffreygohkw"},"content":" fillInnerParts();","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"jeffreygohkw"},"content":" private void handleSaveAsRequestEvent(SaveAsRequestEvent event) throws IOException, DataConversionException {","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"jeffreygohkw"},"content":" handleSaveAs();","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"jeffreygohkw"},"content":" * Changes the existing theme to the input theme","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"jeffreygohkw"},"content":" public void handleChangeTheme(String theme) {","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"jeffreygohkw"},"content":" if (getRoot().getStylesheets().size() \u003e 1) {","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().remove(1);","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"jeffreygohkw"},"content":" getRoot().getStylesheets().add(theme);","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" private void handleExit() {","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" return this.personListPanel;","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel getTaskListPanel() {","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" return this.taskListPanel;","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":" void releaseResources() {","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" browserPanel.freeResources();","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" handleHelp();","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewTaskPanel.getRoot());","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":" browserPlaceholder.getChildren().add(viewPersonPanel.getRoot());","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"jeffreygohkw"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"jeffreygohkw"},"content":" browserPlaceholder.getChildren().add(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"jeffreygohkw"},"content":" private void handleChangeThemeEvent(ChangeThemeRequestEvent event) {","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"jeffreygohkw"},"content":" handleChangeTheme(event.getStyleSheet());","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":42,"jeffreygohkw":172,"Esilocke":35,"-":212}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Random;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.ImageView;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" * Preset values for random selection later.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private enum Colours {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" private static Random randomNumber \u003d new Random();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public final ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Label name;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private Label id;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private Label address;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private Label email;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private FlowPane tags;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" public PersonCard(ReadOnlyPerson person, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" initFavourite(person);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" bindListeners(person);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void bindListeners(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" person.tagProperty().addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" tags.getChildren().clear();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" person.favouriteProperty().addListener((observable, oldValue, newValue) -\u003e initFavourite(person));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" * display the heart for favourite person","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" private void initFavourite(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" boolean favouriteStatus \u003d person.getFavourite();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Label favouriteLabel \u003d new Label();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" Image starFilled \u003d new Image(getClass().getResource(\"/images/heart.png\").toExternalForm());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" if (favouriteStatus) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setGraphic(new ImageView(starFilled));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" favouriteLabel.setStyle(\"-fx-background-color: transparent; -fx-border-color: transparent\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" cardPane.getChildren().add(favouriteLabel);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" * Locate hashed colour for tag. If not found, new colour is assigned to tag","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" * @param tag","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" * @return","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" private String getTagColour(String tag) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" if (!colourHash.containsKey(tag)) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" int randomiser \u003d randomNumber.nextInt(Colours.values().length);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" String colour \u003d Colours.values()[randomiser].toString();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" colourHash.put(tag, colour);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" return colourHash.get(tag);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" * Assigns each tag a colour","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" * @param person","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" private void initTags(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" person.getTags().forEach(tag -\u003e {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" Label newTagLabel \u003d new Label(tag.getTagName());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" newTagLabel.setStyle(\"-fx-background-color: \" + this.getTagColour(tag.getTagName()));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" tags.getChildren().add(newTagLabel);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" });","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultiplier * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" public Label getName() {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" return name;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" public Label getPhone() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" return phone;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" public Label getAddress() {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" return address;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" public Label getRemark() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"charlesgoh"},"content":" return remark;","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"charlesgoh"},"content":" public Label getEmail() {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" return email;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" //author","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":67,"Esilocke":2,"wangyiming1019":52,"-":84}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Panel containing the list of persons.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" private ObservableList\u003cReadOnlyPerson\u003e personList;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" this.personList \u003d personList;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cReadOnlyPerson\u003e personList) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(personList, (person) -\u003e","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" new PersonCard(person, personList.indexOf(person) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" * Increases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Decreases all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(this.fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" * Resets all person cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"PersonListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" // Set new font size","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New person font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for person cards","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * @param event","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" private void handlePersonCardChangeFontSizeEvent (ChangeFontSizeEvent event) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" case 0:","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" case 1:","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" case 2:","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" * Listens for change of font size events","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" * @param event","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(personListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}.","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" setText(null);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":92,"jeffreygohkw":7,"Esilocke":14,"-":86}},{"path":"src/main/java/seedu/address/ui/StatusBarFooter.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.time.Clock;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.controlsfx.control.StatusBar;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * A ui for the status bar that is displayed at the footer of the application.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class StatusBarFooter extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_INITIAL \u003d \"Not updated yet in this session\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String SYNC_STATUS_UPDATED \u003d \"Last Updated: %s\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Used to generate time stamps.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * TODO: change clock to an instance variable.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * We leave it as a static variable because manual dependency injection","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * will require passing down the clock reference all the way from MainApp,","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * but it should be easier once we have factories/DI frameworks.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static Clock clock \u003d Clock.systemDefaultZone();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(StatusBarFooter.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"StatusBarFooter.fxml\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private StatusBar syncStatus;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" private StatusBar totalPersons;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" @FXML","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private StatusBar saveLocationStatus;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public StatusBarFooter(String saveLocation, int initialTotalPersons) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" setSyncStatus(SYNC_STATUS_INITIAL);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" setSaveLocation(\"./\" + saveLocation);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" setTotalPersons(initialTotalPersons);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Sets the clock used to determine the current time.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static void setClock(Clock clock) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" StatusBarFooter.clock \u003d clock;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Returns the clock currently in use.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public static Clock getClock() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return clock;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void setSaveLocation(String location) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.saveLocationStatus.setText(location));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" private void setSyncStatus(String status) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e this.syncStatus.setText(status));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent(AddressBookChangedEvent abce) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" long now \u003d clock.millis();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" String lastUpdated \u003d new Date(now).toString();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(abce, \"Setting last updated status to \" + lastUpdated));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" setSyncStatus(String.format(SYNC_STATUS_UPDATED, lastUpdated));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" this.setTotalPersons(abce.data.getPersonList().size());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" private void setTotalPersons(int totalPersons) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" this.totalPersons.setText(totalPersons + \" person(s) listed\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":9,"-":79}},{"path":"src/main/java/seedu/address/ui/TaskCard.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A UI component that displays the information of a {@code Task}","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class TaskCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListCard.fxml\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final ReadOnlyTask task;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private HBox taskCardPane;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" private Label id;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" private Label state;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Label description;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private Label priority;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private Label assignCount;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" private Label taskAddress;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" public TaskCard(ReadOnlyTask task, int displayedIndex, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" bindListeners(task);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" private void bindListeners(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assignCount.textProperty().bind(Bindings.convert(task.assigneeProperty()));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" taskAddress.textProperty().bind(Bindings.convert(task.taskAddressProperty()));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" taskName.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" id.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" description.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" deadline.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" priority.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" taskAddress.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" assignCount.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" state.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof TaskCard)) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" TaskCard card \u003d (TaskCard) other;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" \u0026\u0026 task.equals(card.task);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" public Label getTaskName() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" return taskName;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public Label getId() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" return id;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" public Label getDescription() {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return description;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public Label getDeadline() {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" return deadline;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" public Label getPriority() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" return priority;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" public Label getTaskAddress() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" return taskAddress;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" return this.fontSizeMultipler;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":47,"jeffreygohkw":4,"Esilocke":95}},{"path":"src/main/java/seedu/address/ui/TaskListPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MAXIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.commons.events.ui.ChangeFontSizeEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Panel containing the list of tasks.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class TaskListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"TaskListPanel.fxml\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(TaskListPanel.class);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private ListView\u003cTaskCard\u003e taskListView;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultiplier;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private ObservableList\u003cReadOnlyTask\u003e taskList;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public TaskListPanel(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" this.taskList \u003d taskList;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private void setConnections(ObservableList\u003cReadOnlyTask\u003e taskList) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" ObservableList\u003cTaskCard\u003e mappedList \u003d EasyBind.map(","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" taskList, (task) -\u003e new TaskCard(task, taskList.indexOf(task) + 1, fontSizeMultiplier));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" taskListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" taskListView.setCellFactory(listView -\u003e new TaskListViewCell());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" logger.fine(\"Selection in task list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" raise(new TaskPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Increases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Increasing font sizes\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" * Decreases all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Decreasing font sizes\");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" setFontSizeMultiplier(fontSizeMultiplier - 1);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" * Resets all task cards\u0027 font sizes in person list","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"TaskListPanel: Resetting font sizes\");","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d MINIMUM_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" setConnections(taskList);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" * Gets integer value of font size multiplier","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultiplier() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultiplier;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" * Set integer value of font size multiplier","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultiplier(int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set new font size","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" // Restrict from minimum","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.max(MINIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" // Restrict from maximum","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultiplier \u003d Math.min(MAXIMUM_FONT_SIZE_MULTIPLIER, this.fontSizeMultiplier);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"New task font size multiplier: \" + Integer.toString(this.fontSizeMultiplier));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" * Handles command induced change font size event for task cards","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" * @param event","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" private void handleTaskCardChangeFontSizeEvent (ChangeFontSizeEvent event) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" switch (event.getTriggerOption()) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" case 0:","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to increase font size\");","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" increaseFontSize();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" case 1:","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" decreaseFontSize();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to decrease font size\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" case 2:","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" resetFontSize();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Attempting to reset font size\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" break;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" default:","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" logger.info(\"Unable to handle change font size event. Stopping execution now\");","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Scrolls to the {@code TaskCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" taskListView.scrollTo(index);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" taskListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" });","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" private void handleJumpToListRequestTaskEvent(JumpToListRequestTaskEvent event) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in task list view\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelLocateEvent(BrowserPanelLocateEvent event) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" private void handleBrowserPanelNavigateEvent(BrowserPanelNavigateEvent event) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to clear selection in person list view\");","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" Platform.runLater(taskListView.getSelectionModel()::clearSelection);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code TaskCard}.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" class TaskListViewCell extends ListCell\u003cTaskCard\u003e {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" protected void updateItem(TaskCard task, boolean empty) {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" super.updateItem(task, empty);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" if (empty || task \u003d\u003d null) {","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" setText(null);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" } else {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" setGraphic(task.getRoot());","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":81,"jeffreygohkw":1,"Esilocke":114}},{"path":"src/main/java/seedu/address/ui/Ui.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * API of UI component","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public interface Ui {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" /** Starts the UI (and the App). */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" void start(Stage primaryStage);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" /** Stops the UI. */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" void stop();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" /** Gets the main window. */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" MainWindow getMainWindow();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":2,"-":16}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" private static final String ICON_APPLICATION \u003d \"/images/address_book_32_alternative.png\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" private static UserPrefs prefs;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" primaryStage.setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" //Set the application icon.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" prefs.setTheme(mainWindow.getTheme());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" mainWindow.hide();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" mainWindow.releaseResources();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" public MainWindow getMainWindow() {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" return mainWindow;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" String contentText) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" alert.getDialogPane().getStylesheets().add(String.format(\"view/\", prefs.getTheme()));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" alert.setTitle(title);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" alert.showAndWait();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" System.exit(1);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" event.exception);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"jeffreygohkw":8,"-":118}},{"path":"src/main/java/seedu/address/ui/ViewPersonPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import java.util.Random;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.image.ImageView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.VBox;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" * Contains the details of a person.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewPersonPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_NAME_SIZE \u003d 15;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_ATTRIBUTE_SIZE \u003d 10;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public static final int FONT_SIZE_EXTENDER \u003d 5;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final int DEFAULT_FONT_SIZE_MULTIPLIER \u003d 0;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewPersonPanel.fxml\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" * Preset values for random selection later.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" private enum Colours {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" blue, green, brown, purple, navy, crimson, firebrick, maroon, red, black","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private static HashMap\u003cString, String\u003e colourHash \u003d new HashMap\u003cString, String\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private static Random randomNumber \u003d new Random();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" private static int nameSize \u003d DEFAULT_NAME_SIZE;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static int attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyPerson person;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" private VBox personPanel;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" private Label name;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" private Label address;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private ImageView avatarImage;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private Label email;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" private int fontSizeMultipler;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel(ReadOnlyPerson person, int fontSizeMultiplier) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" this.fontSizeMultipler \u003d fontSizeMultiplier;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" initializeAvatar();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" updateAttributeSizes();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public ViewPersonPanel() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Person} properties","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" private void initializeWithPerson(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" name.textProperty().bind(Bindings.convert(person.nameProperty()));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" phone.textProperty().bind(Bindings.convert(person.phoneProperty()));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" address.textProperty().bind(Bindings.convert(person.addressProperty()));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" remark.textProperty().bind(Bindings.convert(person.remarkProperty()));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" email.textProperty().bind(Bindings.convert(person.emailProperty()));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" //author charlesgoh","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" * Sets avatar to a URL or filepath and falls back to the placeholder avatar if specified path fits in","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * neither categories","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" private void initializeAvatar() {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String avatarPath \u003d person.getAvatar().value;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" logger.info(\"Attempting to set avatar to image at specified URL or filepath\");","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" Image newImage \u003d new Image(avatarPath);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(newImage);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalArgumentException ex) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" logger.warning(\"Saved path is not a valid filepath or URL path. Setting avatar to placeholder\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" Image imagePlaceholder \u003d new Image(\"file:docs/images/Avatar.png\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" avatarImage.setImage(imagePlaceholder);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Set default size for all attributes","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" public void updateAttributeSizes() {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" nameSize \u003d DEFAULT_NAME_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" attributeSize \u003d DEFAULT_ATTRIBUTE_SIZE + (fontSizeMultipler * FONT_SIZE_EXTENDER);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" // Set styles using set name and attribute sizes","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" name.setStyle(\"-fx-font-size: \" + Integer.toString(nameSize));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" phone.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" address.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" remark.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" email.setStyle(\"-fx-font-size: \" + Integer.toString(attributeSize));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" return true;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" if (!(other instanceof ViewPersonPanel)) {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // state check","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" ViewPersonPanel card \u003d (ViewPersonPanel) other;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" return person.equals(card.person);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" public Label getName() {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return name;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public Label getPhone() {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" return phone;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" public Label getAddress() {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" return address;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" public Label getRemark() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" return remark;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public Label getEmail() {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" return email;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" public int getFontSizeMultipler() {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" return fontSizeMultipler;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" public void setFontSizeMultipler(int fontSizeMultipler) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" this.fontSizeMultipler \u003d fontSizeMultipler;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" private void handlePersonPanelSelectionChangedEvent(PersonPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" this.person \u003d event.getNewSelection().person;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" initializeWithPerson(person);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" initializeAvatar();","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":28,"Esilocke":155}},{"path":"src/main/java/seedu/address/ui/ViewTaskPanel.java","fileType":"code","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import javafx.beans.binding.Bindings;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.TaskPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" * Contains details of a Task.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"public class ViewTaskPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" private static final String FXML \u003d \"ViewTaskPanel.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Label taskName;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Label description;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private Label deadline;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" private Label priority;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @FXML","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Label state;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ReadOnlyTask task;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" if (task !\u003d null) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" this.task \u003d task;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(task);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" public ViewTaskPanel() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Binds the individual UI elements to observe their respective {@code Task} properties","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" * so that they will be notified of any changes.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" private void initializeWithTask(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" taskName.textProperty().bind(Bindings.convert(task.taskNameProperty()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" description.textProperty().bind(Bindings.convert(task.descriptionProperty()));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" deadline.textProperty().bind(Bindings.convert(task.deadlineProperty()));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" priority.textProperty().bind(Bindings.convert(task.priorityProperty()));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" state.textProperty().bind(Bindings.convert(task.stateProperty()));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private void handleTaskPanelSelectionChangedEvent(TaskPanelSelectionChangedEvent event) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" initializeWithTask(event.getNewSelection().task);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":67}},{"path":"src/test/data/ManualTesting/[W09-B2][Address++]TestScript.adoc","fileType":"docs","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"\u003d Address++ - Test Script","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":":sectnums:","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":":experimental:","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":":repoURL: https://github.com/CS2103AUG2017-W09-B2/main","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"By: `Team W09-B2` Since: `Aug 2017` Licence: `MIT` +","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Getting Started","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"Ensure that you have the [W09-B2][Address++].jar file and the [W09-B2][Address++]SampleData.xml available on your computer and a working internet connection.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d Importing the test data","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":". Launch [W09-B2][Address++].jar.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":". On initial launch, it should contain sample data of 6 different persons and 0 tasks.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":". Type `open` to open a pop up window.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":". Navigate to the location of the [W09-B2][Address++]SampleData.xml file and click Open to open it.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":". The sample data containing 20 different persons and 7 different tasks should be loaded.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":". You are now ready to begin testing.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d User Interface","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"* The Menu on the top of the screen contains 3 buttons: `File`, `Help` and `Font Size`.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"* Below the menu is the command line, you can type your commands in here.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"* The box below the command line will show feedback when you type in commands, such as if the command is successful or if you have typed an erroneous command.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"* The leftmost panel contains the list of persons in the address book.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"* The middle panel contains the list of tasks in the address book.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"* The rightmost panel contains either the details of the selected task or person, or the in-application browser.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"* The bottom bar contains miscellaneous information about the address book, such as the file where the save data will be stored and the number of persons in the address book.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"Unless explicitly stated, each test section for each command is assumed to be carried out continuously. +","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"This means that you *should carry out the tests in the given order*. +","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"Each test section is carried out independently. This means that you are recommended to `undo` to restore the address book after each test section.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d HelpCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"*Opening the help window*","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"help","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"The User Guide appears in a separate window.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"Opened help window.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddPersonCommand","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"*Adding a person with all details*","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"add n/Svea Lisenhower p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"A person named Svea Lisenhower, with the details as stated above is added to the address book at index 21. +","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"New person added: +","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"Svea Lisenhower Phone: 98009621 Email: svea_li@example.com Address: Jurong West Street 65 Blk 667A Remark: Russian Exchange Student Avatar: https://example.com/image.png Tags:","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing compulsory details*","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"add p/98009621 e/svea_li@example.com a/Jurong West Street 65 Blk 667A r/Russian Exchange Student v/https://example.com/image.png","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"add: Adds a person to the address book. Parameters: n/NAME [p/PHONE] [e/EMAIL] [a/ADDRESS] [r/REMARK] [v/AVATAR] [t/TAG]... +","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"Example: add n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 r/Sells sea shells on the sea shore v/avatar-filepath.pngt/friends t/owesMoney","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"*Adding a person with missing optional details*","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"add n/Kent Seethis","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"A person named Kent Seethis, but with no other details is added to the address book at index 22. +","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"New person added: +","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"Kent Seethis Phone: Email: Address: Remark: Avatar: Tags:","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid phones*","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl p/@","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid emails*","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl e/here","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"*Adding a person with invalid tags*","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":"add n/Fionnes Karl t/@","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified tag is invalid.","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTaskCommand","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":"*Adding a task with all details*","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":"add task/ n/Buy pencils d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":"A task named \"Buy pencils\", with a description of \"Buy 4 pencils from Popular\", with a deadline of \"Sat Nov 18 19:00:00 SGT 2017\",","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":"a priority of \"Low\", and an address of \"West Point\" is added to the addresss book at index 8 in the task list. +","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":"New task added: +","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":"Buy pencils Description: Buy 4 pencils from Popular Deadline: Sat Nov 18 19:00:00 SGT 2017 Priority: Low Address: West Point \u003cIncomplete\u003e +","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing compulsory details*","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":"add task/ d/Buy 4 pencils from Popular by/18 November 7pm p/2 a/West Point","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":"An error message is printed out, as name is a compulsory field and cannot be missing.","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":"add task/: Adds a task to the address book. Parameters: n/NAME [d/DESCRIPTION] [by/DEADLINE] [p/PRIORITY] [a/ADDRESS] +","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"Example: add task/ n/Buy pencil d/Buy a new pencil from ABS by/10-10-2017 p/4 a/12 Kent Ridge Crescent, 119275","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"*Adding a task with missing optional details*","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":"A task with the name \"Create better task\", and no other details present is added to the address book at index 9 in the task list. +","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":"New task added:","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":"Create better task Description: Deadline: Priority: Address: \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid deadlines*","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task by/AAAAAAAAAAAAA","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified deadline is invalid.","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":"*Adding a task with invalid priority*","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":"add task/ n/Create better task p/99999999","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified priority is invalid.","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AddTagCommand","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":"*Adding tags to persons in Address++*","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 2 t/friends","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":"The first two person in the person list will have the tag `friends` but it will not show in the person panel.","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"add tag/ t/friends","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will have the tag `friends`.","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":"Added Tag: [friends]","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons if all of them having the input tags*","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 3 t/friends","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since all of them have the tag `friends` already.","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":"This tag already exists in all target persons in the current list.","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with invalid index*","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":"add tag/ 23 t/friends","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list.","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid.","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":"*Failing to add tags to persons with no input tags*","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":"add tag/ 1 t/","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags.","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ListCommand","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":"*List all entries*","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"list","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":"All tasks and persons in the address book are listed.","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":"Listed all entries","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditPersonCommand","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":"*Editing a person for all entries*","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Laura Edelweiss p/1111111 a/House of Edelweiss e/laura@example.com r/Heiress to the House of Edelweiss t/Heiress v/https://example.com/validimage2.png","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"The person at index 7 (Elizabeth Edelweiss) is updated and now has new details matching the command.","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":"Edited Person: +","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"Laura Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":"*Editing a person with only 1 entry*","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":"edit 7 n/Elizabath Edelweiss","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":"Only the name of the person at index 7 (Now named Laura Edelweiss) is changed to Elizabeth Edelweiss. All other details remain the same.","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":"Edited Person: +","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":"Elizabath Edelweiss Phone: 1111111 Email: laura@example.com Address: House of Edelweiss Remark: Heiress to the House of Edelweiss Avatar: https://example.com/validimage2.png Tags: [Heiress]","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":"edit 7 n/","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid.","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"Person names should only contain alphanumeric characters and spaces, and it should not be blank","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":"edit 7 p/ppp","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid.","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":"Phone numbers can only contain numbers, and should be at least 3 digits long","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"edit 7 e/ppp","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid.","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":"Person emails should be 2 alphanumeric/period strings separated by \u0027@\u0027","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":"edit 7 t/@@@@@@","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid.","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":"*Editing a private person*","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":"edit 11 n/Unhide me","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person\u0027s name is private.","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"At least one field to be edited must be public.","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid person*","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":"edit 19999 n/Unhide me","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid.","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTaskCommand","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":"*Editing a task for all entries*","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Paper Castle d/Castle Garde by/9 December 2017 8pm p/1 a/NUS","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"Esilocke"},"content":"The task at index 7 is updated and now has new details matching the command.","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"Esilocke"},"content":"Edited Task: +","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"Esilocke"},"content":"Paper Castle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"Esilocke"},"content":"*Editing a task with only 1 entry*","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/Sandcastle","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"Esilocke"},"content":"Only the name of the task at index 7 (Now named Paper Castle) is changed to Sandcastle. All other details remain the same.","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"Esilocke"},"content":"Edited Task: +","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"Esilocke"},"content":"Sandcastle Description: Castle Garde Deadline: Sat Dec 09 20:00:00 SGT 2017 Priority: Lowest Address: NUS \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"Esilocke"},"content":"*Editing a task with invalid details*","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 n/","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified name is invalid.","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"Esilocke"},"content":"Task names can be in any format, and should not be blank","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 by/AAAAAAAA","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified phone is invalid.","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"Esilocke"},"content":"The specified date is invalid.","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"Esilocke"},"content":"edit task/ 7 e/ppp","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the specified email is invalid.","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"Esilocke"},"content":"Task priorities must be an integer from 0 to 5, inclusive, where 5 represents the highest priority","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"Esilocke"},"content":"*Editing an invalid task*","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"Esilocke"},"content":"edit task/ 19999 n/Tiny, tiny house","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the index is invalid.","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d EditTagCommand","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag in the address book*","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends goodFriends","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"Esilocke"},"content":"All instances of \"friends\" tags are replaced with \"goodFriends\" tags (at indexes 1, 3, 10, 11, 12, 17). +","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"Esilocke"},"content":"Replaced tag friends with goodFriends","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"Esilocke"},"content":"*Renaming a non-existant tag in the address book*","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"Esilocke"},"content":"edit tag/ friends nemesis","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"Esilocke"},"content":"As \"friends\" were renamed to \"goodFriends\", there are no more \"friends\" tags. +","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the tag \"friends\" is not in any of the contacts.","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"Esilocke"},"content":"No such tag was found in the address book.","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with the exact same name*","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends goodFriends","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the two tag names are exactly the same. +","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"Esilocke"},"content":"The new name of the tag cannot be the same as the old name.","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"Esilocke"},"content":"*Renaming a tag to another one with an invalid name*","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"Esilocke"},"content":"edit tag/ goodFriends @@@@","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the new tag name is invalid. +","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"Esilocke"},"content":"edit tag/: Edits the specified tag and updates all existing contacts that shares this tag with the new value. +","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"Esilocke"},"content":"Parameters: TAGTOCHANGE (must be alphanumerical) TAGNEWNAME (must be alphanumerical) +","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"Esilocke"},"content":"Example: edit friends enemies","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ChangePrivacyCommand","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of public fields*","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/true p/true e/true a/true r/true","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as private, and the original data is hidden in the UI.","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: \u003cPrivate Name\u003e Phone: \u003cPrivate Phone\u003e Email: \u003cPrivate Email\u003e Address: \u003cPrivate Address\u003e Remark: \u003cPrivate Remark\u003e Avatar: Tags: [project]","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 n/false","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s name, being originally public, remains public.","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of private fields*","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"Esilocke"},"content":"changeprivacy 20 n/false p/false e/false a/false r/false","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"Esilocke"},"content":"The 20th person has all of their fields set as public, revealing all the original data in the UI.","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"Esilocke"},"content":"changeprivacy 6 a/true","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"Esilocke"},"content":"The 6th person\u0027s address, being originally private, remains private.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: David Ng Phone: 87877003 Email: david_ng@example.com Address: \u003cPrivate Address\u003e Remark: Avatar: Tags:","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy of empty fields*","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/true","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to private.","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: \u003cPrivate Remark\u003e Avatar: Tags: [GEQ2000]","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"Esilocke"},"content":"changeprivacy 2 r/false","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"Esilocke"},"content":"The 2nd person has their remark set to public, but since it is empty, it does not display any data.","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"Esilocke"},"content":"Changed the Privacy of the Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d PrivacyLevelCommand","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"Esilocke"},"content":"*Changing the privacy level*","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"Esilocke"},"content":"privacylevel 1","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"Esilocke"},"content":"All persons are listed with any private data revealed.","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 1.","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"Esilocke"},"content":"privacylevel 3","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"Esilocke"},"content":"Lists all persons except those that have at least one private field.","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 3.","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"Esilocke"},"content":"privacylevel 2","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"Esilocke"},"content":"List all persons. Fields that are private will have their data hidden.","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"Esilocke"},"content":"Successfully changed privacy level to 2.","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteCommand","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"Esilocke"},"content":"*Setting a person in the Address++ to be the favourite person*","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"Esilocke"},"content":"list +","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"Esilocke"},"content":"favourite 2","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"Esilocke"},"content":"The 2nd person in the Address++ will be favoured and a heart picture will be shown next to his name.","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"Esilocke"},"content":"Favourited Person: Antoinette Chan Phone: 89912301 Email: antoinette@example.com Address: Remark: Avatar: Tags: [GEQ2000]","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person if he has been favoured*","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"Esilocke"},"content":"list +","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"Esilocke"},"content":"favourite 1","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"Esilocke"},"content":"An error message will display since the first person in the Address++ has been favoured.","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"Esilocke"},"content":"Person is already favourited.","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"Esilocke"},"content":"*Failing to set a favourite person with invalid index*","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"Esilocke"},"content":"favourite 56","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"Esilocke"},"content":"An error message will display since there is no 56th person in the current list.","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FavouriteListCommand","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"Esilocke"},"content":"*Listing all favoured persons in the Address++*","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"Esilocke"},"content":"showfavourite","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"Esilocke"},"content":"List all the favoured persons.","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons.","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"Esilocke"},"content":"*Listing empty list with no favoured person in the Address++*","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"Esilocke"},"content":"showfavourite","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"Esilocke"},"content":"An empty list but with successful message.","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"Esilocke"},"content":"Listed all favourited persons.","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindPersonCommand","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"Esilocke"},"content":"find plumley","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\", case insensitive, in their name are displayed. +","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"Esilocke"},"content":"2 persons listed!","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"Esilocke"},"content":"find plumley edelweiss","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"Esilocke"},"content":"All contacts with the word \"plumley\" or \"edelweiss\", case insensitive, in their name are displayed. +","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":"4 persons listed!","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d FindTaskCommand","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":"*Finding one keyword*","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":"find task/ on","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\", case insensitive, in their name or description are displayed. +","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords*","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":"find task/ on stew","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description are displayed. +","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"Esilocke"},"content":"3 tasks listed!","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with priority search*","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"Esilocke"},"content":"find task/ on stew p/4","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and have a priority of \"High\" or above are displayed. +","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state search*","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, and are currently complete are displayed. +","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"Esilocke"},"content":"2 tasks listed!","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"Esilocke"},"content":"*Finding multiple keywords with state and priority search*","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"Esilocke"},"content":"find task/ on stew done/true p/3","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"Esilocke"},"content":"All tasks with the word \"on\" or \"stew\", case insensitive, in their name or description, with a priority of at least \"medium\", and are currently complete are displayed. +","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"Esilocke"},"content":"1 tasks listed!","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d TagListCommand","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"*Listing all the tag in the Address++*","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"showtag","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"Tags contain capital letter will displayed in front. All the tags (with or without capital letter) will be displayed in alphabetical order.","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":"All the tags are here: \u003cGEQ2000\u003e \u003cacquaintance\u003e \u003cclassmates\u003e \u003cenemy\u003e \u003cfamily\u003e \u003cfriends\u003e \u003cneighbours\u003e \u003cproject\u003e \u003csecretive\u003e \u003ctutee\u003e","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":"*Listing empty tag list with no tags in Address++*","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"showtag","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"There is no tag list.","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"There is no tag!","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d FindTagCommand","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with specific tags*","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"find tag/ friends","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"List all the persons who have tag `friends`.","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"6 persons listed!","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"*Finding person in the Address++ without specific tags*","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"find tag/ /friends","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":"List all the persons without tag `friends`.","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"14 persons listed!","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":"*Finding person in the Address++ with \"TAGA\" but without \"TAGB\"*","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"find tag/ friends /classmates","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"Persons have tag `friends` but do not have tag `classmates` will be listed.","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"5 persons listed!","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"*Failing to find persons in the Address++ with valid tags*","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"find tag/ fff","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"Although it is a valid tag, there is no person with tag `fff`. Hence, no person will be listed.","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":"0 persons listed!","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeletePersonCommand","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"Esilocke"},"content":"delete 20","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"Esilocke"},"content":"The contact at index 20, Myuria Plumley is deleted from the address book. +","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"Esilocke"},"content":"Deleted Person: Myuria Plumley Phone: 99831115 Email: myuria@example.com Address: #02, Bukit Timah Street 56 Remark: Wears her hair on her right Avatar: Tags: [project]","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"Esilocke"},"content":"delete 2000","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTaskCommand","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"Esilocke"},"content":"*Deleting a person*","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"Esilocke"},"content":"delete task/ 7","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is deleted from the address book. +","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"Esilocke"},"content":"Deleted Task: Paper Model for project Description: Paper model of Himeji castle for project. Myucel/Myuria twins in charge Deadline: Wed Dec 13 17:00:00 SGT 2017 Priority: Medium Address: \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"Esilocke"},"content":"*Deleting a person with an invalid index*","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"Esilocke"},"content":"delete task/ 7000","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DeleteTagCommand","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"Esilocke"},"content":"*Deleting tags from persons in the Address++*","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/friends","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"Esilocke"},"content":"The tag `friends` for the first person will be deleted. The rest tags remain no change.","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"Esilocke"},"content":"delete tag/ t/friends","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"Esilocke"},"content":"All persons in the Address++ will not have the tag `friends`.","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"Esilocke"},"content":"Deleted Tag: [friends]","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons if none of them have the input tags*","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 2 t/neighbour","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"Esilocke"},"content":"An error message will display since target persons do not have tag `neighbour`.","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"Esilocke"},"content":"The target persons do not have input tags.","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with invalid index*","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"Esilocke"},"content":"delete tag/ 23 t/friends","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no 23rd person in the person list.","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"Esilocke"},"content":"*Failing to delete tags from persons with no input tags*","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"Esilocke"},"content":"delete tag/ 1 t/","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"Esilocke"},"content":"An error message will displayed since there is no input tags.","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"Esilocke"},"content":"Tags names should be alphanumeric","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectPersonCommand","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"Esilocke"},"content":"*Selecting a person*","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"Esilocke"},"content":"select 19","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"Esilocke"},"content":"The person at index 19, \"Myucel Plumley\" is selected, and her details are listed in the UI panel. +","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"Esilocke"},"content":"Selected Person: 19","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"Esilocke"},"content":"*Selecting a person with an invalid index*","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"Esilocke"},"content":"select 19999","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"Esilocke"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SelectTaskCommand","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"Esilocke"},"content":"*Selecting a task*","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"Esilocke"},"content":"select task/ 7","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"Esilocke"},"content":"The task at index 7, \"Paper Model for project\" is selected and its details are shown in the UI panel. +","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"Esilocke"},"content":"Selected Task: 7","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"Esilocke"},"content":"*Selecting a task with an invalid index*","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"Esilocke"},"content":"select task/ 7000","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"jeffreygohkw"},"content":"\u003d\u003d\u003d LocateCommand","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"jeffreygohkw"},"content":"*Locating a person\u0027s address on Google Maps*","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"jeffreygohkw"},"content":"locate 1","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and searches for the first person\u0027s address. +","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"jeffreygohkw"},"content":"Searching for Person at Index: 1","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"jeffreygohkw"},"content":"*Failing to locate a person with no address*","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"jeffreygohkw"},"content":"locate 2","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"jeffreygohkw"},"content":"An error message is printed, as the person at index 2 has no address. +","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"jeffreygohkw"},"content":"Person 2 has no Address","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"Esilocke"},"content":"*Failing to locate a person with a private address*","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"Esilocke"},"content":"locate 6","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"Esilocke"},"content":"Person 6 has a Private Address","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d NavigateCommand","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Person*","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"Esilocke"},"content":"navigate fp/1 tp/3","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first person\u0027s address to the third person\u0027s address. +","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 30 Geylang Street 29, #06-40 to Blk 30 Lorong 3 Serangoon Gardens, #07-18","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Task*","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 tt/1","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to the first task\u0027s address. +","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to Blk 45 Aljunied Street 85, #11-31","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"Esilocke"},"content":"*Navigating from Person to Address*","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"Esilocke"},"content":"navigate fp/4 ta/NUS","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the fourth person\u0027s address to NUS. +","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 11 Ang Mo Kio Street 74, #11-04 to NUS","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Person*","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tp/3","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the third person\u0027s address. +","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to Blk 30 Lorong 3 Serangoon Gardens, #07-18","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Task*","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 tt/4","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to the fourth task\u0027s address. +","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to SR-1, COM-1 NUS","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"Esilocke"},"content":"*Navigating from Task to Address*","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"Esilocke"},"content":"navigate ft/1 ta/NUS","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"jeffreygohkw"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from the first task\u0027s address to NUS. +","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"Esilocke"},"content":"Navigating from Blk 45 Aljunied Street 85, #11-31 to NUS","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Person*","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"jeffreygohkw"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"Esilocke"},"content":"navigate fa/NUS tp/3","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NUS to the third person\u0027s address. +","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"jeffreygohkw"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"Esilocke"},"content":"Navigating from NUS to Blk 30 Lorong 3 Serangoon Gardens, #07-18","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Task*","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"Esilocke"},"content":"navigate fa/NTU tt/4","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"jeffreygohkw"},"content":"****","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from NTU to the fourth task\u0027s address. +","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"Esilocke"},"content":"Navigating from NTU to SR-1, COM-1 NUS","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"Esilocke"},"content":"*Navigating from Address to Address*","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"Esilocke"},"content":"navigate fa/SMU ta/NUS","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"Esilocke"},"content":"Google Maps opens, and provides directions from SMU to NUS. +","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"Esilocke"},"content":"Navigating from SMU to NUS","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has a private address*","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"Esilocke"},"content":"navigate fp/6 ta/Changi Airport","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 6 has a private address. +","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"Esilocke"},"content":"Address of the Person at index 6 is private.","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a person has no address*","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"Esilocke"},"content":"navigate fp/8 ta/Changi Airport","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the person at index 8 has no address. +","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"Esilocke"},"content":"Person at index 8 does not have an address.","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"Esilocke"},"content":"*Failing to navigate if a task has no address*","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"Esilocke"},"content":"navigate ft/2 ta/Changi Airport","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"Esilocke"},"content":"An error message is printed, as the task at index 2 has no address. +","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"Esilocke"},"content":"Task at index 2 does not have an address.","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"Esilocke"},"content":"navigate","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"Esilocke"},"content":"navigate: Get directions from one address to another. +","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"Esilocke"},"content":"Parameters: [fp/INDEX] OR [ft/INDEX] (must be a positive integer) OR [fa/ADDRESS] (Only one of three) AND [tp/INDEX] OR [tt/INDEX] (must be a positive integer) OR [ta/ADDRESS] (Only one of three) +","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"Esilocke"},"content":"Example: navigate fp/2 ta/University Town","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"Esilocke"},"content":"*Error when no address after a fa/ or ta/ prefix is entered*","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"Esilocke"},"content":"navigate fa/ tp/1","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"Esilocke"},"content":"Location can take any value, and it should not be blank","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"Esilocke"},"content":"*Error when no integer after a fp/, tp/, ft/ or tt/ prefix is entered*","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"Esilocke"},"content":"navigate ft/ tp/1","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"Esilocke"},"content":"Index is not a non-zero unsigned integer.","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetCompleteCommand","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as complete*","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"Esilocke"},"content":"setcomplete 3","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"Esilocke"},"content":"The task at index 3, \"Visit David\u0027s house\" is marked as completed. +","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"Esilocke"},"content":"Marked Task as completed: Visit David\u0027s house Description: Visit to David Li\u0027s house next Saturday Deadline: Sat Nov 18 12:00:00 SGT 2017 Priority: Low Address: Blk 436 Serangoon Gardens Street 26, #16-43 \u003cIncomplete\u003e","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"Esilocke"},"content":"*Marking an already complete task as complete*","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"Esilocke"},"content":"setcomplete 3","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already complete +","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"Esilocke"},"content":"The specified task is already completed","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"Esilocke"},"content":"setcomplete 7000","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d SetInompleteCommand","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"Esilocke"},"content":"*Marking an existing task as incomplete*","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"Esilocke"},"content":"setincomplete 1","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"Esilocke"},"content":"The task at index 1, \"Tuition\" is marked as incomplete. +","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"Esilocke"},"content":"Marked Task as incomplete: Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"Esilocke"},"content":"*Marking an already incomplete task as incomplete*","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"Esilocke"},"content":"setincomplete 1","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the task is already incomplete +","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"Esilocke"},"content":"The specified task is already incomplete","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"Esilocke"},"content":"*Marking a task with an invalid index*","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"Esilocke"},"content":"setincomplete 7000","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1469,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1470,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d AssignCommand","isFullCredit":true},{"lineNumber":1471,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1472,"author":{"gitId":"Esilocke"},"content":"*Assigning 1 contact to a task*","isFullCredit":true},{"lineNumber":1473,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1474,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1475,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1476,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1","isFullCredit":true},{"lineNumber":1477,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1478,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1479,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Myucel Plumley is assigned to the first task, Tuition. The task now has 4 people assigned to it instead of 3. +","isFullCredit":true},{"lineNumber":1480,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1481,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1482,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1483,"author":{"gitId":"Esilocke"},"content":"Assigned 1 people to +","isFullCredit":true},{"lineNumber":1484,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1485,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1486,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1487,"author":{"gitId":"Esilocke"},"content":"*Assigning multiple contacts to a task*","isFullCredit":true},{"lineNumber":1488,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1489,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1490,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1491,"author":{"gitId":"Esilocke"},"content":"assign 18 20 to/1","isFullCredit":true},{"lineNumber":1492,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1493,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1494,"author":{"gitId":"Esilocke"},"content":"The contacts at index 18 and 20, Myuria Plumley and Clarissa Liselotte are assigned to the first task, Tuition. The task now has 6 people assigned to it instead of 4. +","isFullCredit":true},{"lineNumber":1495,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1496,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1497,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1498,"author":{"gitId":"Esilocke"},"content":"Assigned 2 people to +","isFullCredit":true},{"lineNumber":1499,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1500,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1501,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1502,"author":{"gitId":"Esilocke"},"content":"*Assigning contacts who are already assigned to a task*","isFullCredit":true},{"lineNumber":1503,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1504,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1505,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1506,"author":{"gitId":"Esilocke"},"content":"assign 19 to/1","isFullCredit":true},{"lineNumber":1507,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1508,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1509,"author":{"gitId":"Esilocke"},"content":"Myucel Plumley was already assigned to the task Tuition. An error message is printed out as she is already assigned to the task. +","isFullCredit":true},{"lineNumber":1510,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1511,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1512,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1513,"author":{"gitId":"Esilocke"},"content":"All the specified persons are already assigned to this task","isFullCredit":true},{"lineNumber":1514,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1515,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1516,"author":{"gitId":"Esilocke"},"content":"*Assigning no contacts to a task*","isFullCredit":true},{"lineNumber":1517,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1518,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1519,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1520,"author":{"gitId":"Esilocke"},"content":"assign to/1","isFullCredit":true},{"lineNumber":1521,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1522,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1523,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified.","isFullCredit":true},{"lineNumber":1524,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1525,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1526,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1527,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified","isFullCredit":true},{"lineNumber":1528,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1529,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1530,"author":{"gitId":"Esilocke"},"content":"*Assigning to a task with an invalid index*","isFullCredit":true},{"lineNumber":1531,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1532,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1533,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1534,"author":{"gitId":"Esilocke"},"content":"assign 5 to/7000","isFullCredit":true},{"lineNumber":1535,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1536,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1537,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1538,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1539,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1540,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1541,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1542,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1543,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1544,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d DismissCommand","isFullCredit":true},{"lineNumber":1545,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1546,"author":{"gitId":"Esilocke"},"content":"*Dismissing 1 contact from a task*","isFullCredit":true},{"lineNumber":1547,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1548,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1549,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1550,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1","isFullCredit":true},{"lineNumber":1551,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1552,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1553,"author":{"gitId":"Esilocke"},"content":"The contact at index 1, Alex Yeoh is assigned to the first task, Tuition. The task now has 2 people assigned to it instead of 3. +","isFullCredit":true},{"lineNumber":1554,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1555,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1556,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1557,"author":{"gitId":"Esilocke"},"content":"Dismissed 1 people from task +","isFullCredit":true},{"lineNumber":1558,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1559,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1560,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1561,"author":{"gitId":"Esilocke"},"content":"*Dismissing multiple contacts from a task*","isFullCredit":true},{"lineNumber":1562,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1563,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1564,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1565,"author":{"gitId":"Esilocke"},"content":"dismiss 6 8 from/1","isFullCredit":true},{"lineNumber":1566,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1567,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1568,"author":{"gitId":"Esilocke"},"content":"The contacts at index 6 and 8, David Ng and Ima Hidearu are assigned to the first task, Tuition. The task now has 0 people assigned to it instead of 2. +","isFullCredit":true},{"lineNumber":1569,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1570,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1571,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1572,"author":{"gitId":"Esilocke"},"content":"Dismissed 2 people from task +","isFullCredit":true},{"lineNumber":1573,"author":{"gitId":"Esilocke"},"content":"Tuition Description: Roy\u0027s math tuition on Friday Deadline: Fri Nov 10 17:00:00 SGT 2017 Priority: Medium Address: Blk 45 Aljunied Street 85, #11-31 \u003cComplete\u003e","isFullCredit":true},{"lineNumber":1574,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1575,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1576,"author":{"gitId":"Esilocke"},"content":"*Dismissing contacts who are already assigned from a task*","isFullCredit":true},{"lineNumber":1577,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1578,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1579,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1580,"author":{"gitId":"Esilocke"},"content":"dismiss 1 from/1","isFullCredit":true},{"lineNumber":1581,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1582,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1583,"author":{"gitId":"Esilocke"},"content":"There are no contacts assigned to the task Tuition.","isFullCredit":true},{"lineNumber":1584,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as none of the specified contacts were assigned to the task.","isFullCredit":true},{"lineNumber":1585,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1586,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1587,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1588,"author":{"gitId":"Esilocke"},"content":"None of the specified persons are assigned to this task","isFullCredit":true},{"lineNumber":1589,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1590,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1591,"author":{"gitId":"Esilocke"},"content":"*Dismissing no contacts from a task*","isFullCredit":true},{"lineNumber":1592,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1593,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1594,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1595,"author":{"gitId":"Esilocke"},"content":"dismiss from/1","isFullCredit":true},{"lineNumber":1596,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1597,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1598,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as no person indexes were specified.","isFullCredit":true},{"lineNumber":1599,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1600,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1601,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1602,"author":{"gitId":"Esilocke"},"content":"At least 1 person index must be specified","isFullCredit":true},{"lineNumber":1603,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1604,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1605,"author":{"gitId":"Esilocke"},"content":"*Dismissing from a task with an invalid index*","isFullCredit":true},{"lineNumber":1606,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1607,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1608,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1609,"author":{"gitId":"Esilocke"},"content":"dismiss 5 from/7000","isFullCredit":true},{"lineNumber":1610,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1611,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1612,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1613,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1614,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1615,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1616,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1617,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1618,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1619,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ViewAssignCommand","isFullCredit":true},{"lineNumber":1620,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1621,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with no persons assigned to it*","isFullCredit":true},{"lineNumber":1622,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1623,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1624,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1625,"author":{"gitId":"Esilocke"},"content":"viewassign 2","isFullCredit":true},{"lineNumber":1626,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1627,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1628,"author":{"gitId":"Esilocke"},"content":"No contacts are listed +","isFullCredit":true},{"lineNumber":1629,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1630,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1631,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1632,"author":{"gitId":"-"},"content":"0 persons listed!","isFullCredit":true},{"lineNumber":1633,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1634,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1635,"author":{"gitId":"Esilocke"},"content":"*Viewing a task with some persons assigned to it*","isFullCredit":true},{"lineNumber":1636,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1637,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1638,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1639,"author":{"gitId":"Esilocke"},"content":"viewassign 1","isFullCredit":true},{"lineNumber":1640,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1641,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1642,"author":{"gitId":"Esilocke"},"content":"3 contacts are listed, Alex Yeoh, David Ng, Ima Hidearu +","isFullCredit":true},{"lineNumber":1643,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1644,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1645,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1646,"author":{"gitId":"Esilocke"},"content":"3 persons listed!","isFullCredit":true},{"lineNumber":1647,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1648,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1649,"author":{"gitId":"Esilocke"},"content":"*Viewing from a task with an invalid index*","isFullCredit":true},{"lineNumber":1650,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1651,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1652,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1653,"author":{"gitId":"Esilocke"},"content":"viewassign 99999","isFullCredit":true},{"lineNumber":1654,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1655,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1656,"author":{"gitId":"Esilocke"},"content":"An error message is printed out as the index is invalid. +","isFullCredit":true},{"lineNumber":1657,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1658,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1659,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1660,"author":{"gitId":"Esilocke"},"content":"The task index provided is invalid","isFullCredit":true},{"lineNumber":1661,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1662,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1663,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ThemeCommand","isFullCredit":true},{"lineNumber":1664,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1665,"author":{"gitId":"Esilocke"},"content":"*Changing the theme of the address book*","isFullCredit":true},{"lineNumber":1666,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1667,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1668,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1669,"author":{"gitId":"Esilocke"},"content":"theme light","isFullCredit":true},{"lineNumber":1670,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1671,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1672,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a bright colour. +","isFullCredit":true},{"lineNumber":1673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1674,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1675,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1676,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: light","isFullCredit":true},{"lineNumber":1677,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1678,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1679,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1680,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1681,"author":{"gitId":"Esilocke"},"content":"theme dark","isFullCredit":true},{"lineNumber":1682,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1683,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1684,"author":{"gitId":"Esilocke"},"content":"The address book\u0027s colour scheme changes to a dark colour.+","isFullCredit":true},{"lineNumber":1685,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1686,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1687,"author":{"gitId":"Esilocke"},"content":"Theme Changed to: dark","isFullCredit":true},{"lineNumber":1688,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1689,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1690,"author":{"gitId":"Esilocke"},"content":"*Error when no arguments are entered*","isFullCredit":true},{"lineNumber":1691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1692,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1693,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1694,"author":{"gitId":"Esilocke"},"content":"theme","isFullCredit":true},{"lineNumber":1695,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1696,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1697,"author":{"gitId":"Esilocke"},"content":"The command fails, printing a message to tell the user of the proper input.","isFullCredit":true},{"lineNumber":1698,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1699,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1700,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1701,"author":{"gitId":"Esilocke"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":1702,"author":{"gitId":"Esilocke"},"content":"theme: Sets the theme based on the specified style. +","isFullCredit":true},{"lineNumber":1703,"author":{"gitId":"Esilocke"},"content":"Parameters: STYLE +","isFullCredit":true},{"lineNumber":1704,"author":{"gitId":"Esilocke"},"content":"Example: theme dark","isFullCredit":true},{"lineNumber":1705,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1706,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1707,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d HistoryCommand","isFullCredit":true},{"lineNumber":1708,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1709,"author":{"gitId":"Esilocke"},"content":"*Lists all commands done in reverser chronological order*","isFullCredit":true},{"lineNumber":1710,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1711,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1712,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1713,"author":{"gitId":"Esilocke"},"content":"notacommand +","isFullCredit":true},{"lineNumber":1714,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +","isFullCredit":true},{"lineNumber":1715,"author":{"gitId":"Esilocke"},"content":"history","isFullCredit":true},{"lineNumber":1716,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1717,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1718,"author":{"gitId":"Esilocke"},"content":"The two previous commands are listed in the box below the command line in reverse chronological order from top to bottom. +","isFullCredit":true},{"lineNumber":1719,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1720,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1721,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1722,"author":{"gitId":"Esilocke"},"content":"Entered commands (from most recent to earliest): +","isFullCredit":true},{"lineNumber":1723,"author":{"gitId":"Esilocke"},"content":"alsonotacommand +","isFullCredit":true},{"lineNumber":1724,"author":{"gitId":"Esilocke"},"content":"notacommand","isFullCredit":true},{"lineNumber":1725,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1726,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1727,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d UndoCommand","isFullCredit":true},{"lineNumber":1728,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1729,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1730,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1731,"author":{"gitId":"Esilocke"},"content":"delete 1 +","isFullCredit":true},{"lineNumber":1732,"author":{"gitId":"Esilocke"},"content":"undo","isFullCredit":true},{"lineNumber":1733,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1734,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1735,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo. +","isFullCredit":true},{"lineNumber":1736,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1737,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1738,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1739,"author":{"gitId":"Esilocke"},"content":"Undo success!","isFullCredit":true},{"lineNumber":1740,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1741,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1742,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1743,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1744,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1745,"author":{"gitId":"Esilocke"},"content":"add n/Reed Richards p/94444444 e/reed@futurefoundation.com a/Baxter Building r/Loves to stretch +","isFullCredit":true},{"lineNumber":1746,"author":{"gitId":"Esilocke"},"content":"undo","isFullCredit":true},{"lineNumber":1747,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1748,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1749,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo.","isFullCredit":true},{"lineNumber":1750,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1751,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1752,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1753,"author":{"gitId":"Esilocke"},"content":"Undo success!","isFullCredit":true},{"lineNumber":1754,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1755,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1756,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UnfavouriteCommand","isFullCredit":true},{"lineNumber":1757,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1758,"author":{"gitId":"-"},"content":"*Setting a favoured person in the Address++ to be the unfavoured person*","isFullCredit":true},{"lineNumber":1759,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1760,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1761,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1762,"author":{"gitId":"-"},"content":"list +","isFullCredit":true},{"lineNumber":1763,"author":{"gitId":"-"},"content":"unfavourite 1","isFullCredit":true},{"lineNumber":1764,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1765,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1766,"author":{"gitId":"-"},"content":"The 1st person in the Address++ will be unfavoured and the heart picture will disappear.","isFullCredit":true},{"lineNumber":1767,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1768,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1769,"author":{"gitId":"-"},"content":"Unfavourited Person: Alex Yeoh Phone: 87438807 Email: alexyeoh@example.com Address: Blk 30 Geylang Street 29, #06-40 Remark: Cheerful lad Avatar: Tags: [friends]","isFullCredit":true},{"lineNumber":1770,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1771,"author":{"gitId":"-"},"content":"*Failing to set a unfavored person if he has not been favoured*","isFullCredit":true},{"lineNumber":1772,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1773,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1774,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1775,"author":{"gitId":"-"},"content":"list +","isFullCredit":true},{"lineNumber":1776,"author":{"gitId":"-"},"content":"unfavourite 2","isFullCredit":true},{"lineNumber":1777,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1778,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1779,"author":{"gitId":"-"},"content":"An error message will display since the second person in the Address++ has bot been favoured.","isFullCredit":true},{"lineNumber":1780,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1781,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1782,"author":{"gitId":"-"},"content":"Person is not favourited yet.","isFullCredit":true},{"lineNumber":1783,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1784,"author":{"gitId":"-"},"content":"*Failing to set a unfavoured person with invalid index*","isFullCredit":true},{"lineNumber":1785,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1786,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1787,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1788,"author":{"gitId":"-"},"content":"unfavourite 56","isFullCredit":true},{"lineNumber":1789,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1790,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1791,"author":{"gitId":"-"},"content":"An error message will display since there is no 56th person in the current list.","isFullCredit":true},{"lineNumber":1792,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1793,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1794,"author":{"gitId":"-"},"content":"The person index provided is invalid","isFullCredit":true},{"lineNumber":1795,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1796,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d RedoCommand","isFullCredit":true},{"lineNumber":1797,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1798,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1799,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1800,"author":{"gitId":"Esilocke"},"content":"delete 1 +","isFullCredit":true},{"lineNumber":1801,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1802,"author":{"gitId":"Esilocke"},"content":"redo","isFullCredit":true},{"lineNumber":1803,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1804,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1805,"author":{"gitId":"Esilocke"},"content":"The first person gets deleted from the address book, but gets restored after an undo and deleted again after a redo. +","isFullCredit":true},{"lineNumber":1806,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1807,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1808,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1809,"author":{"gitId":"Esilocke"},"content":"Redo success!","isFullCredit":true},{"lineNumber":1810,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1811,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1812,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1813,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1814,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1815,"author":{"gitId":"Esilocke"},"content":"add n/Peter Parker p/92241783 e/ceo@parkerindustries.com a/New York City r/Top 10 smartest people in the world +","isFullCredit":true},{"lineNumber":1816,"author":{"gitId":"Esilocke"},"content":"undo +","isFullCredit":true},{"lineNumber":1817,"author":{"gitId":"Esilocke"},"content":"redo","isFullCredit":true},{"lineNumber":1818,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1819,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1820,"author":{"gitId":"Esilocke"},"content":"A new person is added, then removed with an undo and added again with a redo.","isFullCredit":true},{"lineNumber":1821,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1822,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1823,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1824,"author":{"gitId":"Esilocke"},"content":"Redo success!","isFullCredit":true},{"lineNumber":1825,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1826,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1827,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1828,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book to its original state before continuing with testing.","isFullCredit":true},{"lineNumber":1829,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1830,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ClearCommand","isFullCredit":true},{"lineNumber":1831,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1832,"author":{"gitId":"Esilocke"},"content":"*Clearing all entries*","isFullCredit":true},{"lineNumber":1833,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1834,"author":{"gitId":"-"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1835,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1836,"author":{"gitId":"Esilocke"},"content":"clear","isFullCredit":true},{"lineNumber":1837,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":1838,"author":{"gitId":"-"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1839,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +","isFullCredit":true},{"lineNumber":1840,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1841,"author":{"gitId":"-"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1842,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1843,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!","isFullCredit":true},{"lineNumber":1844,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1845,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1846,"author":{"gitId":"Esilocke"},"content":"*Clearing persons only*","isFullCredit":true},{"lineNumber":1847,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1848,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1849,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1850,"author":{"gitId":"Esilocke"},"content":"clear person/","isFullCredit":true},{"lineNumber":1851,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1852,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1853,"author":{"gitId":"Esilocke"},"content":"All persons vanish from the leftmost column, leaving them empty. +","isFullCredit":true},{"lineNumber":1854,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1855,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1856,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1857,"author":{"gitId":"Esilocke"},"content":"All contacts have been cleared!","isFullCredit":true},{"lineNumber":1858,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1859,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1860,"author":{"gitId":"Esilocke"},"content":"*Clearing tasks only*","isFullCredit":true},{"lineNumber":1861,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1862,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1863,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1864,"author":{"gitId":"Esilocke"},"content":"clear task/","isFullCredit":true},{"lineNumber":1865,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1866,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1867,"author":{"gitId":"Esilocke"},"content":"All tasks vanish from the middle columns, leaving them empty. +","isFullCredit":true},{"lineNumber":1868,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1869,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1870,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1871,"author":{"gitId":"Esilocke"},"content":"All tasks have been cleared!","isFullCredit":true},{"lineNumber":1872,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1873,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1874,"author":{"gitId":"Esilocke"},"content":"*Both person and task specified*","isFullCredit":true},{"lineNumber":1875,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1876,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1877,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1878,"author":{"gitId":"Esilocke"},"content":"clear task/ person/ task/ task/ person/","isFullCredit":true},{"lineNumber":1879,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1880,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1881,"author":{"gitId":"Esilocke"},"content":"All persons and tasks vanish from the leftmost and middle columns, leaving them empty. +","isFullCredit":true},{"lineNumber":1882,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1883,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1884,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1885,"author":{"gitId":"Esilocke"},"content":"Address book has been cleared!","isFullCredit":true},{"lineNumber":1886,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1887,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1888,"author":{"gitId":"Esilocke"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1889,"author":{"gitId":"Esilocke"},"content":"You may wish to use `undo` to restore the address book before continuing with testing.","isFullCredit":true},{"lineNumber":1890,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1891,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d OpenCommand and SaveAsCommand","isFullCredit":true},{"lineNumber":1892,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1893,"author":{"gitId":"Esilocke"},"content":"*Saves data as a new .xml file and switches to that file*","isFullCredit":true},{"lineNumber":1894,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1895,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1896,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1897,"author":{"gitId":"Esilocke"},"content":"save +","isFullCredit":true},{"lineNumber":1898,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1899,"author":{"gitId":"Esilocke"},"content":"Save the new save file as test.xml. +","isFullCredit":true},{"lineNumber":1900,"author":{"gitId":"Esilocke"},"content":"Click save.","isFullCredit":true},{"lineNumber":1901,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1902,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1903,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the file followed by test.xml. +","isFullCredit":true},{"lineNumber":1904,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1905,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1906,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1907,"author":{"gitId":"Esilocke"},"content":"Successfully saved file.","isFullCredit":true},{"lineNumber":1908,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1909,"author":{"gitId":"Esilocke"},"content":"*Opens and switches to a new .xml save file*","isFullCredit":true},{"lineNumber":1910,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1911,"author":{"gitId":"Esilocke"},"content":"Following the above save command:","isFullCredit":true},{"lineNumber":1912,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1913,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1914,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1915,"author":{"gitId":"Esilocke"},"content":"clear","isFullCredit":true},{"lineNumber":1916,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1917,"author":{"gitId":"Esilocke"},"content":"To differentiate the test.xml with the [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1918,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1919,"author":{"gitId":"Esilocke"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1920,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1921,"author":{"gitId":"Esilocke"},"content":"The address book contains no more persons or tasks.","isFullCredit":true},{"lineNumber":1922,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1923,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1924,"author":{"gitId":"Esilocke"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1925,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1926,"author":{"gitId":"Esilocke"},"content":"open +","isFullCredit":true},{"lineNumber":1927,"author":{"gitId":"Esilocke"},"content":"Navigate to the file path where you saved [W09-B2][Address++]SampleData.xml and select [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1928,"author":{"gitId":"Esilocke"},"content":"Click open.","isFullCredit":true},{"lineNumber":1929,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1930,"author":{"gitId":"Esilocke"},"content":"Expected Result: The file path in the bottom right corner changes to the location of where you saved the [W09-B2][Address++]SampleData.xml followed by the name [W09-B2][Address++]SampleData.xml. +","isFullCredit":true},{"lineNumber":1931,"author":{"gitId":"Esilocke"},"content":"The original data is restored in the address book. +","isFullCredit":true},{"lineNumber":1932,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1933,"author":{"gitId":"Esilocke"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1934,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1935,"author":{"gitId":"Esilocke"},"content":"Successfully opened file.","isFullCredit":true},{"lineNumber":1936,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1937,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1938,"author":{"gitId":"Esilocke"},"content":"\u003d\u003d\u003d ExitCommand","isFullCredit":true},{"lineNumber":1939,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1940,"author":{"gitId":"Esilocke"},"content":"*Exits Address++*","isFullCredit":true},{"lineNumber":1941,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1942,"author":{"gitId":"Esilocke"},"content":"Input Command:","isFullCredit":true},{"lineNumber":1943,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1944,"author":{"gitId":"Esilocke"},"content":"exit","isFullCredit":true},{"lineNumber":1945,"author":{"gitId":"Esilocke"},"content":"****","isFullCredit":true},{"lineNumber":1946,"author":{"gitId":"Esilocke"},"content":"Expected Result: Address++ closes.","isFullCredit":true},{"lineNumber":1947,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1948,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1949,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1950,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1951,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1952,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1953,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1954,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1955,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":1956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1957,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Sort Command","isFullCredit":true},{"lineNumber":1958,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":1959,"author":{"gitId":"charlesgoh"},"content":"*Sorts persons by name in ascending order*","isFullCredit":true},{"lineNumber":1960,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1961,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1962,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1963,"author":{"gitId":"charlesgoh"},"content":"sort person name asc","isFullCredit":true},{"lineNumber":1964,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1965,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1966,"author":{"gitId":"charlesgoh"},"content":"Person list panel will sort all persons by their names in ascending order +","isFullCredit":true},{"lineNumber":1967,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1968,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1969,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1970,"author":{"gitId":"charlesgoh"},"content":"All persons in address book successfully sorted","isFullCredit":true},{"lineNumber":1971,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1972,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1973,"author":{"gitId":"charlesgoh"},"content":"*Sorts tasks by priority in descending order*","isFullCredit":true},{"lineNumber":1974,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1975,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1976,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1977,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +","isFullCredit":true},{"lineNumber":1978,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1979,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1980,"author":{"gitId":"charlesgoh"},"content":"Task list panel will sort all tasks by their priorities in descending order +","isFullCredit":true},{"lineNumber":1981,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1982,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1983,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1984,"author":{"gitId":"charlesgoh"},"content":"All tasks in address book successfully sorted","isFullCredit":true},{"lineNumber":1985,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1986,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1987,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*","isFullCredit":true},{"lineNumber":1988,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1989,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":1990,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1991,"author":{"gitId":"charlesgoh"},"content":"sort task priority desc +","isFullCredit":true},{"lineNumber":1992,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1993,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":1994,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +","isFullCredit":true},{"lineNumber":1995,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":1996,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":1997,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":1998,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":1999,"author":{"gitId":"charlesgoh"},"content":"sort: Sorts all persons or all tasks by chosen field [NAME/PHONE/EMAIL/ADDRESS -- PRIORITY/DEADLINE] by [ASC/DESC] order. Case insensitive +","isFullCredit":true},{"lineNumber":2000,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [LIST] [FIELD] [ORDER] +","isFullCredit":true},{"lineNumber":2001,"author":{"gitId":"charlesgoh"},"content":"Example: sort person email desc +","isFullCredit":true},{"lineNumber":2002,"author":{"gitId":"charlesgoh"},"content":"Example 2: sort task deadline desc +","isFullCredit":true},{"lineNumber":2003,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2004,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2005,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Backup Command","isFullCredit":true},{"lineNumber":2006,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2007,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2008,"author":{"gitId":"charlesgoh"},"content":"Currently supports mac relative file paths. No guarantee of support for other operating system.","isFullCredit":true},{"lineNumber":2009,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2010,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Input Format*","isFullCredit":true},{"lineNumber":2011,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2012,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2013,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2014,"author":{"gitId":"charlesgoh"},"content":"backup +","isFullCredit":true},{"lineNumber":2015,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2016,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2017,"author":{"gitId":"charlesgoh"},"content":"Error message with usage message will appear in the result command box +","isFullCredit":true},{"lineNumber":2018,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2019,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2020,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2021,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":2022,"author":{"gitId":"charlesgoh"},"content":"backup: Backs up data to a user input location field [FILEPATH] +","isFullCredit":true},{"lineNumber":2023,"author":{"gitId":"charlesgoh"},"content":"Parameter: KEYWORD [FILEPATH] +","isFullCredit":true},{"lineNumber":2024,"author":{"gitId":"charlesgoh"},"content":"Example: backupMyBackUpFile +","isFullCredit":true},{"lineNumber":2025,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2026,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2027,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to same file path*","isFullCredit":true},{"lineNumber":2028,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2029,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2030,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2031,"author":{"gitId":"charlesgoh"},"content":"backup filename.xml","isFullCredit":true},{"lineNumber":2032,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2033,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2034,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the same directory as the jar file +","isFullCredit":true},{"lineNumber":2035,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2036,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2037,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2038,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully.","isFullCredit":true},{"lineNumber":2039,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2040,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2041,"author":{"gitId":"charlesgoh"},"content":"*Backs up data to relative file path*","isFullCredit":true},{"lineNumber":2042,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2043,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2044,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2045,"author":{"gitId":"charlesgoh"},"content":"backup ./../filename.xml +","isFullCredit":true},{"lineNumber":2046,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2047,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2048,"author":{"gitId":"charlesgoh"},"content":"filename.xml with a copy of the save data will appear in the directory preceding one level above the jar file +","isFullCredit":true},{"lineNumber":2049,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2050,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2051,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2052,"author":{"gitId":"charlesgoh"},"content":"AddressBook++ data backed up successfully.","isFullCredit":true},{"lineNumber":2053,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2054,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2055,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Change Password Command","isFullCredit":true},{"lineNumber":2056,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2057,"author":{"gitId":"charlesgoh"},"content":"*Invalid Command Format Input*","isFullCredit":true},{"lineNumber":2058,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2059,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2060,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2061,"author":{"gitId":"charlesgoh"},"content":"changepassword +","isFullCredit":true},{"lineNumber":2062,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2063,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2064,"author":{"gitId":"charlesgoh"},"content":"Invalid command format error message with usage message +","isFullCredit":true},{"lineNumber":2065,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2066,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2067,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2068,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":2069,"author":{"gitId":"charlesgoh"},"content":"changepassword: Changes user password. +","isFullCredit":true},{"lineNumber":2070,"author":{"gitId":"charlesgoh"},"content":"pw/PASSWORD np/NEWPASSWORD cfp/CONFIRMPASSWORD +","isFullCredit":true},{"lineNumber":2071,"author":{"gitId":"charlesgoh"},"content":"Example: changepassword pw/password np/mynewpassword111 cfp/mynewpassword111 +","isFullCredit":true},{"lineNumber":2072,"author":{"gitId":"charlesgoh"},"content":"Example 2: cpw pw/password np/mynewpassword111 cfp/mynewpassword111 +","isFullCredit":true},{"lineNumber":2073,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2074,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2075,"author":{"gitId":"charlesgoh"},"content":"*Change Password with valid inputs*","isFullCredit":true},{"lineNumber":2076,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2077,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2078,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2079,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +","isFullCredit":true},{"lineNumber":2080,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2081,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2082,"author":{"gitId":"charlesgoh"},"content":"Application password will change to `newpassword` +","isFullCredit":true},{"lineNumber":2083,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2084,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2085,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2086,"author":{"gitId":"charlesgoh"},"content":"Password changed successfully","isFullCredit":true},{"lineNumber":2087,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2088,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2089,"author":{"gitId":"charlesgoh"},"content":"*Incorrect Password entered*","isFullCredit":true},{"lineNumber":2090,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2091,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2092,"author":{"gitId":"charlesgoh"},"content":"Run this after running the previous command. Otherwise change the password to something incorrect. Default password","isFullCredit":true},{"lineNumber":2093,"author":{"gitId":"charlesgoh"},"content":"is `password`","isFullCredit":true},{"lineNumber":2094,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2095,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2096,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2097,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/password np/newpassword cfp/newpassword +","isFullCredit":true},{"lineNumber":2098,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2099,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2100,"author":{"gitId":"charlesgoh"},"content":"Application password will remain as `newpassword` and reject input +","isFullCredit":true},{"lineNumber":2101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2102,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2103,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2104,"author":{"gitId":"charlesgoh"},"content":"Your password is incorrect. Please try again.","isFullCredit":true},{"lineNumber":2105,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2107,"author":{"gitId":"charlesgoh"},"content":"*Old and new passwords are the same*","isFullCredit":true},{"lineNumber":2108,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2109,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2110,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2111,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/newpassword cfp/newpassword +","isFullCredit":true},{"lineNumber":2112,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2113,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2114,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +","isFullCredit":true},{"lineNumber":2115,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2116,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2117,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2118,"author":{"gitId":"charlesgoh"},"content":"New password must be different from your old password","isFullCredit":true},{"lineNumber":2119,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2121,"author":{"gitId":"charlesgoh"},"content":"*New password and confirmation passwords do not match*","isFullCredit":true},{"lineNumber":2122,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2123,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2124,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2125,"author":{"gitId":"charlesgoh"},"content":"changepassword pw/newpassword np/evennewerpassword cfp/wutwutWUUUUUT? +","isFullCredit":true},{"lineNumber":2126,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2127,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2128,"author":{"gitId":"charlesgoh"},"content":"Command exception. Error message will be displayed +","isFullCredit":true},{"lineNumber":2129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2130,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2131,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2132,"author":{"gitId":"charlesgoh"},"content":"Your new password and confirmation password do not match. Please try again","isFullCredit":true},{"lineNumber":2133,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2135,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Lock Command","isFullCredit":true},{"lineNumber":2136,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2137,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2138,"author":{"gitId":"charlesgoh"},"content":"The following tests assume that the password has been set to `newpassword` from the above tests. If you opened the application","isFullCredit":true},{"lineNumber":2139,"author":{"gitId":"charlesgoh"},"content":"for the first time, use the default password `password`.","isFullCredit":true},{"lineNumber":2140,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2141,"author":{"gitId":"charlesgoh"},"content":"*Lock Application failure with incorrect password*","isFullCredit":true},{"lineNumber":2142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2143,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2144,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2145,"author":{"gitId":"charlesgoh"},"content":"lock pw/wrongpasswordlol +","isFullCredit":true},{"lineNumber":2146,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2147,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2148,"author":{"gitId":"charlesgoh"},"content":"Application will fail to lock +","isFullCredit":true},{"lineNumber":2149,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2150,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2151,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2152,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again","isFullCredit":true},{"lineNumber":2153,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2154,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2155,"author":{"gitId":"charlesgoh"},"content":"*Lock Application with correct password*","isFullCredit":true},{"lineNumber":2156,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2157,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2158,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2159,"author":{"gitId":"charlesgoh"},"content":"lock pw/newpassword","isFullCredit":true},{"lineNumber":2160,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2161,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2162,"author":{"gitId":"charlesgoh"},"content":"Locks application. Try performing any CRUD statements after locking (i.e. add or edit. It will fail) +","isFullCredit":true},{"lineNumber":2163,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2164,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2165,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2166,"author":{"gitId":"charlesgoh"},"content":"Address++ locked successfully","isFullCredit":true},{"lineNumber":2167,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2168,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2169,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Unlock Command","isFullCredit":true},{"lineNumber":2170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2171,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2172,"author":{"gitId":"charlesgoh"},"content":"This section is a continuation of the previous section on the Lock Command","isFullCredit":true},{"lineNumber":2173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2174,"author":{"gitId":"charlesgoh"},"content":"*Fail to unlock application with incorrect password*","isFullCredit":true},{"lineNumber":2175,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2176,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2177,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2178,"author":{"gitId":"charlesgoh"},"content":"unlock pw/wrongpassword:P","isFullCredit":true},{"lineNumber":2179,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2180,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2181,"author":{"gitId":"charlesgoh"},"content":"Fails to unlock application. You will still not be able to execute CRUD commands +","isFullCredit":true},{"lineNumber":2182,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2183,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2184,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2185,"author":{"gitId":"charlesgoh"},"content":"Password is incorrect. Please try again","isFullCredit":true},{"lineNumber":2186,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2188,"author":{"gitId":"charlesgoh"},"content":"*Unlock application with correct password*","isFullCredit":true},{"lineNumber":2189,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2190,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2191,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2192,"author":{"gitId":"charlesgoh"},"content":"unlock pw/newpassword:P","isFullCredit":true},{"lineNumber":2193,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2194,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2195,"author":{"gitId":"charlesgoh"},"content":"Unlocks application. You can now execute CRUD commands +","isFullCredit":true},{"lineNumber":2196,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2197,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2198,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2199,"author":{"gitId":"charlesgoh"},"content":"Address++ unlocked successfully","isFullCredit":true},{"lineNumber":2200,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2201,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2202,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Font Size Command","isFullCredit":true},{"lineNumber":2203,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2204,"author":{"gitId":"charlesgoh"},"content":"*Increase font size*","isFullCredit":true},{"lineNumber":2205,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2206,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2207,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2208,"author":{"gitId":"charlesgoh"},"content":"fontsize increase","isFullCredit":true},{"lineNumber":2209,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2210,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2211,"author":{"gitId":"charlesgoh"},"content":"Increases font size by 1 level +","isFullCredit":true},{"lineNumber":2212,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2213,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2214,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2215,"author":{"gitId":"charlesgoh"},"content":"Font size increased successfully","isFullCredit":true},{"lineNumber":2216,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2217,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2218,"author":{"gitId":"charlesgoh"},"content":"*Decrease font size*","isFullCredit":true},{"lineNumber":2219,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2220,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2221,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2222,"author":{"gitId":"charlesgoh"},"content":"fs decrease","isFullCredit":true},{"lineNumber":2223,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2224,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2225,"author":{"gitId":"charlesgoh"},"content":"Decrease font size by 1 level +","isFullCredit":true},{"lineNumber":2226,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2227,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2228,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2229,"author":{"gitId":"charlesgoh"},"content":"Font size decreased successfully","isFullCredit":true},{"lineNumber":2230,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2231,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2232,"author":{"gitId":"charlesgoh"},"content":"*Reset font size*","isFullCredit":true},{"lineNumber":2233,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2234,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2235,"author":{"gitId":"charlesgoh"},"content":"You can try increasing the font size a few more times. There will be a max font size to prevent you from","isFullCredit":true},{"lineNumber":2236,"author":{"gitId":"charlesgoh"},"content":"increasing too much.","isFullCredit":true},{"lineNumber":2237,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2238,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2239,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2240,"author":{"gitId":"charlesgoh"},"content":"fontsize reset +","isFullCredit":true},{"lineNumber":2241,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2242,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2243,"author":{"gitId":"charlesgoh"},"content":"Resets font size in the application +","isFullCredit":true},{"lineNumber":2244,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2245,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2246,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2247,"author":{"gitId":"charlesgoh"},"content":"Font size reset successfully","isFullCredit":true},{"lineNumber":2248,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2249,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2250,"author":{"gitId":"charlesgoh"},"content":"*Incorrect input format*","isFullCredit":true},{"lineNumber":2251,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2252,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2253,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2254,"author":{"gitId":"charlesgoh"},"content":"fontsize +","isFullCredit":true},{"lineNumber":2255,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2256,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2257,"author":{"gitId":"charlesgoh"},"content":"Displays invalid command format error and the usage message +","isFullCredit":true},{"lineNumber":2258,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2259,"author":{"gitId":"charlesgoh"},"content":"Expected Message: +","isFullCredit":true},{"lineNumber":2260,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2261,"author":{"gitId":"charlesgoh"},"content":"Invalid command format! +","isFullCredit":true},{"lineNumber":2262,"author":{"gitId":"charlesgoh"},"content":"fontsize: Increases, decreases or resets font sizes +","isFullCredit":true},{"lineNumber":2263,"author":{"gitId":"charlesgoh"},"content":"Parameters: KEYWORD [OPTION] +","isFullCredit":true},{"lineNumber":2264,"author":{"gitId":"charlesgoh"},"content":"Example: fontsize increase +","isFullCredit":true},{"lineNumber":2265,"author":{"gitId":"charlesgoh"},"content":"Example 2: fs reset +","isFullCredit":true},{"lineNumber":2266,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2267,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2268,"author":{"gitId":"charlesgoh"},"content":"\u003d\u003d\u003d Setting Avatars","isFullCredit":true},{"lineNumber":2269,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2270,"author":{"gitId":"charlesgoh"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":2271,"author":{"gitId":"charlesgoh"},"content":"There is full support for URLs. No guarantee for local file paths. Local file paths must add a local prefix `file:`","isFullCredit":true},{"lineNumber":2272,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2273,"author":{"gitId":"charlesgoh"},"content":"*Add avatar URL*","isFullCredit":true},{"lineNumber":2274,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":2275,"author":{"gitId":"charlesgoh"},"content":"Input Command: +","isFullCredit":true},{"lineNumber":2276,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2277,"author":{"gitId":"charlesgoh"},"content":"edit 1 v/[URL] +","isFullCredit":true},{"lineNumber":2278,"author":{"gitId":"charlesgoh"},"content":"Replace [URL] with a valid image online.","isFullCredit":true},{"lineNumber":2279,"author":{"gitId":"charlesgoh"},"content":"****","isFullCredit":true},{"lineNumber":2280,"author":{"gitId":"charlesgoh"},"content":"Expected Result: +","isFullCredit":true},{"lineNumber":2281,"author":{"gitId":"charlesgoh"},"content":"Replaces placeholder avatar with the online image +","isFullCredit":true}],"authorContributionMap":{"charlesgoh":324,"jeffreygohkw":186,"Esilocke":1500,"-":271}},{"path":"src/test/java/guitests/AddressBookGuiTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.TestName;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * A GUI Test class for AddressBook.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public abstract class AddressBookGuiTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /* The TestName Rule makes the current test name available inside test methods */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public TestName name \u003d new TestName();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" protected GuiRobot guiRobot \u003d new GuiRobot();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" protected Stage stage;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" protected MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void setupOnce() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" e.printStackTrace();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void setup() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.stage \u003d stage;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" FxToolkit.setupApplication(() -\u003e new TestApp(this::getInitialData, getDataFileLocation()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Override this in child classes to set the initial local data.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * Return null to use the data in the file specified in {@link #getDataFileLocation()}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" return TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" protected CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" protected PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" protected MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" protected BrowserPanelHandle getBrowserPanel() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" protected StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" protected ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * Runs {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @return true if the command was executed successfully.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" protected boolean runCommand(String command) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Override this in child classes to set the data file location.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void cleanup() throws Exception {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":114}},{"path":"src/test/java/guitests/guihandles/TaskCardHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle to a task card in the task list panel.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" private static final String TASK_NAME_ID \u003d \"#taskName\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":" private static final String DESCRIPTION_ID \u003d \"#description\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" private static final String DEADLINE_ID \u003d \"#deadline\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" private static final String PRIORITY_ID \u003d \"#priority\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private final Label idLabel;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private final Label taskNameLabel;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" private final Label descriptionLabel;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" private final Label deadlineLabel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" private final Label priorityLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" this.taskNameLabel \u003d getChildNode(TASK_NAME_ID);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" this.descriptionLabel \u003d getChildNode(DESCRIPTION_ID);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" this.priorityLabel \u003d getChildNode(PRIORITY_ID);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" this.deadlineLabel \u003d getChildNode(DEADLINE_ID);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" public String getId() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" return idLabel.getText();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public String getTaskName() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return taskNameLabel.getText();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public String getDescription() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return descriptionLabel.getText();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" public String getDeadline() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" return deadlineLabel.getText();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" public String getPriority() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" return priorityLabel.getText();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":52}},{"path":"src/test/java/guitests/guihandles/TaskListPanelHandle.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.ui.TaskCard;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":" * Provides a handle for {@code TaskListPanel} containing the list of {@code TaskCard}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelHandle extends NodeHandle\u003cListView\u003cTaskCard\u003e\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" public static final String TASK_LIST_VIEW_ID \u003d \"#taskListView\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" private Optional\u003cTaskCard\u003e lastRememberedSelectedTaskCard;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public TaskListPanelHandle(ListView\u003cTaskCard\u003e taskListPanelNode) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" super(taskListPanelNode);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" * Returns a handle to the selected {@code TaskCardHandle}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" * A maximum of 1 item can be selected at any time.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" * @throws AssertionError if no card is selected, or more than 1 card is selected.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getHandleToSelectedCard() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e taskList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" if (taskList.size() !\u003d 1) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Task list size expected 1.\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" return new TaskCardHandle(taskList.get(0).getRoot());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" * Returns the index of the selected card.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public int getSelectedCardIndex() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getSelectionModel().getSelectedIndex();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" * Returns true if a card is currently selected.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" public boolean isAnyCardSelected() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedCardsList \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" if (selectedCardsList.size() \u003e 1) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" throw new AssertionError(\"Card list size expected 0 or 1.\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" return !selectedCardsList.isEmpty();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" * Navigates the listview to display and select the task.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" public void navigateToCard(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e cards \u003d getRootNode().getItems();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCard\u003e matchingCard \u003d cards.stream().filter(card -\u003e card.task.equals(task)).findFirst();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" if (!matchingCard.isPresent()) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Task does not exist.\");","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" getRootNode().scrollTo(matchingCard.get());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(matchingCard.get());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" });","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * Returns the task card handle of a task associated with the {@code index} in the list.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(int index) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" return getTaskCardHandle(getRootNode().getItems().get(index).task);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" * Returns the {@code TaskCardHandle} of the specified {@code task} in the list.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public TaskCardHandle getTaskCardHandle(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" Optional\u003cTaskCardHandle\u003e handle \u003d getRootNode().getItems().stream()","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" .filter(card -\u003e card.task.equals(task))","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" .map(card -\u003e new TaskCardHandle(card.getRoot()))","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .findFirst();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" return handle.orElseThrow(() -\u003e new IllegalArgumentException(\"Task does not exist.\"));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" * Selects the {@code TaskCard} at {@code index} in the list.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void select(int index) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" getRootNode().getSelectionModel().select(index);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Remembers the selected {@code TaskCard} in the list.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public void rememberSelectedTaskCard() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.empty();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" lastRememberedSelectedTaskCard \u003d Optional.of(selectedItems.get(0));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Returns true if the selected {@code TaskCard} is different from the value remembered by the most recent","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * {@code rememberSelectedTaskCard()} call.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public boolean isSelectedTaskCardChanged() {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" List\u003cTaskCard\u003e selectedItems \u003d getRootNode().getSelectionModel().getSelectedItems();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" if (selectedItems.size() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" return lastRememberedSelectedTaskCard.isPresent();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" } else {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return !lastRememberedSelectedTaskCard.isPresent()","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" || !lastRememberedSelectedTaskCard.get().equals(selectedItems.get(0));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" * Returns the size of the list.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" public int getListSize() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" return getRootNode().getItems().size();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":135}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":" String defaultConfigAsString \u003d \"App title : Address++\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/AppUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class AppUtilTest {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void getImage_exitingImage() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" assertNotNull(AppUtil.getImage(\"/images/address_book_32_alternative.png\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void getImage_nullGiven_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" AppUtil.getImage(null);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void checkArgument_true_nothingHappens() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(true, \"\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithoutErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void checkArgument_falseWithErrorMessage_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" String errorMessage \u003d \"error message\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" thrown.expectMessage(errorMessage);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" AppUtil.checkArgument(false, errorMessage);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":1,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandIntegrationTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code AddPersonCommand}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandIntegrationTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void execute_newPerson_success() throws Exception {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedModel.addPerson(validPerson);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandSuccess(prepareCommand(validPerson, model), model,","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), expectedModel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person personInList \u003d new Person(model.getAddressBook().getPersonList().get(0));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(prepareCommand(personInList, model), model, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code AddPersonCommand} which upon execution, adds {@code person} into the {@code model}.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand prepareCommand(Person person, Model model) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":9,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/AddPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandTest {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddPersonCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommand \u003d new AddPersonCommand(alice);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addBobCommand \u003d new AddPersonCommand(bob);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand addAliceCommandCopy \u003d new AddPersonCommand(alice);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // different person/task -\u003e returns false","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddPersonCommand with the details of the given person.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" private AddPersonCommand getAddCommandForPerson(Person person, Model model) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" AddPersonCommand command \u003d new AddPersonCommand(person);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person or task.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the person or task being added.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" personsAdded.add(new Person(person));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":18,"wangyiming1019":2,"-":100}},{"path":"src/test/java/seedu/address/logic/commands/AddTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code AddTagCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void execute_validIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"stranger\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(AddTagCommand.MESSAGE_ADD_TAG_SUCCESS, tagToAdd);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(addTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d prepareCommand(tagToAdd, indexes);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(addTagCommand, model, AddTagCommand.MESSAGE_DUPLICATE_TAG);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" final AddTagCommand standardCommand \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand commandWithSameValues \u003d new AddTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new AddTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code AddTagCommand} with parameters {@code targetIndexes} and {@code tagToAdd}","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommand prepareCommand(Tag tagToAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand addTagCommand \u003d new AddTagCommand(tagToAdd, targetIndexes);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" addTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" return addTagCommand;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":152}},{"path":"src/test/java/seedu/address/logic/commands/AddTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.ModelStub;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void execute_taskAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" AddTaskCommandTest.ModelStubAcceptingTaskAdded modelStub \u003d new AddTaskCommandTest.ModelStubAcceptingTaskAdded();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d prepareCommand(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertEquals(String.format(AddTaskCommand.MESSAGE_SUCCESS, validTask), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertEquals(Arrays.asList(validTask), modelStub.tasksAdded);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" public void execute_duplicateTask_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelStub modelStub \u003d new AddTaskCommandTest.ModelStubAlwaysThrowingDuplicateException();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" Task validTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" thrown.expectMessage(AddTaskCommand.MESSAGE_DUPLICATE_TASK);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" prepareCommand(validTask, modelStub).execute();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Task paper \u003d new TaskBuilder().withTaskName(\"Paper\").build();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Task pencil \u003d new TaskBuilder().withTaskName(\"Pencil\").build();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommand \u003d new AddTaskCommand(paper);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPencilCommand \u003d new AddTaskCommand(pencil);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand addPaperCommandCopy \u003d new AddTaskCommand(paper);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(addPaperCommand.equals(addPaperCommandCopy));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(\"\"));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(null));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" assertFalse(addPaperCommand.equals(addPencilCommand));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" * Generates a new AddTaskCommand with the details of the given task.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" private AddTaskCommand prepareCommand(Task task, Model model) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" AddTaskCommand command \u003d new AddTaskCommand(task);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always throw a DuplicateTaskException when trying to add a task.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAlwaysThrowingDuplicateException extends ModelStub {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" throw new DuplicateTaskException();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * A Model stub that always accept the task being added.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" private class ModelStubAcceptingTaskAdded extends ModelStub {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" private final ArrayList\u003cTask\u003e tasksAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask task) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" tasksAdded.add(new Task(task));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":119}},{"path":"src/test/java/seedu/address/logic/commands/AssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void execute_assignOnePerson_success() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_assignManyPersons_success() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, toAssign.size(),","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assignedTask);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void execute_assignDuplicates_success() throws Exception {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson assignedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" persons.add(assignedPerson);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(AssignCommand.MESSAGE_SUCCESS, 1, assignedTask);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(assignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, outOfRangeIndex);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public void execute_allPersonsAlreadyAssigned_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toAssign \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask assignedTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignCommand \u003d prepareCommand(toAssign, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" expectedModel.assignToTask(persons, assignedTask);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assignCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(assignCommand, expectedModel, AssignCommand.MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e assignFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirst \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignThreeToFirst \u003d new AssignCommand(assignFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToSecond \u003d new AssignCommand(assignFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirst));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AssignCommand assignTwoToFirstCopy \u003d new AssignCommand(assignFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertTrue(assignTwoToFirst.equals(assignTwoToFirstCopy));","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignThreeToFirst));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertFalse(assignTwoToFirst.equals(assignTwoToSecond));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" * Generates a new AssignCommand with the specified targets.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" private AssignCommand prepareCommand(List\u003cIndex\u003e personsToAssign, Index taskIndex) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToAssign);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d new AssignCommand(listIndexes, taskIndex);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":156}},{"path":"src/test/java/seedu/address/logic/commands/ChangePasswordCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.ChangePasswordCommandParser;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class ChangePasswordCommandTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_PASSWORD \u003d \"password\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" private static final String DEFAULT_SECOND_PASSWORD \u003d \"password2\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" private UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" private ChangePasswordCommandParser parser;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" userPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" parser \u003d new ChangePasswordCommandParser();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void parseWrongArgumentsFailure() {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" // No arguments failure","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS, String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Wrong number of arguments","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"one two?\", String","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // No prefixes","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, ChangePasswordCommand","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \"password password2 password3\", String","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" .format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePasswordCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void testUserPrefsPasswords() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" // Check original password","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" String expectedPassword \u003d getHashed256(DEFAULT_PASSWORD);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // Lock address book and check if state has changed","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" userPrefs.setAddressBookEncryptedPassword(DEFAULT_SECOND_PASSWORD);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" expectedPassword \u003d getHashed256(DEFAULT_SECOND_PASSWORD);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" assertTrue(userPrefs.getAddressBookEncryptedPassword().equals(expectedPassword));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" * Helps to convert string to SHA256 counterpart","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" private String getHashed256(String password) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" return Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":74}},{"path":"src/test/java/seedu/address/logic/commands/ChangePrivacyCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void personPrivacySettingsTests() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsByBuilder \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"true\").setAddressPrivate(\"true\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" .setRemarkPrivate(\"false\").build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getAddressIsPrivate(), pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getEmailIsPrivate(), pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getNameIsPrivate(), pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.getRemarkIsPrivate(), pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsByBuilder.isAnyFieldNonNull(), pps.isAnyFieldNonNull());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsCopy \u003d new PersonPrivacySettings(pps);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getAddressIsPrivate(), pps.getAddressIsPrivate());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getEmailIsPrivate(), pps.getEmailIsPrivate());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getNameIsPrivate(), pps.getNameIsPrivate());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getPhoneIsPrivate(), pps.getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ppsCopy.getRemarkIsPrivate(), pps.getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" Person newPerson \u003d new PersonBuilder().withEmail(\"alice@example.com\").build();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.setRemark(model.getFilteredPersonList().get(0).getRemark());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").setEmailPrivate(\"true\").setAddressPrivate(\"true\").setRemarkPrivate(\"true\")","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.model \u003d model;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(newPerson).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").setEmailPrivate(\"false\").setAddressPrivate(\"false\").setRemarkPrivate(\"false\")","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" newPerson.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, ppsPublic);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, newPerson);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), newPerson);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" Person personInList \u003d new PersonBuilder().withName(lastPerson.getName().toString())","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" .withPhone(lastPerson.getPhone().toString()).withEmail(lastPerson.getEmail().toString())","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .withAddress(lastPerson.getAddress().toString()).withRemark(lastPerson.getRemark().toString())","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" .withFavourite(lastPerson.getFavourite().toString())","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" .build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" personInList.setTags(lastPerson.getTags());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommand \u003d new ChangePrivacyCommand(indexLastPerson, pps);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings ppsPublic \u003d new PersonPrivacySettingsBuilder(personInList).setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" .setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand changePrivacyCommandPublic \u003d new ChangePrivacyCommand(indexLastPerson, ppsPublic);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" changePrivacyCommandPublic.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessagePublic \u003d String.format(ChangePrivacyCommand.MESSAGE_CHANGE_PRIVACY_SUCCESS, personInList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(lastPerson, personInList);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(changePrivacyCommandPublic, model, expectedMessagePublic, expectedModel);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":149}},{"path":"src/test/java/seedu/address/logic/commands/ClearCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class ClearCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Generates a new {@code ClearCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private ClearCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" ClearCommand command \u003d new ClearCommand();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":32}},{"path":"src/test/java/seedu/address/logic/commands/ClearPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class ClearPersonCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearPersonCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearPersonCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private ClearPersonCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" ClearPersonCommand command \u003d new ClearPersonCommand();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/commands/ClearTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class ClearTaskCommandTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void execute_emptyAddressBook_success() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, model);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void execute_nonEmptyAddressBook_success() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // Verify that only the tasks are cleared","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(prepareCommand(model), model, ClearTaskCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" * Generates a new {@code ClearTaskCommand} which upon execution, clears the contents in {@code model}.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private ClearTaskCommand prepareCommand(Model model) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ClearTaskCommand command \u003d new ClearTaskCommand();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":39}},{"path":"src/test/java/seedu/address/logic/commands/CommandTestUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains helper methods for testing commands.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class CommandTestUtil {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_AMY \u003d \"Amy Bee\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public static final String VALID_NAME_BOB \u003d \"Bob Choo\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_NAME_CHRIS \u003d \"Chris Chan\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_AMY \u003d \"11111111\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public static final String VALID_PHONE_BOB \u003d \"22222222\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_PHONE_CHRIS \u003d \"33333333\";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_AMY \u003d \"amy@example.com\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static final String VALID_EMAIL_BOB \u003d \"bob@example.com\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_EMAIL_CHRIS \u003d \"chris@example.com\";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_AMY \u003d \"Block 312, Amy Street 1\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final String VALID_ADDRESS_BOB \u003d \"Block 123, Bobby Street 3\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_ADDRESS_CHRIS \u003d \"Block 132, Chris Street 5\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_AMY \u003d \"She sells sea shells on the sea shore\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_REMARK_BOB \u003d \"He eats, shoots and leaves\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_REMARK_CHRIS \u003d \"He likes swimming\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_AMY \u003d \"amyavatar\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_BOB \u003d \"bobavatar\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public static final String VALID_AVATAR_CHRIS \u003d \"chirsavatar\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_HUSBAND \u003d \"husband\";","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public static final String VALID_TAG_FRIEND \u003d \"friend\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_ALICE \u003d \"false\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_FAVOURITE_BOB \u003d \"true\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TAG_COLLEAGUE \u003d \"colleague\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" public static final String VALID_TAG_CHRISTAG \u003d \"special\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PENCIL \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_TASK_NAME_PAPER \u003d \"Buy paper\";","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PENCIL \u003d \"Buy mechanical pencil from ABS\";","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DESCRIPTION_PAPER \u003d \"Buy 500 pieces of paper\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PENCIL \u003d \"04-04-2017 12pm\";","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_DEADLINE_PAPER \u003d \"05-04-2017 12pm\";","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PENCIL \u003d \"1\";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static final String VALID_PRIORITY_PAPER \u003d \"3\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PENCIL \u003d \"12 Kent Ridge Cres\";","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" public static final String VALID_TASK_ADDRESS_PAPER \u003d \"Bedok Mall\";","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_AMY \u003d \" \" + PREFIX_NAME + VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String NAME_DESC_BOB \u003d \" \" + PREFIX_NAME + VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final String NAME_DESC_CHRIS \u003d \" \" + PREFIX_NAME + VALID_NAME_CHRIS;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_AMY \u003d \" \" + PREFIX_PHONE + VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static final String PHONE_DESC_BOB \u003d \" \" + PREFIX_PHONE + VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public static final String PHONE_DESC_CHRIS \u003d \" \" + PREFIX_PHONE + VALID_PHONE_CHRIS;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_AMY \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public static final String EMAIL_DESC_BOB \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" public static final String EMAIL_DESC_CHRIS \u003d \" \" + PREFIX_EMAIL + VALID_EMAIL_CHRIS;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_AMY \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String ADDRESS_DESC_BOB \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" public static final String ADDRESS_DESC_CHRIS \u003d \" \" + PREFIX_ADDRESS + VALID_ADDRESS_CHRIS;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_AMY \u003d \" \" + PREFIX_REMARK + VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" public static final String REMARK_DESC_BOB \u003d \" \" + PREFIX_REMARK + VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" public static final String REMARK_DESC_CHRIS \u003d \" \" + PREFIX_REMARK + VALID_REMARK_CHRIS;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_AMY \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_AMY;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_BOB \u003d \" \" + PREFIX_AVATAR + VALID_AVATAR_BOB;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public static final String AVATAR_DESC_CHRIS \u003d \" \" + PREFIX_AVATAR + VALID_REMARK_CHRIS;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_FRIEND \u003d \" \" + PREFIX_TAG + VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public static final String TAG_DESC_HUSBAND \u003d \" \" + PREFIX_TAG + VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PENCIL \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_NAME_DESC_PAPER \u003d \" \" + PREFIX_NAME + VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PENCIL \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" public static final String DESCRIPTION_DESC_PAPER \u003d \" \" + PREFIX_DESCRIPTION + VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PENCIL \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" public static final String DEADLINE_DESC_PAPER \u003d \" \" + PREFIX_DEADLINE + VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PENCIL \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" public static final String PRIORITY_DESC_PAPER \u003d \" \" + PREFIX_PRIORITY + VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PENCIL \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public static final String TASK_ADDRESS_DESC_PAPER \u003d \" \" + PREFIX_ADDRESS + VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_TASK_NAME_DESC \u003d \" \" + PREFIX_NAME + \" \"; // task name cannot be blank","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" public static final String INVALID_NAME_DESC \u003d \" \" + PREFIX_NAME + \"James\u0026\"; // \u0027\u0026\u0027 not allowed in names","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public static final String INVALID_PHONE_DESC \u003d \" \" + PREFIX_PHONE + \"911a\"; // \u0027a\u0027 not allowed in phones","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" public static final String INVALID_EMAIL_DESC \u003d \" \" + PREFIX_EMAIL + \"bob!yahoo\"; // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static final String INVALID_TAG_DESC \u003d \" \" + PREFIX_TAG + \"hubby*\"; // \u0027*\u0027 not allowed in tags","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_DEADLINE_DESC \u003d \" \" + PREFIX_DEADLINE + \"TIMELESS AGES\"; // not a date","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_PRIORITY_DESC \u003d \" \" + PREFIX_PRIORITY + \"6\"; // priority is out of bounds","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static final String INVALID_ADDRESS_DESC \u003d \" \" + PREFIX_ADDRESS + \" \"; // priority is out of bounds","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public static final String TASK_SEPARATOR \u003d \" \" + PREFIX_TASK + \" \";","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_AMY;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public static final EditPersonCommand.EditPersonDescriptor DESC_BOB;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PENCIL;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" public static final EditTaskCommand.EditTaskDescriptor DESC_PAPER;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" static {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" //TODO: Change avatar filename to a real filename","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" DESC_AMY \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_AMY).withAvatar(VALID_AVATAR_AMY).withFavourite(VALID_FAVOURITE_ALICE)","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" DESC_BOB \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" .withRemark(VALID_REMARK_BOB).withAvatar(VALID_AVATAR_BOB).withFavourite(VALID_FAVOURITE_ALICE)","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" DESC_PENCIL \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL).build();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" DESC_PAPER \u003d new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * - the result message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * - the {@code actualModel} matches {@code expectedModel}","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" public static void assertCommandSuccess(Command command, Model actualModel, String expectedMessage,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, result.feedbackToUser);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, actualModel);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes the given {@code command}, confirms that \u003cbr\u003e","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * - a {@code CommandException} is thrown \u003cbr\u003e","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * - the CommandException message matches {@code expectedMessage} \u003cbr\u003e","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * - the address book and the filtered person list in the {@code actualModel} remain unchanged","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // we are unable to defensively copy the model for comparison later, so we can","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" // only do so by copying its components.","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" List\u003cReadOnlyPerson\u003e expectedFilteredList \u003d new ArrayList\u003c\u003e(actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" command.execute();","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (CommandException e) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, e.getMessage());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, actualModel.getAddressBook());","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" assertEquals(expectedFilteredList, actualModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show only the first person in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" public static void showFirstPersonOnly(Model model) {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" ReadOnlyPerson person \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" final String[] splitName \u003d person.getName().value.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Deletes the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" public static void deleteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" model.deletePerson(firstPerson);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public static void showFirstTaskOnly(Model model) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(0);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show only the first task in the {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" public static void showSecondTaskOnly(Model model) {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask task \u003d model.getAddressBook().getTasksList().get(1);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" final String[] splitName \u003d task.getTaskName().taskName.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(new TaskContainsKeywordPredicate(Arrays.asList(splitName[0])));","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().size() \u003d\u003d 1;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * Deletes the first task in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" public static void deleteFirstTask(Model model) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask firstTask \u003d model.getFilteredTaskList().get(0);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" model.deleteTask(firstTask);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":" } catch (TaskNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Task in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"wangyiming1019"},"content":" * Favourites the first person in {@code model}\u0027s filtered list from {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"wangyiming1019"},"content":" public static void favouriteFirstPerson(Model model) {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson firstPerson \u003d model.getAddressBook().getPersonList().get(0);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"wangyiming1019"},"content":" model.favouritePerson(firstPerson);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"wangyiming1019"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"wangyiming1019"},"content":" throw new AssertionError(\"Person in filtered list must exist in model.\", pnfe);","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":15,"jeffreygohkw":5,"Esilocke":81,"wangyiming1019":25,"-":124}},{"path":"src/test/java/seedu/address/logic/commands/DeletePersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code DeletePersonCommand}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeletePersonCommand.MESSAGE_SUCCESS, personToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" expectedModel.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" showNoPerson(expectedModel);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deletePersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deletePersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommand \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteSecondCommand \u003d new DeletePersonCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deleteFirstCommandCopy \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeletePersonCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" private DeletePersonCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand deletePersonCommand \u003d new DeletePersonCommand(index);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" deletePersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" return deletePersonCommand;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Updates {@code model}\u0027s filtered list to show no one.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void showNoPerson(Model model) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(p -\u003e false);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assert model.getFilteredPersonList().isEmpty();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":22,"-":96}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) and unit tests for {@code RemoveTagCommand}.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagUnfilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexAndTagFilteredListSuccess() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(DeleteTagCommand.MESSAGE_DELETE_TAG_SUCCESS, tagToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(expectedModel);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(tagToDelete, indexes);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(deleteTagCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(outOfBoundIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagUnfilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidTagFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"someone\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidTagNotInUnFilteredListThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(\"teacher\");","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d prepareCommand(indexes, tagToDelete);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(deleteTagCommand, model, DeleteTagCommand.MESSAGE_NONEXISTENT_TAG);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"wangyiming1019"},"content":" public void equals() throws Exception {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes1 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes2 \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" indexes1.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" indexes2.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" Tag firstTag \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" Tag secondTag \u003d new Tag(\"classmates\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" final DeleteTagCommand standardCommand \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand commandWithSameValues \u003d new DeleteTagCommand(firstTag, indexes1);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" // different target indexes -\u003e returns false","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(firstTag, indexes2)));","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"wangyiming1019"},"content":" // different target tag -\u003e returns false","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(standardCommand.equals(new DeleteTagCommand(secondTag, indexes1)));","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"wangyiming1019"},"content":" * Returns an {@code RemoveTagCommand} with parameters {@code targetIndexes} and {@code tagToDelete}","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommand prepareCommand(ArrayList\u003cIndex\u003e targetIndexes, Tag tagToDelete) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand deleteTagCommand \u003d new DeleteTagCommand(tagToDelete, targetIndexes);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"wangyiming1019"},"content":" deleteTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"wangyiming1019"},"content":" return deleteTagCommand;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":165}},{"path":"src/test/java/seedu/address/logic/commands/DeleteTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToDelete \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DeleteTaskCommand.MESSAGE_SUCCESS, taskToDelete);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" expectedModel.deleteTask(taskToDelete);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" showNoTask(expectedModel);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(deleteTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(deleteTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommand \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteSecondCommand \u003d new DeleteTaskCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommand));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteFirstCommandCopy \u003d new DeleteTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" assertTrue(deleteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertFalse(deleteFirstCommand.equals(deleteSecondCommand));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code DeleteTaskCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private DeleteTaskCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" DeleteTaskCommand deleteTaskCommand \u003d new DeleteTaskCommand(index);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" deleteTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" return deleteTaskCommand;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" * Updates {@code model}\u0027s filtered list to show no tasks.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" private void showNoTask(Model model) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" model.updateFilteredTaskList(p -\u003e false);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assert model.getFilteredTaskList().isEmpty();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":115}},{"path":"src/test/java/seedu/address/logic/commands/DismissCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissOnePerson_success() throws Exception {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissManyPersons_success() throws Exception {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson firstPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson secondPerson \u003d model.getFilteredPersonList().get(1);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson thirdPerson \u003d model.getFilteredPersonList().get(2);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" persons.add(firstPerson);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" persons.add(secondPerson);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" persons.add(thirdPerson);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, toDismiss.size(),","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" dismissedTask);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void execute_dismissDuplicates_success() throws Exception {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_FIRST_PERSON, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask dismissedTask \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(DismissCommand.MESSAGE_SUCCESS, 1, dismissedTask);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" expectedModel.dismissFromTask(persons, dismissedTask);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(dismissCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidPersonIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, outOfRangeIndex, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, outOfRangeIndex);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void execute_noneDismissed_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" List\u003cIndex\u003e toDismiss \u003d Arrays.asList(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson dismissedPerson \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" persons.add(dismissedPerson);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissCommand \u003d prepareCommand(toDismiss, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(dismissCommand, model, DismissCommand.MESSAGE_NONE_ASSIGNED);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstThree \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e dismissFirstTwo \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirst \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissThreeToFirst \u003d new DismissCommand(dismissFirstThree, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToSecond \u003d new DismissCommand(dismissFirstTwo, INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirst));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" DismissCommand dismissTwoToFirstCopy \u003d new DismissCommand(dismissFirstTwo, INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" assertTrue(dismissTwoToFirst.equals(dismissTwoToFirstCopy));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(1));","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(null));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" // different person/task indexes -\u003e returns false","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissThreeToFirst));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" assertFalse(dismissTwoToFirst.equals(dismissTwoToSecond));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" * Generates a new DismissCommand with the specified targets.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" private DismissCommand prepareCommand(List\u003cIndex\u003e personsToDismiss, Index taskIndex) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e listIndexes \u003d new ArrayList\u003c\u003e(personsToDismiss);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d new DismissCommand(listIndexes, taskIndex);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":151}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditPersonCommand.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandTest {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(editedPerson).build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, descriptor);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" ReadOnlyPerson lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Person editedPerson \u003d personInList.withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(indexLastPerson, descriptor);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, editedPerson);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder(personInFilteredList).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), editedPerson);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editPersonCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_privateFields_success() throws Exception {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" Name originalName \u003d personInFilteredList.getName();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" Phone originalPhone \u003d personInFilteredList.getPhone();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" Email originalEmail \u003d personInFilteredList.getEmail();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" Address originalAddress \u003d personInFilteredList.getAddress();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" Remark originalRemark \u003d personInFilteredList.getRemark();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" expectedModel.updatePerson(model.getFilteredPersonList().get(0), personInFilteredList);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getName(), originalName);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getPhone(), originalPhone);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getEmail(), originalEmail);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getAddress(), originalAddress);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(personInFilteredList.getRemark(), originalRemark);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getName().setPrivate(false);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getPhone().setPrivate(false);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getEmail().setPrivate(false);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getAddress().setPrivate(false);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" personInFilteredList.getRemark().setPrivate(false);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_noFieldSpecifiedUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON, new EditPersonDescriptor());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" String expectedMessage \u003d String.format(EditPersonCommand.MESSAGE_ALL_FIELDS_PRIVATE);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(editPersonCommand, model, expectedMessage);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" Person firstPerson \u003d new Person(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(firstPerson).build();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_SECOND_PERSON, descriptor);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" public void execute_duplicatePersonFilteredList_failure() {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" // edit person in filtered list into a duplicate in address book","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" ReadOnlyPerson personInList \u003d model.getAddressBook().getPersonList().get(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(INDEX_FIRST_PERSON,","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder(personInList).build());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Edit filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d prepareCommand(outOfBoundIndex,","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" new EditPersonDescriptorBuilder().withName(VALID_NAME_BOB).build());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editPersonCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" final EditPersonCommand standardCommand \u003d new EditPersonCommand(INDEX_FIRST_PERSON, DESC_AMY);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" EditPersonDescriptor copyDescriptor \u003d new EditPersonDescriptor(DESC_AMY);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand commandWithSameValues \u003d new EditPersonCommand(INDEX_FIRST_PERSON, copyDescriptor);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_SECOND_PERSON, DESC_AMY)));","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" // different descriptor -\u003e returns false","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditPersonCommand(INDEX_FIRST_PERSON, DESC_BOB)));","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditPersonCommand} with parameters {@code index} and {@code descriptor}","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" private EditPersonCommand prepareCommand(Index index, EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand editPersonCommand \u003d new EditPersonCommand(index, descriptor);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" editPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" return editPersonCommand;","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":61,"Esilocke":31,"-":140}},{"path":"src/test/java/seedu/address/logic/commands/EditPersonDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_BOB;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptorWithSameValues \u003d new EditPersonDescriptor(DESC_AMY);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(descriptorWithSameValues));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertTrue(DESC_AMY.equals(DESC_AMY));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(null));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(5));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different values -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(DESC_BOB));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different name -\u003e returns false","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" EditPersonDescriptor editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // different phone -\u003e returns false","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withPhone(VALID_PHONE_BOB).build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" // different email -\u003e returns false","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withEmail(VALID_EMAIL_BOB).build();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // different address -\u003e returns false","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAddress(VALID_ADDRESS_BOB).build();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // different tags -\u003e returns false","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // different remarks -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // different avatar -\u003e returns false","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withAvatar(VALID_AVATAR_BOB).build();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // different favourite status -\u003e returns false","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" editedAmy \u003d new EditPersonDescriptorBuilder(DESC_AMY).withFavourite(VALID_FAVOURITE_BOB).build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_AMY.equals(editedAmy));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":16,"-":57}},{"path":"src/test/java/seedu/address/logic/commands/EditTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_COLLEAGUE;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_EDIT_TAG_SUCCESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_TAG_NOT_FOUND;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void noTagsPresent_throwsCommandException() throws IllegalValueException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" Model taglessModel \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" Model blankModel \u003d new ModelManager(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" String absentTag \u003d \"notInAddressBook\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noPersonCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, blankModel);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" EditTagCommand noTagsCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, taglessModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTagCommand absentTagCommand \u003d prepareCommand(VALID_TAG_FRIEND, absentTag, model);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // No people are in this address book","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noPersonCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" // All persons do not have tags","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(noTagsCommand, taglessModel, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // No persons in address book has the required tag","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(absentTagCommand, model, MESSAGE_TAG_NOT_FOUND);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public void editTagSubset_success() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeColleagueToHusband \u003d prepareCommand(VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_COLLEAGUE, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Tag colleagueTag \u003d new Tag(VALID_TAG_COLLEAGUE);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Attempt to change some Person objects","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(0));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(2));","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(colleagueTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeColleagueToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public void editTagAll_success() throws IllegalValueException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d prepareAddressBook();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" Model testModel \u003d new ModelManager(testBook, new UserPrefs());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" EditTagCommand tagChangeFriendToHusband \u003d prepareCommand(VALID_TAG_FRIEND, VALID_TAG_HUSBAND, testModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_EDIT_TAG_SUCCESS, VALID_TAG_FRIEND, VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // Attempt to change all Person objects","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(testModel.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indices \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" for (int i \u003d 0; i \u003c 4; i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" indices.add(Index.fromZeroBased(i));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" expectedModel.editTag(friendTag, husbandTag, indices);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(tagChangeFriendToHusband, testModel, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" /** Returns a new EditTagCommand with the parameters */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" public EditTagCommand prepareCommand(String toChange, String newValue, Model model) throws IllegalValueException {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" Tag changedTag \u003d new Tag(toChange);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" Tag newTag \u003d new Tag(newValue);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" EditTagCommand editTagCommand \u003d new EditTagCommand(changedTag, newTag);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" editTagCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" return editTagCommand;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" /** Returns a pre-made Address Book for testing purposes */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" private AddressBook prepareAddressBook() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson alice \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson bernice \u003d new PersonBuilder().withName(\"Bernice Applecut\")","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson clarice \u003d new PersonBuilder().withName(\"Clarice Fenderbunt\")","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND, VALID_TAG_COLLEAGUE).build();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" ReadOnlyPerson denise \u003d new PersonBuilder().withName(\"Denise Lieselocke\")","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cReadOnlyPerson\u003e toAdd \u003d new ArrayList\u003c\u003e(Arrays.asList(alice, bernice, clarice, denise));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook preparedBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson r : toAdd) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" preparedBook.addPerson(r);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return preparedBook;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":112}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) and unit tests for EditTaskCommand.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_allFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder(editedTask).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(Index.fromZeroBased(3), descriptor);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(3), editedTask);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public void execute_someFieldsSpecifiedUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" Index indexLastTask \u003d Index.fromOneBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask lastTask \u003d model.getFilteredTaskList().get(indexLastTask.getZeroBased());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" TaskBuilder taskInList \u003d new TaskBuilder(lastTask);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d taskInList.withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(indexLastTask, descriptor);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(lastTask, editedTask);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskInFilteredList \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Task editedTask \u003d new TaskBuilder(taskInFilteredList).withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(INDEX_FIRST_TASK,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(EditTaskCommand.MESSAGE_SUCCESS, editedTask);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" expectedModel.updateTask(model.getFilteredTaskList().get(0), editedTask);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(editTaskCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex, descriptor);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" * Edit filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d prepareCommand(outOfBoundIndex,","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" new EditTaskDescriptorBuilder().withTaskName(VALID_TASK_NAME_PAPER).build());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(editTaskCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" final EditTaskCommand standardCommand \u003d new EditTaskCommand(INDEX_FIRST_TASK, DESC_PENCIL);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor copyDescriptor \u003d new EditTaskCommand.EditTaskDescriptor(DESC_PENCIL);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand commandWithSameValues \u003d new EditTaskCommand(INDEX_FIRST_TASK, copyDescriptor);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_SECOND_TASK, DESC_PENCIL)));","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" // different descriptor -\u003e returns false","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertFalse(standardCommand.equals(new EditTaskCommand(INDEX_FIRST_TASK, DESC_PAPER)));","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskCommand} with parameters {@code index} and {@code descriptor}","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" private EditTaskCommand prepareCommand(Index index, EditTaskCommand.EditTaskDescriptor descriptor) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand editTaskCommand \u003d new EditTaskCommand(index, descriptor);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" editTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" return editTaskCommand;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":152}},{"path":"src/test/java/seedu/address/logic/commands/EditTaskDescriptorTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor descriptorWithSameValues \u003d new EditTaskDescriptor(DESC_PENCIL);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(descriptorWithSameValues));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertTrue(DESC_PENCIL.equals(DESC_PENCIL));","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(null));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(5));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // different values -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(DESC_PAPER));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" // different name -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL)","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" // different description -\u003e returns false","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDescription(VALID_DESCRIPTION_PAPER).build();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" // different deadline -\u003e returns false","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // different priority -\u003e returns false","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" // different task address -\u003e returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" editedPencil \u003d new EditTaskDescriptorBuilder(DESC_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertFalse(DESC_PENCIL.equals(editedPencil));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":59}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Person editedPerson \u003d new PersonBuilder(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()))","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(\"True\").build();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToFavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(FavouriteCommand.MESSAGE_FAVOURITE_PERSON_SUCCESS, personToFavourite);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d favouriteCommand.execute();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(favouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommand \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteSecondCommand \u003d new FavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteFirstCommandCopy \u003d new FavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code FavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand favouriteCommand \u003d new FavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" favouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return favouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/FavouriteListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteListCommandTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteListCommand favouriteListCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" @Before","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand \u003d new FavouriteListCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" favouriteListCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyFavouriteListShowsNothing() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void executeFavouriteListNotEmptyShowsPerson() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(model, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" CommandResult result \u003d favouriteListCommand.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(result.feedbackToUser, FavouriteListCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":47}},{"path":"src/test/java/seedu/address/logic/commands/FindPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code FindPersonCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" NameContainsKeywordsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" new NameContainsKeywordsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommand \u003d new FindPersonCommand(firstPredicate);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findSecondCommand \u003d new FindPersonCommand(secondPredicate);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand findFirstCommandCopy \u003d new FindPersonCommand(firstPredicate);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void execute_zeroKeywords_noPersonFound() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void execute_multipleKeywords_multiplePersonsFound() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d prepareCommand(\"Kurz Elle Kunz\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(CARL, ELLE, FIONA));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindPersonCommand}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" private FindPersonCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand command \u003d","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindPersonCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":15,"-":84}},{"path":"src/test/java/seedu/address/logic/commands/FindTagCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.ELLE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.FIONA;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.GEORGE;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":"/**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" * Contains integration tests (interaction with the Model) for {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" NameContainsTagsPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommand \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findSecondCommand \u003d new FindTagCommand(secondPredicate);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand findFirstCommandCopy \u003d new FindTagCommand(firstPredicate);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" public void executeZeroKeywordsNoPersonFound() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" public void executeMultipleKeywordsMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends owesMoney\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void executeOneKeywordMultiplePersonsFound() {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 7);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d prepareCommand(\"friends\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" * Parses {@code userInput} into a {@code FindTagCommand}.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":" return command;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code FilteredList\u003cReadOnlyPerson\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" private void assertCommandSuccess(FindTagCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e expectedList) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedList, model.getFilteredPersonList());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":111}},{"path":"src/test/java/seedu/address/logic/commands/FindTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_TASKS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.ACCEPT;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.DATE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.GRADLE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class FindTaskCommandTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"first\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" new TaskContainsKeywordPredicate(Collections.singletonList(\"second\"));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommand \u003d new FindTaskCommand(firstPredicate);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findSecondCommand \u003d new FindTaskCommand(secondPredicate);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommand));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand findFirstCommandCopy \u003d new FindTaskCommand(firstPredicate);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertTrue(findFirstCommand.equals(findFirstCommandCopy));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertFalse(findFirstCommand.equals(findSecondCommand));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void execute_zeroKeywords_noTaskFound() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 0);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\" \");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Collections.emptyList());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" public void execute_multipleKeywords_multipleTasksFound() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_TASKS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d prepareCommand(\"Resolve Acceptance Date\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedMessage, Arrays.asList(ACCEPT, DATE, GRADLE));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" * Parses {@code userInput} into a {@code FindTaskCommand}.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" private FindTaskCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand command \u003d","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(userInput.split(\"\\\\s+\"))));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Asserts that {@code command} is successfully executed, and\u003cbr\u003e","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" * - the command feedback is equal to {@code expectedMessage}\u003cbr\u003e","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" * - the {@code FilteredList\u003cReadOnlyTask\u003e} is equal to {@code expectedList}\u003cbr\u003e","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" * - the {@code AddressBook} in model remains the same after executing the {@code command}","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" private void assertCommandSuccess(FindTaskCommand command, String expectedMessage,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" List\u003cReadOnlyTask\u003e expectedList) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" AddressBook expectedAddressBook \u003d new AddressBook(model.getAddressBook());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedList, model.getFilteredTaskList());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAddressBook, model.getAddressBook());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":97}},{"path":"src/test/java/seedu/address/logic/commands/ListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for ListCommand.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class ListCommandTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private Model model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private ListCommand listCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" listCommand \u003d new ListCommand();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" listCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void execute_listIsNotFiltered_showsSameList() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void execute_listIsFiltered_showsEverything() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandSuccess(listCommand, model, ListCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":42}},{"path":"src/test/java/seedu/address/logic/commands/LocateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code LocateCommand}.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandTest {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommand \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateSecondCommand \u003d new LocateCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommand));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateFirstCommandCopy \u003d new LocateCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(locateFirstCommand.equals(locateFirstCommandCopy));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(locateFirstCommand.equals(locateSecondCommand));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that {@code BrowserPanelLocateEvent}","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" * is raised with the correct index.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d locateCommand.execute();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(LocateCommand.MESSAGE_LOCATE_PERSON_SUCCESS, index.getOneBased()),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelLocateEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelLocateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p, lastEvent.getNewSelection());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code LocateCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.execute();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand locateCommand \u003d new LocateCommand(index);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" locateCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" return locateCommand;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":143}},{"path":"src/test/java/seedu/address/logic/commands/NavigateCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code NavigateCommand}.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandTest {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromAddress_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to, null, null, false, false);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromPersons_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_fromTasks_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(null, null,","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(navi);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidArgs_failure() throws IllegalValueException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d prepareCommand(from, to,","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_FIRST_PERSON, INDEX_SECOND_PERSON, false, false);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expect(IllegalArgumentException.class);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" thrown.expectMessage(NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand naviOne \u003d prepareCommand(from, to,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_SECOND_PERSON, false, false);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" * Executes the input (@code NavigateCommand) and checks that (@code BrowserPanelNavigateEvent) is raised with","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" * the correct locations","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(NavigateCommand navi) throws IllegalValueException {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" Location from;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Location to;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationFrom() !\u003d null) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d navi.getLocationFrom();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isFromIsTask()) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredTaskList().get(navi.getFromIndex().getZeroBased())","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" from \u003d new Location(model.getFilteredPersonList().get(navi.getFromIndex().getZeroBased())","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" if (navi.getLocationTo() !\u003d null) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d navi.getLocationTo();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" } else if (navi.isToIsTask()) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredTaskList().get(navi.getToIndex().getZeroBased())","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" .getTaskAddress().toString());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" to \u003d new Location(model.getFilteredPersonList().get(navi.getToIndex().getZeroBased())","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .getAddress().toString());","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d navi.execute();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(NavigateCommand.MESSAGE_NAVIGATE_SUCCESS,","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" from, to),","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" BrowserPanelNavigateEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" (BrowserPanelNavigateEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(from, lastEvent.getFromLocation());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(to, lastEvent.getToLocation());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code NavigateCommand} based on input parameters.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommand prepareCommand(Location locationFrom, Location locationTo, Index fromIndex, Index toIndex,","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" boolean fromIsTask, boolean toIsTask) throws IllegalValueException {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand navi \u003d new NavigateCommand(locationFrom, locationTo, fromIndex, toIndex, fromIsTask, toIsTask);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" navi.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" return navi;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":135}},{"path":"src/test/java/seedu/address/logic/commands/OpenCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.OpenCommand.OPEN_COMMAND_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.OpenRequestEvent;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class OpenCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new OpenCommand().execute();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(OPEN_COMMAND_SUCCESS, result.feedbackToUser);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof OpenRequestEvent);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/PrivacyLevelCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Assert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" * Contains integration tests (interaction with the Model) for {@code PrivacyLevelCommand}.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" private Model model;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" @Before","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_validIndex_success() {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" //valid levels","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand onePlc \u003d prepareCommand(1);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand twoPlc \u003d prepareCommand(2);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand threePlc \u003d prepareCommand(3);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(onePlc);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(twoPlc);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionSuccess(threePlc);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_invalidIndex_failure() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" //Negative level","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand negativePlc \u003d prepareCommand(-1);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" //Zero level","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand zeroPlc \u003d prepareCommand(0);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //Level greater than the maximum level allowed","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand tooBigPlc \u003d prepareCommand(5);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(negativePlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(zeroPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertExecutionFailure(tooBigPlc, PrivacyLevelCommand.WRONG_PRIVACY_LEVEL_MESSAGE);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that the privacy level of the model and each person has been","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" * changed to that of the level as specified in the input (@code PrivacyLevelCommand)","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionSuccess(PrivacyLevelCommand plc) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" commandResult \u003d plc.execute();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(String.format(PrivacyLevelCommand.CHANGE_PRIVACY_LEVEL_SUCCESS, plc.getLevel()),","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" //Check the model\u0027s privacy level","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(model.getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" //Iterate through the list of persons in the model","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" for (int i \u003d 0; i \u003c model.getAddressBook().getPersonList().size(); i++) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" //Check the person\u0027s Privacy Level","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" ReadOnlyPerson p \u003d model.getAddressBook().getPersonList().get(i);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" //Check Privacy Level of all fields of each person that can be private","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getName().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getPhone().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getEmail().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getAddress().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getRemark().getPrivacyLevel() \u003d\u003d plc.getLevel());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" * Executes a {@code PrivacyLevelCommand} and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" * is thrown with the {@code expectedMessage}","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" private void assertExecutionFailure(PrivacyLevelCommand plc, String expectedMessage) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" try {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" plc.execute();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" Assert.assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":" * Returns a {@code LocateCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommand prepareCommand(int level) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand privacyLevelCommand \u003d new PrivacyLevelCommand(level);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":" privacyLevelCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" return privacyLevelCommand;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":116}},{"path":"src/test/java/seedu/address/logic/commands/RedoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RedoCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Collections.emptyList(), Arrays.asList(deletePersonCommandTwo, deletePersonCommandOne));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d new RedoCommand();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" redoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // multiple commands in redoStack","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" // single command in redoStack","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" // no command in redoStack","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8,"-":47}},{"path":"src/test/java/seedu/address/logic/commands/SaveAsCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SaveAsCommand.SAVE_AS_COMMAND_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.SaveAsRequestEvent;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class SaveAsCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" @Rule","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_exit_success() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult result \u003d new SaveAsCommand().execute();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(SAVE_AS_COMMAND_SUCCESS, result.feedbackToUser);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof SaveAsRequestEvent);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getSize() \u003d\u003d 1);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":25}},{"path":"src/test/java/seedu/address/logic/commands/SelectPersonCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" * Contains integration tests (interaction with the Model) for {@code SelectPersonCommand}.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandTest {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" @Rule","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" private Model model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" @Before","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index lastPersonIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_PERSON);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommand \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectSecondCommand \u003d new SelectPersonCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectFirstCommandCopy \u003d new SelectPersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestEvent} is raised with the correct index.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectPersonCommand.MESSAGE_SUCCESS, index.getOneBased());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectPersonCommand.execute();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectPersonCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" * is thrown with the .","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.execute();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectPersonCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" private SelectPersonCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand selectPersonCommand \u003d new SelectPersonCommand(index);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" selectPersonCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" return selectPersonCommand;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":139}},{"path":"src/test/java/seedu/address/logic/commands/SelectTaskCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" private Model model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" @Before","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Index lastTaskIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_THIRD_TASK);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(lastTaskIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexFilteredList_success() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" assertExecutionSuccess(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundsIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundsIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertExecutionFailure(outOfBoundsIndex, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommand \u003d new SelectTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectSecondCommand \u003d new SelectTaskCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommand));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectFirstCommandCopy \u003d new SelectTaskCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" assertTrue(selectFirstCommand.equals(selectFirstCommandCopy));","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" assertFalse(selectFirstCommand.equals(selectSecondCommand));","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" * {@code JumpToListRequestTaskEvent} is raised with the correct index.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionSuccess(Index index) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SelectTaskCommand.MESSAGE_SUCCESS, index.getOneBased());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" CommandResult commandResult \u003d selectTaskCommand.execute();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent lastEvent \u003d","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" (JumpToListRequestTaskEvent) eventsCollectorRule.eventsCollector.getMostRecent();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertEquals(index, Index.fromZeroBased(lastEvent.targetIndex));","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" * Executes a {@code SelectTaskCommand} with the given {@code index}, and checks that a {@code CommandException}","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" * is thrown with the .","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" private void assertExecutionFailure(Index index, String expectedMessage) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d prepareCommand(index);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.execute();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" assertTrue(eventsCollectorRule.eventsCollector.isEmpty());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SelectTaskCommand} with parameters {@code index}.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" private SelectTaskCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" SelectTaskCommand selectTaskCommand \u003d new SelectTaskCommand(index);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" selectTaskCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" return selectTaskCommand;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":136}},{"path":"src/test/java/seedu/address/logic/commands/SetCompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListValidIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_unfilteredListInvalidIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_changeCompletedTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" setCompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, expectedModel, SetCompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetCompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, true);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setCompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setCompleteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setCompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommand \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setSecondCommand \u003d new SetCompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand setFirstCommandCopy \u003d new SetCompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetCompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" public SetCompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d new SetCompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":118}},{"path":"src/test/java/seedu/address/logic/commands/SetIncompleteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showSecondTaskOnly;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasksOnlyAddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalTasksOnlyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void execute_validTaskIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_THIRD_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_THIRD_TASK);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidTaskIndex_failure() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Index outOfRangeIndex \u003d Index.fromZeroBased(model.getFilteredTaskList().size());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfRangeIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" public void execute_changeIncompleteTask_failure() throws Exception {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" setIncompleteCommand.setData(expectedModel, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, expectedModel, SetIncompleteCommand.MESSAGE_TASK_ALREADY_COMPLETE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommand \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setSecondCommand \u003d new SetIncompleteCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommand));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setFirstCommandCopy \u003d new SetIncompleteCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertTrue(setFirstCommand.equals(setFirstCommandCopy));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" // different task -\u003e returns false","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertFalse(setFirstCommand.equals(setSecondCommand));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListValidIndex_success() throws Exception {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(model);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToChange \u003d model.getFilteredTaskList().get(INDEX_FIRST_TASK.getZeroBased());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(SetIncompleteCommand.MESSAGE_SUCCESS, taskToChange);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" expectedModel.setAsComplete(taskToChange, false);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" showSecondTaskOnly(expectedModel);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(setIncompleteCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void execute_filteredListInvalidIndex_throwsCommandException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand setIncompleteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(setIncompleteCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code SetIncompleteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" public SetIncompleteCommand prepareCommand(Index taskIndex) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d new SetIncompleteCommand(taskIndex);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" return command;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":117}},{"path":"src/test/java/seedu/address/logic/commands/TagListCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.CHRIS_WITH_NEW_TAG;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTaglessAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"public class TagListCommandTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" private Model model;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" private Model expectedModel;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" private TagListCommand listTagsCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" private String expectedMessage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" @Before","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" model \u003d new ModelManager(getTaglessAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" List\u003cTag\u003e tagList \u003d new ArrayList\u003cTag\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand \u003d new TagListCommand();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" listTagsCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" StringBuilder expectedMessageString \u003d new StringBuilder(listTagsCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" for (ReadOnlyPerson p : model.getAddressBook().getPersonList()) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" for (Tag tag : p.getTags()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" if (!tagList.contains(tag)) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" tagList.add(tag);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageString.append(\"\u003c\").append(tag.getTagName()).append(\"\u003e \");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" expectedMessage \u003d expectedMessageString.toString().trim();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void executeTagListNotEmpty() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" public void executeEmptyTagListShowNothing() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" Model expectedModelWithNoTags \u003d new ModelManager();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessageWithNoTags \u003d listTagsCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" TagListCommand tagListCommandWithNoTags \u003d new TagListCommand();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" tagListCommandWithNoTags.setData(expectedModelWithNoTags, new CommandHistory(),","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" new UndoRedoStack());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(tagListCommandWithNoTags, expectedModelWithNoTags,","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" expectedMessageWithNoTags, expectedModelWithNoTags);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithPersonAdd() throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void executeUpdateTagListWithTagEdited() throws","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" PersonNotFoundException, DuplicatePersonException {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" model.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addPerson(CHRIS);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" String newExpectedMessage \u003d expectedMessage + \" \u003c\" + VALID_TAG_CHRISTAG + \"\u003e\";","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, newExpectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" model.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.updatePerson(CHRIS, CHRIS_WITH_NEW_TAG);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" assertCommandSuccess(listTagsCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":88}},{"path":"src/test/java/seedu/address/logic/commands/ThemeCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_CHANGE_SUCCESS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_IN_USE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.ThemeCommand.MESSAGE_THEME_NOT_AVAILABLE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommand \u003d new ThemeCommand(\"light\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkThemeCommand \u003d new ThemeCommand(\"Dark\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommand));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightThemeCommandCopy \u003d new ThemeCommand(\"light\");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(lightThemeCommand.equals(lightThemeCommandCopy));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(1));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(null));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" // different theme -\u003e returns false","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(lightThemeCommand.equals(darkThemeCommand));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_correctTheme_success() throws CommandException {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"light\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(command, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"light\"));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand darkCommand \u003d prepareCommand(\"dark\");","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandSuccess(darkCommand, String.format(MESSAGE_THEME_CHANGE_SUCCESS, \"dark\"));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"notATheme\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_NOT_AVAILABLE, \"notATheme\"));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" public void execute_themeAlreadyLoaded_failure() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"Dark\"));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d prepareCommand(\"dark\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(command, model, String.format(MESSAGE_THEME_IN_USE, \"dark\"));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" model.setTheme(model.getStyleMap().get(\"light\"));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand lightCommand \u003d prepareCommand(\"light\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" assertCommandFailure(lightCommand, model, String.format(MESSAGE_THEME_IN_USE, \"light\"));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" * Parses {@code userInput} into a {@code ThemeCommand}.","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommand prepareCommand(String userInput) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand command \u003d new ThemeCommand(userInput);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" return command;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" * Asserts that {@code command} is successfully executed","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" private void assertCommandSuccess(ThemeCommand command, String expectedMessage) throws CommandException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" CommandResult commandResult \u003d command.execute();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getTheme());","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(ab.getStyleMap().get(command.toString()), model.getUserPrefs().getTheme());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":98}},{"path":"src/test/java/seedu/address/logic/commands/UnFavouriteCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.favouriteFirstPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"public class UnFavouriteCommandTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" private Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" public void executeValidIndexValidPersonSuccess() throws Exception {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" favouriteFirstPerson(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" ReadOnlyPerson personToUnfavourite \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String expectedMessage \u003d String.format(UnfavouriteCommand.MESSAGE_UNFAVOURITE_PERSON_SUCCESS,","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" personToUnfavourite);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" CommandResult commandResult \u003d unfavouriteCommand.execute();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedMessage, commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" public void executeInvalidIndexThrowsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" assertCommandFailure(unfavouriteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteFirstCommand \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand favouriteSecondCommand \u003d new UnfavouriteCommand(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(favouriteFirstCommand));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand deleteFirstCommandCopy \u003d new UnfavouriteCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(favouriteFirstCommand.equals(deleteFirstCommandCopy));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" assertFalse(favouriteFirstCommand.equals(favouriteSecondCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" * Returns a {@code UnfavouriteCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand unfavouriteCommand \u003d new UnfavouriteCommand(index);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" unfavouriteCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" return unfavouriteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":78}},{"path":"src/test/java/seedu/address/logic/commands/UndoCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.UndoRedoStackUtil.prepareStack;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class UndoCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final CommandHistory EMPTY_COMMAND_HISTORY \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final UndoRedoStack EMPTY_STACK \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandOne \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" private final DeletePersonCommand deletePersonCommandTwo \u003d new DeletePersonCommand(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.setData(model, EMPTY_COMMAND_HISTORY, EMPTY_STACK);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public void execute() throws Exception {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d prepareStack(","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" Arrays.asList(deletePersonCommandOne, deletePersonCommandTwo), Collections.emptyList());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d new UndoCommand();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" undoCommand.setData(model, EMPTY_COMMAND_HISTORY, undoRedoStack);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandOne.execute();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" deletePersonCommandTwo.execute();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" // multiple commands in undoStack","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // single command in undoStack","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" // no command in undoStack","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":11,"-":46}},{"path":"src/test/java/seedu/address/logic/commands/UndoableCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.deleteFirstPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstPersonOnly;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class UndoableCommandTest {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" private final Model model \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private final DummyCommand dummyCommand \u003d new DummyCommand(model);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private Model expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void executeUndo() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" dummyCommand.execute();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // undo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" dummyCommand.undo();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel \u003d new ModelManager(getTypicalPersonsAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public void redo() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" showFirstPersonOnly(model);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // redo() should cause the model\u0027s filtered list to show all persons","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" dummyCommand.redo();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" deleteFirstPerson(expectedModel);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, model);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Deletes the first person in the model\u0027s filtered list.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" class DummyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" DummyCommand(Model model) {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToDelete \u003d model.getFilteredPersonList().get(0);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" fail(\"Impossible: personToDelete was retrieved from model.\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new CommandResult(\"\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":63}},{"path":"src/test/java/seedu/address/logic/commands/UnlockLockCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":" * Tests for lock and unlock functionality. Covers implementation across userprefs and model classes","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class UnlockLockCommandTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" private Model model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" public void checkLockFunctionality() throws Exception {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" // Check initial state is unlocked","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" // Check that lock works","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Check double lock","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" model.lockAddressBookFromModel();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" // Check that unlock works","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // Check double unlock","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" model.unlockAddressBookFromModel();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":46}},{"path":"src/test/java/seedu/address/logic/commands/ViewAssignCommandTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showFirstTaskOnly;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalAddressBook.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void execute_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ReadOnlyTask taskToShow \u003d model.getFilteredTaskList().get(5);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(Index.fromZeroBased(5));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(Messages.MESSAGE_PERSONS_LISTED_OVERVIEW, 3);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ModelManager expectedModel \u003d new ModelManager(model.getAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" expectedModel.viewAssignees(taskToShow);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(viewAssignCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexUnfilteredList_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredTaskList().size() + 1);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void execute_invalidIndexFilteredList_throwsCommandException() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" showFirstTaskOnly(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getTasksList().size());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d prepareCommand(outOfBoundIndex);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(viewAssignCommand, model, Messages.MESSAGE_INVALID_TASK_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommand \u003d new ViewAssignCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewSecondCommand \u003d new ViewAssignCommand(INDEX_SECOND_TASK);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommand));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewFirstCommandCopy \u003d new ViewAssignCommand(INDEX_FIRST_TASK);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertTrue(viewFirstCommand.equals(viewFirstCommandCopy));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(1));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(null));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertFalse(viewFirstCommand.equals(viewSecondCommand));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" * Returns a {@code ViewAssignCommand} with the parameter {@code index}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommand prepareCommand(Index index) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" ViewAssignCommand viewAssignCommand \u003d new ViewAssignCommand(index);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" viewAssignCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" return viewAssignCommand;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":90}},{"path":"src/test/java/seedu/address/logic/parser/AddPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandParserTest {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" public void parse_allFieldsPresent_success() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" // multiple phones - last phone accepted","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" // multiple emails - last email accepted","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" // multiple addresses - last address accepted","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" + TAG_DESC_FRIEND, new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // multiple tags - all accepted","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" Person expectedPersonMultipleTags \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" .withAvatar(VALID_AVATAR_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + AVATAR_DESC_BOB","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND,","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPersonMultipleTags));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void parse_optionalFieldsMissing_success() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // zero tags","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Person expectedPerson \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" .withTags().build();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY,","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" new AddPersonCommand(expectedPerson));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" public void parse_compulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" // missing name prefix","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + VALID_NAME_BOB + VALID_PHONE_BOB","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" + VALID_EMAIL_BOB + VALID_ADDRESS_BOB, expectedMessage);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" // invalid phone","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_FRIEND, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" // invalid email","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" + INVALID_EMAIL_DESC + ADDRESS_DESC_BOB + REMARK_DESC_AMY","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" + TAG_DESC_HUSBAND + TAG_DESC_FRIEND, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" // invalid tag","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" + INVALID_TAG_DESC + VALID_TAG_FRIEND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + INVALID_PHONE_DESC","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":28,"Esilocke":22,"-":86}},{"path":"src/test/java/seedu/address/logic/parser/AddTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class AddTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private AddTagCommandParser parser \u003d new AddTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new AddTagCommand(tagToAdd, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" final String tagToAdd \u003d \"friends\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":59}},{"path":"src/test/java/seedu/address/logic/parser/AddTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PENCIL;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"public class AddTaskCommandParserTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" private AddCommandParser parser \u003d new AddCommandParser();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void parseTasksAllFieldsPresent_success() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" Task expectedTask \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" // multiple names - last name accepted","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PAPER","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" + TASK_NAME_DESC_PENCIL + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // multiple descriptions - last description accepted","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" // multiple deadlines - last deadline accepted","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PAPER + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" // multiple priorities - last priority accepted","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PAPER","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" // multiple addresses - last address accepted","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, AddTaskCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" + TASK_ADDRESS_DESC_PAPER + TASK_ADDRESS_DESC_PENCIL, new AddTaskCommand(expectedTask));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" public void parseTasksCompulsoryFieldMissing_failure() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" String expectedMessage \u003d String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddTaskCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" // missing task name prefix","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PAPER","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL + PRIORITY_DESC_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // all prefixes missing","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + VALID_TASK_NAME_PENCIL","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" + VALID_DESCRIPTION_PENCIL + VALID_DEADLINE_PENCIL + VALID_PRIORITY_PENCIL, expectedMessage);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidValue_failure() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // invalid deadline","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" // invalid priority","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Priority.MESSAGE_PRIORITY_CONSTRAINTS);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" // two invalid values, only first invalid value reported","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, AddPersonCommand.COMMAND_WORD + TASK_SEPARATOR + TASK_NAME_DESC_PENCIL","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PENCIL + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" + INVALID_PRIORITY_DESC + TASK_ADDRESS_DESC_PENCIL, Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":104}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_CONFIRM_PASSWORD;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NEW_PASSWORD;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PASSWORD;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_FULL;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.AddTagCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.BackupCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.ChangePasswordCommand;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteListCommand;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.LockCommand;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.OpenCommand;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SaveAsCommand;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.TagListCommand;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.UnlockCommand;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskUtil;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" private static final boolean DEFAULT_STATE_LOCK \u003d false;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAdd() throws Exception {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" AddCommand command \u003d (AddPersonCommand) parser","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(PersonUtil.getAddCommand(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddPersonCommand(person), command);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(TaskUtil.getAddCommand(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AddTaskCommand(task), command);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void parseCommandAliasAdd() throws Exception {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddPersonCommand) parser.parseCommand(AddPersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(new AddPersonCommand(person), command);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" command \u003d (AddTaskCommand) parser.parseCommand(AddTaskCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" + PREFIX_TASK + \" \" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(new AddTaskCommand(task), command);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAssign() throws Exception {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasAssign() throws Exception {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" AssignCommand command \u003d (AssignCommand) parser.parseCommand(AssignCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" assertEquals(new AssignCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasChangePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder(person).build();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand command \u003d (ChangePrivacyCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAME + String.valueOf(person.getName().getIsPrivate())","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_PHONE + String.valueOf(person.getPhone().getIsPrivate())","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_EMAIL + String.valueOf(person.getEmail().getIsPrivate())","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + String.valueOf(person.getAddress().getIsPrivate()),","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d new ChangePrivacyCommand(INDEX_FIRST_PERSON, pps);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(changePrivacyCommandsEqual(command, actualCommand));","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandPrivacyLevel() throws Exception {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 1\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 2\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasPrivacyLevel() throws Exception {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 1\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 2\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(PrivacyLevelCommand.COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":" instanceof PrivacyLevelCommand);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandTheme() throws Exception {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" dark\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_WORD + \" light\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasTheme() throws Exception {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" dark\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(ThemeCommand.COMMAND_ALIAS + \" light\", DEFAULT_STATE_LOCK)","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"jeffreygohkw"},"content":" instanceof ThemeCommand);","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandClear() throws Exception {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasClear() throws Exception {","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDelete() throws Exception {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_TASK + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDelete() throws Exception {","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" DeleteCommand command \u003d (DeletePersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeletePersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" command \u003d (DeleteTaskCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"charlesgoh"},"content":" DeletePersonCommand","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DeleteTaskCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" public void parseCommandDismiss() throws Exception {","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasDismiss() throws Exception {","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e personIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON));","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" DismissCommand command \u003d (DismissCommand) parser.parseCommand(DismissCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" assertEquals(new DismissCommand(personIndexes, INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandEdit() throws Exception {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasEdit() throws Exception {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"wangyiming1019"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"wangyiming1019"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" EditCommand command \u003d (EditPersonCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditPersonCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":" EditTaskDescriptor taskDescriptor \u003d new EditTaskDescriptorBuilder(task).build();","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" command \u003d (EditTaskCommand) parser.parseCommand(EditPersonCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"charlesgoh"},"content":" + INDEX_FIRST_TASK.getOneBased() + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"charlesgoh"},"content":" + TaskUtil.getTaskDetails(task), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTaskCommand(INDEX_FIRST_TASK, taskDescriptor), command);","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" public void parseCommandEditTag() throws Exception {","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasEditTag() throws Exception {","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" EditTagCommand command \u003d (EditTagCommand) parser.parseCommand(EditTagCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" + \" friends enemies\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" Tag friends \u003d new Tag(\"friends\");","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" Tag enemies \u003d new Tag(\"enemies\");","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":" assertEquals(new EditTagCommand(friends, enemies), command);","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandOpen() throws Exception {","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(OpenCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof OpenCommand);","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(OpenCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof OpenCommand);","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandSaveAs() throws Exception {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser.parseCommand(SaveAsCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof SaveAsCommand);","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"jeffreygohkw"},"content":" .parseCommand(SaveAsCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof SaveAsCommand);","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandExit() throws Exception {","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFind() throws Exception {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + keywords.stream()","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"charlesgoh"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate(keywords,","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"charlesgoh"},"content":" DEFAULT_STATE_LOCK, DEFAULT_STATE_LOCK, false, 0)), command);","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFind() throws Exception {","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":" FindCommand command \u003d (FindPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"charlesgoh"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + keywords","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"charlesgoh"},"content":" .stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" assertEquals(new FindPersonCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.COMMAND_ALIAS + \" \" + PREFIX_TASK + \" \"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"charlesgoh"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"charlesgoh"},"content":" assertEquals(new FindTaskCommand(new TaskContainsKeywordPredicate(","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"charlesgoh"},"content":" keywords, DEFAULT_STATE_LOCK, false, false, 0)), command);","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAddTag() throws Exception {","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasAddTag() throws Exception {","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"wangyiming1019"},"content":" AddTagCommand command \u003d (AddTagCommand) parser.parseCommand(AddTagCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new AddTagCommand(toAdd, indexes), command);","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandDeleteTag() throws Exception {","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasDeleteTag() throws Exception {","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"wangyiming1019"},"content":" DeleteTagCommand command \u003d (DeleteTagCommand) parser.parseCommand(DeleteTagCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"wangyiming1019"},"content":" + \" \" + PREFIX_TAG_FULL","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"wangyiming1019"},"content":" + INDEX_SECOND_PERSON.getOneBased() + \" \" + PREFIX_TAG + tagName, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new DeleteTagCommand(toDelete, indexes), command);","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandTagList() throws Exception {","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasTagList() throws Exception {","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand.COMMAND_ALIAS,","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(TagListCommand","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof TagListCommand);","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFindTag() throws Exception {","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_WORD + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFindTag() throws Exception {","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"wangyiming1019"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"friend\", \"colleague\");","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand command \u003d (FindTagCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand.COMMAND_ALIAS + \" \" + PREFIX_TAG_FULL + \" \"","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"wangyiming1019"},"content":" + keywords.stream().collect(Collectors.joining(\" \")), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FindTagCommand(","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"wangyiming1019"},"content":" new NameContainsTagsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavourite() throws Exception {","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavourite() throws Exception {","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand command \u003d (FavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new FavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnfavourite() throws Exception {","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasUnfavourite() throws Exception {","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand command \u003d (UnfavouriteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(new UnfavouriteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandFavouriteList() throws Exception {","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasFavouriteList() throws Exception {","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand.COMMAND_ALIAS,","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"wangyiming1019"},"content":" DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"wangyiming1019"},"content":" assertTrue(parser.parseCommand(FavouriteListCommand","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"wangyiming1019"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof FavouriteListCommand);","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHelp() throws Exception {","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandHistory() throws Exception {","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasHistory() throws Exception {","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(HistoryCommand","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"wangyiming1019"},"content":" try {","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"histories\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"wangyiming1019"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"wangyiming1019"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandList() throws Exception {","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasList() throws Exception {","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ListCommand","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" 3\", DEFAULT_STATE_LOCK) instanceof ListCommand);","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandSelect() throws Exception {","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandAliasSelect() throws Exception {","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand command \u003d (SelectPersonCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"charlesgoh"},"content":" SelectPersonCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SelectPersonCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandLocate() throws Exception {","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasLocate() throws Exception {","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand command \u003d (LocateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"jeffreygohkw"},"content":" LocateCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new LocateCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandNavigate() throws Exception {","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"jeffreygohkw"},"content":" command);","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"jeffreygohkw"},"content":" public void parseCommandAliasNavigate() throws Exception {","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand command \u003d (NavigateCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.COMMAND_ALIAS + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"jeffreygohkw"},"content":" Location from \u003d new Location(\"NUS\");","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"jeffreygohkw"},"content":" Location to \u003d new Location(\"Sentosa\");","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(new NavigateCommand(from, to, null, null, false, false),","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"jeffreygohkw"},"content":" command);","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandWord() throws Exception {","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"charlesgoh"},"content":" public void parseSortCommandAlias() throws Exception {","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"charlesgoh"},"content":" + SortCommand.ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + SortCommand.ACCEPTED_FIELD_PARAMETERS.get(0)","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"charlesgoh"},"content":" + \" \" + SortCommand.ACCEPTED_ORDER_PARAMETERS.get(0), DEFAULT_STATE_LOCK) instanceof SortCommand);","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandBackup() throws Exception {","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(BackupCommand","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" testbackupfilename\", DEFAULT_STATE_LOCK) instanceof BackupCommand);","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeWord() throws Exception {","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"charlesgoh"},"content":" public void parseCommandFontSizeAlias() throws Exception {","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"charlesgoh"},"content":" for (String arg: FontSizeCommand.ACCEPTED_PARAMETERS) {","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"charlesgoh"},"content":" .parseCommand(FontSizeCommand","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + arg, DEFAULT_STATE_LOCK) instanceof FontSizeCommand);","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandValid() throws Exception {","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(LockCommand","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof LockCommand);","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandWordInvalid() throws Exception {","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"charlesgoh"},"content":" public void parseLockCommandAliasInvalid() throws Exception {","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, LockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(LockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandValid() throws Exception {","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"charlesgoh"},"content":" // Pass parser without prefix","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"charlesgoh"},"content":" // Pass parser with prefix","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"charlesgoh"},"content":" // Do the same tests, this time with command alias","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UnlockCommand","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"charlesgoh"},"content":" + \" randompassword\", DEFAULT_STATE_LOCK) instanceof UnlockCommand);","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandWordInvalid() throws Exception {","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_WORD, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"charlesgoh"},"content":" public void parseUnlockCommandAliasInvalid() throws Exception {","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"charlesgoh"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, UnlockCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(UnlockCommand.COMMAND_ALIAS, DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"charlesgoh"},"content":" public void parseChangePasswordCommand() throws Exception {","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are correct and valid","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that are wrong but valid","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"charlesgoh"},"content":" // Pass inputs that have the wrong order (i.e. fields are in the wrong order)","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_WORD + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \"","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"charlesgoh"},"content":" // Do the same thing for alias counterparts","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_NEW_PASSWORD + \"newpassword \"","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(ChangePasswordCommand","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"charlesgoh"},"content":" .COMMAND_ALIAS + \" \" + PREFIX_CONFIRM_PASSWORD + \"newpassword:P \"","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_PASSWORD + \"password \"","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"charlesgoh"},"content":" + PREFIX_NEW_PASSWORD + \"newpassword \", DEFAULT_STATE_LOCK) instanceof ChangePasswordCommand);","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandRedoCommandWordReturnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_STATE_LOCK) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetComplete() throws Exception {","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"Esilocke"},"content":" SetCompleteCommand command \u003d (SetCompleteCommand) parser.parseCommand(SetCompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetCompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"Esilocke"},"content":" public void parseCommandSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"Esilocke"},"content":" public void parseCommandAliasSetIncomplete() throws Exception {","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"Esilocke"},"content":" SetIncompleteCommand command \u003d (SetIncompleteCommand) parser.parseCommand(SetIncompleteCommand.COMMAND_ALIAS","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"Esilocke"},"content":" + \" \" + INDEX_FIRST_TASK.getOneBased(), DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"Esilocke"},"content":" assertEquals(new SetIncompleteCommand(INDEX_FIRST_TASK), command);","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"Esilocke"},"content":" //@@author","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUndoCommandWordReturnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_STATE_LOCK) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"charlesgoh"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_STATE_LOCK) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnrecognisedInputThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"wangyiming1019"},"content":" public void parseCommandUnknownCommandThrowsParseException() throws Exception {","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"charlesgoh"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_STATE_LOCK);","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if 2 ChangePrivacyCommands are equal","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"jeffreygohkw"},"content":" * @param command the expected command","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand the actual command","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"jeffreygohkw"},"content":" * @return true if all the data are equal","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"jeffreygohkw"},"content":" private boolean changePrivacyCommandsEqual(ChangePrivacyCommand command, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(command.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"jeffreygohkw"},"content":" return true;","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":223,"jeffreygohkw":156,"Esilocke":164,"wangyiming1019":201,"-":110}},{"path":"src/test/java/seedu/address/logic/parser/AssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TARGET;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class AssignCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private AssignTaskCommandParser parser \u003d new AssignTaskCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new AssignCommand(indexes, INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix() + \"aaaaa\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_TARGET.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" AssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TARGET.getPrefix();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, AssignCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/ChangePrivacyCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonPrivacySettingsBuilder;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class ChangePrivacyCommandParserTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private ChangePrivacyCommandParser parser \u003d new ChangePrivacyCommandParser();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // no index specified","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\", ChangePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" // negative index","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" // zero index","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" // Non boolean argument","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // valid value followed by invalid value. The test case for invalid value followed by valid value","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_NAME + \"notBoolean\",","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_PHONE + \"true\" + \" \" + PREFIX_PHONE + \"notBoolean\",","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_EMAIL + \"notBoolean\",","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_ADDRESS + \"notBoolean\",","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_REMARK + \"true\" + \" \" + PREFIX_REMARK + \"notBoolean\",","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"false\").setAddressPrivate(\"true\").setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_someFieldsSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"true\";","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\")","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_oneFieldSpecified_success() throws ParseException {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_multipleRepeatedFields_acceptsLast() throws ParseException {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"true\" + \" \" + PREFIX_EMAIL + \"false\"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_ADDRESS + \"true\" + \" \" + PREFIX_PHONE + \"false\" + \" \" + PREFIX_NAME + \"false\" + \" \"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + PREFIX_EMAIL + \"true\" + \" \" + PREFIX_ADDRESS + \"false\" + \" \" + PREFIX_PHONE + \"true\";","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"false\")","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"jeffreygohkw"},"content":" .setEmailPrivate(\"true\").setAddressPrivate(\"false\").setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidValueFollowedByValidValue_success() throws ParseException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"jeffreygohkw"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"jeffreygohkw"},"content":" String userInput \u003d targetIndex.getOneBased() + \" \" + PREFIX_NAME + \"notBoolean\" + \" \" + PREFIX_NAME + \"true\";","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"jeffreygohkw"},"content":" PersonPrivacySettings pps \u003d new PersonPrivacySettingsBuilder().setNamePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand expectedCommand \u003d new ChangePrivacyCommand(targetIndex, pps);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"jeffreygohkw"},"content":" ChangePrivacyCommand actualCommand \u003d parser.parse(userInput);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"jeffreygohkw"},"content":" compareChangePrivacyCommand(expectedCommand, actualCommand);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"jeffreygohkw"},"content":" * Checks if two ChangePrivacyCommands are equal by comparing their contents","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"jeffreygohkw"},"content":" * @param expectedCommand The expected ChangePrivacyCommand","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"jeffreygohkw"},"content":" * @param actualCommand The actual ChangePrivacyCommand","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"jeffreygohkw"},"content":" private void compareChangePrivacyCommand(ChangePrivacyCommand expectedCommand, ChangePrivacyCommand actualCommand) {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getIndex(), actualCommand.getIndex());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getAddressIsPrivate(), actualCommand.getPps().getAddressIsPrivate());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getNameIsPrivate(), actualCommand.getPps().getNameIsPrivate());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getEmailIsPrivate(), actualCommand.getPps().getEmailIsPrivate());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getPhoneIsPrivate(), actualCommand.getPps().getPhoneIsPrivate());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedCommand.getPps().getRemarkIsPrivate(), actualCommand.getPps().getRemarkIsPrivate());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":174}},{"path":"src/test/java/seedu/address/logic/parser/ClearCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearPersonCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ClearTaskCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"public class ClearCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" private ClearCommandParser parser \u003d new ClearCommandParser();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidType_failure() throws ParseException {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" some invalid value\",","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ClearCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void parseValidTypes_success() throws ParseException {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" ClearCommand expectedClearAll \u003d new ClearCommand();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_PERSON.getPrefix()) instanceof ClearPersonCommand);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertTrue(parser.parse(\" \" + PREFIX_TASK.getPrefix()) instanceof ClearTaskCommand);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" ClearCommand multipleTypesSpecified \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearPersonCommand);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertFalse(multipleTypesSpecified instanceof ClearTaskCommand);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" ClearCommand repeatedTypes \u003d parser.parse(\" \" + PREFIX_PERSON.getPrefix() + \" \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_TASK.getPrefix() + PREFIX_PERSON.getPrefix() + \" \" + PREFIX_TASK.getPrefix() + \" \");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearPersonCommand);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" assertFalse(repeatedTypes instanceof ClearTaskCommand);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":43}},{"path":"src/test/java/seedu/address/logic/parser/DeletePersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * As we are only doing white-box testing, our test cases do not cover path variations","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * outside of the DeletePersonCommand code. For example, inputs \"1\" and \"1 abc\" take the","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" * same path through the DeletePersonCommand, and therefore we test only one of them.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * The path variation for those two cases occur inside the ParserUtil, and","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * therefore should be covered by the ParserUtilTest.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandParserTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new DeletePersonCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8,"-":25}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.model.tag.Tag.MESSAGE_TAG_CONSTRAINTS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.DeleteTagCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"public class DeleteTagCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" private DeleteTagCommandParser parser \u003d new DeleteTagCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidIndexAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":" final String tagName \u003d \"friends\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" Tag tagToDelete \u003d new Tag(tagName);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" + tagName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(tagToDelete, indexes));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" final String nonExistentTagName \u003d \"hello\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Tag nonExistentTag \u003d new Tag(nonExistentTagName);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString()","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" + nonExistentTagName;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, userInput, new DeleteTagCommand(nonExistentTag, indexes));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidTagFailure() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" final String tagToDelete \u003d \"friends\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex1 \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" Index targetIndex2 \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" String userInput \u003d targetIndex1.getOneBased() + \" \" + targetIndex2.getOneBased() + \" \" + PREFIX_TAG.toString();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, userInput, MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, DeleteTagCommand.COMMAND_WORD,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":66}},{"path":"src/test/java/seedu/address/logic/parser/DeleteTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeleteTaskCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class DeleteTaskCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private DeleteCommandParser parser \u003d new DeleteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parseTaskValidArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"1\",","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new DeleteTaskCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parseTaskInvalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"a\",","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/DismissCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_FROM;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DismissCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class DismissCommandParserTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" private DismissTaskCommandParser parser \u003d new DismissTaskCommandParser();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public void parseValidPersonIndexAndTaskIndex_success() throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, new DismissCommand(indexes, INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidIndexes_failure() throws ParseException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // invalid person indexes","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \"aaaaa\" + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // invalid task index","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix() + \"aaaaa\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parseInvalidArgsFailure() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no person indexes specified","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d \" \" + PREFIX_FROM.getPrefix() + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_PERSONS_ARGS);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no target prefix","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" + INDEX_FIRST_TASK.getOneBased();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" DismissCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" // no task index specified","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" userInput \u003d INDEX_FIRST_PERSON.getOneBased() + \" \" + INDEX_SECOND_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" + PREFIX_FROM.getPrefix();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, userInput, DismissCommand.MESSAGE_INVALID_TARGET_ARGS);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":63}},{"path":"src/test/java/seedu/address/logic/parser/EditPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandParserTest {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final String TAG_EMPTY \u003d \" \" + PREFIX_TAG;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private EditCommandParser parser \u003d new EditCommandParser();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // no index specified","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" // no field specified","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"1\", EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" // negative index","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" // zero index","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS); // invalid name","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS); // invalid phone","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS); // invalid email","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS); // invalid tag","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" // invalid phone followed by valid email","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_PHONE_DESC + EMAIL_DESC_AMY, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + PHONE_DESC_BOB + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" // while parsing {@code PREFIX_TAG} alone will reset the tags of the {@code Person} being edited,","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" // parsing it together with a valid tag results in error","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + TAG_EMPTY, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_DESC_FRIEND + TAG_EMPTY + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + TAG_EMPTY + TAG_DESC_FRIEND + TAG_DESC_HUSBAND, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" // multiple invalid values, but only the first invalid value is captured","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertParseFailure(parser, \"1\" + INVALID_NAME_DESC + INVALID_EMAIL_DESC + VALID_ADDRESS_AMY + VALID_PHONE_AMY,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void parse_allFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + TAG_DESC_HUSBAND","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + NAME_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void parse_someFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_BOB + EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).build();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" public void parse_oneFieldSpecified_success() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // name","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withName(VALID_NAME_AMY).build();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" // phone","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_AMY).build();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // email","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withEmail(VALID_EMAIL_AMY).build();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // address","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withAddress(VALID_ADDRESS_AMY).build();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" // tags","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + PHONE_DESC_AMY + ADDRESS_DESC_AMY + EMAIL_DESC_AMY + TAG_DESC_FRIEND","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + ADDRESS_DESC_BOB + EMAIL_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND, VALID_TAG_HUSBAND)","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" .build();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" public void parse_invalidValueFollowedByValidValue_success() {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" // no other valid values specified","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + INVALID_PHONE_DESC + PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).build();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" // other valid values specified","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" userInput \u003d targetIndex.getOneBased() + EMAIL_DESC_BOB + INVALID_PHONE_DESC + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptorBuilder().withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).build();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" public void parse_resetTags_success() {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" Index targetIndex \u003d INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" String userInput \u003d targetIndex.getOneBased() + TAG_EMPTY;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder().withTags().build();","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand expectedCommand \u003d new EditPersonCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":16,"-":192}},{"path":"src/test/java/seedu/address/logic/parser/EditTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_DUPLICATE_TAGS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.EditTagCommand.MESSAGE_INSUFFICIENT_ARGS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTagCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class EditTagCommandParserTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTagCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private EditTagCommandParser parser \u003d new EditTagCommandParser();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public void invalidInputTest() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // empty argument","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" // too little args","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // too many args","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" + \" \" + VALID_TAG_FRIEND, MESSAGE_INSUFFICIENT_ARGS);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" // args are the same","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, VALID_TAG_FRIEND + \" \" + VALID_TAG_FRIEND, MESSAGE_DUPLICATE_TAGS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" // args are invalid","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, INVALID_TAG_DESC + \" \" + INVALID_TAG_DESC, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public void validInputTest() throws IllegalValueException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" Tag friendTag \u003d new Tag(VALID_TAG_FRIEND);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" Tag husbandTag \u003d new Tag(VALID_TAG_HUSBAND);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" Tag friendTagUpper \u003d new Tag (VALID_TAG_FRIEND.toUpperCase());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" // case changes","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_FRIEND.toUpperCase(), new EditTagCommand(friendTag, friendTagUpper));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" // two distinct words","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, VALID_TAG_FRIEND + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" + VALID_TAG_HUSBAND, new EditTagCommand(friendTag, husbandTag));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":53}},{"path":"src/test/java/seedu/address/logic/parser/EditTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DEADLINE_DESC_PENCIL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESCRIPTION_DESC_PENCIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_DEADLINE_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PRIORITY_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TASK_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PRIORITY_DESC_PENCIL;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_ADDRESS_DESC_PENCIL;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.EditTaskDescriptorBuilder;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"public class EditTaskCommandParserTest {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditTaskCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private EditCommandParser parser \u003d new EditCommandParser();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public void parse_missingParts_failure() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" // no index specified","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + VALID_TASK_NAME_PAPER, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // no field specified","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\", EditTaskCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" // no index and no field specified","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidPreamble_failure() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" // negative index","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"-5\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" // zero index","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"0\" + TASK_NAME_DESC_PAPER, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // invalid arguments being parsed as preamble","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 some random string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" // invalid prefix being parsed as preamble","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1 i/ string\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValue_failure() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC,","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" TaskName.MESSAGE_NAME_CONSTRAINTS); // invalid name","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC,","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE); // invalid deadline","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_PRIORITY_DESC,","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" Priority.MESSAGE_PRIORITY_CONSTRAINTS); // invalid priority","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" // invalid phone followed by valid email","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_DEADLINE_DESC + PRIORITY_DESC_PAPER,","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" // valid phone followed by invalid phone. The test case for invalid phone followed by valid phone","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" // is tested at {@code parse_invalidValueFollowedByValidValue_success()}","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + DEADLINE_DESC_PAPER + INVALID_DEADLINE_DESC,","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" Deadline.MESSAGE_INVALID_DATE);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" // multiple invalid values, but only the first invalid value is captured","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \"1\" + INVALID_TASK_NAME_DESC + INVALID_PRIORITY_DESC","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" + VALID_DEADLINE_PAPER + VALID_DESCRIPTION_PAPER, TaskName.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" public void parse_allFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER + DESCRIPTION_DESC_PAPER","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" + DEADLINE_DESC_PAPER + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" public void parse_someFieldsSpecified_success() {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER).withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void parse_oneFieldSpecified_success() {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" // name","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_NAME_DESC_PAPER;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" .withTaskName(VALID_TASK_NAME_PAPER).build();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" // phone","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER).build();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // email","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" // address","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" // tags","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + TASK_ADDRESS_DESC_PAPER;","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" public void parse_multipleRepeatedFields_acceptsLast() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PAPER + TASK_ADDRESS_DESC_PAPER + DESCRIPTION_DESC_PENCIL + DEADLINE_DESC_PENCIL","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" + PRIORITY_DESC_PENCIL + TASK_ADDRESS_DESC_PENCIL;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL).withDeadline(VALID_DEADLINE_PENCIL)","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" .withPriority(VALID_PRIORITY_PENCIL).withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidValueFollowedByValidValue_success() {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" // no other valid values specified","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" Index targetIndex \u003d INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" String userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + INVALID_DEADLINE_DESC + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand.EditTaskDescriptor descriptor \u003d new EditTaskDescriptorBuilder()","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).build();","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"Esilocke"},"content":" EditTaskCommand expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"Esilocke"},"content":" // other valid values specified","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"Esilocke"},"content":" userInput \u003d TASK_SEPARATOR + targetIndex.getOneBased() + PRIORITY_DESC_PAPER + INVALID_DEADLINE_DESC","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" + DESCRIPTION_DESC_PAPER + DEADLINE_DESC_PAPER;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptorBuilder().withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER).build();","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"Esilocke"},"content":" expectedCommand \u003d new EditTaskCommand(targetIndex, descriptor);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, userInput, expectedCommand);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":194}},{"path":"src/test/java/seedu/address/logic/parser/FIndTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TASK_SEPARATOR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindTaskCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskContainsKeywordPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"public class FIndTaskCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" private FindCommandParser parser \u003d new FindCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" public void parse_emptyArg_throwsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, TASK_SEPARATOR + \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsFindCommand() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" FindTaskCommand expectedFindTaskCommand \u003d","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" new FindTaskCommand(new TaskContainsKeywordPredicate(Arrays.asList(\"Lucy\", \"Date\")));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \"Lucy Date\", expectedFindTaskCommand);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, TASK_SEPARATOR + \" \\n Lucy \\n \\t Date \\t\", expectedFindTaskCommand);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":36}},{"path":"src/test/java/seedu/address/logic/parser/FavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class FavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private FavouriteCommandParser parser \u003d new FavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsFavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new FavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"f\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" FavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/FindPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandParserTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private FindCommandParser parser \u003d new FindCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public void parse_emptyArg_throwsParseException() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsFindCommand() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" FindPersonCommand expectedFindPersonCommand \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" new FindPersonCommand(new NameContainsKeywordsPredicate(Arrays.asList(\"Alice\", \"Bob\")));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"Alice Bob\", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \\n Alice \\n \\t Bob \\t\", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":8,"-":27}},{"path":"src/test/java/seedu/address/logic/parser/FindTagCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.FindTagCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.NameContainsTagsPredicate;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"public class FindTagCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" private FindTagCommandParser parser \u003d new FindTagCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" public void parseEmptyArgThrowsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \" \",","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindTagCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public void parseValidArgsReturnsFindTagCommand() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":" FindTagCommand expectedFindTagCommand \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"wangyiming1019"},"content":" new FindTagCommand(new NameContainsTagsPredicate(","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"wangyiming1019"},"content":" Arrays.asList(\"friend\", \"colleague\")));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"wangyiming1019"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"friend colleague\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \" \\n friend \\n \\t colleague \\t\", expectedFindTagCommand);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":39}},{"path":"src/test/java/seedu/address/logic/parser/FontSizeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.ACCEPTED_PARAMETERS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.FontSizeCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.commands.FontSizeCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"public class FontSizeCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":" private FontSizeCommandParser parser \u003d new FontSizeCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void parse_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" // No arguments specified","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" // Wrong arguments specified","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertParseFailure(parser, \"random input\",","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand expectedCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" FontSizeCommand actualCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" for (String arg: ACCEPTED_PARAMETERS) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new FontSizeCommand(arg);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" // Check for command word","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" // Check for command alias","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(arg);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" assertEquals(actualCommand.getOption(), expectedCommand.getOption());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":45}},{"path":"src/test/java/seedu/address/logic/parser/LocateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.LocateCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" * Test scope: similar to {@code SelectPersonCommandParserTest}.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" * @see SelectPersonCommandParserTest","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class LocateCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private LocateCommandParser parser \u003d new LocateCommandParser();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsLocateCommand() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new LocateCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT, LocateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/NavigateCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@autho jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_FROM_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_ADDRESS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAVIGATE_TO_TASK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_TASK;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_TASK;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.NavigateCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"public class NavigateCommandParserTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" private NavigateCommandParser parser \u003d new NavigateCommandParser();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_allFieldsPresent_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" //From address to address","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fata \u003d new NavigateCommand(new Location(\"NUS\"), new Location(\"Sentosa\"),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" null, null, false, false);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fata);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" //From address to person","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatp \u003d new NavigateCommand(new Location(\"NUS\"), null,","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_PERSON, false, false);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\", fatp);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //From address to task","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fatt \u003d new NavigateCommand(new Location(\"NUS\"), null,","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" null, INDEX_FIRST_TASK, false, true);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fatt);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" //From person to address","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fpta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, null, false, false);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", fpta);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" //From person to person","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptp \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_THIRD_PERSON, false, false);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fptp);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" //From person to task","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fptt \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_SECOND_PERSON, INDEX_SECOND_TASK, false, true);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"2\"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\", fptt);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" //From task to address","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand ftta \u003d new NavigateCommand(null, new Location(\"Sentosa\"),","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, null, true, false);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", ftta);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" //From task to person","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttp \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_THIRD_PERSON, true, false);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"3\", fttp);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" //From task to task","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand fttt \u003d new NavigateCommand(null, null,","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" INDEX_THIRD_TASK, INDEX_FIRST_TASK, true, true);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"3\"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\", fttt);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_repeatedFromAndTos_failure() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Froms","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_TASK + \"1\"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_FROM_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_FROM_ERROR);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" //Multiple Tos","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\",","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"2\",","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"jeffreygohkw"},"content":" NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_TASK + \"1\" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"1\"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"Sentosa\", NavigateCommand.MESSAGE_MULTIPLE_TO_ERROR);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_missingFromOrTo_failure() {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"jeffreygohkw"},"content":" //No To","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\",","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"jeffreygohkw"},"content":" //No From","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_TO_ADDRESS + \"NUS\",","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, NavigateCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_failure() {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" //Non positive indices","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, NavigateCommand.COMMAND_WORD + \" \" + PREFIX_NAVIGATE_FROM_ADDRESS + \"NUS\"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + PREFIX_NAVIGATE_TO_PERSON + \"-1\", ParserUtil.MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":139}},{"path":"src/test/java/seedu/address/logic/parser/ParserUtilTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.MESSAGE_INVALID_INDEX;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class ParserUtilTest {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" private static final boolean PRIVATE_FIELD \u003d true;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String INVALID_NAME \u003d \"R@chel\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"+651234\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private static final String INVALID_ADDRESS \u003d \" \";","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private static final String INVALID_EMAIL \u003d \"example.com\";","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_REMARK \u003d \" \";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_AVATAR \u003d \" \";","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final String INVALID_TAG \u003d \"#friend\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_NAME \u003d \" \";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_DEADLINE \u003d \"The distant, distant past\";","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_PRIORITY \u003d \"99\";","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" private static final String INVALID_TASK_ADDRESS \u003d \" \";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Rachel Walker\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"123456\";","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"123 Main Street #0505\";","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"rachel@example.com\";","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_REMARK \u003d \"Thinks that P\u003dNP\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_AVATAR \u003d \"valid_file.png\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_1 \u003d \"friend\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" private static final String VALID_TAG_2 \u003d \"neighbour\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_NAME \u003d \"Launcher\";","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DESCRIPTION \u003d \"An arbitrary decision\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_DEADLINE \u003d \"2 weeks later\";","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_PRIORITY \u003d \"3\";","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private static final String VALID_TASK_ADDRESS \u003d \"NUS\";","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public final ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void parseIndex_invalidInput_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(\"10 a\");","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void parseIndex_outOfRangeInput_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_INVALID_INDEX);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" ParserUtil.parseIndex(Long.toString(Integer.MAX_VALUE + 1));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void parseIndex_validInput_success() throws Exception {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // No whitespaces","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\"1\"));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // Leading and trailing whitespaces","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertEquals(INDEX_FIRST_PERSON, ParserUtil.parseIndex(\" 1 \"));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void parseName_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" ParserUtil.parseName(null);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseName_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(INVALID_NAME));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public void parseName_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseName(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public void parseName_validValue_returnsName() throws Exception {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" Name expectedName \u003d new Name(VALID_NAME);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" Optional\u003cName\u003e actualName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" Name expectedPrivateName \u003d new Name(VALID_NAME, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" Optional\u003cName\u003e actualPrivateName \u003d ParserUtil.parseName(Optional.of(VALID_NAME));","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertEquals(expectedName, actualName.get());","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateName, actualPrivateName.get());","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" public void parsePhone_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(null);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" public void parsePhone_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(INVALID_PHONE));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public void parsePhone_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parsePhone(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void parsePhone_validValue_returnsPhone() throws Exception {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" Phone expectedPhone \u003d new Phone(VALID_PHONE);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" Optional\u003cPhone\u003e actualPhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" Phone expectedPrivatePhone \u003d new Phone(VALID_PHONE, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPhone\u003e actualPrivatePhone \u003d ParserUtil.parsePhone(Optional.of(VALID_PHONE));","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(expectedPhone, actualPhone.get());","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivatePhone, actualPrivatePhone.get());","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void parseAddress_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(null);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" public void parseAddress_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(INVALID_ADDRESS));","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" public void parseAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseAddress(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" public void parseAddress_validValue_returnsAddress() throws Exception {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" Address expectedAddress \u003d new Address(VALID_ADDRESS);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" Optional\u003cAddress\u003e actualAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":" Address expectedPrivateAddress \u003d new Address(VALID_ADDRESS, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAddress\u003e actualPrivateAddress \u003d ParserUtil.parseAddress(Optional.of(VALID_ADDRESS));","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertEquals(expectedAddress, actualAddress.get());","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateAddress, actualPrivateAddress.get());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void parseEmail_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(null);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" public void parseEmail_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(INVALID_EMAIL));","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void parseEmail_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertFalse(ParserUtil.parseEmail(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void parseEmail_validValue_returnsEmail() throws Exception {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" Email expectedEmail \u003d new Email(VALID_EMAIL);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" Optional\u003cEmail\u003e actualEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" Email expectedPrivateEmail \u003d new Email(VALID_EMAIL, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" Optional\u003cEmail\u003e actualPrivateEmail \u003d ParserUtil.parseEmail(Optional.of(VALID_EMAIL));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertEquals(expectedEmail, actualEmail.get());","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateEmail, actualPrivateEmail.get());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"Esilocke"},"content":" //@@author Esilocke","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(null);","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseRemark(Optional.of(INVALID_REMARK));","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseRemark(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public void parseRemark_validValue_returnsRemark() throws Exception {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" Remark expectedRemark \u003d new Remark(VALID_REMARK);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" Remark expectedPrivateRemark \u003d new Remark(VALID_REMARK, PRIVATE_FIELD);","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" Optional\u003cRemark\u003e actualPrivateRemark \u003d ParserUtil.parseRemark(Optional.of(VALID_REMARK));","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedRemark, actualRemark.get());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPrivateRemark, actualPrivateRemark.get());","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(null);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseAvatar(Optional.of(INVALID_AVATAR));","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseAvatar(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"Esilocke"},"content":" public void parseAvatar_validValue_returnsAvatar() throws Exception {","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"Esilocke"},"content":" Avatar expectedAvatar \u003d new Avatar(VALID_AVATAR);","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"Esilocke"},"content":" Optional\u003cAvatar\u003e actualAvatar \u003d ParserUtil.parseAvatar(Optional.of(VALID_AVATAR));","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedAvatar, actualAvatar.get());","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"Esilocke"},"content":" public void parseTags_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(null);","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithInvalidTags_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, INVALID_TAG));","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"Esilocke"},"content":" public void parseTags_emptyCollection_returnsEmptySet() throws Exception {","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"Esilocke"},"content":" assertTrue(ParserUtil.parseTags(Collections.emptyList()).isEmpty());","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"Esilocke"},"content":" public void parseTags_collectionWithValidTags_returnsTagSet() throws Exception {","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e actualTagSet \u003d ParserUtil.parseTags(Arrays.asList(VALID_TAG_1, VALID_TAG_2));","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"Esilocke"},"content":" Set\u003cTag\u003e expectedTagSet \u003d new HashSet\u003c\u003e(Arrays.asList(new Tag(VALID_TAG_1), new Tag(VALID_TAG_2)));","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTagSet, actualTagSet);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(null);","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(INVALID_TASK_NAME));","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskName(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"Esilocke"},"content":" public void parseTaskName_validValue_returnsTaskName() throws Exception {","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"Esilocke"},"content":" TaskName expectedTaskName \u003d new TaskName(VALID_TASK_NAME);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskName\u003e actualTaskName \u003d ParserUtil.parseTaskName(Optional.of(VALID_TASK_NAME));","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskName, actualTaskName.get());","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(null);","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDescription(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"Esilocke"},"content":" public void parseDescription_validValue_returnsDescription() throws Exception {","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"Esilocke"},"content":" Description expectedDescription \u003d new Description(VALID_DESCRIPTION);","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDescription\u003e actualDescription \u003d ParserUtil.parseDescription(Optional.of(VALID_DESCRIPTION));","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDescription, actualDescription.get());","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(null);","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(INVALID_DEADLINE));","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseDeadline(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"Esilocke"},"content":" public void parseDeadline_validValue_returnsDeadline() throws Exception {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"Esilocke"},"content":" Deadline expectedDeadline \u003d new Deadline(VALID_DEADLINE);","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"Esilocke"},"content":" Optional\u003cDeadline\u003e actualDeadline \u003d ParserUtil.parseDeadline(Optional.of(VALID_DEADLINE));","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedDeadline, actualDeadline.get());","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(null);","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(INVALID_PRIORITY));","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parsePriority(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"Esilocke"},"content":" public void parsePriority_validValue_returnsPriority() throws Exception {","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"Esilocke"},"content":" Priority expectedPriority \u003d new Priority(VALID_PRIORITY);","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"Esilocke"},"content":" Optional\u003cPriority\u003e actualPriority \u003d ParserUtil.parsePriority(Optional.of(VALID_PRIORITY));","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedPriority, actualPriority.get());","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(null);","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_invalidValue_throwsIllegalValueException() throws Exception {","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"Esilocke"},"content":" thrown.expect(IllegalValueException.class);","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(INVALID_TASK_ADDRESS));","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_optionalEmpty_returnsOptionalEmpty() throws Exception {","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"Esilocke"},"content":" assertFalse(ParserUtil.parseTaskAddress(Optional.empty()).isPresent());","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"Esilocke"},"content":" public void parseTaskAddress_validValue_returnsTaskAddress() throws Exception {","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"Esilocke"},"content":" TaskAddress expectedTaskAddress \u003d new TaskAddress(VALID_TASK_ADDRESS);","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"Esilocke"},"content":" Optional\u003cTaskAddress\u003e actualTaskAddress \u003d ParserUtil.parseTaskAddress(Optional.of(VALID_TASK_ADDRESS));","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTaskAddress, actualTaskAddress.get());","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_null_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"Esilocke"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(null);","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_invalidValue_throwsParseException() throws Exception {","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"Esilocke"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseIndexes(\"1 2 a b c\");","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"Esilocke"},"content":" public void parseIndexes_validValue_returnsIndexes() throws Exception {","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e expectedIndexes \u003d new ArrayList\u003c\u003e(Arrays.asList(INDEX_FIRST_PERSON, INDEX_SECOND_PERSON,","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"Esilocke"},"content":" INDEX_THIRD_PERSON));","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\"1 2 3\"));","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedIndexes, ParserUtil.parseIndexes(\" 1 2 3 \"));","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":260,"-":162}},{"path":"src/test/java/seedu/address/logic/parser/PrivacyLevelCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_THIRD_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.PrivacyLevelCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"public class PrivacyLevelCommandParserTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" private PrivacyLevelCommandParser parser \u003d new PrivacyLevelCommandParser();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"1\", new PrivacyLevelCommand(INDEX_FIRST_PERSON.getOneBased()));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"2\", new PrivacyLevelCommand(INDEX_SECOND_PERSON.getOneBased()));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"3\", new PrivacyLevelCommand(INDEX_THIRD_PERSON.getOneBased()));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"???\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" PrivacyLevelCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":34}},{"path":"src/test/java/seedu/address/logic/parser/SelectPersonCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" * Test scope: similar to {@code DeletePersonCommandParserTest}.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandParserTest","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandParserTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new SelectPersonCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":7,"-":23}},{"path":"src/test/java/seedu/address/logic/parser/SelectTaskCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectTaskCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"public class SelectTaskCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" private SelectCommandParser parser \u003d new SelectCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" \" + PREFIX_TASK.getPrefix() + \" 1\",","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" new SelectTaskCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" \" + PREFIX_TASK.getPrefix() + \" -1\",","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectTaskCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":28}},{"path":"src/test/java/seedu/address/logic/parser/SetCompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetCompleteCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetCompleteCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskCompleteCommandParser parser \u003d new SetTaskCompleteCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\",","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetCompleteCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\",","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SetIncompleteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_TASK;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SetIncompleteCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class SetIncompleteCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private SetTaskIncompleteCommandParser parser \u003d new SetTaskIncompleteCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsSelectCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \" 1\",","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" new SetIncompleteCommand(INDEX_FIRST_TASK));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \" -1\",","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetIncompleteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":27}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_FIELD_PARAMETERS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_LIST_PARAMETERS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.ACCEPTED_ORDER_PARAMETERS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":"public class SortCommandParserTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" public void no_arguments_throwsParseException() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" //author charlesgoh","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_wrongArguments_failure() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" // no list specified","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_FIELD_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" // no field specified","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" // no order specified","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0),","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // list is person but field is for tasks","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(0) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(5)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" // list is task but field is for person","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, ACCEPTED_LIST_PARAMETERS.get(1) + \" \" + ACCEPTED_FIELD_PARAMETERS.get(0)","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" + \" \" + ACCEPTED_ORDER_PARAMETERS.get(0), String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // Incorrect test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \"random text\",","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" public void parse_validArguments_success() throws ParseException {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" SortCommand expectedCommand;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" SortCommand actualCommand;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" // For person sorts","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" String list \u003d ACCEPTED_LIST_PARAMETERS.get(0);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" String field \u003d ACCEPTED_FIELD_PARAMETERS.get(0);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" String order \u003d ACCEPTED_ORDER_PARAMETERS.get(0);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" // For task sorts","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" list \u003d ACCEPTED_LIST_PARAMETERS.get(1);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" field \u003d ACCEPTED_FIELD_PARAMETERS.get(5);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" order \u003d ACCEPTED_ORDER_PARAMETERS.get(1);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" expectedCommand \u003d new SortCommand(list, field, order);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" actualCommand \u003d parser.parse(list + \" \" + field + \" \" + order);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" assertEquals(true, expectedCommand.sameCommandAs(actualCommand));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":26,"jeffreygohkw":53}},{"path":"src/test/java/seedu/address/logic/parser/ThemeCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ThemeCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"public class ThemeCommandParserTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private ThemeCommandParser parser \u003d new ThemeCommandParser();","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_emptyArg_throwsParseException() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" public void parse_validArgs_returnsFindCommand() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" // no leading and trailing whitespaces","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" ThemeCommand expectedFindPersonCommand \u003d","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" new ThemeCommand(\"light\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \"light\", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // multiple whitespaces between keywords","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertParseSuccess(parser, \" light \", expectedFindPersonCommand);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":30}},{"path":"src/test/java/seedu/address/logic/parser/UnfavouriteCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"wangyiming1019"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"//@@author wangyiming1019","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"wangyiming1019"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.logic.commands.UnfavouriteCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"wangyiming1019"},"content":"public class UnfavouriteCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":" private UnfavouriteCommandParser parser \u003d new UnfavouriteCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":" public void parse_validArgs_returnsUnfavouriteCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":" assertParseSuccess(parser, \"1\", new UnfavouriteCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":" assertParseFailure(parser, \"u\", String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"wangyiming1019"},"content":" UnfavouriteCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"wangyiming1019"},"content":"}","isFullCredit":true}],"authorContributionMap":{"wangyiming1019":27}},{"path":"src/test/java/seedu/address/logic/parser/ViewAssignCommandParserTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.ViewAssignCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class ViewAssignCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" private ViewAssignCommandParser parser \u003d new ViewAssignCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" public void parse_validArgs_returnsDeleteCommand() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertParseSuccess(parser, \"1\", new ViewAssignCommand(INDEX_FIRST_PERSON));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertParseFailure(parser, \"a\",","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ViewAssignCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":26}},{"path":"src/test/java/seedu/address/model/AddressBookTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"public class AddressBookTest {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final AddressBook addressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public void constructor() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getPersonList());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertEquals(Collections.emptyList(), addressBook.getTagList());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertEquals(Collections.emptyList(), addressBook.getTasksList());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void resetData_null_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" addressBook.resetData(null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void resetData_withValidReadOnlyAddressBook_replacesData() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" AddressBook newData \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(newData, addressBook);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void resetData_withDuplicatePersons_throwsAssertionError() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Repeat ALICE twice","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e newPersons \u003d Arrays.asList(new Person(ALICE), new Person(ALICE));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" List\u003cTag\u003e newTags \u003d new ArrayList\u003c\u003e(ALICE.getTags());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBookStub newData \u003d new AddressBookStub(newPersons, newTags);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_asc() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getName().toString()));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_name_desc() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getName().toString())));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_asc() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getPhone().toString()));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_phone_desc() {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getPhone().toString())));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_asc() {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getEmail().toString()));","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_email_desc() {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getEmail().toString())));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_asc() {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Comparator.comparing(o -\u003e o.getAddress().toString()));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" public void sortCommandLogic_address_desc() {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" AddressBook testBook \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" testBook.sortPersonsBy(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedTestList \u003d testBook.getPersonList();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e expectedList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(expectedList, Collections.reverseOrder(Comparator.comparing(o -\u003e o.getAddress().toString())));","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e sortedexpectedList \u003d FXCollections.observableArrayList(expectedList);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"charlesgoh"},"content":" assertEquals(sortedTestList, sortedexpectedList);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * A stub ReadOnlyAddressBook whose persons and tags lists can violate interface constraints.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" private static class AddressBookStub implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private final ObservableList\u003cReadOnlyPerson\u003e persons \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" private final ObservableList\u003cTag\u003e tags \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" private final ObservableList\u003cReadOnlyTask\u003e tasks \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" AddressBookStub(Collection\u003c? extends ReadOnlyPerson\u003e persons, Collection\u003c? extends Tag\u003e tags) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" this.persons.setAll(persons);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" this.tags.setAll(tags);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" return persons;","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getTasksList() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" return tasks;","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":111,"Esilocke":18,"-":88}},{"path":"src/test/java/seedu/address/model/ModelManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"wangyiming1019"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"wangyiming1019"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class ModelManagerTest {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void getFilteredPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" modelManager.getFilteredPersonList().remove(0);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"wangyiming1019"},"content":" /*","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of deleteTag is equals to the expected","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to delete.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTagValidIndexesAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"someTag\", \"friends\").build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" Tag toDelete \u003d new Tag(\"someTag\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.deleteTag(toDelete, indexes);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"Someone\").withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" /*","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" * Tests if the actual output of addTag is equals to the expected","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" * output when given valid target indexes and a valid tag to add.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" public void addTagValidIndexesAndTagSuccess() throws Exception {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\").build();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"wangyiming1019"},"content":" Person oldPerson2 \u003d new PersonBuilder().withTags(\"classmate\").build();","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e oldPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson1);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"wangyiming1019"},"content":" oldPersonList.add(oldPerson2);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"wangyiming1019"},"content":" AddressBook oldAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"wangyiming1019"},"content":" oldAddressBook.setPersons(oldPersonList);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"wangyiming1019"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003cIndex\u003e();","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"wangyiming1019"},"content":" indexes.add(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"wangyiming1019"},"content":" Tag toAdd \u003d new Tag(\"newTag\");","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"wangyiming1019"},"content":" ModelManager expectedModel \u003d new ModelManager(oldAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"wangyiming1019"},"content":" expectedModel.addTag(toAdd, indexes);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson1 \u003d new PersonBuilder().withName(\"someone\").withTags(\"someTag\", \"friends\", \"newTag\").build();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"wangyiming1019"},"content":" Person newPerson2 \u003d new PersonBuilder().withTags(\"classmate\", \"newTag\").build();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"wangyiming1019"},"content":" List\u003cReadOnlyPerson\u003e newPersonList \u003d new ArrayList\u003cReadOnlyPerson\u003e();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson1);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"wangyiming1019"},"content":" newPersonList.add(newPerson2);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"wangyiming1019"},"content":" AddressBook newAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"wangyiming1019"},"content":" newAddressBook.setPersons(newPersonList);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"wangyiming1019"},"content":" ModelManager actualModel \u003d new ModelManager(newAddressBook, new UserPrefs());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"wangyiming1019"},"content":" assertEquals(expectedModel.getAddressBook().getPersonList().toString(),","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"wangyiming1019"},"content":" actualModel.getAddressBook().getPersonList().toString());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"wangyiming1019"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBookBuilder().withPerson(ALICE).withPerson(BENSON).build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" AddressBook differentAddressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" ModelManager modelManager \u003d new ModelManager(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" ModelManager modelManagerCopy \u003d new ModelManager(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManagerCopy));","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(modelManager));","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(null));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(5));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // different addressBook -\u003e returns false","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(differentAddressBook, userPrefs)));","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" // different filteredList -\u003e returns false","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"jeffreygohkw"},"content":" String[] keywords \u003d ALICE.getName().value.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(new NameContainsKeywordsPredicate(Arrays.asList(keywords)));","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertFalse(modelManager.equals(new ModelManager(addressBook, userPrefs)));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" // resets modelManager to initial state for upcoming tests","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" modelManager.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" // different userPrefs -\u003e returns true","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" UserPrefs differentUserPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" differentUserPrefs.setAddressBookName(\"differentName\");","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" assertTrue(modelManager.equals(new ModelManager(addressBook, differentUserPrefs)));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":1,"wangyiming1019":82,"-":64}},{"path":"src/test/java/seedu/address/model/UniquePersonListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class UniquePersonListTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" UniquePersonList uniquePersonList \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" uniquePersonList.asObservableList().remove(0);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byName_bothOrders() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e nameComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getName().value.compareTo(o2.getName().value);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, nameComparator);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"asc\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(nameComparator));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"name\", \"desc\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byPhone_bothOrders() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e phoneComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return o1.getPhone().value.compareTo(o2.getPhone().value);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, phoneComparator);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"asc\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(phoneComparator));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"phone\", \"desc\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byEmail_bothOrders() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e emailComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" return o1.getEmail().value.compareTo(o2.getEmail().value);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, emailComparator);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"asc\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(emailComparator));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"email\", \"desc\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" public void sortPerson_byAddress_bothOrders() {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyPerson\u003e personList \u003d TypicalPersons.getTypicalPersons();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyPerson\u003e addressComparator \u003d new Comparator\u003cReadOnlyPerson\u003e() {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyPerson o1, ReadOnlyPerson o2) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" return o1.getAddress().value.compareTo(o2.getAddress().value);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, addressComparator);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalPersons.getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"asc\");","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyPerson\u003e actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(personList, Collections.reverseOrder(addressComparator));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(personList);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortPersonsBy(\"address\", \"desc\");","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getPersonList();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":136,"-":19}},{"path":"src/test/java/seedu/address/model/UniqueTaskListTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.UniqueTaskList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TypicalTasks;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"//@@author charlesgoh","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"public class UniqueTaskListTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" @Rule","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" public void asObservableList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" UniqueTaskList uniquePersonList \u003d new UniqueTaskList();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" uniquePersonList.asObservableList().remove(0);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byDeadline_bothOrders() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" return o1.getDeadline().date.compareTo(o2.getDeadline().date);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"asc\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"deadline\", \"desc\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void sortTasks_byPriority_bothOrders() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // Set up expected result","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" List\u003cReadOnlyTask\u003e taskList \u003d TypicalTasks.getTypicalTasks();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":" Comparator\u003cReadOnlyTask\u003e deadlineComparator \u003d new Comparator\u003cReadOnlyTask\u003e() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" public int compare(ReadOnlyTask o1, ReadOnlyTask o2) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" return Integer.compare(o1.getPriority().value, o2.getPriority().value);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" };","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, deadlineComparator);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" // Set up actual result","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" AddressBook addressBook \u003d TypicalTasks.getTypicalTasksOnlyAddressBook();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"asc\");","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" ObservableList\u003cReadOnlyTask\u003e actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" // Check ascending order sort","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":" // Set up descending order sort","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" Collections.sort(taskList, Collections.reverseOrder(deadlineComparator));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" expectedTaskList \u003d FXCollections.observableList(taskList);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" addressBook.sortTasksBy(\"priority\", \"desc\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" actualTaskList \u003d addressBook.getTasksList();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" // Check descending order sort","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTaskList, actualTaskList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":92}},{"path":"src/test/java/seedu/address/model/person/AddressTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class AddressTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidAddress() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid addresses","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Address.isValidAddress(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // valid addresses","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Blk 456, Den Road, #01-355\"));","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"-\")); // one character","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertTrue(Address.isValidAddress(\"Leng Inc; 1234 Market St; San Francisco CA 2349879; USA\")); // long address","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" public void privateAddressIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" Address a \u003d new Address(\"Any Address\", true);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(a.getIsPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(a.toString(), \"\u003cPrivate Address\u003e\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":19}},{"path":"src/test/java/seedu/address/model/person/EmailTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class EmailTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidEmail() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // blank email","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" // missing parts","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"@example.com\")); // missing local part","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjackexample.com\")); // missing \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@\")); // missing domain name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // invalid parts","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"-@example.com\")); // invalid local part","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@-\")); // invalid domain name","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter jack@example.com\")); // spaces in local part","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@exam ple.com\")); // spaces in domain name","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@@example.com\")); // double \u0027@\u0027 symbol","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peter@jack@example.com\")); // \u0027@\u0027 symbol in local part","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertFalse(Email.isValidEmail(\"peterjack@example@com\")); // \u0027@\u0027 symbol in domain name","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // valid email","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"PeterJack_1190@example.com\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a@b\")); // minimal","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"test@localhost\")); // alphabets only","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"123@145\")); // numeric local part and domain name","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"a1@example1.com\")); // mixture of alphanumeric and dot characters","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"_user_@_e_x_a_m_p_l_e_.com_\")); // underscores","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"peter_jack@very_very_very_long_example.com\")); // long domain name","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" assertTrue(Email.isValidEmail(\"if.you.dream.it_you.can.do.it@example.com\")); // long local part","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" public void privateEmailIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" Email e \u003d new Email(\"AnyEmail@example.com\", true);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(e.getIsPrivate());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(e.toString(), \"\u003cPrivate Email\u003e\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":38}},{"path":"src/test/java/seedu/address/model/person/NameContainsKeywordsPrivacyLevelPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":"public class NameContainsKeywordsPrivacyLevelPredicateTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicate \u003d","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate secondPredicate \u003d","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(secondPredicateKeywordList);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicate));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate firstPredicateCopy \u003d","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(firstPredicateKeywordList);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(1));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(null));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(firstPredicate.equals(secondPredicate));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameContainsKeywords_returnsTrue() throws IllegalValueException {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" // One keyword","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.singletonList(\"Alice\"));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(testee));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" testee.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" // Multiple keywords","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Alice\", \"Bob\"));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Carol\").build();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // Only one matching keyword","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Bob\", \"Carol\"));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Carol\").build()));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" testee.getAddress().setPrivate(true);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" // Mixed-case keywords","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"aLIce\", \"bOB\"));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(predicate.test(new PersonBuilder().withName(\"Alice Bob\").build()));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" Person testee \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" // Zero keywords","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" NameContainsKeywordsPrivacyLevelPredicate predicate \u003d","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":" new NameContainsKeywordsPrivacyLevelPredicate(Collections.emptyList());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" testee.getName().setPrivate(true);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice Bob\").build();","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" // Non-matching keyword","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(\"Carol\"));","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" testee.getRemark().setPrivate(true);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":" testee \u003d new PersonBuilder().withName(\"Alice\").withPhone(\"12345\")","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" .withEmail(\"alice@email.com\").withAddress(\"Main Street\").build();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" // Keywords match phone, email and address, but does not match name","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":" predicate \u003d new NameContainsKeywordsPrivacyLevelPredicate(Arrays.asList(","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"jeffreygohkw"},"content":" \"12345\", \"alice@email.com\", \"Main\", \"Street\"));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"jeffreygohkw"},"content":" testee.getEmail().setPrivate(true);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"jeffreygohkw"},"content":" assertFalse(predicate.test(testee));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":113}},{"path":"src/test/java/seedu/address/model/person/NameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class NameTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid name","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"^\")); // only non-alphanumeric characters","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Name.isValidName(\"peter*\")); // contains non-alphanumeric characters","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" // valid name","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter jack\")); // alphabets only","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"12345\")); // numbers only","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"peter the 2nd\")); // alphanumeric characters","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"Capital Tan\")); // with capital letters","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertTrue(Name.isValidName(\"David Roger Jackson Ray Jr 2nd\")); // long names","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" public void privateNameIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" Name n \u003d new Name(\"Any Name\", true);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(n.getIsPrivate());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(n.toString(), \"\u003cPrivate Name\u003e\");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":24}},{"path":"src/test/java/seedu/address/model/person/PhoneTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class PhoneTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public void isValidPhone() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" // invalid phone numbers","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\" \")); // spaces only","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"91\")); // less than 3 numbers","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"phone\")); // non-numeric","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9011p041\")); // alphabets within digits","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" assertFalse(Phone.isValidPhone(\"9312 1534\")); // spaces within digits","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // valid phone numbers","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"911\")); // exactly 3 numbers","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"93121534\"));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertTrue(Phone.isValidPhone(\"124293842033123\")); // long phone numbers","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" public void privatePhoneIsHidden_success() throws IllegalValueException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" Phone p \u003d new Phone(\"999\", true);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" assertTrue(p.getIsPrivate());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(p.toString(), \"\u003cPrivate Phone\u003e\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":12,"-":23}},{"path":"src/test/java/seedu/address/model/task/DeadlineTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DeadlineTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDeadline() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid deadlines","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"alphabets\")); // non-numeric letters","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Deadline.isValidDeadline(\"!@#$%^\")); // invalid symbols","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" // valid deadline (empty deadline for optional data)","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"\")); // empty string","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" // valid deadlines","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"04-04-2017\")); // dashes","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"the day after tomorrow\")); // slashes","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" assertTrue(Deadline.isValidDeadline(\"4-11\"));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":25}},{"path":"src/test/java/seedu/address/model/task/DescriptionTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class DescriptionTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidDescription() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid descriptions","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(Description.isValidDescription(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" // valid descriptions","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"\")); // empty string","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"alphanumerical contents\")); // alphanumerical contents","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(Description.isValidDescription(\"-\")); // single character","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":20}},{"path":"src/test/java/seedu/address/model/task/PriorityTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class PriorityTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidPriority() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\" \")); // spaces only","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"invalid\")); // invalid priority","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"777\")); // priority out of range","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertFalse(Priority.isValidPriority(\"-1\")); // priority out of range","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"\")); // empty string","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assertTrue(Priority.isValidPriority(\"1\")); // numerical representation","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":23}},{"path":"src/test/java/seedu/address/model/task/TaskContainsKeywordPredicateTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskContainsKeywordPredicateTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e firstPredicateKeywordList \u003d Collections.singletonList(\"first\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" List\u003cString\u003e secondPredicateKeywordList \u003d Arrays.asList(\"first\", \"second\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate secondPredicate \u003d new TaskContainsKeywordPredicate(secondPredicateKeywordList);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate thirdPredicate \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicate));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate firstPredicateCopy \u003d new TaskContainsKeywordPredicate(firstPredicateKeywordList,","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" assertTrue(firstPredicate.equals(firstPredicateCopy));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(1));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(null));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" // different keywords -\u003e returns false","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(secondPredicate));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" assertFalse(firstPredicate.equals(thirdPredicate));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public void test_nameContainsKeywords_returnsTrue() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" // One keyword","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pen\").build()));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public void test_nameDoesNotContainKeywords_returnsFalse() {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" // Zero keywords","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.emptyList());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy\").build()));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" // Non-matching keyword","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pen\"));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" public void test_descriptionContainsKeywords_returnsTrue() {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" // One keyword","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy 3 Pencil\").build()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" // Multiple keywords","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Buy\", \"Pencil\"));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" // Only one matching keyword","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"Pencil\", \"Pen\"));","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pen\").build()));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" // Mixed-case keywords","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Arrays.asList(\"buY\", \"pEnciL\"));","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withDescription(\"Buy Pencil\").build()));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" public void priorityMatches() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" // Priority level equal to required level","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" // Priority level greater than required level","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"4\").build()));","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" // Priority level less than required level","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" // Name matches, priority check not required, even though priority level does not match","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" false, false, false, 3);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"1\").build()));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" // Priority matches, but name does not match","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" false, true, false, 3);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withPriority(\"3\").build()));","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" public void stateMatches() {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" // States are equivalent","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" // States are different","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" true, false, false, 0);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" // Name matches, state check not required, even though state does not match","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" false, false, false, 0);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" // State matches, but name does not match","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Something\"),","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" true, false, true, 0);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withState(true).build()));","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" public void combinationTests() {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":" // At most 1 invalid input per test case","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" // Matches all","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" TaskContainsKeywordPredicate predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencil now\")","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" // Name does not match, but description does","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Get something\").withDescription(\"Get 3 Pencil now\")","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" // Description does not match, but name does","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" assertTrue(predicate.test(new TaskBuilder().withTaskName(\"Buy 3 Pencil\").withDescription(\"Get something\")","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(true).build()));","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but priority does not","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"2\").withState(true).build()));","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"Esilocke"},"content":" // Name or description matches, but state does not","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"Esilocke"},"content":" predicate \u003d new TaskContainsKeywordPredicate(Collections.singletonList(\"Pencil\"),","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"Esilocke"},"content":" true, true, true, 3);","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"Esilocke"},"content":" assertFalse(predicate.test(new TaskBuilder().withTaskName(\"Buy Pencil\").withDescription(\"Get 3 Pencils now\")","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" .withPriority(\"4\").withState(false).build()));","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":182}},{"path":"src/test/java/seedu/address/model/task/TaskNameTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.model.task;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"public class TaskNameTest {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" @Test","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" public void isValidName() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" // invalid names","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\" \")); // spaces only","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" assertFalse(TaskName.isValidName(\"\")); // empty string","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" // valid names","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\".\")); // single character","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil\")); // alphanumerical with spaces","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" assertTrue(TaskName.isValidName(\"buy pencil!\")); // special symbols","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":21}},{"path":"src/test/java/seedu/address/storage/StorageManagerTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static junit.framework.TestCase.assertNotNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.ui.testutil.EventsCollectorRule;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StorageManagerTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public final EventsCollectorRule eventsCollectorRule \u003d new EventsCollectorRule();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private StorageManager storageManager;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" XmlAddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(getTempFilePath(\"ab\"));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(getTempFilePath(\"prefs\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" storageManager \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private String getTempFilePath(String fileName) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return testFolder.getRoot().getPath() + fileName;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void prefsReadSave() throws Exception {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * {@link JsonUserPrefsStorage} class.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link JsonUserPrefsStorageTest} class.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" original.setGuiSettings(300, 600, 4, 6);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" storageManager.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" UserPrefs retrieved \u003d storageManager.readUserPrefs().get();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(original, retrieved);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void addressBookReadSave() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * Note: This is an integration test that verifies the StorageManager is properly wired to the","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" * {@link XmlAddressBookStorage} class.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * More extensive testing of UserPref saving/reading is done in {@link XmlAddressBookStorageTest} class.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" storageManager.saveAddressBook(original);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook retrieved \u003d storageManager.readAddressBook().get();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(retrieved));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertNotNull(storageManager.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" public void handleAddressBookChangedEvent_exceptionThrown_eventRaised() {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" // Create a StorageManager while injecting a stub that throws an exception when the save method is called","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Storage storage \u003d new StorageManager(new XmlAddressBookStorageExceptionThrowingStub(\"dummy\"),","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(\"dummy\"));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" storage.handleAddressBookChangedEvent(new AddressBookChangedEvent(new AddressBook()));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertTrue(eventsCollectorRule.eventsCollector.getMostRecent() instanceof DataSavingExceptionEvent);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * A Stub class to throw an exception when the save method is called","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" class XmlAddressBookStorageExceptionThrowingStub extends XmlAddressBookStorage {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public XmlAddressBookStorageExceptionThrowingStub(String filePath) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(filePath);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) throws IOException {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" throw new IOException(\"dummy exception\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":99}},{"path":"src/test/java/seedu/address/storage/XmlAddressBookStorageTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersonsAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class XmlAddressBookStorageTest {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/XmlAddressBookStorageTest/\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public void readAddressBook_nullFilePath_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" readAddressBook(null);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private java.util.Optional\u003cReadOnlyAddressBook\u003e readAddressBook(String filePath) throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return new XmlAddressBookStorage(filePath).readAddressBook(addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String prefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" return prefsFileInTestDataFolder !\u003d null","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + prefsFileInTestDataFolder","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" : null;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public void read_missingFile_emptyResult() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertFalse(readAddressBook(\"NonExistentFile.xml\").isPresent());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void read_notXmlFormat_exceptionThrown() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" readAddressBook(\"NotXmlFormatAddressBook.xml\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void readAndSaveAddressBook_allInOrder_success() throws Exception {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" String filePath \u003d testFolder.getRoot().getPath() + \"TempAddressBook.xml\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" AddressBook original \u003d getTypicalPersonsAddressBook();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlAddressBookStorage xmlAddressBookStorage \u003d new XmlAddressBookStorage(filePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" //Save in new file and read back","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" //Modify data, overwrite exiting file, and read back","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" original.addPerson(new Person(HOON));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" original.removePerson(new Person(ALICE));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original, filePath);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook(filePath).get();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //Save and read without specifying file path","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" original.addPerson(new Person(IDA));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" xmlAddressBookStorage.saveAddressBook(original); //file path not specified","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" readBack \u003d xmlAddressBookStorage.readAddressBook().get(); //file path not specified","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertEquals(original, new AddressBook(readBack));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullAddressBook_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveAddressBook(null, \"SomeFile.xml\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void getPersonList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" addressBook.getPersonList().remove(0);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public void getTagList_modifyList_throwsUnsupportedOperationException() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook addressBook \u003d new XmlSerializableAddressBook();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" thrown.expect(UnsupportedOperationException.class);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" addressBook.getTagList().remove(0);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * Saves {@code addressBook} at the specified {@code filePath}.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" private void saveAddressBook(ReadOnlyAddressBook addressBook, String filePath) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" new XmlAddressBookStorage(filePath).saveAddressBook(addressBook, addToTestDataPathIfNotNull(filePath));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file.\", ioe);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" public void saveAddressBook_nullFilePath_throwsNullPointerException() throws IOException {","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" saveAddressBook(new AddressBook(), null);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":2,"-":126}},{"path":"src/test/java/seedu/address/testutil/EditPersonDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * A utility class to help with building EditPersonDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class EditPersonDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private EditPersonDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(EditPersonDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.descriptor \u003d new EditPersonDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns an {@code EditPersonDescriptor} with fields containing {@code person}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" descriptor \u003d new EditPersonDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" descriptor.setName(person.getName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" descriptor.setPhone(person.getPhone());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" descriptor.setEmail(person.getEmail());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" descriptor.setAddress(person.getAddress());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" descriptor.setRemark(person.getRemark());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" descriptor.setAvatar(person.getAvatar());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" descriptor.setTags(person.getTags());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withName(String name) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" ParserUtil.parseName(Optional.of(name)).ifPresent(descriptor::setName);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * Sets the {@code Phone} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" ParserUtil.parsePhone(Optional.of(phone)).ifPresent(descriptor::setPhone);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" ParserUtil.parseEmail(Optional.of(email)).ifPresent(descriptor::setEmail);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public EditPersonDescriptorBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" ParserUtil.parseAddress(Optional.of(address)).ifPresent(descriptor::setAddress);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Remark} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseRemark(Optional.of(remark)).ifPresent(descriptor::setRemark);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"remark is expected to be unique.\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Avatar} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withAvatar(String avatar) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" ParserUtil.parseAvatar(Optional.of(avatar)).ifPresent(descriptor::setAvatar);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"avatar is expected to be unique.\");","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" //@author","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code EditPersonDescriptor}","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" * that we are building.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" public EditPersonDescriptorBuilder withTags(String... tags) {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" descriptor.setTags(ParserUtil.parseTags(Arrays.asList(tags)));","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Favourite} of the {@code EditPersonDescriptor} that we are building.","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" public EditPersonDescriptorBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" descriptor.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" public EditPersonDescriptor build() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":40,"Esilocke":1,"wangyiming1019":9,"-":88}},{"path":"src/test/java/seedu/address/testutil/EditTaskDescriptorBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditTaskCommand.EditTaskDescriptor;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.ParserUtil;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building EditTaskDescriptor objects.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"public class EditTaskDescriptorBuilder {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" private EditTaskDescriptor descriptor;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(EditTaskDescriptor descriptor) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" this.descriptor \u003d new EditTaskDescriptor(descriptor);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code EditTaskDescriptor} with fields containing {@code task}\u0027s details","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" descriptor \u003d new EditTaskDescriptor();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskName(task.getTaskName());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" descriptor.setDescription(task.getDescription());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" descriptor.setDeadline(task.getDeadline());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" descriptor.setPriority(task.getPriority());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" descriptor.setTaskAddress(task.getTaskAddress());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskName(Optional.of(name)).ifPresent(descriptor::setTaskName);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDescription(Optional.of(description)).ifPresent(descriptor::setDescription);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseDeadline(Optional.of(deadline)).ifPresent(descriptor::setDeadline);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parsePriority(Optional.of(priority)).ifPresent(descriptor::setPriority);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code EditTaskDescriptor} that we are building.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptorBuilder withTaskAddress(String address) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" ParserUtil.parseTaskAddress(Optional.of(address)).ifPresent(descriptor::setTaskAddress);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" public EditTaskDescriptor build() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":" return descriptor;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":101}},{"path":"src/test/java/seedu/address/testutil/ModelStub.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.parser.Prefix;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.TaskNotFoundException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" * A default model stub that have all of the methods failing.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":"public class ModelStub implements Model {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public void addPerson(ReadOnlyPerson person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"wangyiming1019"},"content":" public void addTag(Tag toAdd, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public void resetPartialData(ReadOnlyAddressBook newData, Prefix prefix) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" public void increaseFontSize() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" public void decreaseFontSize() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void resetFontSize() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" public void setMainWindow(MainWindow mainWindow) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" public void deletePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" public void deleteTag(Tag toDelete, ArrayList\u003cIndex\u003e targetIndexes) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public void updatePerson(ReadOnlyPerson target, ReadOnlyPerson editedPerson)","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public void editTag(Tag toChange, Tag newTag, ArrayList\u003cIndex\u003e affectedIndexes) throws PersonNotFoundException,","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" DuplicatePersonException {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredPersonList(Predicate\u003cReadOnlyPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" public void updateFilteredTaskList(Predicate\u003cReadOnlyTask\u003e predicate) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public void sortPersons(String field, String order) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" public void sortTasks(String field, String order) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"wangyiming1019"},"content":" public void favouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" public void addTask(ReadOnlyTask toAdd) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"wangyiming1019"},"content":" @Override","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"wangyiming1019"},"content":" public void unfavouritePerson(ReadOnlyPerson target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"wangyiming1019"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" public void deleteTask(ReadOnlyTask toDelete) throws TaskNotFoundException {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" public ObservableList\u003cReadOnlyTask\u003e getFilteredTaskList() {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" public void updateTask(ReadOnlyTask target, ReadOnlyTask editedTask) throws DuplicateTaskException {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" public void assignToTask(ArrayList\u003cReadOnlyPerson\u003e personsToAssign, ReadOnlyTask taskToAssign)","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"Esilocke"},"content":" public void dismissFromTask(ArrayList\u003cReadOnlyPerson\u003e personsToDismiss, ReadOnlyTask taskToDismiss)","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"Esilocke"},"content":" public void setAsComplete(ReadOnlyTask toSet, boolean isComplete)","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"Esilocke"},"content":" throws TaskNotFoundException, DuplicateTaskException {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"jeffreygohkw"},"content":" public void setPrivacyLevel(int level) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"jeffreygohkw"},"content":" public int getPrivacyLevel() {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"jeffreygohkw"},"content":" return 0;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"jeffreygohkw"},"content":" public ReadOnlyPerson getPersonAtIndexFromAddressBook(int index) {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"jeffreygohkw"},"content":" return null;","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"jeffreygohkw"},"content":" //@@author","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"jeffreygohkw"},"content":" public void setTheme(String theme) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"jeffreygohkw"},"content":" public String getTheme() {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"jeffreygohkw"},"content":" return null;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"jeffreygohkw"},"content":" @Override","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"jeffreygohkw"},"content":" public HashMap\u003cString, String\u003e getStyleMap() {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"jeffreygohkw"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"jeffreygohkw"},"content":" return null;","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"Esilocke"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" return false;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" public void lockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"Esilocke"},"content":" public void unlockAddressBookFromModel() {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"Esilocke"},"content":" return null;","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" @Override","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"Esilocke"},"content":" public void viewAssignees(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"Esilocke"},"content":" fail(\"This method should not be called\");","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":17,"jeffreygohkw":37,"Esilocke":153,"wangyiming1019":24,"-":1}},{"path":"src/test/java/seedu/address/testutil/PersonBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * A utility class to help with building Person objects.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"public class PersonBuilder {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String DEFAULT_NAME \u003d \"Alice Pauline\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public static final String DEFAULT_PHONE \u003d \"85355255\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String DEFAULT_EMAIL \u003d \"alice@gmail.com\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String DEFAULT_ADDRESS \u003d \"123, Jurong West Ave 6, #08-111\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"wangyiming1019"},"content":" public static final String DEFAULT_FAVOURITE \u003d \"false\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_REMARK \u003d \"Eats, shoots, and leaves\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" public static final String DEFAULT_AVATAR \u003d \"\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TAGS \u003d \"friends\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private Person person;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" public PersonBuilder() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" Name defaultName \u003d new Name(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" Phone defaultPhone \u003d new Phone(DEFAULT_PHONE);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" Email defaultEmail \u003d new Email(DEFAULT_EMAIL);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" Address defaultAddress \u003d new Address(DEFAULT_ADDRESS);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"wangyiming1019"},"content":" Boolean defaultFavourite \u003d new Boolean(DEFAULT_FAVOURITE);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" Remark defaultRemark \u003d new Remark(DEFAULT_REMARK);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" Avatar defaultAvatar \u003d new Avatar(DEFAULT_AVATAR);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e defaultTags \u003d SampleDataUtil.getTagSet(DEFAULT_TAGS);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" this.person \u003d new Person(defaultName, defaultPhone, defaultEmail, defaultAddress, defaultFavourite,","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" defaultRemark, defaultAvatar, defaultTags);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Default person\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Initializes the PersonBuilder with the data of {@code personToCopy}.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public PersonBuilder(ReadOnlyPerson personToCopy) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" this.person \u003d new Person(personToCopy);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" * Sets the {@code Name} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public PersonBuilder withName(String name) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.person.setName(new Name(name));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * Parses the {@code tags} into a {@code Set\u003cTag\u003e} and set it to the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public PersonBuilder withTags(String ... tags) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.person.setTags(SampleDataUtil.getTagSet(tags));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"tags are expected to be unique.\");","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Sets the {@code Address} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public PersonBuilder withAddress(String address) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" this.person.setAddress(new Address(address));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withRemark(String remark) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" this.person.setRemark(new Remark(remark));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Remark is invalid\");","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public PersonBuilder withAvatar(String filepath) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" try {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" this.person.setAvatar(new Avatar(filepath));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" throw new IllegalArgumentException(\"Avatar is invalid\");","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":" return this;","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"charlesgoh"},"content":" * Sets the {@code Phone} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public PersonBuilder withPhone(String phone) {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" this.person.setPhone(new Phone(phone));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"phone is expected to be unique.\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Sets the {@code Email} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" public PersonBuilder withEmail(String email) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" this.person.setEmail(new Email(email));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"email is expected to be unique.\");","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"wangyiming1019"},"content":" /**","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"wangyiming1019"},"content":" * Sets the {@code Boolean} of the {@code Person} that we are building.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"wangyiming1019"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"wangyiming1019"},"content":" public PersonBuilder withFavourite(String favourite) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"wangyiming1019"},"content":" this.person.setFavourite(new Boolean(favourite));","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"wangyiming1019"},"content":" return this;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"wangyiming1019"},"content":" }","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" public Person build() {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" return this.person;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":34,"wangyiming1019":12,"-":107}},{"path":"src/test/java/seedu/address/testutil/PersonPrivacySettingsBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"jeffreygohkw"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"jeffreygohkw"},"content":"//@@author jeffreygohkw","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.logic.commands.ChangePrivacyCommand.PersonPrivacySettings;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":" * A utility class to help with building PersonPrivacySettings objects.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"public class PersonPrivacySettingsBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":" private PersonPrivacySettings pps;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder() {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(PersonPrivacySettings pps) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"jeffreygohkw"},"content":" this.pps \u003d new PersonPrivacySettings(pps);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"jeffreygohkw"},"content":" * Returns an {@code PersonPrivacySettings} with fields containing {@code person}\u0027s privacy details","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"jeffreygohkw"},"content":" pps \u003d new PersonPrivacySettings();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(person.getName().getIsPrivate());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(person.getPhone().getIsPrivate());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(person.getEmail().getIsPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(person.getAddress().getIsPrivate());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(person.getRemark().getIsPrivate());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code nameIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setNamePrivate(String name) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"jeffreygohkw"},"content":" if (name.equals(\"Optional[true]\") || name.equals(\"true\")) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(true);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"jeffreygohkw"},"content":" } else if (name.equals(\"Optional[false]\") || name.equals(\"false\")) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"jeffreygohkw"},"content":" pps.setNameIsPrivate(false);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of name should be true or false\");","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code phoneIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setPhonePrivate(String phone) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(true);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" pps.setPhoneIsPrivate(false);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code emailIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setEmailPrivate(String email) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(true);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" pps.setEmailIsPrivate(false);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code addressIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setAddressPrivate(String address) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(true);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"jeffreygohkw"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"jeffreygohkw"},"content":" pps.setAddressIsPrivate(false);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"jeffreygohkw"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"jeffreygohkw"},"content":" * Sets the {@code remarkIsPrivate} of the {@code PersonPrivacySettings} that we are building.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"jeffreygohkw"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettingsBuilder setRemarkPrivate(String remark) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"jeffreygohkw"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(true);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"jeffreygohkw"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"jeffreygohkw"},"content":" pps.setRemarkIsPrivate(false);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"jeffreygohkw"},"content":" } else {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"jeffreygohkw"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"jeffreygohkw"},"content":" return this;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"jeffreygohkw"},"content":" public PersonPrivacySettings build() {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"jeffreygohkw"},"content":" return pps;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":106}},{"path":"src/test/java/seedu/address/testutil/PersonUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * A utility class for Person.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonUtil {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Returns an add command string for adding the {@code person}.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static String getAddCommand(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" return AddPersonCommand.COMMAND_WORD + \" \" + getPersonDetails(person);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" * Returns the part of command string for the given {@code person}\u0027s details.","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static String getPersonDetails(ReadOnlyPerson person) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" sb.append(PREFIX_NAME + person.getName().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" sb.append(PREFIX_PHONE + person.getPhone().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" sb.append(PREFIX_EMAIL + person.getEmail().value + \" \");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" sb.append(PREFIX_ADDRESS + person.getAddress().value + \" \");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_REMARK + person.getRemark().value + \" \");","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" sb.append(PREFIX_AVATAR + person.getAvatar().value + \" \");","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" person.getTags().stream().forEach(","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" s -\u003e sb.append(PREFIX_TAG + s.tagName + \" \")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" );","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"jeffreygohkw":1,"Esilocke":2,"-":35}},{"path":"src/test/java/seedu/address/testutil/TaskBuilder.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Assignees;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Deadline;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Description;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Priority;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskAddress;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.TaskName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" * A utility class to help with building Task objects.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"public class TaskBuilder {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_NAME \u003d \"Buy pencil\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DESCRIPTION \u003d \"Buy a pencil from ABS by tomorrow\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_DEADLINE \u003d \"04-04-2017\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_PRIORITY \u003d \"4\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" public static final String DEFAULT_ADDRESS \u003d \"12 Kent Ridge Crescent, 119275\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" private Task task;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" TaskName defaultTaskName \u003d new TaskName(DEFAULT_NAME);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" Description defaultDescription \u003d new Description(DEFAULT_DESCRIPTION);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" Deadline defaultDeadline \u003d new Deadline(DEFAULT_DEADLINE);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" Priority defaultPriority \u003d new Priority(DEFAULT_PRIORITY);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" Assignees defaultAssignees \u003d new Assignees();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" Boolean defaultState \u003d false;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" TaskAddress defaultAddress \u003d new TaskAddress(DEFAULT_ADDRESS);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(defaultTaskName, defaultDescription, defaultDeadline, defaultPriority,","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" defaultAssignees, defaultState, defaultAddress);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" throw new AssertionError(\"Default task\u0027s values are invalid.\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" * Initializes the TaskBuilder with the data of {@code taskToCopy}.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder(ReadOnlyTask taskToCopy) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" this.task \u003d new Task(taskToCopy);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskName} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskName(String name) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskName(new TaskName(name));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"name is expected to be unique.\");","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Priority} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withPriority(String priority) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" this.task.setPriority(new Priority(priority));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"priority is expected to be unique.\");","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Description} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDescription(String description) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":" this.task.setDescription(new Description(description));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"description is expected to be unique.\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Deadline} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withDeadline(String deadline) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" this.task.setDeadline(new Deadline(deadline));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"deadline is expected to be unique.\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" * Sets the state of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withState(boolean state) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" this.task.setState(state);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code TaskAddress} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withTaskAddress(String address) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"Esilocke"},"content":" this.task.setTaskAddress(new TaskAddress(address));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" throw new IllegalArgumentException(\"address is expected to be unique.\");","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" * Sets the {@code Assignees} of the {@code Task} that we are building.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"Esilocke"},"content":" public TaskBuilder withAssignees(String... args) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"Esilocke"},"content":" ArrayList\u003cIndex\u003e indexes \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" for (String s : args) {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"Esilocke"},"content":" indexes.add(Index.fromOneBased(Integer.parseInt(s)));","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"Esilocke"},"content":" this.task.setAssignees(new Assignees(indexes));","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"Esilocke"},"content":" return this;","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" public Task build() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"Esilocke"},"content":" return this.task;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":135}},{"path":"src/test/java/seedu/address/testutil/TaskUtil.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DEADLINE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TASK;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddTaskCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" * Utility class for Tasks","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"public class TaskUtil {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" * Returns an add command string for adding the {@code task}.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" public static String getAddCommand(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" return AddTaskCommand.COMMAND_WORD + \" \" + PREFIX_TASK + \" \" + getTaskDetails(task);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" * Returns the part of command string for the given {@code task}\u0027s details.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" public static String getTaskDetails(ReadOnlyTask task) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_NAME + task.getTaskName().taskName + \" \");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DESCRIPTION + task.getDescription().value + \" \");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_DEADLINE + task.getDeadline().value + \" \");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_PRIORITY + Integer.toString(task.getPriority().value) + \" \");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" sb.append(PREFIX_ADDRESS + task.getTaskAddress().taskAddress + \" \");","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":38}},{"path":"src/test/java/seedu/address/testutil/TypicalAddressBook.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a sample {@code AddressBook} to be used in tests.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"public class TypicalAddressBook {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" private TypicalAddressBook() {} // prevents instantiation","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : TypicalPersons.getTypicalPersons()) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : TypicalTasks.getTypicalTasks()) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":33}},{"path":"src/test/java/seedu/address/testutil/TypicalIndexes.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Index} objects to be used in tests.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class TypicalIndexes {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Index INDEX_FIRST_PERSON \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Index INDEX_SECOND_PERSON \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Index INDEX_THIRD_PERSON \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_FIRST_TASK \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_SECOND_TASK \u003d Index.fromOneBased(2);","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":" public static final Index INDEX_THIRD_TASK \u003d Index.fromOneBased(3);","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":4,"-":12}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_CHRIS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_CHRIS;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_FAVOURITE_ALICE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_CHRIS;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_CHRIS;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_CHRIS;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_CHRISTAG;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"wangyiming1019"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"public class TypicalPersons {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(\"85355255\").withFavourite(\"false\").withRemark(\"Alice from wonderland\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\").withFavourite(\"false\")","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(\"Teammate\").withTags(\"owesMoney\", \"friends\").build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" // Manually added","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").withFavourite(\"false\").build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_AMY)","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final ReadOnlyPerson BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"wangyiming1019"},"content":" //@@author wangyiming1019","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS).withEmail(VALID_EMAIL_CHRIS)","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"wangyiming1019"},"content":" .withAddress(VALID_ADDRESS_CHRIS).withFavourite(VALID_FAVOURITE_ALICE)","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"wangyiming1019"},"content":" .withRemark(VALID_REMARK_CHRIS)","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"wangyiming1019"},"content":" .withTags(VALID_TAG_CHRISTAG).build();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"wangyiming1019"},"content":" public static final ReadOnlyPerson CHRIS_WITH_NEW_TAG \u003d new PersonBuilder().withName(VALID_NAME_CHRIS)","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"wangyiming1019"},"content":" .withPhone(VALID_PHONE_CHRIS)","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"wangyiming1019"},"content":" .withEmail(VALID_EMAIL_CHRIS).withAddress(VALID_ADDRESS_CHRIS)","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"wangyiming1019"},"content":" .withFavourite(VALID_FAVOURITE_ALICE).withRemark(VALID_REMARK_CHRIS)","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"wangyiming1019"},"content":" .withTags(\"friends\").build();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"wangyiming1019"},"content":" //@@author","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalPersonsAddressBook() {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" for (ReadOnlyPerson person : getTypicalPersons()) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" return ab;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTaglessAddressBook() {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyPerson person : getTaglessPersons()) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"Esilocke"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public static List\u003cReadOnlyPerson\u003e getTypicalPersons() {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyPerson\u003e getTaglessPersons() {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":4,"Esilocke":18,"wangyiming1019":32,"-":64}},{"path":"src/test/java/seedu/address/testutil/TypicalTasks.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"Esilocke"},"content":"//@@author Esilocke","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PAPER;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DEADLINE_PENCIL;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PAPER;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_DESCRIPTION_PENCIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PAPER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PRIORITY_PENCIL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PAPER;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_ADDRESS_PENCIL;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PAPER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TASK_NAME_PENCIL;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"Esilocke"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"Esilocke"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"import seedu.address.model.task.exceptions.DuplicateTaskException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" * A utility class containing a list of {@code Task} objects to be used in tests.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":"public class TypicalTasks {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ACCEPT \u003d new TaskBuilder().withTaskName(\"Acceptance Testing\")","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Perform acceptance testing on application\")","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"3\").withAssignees(\"4\")","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"21 Heng Mui Keng Terrace, #02-01-01 I-Cube Building\").build();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask BUY \u003d new TaskBuilder().withTaskName(\"Buy pencil\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Buy pencils for tomorrow\u0027s test\").withState(true)","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"5\").withTaskAddress(\"Tampines Mall\").build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask COOK \u003d new TaskBuilder().withTaskName(\"Cook Paella\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Cook Paella for 4 people tonight\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"11-04-2016\").withPriority(\"5\").withState(true).withTaskAddress(\"27 Prince George\u0027s Park\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" .build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask DATE \u003d new TaskBuilder().withTaskName(\"Date with Lucy\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Sunday, 10am at Central Park\")","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-05-2015\").withPriority(\"5\").withTaskAddress(\"Central Park\").build();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask ESCAPE \u003d new TaskBuilder().withTaskName(\"Escape dungeon\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Escape dungeon group formation\")","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"04-04-2017\").withPriority(\"1\").withTaskAddress(\"16 Gemmill Ln\").build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask FREE \u003d new TaskBuilder().withTaskName(\"Free memory space\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Implement new version of free()\")","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"21-08-2019\").withPriority(\"2\").withState(true).withAssignees(\"1\", \"2\", \"3\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"NUS School of Computing, COM1, 13 Computing Drive, 117417\").build();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask GRADLE \u003d new TaskBuilder().withTaskName(\"Resolve gradle\")","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"Esilocke"},"content":" .withDescription(\"Resolve gradle problems when building project\")","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"Esilocke"},"content":" .withDeadline(\"06-06-2016\").withPriority(\"5\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(\"Changi Airport\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"Esilocke"},"content":" // Manually added - Task\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PENCIL \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PENCIL)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PENCIL)","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PENCIL).withPriority(VALID_PRIORITY_PENCIL)","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PENCIL).build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" public static final ReadOnlyTask PAPER \u003d new TaskBuilder().withTaskName(VALID_TASK_NAME_PAPER)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":" .withDescription(VALID_DESCRIPTION_PAPER)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"Esilocke"},"content":" .withDeadline(VALID_DEADLINE_PAPER).withPriority(VALID_PRIORITY_PAPER)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" .withTaskAddress(VALID_TASK_ADDRESS_PAPER).build();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"Esilocke"},"content":" public static final String KEYWORD_MATCHING_LUCY \u003d \"Lucy\"; // A keyword that matches LUCY","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"Esilocke"},"content":" private TypicalTasks() {} // prevents instantiation","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"Esilocke"},"content":" /**","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"Esilocke"},"content":" public static AddressBook getTypicalTasksOnlyAddressBook() {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" for (ReadOnlyTask task : getTypicalTasks()) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" try {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"Esilocke"},"content":" ab.addTask(task);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"Esilocke"},"content":" } catch (DuplicateTaskException e) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"Esilocke"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"Esilocke"},"content":" return ab;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"Esilocke"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"Esilocke"},"content":" public static List\u003cReadOnlyTask\u003e getTypicalTasks() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ACCEPT, BUY, COOK, DATE, ESCAPE, FREE, GRADLE));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":86}},{"path":"src/test/java/seedu/address/ui/BrowserPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_PREFIX;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_DIRECTIONS_SUFFIX;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_PREFIX;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"jeffreygohkw"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_MAPS_URL_SUFFIX;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelLocateEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.events.ui.BrowserPanelNavigateEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"jeffreygohkw"},"content":"import seedu.address.model.Location;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"public class BrowserPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private PersonPanelSelectionChangedEvent selectionChangedEventStub;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelLocateEvent panelLocateEventStub;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"jeffreygohkw"},"content":" private BrowserPanelNavigateEvent panelNavigateEventStub;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private BrowserPanel browserPanel;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private BrowserPanelHandle browserPanelHandle;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"jeffreygohkw"},"content":" public void setUp() throws IllegalValueException {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" selectionChangedEventStub \u003d new PersonPanelSelectionChangedEvent(new PersonCard(ALICE,","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"jeffreygohkw"},"content":" panelLocateEventStub \u003d new BrowserPanelLocateEvent(BOB);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"jeffreygohkw"},"content":" panelNavigateEventStub \u003d new BrowserPanelNavigateEvent(new Location(\"NUS\"),","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"jeffreygohkw"},"content":" new Location(BENSON.getAddress().toString()));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e browserPanel \u003d new BrowserPanel());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(browserPanel);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" browserPanelHandle \u003d new BrowserPanelHandle(browserPanel.getRoot());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"jeffreygohkw"},"content":" //@@author jeffreygohkw","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"jeffreygohkw"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"jeffreygohkw"},"content":" public void display() throws Exception {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"jeffreygohkw"},"content":" // default web page","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDefaultPageUrl \u003d MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDefaultPageUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelLocateEventStub);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedMapUrl \u003d new URL(GOOGLE_MAPS_URL_PREFIX","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"jeffreygohkw"},"content":" + BOB.getAddress().toString().replaceAll(\" \", \"+\") + GOOGLE_MAPS_URL_SUFFIX","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"jeffreygohkw"},"content":" + \"?dg\u003ddbrw\u0026newdg\u003d1\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedMapUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"jeffreygohkw"},"content":" // google maps page of a person","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"jeffreygohkw"},"content":" postNow(panelNavigateEventStub);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"jeffreygohkw"},"content":" URL expectedDirUrl \u003d new URL(GOOGLE_MAPS_DIRECTIONS_PREFIX","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026origin\u003d\"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getFromLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"jeffreygohkw"},"content":" + \"\u0026destination\u003d\"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"jeffreygohkw"},"content":" + panelNavigateEventStub.getToLocation().toString().replaceAll(\"#(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"jeffreygohkw"},"content":" .replaceAll(\" \", \"+\").replaceAll(\"-(\\\\w+)\\\\s*\", \"\")","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"jeffreygohkw"},"content":" + GOOGLE_MAPS_DIRECTIONS_SUFFIX);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"jeffreygohkw"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"jeffreygohkw"},"content":" waitUntilBrowserLoaded(browserPanelHandle);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedDirUrl, browserPanelHandle.getLoadedUrl());","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"jeffreygohkw"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"jeffreygohkw"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":2,"jeffreygohkw":47,"-":31}},{"path":"src/test/java/seedu/address/ui/PersonCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysPerson;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class PersonCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" //@@author charlesgoh","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" Person testPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(testPerson, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":" assertEquals(PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER, personCard.getFontSizeMultiplier());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" personCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(personCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(personCard.getFontSizeMultiplier(), PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" //@@author","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" // no tags","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(personWithNoTags, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithNoTags, 1);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" // with tags","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Person personWithTags \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" personCard \u003d new PersonCard(personWithTags, 2, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(personCard);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // changes made to Person reflects on card","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" guiRobot.interact(() -\u003e {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" personWithTags.setName(ALICE.getName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" personWithTags.setAddress(ALICE.getAddress());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" personWithTags.setEmail(ALICE.getEmail());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" personWithTags.setPhone(ALICE.getPhone());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" personWithTags.setTags(ALICE.getTags());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertCardDisplay(personCard, personWithTags, 2);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" PersonCard personCard \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" // same person, same index -\u003e returns true","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" PersonCard copy \u003d new PersonCard(person, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(copy));","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertTrue(personCard.equals(personCard));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(null));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(personCard.equals(0));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(differentPerson, 0, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" // same person, different index -\u003e returns false","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":" assertFalse(personCard.equals(new PersonCard(person, 1, PersonCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PersonCard personCard, ReadOnlyPerson expectedPerson, int expectedId) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" PersonCardHandle personCardHandle \u003d new PersonCardHandle(personCard.getRoot());","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertEquals(Integer.toString(expectedId) + \". \", personCardHandle.getId());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" // verify person details are displayed correctly","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(expectedPerson, personCardHandle);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":30,"-":78}},{"path":"src/test/java/seedu/address/ui/StatusBarFooterTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.time.Clock;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.time.Instant;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.time.ZoneId;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.AfterClass;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class StatusBarFooterTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String STUB_SAVE_LOCATION \u003d \"Stub\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String RELATIVE_PATH \u003d \"./\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final AddressBookChangedEvent EVENT_STUB \u003d new AddressBookChangedEvent(new AddressBook());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final Clock originalClock \u003d StatusBarFooter.getClock();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Clock injectedClock \u003d Clock.fixed(Instant.now(), ZoneId.systemDefault());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private StatusBarFooterHandle statusBarFooterHandle;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void setUpBeforeClass() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" // inject fixed clock","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(injectedClock);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @AfterClass","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static void tearDownAfterClass() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" // restore original clock","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" StatusBarFooter.setClock(originalClock);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" StatusBarFooter sbf \u003d new StatusBarFooter(STUB_SAVE_LOCATION, EVENT_STUB.data.getPersonList().size());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(sbf);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" statusBarFooterHandle \u003d new StatusBarFooterHandle(sbf.getRoot());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" // initial state","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION, SYNC_STATUS_INITIAL);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // after address book is updated","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" postNow(EVENT_STUB);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertStatusBarContent(RELATIVE_PATH + STUB_SAVE_LOCATION,","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" String.format(SYNC_STATUS_UPDATED, new Date(injectedClock.millis()).toString()));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Asserts that the save location matches that of {@code expectedSaveLocation}, and the","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * sync status matches that of {@code expectedSyncStatus}.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void assertStatusBarContent(String expectedSaveLocation, String expectedSyncStatus) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedSaveLocation, statusBarFooterHandle.getSaveLocation());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, statusBarFooterHandle.getSyncStatus());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"-":72}},{"path":"src/test/java/seedu/address/ui/TaskCardTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"Esilocke"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.Task;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.testutil.TaskBuilder;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"public class TaskCardTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":" public void editFontSizeTests() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" int fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":" Task testTask \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(testTask, 1, fontSizeMultiplier);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" assertEquals(TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER, taskCard.getFontSizeMultiplier());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier + 1);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"charlesgoh"},"content":" // Verify font size increase","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER + 1;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" // Verify font size decrease","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" fontSizeMultiplier \u003d TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER - 1;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" taskCard.setFontSizeMultiplier(fontSizeMultiplier);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(taskCard.getFontSizeMultiplier(), fontSizeMultiplier);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertNotEquals(taskCard.getFontSizeMultiplier(), TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" // no tags","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" Task taskWithNoTags \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(taskWithNoTags, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskCard);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplay(taskCard, taskWithNoTags, 1);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" Task task \u003d new TaskBuilder().build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" TaskCard taskCard \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" // same task, same index -\u003e returns true","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" TaskCard copy \u003d new TaskCard(task, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(copy));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertTrue(taskCard.equals(taskCard));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(null));","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(0));","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" // different task, same index -\u003e returns false","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" Task differentTask \u003d new TaskBuilder().withTaskName(\"differentName\").build();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(differentTask, 0, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" // same task, different index -\u003e returns false","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" assertFalse(taskCard.equals(new TaskCard(task, 1, TaskCard.DEFAULT_FONT_SIZE_MULTIPLIER)));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code taskCard} displays the details of {@code expectedTask} correctly and matches","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"charlesgoh"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"charlesgoh"},"content":" private void assertCardDisplay(TaskCard taskCard, ReadOnlyTask expectedTask, int expectedId) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle taskCardHandle \u003d new TaskCardHandle(taskCard.getRoot());","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"charlesgoh"},"content":" // verify id is displayed correctly","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(expectedId) + \". \", taskCardHandle.getId());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"charlesgoh"},"content":" // verify task details are displayed correctly","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, taskCardHandle);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":89,"Esilocke":1}},{"path":"src/test/java/seedu/address/ui/TaskListPanelTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"charlesgoh"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"charlesgoh"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.testutil.TypicalTasks.getTypicalTasks;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardDisplaysTask;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertCardEquals;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskListPanelHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.commons.events.ui.JumpToListRequestTaskEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":"//author charlesgoh","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"charlesgoh"},"content":"public class TaskListPanelTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"charlesgoh"},"content":" private static final ObservableList\u003cReadOnlyTask\u003e TYPICAL_TASKS \u003d","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"charlesgoh"},"content":" FXCollections.observableList(getTypicalTasks());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"Esilocke"},"content":" private static final JumpToListRequestTaskEvent JUMP_TO_SECOND_EVENT \u003d new","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" JumpToListRequestTaskEvent(INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":" private TaskListPanelHandle taskListPanelHandle;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" @Before","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" TaskListPanel taskListPanel \u003d new TaskListPanel(TYPICAL_TASKS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" uiPartRule.setUiPart(taskListPanel);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle \u003d new TaskListPanelHandle(getChildNode(taskListPanel.getRoot(),","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" TaskListPanelHandle.TASK_LIST_VIEW_ID));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" public void display() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" for (int i \u003d 0; i \u003c TYPICAL_TASKS.size(); i++) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":" taskListPanelHandle.navigateToCard(TYPICAL_TASKS.get(i));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyTask expectedTask \u003d TYPICAL_TASKS.get(i);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle actualCard \u003d taskListPanelHandle.getTaskCardHandle(i);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" assertCardDisplaysTask(expectedTask, actualCard);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" assertEquals(Integer.toString(i + 1) + \". \", actualCard.getId());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" public void handleJumpToListRequestTaskEvent() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" postNow(JUMP_TO_SECOND_EVENT);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle expectedCard \u003d taskListPanelHandle.getTaskCardHandle(INDEX_SECOND_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" TaskCardHandle selectedCard \u003d taskListPanelHandle.getHandleToSelectedCard();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertCardEquals(expectedCard, selectedCard);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":"}","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true}],"authorContributionMap":{"charlesgoh":57,"Esilocke":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UiPartTest {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileUrlThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((URL) null);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileUrlThrowsAssertionError() throws Exception {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(missingFileUrl);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileUrlThrowsAssertionError() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(invalidFileUrl);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"charlesgoh"},"content":" public void constructor_validFileUrlLoadsFile() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"charlesgoh"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"charlesgoh"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public void constructor_nullFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e((String) null);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":" public void constructor_missingFileNameThrowsNullPointerException() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"charlesgoh"},"content":" public void constructor_invalidFileNameThrowsAssertionError() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" thrown.expect(AssertionError.class);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return testFileUrl;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * UiPart used for testing.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" super(fxmlFileName);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":22,"-":80}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"charlesgoh"},"content":"import guitests.guihandles.TaskCardHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"charlesgoh"},"content":"import seedu.address.model.task.ReadOnlyTask;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"public class GuiTestAssert {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for person cards.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getAddress(), actualCard.getAddress());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getEmail(), actualCard.getEmail());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getPhone(), actualCard.getPhone());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard} for task cards.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardEquals(TaskCardHandle expectedCard, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getTaskName(), actualCard.getTaskName());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDescription(), actualCard.getDescription());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getDeadline(), actualCard.getDeadline());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedCard.getPriority(), actualCard.getPriority());","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(ReadOnlyPerson expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"jeffreygohkw"},"content":" assertEquals(expectedPerson.getName().value, actualCard.getName());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualCard.getPhone());","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualCard.getEmail());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().value, actualCard.getAddress());","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getTags().stream().map(tag -\u003e tag.tagName).collect(Collectors.toList()),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" actualCard.getTags());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"charlesgoh"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"charlesgoh"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedTask}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"charlesgoh"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"charlesgoh"},"content":" public static void assertCardDisplaysTask(ReadOnlyTask expectedTask, TaskCardHandle actualCard) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getTaskName().taskName, actualCard.getTaskName());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDescription().value, actualCard.getDescription());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"charlesgoh"},"content":" assertEquals(expectedTask.getDeadline().value, actualCard.getDeadline());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"Esilocke"},"content":" assertEquals(expectedTask.getPriority().toString(), actualCard.getPriority());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, ReadOnlyPerson... persons) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cReadOnlyPerson\u003e persons) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new ReadOnlyPerson[0]));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":23,"jeffreygohkw":1,"Esilocke":1,"-":71}},{"path":"src/test/java/systemtests/AddPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.AddPersonCommand;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"Esilocke"},"content":"public class AddPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void add() throws Exception {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * -\u003e added","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" ReadOnlyPerson toAdd \u003d AMY;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + AddPersonCommand.COMMAND_WORD + \" \" + NAME_DESC_AMY + \" \" + PHONE_DESC_AMY + \" \"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + \" \" + ADDRESS_DESC_AMY + \" \" + REMARK_DESC_AMY + \" \" + TAG_DESC_FRIEND + \" \";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"charlesgoh"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, AddPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" public void addSecondTest() throws Exception {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"charlesgoh"},"content":" public void addThirdTest() throws Exception {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_AMY).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" /* Case: add a person with all fields same as another person in the address book except remark -\u003e added */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" .withAddress(VALID_ADDRESS_AMY).withRemark(VALID_REMARK_BOB).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"charlesgoh"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size()","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" \u003c getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"charlesgoh"},"content":" public void addFourthTest() throws Exception {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson toAdd;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"charlesgoh"},"content":" + REMARK_DESC_BOB + TAG_DESC_HUSBAND + EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" 1\");","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assert getPersonListPanel().isAnyCardSelected();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"charlesgoh"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"Esilocke"},"content":" command \u003d AddPersonCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" + ADDRESS_DESC_AMY + REMARK_DESC_AMY + INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"Esilocke"},"content":" * Executes the {@code AddPersonCommand} that adds {@code toAdd} to the model and verifies that the command box","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"Esilocke"},"content":" * displays an empty string, the result display box displays the success message of executing","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"Esilocke"},"content":" * {@code AddPersonCommand} with the details of {@code toAdd}, and the model related components equal to the","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"Esilocke"},"content":" * current model added with {@code toAdd}.","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class, the status bar\u0027s sync status changes,","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" * the browser url and selected card remains unchanged.","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(ReadOnlyPerson)}. Executes {@code command}","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" * instead.","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(ReadOnlyPerson)","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, ReadOnlyPerson toAdd) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(AddPersonCommand.MESSAGE_SUCCESS, toAdd);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, ReadOnlyPerson)} except that the result","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * display box displays {@code expectedResultMessage} and the model related components equal to","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" * {@code expectedModel}.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"Esilocke"},"content":" * @see AddPersonCommandSystemTest#assertCommandSuccess(String, ReadOnlyPerson)","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":50,"Esilocke":30,"-":192}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static guitests.guihandles.WebViewUtil.waitUntilBrowserLoaded;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.DEFAULT_PAGE;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_PREFIX;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.BrowserPanel.GOOGLE_SEARCH_URL_SUFFIX;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.ui.UiPart.FXML_FILE_FOLDER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import guitests.guihandles.BrowserPanelHandle;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * for test verification.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @ClassRule","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initializeStage();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public BrowserPanelHandle getBrowserPanel() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" return mainWindowHandle.getBrowserPanel();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" rememberStates();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" waitUntilBrowserLoaded(getBrowserPanel());","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * Displays all persons in the address book.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" protected void showAllPersons() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d getModel().getFilteredPersonList().size();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive).","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" executeCommand(FindPersonCommand.COMMAND_WORD + \" \" + keyword);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" assert getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"Esilocke"},"content":" executeCommand(SelectPersonCommand.COMMAND_WORD + \" \" + index.getOneBased());","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assert getPersonListPanel().getSelectedCardIndex() \u003d\u003d index.getZeroBased();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly.","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * their current state.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" private void rememberStates() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" getBrowserPanel().rememberUrl();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" * of the previously selected person.","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" String selectedCardName \u003d getPersonListPanel().getHandleToSelectedCard().getName();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" URL expectedUrl;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" expectedUrl \u003d new URL(GOOGLE_SEARCH_URL_PREFIX + selectedCardName.replaceAll(\" \", \"+\")","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" + GOOGLE_SEARCH_URL_SUFFIX);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" } catch (MalformedURLException mue) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" throw new AssertionError(\"URL expected to be valid.\");","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" //TODO Might need to remove this as the person panel no longer involves google search.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"Esilocke"},"content":" //assertEquals(expectedUrl, getBrowserPanel().getLoadedUrl());","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" * @see BrowserPanelHandle#isUrlChanged()","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertFalse(getBrowserPanel().isUrlChanged());","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style.","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same.","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" assertEquals(MainApp.class.getResource(FXML_FILE_FOLDER + DEFAULT_PAGE), getBrowserPanel().getLoadedUrl());","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model.","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":6,"-":260}},{"path":"src/test/java/systemtests/ClearCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class ClearCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void clear() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" final Model defaultModel \u003d getModel();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"Esilocke"},"content":" /* Case: clear non-empty address book, command with leading spaces and trailing","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * spaces -\u003e cleared","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(\" \" + ClearCommand.COMMAND_WORD + \" \");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" /* Case: undo clearing address book -\u003e original address book restored */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" String command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(UndoCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, defaultModel);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: redo clearing address book -\u003e cleared */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"charlesgoh"},"content":" public void clearTestTwo() throws Exception {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /* Case: selects first card in person list and clears address book -\u003e cleared and no card selected */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /* Case: filters the person list before clearing -\u003e entire address book cleared */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" executeCommand(UndoCommand.COMMAND_WORD); // restores the original address book","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /* Case: clear empty address book -\u003e cleared */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertCommandFailure(\"ClEaR\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * box displays {@code ClearCommand#MESSAGE_SUCCESS} and the model related components equal to an empty model.","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar\u0027s sync status changes.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(ClearCommand.MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"Esilocke"},"content":" assertCommandSuccess(command, expectedResultMessage, new ModelManager());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String)} except that the result box displays","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage} and the model related components equal to {@code expectedModel}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @see ClearCommandSystemTest#assertCommandSuccess(String)","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, String expectedResultMessage, Model expectedModel) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":3,"Esilocke":5,"-":97}},{"path":"src/test/java/systemtests/DeletePersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.DeletePersonCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getLastIndex;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getMidIndex;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TestUtil.getPerson;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class DeletePersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String MESSAGE_INVALID_DELETE_COMMAND_FORMAT \u003d","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, DeletePersonCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void delete() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" /* ----------------- Performing delete operation while an unfiltered list is being shown -------------------- */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /* Case: delete the first person in the list, command with leading spaces and trailing spaces -\u003e deleted */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + DeletePersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /* Case: delete the last person in the list -\u003e deleted */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" Model modelBeforeDeletingLast \u003d getModel();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index lastPersonIndex \u003d getLastIndex(modelBeforeDeletingLast);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertCommandSuccess(lastPersonIndex);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /* Case: undo deleting the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: redo deleting the last person in the list -\u003e last person deleted again */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" removePerson(modelBeforeDeletingLast, lastPersonIndex);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, modelBeforeDeletingLast, expectedResultMessage);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: delete the middle person in the list -\u003e deleted */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" Index middlePersonIndex \u003d getMidIndex(getModel());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(middlePersonIndex);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ------------------ Performing delete operation while a filtered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book and person list -\u003e deleted */","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" assertCommandSuccess(index);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /* Case: filtered person list, delete index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + invalidIndex;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /* --------------------- Performing delete operation while a person card is selected ------------------------ */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: delete the selected person -\u003e person list panel selects the person before the deleted person */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Index selectedIndex \u003d getLastIndex(expectedModel);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" Index expectedIndex \u003d Index.fromZeroBased(selectedIndex.getZeroBased() - 1);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" selectPerson(selectedIndex);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + selectedIndex.getOneBased();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" deletedPerson \u003d removePerson(expectedModel, selectedIndex);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, expectedIndex);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid delete operation ------------------------------------ */","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" 0\";","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" -1\";","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" Index outOfBoundsIndex \u003d Index.fromOneBased(","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" getModel().getAddressBook().getPersonList().size() + 1);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" command \u003d DeletePersonCommand.COMMAND_WORD + \" \" + outOfBoundsIndex.getOneBased();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(DeletePersonCommand.COMMAND_WORD + \" 1 abc\", MESSAGE_INVALID_DELETE_COMMAND_FORMAT);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertCommandFailure(\"DelETE 1\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Removes the {@code ReadOnlyPerson} at the specified {@code index} in {@code model}\u0027s address book.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * @return the removed person","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" private ReadOnlyPerson removePerson(Model model, Index index) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" ReadOnlyPerson targetPerson \u003d getPerson(model, index);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" model.deletePerson(targetPerson);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" throw new AssertionError(\"targetPerson is retrieved from model.\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" return targetPerson;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" * Deletes the person at {@code toDelete} by creating a default {@code DeletePersonCommand} using","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" * {@code toDelete} and performs the same verification as {@code assertCommandSuccess(String, Model, String)}.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Index toDelete) {","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" ReadOnlyPerson deletedPerson \u003d removePerson(expectedModel, toDelete);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"Esilocke"},"content":" String expectedResultMessage \u003d String.format(MESSAGE_SUCCESS, deletedPerson);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertCommandSuccess(","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"Esilocke"},"content":" DeletePersonCommand.COMMAND_WORD + \" \" + toDelete.getOneBased(),","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"Esilocke"},"content":" expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card remains unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String)} except that the browser url","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * and selected card are expected to update accordingly depending on the card at {@code expectedSelectedCardIndex}.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" * @see DeletePersonCommandSystemTest#assertCommandSuccess(String, Model, String)","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":21,"-":180}},{"path":"src/test/java/systemtests/EditPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_AMY;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.REMARK_DESC_BOB;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"charlesgoh"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.EditPersonCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.model.person.ReadOnlyPerson;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"Esilocke"},"content":"public class EditPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" * -\u003e edited","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"charlesgoh"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + REMARK_DESC_BOB","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"charlesgoh"},"content":" + \" \" + TAG_DESC_HUSBAND + \" \";","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRemark(VALID_REMARK_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":" .withTags(VALID_TAG_HUSBAND).build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" model.updatePerson(","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" ReadOnlyPerson personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"charlesgoh"},"content":" public void editThree() throws Exception {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"charlesgoh"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"charlesgoh"},"content":" public void editFourth() throws Exception {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"charlesgoh"},"content":" int invalidIndex;","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * browser url changes","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" selectPerson(index);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + REMARK_DESC_AMY + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"Esilocke"},"content":" //TODO rewrite GUI check for this as select no longer displays google searches","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"charlesgoh"},"content":" public void editFive() throws Exception {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"Esilocke"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"Esilocke"},"content":" EditPersonCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"Esilocke"},"content":" + INVALID_NAME_DESC, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"Esilocke"},"content":" + INVALID_PHONE_DESC, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"Esilocke"},"content":" + INVALID_EMAIL_DESC, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"charlesgoh"},"content":" public void editSix() throws Exception {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"charlesgoh"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"charlesgoh"},"content":" Index index;","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson personToEdit;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"charlesgoh"},"content":" ReadOnlyPerson editedPerson;","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(EditPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased()","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"Esilocke"},"content":" + INVALID_TAG_DESC, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"Esilocke"},"content":" command \u003d EditPersonCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"Esilocke"},"content":" + EMAIL_DESC_BOB + ADDRESS_DESC_BOB + REMARK_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(command, EditPersonCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, ReadOnlyPerson, Index)} except that","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Index, ReadOnlyPerson, Index)","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson) {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"Esilocke"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditPersonCommand}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, ReadOnlyPerson editedPerson,","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"Esilocke"},"content":" String.format(EditPersonCommand.MESSAGE_SUCCESS, editedPerson), expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"Esilocke"},"content":" * @see EditPersonCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":49,"Esilocke":40,"-":233}},{"path":"src/test/java/systemtests/FindPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_PERSONS_LISTED_OVERVIEW;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BENSON;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.DANIEL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.DeletePersonCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.FindPersonCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"Esilocke"},"content":"public class FindPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void find() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER + \" \";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL); // first names of Benson and Daniel are \"Meier\"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" /* Case: repeat previous find command where person list is displaying the persons we are finding","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /* Case: find person where person list is not displaying the person we are finding -\u003e 1 person found */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Carl\";","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, CARL);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords -\u003e 2 persons found */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Benson Daniel\";","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords in reversed order -\u003e 2 persons found */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 keywords with 1 repeat -\u003e 2 persons found */","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson Daniel\";","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /* Case: find multiple persons in address book, 2 matching keywords and 1 non-matching keyword","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * -\u003e 2 persons found","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel Benson NonMatchingKeyWord\";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: undo previous find command -\u003e rejected */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" /* Case: redo previous find command -\u003e rejected */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: find same persons in address book after deleting 1 of them -\u003e 1 person found */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" executeCommand(DeletePersonCommand.COMMAND_WORD + \" 1\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assert !getModel().getAddressBook().getPersonList().contains(BENSON);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is same as name but of different case -\u003e 1 person found */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" MeIeR\";","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" /* Case: find person in address book, keyword is substring of name -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mei\";","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: find person in address book, name is substring of keyword -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Meiers\";","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: find person not in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Mark\";","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /* Case: find phone number of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getPhone().value;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: find address of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getAddress().value;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" /* Case: find email of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + DANIEL.getEmail().value;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /* Case: find tags of person in address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cTag\u003e tags \u003d new ArrayList\u003c\u003e(DANIEL.getTags());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + tags.get(0).tagName;","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: find while a person is selected -\u003e selected card deselected */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"jeffreygohkw"},"content":" assert !getPersonListPanel().getHandleToSelectedCard().getName().equals(DANIEL.getName().value);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" Daniel\";","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertSelectedCardDeselected();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: find person in empty address book -\u003e 0 persons found */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"Esilocke"},"content":" command \u003d FindPersonCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" ModelHelper.setFilteredList(expectedModel, DANIEL);","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" command \u003d \"FiNd Meier\";","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandFailure(command, MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * box displays {@code Messages#MESSAGE_PERSONS_LISTED_OVERVIEW} with the number of people in the filtered list,","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the model related components equal to {@code expectedModel}.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" * Also verifies that the status bar remains unchanged, and the command box has the default style class, and the","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" * selected card updated accordingly, depending on {@code cardStatus}.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" MESSAGE_PERSONS_LISTED_OVERVIEW, expectedModel.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"jeffreygohkw":1,"Esilocke":22,"-":173}},{"path":"src/test/java/systemtests/SelectPersonCommandSystemTest.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"Esilocke"},"content":"import static seedu.address.logic.commands.SelectPersonCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalPersons;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"Esilocke"},"content":"import seedu.address.logic.commands.SelectPersonCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"Esilocke"},"content":"public class SelectPersonCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void select() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /* Case: select the first card in the person list, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" * -\u003e selected","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"Esilocke"},"content":" String command \u003d \" \" + SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + \" \";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /* Case: select the last card in the person list -\u003e selected */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + personCount.getOneBased();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, personCount);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /* Case: undo previous selection -\u003e rejected */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /* Case: redo selecting last card in the list -\u003e rejected */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_FAILURE;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertCommandFailure(command, expectedResultMessage);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"charlesgoh"},"content":" public void selectSecondTest() throws Exception {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* Case: select the middle card in the person list -\u003e selected */","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Index middleIndex \u003d Index.fromOneBased(personCount.getOneBased() / 2);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + middleIndex.getOneBased();","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" /* Case: select the current selected card -\u003e selected */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, middleIndex);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + invalidIndex,","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"Esilocke"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"charlesgoh"},"content":" public void selectThirdTest() throws Exception {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /* Case: filtered person list, select index within bounds of address book and person list -\u003e selected */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Index validIndex \u003d Index.fromOneBased(1);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assert validIndex.getZeroBased() \u003c getModel().getFilteredPersonList().size();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"Esilocke"},"content":" command \u003d SelectPersonCommand.COMMAND_WORD + \" \" + validIndex.getOneBased();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, validIndex);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + 0,","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + -1,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (alphabets) -\u003e rejected */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" abc\",","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"charlesgoh"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"charlesgoh"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"charlesgoh"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"charlesgoh"},"content":" public void selectFourthTest() throws Exception {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"charlesgoh"},"content":" String command;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"charlesgoh"},"content":" Index personCount \u003d Index.fromOneBased(getTypicalPersons().size());","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" /* Case: invalid arguments (extra argument) -\u003e rejected */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" 1 abc\",","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"Esilocke"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SelectPersonCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /* Case: mixed case command word -\u003e rejected */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" assertCommandFailure(\"SeLeCt 1\", MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" /* Case: select from empty address book -\u003e rejected */","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" assert getModel().getAddressBook().getPersonList().size() \u003d\u003d 0;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"Esilocke"},"content":" assertCommandFailure(SelectPersonCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays an empty string, the result display","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * box displays the success message of executing select command with the {@code expectedSelectedCardIndex}","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * of the selected person, and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * Also verifies that the command box has the default style class and the status bar remain unchanged. The resulting","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * browser url and selected card will be verified if the current selected card and the card at","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex} are different.","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"Esilocke"},"content":" MESSAGE_SUCCESS, expectedSelectedCardIndex.getOneBased());","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" int preExecutionSelectedCardIndex \u003d getPersonListPanel().getSelectedCardIndex();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" if (preExecutionSelectedCardIndex \u003d\u003d expectedSelectedCardIndex.getZeroBased()) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * Executes {@code command} and verifies that the command box displays {@code command}, the result display","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * box displays {@code expectedResultMessage} and the model related components equal to the current model.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * These verifications are done by","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Also verifies that the browser url, selected card and status bar remain unchanged, and the command box has the","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" * error style.","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"charlesgoh":18,"Esilocke":21,"-":125}},{"path":"src/test/java/systemtests/SystemTestSetupHelper.java","fileType":"test","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.concurrent.TimeoutException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.testfx.api.FxToolkit;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * Contains helper methods that system tests require.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public class SystemTestSetupHelper {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Sets up the {@code TestApp} and returns it.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public TestApp setupApplication() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"Esilocke"},"content":" FxToolkit.setupApplication(() -\u003e testApp \u003d new TestApp(TypicalPersons::getTypicalPersonsAddressBook,","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" TestApp.SAVE_LOCATION_FOR_TESTING));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Application takes too long to set up.\");","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return testApp;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Initializes the stage to be used by the tests.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static void initializeStage() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" FxToolkit.registerPrimaryStage();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" FxToolkit.hideStage();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" } catch (TimeoutException e) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" throw new AssertionError(e);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" * Encapsulates the stage initialized by {@code initializeStage} in a {@code MainWindowHandle} and returns it.","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public MainWindowHandle setupMainWindowHandle() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" FxToolkit.setupStage((stage) -\u003e {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d new MainWindowHandle(stage);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" mainWindowHandle.focus();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" FxToolkit.showStage();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to set up.\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" return mainWindowHandle;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" * Tears down existing stages.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void tearDownStage() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" FxToolkit.cleanupStages();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" } catch (TimeoutException te) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Stage takes too long to tear down.\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"Esilocke":1,"-":70}}] diff --git a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Delta_master/authorship.json b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Delta_master/authorship.json index 80092d24be..19367193b4 100644 --- a/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Delta_master/authorship.json +++ b/src/systemtest/resources/ConfigSystemTest/sinceBeginningDateRangeWithShallowCloning/expected/reposense_testrepo-Delta_master/authorship.json @@ -1 +1 @@ -[{"path":"README.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager"},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]"},{"lineNumber":3,"author":{"gitId":"-"},"content":""},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":"https://travis-ci.org/CS2103JAN2018-F14-B1/main[image:https://travis-ci.org/CS2103JAN2018-F14-B1/main.svg?branch\u003dmaster[Build Status]]"},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"https://ci.appveyor.com/project/lithiumlkid/main/branch/master[image:https://ci.appveyor.com/api/projects/status/2itvfqp2b8xnaqqn/branch/master?svg\u003dtrue[Build status]]"},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"https://coveralls.io/github/CS2103JAN2018-F14-B1/main?branch\u003dmaster[image:https://coveralls.io/repos/github/CS2103JAN2018-F14-B1/main/badge.svg?branch\u003dmaster[Coverage Status]]"},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"image:https://circleci.com/gh/CS2103JAN2018-F14-B1/main.svg?style\u003dsvg[\"CircleCI\", link\u003d\"https://circleci.com/gh/CS2103JAN2018-F14-B1/main\"]"},{"lineNumber":8,"author":{"gitId":"-"},"content":"https://gitter.im/se-edu/Lobby[image:https://badges.gitter.im/se-edu/Lobby.svg[Gitter chat]]"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"image::docs/images/MyTeamManagerLogo.png[width\u003d\"100\", align\u003d\"center\"]"},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]"},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/MyTeamManagerLogo.png[width\u003d\"600\", align\u003d\"center\"]"},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":19,"author":{"gitId":"-"},"content":"image::docs/images/Ui.png[width\u003d\"600\", align\u003d\"center\"]"},{"lineNumber":20,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"ifndef::env-github[]"},{"lineNumber":23,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\", align\u003d\"center\"]"},{"lineNumber":24,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction to MTM"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop based team managing application for football team managers. +"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"It uses a Command Line Interface (CLI)."},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"MTM is equipped with multiple features in helping you efficiently"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"and effectively manage your players, while keeping track of the team\u0027s schedule. +"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"With MTM\u0027s aesthetically pleasing graphical user interface, viewing critical information will be quick and painless."},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"Never lose track of your training schedule again! +"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"Say goodbye to manual tracking of information on excel sheet after excel sheet!"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"\u003d\u003d What MTM Can Do - Key Features"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"* Set up Teams"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"* Add Players to Teams"},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":"* Add Player\u0027s personal details, position, rating, avatar etc."},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"* View, Edit and Delete Players"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"* Sort players by field of choice"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":"Come and take a look at our \u003c\u003cUserGuide#, User Guide\u003e\u003e to get started with MTM now."},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e"},{"lineNumber":51,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e"},{"lineNumber":52,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e"},{"lineNumber":53,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":"* My Team Manager is morphed from https://github.com/se-edu/addressbook-level4[AddressBook-Level4] application, a project created by SE-EDU initiative."},{"lineNumber":58,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by"},{"lineNumber":59,"author":{"gitId":"-"},"content":"_Marco Jakob_."},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Libraries used: https://github.com/TomasMikula/EasyBind[EasyBind], https://github.com/TestFX/TestFX[TextFX], https://bitbucket.org/controlsfx/controlsfx/[ControlsFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/google/guava[Guava], https://github.com/junit-team/junit4[JUnit4]"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]"}],"authorContributionMap":{"lithiumlkid":5,"codeeong":16,"-":41}},{"path":"docs/DeveloperGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - Developer Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3"},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full"},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":11,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":12,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":13,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main/tree/master"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"By: `F14-B1`      Since: `Mar 2018`      Licence: `MIT`"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"// tag::overview[]"},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d Overview"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a team managing application for football coaches. MTM is designed to be quick and easy for you to manage a team of players without the need of a mouse."},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":"This developer\u0027s guide provides information that will not only show the design principles of the project, but allow you to understand the different implementations, and give you the opportunity to get started with being a contributor or as a reference for experienced developer."},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"This developer\u0027s guide consist of the following sections:"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cSetting up, Setting up\u003e\u003e"},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign, Design\u003e\u003e"},{"lineNumber":29,"author":{"gitId":"-"},"content":"* \u003c\u003cImplementation, Implementation\u003e\u003e"},{"lineNumber":30,"author":{"gitId":"-"},"content":"* \u003c\u003cDocumentation, Documentation\u003e\u003e"},{"lineNumber":31,"author":{"gitId":"-"},"content":"* \u003c\u003cTesting, Testing\u003e\u003e"},{"lineNumber":32,"author":{"gitId":"-"},"content":"* \u003c\u003cDev Ops, Dev Ops\u003e\u003e"},{"lineNumber":33,"author":{"gitId":"-"},"content":"// end::overview[]"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":"The following pointers teach you how to get started with developing on our application. You’ll learn how to prepare yourself with the project on IntelliJ and run it. Then, you’ll update configurations in IntelliJ to easily match the coding standards and you’ll be ready to start coding."},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":"But before you start, there are two fundamental prerequisites you should know about MTM:"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":"MTM is written in Java 8 and with the use of an integrated development environment (IDE) such as IntelliJ, it provides you as a developer with a better environment suited for developing MTM to maintain coding standards and provide continuous integration."},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":". You are required to have *JDK `1.8.0_60`* or later,"},{"lineNumber":46,"author":{"gitId":"-"},"content":"+"},{"lineNumber":47,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":48,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +"},{"lineNumber":49,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8. +"},{"lineNumber":50,"author":{"gitId":"-"},"content":"You can download Java 8 from link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151[here]."},{"lineNumber":51,"author":{"gitId":"-"},"content":"+"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":". and *IntelliJ* IDE."},{"lineNumber":54,"author":{"gitId":"-"},"content":"+"},{"lineNumber":55,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":56,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +"},{"lineNumber":57,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them. +"},{"lineNumber":58,"author":{"gitId":"-"},"content":"You can download IntelliJ from link:https://www.jetbrains.com/idea/download/#section\u003dwindows[here]."},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up the project on your computer"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":"Before you begin setting up the project, please ensure that you’ve done the following on our GitHub repository (repo)."},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":"Upon completion of forking from our GitHub repo, you can proceed to set up your project on IntelliJ."},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)"},{"lineNumber":70,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle"},{"lineNumber":71,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`"},{"lineNumber":72,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK"},{"lineNumber":73,"author":{"gitId":"-"},"content":". Click `Import Project`"},{"lineNumber":74,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`"},{"lineNumber":75,"author":{"gitId":"-"},"content":". Click `Open as Project`"},{"lineNumber":76,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings"},{"lineNumber":77,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message which will generate all resources required by the application and tests."},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":"Now that you’ve properly setup your project, you can verify that you have done everything properly."},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands"},{"lineNumber":84,"author":{"gitId":"-"},"content":". \u003c\u003cTesting,Run the tests\u003e\u003e to ensure they all pass."},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":"You have verified the setup and you’re all ready to dive into the code, but before you do, check out the following configurations that will help you make your coding more integrated and accurate."},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.adoc[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)"},{"lineNumber":95,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`"},{"lineNumber":96,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements"},{"lineNumber":99,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code."},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `se-edu/addressbook-level4` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `se-edu/addressbook-level4`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork."},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up."},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":"After setting up Travis, you can optionally set up coverage reporting for your team fork (see \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e)."},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":114,"author":{"gitId":"-"},"content":"Coverage reporting could be useful for a team repository that hosts the final version but it is not that useful for your personal fork."},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e)."},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":119,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Getting started with coding"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":"When you are ready to start coding,"},{"lineNumber":124,"author":{"gitId":"-"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading \u003c\u003cDesign-Architecture\u003e\u003e."},{"lineNumber":126,"author":{"gitId":"-"},"content":"2. Dive right in and get started with programming."},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":"\u003d\u003d Design"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"After you have successfully configured MTM, you are encouraged to read through the following section to understand the design of the software. The design section covers a high level overview the architecture and components of the software, as well as how common classes, configuration and logging throughout development are being used."},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":"[[Design-Architecture]]"},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Software Architecture"},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"The *_Architecture Diagram_* given below (Figure 1) explains the high-level design of the App."},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":".Architecture Diagram"},{"lineNumber":138,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"Given below is a quick overview of each component."},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":143,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`."},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,"},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other."},{"lineNumber":148,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary."},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":"\u003c\u003cDesign-Commons,*`Commons`*\u003e\u003e represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level."},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)"},{"lineNumber":153,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file."},{"lineNumber":154,"author":{"gitId":"-"},"content":""},{"lineNumber":155,"author":{"gitId":"-"},"content":"The rest of the App consists of four components."},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Ui,*`UI`*\u003e\u003e: The UI of the App."},{"lineNumber":158,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Logic,*`Logic`*\u003e\u003e: The command executor."},{"lineNumber":159,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Model,*`Model`*\u003e\u003e: Holds the data of the App in-memory."},{"lineNumber":160,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Storage,*`Storage`*\u003e\u003e: Reads data from, and writes data to, the hard disk."},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":"Each of the four components"},{"lineNumber":163,"author":{"gitId":"-"},"content":""},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component."},{"lineNumber":165,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class."},{"lineNumber":166,"author":{"gitId":"-"},"content":""},{"lineNumber":167,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class."},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":".Class Diagram of the Logic Component"},{"lineNumber":170,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":173,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design"},{"lineNumber":174,"author":{"gitId":"-"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`."},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 1)"},{"lineNumber":178,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":181,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk."},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time."},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 2)"},{"lineNumber":186,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":189,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components."},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":"The sections below give more details of each component."},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":"[[Design-Ui]]"},{"lineNumber":194,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":"The UI Component contains a MainWindow that consists of various parts e.g. CommandBox, ResultDisplayer, TeamDetails, PersonListPanel, PlayerDetails etc. The UI classes are all child classes of the abstract UiPart class."},{"lineNumber":197,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":198,"author":{"gitId":"lithiumlkid"},"content":"The structure of the UI component is shown in the figure below:"},{"lineNumber":199,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":".Structure of the UI Component"},{"lineNumber":201,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `PlayerDetails` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class."},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `UI` component,"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component."},{"lineNumber":212,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change."},{"lineNumber":213,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly."},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":"[[Design-Logic]]"},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"lithiumlkid"},"content":"The Logic Component handles how each command would be parsed and executed. The class diagrams below illustrates the structure of the Logic Component and the structure of each individual commands."},{"lineNumber":219,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":220,"author":{"gitId":"-"},"content":"[[fig-LogicClassDiagram]]"},{"lineNumber":221,"author":{"gitId":"-"},"content":".Structure of the Logic Component"},{"lineNumber":222,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":".Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in \u003c\u003cfig-LogicClassDiagram\u003e\u003e"},{"lineNumber":225,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":226,"author":{"gitId":"-"},"content":""},{"lineNumber":227,"author":{"gitId":"-"},"content":"*API* :"},{"lineNumber":228,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command."},{"lineNumber":231,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`."},{"lineNumber":232,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events."},{"lineNumber":233,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`."},{"lineNumber":234,"author":{"gitId":"-"},"content":""},{"lineNumber":235,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call."},{"lineNumber":236,"author":{"gitId":"-"},"content":""},{"lineNumber":237,"author":{"gitId":"-"},"content":".Interactions Inside the Logic Component for the `delete 1` Command"},{"lineNumber":238,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":"[[Design-Model]]"},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component"},{"lineNumber":242,"author":{"gitId":"-"},"content":""},{"lineNumber":243,"author":{"gitId":"lithiumlkid"},"content":"The Model Component handles the players and teams data structures in My Team Manager. These structures also provide APIs to create, read, update and delete the details of these objects. The class diagram below shows the structure of the Model Component."},{"lineNumber":244,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":245,"author":{"gitId":"-"},"content":".Structure of the Model Component"},{"lineNumber":246,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"-"},"content":"The `Model`,"},{"lineNumber":251,"author":{"gitId":"-"},"content":""},{"lineNumber":252,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences."},{"lineNumber":253,"author":{"gitId":"-"},"content":"* stores the Address Book data."},{"lineNumber":254,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change."},{"lineNumber":255,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components."},{"lineNumber":256,"author":{"gitId":"-"},"content":""},{"lineNumber":257,"author":{"gitId":"-"},"content":"[[Design-Storage]]"},{"lineNumber":258,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"lithiumlkid"},"content":"Any changes made to the data is retained and handled by the Storage Component. The structure of this component is shown in Figure 10 below."},{"lineNumber":261,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":".Structure of the Storage Component"},{"lineNumber":263,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]"},{"lineNumber":266,"author":{"gitId":"-"},"content":""},{"lineNumber":267,"author":{"gitId":"-"},"content":"The `Storage` component,"},{"lineNumber":268,"author":{"gitId":"-"},"content":""},{"lineNumber":269,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back."},{"lineNumber":270,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back."},{"lineNumber":271,"author":{"gitId":"-"},"content":""},{"lineNumber":272,"author":{"gitId":"-"},"content":"[[Design-Commons]]"},{"lineNumber":273,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes"},{"lineNumber":274,"author":{"gitId":"-"},"content":""},{"lineNumber":275,"author":{"gitId":"lithiumlkid"},"content":"All classes used by the different components can be found in the `seedu.addressbook.commons` package."},{"lineNumber":276,"author":{"gitId":"-"},"content":""},{"lineNumber":277,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration"},{"lineNumber":278,"author":{"gitId":"-"},"content":""},{"lineNumber":279,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`)."},{"lineNumber":280,"author":{"gitId":"-"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":"// tag::logging[]"},{"lineNumber":282,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging"},{"lineNumber":283,"author":{"gitId":"-"},"content":""},{"lineNumber":284,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations."},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"lithiumlkid"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See \u003c\u003cConfiguration,Configuration\u003e\u003e)"},{"lineNumber":287,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level"},{"lineNumber":288,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file."},{"lineNumber":289,"author":{"gitId":"-"},"content":""},{"lineNumber":290,"author":{"gitId":"-"},"content":"*Logging Levels*"},{"lineNumber":291,"author":{"gitId":"-"},"content":""},{"lineNumber":292,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application"},{"lineNumber":293,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution"},{"lineNumber":294,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App"},{"lineNumber":295,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size"},{"lineNumber":296,"author":{"gitId":"-"},"content":""},{"lineNumber":297,"author":{"gitId":"-"},"content":"[[Implementation-Configuration]]"},{"lineNumber":298,"author":{"gitId":"-"},"content":"// end::logging[]"},{"lineNumber":299,"author":{"gitId":"-"},"content":""},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented."},{"lineNumber":303,"author":{"gitId":"-"},"content":""},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Pre-existing"},{"lineNumber":305,"author":{"gitId":"-"},"content":""},{"lineNumber":306,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":307,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undo/Redo feature"},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`."},{"lineNumber":311,"author":{"gitId":"-"},"content":""},{"lineNumber":312,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:"},{"lineNumber":313,"author":{"gitId":"-"},"content":""},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":".Logic Class Diagram"},{"lineNumber":315,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern]."},{"lineNumber":318,"author":{"gitId":"-"},"content":""},{"lineNumber":319,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:"},{"lineNumber":320,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":321,"author":{"gitId":"-"},"content":"----"},{"lineNumber":322,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":323,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":324,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":325,"author":{"gitId":"-"},"content":" // ... list logic ..."},{"lineNumber":326,"author":{"gitId":"-"},"content":" }"},{"lineNumber":327,"author":{"gitId":"-"},"content":"}"},{"lineNumber":328,"author":{"gitId":"-"},"content":"----"},{"lineNumber":329,"author":{"gitId":"-"},"content":""},{"lineNumber":330,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:"},{"lineNumber":331,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":332,"author":{"gitId":"-"},"content":"----"},{"lineNumber":333,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {"},{"lineNumber":334,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":335,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":336,"author":{"gitId":"-"},"content":" // ... undo logic ..."},{"lineNumber":337,"author":{"gitId":"-"},"content":""},{"lineNumber":338,"author":{"gitId":"-"},"content":" executeUndoableCommand();"},{"lineNumber":339,"author":{"gitId":"-"},"content":" }"},{"lineNumber":340,"author":{"gitId":"-"},"content":"}"},{"lineNumber":341,"author":{"gitId":"-"},"content":""},{"lineNumber":342,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":344,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":345,"author":{"gitId":"-"},"content":" // ... delete logic ..."},{"lineNumber":346,"author":{"gitId":"-"},"content":" }"},{"lineNumber":347,"author":{"gitId":"-"},"content":"}"},{"lineNumber":348,"author":{"gitId":"-"},"content":"----"},{"lineNumber":349,"author":{"gitId":"-"},"content":""},{"lineNumber":350,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning."},{"lineNumber":351,"author":{"gitId":"-"},"content":""},{"lineNumber":352,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command)."},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 1)"},{"lineNumber":355,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":356,"author":{"gitId":"-"},"content":""},{"lineNumber":357,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person."},{"lineNumber":358,"author":{"gitId":"-"},"content":""},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 1)"},{"lineNumber":360,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":361,"author":{"gitId":"-"},"content":""},{"lineNumber":362,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":363,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all."},{"lineNumber":364,"author":{"gitId":"-"},"content":""},{"lineNumber":365,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`."},{"lineNumber":366,"author":{"gitId":"-"},"content":""},{"lineNumber":367,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed."},{"lineNumber":368,"author":{"gitId":"-"},"content":""},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 2)"},{"lineNumber":370,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]"},{"lineNumber":371,"author":{"gitId":"-"},"content":""},{"lineNumber":372,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":373,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`."},{"lineNumber":374,"author":{"gitId":"-"},"content":""},{"lineNumber":375,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:"},{"lineNumber":376,"author":{"gitId":"-"},"content":""},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Sequence Diagram"},{"lineNumber":378,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":379,"author":{"gitId":"-"},"content":""},{"lineNumber":380,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed)."},{"lineNumber":381,"author":{"gitId":"-"},"content":""},{"lineNumber":382,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":383,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`."},{"lineNumber":384,"author":{"gitId":"-"},"content":""},{"lineNumber":385,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow)."},{"lineNumber":386,"author":{"gitId":"-"},"content":""},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 2)"},{"lineNumber":388,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":389,"author":{"gitId":"-"},"content":""},{"lineNumber":390,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:"},{"lineNumber":391,"author":{"gitId":"-"},"content":""},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 3)"},{"lineNumber":393,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]"},{"lineNumber":394,"author":{"gitId":"-"},"content":""},{"lineNumber":395,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:"},{"lineNumber":396,"author":{"gitId":"-"},"content":""},{"lineNumber":397,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Activity Diagram"},{"lineNumber":398,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"650\"]"},{"lineNumber":399,"author":{"gitId":"-"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":401,"author":{"gitId":"-"},"content":""},{"lineNumber":402,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `UndoableCommand`"},{"lineNumber":403,"author":{"gitId":"-"},"content":""},{"lineNumber":404,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()`."},{"lineNumber":405,"author":{"gitId":"-"},"content":"** Pros: We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist."},{"lineNumber":406,"author":{"gitId":"-"},"content":"** Cons: Hard for new developers to understand the template pattern."},{"lineNumber":407,"author":{"gitId":"-"},"content":"* **Alternative 2:** Just override `execute()`."},{"lineNumber":408,"author":{"gitId":"-"},"content":"** Pros: Does not involve the template pattern, easier for new developers to understand."},{"lineNumber":409,"author":{"gitId":"-"},"content":"** Cons: Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo."},{"lineNumber":410,"author":{"gitId":"-"},"content":""},{"lineNumber":411,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How undo \u0026 redo executes"},{"lineNumber":412,"author":{"gitId":"-"},"content":""},{"lineNumber":413,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Saves the entire address book."},{"lineNumber":414,"author":{"gitId":"-"},"content":"** Pros: Easy to implement."},{"lineNumber":415,"author":{"gitId":"-"},"content":"** Cons: May have performance issues in terms of memory usage."},{"lineNumber":416,"author":{"gitId":"-"},"content":"* **Alternative 2:** Individual command knows how to undo/redo by itself."},{"lineNumber":417,"author":{"gitId":"-"},"content":"** Pros: Will use less memory (e.g. for `delete`, just save the person being deleted)."},{"lineNumber":418,"author":{"gitId":"-"},"content":"** Cons: We must ensure that the implementation of each individual command are correct."},{"lineNumber":419,"author":{"gitId":"-"},"content":""},{"lineNumber":420,"author":{"gitId":"-"},"content":""},{"lineNumber":421,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Type of commands that can be undone/redone"},{"lineNumber":422,"author":{"gitId":"-"},"content":""},{"lineNumber":423,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`)."},{"lineNumber":424,"author":{"gitId":"-"},"content":"** Pros: We only revert changes that are hard to change back (the view can easily be re-modified as no data are * lost)."},{"lineNumber":425,"author":{"gitId":"-"},"content":"** Cons: User might think that undo also applies when the list is modified (undoing filtering for example), * only to realize that it does not do that, after executing `undo`."},{"lineNumber":426,"author":{"gitId":"-"},"content":"* **Alternative 2:** Include all commands."},{"lineNumber":427,"author":{"gitId":"-"},"content":"** Pros: Might be more intuitive for the user."},{"lineNumber":428,"author":{"gitId":"-"},"content":"** Cons: User have no way of skipping such commands if he or she just want to reset the state of the address * book and not the view."},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Additional Info:** See our discussion https://github.com/se-edu/addressbook-level4/issues/390#issuecomment-298936672[here]."},{"lineNumber":430,"author":{"gitId":"-"},"content":""},{"lineNumber":431,"author":{"gitId":"-"},"content":""},{"lineNumber":432,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Aspect: Data structure to support the undo/redo commands"},{"lineNumber":433,"author":{"gitId":"-"},"content":""},{"lineNumber":434,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Use separate stack for undo and redo."},{"lineNumber":435,"author":{"gitId":"-"},"content":"** Pros: Easy to understand for new Computer Science student undergraduates to understand, who are likely to be * the new incoming developers of our project."},{"lineNumber":436,"author":{"gitId":"-"},"content":"** Cons: Logic is duplicated twice. For example, when a new command is executed, we must remember to update * both `HistoryManager` and `UndoRedoStack`."},{"lineNumber":437,"author":{"gitId":"-"},"content":"* **Alternative 2:** Use `HistoryManager` for undo/redo."},{"lineNumber":438,"author":{"gitId":"-"},"content":"** Pros: We do not need to maintain a separate stack, and just reuse what is already in the codebase."},{"lineNumber":439,"author":{"gitId":"-"},"content":"** Cons: Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two * different things."},{"lineNumber":440,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Player-Related Enhancements"},{"lineNumber":443,"author":{"gitId":"-"},"content":""},{"lineNumber":444,"author":{"gitId":"lithiumlkid"},"content":"// tag::player[]"},{"lineNumber":445,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Player Component `[since v1.3]`"},{"lineNumber":446,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":447,"author":{"gitId":"lithiumlkid"},"content":"`Player` is one of the core components of MTM. To implement it, we used the same `Person` object and added additional attributes to it. Shown below is the"},{"lineNumber":448,"author":{"gitId":"lithiumlkid"},"content":"new constructor for the Person object followed by the class diagram."},{"lineNumber":449,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":450,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":451,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":452,"author":{"gitId":"lithiumlkid"},"content":"public Person(Name name, Phone phone, Email email, Address address, Remark remark, TeamName teamName,"},{"lineNumber":453,"author":{"gitId":"lithiumlkid"},"content":" Set\u003cTag\u003e tags, Rating rating, Position position, JerseyNumber jerseyNumber, Avatar avatar) {"},{"lineNumber":454,"author":{"gitId":"lithiumlkid"},"content":" ..."},{"lineNumber":455,"author":{"gitId":"lithiumlkid"},"content":" this.remark \u003d remark;"},{"lineNumber":456,"author":{"gitId":"lithiumlkid"},"content":" this.teamName \u003d teamName;"},{"lineNumber":457,"author":{"gitId":"lithiumlkid"},"content":" this.rating \u003d rating;"},{"lineNumber":458,"author":{"gitId":"lithiumlkid"},"content":" this.position \u003d position;"},{"lineNumber":459,"author":{"gitId":"lithiumlkid"},"content":" this.jerseyNumber \u003d jerseyNumber;"},{"lineNumber":460,"author":{"gitId":"lithiumlkid"},"content":" this.avatar \u003d avatar;"},{"lineNumber":461,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":462,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":463,"author":{"gitId":"lithiumlkid"},"content":".Person Class Diagram"},{"lineNumber":464,"author":{"gitId":"lithiumlkid"},"content":"image::PlayerClassDiagram.png[width\u003d\"300\"]"},{"lineNumber":465,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":466,"author":{"gitId":"lithiumlkid"},"content":"The additional attributes are: \u003c\u003cteam,teamName\u003e\u003e, \u003c\u003cremark,Remark\u003e\u003e, \u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e."},{"lineNumber":467,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":468,"author":{"gitId":"lithiumlkid"},"content":"The add and edit command has also been updated to include \u003c\u003cteam,teamName\u003e\u003e,\u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e."},{"lineNumber":469,"author":{"gitId":"lithiumlkid"},"content":"One thing to note is that in `executeUndoableCommand()`"},{"lineNumber":470,"author":{"gitId":"lithiumlkid"},"content":"in both add and edit commands now does two additional things, setting the file path for players avatar, and assigning a player to a team"},{"lineNumber":471,"author":{"gitId":"lithiumlkid"},"content":"and adding person to current filtered list. Shown below is the code snippet of the new `executeUndoableCommand()` and sequence diagram"},{"lineNumber":472,"author":{"gitId":"lithiumlkid"},"content":"of the new add command as an example."},{"lineNumber":473,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":474,"author":{"gitId":"lithiumlkid"},"content":"[[AddSequence]]"},{"lineNumber":475,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":476,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":477,"author":{"gitId":"lithiumlkid"},"content":" @Override"},{"lineNumber":478,"author":{"gitId":"lithiumlkid"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":479,"author":{"gitId":"lithiumlkid"},"content":" requireNonNull(model);"},{"lineNumber":480,"author":{"gitId":"lithiumlkid"},"content":" try {"},{"lineNumber":481,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":482,"author":{"gitId":"lithiumlkid"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);"},{"lineNumber":483,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":484,"author":{"gitId":"lithiumlkid"},"content":" model.addPerson(toAdd);"},{"lineNumber":485,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":486,"author":{"gitId":"lithiumlkid"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());"},{"lineNumber":487,"author":{"gitId":"lithiumlkid"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());"},{"lineNumber":488,"author":{"gitId":"lithiumlkid"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));"},{"lineNumber":489,"author":{"gitId":"lithiumlkid"},"content":" } else { ..."},{"lineNumber":490,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":491,"author":{"gitId":"lithiumlkid"},"content":".Add Sequence Diagram"},{"lineNumber":492,"author":{"gitId":"lithiumlkid"},"content":"image::AddSequenceDiagram.png[width\u003d\"800\"]"},{"lineNumber":493,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":494,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":495,"author":{"gitId":"lithiumlkid"},"content":"[[rating]]"},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Rating Class"},{"lineNumber":497,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":498,"author":{"gitId":"lithiumlkid"},"content":"The `Rating` class contains a `String value`. `value` holds the players rating, an integer from 0 to 5. It uses a validation regex `[0-5]`"},{"lineNumber":499,"author":{"gitId":"lithiumlkid"},"content":"to ensure valid input."},{"lineNumber":500,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":501,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Rating` is `ra/`"},{"lineNumber":502,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":503,"author":{"gitId":"lithiumlkid"},"content":"[[position]]"},{"lineNumber":504,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Position Class"},{"lineNumber":505,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":506,"author":{"gitId":"lithiumlkid"},"content":"The`Position` class contains a `String value`. `value` here holds the players position, an integer from 1 to 4. It uses a validation regex `[1-4]` to ensure valid input."},{"lineNumber":507,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":508,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `po/`."},{"lineNumber":509,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":510,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":511,"author":{"gitId":"lithiumlkid"},"content":"A static hashmap is used to store and retrieve the corresponding position names of the position values. The position name can be called using the method `getPositionName()` which returns `myMap.get(value)`."},{"lineNumber":512,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for the `hashmap` and `getPositionName()` is shown below."},{"lineNumber":513,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":514,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":515,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":516,"author":{"gitId":"lithiumlkid"},"content":"private static final Map\u003cString, String\u003e myMap;"},{"lineNumber":517,"author":{"gitId":"lithiumlkid"},"content":"static {"},{"lineNumber":518,"author":{"gitId":"lithiumlkid"},"content":" Map\u003cString, String\u003e aMap \u003d new HashMap\u003c\u003e();"},{"lineNumber":519,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"1\", \"Striker\");"},{"lineNumber":520,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"2\", \"Midfielder\");"},{"lineNumber":521,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"3\", \"Defender\");"},{"lineNumber":522,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"4\", \"Goalkeeper\");"},{"lineNumber":523,"author":{"gitId":"lithiumlkid"},"content":" myMap \u003d Collections.unmodifiableMap(aMap);"},{"lineNumber":524,"author":{"gitId":"lithiumlkid"},"content":"}"},{"lineNumber":525,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":526,"author":{"gitId":"lithiumlkid"},"content":"public String getPositionName() {"},{"lineNumber":527,"author":{"gitId":"lithiumlkid"},"content":" return myMap.get(value);"},{"lineNumber":528,"author":{"gitId":"lithiumlkid"},"content":"}"},{"lineNumber":529,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":530,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":531,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":532,"author":{"gitId":"lithiumlkid"},"content":"[[jersey]]"},{"lineNumber":533,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d JerseyNumber Class"},{"lineNumber":534,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":535,"author":{"gitId":"lithiumlkid"},"content":"The`JerseyNumber` class contains a `String value`. `value` here holds the players jersey number, an integer from 0 to 99. It uses a validation regex `[0-9]|[1-8][0-9]|9[0-9]` to ensure valid input."},{"lineNumber":536,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":537,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `j/`."},{"lineNumber":538,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":539,"author":{"gitId":"lithiumlkid"},"content":"[[avatar]]"},{"lineNumber":540,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Avatar Class"},{"lineNumber":541,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":542,"author":{"gitId":"lithiumlkid"},"content":"The`Avatar` class contains a `String value`. `value` here holds the absolute filepath to the players avatar image file, a png of jpeg file. It uses a validation regex `([^\\s]+(\\.(?i)(jpg|png))$)` to ensure valid input."},{"lineNumber":543,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":544,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Avatar` is `av/`."},{"lineNumber":545,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":546,"author":{"gitId":"lithiumlkid"},"content":"When the class is created, the `value` stores the original location of the players avatar image file eg. `C:\\image.png` or if not specified, stores \"\u003cUNSPECIFIED\u003e\"."},{"lineNumber":547,"author":{"gitId":"lithiumlkid"},"content":"Thereafter, if the avatar is specified when \u003c\u003cAddSequence,adding\u003e\u003e or editing a player, `setFilePath()` is called which will attempt to copy the image file to a `/image` folder that is in the same directory as the `MTM.jar` file."},{"lineNumber":548,"author":{"gitId":"lithiumlkid"},"content":"`value` is then updated to the new file path."},{"lineNumber":549,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":550,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for setFilePath() is shown below."},{"lineNumber":551,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":552,"author":{"gitId":"lithiumlkid"},"content":"[source, java]"},{"lineNumber":553,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":554,"author":{"gitId":"lithiumlkid"},"content":"public void setFilePath(String player) throws IOException {"},{"lineNumber":555,"author":{"gitId":"lithiumlkid"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {"},{"lineNumber":556,"author":{"gitId":"lithiumlkid"},"content":" return;"},{"lineNumber":557,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":558,"author":{"gitId":"lithiumlkid"},"content":" final File file \u003d new File(value);"},{"lineNumber":559,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":560,"author":{"gitId":"lithiumlkid"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();"},{"lineNumber":561,"author":{"gitId":"lithiumlkid"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any"},{"lineNumber":562,"author":{"gitId":"lithiumlkid"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);"},{"lineNumber":563,"author":{"gitId":"lithiumlkid"},"content":" this.value \u003d dest.toString();"},{"lineNumber":564,"author":{"gitId":"lithiumlkid"},"content":" }"},{"lineNumber":565,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":566,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":567,"author":{"gitId":"lithiumlkid"},"content":"// end::player[]"},{"lineNumber":568,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":569,"author":{"gitId":"-"},"content":"// tag::remark[]"},{"lineNumber":570,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Remark a Player `[since v1.1]`"},{"lineNumber":571,"author":{"gitId":"-"},"content":""},{"lineNumber":572,"author":{"gitId":"-"},"content":"Leaving a remark would be ideal for the user to note down any important detail of a player that is useful in the future."},{"lineNumber":573,"author":{"gitId":"-"},"content":"Remarks given can be in any format and therefore would not look good if it was done using tags instead, as tags are used with minimal words."},{"lineNumber":574,"author":{"gitId":"-"},"content":""},{"lineNumber":575,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":576,"author":{"gitId":"-"},"content":"The remark mechanism is facilitated by `RemarkCommand` and it inherits from `UndoableCommand`, making it undoable. The mechanism allows user to perform the adding, editing, and deleting of a single remark to a specified `Person` via the `INDEX` from the list shown in the `UI`. The field `remark` is similar to the other fields of `Person`, hence some of its logic in `AddCommand.java` and `EditCommand.java` are updated."},{"lineNumber":577,"author":{"gitId":"-"},"content":""},{"lineNumber":578,"author":{"gitId":"-"},"content":"The mechanism uses the command `remark` and a `r/` prefix to add, edit, and delete a single remark of a `Person`. When the user leaves the remark as empty after the `r/` prefix, it is an indication to delete the remark, and when it is valid, it either create a new remark for that `Person` or overwrites the current existing remark. Only one `remark` is saved at a time. If the user `remark` on the same person, it will be overwritten."},{"lineNumber":579,"author":{"gitId":"-"},"content":""},{"lineNumber":580,"author":{"gitId":"-"},"content":"The field `remark` is found in `Person`, and it is not modified via `add` or `edit` commands. All functions related to `remark` is done strictly via the `remark` command."},{"lineNumber":581,"author":{"gitId":"-"},"content":""},{"lineNumber":582,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remark` command:"},{"lineNumber":583,"author":{"gitId":"-"},"content":""},{"lineNumber":584,"author":{"gitId":"-"},"content":".Remark Activity Diagram"},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::RemarkActivityDiagram.png[width\u003d\"100%\"]"},{"lineNumber":586,"author":{"gitId":"-"},"content":""},{"lineNumber":587,"author":{"gitId":"-"},"content":"The `remark` field is not required when adding or editing a `Person`, and it will be initialized to an empty string or retrieved to fit the implementation of the other fields."},{"lineNumber":588,"author":{"gitId":"-"},"content":""},{"lineNumber":589,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows how remark is initialized as empty."},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":592,"author":{"gitId":"-"},"content":"----"},{"lineNumber":593,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":594,"author":{"gitId":"-"},"content":" //...AddCommandParser code..."},{"lineNumber":595,"author":{"gitId":"-"},"content":" Remark remark \u003d new Remark(\"\");"},{"lineNumber":596,"author":{"gitId":"-"},"content":""},{"lineNumber":597,"author":{"gitId":"-"},"content":" Person person \u003d new Person(name, phone, email, address, remark, teamName, tagList, rating,"},{"lineNumber":598,"author":{"gitId":"-"},"content":" position, jerseyNumber, avatar);"},{"lineNumber":599,"author":{"gitId":"-"},"content":" //...AddCommandParser code..."},{"lineNumber":600,"author":{"gitId":"lithiumlkid"},"content":"}"},{"lineNumber":601,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":602,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":603,"author":{"gitId":"-"},"content":"Code snippet from `EditCommand.java` that shows how remark is being retrieved."},{"lineNumber":604,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":605,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":606,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":607,"author":{"gitId":"-"},"content":"private static Person createEditedPerson(Person personToEdit,"},{"lineNumber":608,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":609,"author":{"gitId":"-"},"content":" //...EditCommand code..."},{"lineNumber":610,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate()) ? personToEdit.getRemark()"},{"lineNumber":611,"author":{"gitId":"-"},"content":" : personToEdit.getRemark();"},{"lineNumber":612,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":613,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":614,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber,"},{"lineNumber":615,"author":{"gitId":"-"},"content":" updatedAvatar);"},{"lineNumber":616,"author":{"gitId":"-"},"content":"}"},{"lineNumber":617,"author":{"gitId":"lithiumlkid"},"content":"----"},{"lineNumber":618,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":619,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` field"},{"lineNumber":621,"author":{"gitId":"-"},"content":""},{"lineNumber":622,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Creates an additional `remark` field in `Person`."},{"lineNumber":623,"author":{"gitId":"-"},"content":"** Pros: Follows the existing style of similar fields, making implementation easier."},{"lineNumber":624,"author":{"gitId":"-"},"content":"** Cons: Could only have 1 remark per person, unless `remark` mechanism follows the `tag` mechanism to have multiple remarks."},{"lineNumber":625,"author":{"gitId":"-"},"content":"* **Alternative 2:** Have a list of remarks that associates with the specified `Person`."},{"lineNumber":626,"author":{"gitId":"-"},"content":"** Pros: Can have multiple remarks associating with a specific `Person`."},{"lineNumber":627,"author":{"gitId":"-"},"content":"** Cons: Harder to maintain, more complicated."},{"lineNumber":628,"author":{"gitId":"-"},"content":""},{"lineNumber":629,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` command"},{"lineNumber":630,"author":{"gitId":"-"},"content":""},{"lineNumber":631,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Create a specific command for remarking `Person`."},{"lineNumber":632,"author":{"gitId":"-"},"content":"** Pros: Optional for user to enter remark during add, and have an isolated command to give remarks to a player that works as an add and edit command for remark."},{"lineNumber":633,"author":{"gitId":"-"},"content":"** Cons: Increases the number of commands available for the user, and could mistaken that remark can be done using add/edit command."},{"lineNumber":634,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make it similar to how other fields are implemented in `Person`."},{"lineNumber":635,"author":{"gitId":"-"},"content":"** Pros: Quick and easy implementation as it uses the same format as other fields, and can be added and modified through `add` and `edit` commands."},{"lineNumber":636,"author":{"gitId":"-"},"content":"** Cons: An additional field that can be input when adding a player, making the process longer to execute the command."},{"lineNumber":637,"author":{"gitId":"-"},"content":"// end::remark[]"},{"lineNumber":638,"author":{"gitId":"-"},"content":""},{"lineNumber":639,"author":{"gitId":"-"},"content":"// tag::privatefield[]"},{"lineNumber":640,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Setting various player fields to private `[since v1.4]`"},{"lineNumber":641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":642,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":643,"author":{"gitId":"lohtianwei"},"content":"`Phone`, `Email`, `Remark`, `Rating` and `Address` of a player has an additional boolean attribute"},{"lineNumber":644,"author":{"gitId":"lohtianwei"},"content":"`isPrivate` which tracks the privacy of the particular field. When a player is added into MTM, `isPrivate` of these"},{"lineNumber":645,"author":{"gitId":"lohtianwei"},"content":"fields are set to \u0027false\u0027 by default."},{"lineNumber":646,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":647,"author":{"gitId":"lohtianwei"},"content":"Each of these fields have a different `toString` method which would return `\u003cPrivate \u0027FIELD\u0027\u003e` if privacy of"},{"lineNumber":648,"author":{"gitId":"lohtianwei"},"content":"the field is set to \u0027true\u0027, as shown in the following code snippet:"},{"lineNumber":649,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":650,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":651,"author":{"gitId":"lohtianwei"},"content":"@Override"},{"lineNumber":652,"author":{"gitId":"lohtianwei"},"content":" public String toString() {"},{"lineNumber":653,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {"},{"lineNumber":654,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":655,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":656,"author":{"gitId":"lohtianwei"},"content":" return value;"},{"lineNumber":657,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":658,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":659,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":660,"author":{"gitId":"lohtianwei"},"content":"`XmlAdaptedPerson` under the storage portion has been edited to save the `isPrivate` value for the fields:"},{"lineNumber":661,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":662,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":663,"author":{"gitId":"lohtianwei"},"content":"@XmlElement(required \u003d true)"},{"lineNumber":664,"author":{"gitId":"lohtianwei"},"content":" private Boolean phonePrivacy;"},{"lineNumber":665,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":666,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":667,"author":{"gitId":"lohtianwei"},"content":"Toggling of privacy works in a similar way to `Edit`. New fields will be created with privacy settings of `EditPersonPrivacy`"},{"lineNumber":668,"author":{"gitId":"lohtianwei"},"content":" based on user input. This is done by first detecting if a particular prefix is present when command is"},{"lineNumber":669,"author":{"gitId":"lohtianwei"},"content":"entered in `TogglePrivacyCommandParser`:"},{"lineNumber":670,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":671,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":672,"author":{"gitId":"lohtianwei"},"content":"if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":673,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);"},{"lineNumber":674,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":675,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":676,"author":{"gitId":"lohtianwei"},"content":"If prefix of a field is not present, the privacy setting of that particular field in `EditPersonPrivacy` would be null."},{"lineNumber":677,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":678,"author":{"gitId":"lohtianwei"},"content":"In `TogglePrivacyCommand`, the new fields are created with this:"},{"lineNumber":679,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":680,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":681,"author":{"gitId":"lohtianwei"},"content":"private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":682,"author":{"gitId":"lohtianwei"},"content":" Phone phone;"},{"lineNumber":683,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":684,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {"},{"lineNumber":685,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":686,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":687,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":688,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":689,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":690,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":691,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":692,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");"},{"lineNumber":693,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":694,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {"},{"lineNumber":695,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":696,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();"},{"lineNumber":697,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":698,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":699,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":700,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":701,"author":{"gitId":"lohtianwei"},"content":" return phone;"},{"lineNumber":702,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":703,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":704,"author":{"gitId":"lohtianwei"},"content":"Note that in the second portion of the code, if `epp.getPrivatePhone()` is null, this would mean that it\u0027s privacy"},{"lineNumber":705,"author":{"gitId":"lohtianwei"},"content":"setting was not toggled and thus is set to the same as it was before. Else, it would be toggled:"},{"lineNumber":706,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":707,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":708,"author":{"gitId":"lohtianwei"},"content":"public void togglePrivacy() {"},{"lineNumber":709,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":710,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":711,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":712,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":713,"author":{"gitId":"lohtianwei"},"content":"A new person object is then created:"},{"lineNumber":714,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":715,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":716,"author":{"gitId":"lohtianwei"},"content":"private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)"},{"lineNumber":717,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {"},{"lineNumber":718,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":719,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":720,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();"},{"lineNumber":721,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);"},{"lineNumber":722,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);"},{"lineNumber":723,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);"},{"lineNumber":724,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);"},{"lineNumber":725,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();"},{"lineNumber":726,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();"},{"lineNumber":727,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);"},{"lineNumber":728,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();"},{"lineNumber":729,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();"},{"lineNumber":730,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();"},{"lineNumber":731,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":732,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":733,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);"},{"lineNumber":734,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":735,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":736,"author":{"gitId":"lohtianwei"},"content":"and is used to update current person:"},{"lineNumber":737,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":738,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":739,"author":{"gitId":"lohtianwei"},"content":"model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":740,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":741,"author":{"gitId":"-"},"content":""},{"lineNumber":742,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":743,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How field privacy is implemented"},{"lineNumber":744,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":745,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Boolean `isPrivate` added to field classes."},{"lineNumber":746,"author":{"gitId":"lohtianwei"},"content":"** Pros: Privacy settings can be obtained straight from class by calling getter method."},{"lineNumber":747,"author":{"gitId":"lohtianwei"},"content":"** Cons: Adddtional methods are needed to set and get value of `isPrivate`."},{"lineNumber":748,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Field privacy settings stored in `Person` in a HashMap."},{"lineNumber":749,"author":{"gitId":"lohtianwei"},"content":"** Pros: Field privacy can be accessed and modified easily"},{"lineNumber":750,"author":{"gitId":"lohtianwei"},"content":"** Cons: `Person` has to be accessed every time field privacy needs to be checked"},{"lineNumber":751,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":752,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Privacy of fields upon adding of player"},{"lineNumber":753,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":754,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** All newly added players\u0027 fields are not private by default."},{"lineNumber":755,"author":{"gitId":"lohtianwei"},"content":"** Pros: `Add` command does not need to be tweaked to allow adding player with private fields."},{"lineNumber":756,"author":{"gitId":"lohtianwei"},"content":"** Cons: After adding players, user has to do additional command to toggle privacy of fields."},{"lineNumber":757,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Include implementation of prefixes that denotes private field during `Add`."},{"lineNumber":758,"author":{"gitId":"lohtianwei"},"content":"** Pros: Newly added players can have private fields right away."},{"lineNumber":759,"author":{"gitId":"lohtianwei"},"content":"** Cons: Addtional changes has to be made to `Add` command."},{"lineNumber":760,"author":{"gitId":"-"},"content":"// end::privatefield[]"},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":762,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]"},{"lineNumber":763,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Sorting players by fields `[since v1.2]`"},{"lineNumber":764,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":765,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":766,"author":{"gitId":"lohtianwei"},"content":"The `sort` command is currently able to sort players by name, email, address, rating, jersey and postition in either ascending or descending order. Support for more fields will be added in subsequent updates."},{"lineNumber":767,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":768,"author":{"gitId":"lohtianwei"},"content":"* The `sort` command is parsed through `SortCommandParser` which hands control to the `SortCommand` class."},{"lineNumber":769,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":770,"author":{"gitId":"lohtianwei"},"content":"* Java Collections Sort API is used together with a custom `Comparator` in this implementation"},{"lineNumber":771,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":772,"author":{"gitId":"lohtianwei"},"content":"Sorting is facilitated by the `SortCommand` which uses method `sortPlayers` to ultimately call method `sortBy` in UniquePersonList for the actual sorting as shown in this code snippet:"},{"lineNumber":773,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":774,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":775,"author":{"gitId":"lohtianwei"},"content":" switch (field) {"},{"lineNumber":776,"author":{"gitId":"lohtianwei"},"content":" case \"name\":"},{"lineNumber":777,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;"},{"lineNumber":778,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":779,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":780,"author":{"gitId":"lohtianwei"},"content":" //... code for other switch cases..."},{"lineNumber":781,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":782,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":783,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":784,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":785,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":786,"author":{"gitId":"lohtianwei"},"content":" switch (order) {"},{"lineNumber":787,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":"},{"lineNumber":788,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":789,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":790,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":791,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":"},{"lineNumber":792,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":793,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":794,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":795,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":796,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":797,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":798,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":799,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":800,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":801,"author":{"gitId":"lohtianwei"},"content":"The code above utilises a custom `Comparator` defined in the sample code below:"},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":"[source, java]"},{"lineNumber":803,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":804,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":805,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);"},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":809,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":810,"author":{"gitId":"lohtianwei"},"content":"----"},{"lineNumber":811,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":812,"author":{"gitId":"lohtianwei"},"content":"The following sequence diagram shows the program flow when `sort` is used:"},{"lineNumber":813,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":".Sort Sequence Diagram"},{"lineNumber":815,"author":{"gitId":"lohtianwei"},"content":"image::sortSeq.png[width\u003d\"900\"]"},{"lineNumber":816,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":817,"author":{"gitId":"lohtianwei"},"content":"[NOTE]"},{"lineNumber":818,"author":{"gitId":"lohtianwei"},"content":"If address book is empty, a `NoPlayerException` will be thrown by `sortBy` method in UniquePlayerList."},{"lineNumber":819,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":820,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":821,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `sort`"},{"lineNumber":822,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":823,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sorting is done in `UniquePersonList`."},{"lineNumber":824,"author":{"gitId":"lohtianwei"},"content":"** Pros: Sorting methods resides in class that handles most operations done to list. Future changes to implementation would be easier."},{"lineNumber":825,"author":{"gitId":"-"},"content":"** Cons: Complicated flow of control passed between classes."},{"lineNumber":826,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sorting is done in `SortCommand`."},{"lineNumber":827,"author":{"gitId":"-"},"content":"** Pros: Easier to trace flow of control as lesser passing between classes."},{"lineNumber":828,"author":{"gitId":"-"},"content":"** Cons: Unnecessary coupling if `UniquePersonList` has to rely on `SortCommand`."},{"lineNumber":829,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":830,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort by multiple fields"},{"lineNumber":831,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":832,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sort can only be done by 1 field."},{"lineNumber":833,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and input is straightforward."},{"lineNumber":834,"author":{"gitId":"-"},"content":"** Cons: Unable to fine tune to great detail how teams are sorted and displayed."},{"lineNumber":835,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sort can be done by multiple fields."},{"lineNumber":836,"author":{"gitId":"-"},"content":"** Pros: Able to fine tune to great detail how teams are sorted and displayed."},{"lineNumber":837,"author":{"gitId":"-"},"content":"** Cons: Unnecessary as team managers would not need to sort players by multiple fields."},{"lineNumber":838,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":839,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort Persistence"},{"lineNumber":840,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Address book is saved after sorting."},{"lineNumber":842,"author":{"gitId":"lohtianwei"},"content":"** Pros: Easy to implement. Allows team managers to use preferred sort pattern in every session."},{"lineNumber":843,"author":{"gitId":"lohtianwei"},"content":"** Cons: Previous order of players will be lost."},{"lineNumber":844,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Address book is not saved after sorting."},{"lineNumber":845,"author":{"gitId":"-"},"content":"** Pros: Good if team manager wants to sort players for current session only."},{"lineNumber":846,"author":{"gitId":"lohtianwei"},"content":"** Cons: Sort order is lost when program exits. More memory is used to sort a list and reverse it after."},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]"},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":849,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Team-Related Enhancements"},{"lineNumber":850,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":851,"author":{"gitId":"-"},"content":"// tag::team[]"},{"lineNumber":852,"author":{"gitId":"lithiumlkid"},"content":"[[team]]"},{"lineNumber":853,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Component `[since v1.2]`"},{"lineNumber":854,"author":{"gitId":"-"},"content":""},{"lineNumber":855,"author":{"gitId":"-"},"content":"One of the core components to MTM is `Team`, and it is the base to creating more commands for the user to access capability on team management. The `Team` component provides user with better organizational methods for organizing their players and interact with multiple teams to manage them effectively."},{"lineNumber":856,"author":{"gitId":"-"},"content":""},{"lineNumber":857,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":858,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":859,"author":{"gitId":"-"},"content":"We achieved the implementation of `Team` component by introducing a `UniqueTeamList` into the application which consists of a list of `Team` objects. `UniqueTeamList` is similar in context to `UniquePersonList` in which it keeps a unique list of all the `Team` objects. `Team` objects consist of `TeamName` object, which is used to uniquely identify the team. `Team` inherits `UniquePersonList` object which stores the a list of unique `Person` objects, containing information of the player."},{"lineNumber":860,"author":{"gitId":"-"},"content":""},{"lineNumber":861,"author":{"gitId":"-"},"content":"The class diagrams below shoes the relationship between the related classes. The Team Class Diagrams are an extension to the current existing Designs of \u003c\u003cDesign-Model, `Model`\u003e\u003e, \u003c\u003cDesign-Storage, `Storage`\u003e\u003e, and \u003c\u003cDesign-Ui, `UI`\u003e\u003e."},{"lineNumber":862,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":863,"author":{"gitId":"-"},"content":".Model Component: Team Class Diagram"},{"lineNumber":864,"author":{"gitId":"-"},"content":"image::TeamModelClassDiagram.png[width\u003d\"800\"]"},{"lineNumber":865,"author":{"gitId":"-"},"content":""},{"lineNumber":866,"author":{"gitId":"-"},"content":".Storage Component: Team Class Diagram"},{"lineNumber":867,"author":{"gitId":"-"},"content":"image::TeamStorageClassDiagram.png[width\u003d\"400\"]"},{"lineNumber":868,"author":{"gitId":"-"},"content":""},{"lineNumber":869,"author":{"gitId":"-"},"content":".UI Component: Team Class Diagram"},{"lineNumber":870,"author":{"gitId":"-"},"content":"image::TeamUiClassDiagram.png[width\u003d\"400\"]"},{"lineNumber":871,"author":{"gitId":"-"},"content":""},{"lineNumber":872,"author":{"gitId":"-"},"content":"Code snippet from `Team.java` that shows the constructor for `Team`."},{"lineNumber":873,"author":{"gitId":"-"},"content":""},{"lineNumber":874,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":875,"author":{"gitId":"-"},"content":"----"},{"lineNumber":876,"author":{"gitId":"-"},"content":"public class Team {"},{"lineNumber":877,"author":{"gitId":"-"},"content":" private final TeamName teamName;"},{"lineNumber":878,"author":{"gitId":"-"},"content":""},{"lineNumber":879,"author":{"gitId":"-"},"content":" public Team(TeamName teamName) {"},{"lineNumber":880,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;"},{"lineNumber":881,"author":{"gitId":"-"},"content":" }"},{"lineNumber":882,"author":{"gitId":"-"},"content":"}"},{"lineNumber":883,"author":{"gitId":"-"},"content":"----"},{"lineNumber":884,"author":{"gitId":"-"},"content":""},{"lineNumber":885,"author":{"gitId":"-"},"content":"For the application to store the information of `Team` into a list, we will need to introduce a new `UniqueTeamList` variable into the `AddressBook.java`, so that it will have a container for all the new `Team` objects that is going to be created in MTM."},{"lineNumber":886,"author":{"gitId":"-"},"content":""},{"lineNumber":887,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the declaration and initialization of `UniqueTeamList`."},{"lineNumber":888,"author":{"gitId":"-"},"content":""},{"lineNumber":889,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":890,"author":{"gitId":"-"},"content":"----"},{"lineNumber":891,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":892,"author":{"gitId":"-"},"content":" //...AddressBook code..."},{"lineNumber":893,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;"},{"lineNumber":894,"author":{"gitId":"-"},"content":""},{"lineNumber":895,"author":{"gitId":"-"},"content":" {"},{"lineNumber":896,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList;"},{"lineNumber":897,"author":{"gitId":"-"},"content":" }"},{"lineNumber":898,"author":{"gitId":"-"},"content":""},{"lineNumber":899,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {"},{"lineNumber":900,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);"},{"lineNumber":901,"author":{"gitId":"-"},"content":" }"},{"lineNumber":902,"author":{"gitId":"-"},"content":""},{"lineNumber":903,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":904,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {"},{"lineNumber":905,"author":{"gitId":"-"},"content":" return teams.asObservableList();"},{"lineNumber":906,"author":{"gitId":"-"},"content":" }"},{"lineNumber":907,"author":{"gitId":"-"},"content":" //...AddressBook code..."},{"lineNumber":908,"author":{"gitId":"-"},"content":"}"},{"lineNumber":909,"author":{"gitId":"-"},"content":"----"},{"lineNumber":910,"author":{"gitId":"-"},"content":""},{"lineNumber":911,"author":{"gitId":"-"},"content":"Since `Team` inherits the `UniquePersonList` class, we are able to store `Person` object into `Team` by using the super class method `add` in `UniquePersonList`. By storing a list of players inside `Team` object, future enhancements can easily make use of the data to perform functions that requires quick access to all players in a team. However, this have created a coupling in which data made to the `changes made to `AddressBook.persons` needs to be updated in `Team` to maintain synchronicity."},{"lineNumber":912,"author":{"gitId":"-"},"content":""},{"lineNumber":913,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the propagation of details updated in `Person` from the full player list to the `Person` objects in `Team`."},{"lineNumber":914,"author":{"gitId":"-"},"content":""},{"lineNumber":915,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":916,"author":{"gitId":"-"},"content":"----"},{"lineNumber":917,"author":{"gitId":"-"},"content":"public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":918,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":919,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":920,"author":{"gitId":"-"},"content":" //...syncEditedPerson initialisation..."},{"lineNumber":921,"author":{"gitId":"-"},"content":""},{"lineNumber":922,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":923,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);"},{"lineNumber":924,"author":{"gitId":"-"},"content":" }"},{"lineNumber":925,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);"},{"lineNumber":926,"author":{"gitId":"-"},"content":"}"},{"lineNumber":927,"author":{"gitId":"-"},"content":"----"},{"lineNumber":928,"author":{"gitId":"-"},"content":""},{"lineNumber":929,"author":{"gitId":"-"},"content":"An additional `TeamName` field is also added to `Person` so that the user can quickly determine the team the player is in through the use of `PREDICATE`."},{"lineNumber":930,"author":{"gitId":"-"},"content":""},{"lineNumber":931,"author":{"gitId":"-"},"content":"Code snippet from `Person.java` that shows the `TeamName` field."},{"lineNumber":932,"author":{"gitId":"-"},"content":""},{"lineNumber":933,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":934,"author":{"gitId":"-"},"content":"----"},{"lineNumber":935,"author":{"gitId":"-"},"content":"public class Person {"},{"lineNumber":936,"author":{"gitId":"-"},"content":""},{"lineNumber":937,"author":{"gitId":"-"},"content":" private final TeamName teamName;"},{"lineNumber":938,"author":{"gitId":"-"},"content":""},{"lineNumber":939,"author":{"gitId":"-"},"content":" public Person(Name name, Phone phone, Email email, Address address, Remark remark,"},{"lineNumber":940,"author":{"gitId":"-"},"content":" TeamName teamName, Set\u003cTag\u003e tags, Rating rating, Position position,"},{"lineNumber":941,"author":{"gitId":"-"},"content":" JerseyNumber jerseyNumber, Avatar avatar) {"},{"lineNumber":942,"author":{"gitId":"-"},"content":" //...attributes initialisation..."},{"lineNumber":943,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;"},{"lineNumber":944,"author":{"gitId":"-"},"content":" }"},{"lineNumber":945,"author":{"gitId":"-"},"content":""},{"lineNumber":946,"author":{"gitId":"-"},"content":" public TeamName getTeamName() {"},{"lineNumber":947,"author":{"gitId":"-"},"content":" return teamName;"},{"lineNumber":948,"author":{"gitId":"-"},"content":" }"},{"lineNumber":949,"author":{"gitId":"-"},"content":"}"},{"lineNumber":950,"author":{"gitId":"-"},"content":"----"},{"lineNumber":951,"author":{"gitId":"-"},"content":""},{"lineNumber":952,"author":{"gitId":"-"},"content":"Code snippet from `ModelManager.java` that shows the use of filtering the person list using the `TeamName` field in `Person`."},{"lineNumber":953,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":954,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":955,"author":{"gitId":"-"},"content":"----"},{"lineNumber":956,"author":{"gitId":"-"},"content":"@Override"},{"lineNumber":957,"author":{"gitId":"-"},"content":"public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {"},{"lineNumber":958,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);"},{"lineNumber":959,"author":{"gitId":"-"},"content":""},{"lineNumber":960,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();"},{"lineNumber":961,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":962,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {"},{"lineNumber":963,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));"},{"lineNumber":964,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":965,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();"},{"lineNumber":966,"author":{"gitId":"-"},"content":" }"},{"lineNumber":967,"author":{"gitId":"-"},"content":"}"},{"lineNumber":968,"author":{"gitId":"-"},"content":"----"},{"lineNumber":969,"author":{"gitId":"-"},"content":""},{"lineNumber":970,"author":{"gitId":"-"},"content":"Additional exception classes are also created so that these new exceptions can be thrown during the program, such that when these exceptions are thrown, the code is easily comprehensible."},{"lineNumber":971,"author":{"gitId":"-"},"content":""},{"lineNumber":972,"author":{"gitId":"-"},"content":".`TeamNotFoundException.java`"},{"lineNumber":973,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":974,"author":{"gitId":"-"},"content":"----"},{"lineNumber":975,"author":{"gitId":"-"},"content":"public class TeamNotFoundException extends Exception {"},{"lineNumber":976,"author":{"gitId":"-"},"content":" //...TeamNotFoundException..."},{"lineNumber":977,"author":{"gitId":"-"},"content":"}"},{"lineNumber":978,"author":{"gitId":"-"},"content":"----"},{"lineNumber":979,"author":{"gitId":"-"},"content":""},{"lineNumber":980,"author":{"gitId":"-"},"content":".`DupliecateTeamException.java`"},{"lineNumber":981,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":982,"author":{"gitId":"-"},"content":"----"},{"lineNumber":983,"author":{"gitId":"-"},"content":"public class DuplicateTeamException extends DuplicateDataException {"},{"lineNumber":984,"author":{"gitId":"-"},"content":" //...DuplicateTeamException..."},{"lineNumber":985,"author":{"gitId":"-"},"content":"}"},{"lineNumber":986,"author":{"gitId":"-"},"content":"----"},{"lineNumber":987,"author":{"gitId":"-"},"content":""},{"lineNumber":988,"author":{"gitId":"-"},"content":"Implementing a new component into MTM, the data consisting of `Team` is also stored into storage using `XmlAdaptedTeam.java` to format the output."},{"lineNumber":989,"author":{"gitId":"-"},"content":""},{"lineNumber":990,"author":{"gitId":"-"},"content":"Code snippet from `XmlAdaptedTeam.java` that shows the elements that will be stored into storage."},{"lineNumber":991,"author":{"gitId":"-"},"content":""},{"lineNumber":992,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":993,"author":{"gitId":"-"},"content":"----"},{"lineNumber":994,"author":{"gitId":"-"},"content":"public class XmlAdaptedTeam {"},{"lineNumber":995,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":996,"author":{"gitId":"-"},"content":" private String teamName;"},{"lineNumber":997,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":998,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();"},{"lineNumber":999,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1001,"author":{"gitId":"-"},"content":""},{"lineNumber":1002,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Team`"},{"lineNumber":1004,"author":{"gitId":"-"},"content":""},{"lineNumber":1005,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `Team` object stores a `Person` object that is also in `UniquePersonList` and `TeamName` is also an attribute of `Person`."},{"lineNumber":1006,"author":{"gitId":"-"},"content":"** Pros: Provides an easier lookup of person belonging in which team without the need of iterating through the `UniqueTeamList` for a specific `Person`, and provide ease of access to data for future enhancements."},{"lineNumber":1007,"author":{"gitId":"-"},"content":"** Cons: Checks to ensure synchronicity need to be done thoroughly to ensure that player information is in sync between Team and full player list"},{"lineNumber":1008,"author":{"gitId":"-"},"content":"* **Alternative 2:** `Team` object is stored in `Person` object as an attribute."},{"lineNumber":1009,"author":{"gitId":"-"},"content":"** Pros: Logical thought process to include `Team` as an attribute."},{"lineNumber":1010,"author":{"gitId":"-"},"content":"** Cons: Excess storage wasted due to duplicated data of `Team` in every `Person`."},{"lineNumber":1011,"author":{"gitId":"-"},"content":"// end::team[]"},{"lineNumber":1012,"author":{"gitId":"-"},"content":""},{"lineNumber":1013,"author":{"gitId":"-"},"content":"// tag::teamfunction[]"},{"lineNumber":1014,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Functions `[since v1.4]`"},{"lineNumber":1015,"author":{"gitId":"-"},"content":""},{"lineNumber":1016,"author":{"gitId":"-"},"content":"To assist the user with manging teams, we have decided to use the design concept of Create-Read-Update-Delete (CRUD) to implement commands related to `Team`."},{"lineNumber":1017,"author":{"gitId":"-"},"content":"This set of commands provide the basic necessities for the user to efficiently use our application."},{"lineNumber":1018,"author":{"gitId":"-"},"content":""},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1020,"author":{"gitId":"-"},"content":""},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Based on the principles of CRUD, we have created the commands that corresponds to each principles, namely, `create`, `view`, `rename` and `assign`, `remove`."},{"lineNumber":1022,"author":{"gitId":"-"},"content":"With these commands, the application is ready to support the features that the application is designed to be used."},{"lineNumber":1023,"author":{"gitId":"-"},"content":""},{"lineNumber":1024,"author":{"gitId":"-"},"content":"Team-related commands that modifies the data in the application, such as `create`, `rename`, `assign`, and `remove`, inherits from `UndoableCommand` class which makes all these commands undoable. Each command has its own `Parser` to uniquely parse user input arguments for the commands, so that it is validated and the command understand what it should be doing."},{"lineNumber":1025,"author":{"gitId":"-"},"content":""},{"lineNumber":1026,"author":{"gitId":"-"},"content":"For each feature, new functions are created in `AddressBook.java` and `ModelManager.java` so that the commands executed are able to manipulate the data accordingly."},{"lineNumber":1027,"author":{"gitId":"-"},"content":""},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `create`: Creates a `Team`, so that other team-related commands can be executed."},{"lineNumber":1029,"author":{"gitId":"-"},"content":"After the creation of a new team, the user will then be able to perform a new set of commands that performs team management functionality. Moreover, the `add` command can be used with the prefix `tm/` to immediately add the user into MTM and into the team specified."},{"lineNumber":1030,"author":{"gitId":"-"},"content":""},{"lineNumber":1031,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `create` command:"},{"lineNumber":1032,"author":{"gitId":"-"},"content":""},{"lineNumber":1033,"author":{"gitId":"-"},"content":".Logic Component: Create Sequence Diagram"},{"lineNumber":1034,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram1.png[width\u003d\"100%\"]"},{"lineNumber":1035,"author":{"gitId":"-"},"content":""},{"lineNumber":1036,"author":{"gitId":"-"},"content":".Model Component: Create Sequence Diagram"},{"lineNumber":1037,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram2.png[width\u003d\"70%\"]"},{"lineNumber":1038,"author":{"gitId":"-"},"content":""},{"lineNumber":1039,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `view`: Views a `Team`, which shows all players in the team."},{"lineNumber":1040,"author":{"gitId":"-"},"content":"The command uses the `filteredPersons` list, and an overloaded `updateFilteredPersonList` method that sets a predicate that filters the list based on a `TeamName`, in `ModelManager.java` so that it can be displayed via the UI."},{"lineNumber":1041,"author":{"gitId":"-"},"content":""},{"lineNumber":1042,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `view` command:"},{"lineNumber":1043,"author":{"gitId":"-"},"content":""},{"lineNumber":1044,"author":{"gitId":"-"},"content":".View Sequence Diagram"},{"lineNumber":1045,"author":{"gitId":"-"},"content":"image::TeamViewSequenceDiagram.png[width\u003d\"100%\"]"},{"lineNumber":1046,"author":{"gitId":"-"},"content":""},{"lineNumber":1047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `rename`: Renames a given `Team`."},{"lineNumber":1048,"author":{"gitId":"-"},"content":"The user can rename a specified team to a new team name only if the current team name does not existing in MTM. On a side note, it prevents the user from renaming the team to the same name that it currently have."},{"lineNumber":1049,"author":{"gitId":"-"},"content":""},{"lineNumber":1050,"author":{"gitId":"-"},"content":"This command will update the name of the teams that are in `teams` in `AddressBook.java` and will update all the players `TeamName` field in `persons` and `Team` with the new team name."},{"lineNumber":1051,"author":{"gitId":"-"},"content":""},{"lineNumber":1052,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `rename` command:"},{"lineNumber":1053,"author":{"gitId":"-"},"content":""},{"lineNumber":1054,"author":{"gitId":"-"},"content":".Logic Component: Rename Sequence Diagram"},{"lineNumber":1055,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram1.png[width\u003d\"100%\"]"},{"lineNumber":1056,"author":{"gitId":"-"},"content":""},{"lineNumber":1057,"author":{"gitId":"-"},"content":".Model Component: Rename Sequence Diagram"},{"lineNumber":1058,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram2.png[width\u003d\"70%\"]"},{"lineNumber":1059,"author":{"gitId":"-"},"content":""},{"lineNumber":1060,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `assign`: Assign a set of `Person` to a specified `Team`."},{"lineNumber":1061,"author":{"gitId":"-"},"content":"The core feature that organizes the player into teams so that the user can easily view the desired team players quickly. The command have 2 functions, firstly it is able to assign an individual or a set of players to a specified team, and secondly, it is able to unassign an individual or a set of players from any team."},{"lineNumber":1062,"author":{"gitId":"-"},"content":""},{"lineNumber":1063,"author":{"gitId":"-"},"content":"The command takes in a set of indexes that corresponds to the player in the current list, and will perform the assign operation in ascending index order. If the command is unable to process an index given, it will process all the valid index until the index that causes an issue."},{"lineNumber":1064,"author":{"gitId":"-"},"content":""},{"lineNumber":1065,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1066,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Typical issues that the command handles are,"},{"lineNumber":1068,"author":{"gitId":"-"},"content":""},{"lineNumber":1069,"author":{"gitId":"-"},"content":"* Assigning a player to the same team that it is currently in."},{"lineNumber":1070,"author":{"gitId":"-"},"content":"* Assigning a player to team that does not exist."},{"lineNumber":1071,"author":{"gitId":"-"},"content":"* Unassigning a player that does not exist in any team."},{"lineNumber":1072,"author":{"gitId":"-"},"content":"* Process index starting from 1."},{"lineNumber":1073,"author":{"gitId":"-"},"content":"* Removes all index that exceeds the current number of player listed."},{"lineNumber":1074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"-"},"content":"This command will update and synchronise all affected players in `persons` and in the specified `Team` object, such that their `TeamName` field in `Person` are updated with the new assigned or unassigned team. At the same time, the list of players in `Team` gets update if new player are assigned or unassigned."},{"lineNumber":1077,"author":{"gitId":"-"},"content":""},{"lineNumber":1078,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `assign` command:"},{"lineNumber":1079,"author":{"gitId":"-"},"content":""},{"lineNumber":1080,"author":{"gitId":"-"},"content":".Assign Sequence Diagram"},{"lineNumber":1081,"author":{"gitId":"-"},"content":"image::TeamAssignSequenceDiagram.png[width\u003d\"100%\"]"},{"lineNumber":1082,"author":{"gitId":"-"},"content":""},{"lineNumber":1083,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `remove`: Removes the given `Team`."},{"lineNumber":1084,"author":{"gitId":"-"},"content":"The final step in completing the CRUD design is the removal of team. It will delete the `Team` from `teams` list in `AddressBook.java` and will update all affected players in the team to be unassigned from the team by having their `TeamName` field updated with an unspecifed field."},{"lineNumber":1085,"author":{"gitId":"-"},"content":""},{"lineNumber":1086,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remove` command:"},{"lineNumber":1087,"author":{"gitId":"-"},"content":""},{"lineNumber":1088,"author":{"gitId":"-"},"content":".Logic Component: Remove Sequence Diagram"},{"lineNumber":1089,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram1.png[width\u003d\"100%\"]"},{"lineNumber":1090,"author":{"gitId":"-"},"content":""},{"lineNumber":1091,"author":{"gitId":"-"},"content":".Model Component: Remove Sequence Diagram"},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram2.png[width\u003d\"70%\"]"},{"lineNumber":1093,"author":{"gitId":"-"},"content":""},{"lineNumber":1094,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Team Functions"},{"lineNumber":1096,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Uses CRUD design concept to create new commands."},{"lineNumber":1097,"author":{"gitId":"-"},"content":"** Pros: Systematic approach in dealing with what functions should be created to ensure that the product has the features required to perform team management, and provides a platform to work on ideal features that target the needs of the audience."},{"lineNumber":1098,"author":{"gitId":"-"},"content":"** Cons: Simple and only captures the basic requirements of the product."},{"lineNumber":1099,"author":{"gitId":"-"},"content":"* **Alternative 2:** Implement commands based on suggested features."},{"lineNumber":1100,"author":{"gitId":"-"},"content":"** Pros: End product will have features that targets the need of the audiences."},{"lineNumber":1101,"author":{"gitId":"-"},"content":"** Cons: Possible to miss out basic and core features of a team management application."},{"lineNumber":1102,"author":{"gitId":"-"},"content":""},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Undoable commands for Team Functions"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Make all functions that modifies data to be undoable."},{"lineNumber":1105,"author":{"gitId":"-"},"content":"** Pros: Follows the current implementation of `undo` such that if data are modified in MTM, it will be an undoable command."},{"lineNumber":1106,"author":{"gitId":"-"},"content":"** Cons: Need to ensure that regression bugs are squashed when the new commands are executed, and time consuming in identifying regression."},{"lineNumber":1107,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make all functions not undoable."},{"lineNumber":1108,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and will produce lesser regression bugs."},{"lineNumber":1109,"author":{"gitId":"-"},"content":"** Cons: Does not align with the current implementation of `undo` \u0026 `redo`, and the user would require more steps to revert any changes made."},{"lineNumber":1110,"author":{"gitId":"-"},"content":"// end::teamfunction[]"},{"lineNumber":1111,"author":{"gitId":"-"},"content":""},{"lineNumber":1112,"author":{"gitId":"-"},"content":"// tag::showbestxi[]"},{"lineNumber":1113,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Show Best XI `[coming in v2.0]`"},{"lineNumber":1114,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1115,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1116,"author":{"gitId":"lohtianwei"},"content":"The `showBest` command is able to show the current team\u0027s best 11 players. There is however no functional implementation for this feature yet. Coming soon!"},{"lineNumber":1117,"author":{"gitId":"-"},"content":"// end::showbestxi[]"},{"lineNumber":1118,"author":{"gitId":"-"},"content":""},{"lineNumber":1119,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Usability Enhancements"},{"lineNumber":1120,"author":{"gitId":"-"},"content":""},{"lineNumber":1121,"author":{"gitId":"-"},"content":"// tag::key[]"},{"lineNumber":1122,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Toggle lock on MTM `[since v1.5]`"},{"lineNumber":1123,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1124,"author":{"gitId":"-"},"content":"Locking mechanism of MTM can be toggled on and off using the `Key` command. It utilises the Model to access"},{"lineNumber":1125,"author":{"gitId":"-"},"content":"user preferences of MTM. Current lock state and password is stored in `UserPrefs` in the Storage component."},{"lineNumber":1126,"author":{"gitId":"-"},"content":""},{"lineNumber":1127,"author":{"gitId":"lohtianwei"},"content":"This activity diagram shows the logic behind the `Key` command:"},{"lineNumber":1128,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1129,"author":{"gitId":"lohtianwei"},"content":".Key Activity Diagram"},{"lineNumber":1130,"author":{"gitId":"lohtianwei"},"content":"image::Keyactdiag.png[width\u003d\"900\"]"},{"lineNumber":1131,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1132,"author":{"gitId":"-"},"content":"Password checking done in `Key` command:"},{"lineNumber":1133,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1134,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1135,"author":{"gitId":"-"},"content":"private boolean correctPassword() {"},{"lineNumber":1136,"author":{"gitId":"-"},"content":" UserPrefs up \u003d model.getUserPrefs();"},{"lineNumber":1137,"author":{"gitId":"-"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":1138,"author":{"gitId":"-"},"content":" return hash.equals(up.getAddressBookHashedPass());"},{"lineNumber":1139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1140,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1141,"author":{"gitId":"-"},"content":"When password check is done, the lock on MTM is toggled to the state opposite of the current:"},{"lineNumber":1142,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1143,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1144,"author":{"gitId":"-"},"content":"if (correctPassword()) {"},{"lineNumber":1145,"author":{"gitId":"-"},"content":" if (model.getLockState()) {"},{"lineNumber":1146,"author":{"gitId":"-"},"content":" model.unlockAddressBookModel();"},{"lineNumber":1147,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1148,"author":{"gitId":"-"},"content":" model.lockAddressBookModel();"},{"lineNumber":1149,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1150,"author":{"gitId":"-"},"content":""},{"lineNumber":1151,"author":{"gitId":"-"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":1152,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":1153,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1154,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1155,"author":{"gitId":"-"},"content":""},{"lineNumber":1156,"author":{"gitId":"-"},"content":"In a locked state, only certain functions of MTM can be used. This is to prevent unauthorised tampering with the details"},{"lineNumber":1157,"author":{"gitId":"-"},"content":"stored on MTM."},{"lineNumber":1158,"author":{"gitId":"-"},"content":""},{"lineNumber":1159,"author":{"gitId":"-"},"content":"This is done in `AddressBookParser`. Commands are split into low level or not. When a command is"},{"lineNumber":1160,"author":{"gitId":"-"},"content":"being executed, it is checked if it falls under the low level category. If so, it would execute. When adding new features,"},{"lineNumber":1161,"author":{"gitId":"-"},"content":"add them to this list should you feel it is \u0027low level\u0027:"},{"lineNumber":1162,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1163,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1164,"author":{"gitId":"-"},"content":"private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {"},{"lineNumber":1165,"author":{"gitId":"-"},"content":" switch(commandWord) {"},{"lineNumber":1166,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_WORD:"},{"lineNumber":1167,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:"},{"lineNumber":1168,"author":{"gitId":"-"},"content":" return new ChangeThemeCommandParser().parse(arguments);"},{"lineNumber":1169,"author":{"gitId":"-"},"content":""},{"lineNumber":1170,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":1171,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":1172,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":1173,"author":{"gitId":"-"},"content":""},{"lineNumber":1174,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":1175,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":1176,"author":{"gitId":"-"},"content":" return new ListCommand();"},{"lineNumber":1177,"author":{"gitId":"-"},"content":""},{"lineNumber":1178,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_WORD:"},{"lineNumber":1179,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_ALIAS:"},{"lineNumber":1180,"author":{"gitId":"-"},"content":" return new KeyCommandParser().parse(arguments);"},{"lineNumber":1181,"author":{"gitId":"-"},"content":""},{"lineNumber":1182,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_WORD:"},{"lineNumber":1183,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_ALIAS:"},{"lineNumber":1184,"author":{"gitId":"-"},"content":" return new ViewCommandParser().parse(arguments);"},{"lineNumber":1185,"author":{"gitId":"-"},"content":""},{"lineNumber":1186,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":1187,"author":{"gitId":"-"},"content":" return new ExitCommand();"},{"lineNumber":1188,"author":{"gitId":"-"},"content":""},{"lineNumber":1189,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":1190,"author":{"gitId":"-"},"content":" return new HelpCommand();"},{"lineNumber":1191,"author":{"gitId":"-"},"content":""},{"lineNumber":1192,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":1193,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":1194,"author":{"gitId":"-"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":1195,"author":{"gitId":"-"},"content":""},{"lineNumber":1196,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":1197,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":1198,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1200,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1201,"author":{"gitId":"-"},"content":"If command being executed does not fall into the category of \u0027low level\u0027, a check on the lock state of MTM is done"},{"lineNumber":1202,"author":{"gitId":"-"},"content":"before allowing or restricting access:"},{"lineNumber":1203,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1204,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1205,"author":{"gitId":"-"},"content":"if (lockState) {"},{"lineNumber":1206,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_RESTRICTED);"},{"lineNumber":1207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1208,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1209,"author":{"gitId":"-"},"content":""},{"lineNumber":1210,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1211,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of locking MTM"},{"lineNumber":1212,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Lock is toggled with only a single command `Key`."},{"lineNumber":1213,"author":{"gitId":"-"},"content":"** Pros: Easy to implement, just check current lock state and switch it."},{"lineNumber":1214,"author":{"gitId":"-"},"content":"** Cons: With a toggle, user might unlock MTM thinking he/she is locking it."},{"lineNumber":1215,"author":{"gitId":"-"},"content":"* **Alternative 2:** Locking and unlocking of MTM is done with two separate commands."},{"lineNumber":1216,"author":{"gitId":"-"},"content":"** Pros: Ensures that when a lock is done, MTM is truly locked."},{"lineNumber":1217,"author":{"gitId":"-"},"content":"** Cons: Addtional command needs to be created, along with its command parser and implementations."},{"lineNumber":1218,"author":{"gitId":"-"},"content":"// end::key[]"},{"lineNumber":1219,"author":{"gitId":"-"},"content":""},{"lineNumber":1220,"author":{"gitId":"-"},"content":"// tag::changepass[]"},{"lineNumber":1221,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change Password `[coming in v2.0]`"},{"lineNumber":1222,"author":{"gitId":"-"},"content":""},{"lineNumber":1223,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1224,"author":{"gitId":"-"},"content":"Default password used for toggling lock on MTM is currently \u0027ilikesports\u0027. In an upcoming update, user would be able"},{"lineNumber":1225,"author":{"gitId":"-"},"content":"to change this password to one of his choosing. There is currently no functional implementation for this feature yet."},{"lineNumber":1226,"author":{"gitId":"-"},"content":"Coming soon!"},{"lineNumber":1227,"author":{"gitId":"-"},"content":"// end::changepass[]"},{"lineNumber":1228,"author":{"gitId":"-"},"content":""},{"lineNumber":1229,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d User Experience Enhancements"},{"lineNumber":1230,"author":{"gitId":"-"},"content":""},{"lineNumber":1231,"author":{"gitId":"-"},"content":"// tag::autocomplete[]"},{"lineNumber":1232,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Tab Autocomplete"},{"lineNumber":1233,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1234,"author":{"gitId":"-"},"content":""},{"lineNumber":1235,"author":{"gitId":"-"},"content":"The tab autocomplete feature works by handling the Tab key pressed event, searching for any commands with matching prefix and returns one if found."},{"lineNumber":1236,"author":{"gitId":"-"},"content":"The command strings are stored in a Trie data structure, named `CommandTrie`, for optimal search."},{"lineNumber":1237,"author":{"gitId":"-"},"content":""},{"lineNumber":1238,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1239,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1240,"author":{"gitId":"-"},"content":"public class CommandTrie {"},{"lineNumber":1241,"author":{"gitId":"-"},"content":" String attemptAutoComplete (String input);"},{"lineNumber":1242,"author":{"gitId":"-"},"content":" void insert (String input);"},{"lineNumber":1243,"author":{"gitId":"-"},"content":" Set\u003cString\u003e getCommandSet();"},{"lineNumber":1244,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1245,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1246,"author":{"gitId":"-"},"content":""},{"lineNumber":1247,"author":{"gitId":"-"},"content":"The trie is made up of `TrieNode` objects which contains three objects. The `TrieNode sibling` represents a character on the same level as the current one. The `TrieNode child` represents a next possible letter."},{"lineNumber":1248,"author":{"gitId":"-"},"content":"For example in the words `edit` and `exit`, the node for `d` would have a child `i` and a sibling `x`. `x` would have a child `i`."},{"lineNumber":1249,"author":{"gitId":"-"},"content":""},{"lineNumber":1250,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1251,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1252,"author":{"gitId":"-"},"content":"public class TrieNode {"},{"lineNumber":1253,"author":{"gitId":"-"},"content":""},{"lineNumber":1254,"author":{"gitId":"-"},"content":" private TrieNode sibling;"},{"lineNumber":1255,"author":{"gitId":"-"},"content":" private TrieNode child;"},{"lineNumber":1256,"author":{"gitId":"-"},"content":" private char key;"},{"lineNumber":1257,"author":{"gitId":"-"},"content":" ..."},{"lineNumber":1258,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1259,"author":{"gitId":"-"},"content":""},{"lineNumber":1260,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1261,"author":{"gitId":"-"},"content":"Upon the pressing of the tab key, the command box calls `attemptAutoComplete`, in the `commandTrie` class. With the content of the command box as the query, attemptAutoComplete searches for the query using the standard Trie search algortihm."},{"lineNumber":1262,"author":{"gitId":"-"},"content":"If the query prefix itself is not present in the trie, then the attempt fails. If the query reaches a `TrieNode` with a `sibling` or `child` `TrieNode`,"},{"lineNumber":1263,"author":{"gitId":"-"},"content":"it will provide the user with possible commands for a given input. In this case, a dropdown box will appear in the UI that lists the possible commands for the user."},{"lineNumber":1264,"author":{"gitId":"-"},"content":""},{"lineNumber":1265,"author":{"gitId":"-"},"content":"Upon finding a matching command, `attemptAutoComplete` returns it and replaces the text in the Command Line. If the no matching command is found, the text is turned red."},{"lineNumber":1266,"author":{"gitId":"-"},"content":"// end::autocomplete[]"},{"lineNumber":1267,"author":{"gitId":"-"},"content":""},{"lineNumber":1268,"author":{"gitId":"-"},"content":"// tag::enhancedadd[]"},{"lineNumber":1269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Optional Field Add Command `[since v1.1]`"},{"lineNumber":1270,"author":{"gitId":"-"},"content":""},{"lineNumber":1271,"author":{"gitId":"-"},"content":"MTM is designed to manage a multitude of players and the main function that would be used repetitively is the `add` command, hence it would alleviate the cumbersomeness of entering every detail of the players when you want the command to be executed quickly."},{"lineNumber":1272,"author":{"gitId":"-"},"content":"Having the option to only entering the mandatory fields and leaving the optional ones empty will make the process of adding players more efficient."},{"lineNumber":1273,"author":{"gitId":"-"},"content":""},{"lineNumber":1274,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1275,"author":{"gitId":"-"},"content":"This mechanism enhances the original implementation of the `add` command."},{"lineNumber":1276,"author":{"gitId":"-"},"content":"The required fields that are mandatory to be filled by the user are `n/NAME` and `e/EMAIL`."},{"lineNumber":1277,"author":{"gitId":"-"},"content":"This implementation of making fields optional for `AddCommand` allows user to add players without their full information, and can be updated accordingly when the user retrieves their full information."},{"lineNumber":1278,"author":{"gitId":"-"},"content":""},{"lineNumber":1279,"author":{"gitId":"-"},"content":"Code snippet from `ParserUtil.java` that shows the implementation of when a field is left empty."},{"lineNumber":1280,"author":{"gitId":"-"},"content":"\"\u003cUNSPECIFIED\u003e\" string will be return when the value passed in is empty."},{"lineNumber":1281,"author":{"gitId":"-"},"content":""},{"lineNumber":1282,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1283,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1284,"author":{"gitId":"-"},"content":"public class ParserUtil {"},{"lineNumber":1285,"author":{"gitId":"-"},"content":" public static final String UNSPECIFIED_FIELD \u003d \"\u003cUNSPECIFIED\u003e\";"},{"lineNumber":1286,"author":{"gitId":"-"},"content":" //...ParserUtil code..."},{"lineNumber":1287,"author":{"gitId":"-"},"content":""},{"lineNumber":1288,"author":{"gitId":"-"},"content":" public static Optional\u003cString\u003e parseValue(Optional\u003cString\u003e value, String messageConstraints)"},{"lineNumber":1289,"author":{"gitId":"-"},"content":" throws IllegalValueException {"},{"lineNumber":1290,"author":{"gitId":"-"},"content":" if (value.isPresent() \u0026\u0026 value.get().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":1291,"author":{"gitId":"-"},"content":" throw new IllegalValueException(messageConstraints);"},{"lineNumber":1292,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":1293,"author":{"gitId":"-"},"content":" return Optional.of(value.orElse(UNSPECIFIED_FIELD));"},{"lineNumber":1294,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1295,"author":{"gitId":"-"},"content":" //...ParserUtil code ..."},{"lineNumber":1296,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1297,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1298,"author":{"gitId":"-"},"content":""},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows the usage of parsing fields that are set as optional."},{"lineNumber":1300,"author":{"gitId":"-"},"content":""},{"lineNumber":1301,"author":{"gitId":"-"},"content":"[source,java]"},{"lineNumber":1302,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1303,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {"},{"lineNumber":1304,"author":{"gitId":"-"},"content":" //...tokenize arguments..."},{"lineNumber":1305,"author":{"gitId":"-"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_EMAIL)"},{"lineNumber":1306,"author":{"gitId":"-"},"content":" || !argMultimap.getPreamble().isEmpty()) {"},{"lineNumber":1307,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,"},{"lineNumber":1308,"author":{"gitId":"-"},"content":" AddCommand.MESSAGE_USAGE));"},{"lineNumber":1309,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1310,"author":{"gitId":"-"},"content":""},{"lineNumber":1311,"author":{"gitId":"-"},"content":" //...get person details from arguments..."},{"lineNumber":1312,"author":{"gitId":"-"},"content":" Address address \u003d ParserUtil.parseAddress(ParserUtil.parseValue(argMultimap"},{"lineNumber":1313,"author":{"gitId":"-"},"content":" .getValue(PREFIX_ADDRESS), Address.MESSAGE_ADDRESS_CONSTRAINTS)).get();"},{"lineNumber":1314,"author":{"gitId":"-"},"content":""},{"lineNumber":1315,"author":{"gitId":"-"},"content":" return new AddCommand(person);"},{"lineNumber":1316,"author":{"gitId":"-"},"content":" //...AddCommandParser code..."},{"lineNumber":1317,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1318,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1319,"author":{"gitId":"-"},"content":""},{"lineNumber":1320,"author":{"gitId":"-"},"content":"Code snippet from `Address.java` that shows an example of an optional field being valid when not specified."},{"lineNumber":1321,"author":{"gitId":"-"},"content":""},{"lineNumber":1322,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1323,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1324,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":1325,"author":{"gitId":"-"},"content":" //...Address code..."},{"lineNumber":1326,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":1327,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":1328,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1329,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1330,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1331,"author":{"gitId":"-"},"content":""},{"lineNumber":1332,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration"},{"lineNumber":1333,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Optional fields"},{"lineNumber":1334,"author":{"gitId":"-"},"content":""},{"lineNumber":1335,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Set a default value for unspecified fields and parse fields that are mandatory."},{"lineNumber":1336,"author":{"gitId":"-"},"content":"** Pros: Easy to implement as fields are still filled with information even though user did not specify."},{"lineNumber":1337,"author":{"gitId":"-"},"content":"** Cons: Unattractive display of fields when it is unspecified."},{"lineNumber":1338,"author":{"gitId":"-"},"content":"* **Alternative 2:** Require users to input all fields."},{"lineNumber":1339,"author":{"gitId":"-"},"content":"** Pros: The current implementation is used, hence there is no additional code to ensure validity of unspecified input."},{"lineNumber":1340,"author":{"gitId":"-"},"content":"** Cons: Less flexibility is given to the user when adding a player into the application."},{"lineNumber":1341,"author":{"gitId":"-"},"content":"// end::enhancedadd[]"},{"lineNumber":1342,"author":{"gitId":"-"},"content":""},{"lineNumber":1343,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI Enhancements"},{"lineNumber":1344,"author":{"gitId":"-"},"content":""},{"lineNumber":1345,"author":{"gitId":"-"},"content":"// tag::teamDisplay[]"},{"lineNumber":1346,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Team Display Bar `[since v1.3]`"},{"lineNumber":1347,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1348,"author":{"gitId":"-"},"content":""},{"lineNumber":1349,"author":{"gitId":"codeeong"},"content":"The Team Display Bar is implemented as `TeamDisplay` in the UI Component and renders `TeamDisplay.fxml`."},{"lineNumber":1350,"author":{"gitId":"codeeong"},"content":"It is called from `MainWindow` and highlights"},{"lineNumber":1351,"author":{"gitId":"codeeong"},"content":"the current team that has been selected in the Command Line Interface by the user. +"},{"lineNumber":1352,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1353,"author":{"gitId":"codeeong"},"content":"It calls the `Team` model and displays the `Player` cards associated with that `Team`."},{"lineNumber":1354,"author":{"gitId":"codeeong"},"content":"It contains event handler methods such as handleShowNewTeamEvent(), handleHighlightSelectedTeamEvent(),"},{"lineNumber":1355,"author":{"gitId":"codeeong"},"content":"and handleDeselectTeamEvent(), which update the UI accordingly. +"},{"lineNumber":1356,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1357,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `TeamDisplay` below, using the example of a `create` command:"},{"lineNumber":1358,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1359,"author":{"gitId":"codeeong"},"content":".Component interactions for `create Team` command"},{"lineNumber":1360,"author":{"gitId":"codeeong"},"content":"image::ShowNewTeamDiagram.png[width\u003d\"800\"]"},{"lineNumber":1361,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1362,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1363,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027TeamDisplay\u0027 to show initialisation of UI component and event handlers:"},{"lineNumber":1364,"author":{"gitId":"-"},"content":""},{"lineNumber":1365,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1366,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1367,"author":{"gitId":"-"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {"},{"lineNumber":1368,"author":{"gitId":"-"},"content":""},{"lineNumber":1369,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";"},{"lineNumber":1370,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1371,"author":{"gitId":"-"},"content":" public TeamDisplay() {"},{"lineNumber":1372,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":1373,"author":{"gitId":"codeeong"},"content":" //...initialise Teams code..."},{"lineNumber":1374,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":1375,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1376,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1377,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1378,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {"},{"lineNumber":1379,"author":{"gitId":"codeeong"},"content":" //...handleShowNewTeamEvent code..."},{"lineNumber":1380,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1381,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1382,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1383,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {"},{"lineNumber":1384,"author":{"gitId":"codeeong"},"content":" //...handleHighlightSelectedTeamEvent code..."},{"lineNumber":1385,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1386,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1387,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1388,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {"},{"lineNumber":1389,"author":{"gitId":"codeeong"},"content":" //...handleDeselectTeamEvent code..."},{"lineNumber":1390,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1391,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1392,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1393,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1394,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1395,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience"},{"lineNumber":1396,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1397,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `TeamDisplay` is placed underneath the `ResultDisplay` and above the `PersonListPanel`."},{"lineNumber":1398,"author":{"gitId":"-"},"content":"** Pros: Located at an obvious location for the user to view the team currently selected."},{"lineNumber":1399,"author":{"gitId":"-"},"content":"** Cons: There will be less space for the `ResultDisplay` and `CommandBox`."},{"lineNumber":1400,"author":{"gitId":"-"},"content":"* **Alternative 2:** `TeamDisplay` is placed on the left of the `PersonListPanel` as a vertical bar."},{"lineNumber":1401,"author":{"gitId":"-"},"content":"** Pros: There will be more space for the `ResultDisplay` and `CommandBox`."},{"lineNumber":1402,"author":{"gitId":"-"},"content":"** Cons: It is less obvious to the user as it is at the side."},{"lineNumber":1403,"author":{"gitId":"-"},"content":"// end::teamDisplay[]"},{"lineNumber":1404,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1405,"author":{"gitId":"-"},"content":"// tag::PlayerDetails[]"},{"lineNumber":1406,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Player Details Pane `[since v1.4]`"},{"lineNumber":1407,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1408,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1409,"author":{"gitId":"codeeong"},"content":"The `Player Details` pane is implemented as `PlayerDetails` in the UI Component."},{"lineNumber":1410,"author":{"gitId":"codeeong"},"content":"It is called from `PlayerListPanel`. It renders `PlayerDetails.fxml` and displays the selected `PersonCard`."},{"lineNumber":1411,"author":{"gitId":"codeeong"},"content":"It calls the `Person` model and displays the fields in the `Person` model that are not displayed in the left panel."},{"lineNumber":1412,"author":{"gitId":"codeeong"},"content":"It contains the event handler method handlePersonDetailsChangedEvent(), which updates the UI component when the `edit `"},{"lineNumber":1413,"author":{"gitId":"codeeong"},"content":"or `remark` commands are entered. +"},{"lineNumber":1414,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1415,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `PlayerDetails` below, using the example of a `remark` command:"},{"lineNumber":1416,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1417,"author":{"gitId":"codeeong"},"content":".Component interactions for `remark 1 r/test` command"},{"lineNumber":1418,"author":{"gitId":"codeeong"},"content":"image::PlayerDetailsDiagram.png[width\u003d\"800\"]"},{"lineNumber":1419,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1420,"author":{"gitId":"-"},"content":"Code snippet from \u0027PlayerDetails\u0027 to show initialisation of UI component:"},{"lineNumber":1421,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1422,"author":{"gitId":"-"},"content":"[source, java]"},{"lineNumber":1423,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1424,"author":{"gitId":"-"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {"},{"lineNumber":1425,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1426,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";"},{"lineNumber":1427,"author":{"gitId":"-"},"content":" public final Person person;"},{"lineNumber":1428,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1429,"author":{"gitId":"-"},"content":" public PlayerDetails(Person person) {"},{"lineNumber":1430,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":1431,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":1432,"author":{"gitId":"-"},"content":" //....player details code..."},{"lineNumber":1433,"author":{"gitId":"-"},"content":" }"},{"lineNumber":1434,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1435,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":1436,"author":{"gitId":"codeeong"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {"},{"lineNumber":1437,"author":{"gitId":"codeeong"},"content":" ...handlePersonDetailsChangedEvent code..."},{"lineNumber":1438,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1439,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1440,"author":{"gitId":"-"},"content":"}"},{"lineNumber":1441,"author":{"gitId":"-"},"content":"----"},{"lineNumber":1442,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1443,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1444,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience"},{"lineNumber":1445,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1446,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `PlayerDetails` is placed on the right of `Person List Panel`, replacing the `BrowserPanel`."},{"lineNumber":1447,"author":{"gitId":"-"},"content":"** Pros: It is the only large unused space in the software left and is right beside the `Person List Panel`, thus is the logical"},{"lineNumber":1448,"author":{"gitId":"-"},"content":"place to look at after selection of a person card."},{"lineNumber":1449,"author":{"gitId":"-"},"content":"** Cons: This is a lot of whitespace in the pane as are not many fields."},{"lineNumber":1450,"author":{"gitId":"-"},"content":"* **Alternative 2:** `PlayerDetails` pane size is reduced and the extra space is repurposed."},{"lineNumber":1451,"author":{"gitId":"-"},"content":"** Pros: There will be more space for another new feature e.g. calendar."},{"lineNumber":1452,"author":{"gitId":"-"},"content":"** Cons: It can only be implemented in v2.0 due to time constraints in development."},{"lineNumber":1453,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1454,"author":{"gitId":"codeeong"},"content":"// end::PlayerDetails[]"},{"lineNumber":1455,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1456,"author":{"gitId":"codeeong"},"content":"// tag::changeThemeCommand[]"},{"lineNumber":1457,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Change Theme Command `[since v1.5]`"},{"lineNumber":1458,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1459,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1460,"author":{"gitId":"codeeong"},"content":"The `ChangeThemeCommand` is a new feature that allows user to change the current theme to another theme. A new css class is implemented to accommodate the new theme, LightTheme."},{"lineNumber":1461,"author":{"gitId":"codeeong"},"content":"The `MainWindow` class is also changed to contain a handleChangeThemeRequestEvent() method which is an event handler to `setAddressBookTheme`,"},{"lineNumber":1462,"author":{"gitId":"codeeong"},"content":"which is a method in `UserPrefs`. +"},{"lineNumber":1463,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1464,"author":{"gitId":"codeeong"},"content":"Below is the sequence diagram for how the `ChangeThemeCommand` works:"},{"lineNumber":1465,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1466,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `changeTheme` Command"},{"lineNumber":1467,"author":{"gitId":"codeeong"},"content":"image::ChangeThemeDiagram.png[width\u003d\"800\"]"},{"lineNumber":1468,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1469,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1470,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027ChangeThemeCommand\u0027:"},{"lineNumber":1471,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1472,"author":{"gitId":"codeeong"},"content":"[source, java]"},{"lineNumber":1473,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1474,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {"},{"lineNumber":1475,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1476,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {"},{"lineNumber":1477,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();"},{"lineNumber":1478,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1479,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1480,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":1481,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":1482,"author":{"gitId":"codeeong"},"content":" //...check for valid theme code..."},{"lineNumber":1483,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));"},{"lineNumber":1484,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));"},{"lineNumber":1485,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1486,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":1487,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1488,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1489,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1490,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Command Syntax"},{"lineNumber":1491,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1492,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** The command syntax is in the form \"changeTheme Dark\" or \"changeTheme Light\"."},{"lineNumber":1493,"author":{"gitId":"codeeong"},"content":"** Pros: This supports future implementation of more themes, so that the developer can easily add the new themes without"},{"lineNumber":1494,"author":{"gitId":"codeeong"},"content":"having to change the execution."},{"lineNumber":1495,"author":{"gitId":"codeeong"},"content":"** Cons: The command is longer than it could be. (see alternative 2)"},{"lineNumber":1496,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** The command syntax in the form \"changeTheme\", which would automatically toggle the theme."},{"lineNumber":1497,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly."},{"lineNumber":1498,"author":{"gitId":"codeeong"},"content":"** Cons: Future implementation of more themes would be harder for the developer as the toggle function would have to be"},{"lineNumber":1499,"author":{"gitId":"codeeong"},"content":"changed quite drastically to become a command for selecting a theme out of multiple themes."},{"lineNumber":1500,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1501,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience"},{"lineNumber":1502,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1503,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** `ChangeThemeCommand` is implemented as a CLI command."},{"lineNumber":1504,"author":{"gitId":"codeeong"},"content":"** Pros: Consistent with the rest of the application, of which all changes are made by the CLI."},{"lineNumber":1505,"author":{"gitId":"codeeong"},"content":"** Cons: User has yet another command to remember the syntax of."},{"lineNumber":1506,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** Change of theme is implemented as a button to change onClick."},{"lineNumber":1507,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly."},{"lineNumber":1508,"author":{"gitId":"codeeong"},"content":"** Cons: Inconsistent with the rest of the application, which is CLI-based."},{"lineNumber":1509,"author":{"gitId":"codeeong"},"content":"// end::changeThemeCommand[]"},{"lineNumber":1510,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1511,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1512,"author":{"gitId":"codeeong"},"content":"// tag::settagcolour[]"},{"lineNumber":1513,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Set Tag Colour feature `[since v1.1]`"},{"lineNumber":1514,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation"},{"lineNumber":1515,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1516,"author":{"gitId":"codeeong"},"content":"The `Set` Command is an entirely new command that allows the user to assign a colour to a specific tag."},{"lineNumber":1517,"author":{"gitId":"codeeong"},"content":"This mechanism is facilitated by the `SetCommandParser`, which creates and returns a new `SetCommand`."},{"lineNumber":1518,"author":{"gitId":"codeeong"},"content":"In `SetCommandParser`, which implements the `Parser` interface, it parses the arguments inputted into the CLI, and checks whether the arguments are valid."},{"lineNumber":1519,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1520,"author":{"gitId":"codeeong"},"content":"`SetCommandParser` is implemented as such:"},{"lineNumber":1521,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1522,"author":{"gitId":"codeeong"},"content":"[source, java]"},{"lineNumber":1523,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1524,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {"},{"lineNumber":1525,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1526,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {"},{"lineNumber":1527,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1528,"author":{"gitId":"codeeong"},"content":" // ...parse arguments and check for invalid arguments..."},{"lineNumber":1529,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1530,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":1531,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1532,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1533,"author":{"gitId":"codeeong"},"content":"`SetCommand` inherits the abstract `Command` class. After `execute()` is called in `SetCommand`, the tag colour is set through the logic portions of `ModelManager` and `AddressBook`, then"},{"lineNumber":1534,"author":{"gitId":"codeeong"},"content":"lastly changes `tagColour` attribute within the `Tag` object itself. It also posts an event in `SetCommand`, to which"},{"lineNumber":1535,"author":{"gitId":"codeeong"},"content":"its handler in `PersonCard` responds and performs the UI update. +"},{"lineNumber":1536,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1537,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1538,"author":{"gitId":"codeeong"},"content":"`SetCommand` is implemented in this way:"},{"lineNumber":1539,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1540,"author":{"gitId":"codeeong"},"content":"[source, java]"},{"lineNumber":1541,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1542,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {"},{"lineNumber":1543,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1544,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;"},{"lineNumber":1545,"author":{"gitId":"codeeong"},"content":" private final String tagColour;"},{"lineNumber":1546,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1547,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {"},{"lineNumber":1548,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);"},{"lineNumber":1549,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;"},{"lineNumber":1550,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;"},{"lineNumber":1551,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1552,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1553,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":1554,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {"},{"lineNumber":1555,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);"},{"lineNumber":1556,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);"},{"lineNumber":1557,"author":{"gitId":"codeeong"},"content":" //...check for valid tagName code...."},{"lineNumber":1558,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));"},{"lineNumber":1559,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));"},{"lineNumber":1560,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":1561,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":1562,"author":{"gitId":"codeeong"},"content":"----"},{"lineNumber":1563,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1564,"author":{"gitId":"codeeong"},"content":"The following sequence diagram shows how the set command operation works:"},{"lineNumber":1565,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1566,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `setTagColour` Command"},{"lineNumber":1567,"author":{"gitId":"codeeong"},"content":"image::SetTagCommandDiagram.png[width\u003d\"800\"]"},{"lineNumber":1568,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1569,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations"},{"lineNumber":1570,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Command` vs `UndoableCommand`"},{"lineNumber":1571,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1572,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** Inherit from `Command`."},{"lineNumber":1573,"author":{"gitId":"codeeong"},"content":"** Pros: Does not involve complicated undo/redo tests, simple and quicker implementation,"},{"lineNumber":1574,"author":{"gitId":"codeeong"},"content":"lessen chances of mistakes made in implementation."},{"lineNumber":1575,"author":{"gitId":"codeeong"},"content":"** Cons: User cannot use the `undo/redo` command."},{"lineNumber":1576,"author":{"gitId":"codeeong"},"content":"* **Alternative 2 :** Inherit from `UndoableCommand`."},{"lineNumber":1577,"author":{"gitId":"codeeong"},"content":"** Pros: User can utilise the `undo/redo` command."},{"lineNumber":1578,"author":{"gitId":"codeeong"},"content":"** Cons: Hard for developers to implement extra tests, not very necessary as users can just as easily type"},{"lineNumber":1579,"author":{"gitId":"codeeong"},"content":"out the colour they would like to change their tag to; it is a short command, especially with the `stc` alias."},{"lineNumber":1580,"author":{"gitId":"codeeong"},"content":"// end::settagcolour[]"},{"lineNumber":1581,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1582,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation"},{"lineNumber":1583,"author":{"gitId":"-"},"content":""},{"lineNumber":1584,"author":{"gitId":"-"},"content":"We use https://asciidoctor.org[asciidoc] for writing documentation."},{"lineNumber":1585,"author":{"gitId":"-"},"content":""},{"lineNumber":1586,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1587,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting."},{"lineNumber":1588,"author":{"gitId":"-"},"content":""},{"lineNumber":1589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation"},{"lineNumber":1590,"author":{"gitId":"-"},"content":""},{"lineNumber":1591,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits."},{"lineNumber":1592,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time."},{"lineNumber":1593,"author":{"gitId":"-"},"content":""},{"lineNumber":1594,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation"},{"lineNumber":1595,"author":{"gitId":"-"},"content":""},{"lineNumber":1596,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis."},{"lineNumber":1597,"author":{"gitId":"-"},"content":""},{"lineNumber":1598,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format"},{"lineNumber":1599,"author":{"gitId":"-"},"content":""},{"lineNumber":1600,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages."},{"lineNumber":1601,"author":{"gitId":"-"},"content":""},{"lineNumber":1602,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format."},{"lineNumber":1603,"author":{"gitId":"-"},"content":""},{"lineNumber":1604,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format."},{"lineNumber":1605,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`."},{"lineNumber":1606,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu."},{"lineNumber":1607,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below."},{"lineNumber":1608,"author":{"gitId":"-"},"content":""},{"lineNumber":1609,"author":{"gitId":"-"},"content":".Saving documentation as PDF files in Chrome"},{"lineNumber":1610,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]"},{"lineNumber":1611,"author":{"gitId":"-"},"content":""},{"lineNumber":1612,"author":{"gitId":"-"},"content":"[[Testing]]"},{"lineNumber":1613,"author":{"gitId":"-"},"content":"\u003d\u003d Testing"},{"lineNumber":1614,"author":{"gitId":"codeeong"},"content":"If you are intending to develop our software further, it is highly recommended that you run tests in the ways listed below."},{"lineNumber":1615,"author":{"gitId":"-"},"content":""},{"lineNumber":1616,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests"},{"lineNumber":1617,"author":{"gitId":"-"},"content":""},{"lineNumber":1618,"author":{"gitId":"-"},"content":"There are three ways to run tests."},{"lineNumber":1619,"author":{"gitId":"-"},"content":""},{"lineNumber":1620,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":1621,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies."},{"lineNumber":1622,"author":{"gitId":"-"},"content":""},{"lineNumber":1623,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*"},{"lineNumber":1624,"author":{"gitId":"-"},"content":""},{"lineNumber":1625,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`"},{"lineNumber":1626,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`"},{"lineNumber":1627,"author":{"gitId":"-"},"content":""},{"lineNumber":1628,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*"},{"lineNumber":1629,"author":{"gitId":"-"},"content":""},{"lineNumber":1630,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)"},{"lineNumber":1631,"author":{"gitId":"-"},"content":""},{"lineNumber":1632,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1633,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle."},{"lineNumber":1634,"author":{"gitId":"-"},"content":""},{"lineNumber":1635,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*"},{"lineNumber":1636,"author":{"gitId":"-"},"content":""},{"lineNumber":1637,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running."},{"lineNumber":1638,"author":{"gitId":"-"},"content":""},{"lineNumber":1639,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)"},{"lineNumber":1640,"author":{"gitId":"-"},"content":""},{"lineNumber":1641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests"},{"lineNumber":1642,"author":{"gitId":"-"},"content":""},{"lineNumber":1643,"author":{"gitId":"-"},"content":"We have two types of tests:"},{"lineNumber":1644,"author":{"gitId":"-"},"content":""},{"lineNumber":1645,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,"},{"lineNumber":1646,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package."},{"lineNumber":1647,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package."},{"lineNumber":1648,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,"},{"lineNumber":1649,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +"},{"lineNumber":1650,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`"},{"lineNumber":1651,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +"},{"lineNumber":1652,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`"},{"lineNumber":1653,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +"},{"lineNumber":1654,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`"},{"lineNumber":1655,"author":{"gitId":"-"},"content":""},{"lineNumber":1656,"author":{"gitId":"-"},"content":""},{"lineNumber":1657,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing"},{"lineNumber":1658,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**"},{"lineNumber":1659,"author":{"gitId":"-"},"content":""},{"lineNumber":1660,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing."},{"lineNumber":1661,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`."},{"lineNumber":1662,"author":{"gitId":"-"},"content":""},{"lineNumber":1663,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops"},{"lineNumber":1664,"author":{"gitId":"codeeong"},"content":"This section covers resources for you to develop this software with good practices and prepare it for release."},{"lineNumber":1665,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation"},{"lineNumber":1667,"author":{"gitId":"-"},"content":""},{"lineNumber":1668,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation."},{"lineNumber":1669,"author":{"gitId":"-"},"content":""},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration"},{"lineNumber":1671,"author":{"gitId":"-"},"content":""},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details."},{"lineNumber":1673,"author":{"gitId":"-"},"content":""},{"lineNumber":1674,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coverage Reporting"},{"lineNumber":1675,"author":{"gitId":"-"},"content":""},{"lineNumber":1676,"author":{"gitId":"-"},"content":"We use https://coveralls.io/[Coveralls] to track the code coverage of our projects. See \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e for more details."},{"lineNumber":1677,"author":{"gitId":"-"},"content":""},{"lineNumber":1678,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Documentation Previews"},{"lineNumber":1679,"author":{"gitId":"-"},"content":"When a pull request has changes to asciidoc files, you can use https://www.netlify.com/[Netlify] to see a preview of how the HTML version of those asciidoc files will look like when the pull request is merged. See \u003c\u003cUsingNetlify#, UsingNetlify.adoc\u003e\u003e for more details."},{"lineNumber":1680,"author":{"gitId":"-"},"content":""},{"lineNumber":1681,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release"},{"lineNumber":1682,"author":{"gitId":"-"},"content":""},{"lineNumber":1683,"author":{"gitId":"-"},"content":"Here are the steps to create a new release."},{"lineNumber":1684,"author":{"gitId":"-"},"content":""},{"lineNumber":1685,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]."},{"lineNumber":1686,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e."},{"lineNumber":1687,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`"},{"lineNumber":1688,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created."},{"lineNumber":1689,"author":{"gitId":"-"},"content":""},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies"},{"lineNumber":1691,"author":{"gitId":"-"},"content":""},{"lineNumber":1692,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +"},{"lineNumber":1693,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +"},{"lineNumber":1694,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)"},{"lineNumber":1695,"author":{"gitId":"-"},"content":""},{"lineNumber":1696,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d Product Scope"},{"lineNumber":1698,"author":{"gitId":"-"},"content":""},{"lineNumber":1699,"author":{"gitId":"codeeong"},"content":"This section tells you more details of our software, our target users, the user stories, and gives you a sneak peak into our development process."},{"lineNumber":1700,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1701,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Target user profile:"},{"lineNumber":1702,"author":{"gitId":"-"},"content":""},{"lineNumber":1703,"author":{"gitId":"lohtianwei"},"content":"* football team managers"},{"lineNumber":1704,"author":{"gitId":"-"},"content":"* has a need to manage a significant number of contacts"},{"lineNumber":1705,"author":{"gitId":"-"},"content":"* prefer desktop apps over other types"},{"lineNumber":1706,"author":{"gitId":"-"},"content":"* can type fast"},{"lineNumber":1707,"author":{"gitId":"-"},"content":"* prefers typing over mouse input"},{"lineNumber":1708,"author":{"gitId":"-"},"content":"* is reasonably comfortable using CLI apps"},{"lineNumber":1709,"author":{"gitId":"-"},"content":""},{"lineNumber":1710,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Value proposition:"},{"lineNumber":1711,"author":{"gitId":"codeeong"},"content":"Exclusive application for management of footballers and football teams that provides an enhanced listing of footballers and convenient lookup on updated information of players."},{"lineNumber":1712,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1713,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Feature Contribution"},{"lineNumber":1714,"author":{"gitId":"codeeong"},"content":"* Codee +"},{"lineNumber":1715,"author":{"gitId":"-"},"content":"** Major - Revamp MTM’s whole GUI for ease of viewing teams and players’ details."},{"lineNumber":1716,"author":{"gitId":"-"},"content":"*** e.g. remove browser panel, add player details panel, change person card."},{"lineNumber":1717,"author":{"gitId":"-"},"content":"** Minor - Command to set the colour of tags to colour of choice."},{"lineNumber":1718,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1719,"author":{"gitId":"codeeong"},"content":"* Jordan"},{"lineNumber":1720,"author":{"gitId":"-"},"content":"** Major - Implementation of Team Component and Related Functions."},{"lineNumber":1721,"author":{"gitId":"-"},"content":"*** e.g. creation of team, assignment of players, viewing of teams, removal of team, renaming of team."},{"lineNumber":1722,"author":{"gitId":"codeeong"},"content":"** Minor"},{"lineNumber":1723,"author":{"gitId":"-"},"content":"*** Introduce `remark` command and `remark` field."},{"lineNumber":1724,"author":{"gitId":"-"},"content":"*** Enhanced add functionality to allow optional fields."},{"lineNumber":1725,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1726,"author":{"gitId":"codeeong"},"content":"* Syafiq"},{"lineNumber":1727,"author":{"gitId":"-"},"content":"** Major - Create a new player class that contains more information about the players."},{"lineNumber":1728,"author":{"gitId":"-"},"content":"*** e.g. Position, Rating (0 - 5 Star), Remarks"},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*** Update add, edit ,list, sort to include these fields accordingly."},{"lineNumber":1730,"author":{"gitId":"codeeong"},"content":"** Minor - Autocomplete command"},{"lineNumber":1731,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":1732,"author":{"gitId":"codeeong"},"content":"* Tianwei"},{"lineNumber":1733,"author":{"gitId":"codeeong"},"content":"** Major - privacy"},{"lineNumber":1734,"author":{"gitId":"codeeong"},"content":"*** Set private field and passwords"},{"lineNumber":1735,"author":{"gitId":"codeeong"},"content":"*** Make accounts"},{"lineNumber":1736,"author":{"gitId":"codeeong"},"content":"** Minor - Sorting players by different fields"},{"lineNumber":1737,"author":{"gitId":"-"},"content":""},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1739,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories"},{"lineNumber":1740,"author":{"gitId":"-"},"content":""},{"lineNumber":1741,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`"},{"lineNumber":1742,"author":{"gitId":"-"},"content":""},{"lineNumber":1743,"author":{"gitId":"-"},"content":"[width\u003d\"75%\",cols\u003d\"^8%,^23%,\u003c25%,\u003c30%\",options\u003d\"header\",]"},{"lineNumber":1744,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1745,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can..."},{"lineNumber":1746,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":1747,"author":{"gitId":"-"},"content":"4.1+^s|First Time User Stories"},{"lineNumber":1748,"author":{"gitId":"-"},"content":""},{"lineNumber":1749,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App"},{"lineNumber":1750,"author":{"gitId":"-"},"content":""},{"lineNumber":1751,"author":{"gitId":"-"},"content":"|`* * *` |new user |access the user guide |find out how to use fancy features of the application"},{"lineNumber":1752,"author":{"gitId":"-"},"content":""},{"lineNumber":1753,"author":{"gitId":"-"},"content":"|`* * *` |new user |see a list of instructions available |navigate and use the application easily"},{"lineNumber":1754,"author":{"gitId":"-"},"content":""},{"lineNumber":1755,"author":{"gitId":"-"},"content":"4.1+^s|Player Related User Stories"},{"lineNumber":1756,"author":{"gitId":"-"},"content":""},{"lineNumber":1757,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add a new player|"},{"lineNumber":1758,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1759,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s address |mail him important documents"},{"lineNumber":1760,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1761,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s contact number |contact him when needed"},{"lineNumber":1762,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1763,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s email |email him when needed"},{"lineNumber":1764,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1765,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s jersey number |easily identify them during the game"},{"lineNumber":1766,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1767,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s position |easily pick my lineup for match"},{"lineNumber":1768,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1769,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player\u0027s ratings |easily identify the better players"},{"lineNumber":1770,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1771,"author":{"gitId":"-"},"content":"|`* * *` |team manager |delete a player |remove him if I kick him out from the team or he quits"},{"lineNumber":1772,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1773,"author":{"gitId":"-"},"content":"|`* * *` |team manager |find a player by name |locate details of players without having to go through the entire list"},{"lineNumber":1774,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1775,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s contact number |"},{"lineNumber":1776,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1777,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s email |"},{"lineNumber":1778,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1779,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s jersey number |"},{"lineNumber":1780,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1781,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s match stats (e.g. goals scored) |decide the lineup, give award"},{"lineNumber":1782,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1783,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player remarks |for self note"},{"lineNumber":1784,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1785,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s avatar |for facial recognition"},{"lineNumber":1786,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1787,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s position |easily pick my lineup for match"},{"lineNumber":1788,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1789,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s address |"},{"lineNumber":1790,"author":{"gitId":"-"},"content":""},{"lineNumber":1791,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s avatar |"},{"lineNumber":1792,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1793,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player remarks |for self note"},{"lineNumber":1794,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1795,"author":{"gitId":"-"},"content":"|`* *` |team manager |hide \u003c\u003cprivate-contact-detail,private contact details\u003e\u003e by default |minimize chance of someone else seeing them by accident"},{"lineNumber":1796,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1797,"author":{"gitId":"-"},"content":"|`*` |team manager |edit player’s name |"},{"lineNumber":1798,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1799,"author":{"gitId":"-"},"content":"|`*` |team manager with many players in the team managing application |sort by player name |locate a person easily"},{"lineNumber":1800,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1801,"author":{"gitId":"-"},"content":"4.1+^s|Team Related User Stories"},{"lineNumber":1802,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1803,"author":{"gitId":"-"},"content":"|`* * *` |team manager |create teams |organize and manage my players through their respective team"},{"lineNumber":1804,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1805,"author":{"gitId":"-"},"content":"|`* * *` |team manager |assign player to teams |identify the team that the player is playing for"},{"lineNumber":1806,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1807,"author":{"gitId":"-"},"content":"|`* * *` |team manager |view players in specified team |identify the lineup of the team and which player belongs to which team"},{"lineNumber":1808,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1809,"author":{"gitId":"-"},"content":"|`* * *` |team manager |remove teams |remove teams that I no longer managed"},{"lineNumber":1810,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1811,"author":{"gitId":"-"},"content":"|`* *` |team manager |set match with competing team |acknowledge and plan training session for the team"},{"lineNumber":1812,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1813,"author":{"gitId":"-"},"content":"|`* *` |team manager |view upcoming match |keep track of the upcoming matches with opponent teams"},{"lineNumber":1814,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1815,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s allocated team |move players between teams"},{"lineNumber":1816,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1817,"author":{"gitId":"-"},"content":"|`* *` |team manager |schedule training programs for team |I do not have any conflicting schedule between different teams"},{"lineNumber":1818,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1819,"author":{"gitId":"-"},"content":"|`* *` |team manager |send reminder to team of schedule |my players does not forget about training session"},{"lineNumber":1820,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1821,"author":{"gitId":"-"},"content":"|`*` |team manager |sort by team name |identify group lineup easily"},{"lineNumber":1822,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1823,"author":{"gitId":"-"},"content":"4.1+^s|Additional User Stories"},{"lineNumber":1824,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1825,"author":{"gitId":"-"},"content":"|`* *` |team manager who remembers better with visual |set colours to tags |easily identify the tag that I have set to players"},{"lineNumber":1826,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1827,"author":{"gitId":"-"},"content":"|`* *` |team manager |autofill command |perform task quickly"},{"lineNumber":1828,"author":{"gitId":"-"},"content":""},{"lineNumber":1829,"author":{"gitId":"-"},"content":"|`* *` |team manager |password login |if team manager wants to protect certain information"},{"lineNumber":1830,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":1831,"author":{"gitId":"-"},"content":"|`* *` |team manager |submit feedback to developers |developers can improve the application constantly"},{"lineNumber":1832,"author":{"gitId":"-"},"content":""},{"lineNumber":1833,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":1834,"author":{"gitId":"-"},"content":""},{"lineNumber":1835,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1836,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases"},{"lineNumber":1837,"author":{"gitId":"-"},"content":""},{"lineNumber":1838,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `MTM` and the *Team Manager* is the `user`, unless specified otherwise)"},{"lineNumber":1839,"author":{"gitId":"-"},"content":""},{"lineNumber":1840,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1841,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Add player"},{"lineNumber":1842,"author":{"gitId":"-"},"content":""},{"lineNumber":1843,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1844,"author":{"gitId":"-"},"content":""},{"lineNumber":1845,"author":{"gitId":"-"},"content":"1. User enter command to add"},{"lineNumber":1846,"author":{"gitId":"-"},"content":"2. MTM prompt user of format to enter player\u0027s name and details"},{"lineNumber":1847,"author":{"gitId":"-"},"content":"3. User enter player\u0027s name and details in required format"},{"lineNumber":1848,"author":{"gitId":"-"},"content":"4. User press enter to insert person into storage"},{"lineNumber":1849,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1850,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1851,"author":{"gitId":"-"},"content":""},{"lineNumber":1852,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1853,"author":{"gitId":"-"},"content":""},{"lineNumber":1854,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1855,"author":{"gitId":"-"},"content":"* 4a. User did not enter any details."},{"lineNumber":1856,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1857,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1858,"author":{"gitId":"-"},"content":"** 4a1. MTM inform user that it is an invalid add command."},{"lineNumber":1859,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1860,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1861,"author":{"gitId":"-"},"content":""},{"lineNumber":1862,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1863,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Edit player\u0027s team"},{"lineNumber":1864,"author":{"gitId":"-"},"content":""},{"lineNumber":1865,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1866,"author":{"gitId":"-"},"content":""},{"lineNumber":1867,"author":{"gitId":"-"},"content":"1. User enter command to find"},{"lineNumber":1868,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name"},{"lineNumber":1869,"author":{"gitId":"-"},"content":"3. MTM display list of players found"},{"lineNumber":1870,"author":{"gitId":"-"},"content":"4. User enter command to edit player\u0027s team using index of displayed list"},{"lineNumber":1871,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1872,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1873,"author":{"gitId":"-"},"content":""},{"lineNumber":1874,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1875,"author":{"gitId":"-"},"content":""},{"lineNumber":1876,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1877,"author":{"gitId":"-"},"content":"* 2a. Player name does not exist."},{"lineNumber":1878,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1879,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1880,"author":{"gitId":"-"},"content":"** 2a1. MTM inform user that player does not exist."},{"lineNumber":1881,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1882,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1883,"author":{"gitId":"-"},"content":""},{"lineNumber":1884,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Find player by team name"},{"lineNumber":1886,"author":{"gitId":"-"},"content":""},{"lineNumber":1887,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1888,"author":{"gitId":"-"},"content":""},{"lineNumber":1889,"author":{"gitId":"-"},"content":"1. User enter command to find team"},{"lineNumber":1890,"author":{"gitId":"-"},"content":"2. User enter team name"},{"lineNumber":1891,"author":{"gitId":"-"},"content":"3. MTM display list of players in team"},{"lineNumber":1892,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1893,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1894,"author":{"gitId":"-"},"content":""},{"lineNumber":1895,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1896,"author":{"gitId":"-"},"content":""},{"lineNumber":1897,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1898,"author":{"gitId":"-"},"content":"* 2a. Team name does not exist."},{"lineNumber":1899,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1900,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1901,"author":{"gitId":"-"},"content":"** 2a1. MTM informs user that team name does not exist"},{"lineNumber":1902,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1903,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1904,"author":{"gitId":"-"},"content":""},{"lineNumber":1905,"author":{"gitId":"-"},"content":"[discrete]"},{"lineNumber":1906,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Remove player from team"},{"lineNumber":1907,"author":{"gitId":"-"},"content":""},{"lineNumber":1908,"author":{"gitId":"-"},"content":"*MSS*"},{"lineNumber":1909,"author":{"gitId":"-"},"content":""},{"lineNumber":1910,"author":{"gitId":"-"},"content":"1. User enter command to find"},{"lineNumber":1911,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name"},{"lineNumber":1912,"author":{"gitId":"-"},"content":"3. MTM display list of players found"},{"lineNumber":1913,"author":{"gitId":"-"},"content":"4. User enter remove command and index associated with player"},{"lineNumber":1914,"author":{"gitId":"-"},"content":"5. MTM displays player that is removed and updated list of players"},{"lineNumber":1915,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1916,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1917,"author":{"gitId":"-"},"content":""},{"lineNumber":1918,"author":{"gitId":"-"},"content":"*Extensions*"},{"lineNumber":1919,"author":{"gitId":"-"},"content":""},{"lineNumber":1920,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1921,"author":{"gitId":"-"},"content":"* 4a. Invalid index entered."},{"lineNumber":1922,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1923,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1924,"author":{"gitId":"-"},"content":"** 4a1. MTM informs user that index is invalid."},{"lineNumber":1925,"author":{"gitId":"-"},"content":"** 4a2. User enters valid index."},{"lineNumber":1926,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1927,"author":{"gitId":"-"},"content":"Use case resumes at step 5."},{"lineNumber":1928,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1929,"author":{"gitId":"-"},"content":"* 4b. User removes wrong index unintentionally."},{"lineNumber":1930,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1931,"author":{"gitId":"-"},"content":"[none]"},{"lineNumber":1932,"author":{"gitId":"-"},"content":"** 4b1. User undo remove by entering command to undo."},{"lineNumber":1933,"author":{"gitId":"-"},"content":"+"},{"lineNumber":1934,"author":{"gitId":"-"},"content":"Use case ends."},{"lineNumber":1935,"author":{"gitId":"-"},"content":""},{"lineNumber":1936,"author":{"gitId":"-"},"content":"_{More to be added}_"},{"lineNumber":1937,"author":{"gitId":"-"},"content":""},{"lineNumber":1938,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1939,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements"},{"lineNumber":1940,"author":{"gitId":"-"},"content":""},{"lineNumber":1941,"author":{"gitId":"codeeong"},"content":". Should work on any mainstream OS as long as it has Java 1.8.0_60 or higher installed."},{"lineNumber":1942,"author":{"gitId":"-"},"content":". Should be able to hold up to 150 players without a noticeable sluggishness in performance for typical usage."},{"lineNumber":1943,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse."},{"lineNumber":1944,"author":{"gitId":"codeeong"},"content":". Works on both 32-bit and 64-bit machines"},{"lineNumber":1945,"author":{"gitId":"codeeong"},"content":". Should respond within 1 second of query"},{"lineNumber":1946,"author":{"gitId":"codeeong"},"content":". Should be intuitive and easy to use for a first-time user."},{"lineNumber":1947,"author":{"gitId":"codeeong"},"content":". Should be able to handle any sort of input, i.e. should recover from invalid input."},{"lineNumber":1948,"author":{"gitId":"codeeong"},"content":". Should have audience-focused user guides and developer guides."},{"lineNumber":1949,"author":{"gitId":"codeeong"},"content":". Should have command names that concisely describe their function."},{"lineNumber":1950,"author":{"gitId":"codeeong"},"content":". Should be an open-source project."},{"lineNumber":1951,"author":{"gitId":"codeeong"},"content":". Development be cost effective or free."},{"lineNumber":1952,"author":{"gitId":"codeeong"},"content":". App should be able to work offline."},{"lineNumber":1953,"author":{"gitId":"-"},"content":". Should save and backup the state of the team managing application regularly."},{"lineNumber":1954,"author":{"gitId":"codeeong"},"content":". Current versions must be backward compatible with older versions to support undo."},{"lineNumber":1955,"author":{"gitId":"codeeong"},"content":". The user interface should be simple and minimise distractions so that user can continue with their work in a focused manner."},{"lineNumber":1956,"author":{"gitId":"-"},"content":""},{"lineNumber":1957,"author":{"gitId":"-"},"content":""},{"lineNumber":1958,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1959,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary"},{"lineNumber":1960,"author":{"gitId":"-"},"content":""},{"lineNumber":1961,"author":{"gitId":"-"},"content":"[[mainstream-os]] Mainstream OS::"},{"lineNumber":1962,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X"},{"lineNumber":1963,"author":{"gitId":"-"},"content":""},{"lineNumber":1964,"author":{"gitId":"-"},"content":"[[private-contact-detail]] Private contact detail::"},{"lineNumber":1965,"author":{"gitId":"-"},"content":"A contact detail that is not meant to be shared with others"},{"lineNumber":1966,"author":{"gitId":"-"},"content":""},{"lineNumber":1967,"author":{"gitId":"-"},"content":"[[lineuo]] Lineup::"},{"lineNumber":1968,"author":{"gitId":"-"},"content":"A list of players that are playing for a match, with their positions specified"},{"lineNumber":1969,"author":{"gitId":"-"},"content":""},{"lineNumber":1970,"author":{"gitId":"-"},"content":"[[user-guide]] User Guide::"},{"lineNumber":1971,"author":{"gitId":"-"},"content":"A documentation on the functionality and usability of MTM"},{"lineNumber":1972,"author":{"gitId":"-"},"content":""},{"lineNumber":1973,"author":{"gitId":"-"},"content":"[appendix]"},{"lineNumber":1974,"author":{"gitId":"-"},"content":"\u003d\u003d Instructions for Manual Testing"},{"lineNumber":1975,"author":{"gitId":"-"},"content":""},{"lineNumber":1976,"author":{"gitId":"-"},"content":"Given below are instructions to test the app manually."},{"lineNumber":1977,"author":{"gitId":"-"},"content":""},{"lineNumber":1978,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":1979,"author":{"gitId":"-"},"content":"These instructions only provide a starting point for testers to work on; testers are expected to do more _exploratory_ testing."},{"lineNumber":1980,"author":{"gitId":"-"},"content":""},{"lineNumber":1981,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Launch and Shutdown"},{"lineNumber":1982,"author":{"gitId":"-"},"content":""},{"lineNumber":1983,"author":{"gitId":"-"},"content":". Initial launch"},{"lineNumber":1984,"author":{"gitId":"-"},"content":""},{"lineNumber":1985,"author":{"gitId":"-"},"content":".. Download the jar file and copy into an empty folder"},{"lineNumber":1986,"author":{"gitId":"-"},"content":".. Double-click the jar file +"},{"lineNumber":1987,"author":{"gitId":"-"},"content":" Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum."},{"lineNumber":1988,"author":{"gitId":"-"},"content":""},{"lineNumber":1989,"author":{"gitId":"-"},"content":". Saving window preferences"},{"lineNumber":1990,"author":{"gitId":"-"},"content":""},{"lineNumber":1991,"author":{"gitId":"-"},"content":".. Resize the window to an optimum size. Move the window to a different location. Close the window."},{"lineNumber":1992,"author":{"gitId":"-"},"content":".. Re-launch the app by double-clicking the jar file. +"},{"lineNumber":1993,"author":{"gitId":"-"},"content":" Expected: The most recent window size and location is retained."},{"lineNumber":1994,"author":{"gitId":"-"},"content":""},{"lineNumber":1995,"author":{"gitId":"-"},"content":"_{ more test cases ... }_"},{"lineNumber":1996,"author":{"gitId":"-"},"content":""},{"lineNumber":1997,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Deleting a player"},{"lineNumber":1998,"author":{"gitId":"-"},"content":""},{"lineNumber":1999,"author":{"gitId":"codeeong"},"content":". Deleting a player while all players are listed"},{"lineNumber":2000,"author":{"gitId":"-"},"content":""},{"lineNumber":2001,"author":{"gitId":"codeeong"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list."},{"lineNumber":2002,"author":{"gitId":"-"},"content":".. Test case: `delete 1` +"},{"lineNumber":2003,"author":{"gitId":"codeeong"},"content":" Expected: First player is deleted from the list. Details of the deleted player shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2004,"author":{"gitId":"-"},"content":".. Test case: `delete 0` +"},{"lineNumber":2005,"author":{"gitId":"-"},"content":" Expected: No person is deleted. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2006,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `delete`, `delete x` (where x is larger than the list size) _{give more}_ +"},{"lineNumber":2007,"author":{"gitId":"-"},"content":" Expected: Similar to previous."},{"lineNumber":2008,"author":{"gitId":"-"},"content":""},{"lineNumber":2009,"author":{"gitId":"-"},"content":"_{ more test cases ... }_"},{"lineNumber":2010,"author":{"gitId":"-"},"content":""},{"lineNumber":2011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving data"},{"lineNumber":2012,"author":{"gitId":"-"},"content":""},{"lineNumber":2013,"author":{"gitId":"-"},"content":". Dealing with missing/corrupted data files"},{"lineNumber":2014,"author":{"gitId":"-"},"content":""},{"lineNumber":2015,"author":{"gitId":"-"},"content":".. _{explain how to simulate a missing/corrupted file and the expected behavior}_"},{"lineNumber":2016,"author":{"gitId":"-"},"content":""},{"lineNumber":2017,"author":{"gitId":"-"},"content":"_{ more test cases ... }_"},{"lineNumber":2018,"author":{"gitId":"-"},"content":""},{"lineNumber":2019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Remarking a player"},{"lineNumber":2020,"author":{"gitId":"-"},"content":""},{"lineNumber":2021,"author":{"gitId":"-"},"content":". Remarking a player while all players are listed"},{"lineNumber":2022,"author":{"gitId":"-"},"content":""},{"lineNumber":2023,"author":{"gitId":"-"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list."},{"lineNumber":2024,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/This is my remark to you.` +"},{"lineNumber":2025,"author":{"gitId":"-"},"content":"Expected: First player is remarked from the list. Details of the remarked player shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2026,"author":{"gitId":"-"},"content":".. Test case: `remark 0` +"},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Expected: No person is remarked. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2028,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `remark`, `remark x` (where x is larger than the list size), `remark -1`, `remark 2 x/` (where x is not the prefix for remark) +"},{"lineNumber":2029,"author":{"gitId":"-"},"content":"Expected: Similar to previous."},{"lineNumber":2030,"author":{"gitId":"-"},"content":".. Test case: `remark 1` +"},{"lineNumber":2031,"author":{"gitId":"-"},"content":"Expected: First player has its remark removed. Details of the remarked player shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2032,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/I want to delete this.` -\u003e `remark 1 r/` +"},{"lineNumber":2033,"author":{"gitId":"-"},"content":"Expected: Similar to previous."},{"lineNumber":2034,"author":{"gitId":"-"},"content":""},{"lineNumber":2035,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a player without all fields"},{"lineNumber":2036,"author":{"gitId":"-"},"content":""},{"lineNumber":2037,"author":{"gitId":"-"},"content":". Adding a player where player is unique"},{"lineNumber":2038,"author":{"gitId":"-"},"content":""},{"lineNumber":2039,"author":{"gitId":"-"},"content":".. Prerequisites: Newly added player must not exist in MTM."},{"lineNumber":2040,"author":{"gitId":"-"},"content":".. Test case: `add n/Tumeric Turner e/tt@tuner.com` +"},{"lineNumber":2041,"author":{"gitId":"-"},"content":"Expected: Player added into MTM and will be on the list. Details of the newly added player shown in the status message. Fields that are not input during addition are replaced with `\u003cUNSPECIFIED\u003e` Timestamp in the status bar is updated."},{"lineNumber":2042,"author":{"gitId":"-"},"content":".. Test case: `add n/Guavi Hollae` +"},{"lineNumber":2043,"author":{"gitId":"-"},"content":"Expected: Player is not added into MTM. Errors details shown in status message. Name and email are compulsory fields that need to be entered for `add` to work."},{"lineNumber":2044,"author":{"gitId":"-"},"content":""},{"lineNumber":2045,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Functions"},{"lineNumber":2046,"author":{"gitId":"-"},"content":""},{"lineNumber":2047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a Team"},{"lineNumber":2048,"author":{"gitId":"-"},"content":""},{"lineNumber":2049,"author":{"gitId":"-"},"content":". Creating a Team with current existing data in MTM"},{"lineNumber":2050,"author":{"gitId":"-"},"content":""},{"lineNumber":2051,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently does not exist in MTM."},{"lineNumber":2052,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +"},{"lineNumber":2053,"author":{"gitId":"-"},"content":"Expected: Team is created and displayed in Team Display Panel. Team name will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2054,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +"},{"lineNumber":2055,"author":{"gitId":"-"},"content":"Expected: Team is not created due to team already existing in MTM. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2056,"author":{"gitId":"-"},"content":".. Test case: `create \u0026-Team-\u0026` +"},{"lineNumber":2057,"author":{"gitId":"-"},"content":"Expected: Team does not allow names with special characters, only alphanumeric, can consist of all numbers and can contain space in name. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2058,"author":{"gitId":"-"},"content":""},{"lineNumber":2059,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a Team"},{"lineNumber":2060,"author":{"gitId":"-"},"content":""},{"lineNumber":2061,"author":{"gitId":"-"},"content":". Viewing a Team with current existing data in MTM"},{"lineNumber":2062,"author":{"gitId":"-"},"content":""},{"lineNumber":2063,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM."},{"lineNumber":2064,"author":{"gitId":"-"},"content":"... Test case: `view Arsenal` +"},{"lineNumber":2065,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be updated with list of players that are in the Team. Team name will be shown in the status message."},{"lineNumber":2066,"author":{"gitId":"-"},"content":"... Test case: `view NonExistingTeam` +"},{"lineNumber":2067,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM. Error details shown in the status message."},{"lineNumber":2068,"author":{"gitId":"-"},"content":"... Test case: `view chelsea` +"},{"lineNumber":2069,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM, as team names are case sensitive. Error details shown in the status message."},{"lineNumber":2070,"author":{"gitId":"-"},"content":".. Prerequisites: The command `create NUSTeam` was executed right before executing this test case."},{"lineNumber":2071,"author":{"gitId":"-"},"content":"... Test case: `view NUSTeam` +"},{"lineNumber":2072,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be empty as no players are in the team yet. Team name will be shown in the status message."},{"lineNumber":2073,"author":{"gitId":"-"},"content":""},{"lineNumber":2074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning Players to Team"},{"lineNumber":2075,"author":{"gitId":"-"},"content":""},{"lineNumber":2076,"author":{"gitId":"-"},"content":". Assigning players to a Team after executing `create NUSTeam`"},{"lineNumber":2077,"author":{"gitId":"-"},"content":""},{"lineNumber":2078,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/1 3 5` +"},{"lineNumber":2079,"author":{"gitId":"-"},"content":"Expected: Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2080,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/3` +"},{"lineNumber":2081,"author":{"gitId":"-"},"content":"Expected: No player is assigned as player already exist in the team. Error details shown in the status message. Status bar remains the same."},{"lineNumber":2082,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/2 3 4` +"},{"lineNumber":2083,"author":{"gitId":"-"},"content":"Expected: Only the player at index 2 is assigned. Assign command will stop once it detects that a player cannot be assigned. Team Display Panel will not be updated. Person Card of index 2 will be updated with assigned team. Timestamp in the status bar is updated."},{"lineNumber":2084,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/9 6 4` +"},{"lineNumber":2085,"author":{"gitId":"-"},"content":"Expected: All players will be assigned by ascending index order. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2086,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/7 40` +"},{"lineNumber":2087,"author":{"gitId":"-"},"content":"Expected: Index exceeding the number of players listed in the Player List Panel will be ignored. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2088,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/-1` +"},{"lineNumber":2089,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message. Team is not viewed."},{"lineNumber":2090,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam` +"},{"lineNumber":2091,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Invalid command format as no index is given. Team is not viewed."},{"lineNumber":2092,"author":{"gitId":"-"},"content":".. Test case: `assign NoTeam` +"},{"lineNumber":2093,"author":{"gitId":"-"},"content":"Expected: Error deatils shown in the status message. No such team found in MTM. Team is not viewed, player list not updated."},{"lineNumber":2094,"author":{"gitId":"-"},"content":".. Test case: `add n/Barry Putter e/bp@hotwot.com tm/NUSTeam` +"},{"lineNumber":2095,"author":{"gitId":"-"},"content":"Expected: New person is added into MTM. Team in Team Display Panel will be selected. Player list will be updated with the new added person. Timestamp in the status bar is updated."},{"lineNumber":2096,"author":{"gitId":"-"},"content":".. Test case: `add n/Himonie Branger e/hb@notwot.com tm/MissingTeam` +"},{"lineNumber":2097,"author":{"gitId":"-"},"content":"Expected: Person is not added into MTM. Team does not exist in MTM. Error details shown in the status message."},{"lineNumber":2098,"author":{"gitId":"-"},"content":""},{"lineNumber":2099,"author":{"gitId":"-"},"content":". Unassigning players from a Team"},{"lineNumber":2100,"author":{"gitId":"-"},"content":""},{"lineNumber":2101,"author":{"gitId":"-"},"content":".. Prerequisites: Players are already existing in the team"},{"lineNumber":2102,"author":{"gitId":"-"},"content":".. Test case: `view NUSTeam` -\u003e `assign i/1 2 3` +"},{"lineNumber":2103,"author":{"gitId":"-"},"content":"Expected: Player list will be updated as the specified players to be unassigned will be removed from the team. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2104,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/10 11` +"},{"lineNumber":2105,"author":{"gitId":"-"},"content":"Expected: Player list will be updated with the specified players to be unassigned will have their team name updated to `\u003cUNSPECIFIED\u003e`. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated."},{"lineNumber":2106,"author":{"gitId":"-"},"content":".. Test case: `assign i/NUS` +"},{"lineNumber":2107,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message."},{"lineNumber":2108,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/1` +"},{"lineNumber":2109,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Player already has no team and can\u0027t be unassigned."},{"lineNumber":2110,"author":{"gitId":"-"},"content":""},{"lineNumber":2111,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Renaming a Team"},{"lineNumber":2112,"author":{"gitId":"-"},"content":""},{"lineNumber":2113,"author":{"gitId":"-"},"content":". Renaming a Team after assigning players above"},{"lineNumber":2114,"author":{"gitId":"-"},"content":""},{"lineNumber":2115,"author":{"gitId":"-"},"content":".. Prerequisites: Ensure that the team to be renamed into does not exist"},{"lineNumber":2116,"author":{"gitId":"-"},"content":".. Test case: `rename NUSTeam tm/SUNTeam` +"},{"lineNumber":2117,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be renamed to the new team name. New team name will be selected in the Team Display Panel. Player list of all the players in the new team name will be displayed. All players in the team will have their team name updated to the new team name. Team rename will be shown in the result status message. Timestamp in the status bar is updated."},{"lineNumber":2118,"author":{"gitId":"-"},"content":".. Test case: `rename NewTeam tm/MooTeam` +"},{"lineNumber":2119,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename does not exist in MTM."},{"lineNumber":2120,"author":{"gitId":"-"},"content":".. Test case: `rename SUNTeam tm/\u0026-Team` +"},{"lineNumber":2121,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename into is invalid and should only contains alphanumeric characters."},{"lineNumber":2122,"author":{"gitId":"-"},"content":".. Test case: `rename tm/SmoovTeam` +"},{"lineNumber":2123,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Did not specify which team to rename and will indicate invalid command format."},{"lineNumber":2124,"author":{"gitId":"-"},"content":""},{"lineNumber":2125,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a Team"},{"lineNumber":2126,"author":{"gitId":"-"},"content":""},{"lineNumber":2127,"author":{"gitId":"-"},"content":". Removing a Team after renaming the team above"},{"lineNumber":2128,"author":{"gitId":"-"},"content":""},{"lineNumber":2129,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM."},{"lineNumber":2130,"author":{"gitId":"-"},"content":".. Test case: `view SUNTeam` -\u003e `remove SUNTeam` +"},{"lineNumber":2131,"author":{"gitId":"-"},"content":"Expected: Team is removed and Team Display Panel is updated to reflect that the team has been removed. Team name that is being removed will be shown in the status message. All players in the team will have their team name updated in the Player List Panel. Player List Panel will show the full list of players in MTM. Timestamp in the status bar is updated."},{"lineNumber":2132,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `remove Arsenal` +"},{"lineNumber":2133,"author":{"gitId":"-"},"content":"Expected: Similar to above, will be displaying full list of players before and after `remove` command."},{"lineNumber":2134,"author":{"gitId":"-"},"content":".. Test case: `remove SUNTeam` +"},{"lineNumber":2135,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team does not exist in MTM."},{"lineNumber":2136,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2137,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Appearance Related Functions"},{"lineNumber":2138,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2139,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Changing a Theme"},{"lineNumber":2140,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2141,"author":{"gitId":"codeeong"},"content":". Changing the theme that MTM is currently on"},{"lineNumber":2142,"author":{"gitId":"codeeong"},"content":".. Test case: `cte Dark` (if current theme is Light) or `cte Light` (if current theme is Dark) +"},{"lineNumber":2143,"author":{"gitId":"codeeong"},"content":"Expected: MTM colour scheme will change to the respective themes as shown below:"},{"lineNumber":2144,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2145,"author":{"gitId":"codeeong"},"content":"image::DarkTheme.png[width\u003d\"300\"]"},{"lineNumber":2146,"author":{"gitId":"codeeong"},"content":"image::LightTheme.png[width\u003d\"300\"]"},{"lineNumber":2147,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2148,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2149,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Setting Tag Colours"},{"lineNumber":2150,"author":{"gitId":"codeeong"},"content":". Setting the tags to colour of choice"},{"lineNumber":2151,"author":{"gitId":"codeeong"},"content":".. Prerequisites: Player has tags"},{"lineNumber":2152,"author":{"gitId":"codeeong"},"content":".. Test case: `setTagColour t/redCard tc/blue`"},{"lineNumber":2153,"author":{"gitId":"codeeong"},"content":"Expected: All tags with the name `redCard` would become blue"}],"authorContributionMap":{"lithiumlkid":189,"lohtianwei":210,"codeeong":253,"-":1501}},{"path":"docs/UserGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - User Guide"},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:"},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":toc-title: Table Of Contents"},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3"},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble"},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:"},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images"},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets"},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full"},{"lineNumber":10,"author":{"gitId":"-"},"content":":experimental:"},{"lineNumber":11,"author":{"gitId":"-"},"content":"ifdef::env-github[]"},{"lineNumber":12,"author":{"gitId":"-"},"content":":tip-caption: :bulb:"},{"lineNumber":13,"author":{"gitId":"-"},"content":":note-caption: :information_source:"},{"lineNumber":14,"author":{"gitId":"-"},"content":":important-caption: :white_check_mark:"},{"lineNumber":15,"author":{"gitId":"-"},"content":"endif::[]"},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"By: `F14-B1` Since: `Mar 2018` Licence: `MIT`"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"// tag::introduction[]"},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction"},{"lineNumber":22,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a link:https://en.wikipedia.org/wiki/Command-line_interface[Command-Line Interface] (CLI) based address book application for *football team managers*."},{"lineNumber":23,"author":{"gitId":"-"},"content":"It is a one-stop solution to help you manage your player\u0027s contact details in an efficient and convenient manner."},{"lineNumber":24,"author":{"gitId":"-"},"content":"Using MTM, you can organize players into teams, view player statistics, and, generate player line-ups."},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"Head to \u003c\u003cQuick Start\u003e\u003e to get started with My Team Manager!"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"\u003d\u003d Quick Start"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"Welcome! If you want to learn more about using My Team Manager, you\u0027ve come to the right place. My Team Manager is the easiest"},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"way for you to manage your team efficiently, and this quick start section will help you learn the basics so you can get going."},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"Your teams, their players, and all the relevant information is organized clearly in My Team Manager. Teams can be created and"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"players can be assigned to teams."},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Before we begin"},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer."},{"lineNumber":39,"author":{"gitId":"-"},"content":". You can download Java 8 link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[here]."},{"lineNumber":40,"author":{"gitId":"-"},"content":"+"},{"lineNumber":41,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":43,"author":{"gitId":"-"},"content":"* Having any Java 8 version is not enough. +"},{"lineNumber":44,"author":{"gitId":"-"},"content":"* This app will not work with *earlier* or *later* versions of Java 8."},{"lineNumber":45,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":46,"author":{"gitId":"-"},"content":"+"},{"lineNumber":47,"author":{"gitId":"-"},"content":". Download the latest `MyTeamManager.jar` link:{repoURL}/releases[here]."},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":". Copy the file to the folder you want to use as the home folder for your MTM."},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":". Double-click the file to start the app. The software interface should appear in a few seconds as shown below."},{"lineNumber":50,"author":{"gitId":"-"},"content":"+"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"image::UiNew.png[width\u003d\"790\"]"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Navigating the interface"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"The figure below shows the different components in My Team Manager and the list below explains their purpose."},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"image::UIGuide.png[width\u003d\"790\"]"},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":". *Command Box*: This is where you _key in the commands_ to use My Team Manager."},{"lineNumber":61,"author":{"gitId":"-"},"content":". *Display Box*: The display box _displays results_ to any command you input."},{"lineNumber":62,"author":{"gitId":"-"},"content":". *Team List* : This _displays the teams_ you have created in My Team Manager. +"},{"lineNumber":63,"author":{"gitId":"-"},"content":"* If a team is being viewed, it would be highlighted."},{"lineNumber":64,"author":{"gitId":"-"},"content":". *Details Panel*: This _displays details of the player_ that is currently selected. +"},{"lineNumber":65,"author":{"gitId":"-"},"content":"* Here, the player\u0027s _name_, _phone number_, _address_, _email_, _jersey number_ followed by _remarks_ are shown."},{"lineNumber":66,"author":{"gitId":"-"},"content":". *Systems Panel*: This displays information regarding modification to MTM\u0027s data."},{"lineNumber":67,"author":{"gitId":"-"},"content":"* On the left, it displays the time and date when MTM is last updated."},{"lineNumber":68,"author":{"gitId":"-"},"content":"* On the right, is the location of the data."},{"lineNumber":69,"author":{"gitId":"-"},"content":". *Player List*: This is the list of player cards. In each player card, +"},{"lineNumber":70,"author":{"gitId":"-"},"content":"* The player\u0027s _name_, _tags_, _team_, _rating_, followed by _position_ is displayed."},{"lineNumber":71,"author":{"gitId":"-"},"content":"* The player\u0027s _avatar_ is also shown on the right column."},{"lineNumber":72,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":73,"author":{"gitId":"lithiumlkid"},"content":"[[Using_Commands]]"},{"lineNumber":74,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Using Commands"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":".*Getting started with Commands*"},{"lineNumber":77,"author":{"gitId":"-"},"content":"****"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":80,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user."},{"lineNumber":81,"author":{"gitId":"-"},"content":"** An example in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`."},{"lineNumber":82,"author":{"gitId":"-"},"content":"* Fields that are in enclosed with `[ ]` are optional."},{"lineNumber":83,"author":{"gitId":"-"},"content":"** An example, `n/NAME [t/TAG]`, can be used as, `n/John Doe t/friend`, or as, `n/John Doe`."},{"lineNumber":84,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times."},{"lineNumber":85,"author":{"gitId":"-"},"content":"** In this example, `[t/TAG]...`, these parameters are valid, `t/friend`, `t/friend t/family`, and even `{nbsp}` (no parameter)."},{"lineNumber":86,"author":{"gitId":"-"},"content":"* Parameters can be entered in any order."},{"lineNumber":87,"author":{"gitId":"-"},"content":"** For example, if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable."},{"lineNumber":88,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":89,"author":{"gitId":"-"},"content":"****"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":".*The Use of Alias*"},{"lineNumber":92,"author":{"gitId":"-"},"content":"****"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":95,"author":{"gitId":"-"},"content":"* Some commands have an alias that you can use to execute the command. This alias acts as a shortcut to execute the commands you want without typing the full command out."},{"lineNumber":96,"author":{"gitId":"-"},"content":"** For example, you can type the alias `a` instead of the `add` command word to add a player into MTM."},{"lineNumber":97,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":98,"author":{"gitId":"-"},"content":"****"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":".*Lookout for Tips, Notes, and Expected Outcomes*"},{"lineNumber":101,"author":{"gitId":"-"},"content":"****"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":104,"author":{"gitId":"-"},"content":"TIP: This box give _tips_ that *might be useful*."},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":"NOTE: This box _notes_ down *important details* regarding a feature."},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":"IMPORTANT: This box will let you know the _outcome_ and what MTM should be *expected to do*."},{"lineNumber":109,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":110,"author":{"gitId":"-"},"content":"****"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"lithiumlkid"},"content":"Now that you are familiar with the interface and using commands, you are now ready to begin using My Team Manager!"},{"lineNumber":113,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":114,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Three steps to get started"},{"lineNumber":115,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":116,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Add your first player"},{"lineNumber":117,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":118,"author":{"gitId":"lithiumlkid"},"content":". Add your first player, `Ronaldo` by typing the command `add n/Ronaldo e/Ronaldo@arsenal.com` in the command box and pressing kbd:[Enter] to execute it."},{"lineNumber":119,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":120,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":121,"author":{"gitId":"lithiumlkid"},"content":"image::add.png[width\u003d\"400\"]"},{"lineNumber":122,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":123,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":124,"author":{"gitId":"lithiumlkid"},"content":". Your new player, `Ronaldo` should appear in the player list as shown in the white box above."},{"lineNumber":125,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":126,"author":{"gitId":"lithiumlkid"},"content":"TIP: The `Add` command has additional optional parameters for you to include more information. For the full list,"},{"lineNumber":127,"author":{"gitId":"-"},"content":"refer to \u003c\u003cadd, Adding a player\u003e\u003e."},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Create your first team"},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"Now that you have a player, let\u0027s explore teams. Teams allow you to manage and group your players together according to"},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":"the teams they belong to."},{"lineNumber":132,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":". Create your first team, `NUS` by typing the command `create NUS` in the command box and pressing kbd:[Enter] to execute it."},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"image::create.PNG[width\u003d\"300\"]"},{"lineNumber":136,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":137,"author":{"gitId":"lithiumlkid"},"content":". Your new team, `NUS` should appear in the team list."},{"lineNumber":138,"author":{"gitId":"lithiumlkid"},"content":". You can now assign `Ronaldo` to `NUS` by typing the command `assign tm/NUS i/1` in the command box and pressing kbd:[Enter] to execute it."},{"lineNumber":139,"author":{"gitId":"lithiumlkid"},"content":"- The Team List should now show NUS highlighted as shown in the white box labeled 1 above."},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"- `Ronaldo` \u0027s player card should now show NUS in the team field as shown in the white box labeled 2 above."},{"lineNumber":141,"author":{"gitId":"lithiumlkid"},"content":"- The player list shows only players assigned to the team `NUS`"},{"lineNumber":142,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":143,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Viewing more details"},{"lineNumber":144,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":". View more details about a player, by entering `select` followed by the \u003c\u003cIndex, `INDEX`\u003e\u003e of the player. For example, to view"},{"lineNumber":146,"author":{"gitId":"lithiumlkid"},"content":"`Ronaldo` \u0027s details, enter `select 1`."},{"lineNumber":147,"author":{"gitId":"lithiumlkid"},"content":". The details panel should now show the player\u0027s details."},{"lineNumber":148,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":149,"author":{"gitId":"lithiumlkid"},"content":"image::select.png[width\u003d\"790\"]"},{"lineNumber":150,"author":{"gitId":"lithiumlkid"},"content":"+"},{"lineNumber":151,"author":{"gitId":"lithiumlkid"},"content":". You may notice that there are fields that show `\u003cUNSPECIFIED\u003e`. These are optional fields that you can edit later on."},{"lineNumber":152,"author":{"gitId":"lithiumlkid"},"content":"There are also many ways you can customize and add to My Team Manager. Here are a few ways to start:"},{"lineNumber":153,"author":{"gitId":"-"},"content":".. \u003c\u003cedit, Editing a player\u003e\u003e"},{"lineNumber":154,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003cchangeTheme, Changing MTM theme\u003e\u003e"},{"lineNumber":155,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csetTagColour, Setting Tag Colour\u003e\u003e"},{"lineNumber":156,"author":{"gitId":"-"},"content":".. \u003c\u003ctoggleprivacy, Setting privacy\u003e\u003e"},{"lineNumber":157,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csort, Sorting players in the list\u003e\u003e"},{"lineNumber":158,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":159,"author":{"gitId":"lithiumlkid"},"content":"// end::introduction[]"},{"lineNumber":160,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":161,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Commands in My Team Manager"},{"lineNumber":162,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":163,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful information regarding all the commands in My Team Manager."},{"lineNumber":164,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":165,"author":{"gitId":"lithiumlkid"},"content":"If you are not familiar on how to use commands yet, you can refer to \u003c\u003cUsing_Commands\u003e\u003e"},{"lineNumber":166,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":167,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Fundamentals"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"lithiumlkid"},"content":"MTM provides tools that gives you the power to use MTM more efficiently and teach you how to navigate through MTM with ease."},{"lineNumber":170,"author":{"gitId":"-"},"content":""},{"lineNumber":171,"author":{"gitId":"lithiumlkid"},"content":"Enter commands more quickly with \u003c\u003cautocomplete,kbd:[tab] autocomplete\u003e\u003e, get \u003c\u003chelp,help\u003e\u003e or find out how to \u003c\u003cundo,undo\u003e\u003e and \u003c\u003credo,redo\u003e\u003e commands."},{"lineNumber":172,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":173,"author":{"gitId":"lithiumlkid"},"content":"You can also find information to secure your information in My Team Manger by \u003c\u003ctogglePrivacy, toggling privacy\u003e\u003e or \u003c\u003ckey,set a key to prevent tampering\u003e\u003e"},{"lineNumber":174,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":175,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Saving the data"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":"There is no need to save anything manually as My Team Manager will save"},{"lineNumber":178,"author":{"gitId":"-"},"content":"any data entered directly to the hard drive."},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":"// tag::autocomplete[]"},{"lineNumber":181,"author":{"gitId":"-"},"content":"[[autocomplete]]"},{"lineNumber":182,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Using kbd:[tab] Autocomplete"},{"lineNumber":183,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":"After typing in the first few characters of a command, pressing kbd:[tab] will fill in the rest of the item."},{"lineNumber":185,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":"To view the parameters for a command, press tab after the whole command is typed in. Pressing tab again will remove the parameters."},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":189,"author":{"gitId":"-"},"content":"You can use the autocompleted parameters as a template after viewing them."},{"lineNumber":190,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":191,"author":{"gitId":"lithiumlkid"},"content":"Text will turn red if the input has no parameters or if no matching command exists."},{"lineNumber":192,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":193,"author":{"gitId":"lithiumlkid"},"content":"If there are multiple possible commands for a given input, i.e. \u0027e\u0027 could be \u0027edit\u0027 or \u0027exit\u0027,"},{"lineNumber":194,"author":{"gitId":"-"},"content":"then a dropdown box will appear with the possible commands. These can be navigated using mouse or arrow keys. Press enter to select the desired command."},{"lineNumber":195,"author":{"gitId":"-"},"content":"// end::autocomplete[]"},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":"[[help]]"},{"lineNumber":198,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing help : `help`"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":"Feeling lost? Not sure what to do? Don\u0027t worry, our friendly guide will help you! All you have to do is just type the `help` command, and you will get all the information you require."},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":"Format: `help` +"},{"lineNumber":203,"author":{"gitId":"-"},"content":"Alias: kbd:[F1]"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"-"},"content":"[[history]]"},{"lineNumber":206,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing entered commands : `history`"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":"Have you been extensively using MTM and in the midst of entering more commands, you could not remember what commands you have entered? MTM allows you to look at all your past commands that you have entered in reverse chronological order."},{"lineNumber":209,"author":{"gitId":"-"},"content":""},{"lineNumber":210,"author":{"gitId":"-"},"content":"Format: `history` +"},{"lineNumber":211,"author":{"gitId":"-"},"content":"Alias: `h`"},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":215,"author":{"gitId":"-"},"content":"* Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box."},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":219,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":220,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":221,"author":{"gitId":"-"},"content":"A list of your previously entered command will be shown to you."},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":223,"author":{"gitId":"-"},"content":""},{"lineNumber":224,"author":{"gitId":"-"},"content":"// tag::undoredo[]"},{"lineNumber":225,"author":{"gitId":"-"},"content":"[[undo]]"},{"lineNumber":226,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undoing previous command : `undo`"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":"Have you entered a wrong command or might have accidentally entered the wrong values to the specified fields to a command? +"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":"You don\u0027t have to worry, as MTM provides you with the command to undo most mistakes that you might have made. MTM will restore itself to the state before the previous command was executed."},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":"Format: `undo` +"},{"lineNumber":233,"author":{"gitId":"-"},"content":"Alias: `u`"},{"lineNumber":234,"author":{"gitId":"-"},"content":""},{"lineNumber":235,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":236,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":237,"author":{"gitId":"-"},"content":"* There are a few commands that can be undoable: commands that modify MTM\u0027s content that are related to players or teams."},{"lineNumber":238,"author":{"gitId":"-"},"content":"** Player related commands: `add`, `delete`, `edit`, `clear`, `remark` +"},{"lineNumber":239,"author":{"gitId":"-"},"content":"** Team related commands: `create`, `assign`, `remove`, `rename`"},{"lineNumber":240,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":243,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":244,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":245,"author":{"gitId":"-"},"content":"Commands that are _undoAble_ will be reversed and MTM will be in the state before the command was executed."},{"lineNumber":246,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":247,"author":{"gitId":"-"},"content":""},{"lineNumber":248,"author":{"gitId":"-"},"content":"[[redo]]"},{"lineNumber":249,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Redoing the previously undone command : `redo`"},{"lineNumber":250,"author":{"gitId":"codeeong"},"content":"If you accidentally call the `undo` command too many times and need a way to quickly reverse that, MTM allows you to redo the most recent `undo` command."},{"lineNumber":251,"author":{"gitId":"-"},"content":""},{"lineNumber":252,"author":{"gitId":"-"},"content":"Format: `redo` +"},{"lineNumber":253,"author":{"gitId":"-"},"content":"Alias: `r`"},{"lineNumber":254,"author":{"gitId":"-"},"content":""},{"lineNumber":255,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":256,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":257,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":258,"author":{"gitId":"-"},"content":"Previously executed `undo` command will be reversed and MTM will be in its previous state."},{"lineNumber":259,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":260,"author":{"gitId":"-"},"content":"// end::undoredo[]"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":"// tag::togglePrivacy[]"},{"lineNumber":263,"author":{"gitId":"-"},"content":"[[toggleprivacy]]"},{"lineNumber":264,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling various fields to private: `toggleprivacy` `[Since v1.4]`"},{"lineNumber":265,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":266,"author":{"gitId":"-"},"content":"You can toggle the privacy of various fields of players in MTM."},{"lineNumber":267,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":268,"author":{"gitId":"-"},"content":"Format: `toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]` +"},{"lineNumber":269,"author":{"gitId":"-"},"content":"Alias: `tp`"},{"lineNumber":270,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":271,"author":{"gitId":"codeeong"},"content":"[NOTE]"},{"lineNumber":272,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":273,"author":{"gitId":"-"},"content":"* Current version of `toggleprivacy` supports the field to be privated: +"},{"lineNumber":274,"author":{"gitId":"-"},"content":"** `p/`: PHONE, `e/`: EMAIL, `r/`: REMARK, `ra/`:RATING \u0026 `a/`: ADDRESS."},{"lineNumber":275,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":276,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":277,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":278,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":279,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":280,"author":{"gitId":"-"},"content":"Privacy of field will be toggled between private or public. +"},{"lineNumber":281,"author":{"gitId":"-"},"content":"If Phone: `p/` of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1 is private, running command: `tp 1 p/` would change phone field to public. +"},{"lineNumber":282,"author":{"gitId":"-"},"content":"Private fields are shown as \u003cPrivate `FIELD`\u003e."},{"lineNumber":283,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":284,"author":{"gitId":"-"},"content":""},{"lineNumber":285,"author":{"gitId":"-"},"content":"Here are some examples on how you can use the `toggleprivacy` command:"},{"lineNumber":286,"author":{"gitId":"-"},"content":""},{"lineNumber":287,"author":{"gitId":"-"},"content":"* `tp 1 p/ ra/`"},{"lineNumber":288,"author":{"gitId":"-"},"content":""},{"lineNumber":289,"author":{"gitId":"-"},"content":"Toggles privacy of phone and rating of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1."},{"lineNumber":290,"author":{"gitId":"-"},"content":"// end::togglePrivacy[]"},{"lineNumber":291,"author":{"gitId":"-"},"content":""},{"lineNumber":292,"author":{"gitId":"-"},"content":"// tag::key[]"},{"lineNumber":293,"author":{"gitId":"-"},"content":"[[key]]"},{"lineNumber":294,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling lock on MTM: `key` `[Since v1.5]`"},{"lineNumber":295,"author":{"gitId":"-"},"content":""},{"lineNumber":296,"author":{"gitId":"-"},"content":"You can toggle a lock on MTM to prevent unauthorised changes to your details in MTM. When MTM is in a locked state, functionality will be limited."},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"-"},"content":"Format: `key PASSWORD` +"},{"lineNumber":299,"author":{"gitId":"-"},"content":"Alias: `k`"},{"lineNumber":300,"author":{"gitId":"-"},"content":""},{"lineNumber":301,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":302,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":303,"author":{"gitId":"-"},"content":"* Current version of `key` uses a fixed default `PASSWORD`: *ilikesports*"},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":305,"author":{"gitId":"-"},"content":""},{"lineNumber":306,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":307,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":309,"author":{"gitId":"-"},"content":"When MTM is locked, only the following commands can be executed: +"},{"lineNumber":310,"author":{"gitId":"-"},"content":"`changeTheme`, `exit`, `find`, `help`, `key`, `list`, `sort` and `view`"},{"lineNumber":311,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":312,"author":{"gitId":"-"},"content":""},{"lineNumber":313,"author":{"gitId":"-"},"content":"Here are examples on how to use `key`:"},{"lineNumber":314,"author":{"gitId":"-"},"content":""},{"lineNumber":315,"author":{"gitId":"-"},"content":"* `key ilikesports`"},{"lineNumber":316,"author":{"gitId":"-"},"content":""},{"lineNumber":317,"author":{"gitId":"-"},"content":"If MTM is in a lock state, use this command to unlock it."},{"lineNumber":318,"author":{"gitId":"-"},"content":""},{"lineNumber":319,"author":{"gitId":"-"},"content":""},{"lineNumber":320,"author":{"gitId":"-"},"content":"* `key ilikesports`"},{"lineNumber":321,"author":{"gitId":"-"},"content":""},{"lineNumber":322,"author":{"gitId":"-"},"content":"To lock MTM, use this command to lock."},{"lineNumber":323,"author":{"gitId":"-"},"content":""},{"lineNumber":324,"author":{"gitId":"-"},"content":"// end::key[]"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":"[[clear]]"},{"lineNumber":327,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Clearing all entries : `clear`"},{"lineNumber":328,"author":{"gitId":"-"},"content":""},{"lineNumber":329,"author":{"gitId":"-"},"content":"You can clear all entries from MTM with the \u0027clear\u0027 command."},{"lineNumber":330,"author":{"gitId":"-"},"content":""},{"lineNumber":331,"author":{"gitId":"-"},"content":"Format: `clear` +"},{"lineNumber":332,"author":{"gitId":"-"},"content":"Alias: `c`"},{"lineNumber":333,"author":{"gitId":"-"},"content":""},{"lineNumber":334,"author":{"gitId":"-"},"content":"[[exit]]"},{"lineNumber":335,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Exiting the program : `exit`"},{"lineNumber":336,"author":{"gitId":"-"},"content":""},{"lineNumber":337,"author":{"gitId":"-"},"content":"You can exit the program by entering the \u0027exit\u0027 command."},{"lineNumber":338,"author":{"gitId":"-"},"content":""},{"lineNumber":339,"author":{"gitId":"-"},"content":"Format: `exit`"},{"lineNumber":340,"author":{"gitId":"-"},"content":""},{"lineNumber":341,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands"},{"lineNumber":342,"author":{"gitId":"-"},"content":""},{"lineNumber":343,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your players and their information in My Team Manager +"},{"lineNumber":344,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003cadd,adding a player\u003e\u003e, \u003c\u003cedit,editing a player\u003e\u003e or \u003c\u003cremark,adding a remark\u003e\u003e."},{"lineNumber":345,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools to \u003c\u003cfind,find\u003e\u003e a player or \u003c\u003csort,sort\u003e\u003e players in your list."},{"lineNumber":346,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":347,"author":{"gitId":"lithiumlkid"},"content":"// tag::addplayer[]"},{"lineNumber":348,"author":{"gitId":"-"},"content":"[[add]]"},{"lineNumber":349,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Adding a player: `add`"},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"lithiumlkid"},"content":"This is the command that you will be using most frequently, especially when dealing with new players. You will be able to add new players with the details that you have obtained into MTM by using the `add` command."},{"lineNumber":352,"author":{"gitId":"-"},"content":""},{"lineNumber":353,"author":{"gitId":"lithiumlkid"},"content":"Format: `add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]...` +"},{"lineNumber":354,"author":{"gitId":"-"},"content":"Alias: `a`"},{"lineNumber":355,"author":{"gitId":"-"},"content":""},{"lineNumber":356,"author":{"gitId":"-"},"content":"The table below explains the correct inputs for the parameters."},{"lineNumber":357,"author":{"gitId":"-"},"content":""},{"lineNumber":358,"author":{"gitId":"-"},"content":"[width\u003d\"80%\",cols\u003d\"1,2,2\",options\u003d\"header\"]"},{"lineNumber":359,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":360,"author":{"gitId":"-"},"content":"|Parameter |Input type |Example"},{"lineNumber":361,"author":{"gitId":"-"},"content":"|n/NAME |Player name | n/Ronaldo"},{"lineNumber":362,"author":{"gitId":"-"},"content":"|e/EMAIL |Player\u0027s email address | a/ronaldo@soccer.com"},{"lineNumber":363,"author":{"gitId":"-"},"content":"|tm/TEAM |Player\u0027s Team | tm/Real Madrid"},{"lineNumber":364,"author":{"gitId":"-"},"content":"|a/ADDRESS |Player\u0027s address| a/Blk 123 Bukit Batok St 21"},{"lineNumber":365,"author":{"gitId":"-"},"content":"|p/PHONE_NUMBER| Player\u0027s phone number| p/92343433"},{"lineNumber":366,"author":{"gitId":"-"},"content":"|j/JERSEY_NUMBER| Player\u0027s jersey number| j/17"},{"lineNumber":367,"author":{"gitId":"-"},"content":"|ra/RATING| Player\u0027s performance rating (From 1 to 5)| ra/5"},{"lineNumber":368,"author":{"gitId":"-"},"content":"|po/POSITION| Player\u0027s postion +"},{"lineNumber":369,"author":{"gitId":"-"},"content":"(1 for Striker, +"},{"lineNumber":370,"author":{"gitId":"-"},"content":"2 for Midfiled, +"},{"lineNumber":371,"author":{"gitId":"-"},"content":"3 for Defender, +"},{"lineNumber":372,"author":{"gitId":"-"},"content":"4 for Goalkeeper)| po/1"},{"lineNumber":373,"author":{"gitId":"-"},"content":"|av/AVATAR| Absolute filepath to player\u0027s avatar image file| av/C:\\avatar.png (for Windows) av//User/username/path/to/image.jpg (for MacOS)"},{"lineNumber":374,"author":{"gitId":"-"},"content":"|t/TAG| Your tag for the player| t/Injured"},{"lineNumber":375,"author":{"gitId":"-"},"content":""},{"lineNumber":376,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":377,"author":{"gitId":"-"},"content":""},{"lineNumber":378,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":379,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":380,"author":{"gitId":"-"},"content":"* A player can only be added to an existing team."},{"lineNumber":381,"author":{"gitId":"-"},"content":"* If you have not created the team yet, you can create one first using the \u003c\u003cCreating a team: `create` `[Since v1.2]`, `create`\u003e\u003e command."},{"lineNumber":382,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":383,"author":{"gitId":"-"},"content":""},{"lineNumber":384,"author":{"gitId":"-"},"content":"[TIP]"},{"lineNumber":385,"author":{"gitId":"-"},"content":"A player can have any number of tags (including 0)."},{"lineNumber":386,"author":{"gitId":"-"},"content":""},{"lineNumber":387,"author":{"gitId":"-"},"content":"Output: The added player should appear in the player list panel."},{"lineNumber":388,"author":{"gitId":"-"},"content":""},{"lineNumber":389,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":390,"author":{"gitId":"-"},"content":""},{"lineNumber":391,"author":{"gitId":"-"},"content":"* `add n/Mo Salah e/mo@soccer.com`"},{"lineNumber":392,"author":{"gitId":"-"},"content":""},{"lineNumber":393,"author":{"gitId":"-"},"content":"Adds a player named `Mo Salah` with email `mo@soccer.com`."},{"lineNumber":394,"author":{"gitId":"-"},"content":""},{"lineNumber":395,"author":{"gitId":"-"},"content":"* `add n/Ronaldo p/92331322 e/ronaldo@soccer.com a/Portugal tm/Real Madrid j/17 ra/5 po/1`"},{"lineNumber":396,"author":{"gitId":"-"},"content":""},{"lineNumber":397,"author":{"gitId":"-"},"content":"Adds a player named Ronaldo with phone number `92331322`, email `ronaldo@soccer.com`, address `Portugal`,"},{"lineNumber":398,"author":{"gitId":"-"},"content":"team `Real Madrid`, jersey number `17`, rating `5`, and position `1` corresponding to `Striker`."},{"lineNumber":399,"author":{"gitId":"-"},"content":""},{"lineNumber":400,"author":{"gitId":"-"},"content":"[[edit]]"},{"lineNumber":401,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Editing a player : `edit`"},{"lineNumber":402,"author":{"gitId":"-"},"content":""},{"lineNumber":403,"author":{"gitId":"lithiumlkid"},"content":"If you made a mistake when adding a player, or if there\u0027s player information that needs updating, you may edit an existing player in MTM with the \u0027edit\u0027 command."},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"-"},"content":"Format: `edit INDEX [n/NAME] [e/EMAIL] [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]...` +"},{"lineNumber":406,"author":{"gitId":"-"},"content":"Alias: `e`"},{"lineNumber":407,"author":{"gitId":"-"},"content":""},{"lineNumber":408,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":409,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":410,"author":{"gitId":"-"},"content":"* Edits the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e."},{"lineNumber":411,"author":{"gitId":"-"},"content":"* Please only edit the player that is currently being selected. If you were to edit a player who is not selected, the player\u0027s details will be updated, but the selection will remain at the currently selected player."},{"lineNumber":412,"author":{"gitId":"-"},"content":"* At least one of the optional fields must be provided."},{"lineNumber":413,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values."},{"lineNumber":414,"author":{"gitId":"-"},"content":"* When you edit tags, the existing tags of the player will be removed i.e adding of tags is not cumulative."},{"lineNumber":415,"author":{"gitId":"-"},"content":"* You can remove all the player\u0027s tags by typing `t/` without specifying any tags after it."},{"lineNumber":416,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":417,"author":{"gitId":"-"},"content":""},{"lineNumber":418,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":419,"author":{"gitId":"-"},"content":""},{"lineNumber":420,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com`"},{"lineNumber":421,"author":{"gitId":"-"},"content":""},{"lineNumber":422,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st player to be `91234567` and `johndoe@example.com` respectively."},{"lineNumber":423,"author":{"gitId":"-"},"content":""},{"lineNumber":424,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/`"},{"lineNumber":425,"author":{"gitId":"-"},"content":""},{"lineNumber":426,"author":{"gitId":"-"},"content":"Edits the name of the 2nd player to be `Betsy Crower` and clears all existing tags."},{"lineNumber":427,"author":{"gitId":"lithiumlkid"},"content":"// end::addplayer[]"},{"lineNumber":428,"author":{"gitId":"-"},"content":""},{"lineNumber":429,"author":{"gitId":"-"},"content":"[[delete]]"},{"lineNumber":430,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Deleting a player : `delete`"},{"lineNumber":431,"author":{"gitId":"-"},"content":""},{"lineNumber":432,"author":{"gitId":"codeeong"},"content":"If you want to remove a player from MTM, you may use this command to delete the player."},{"lineNumber":433,"author":{"gitId":"-"},"content":""},{"lineNumber":434,"author":{"gitId":"-"},"content":"Format: `delete INDEX` +"},{"lineNumber":435,"author":{"gitId":"-"},"content":"Alias: `d`"},{"lineNumber":436,"author":{"gitId":"-"},"content":""},{"lineNumber":437,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":438,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":439,"author":{"gitId":"-"},"content":"* Deletes the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e."},{"lineNumber":440,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":441,"author":{"gitId":"-"},"content":""},{"lineNumber":442,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":443,"author":{"gitId":"-"},"content":""},{"lineNumber":444,"author":{"gitId":"-"},"content":"* `list`"},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `delete 2`"},{"lineNumber":446,"author":{"gitId":"-"},"content":""},{"lineNumber":447,"author":{"gitId":"-"},"content":"Deletes the 2nd player in the MTM."},{"lineNumber":448,"author":{"gitId":"-"},"content":""},{"lineNumber":449,"author":{"gitId":"-"},"content":"* `find Betsy`"},{"lineNumber":450,"author":{"gitId":"-"},"content":"* `delete 1`"},{"lineNumber":451,"author":{"gitId":"-"},"content":""},{"lineNumber":452,"author":{"gitId":"lohtianwei"},"content":"Deletes the 1st player in the results of the `find` command."},{"lineNumber":453,"author":{"gitId":"-"},"content":""},{"lineNumber":454,"author":{"gitId":"-"},"content":"[[remark]]"},{"lineNumber":455,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Noting down a remark for player: `remark` `[Since v1.1]`"},{"lineNumber":456,"author":{"gitId":"-"},"content":""},{"lineNumber":457,"author":{"gitId":"-"},"content":"When you need to drop yourself a self-note with regards to a specific player you\u0027re managing, you can make a self-note"},{"lineNumber":458,"author":{"gitId":"-"},"content":"of a specific player easily by giving the player a remark for you to remember by."},{"lineNumber":459,"author":{"gitId":"-"},"content":""},{"lineNumber":460,"author":{"gitId":"-"},"content":"Format: `remark INDEX [r/[REMARK]]` +"},{"lineNumber":461,"author":{"gitId":"-"},"content":"Alias: `rm`"},{"lineNumber":462,"author":{"gitId":"-"},"content":""},{"lineNumber":463,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":464,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":465,"author":{"gitId":"-"},"content":"* By leaving out `r/REMARK` or `REMARK`, the command acts as a remark removal."},{"lineNumber":466,"author":{"gitId":"-"},"content":"* Only use the `remark` command when you want to leave a remark, `add` or `edit` does not allow you to create a remark for the player."},{"lineNumber":467,"author":{"gitId":"-"},"content":"* Please only add remarks to the player that is currently being selected. If you were to add remarks to a player who is not selected, the player\u0027s remarks will be updated, but the selection will remain at the currently selected player."},{"lineNumber":468,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":469,"author":{"gitId":"-"},"content":""},{"lineNumber":470,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":471,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":472,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":473,"author":{"gitId":"-"},"content":"Your specified player will either be given a new remark or have its existing remark removed."},{"lineNumber":474,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":475,"author":{"gitId":"-"},"content":""},{"lineNumber":476,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `remark` command:"},{"lineNumber":477,"author":{"gitId":"-"},"content":""},{"lineNumber":478,"author":{"gitId":"-"},"content":"* `remark 1`"},{"lineNumber":479,"author":{"gitId":"-"},"content":""},{"lineNumber":480,"author":{"gitId":"-"},"content":"Removes the remark from the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1."},{"lineNumber":481,"author":{"gitId":"-"},"content":""},{"lineNumber":482,"author":{"gitId":"-"},"content":"* `remark 5 r/MVP Player`"},{"lineNumber":483,"author":{"gitId":"-"},"content":""},{"lineNumber":484,"author":{"gitId":"-"},"content":"Give a remark to the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 5 with the remark \"MVP Player\"."},{"lineNumber":485,"author":{"gitId":"-"},"content":""},{"lineNumber":486,"author":{"gitId":"-"},"content":"[[list]]"},{"lineNumber":487,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing all players : `list`"},{"lineNumber":488,"author":{"gitId":"-"},"content":""},{"lineNumber":489,"author":{"gitId":"-"},"content":"To view a list of all the players you are managing, you can use the `list` command to see all of your players."},{"lineNumber":490,"author":{"gitId":"-"},"content":""},{"lineNumber":491,"author":{"gitId":"-"},"content":"Format: `list` +"},{"lineNumber":492,"author":{"gitId":"-"},"content":"Alias: `l`"},{"lineNumber":493,"author":{"gitId":"-"},"content":""},{"lineNumber":494,"author":{"gitId":"-"},"content":""},{"lineNumber":495,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]"},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"[[sort]]"},{"lineNumber":497,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sorting players by field: `sort` `[Since v1.2]`"},{"lineNumber":498,"author":{"gitId":"-"},"content":""},{"lineNumber":499,"author":{"gitId":"-"},"content":"You can sort the players by fields with the \u0027sort\u0027 command. Players can be sorted in both ascending or descending order."},{"lineNumber":500,"author":{"gitId":"-"},"content":""},{"lineNumber":501,"author":{"gitId":"-"},"content":"Format: `sort FIELD ORDER` +"},{"lineNumber":502,"author":{"gitId":"-"},"content":"Alias: `so`"},{"lineNumber":503,"author":{"gitId":"-"},"content":""},{"lineNumber":504,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":505,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":506,"author":{"gitId":"-"},"content":"* Current version of `sort` supports the following fields and order:"},{"lineNumber":507,"author":{"gitId":"-"},"content":"** `FIELD`: `name`, `email`, `address`, `rating`, `jersey` \u0026 `position`"},{"lineNumber":508,"author":{"gitId":"-"},"content":"** `ORDER`: `asc` \u0026 `desc`"},{"lineNumber":509,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":510,"author":{"gitId":"-"},"content":""},{"lineNumber":511,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `sort` command:"},{"lineNumber":512,"author":{"gitId":"-"},"content":""},{"lineNumber":513,"author":{"gitId":"-"},"content":"* `sort name asc`"},{"lineNumber":514,"author":{"gitId":"-"},"content":""},{"lineNumber":515,"author":{"gitId":"-"},"content":"This will sort MTM by names, in alphabetical order."},{"lineNumber":516,"author":{"gitId":"-"},"content":""},{"lineNumber":517,"author":{"gitId":"-"},"content":"* `sort name desc`"},{"lineNumber":518,"author":{"gitId":"-"},"content":""},{"lineNumber":519,"author":{"gitId":"-"},"content":"This will sort MTM by names, in reverse alphabetical order."},{"lineNumber":520,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]"},{"lineNumber":521,"author":{"gitId":"-"},"content":""},{"lineNumber":522,"author":{"gitId":"-"},"content":"[[find]]"},{"lineNumber":523,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Locating players by name: `find`"},{"lineNumber":524,"author":{"gitId":"-"},"content":""},{"lineNumber":525,"author":{"gitId":"-"},"content":"You can find a player whose name contain any of the given keywords with this command within the full player listing of MTM."},{"lineNumber":526,"author":{"gitId":"-"},"content":""},{"lineNumber":527,"author":{"gitId":"-"},"content":"Format: `find KEYWORD [KEYWORD]...` +"},{"lineNumber":528,"author":{"gitId":"-"},"content":"Alias: `f`"},{"lineNumber":529,"author":{"gitId":"-"},"content":""},{"lineNumber":530,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":531,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":532,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`."},{"lineNumber":533,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`."},{"lineNumber":534,"author":{"gitId":"-"},"content":"* Only the name is searched."},{"lineNumber":535,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`."},{"lineNumber":536,"author":{"gitId":"-"},"content":"* Players matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`."},{"lineNumber":537,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":538,"author":{"gitId":"-"},"content":""},{"lineNumber":539,"author":{"gitId":"-"},"content":"Examples:"},{"lineNumber":540,"author":{"gitId":"-"},"content":""},{"lineNumber":541,"author":{"gitId":"-"},"content":"* `find John`"},{"lineNumber":542,"author":{"gitId":"-"},"content":""},{"lineNumber":543,"author":{"gitId":"-"},"content":"MTM will find all players with the name `john` with uppercase/lowercase characters in it."},{"lineNumber":544,"author":{"gitId":"-"},"content":""},{"lineNumber":545,"author":{"gitId":"-"},"content":"* `find Betsy Tim John`"},{"lineNumber":546,"author":{"gitId":"-"},"content":""},{"lineNumber":547,"author":{"gitId":"-"},"content":"Display all players that have the name `betsy`, `tim`, or `john`."},{"lineNumber":548,"author":{"gitId":"-"},"content":""},{"lineNumber":549,"author":{"gitId":"-"},"content":"[[select]]"},{"lineNumber":550,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Selecting a player : `select`"},{"lineNumber":551,"author":{"gitId":"-"},"content":""},{"lineNumber":552,"author":{"gitId":"-"},"content":"Identified the player you\u0027re looking for and want to see more details about the player?"},{"lineNumber":553,"author":{"gitId":"-"},"content":"MTM offers you the ability to view details of your specified player via an \u003c\u003cIndex, `INDEX`\u003e\u003e shown in the current listing of players."},{"lineNumber":554,"author":{"gitId":"-"},"content":"Alternatively, you can just scroll to the player you want, click their card,"},{"lineNumber":555,"author":{"gitId":"-"},"content":"and their details will be displayed on the right hand side of the screen."},{"lineNumber":556,"author":{"gitId":"-"},"content":""},{"lineNumber":557,"author":{"gitId":"-"},"content":"Format: `select INDEX` +"},{"lineNumber":558,"author":{"gitId":"-"},"content":"Alias: `s`"},{"lineNumber":559,"author":{"gitId":"-"},"content":""},{"lineNumber":560,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":561,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":562,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":563,"author":{"gitId":"codeeong"},"content":"The details panel will display your selected player\u0027s name, phone number, address, email address,"},{"lineNumber":564,"author":{"gitId":"codeeong"},"content":"jersey number, and remarks on the right side of the screen."},{"lineNumber":565,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":566,"author":{"gitId":"-"},"content":""},{"lineNumber":567,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `select` command:"},{"lineNumber":568,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":569,"author":{"gitId":"-"},"content":"* `list`"},{"lineNumber":570,"author":{"gitId":"-"},"content":"* `select 2`"},{"lineNumber":571,"author":{"gitId":"-"},"content":""},{"lineNumber":572,"author":{"gitId":"-"},"content":"Displays the list of all players and selects the 2nd player in that list."},{"lineNumber":573,"author":{"gitId":"-"},"content":""},{"lineNumber":574,"author":{"gitId":"-"},"content":"* `find Betsy`"},{"lineNumber":575,"author":{"gitId":"-"},"content":"* `select 1`"},{"lineNumber":576,"author":{"gitId":"-"},"content":""},{"lineNumber":577,"author":{"gitId":"-"},"content":"Finds a player named `betsy` and selects the 1st player in the results of the `find` command."},{"lineNumber":578,"author":{"gitId":"-"},"content":""},{"lineNumber":579,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands"},{"lineNumber":580,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":581,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your teams and their players in My Team Manager +"},{"lineNumber":582,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003ccreate,creating a team\u003e\u003e, \u003c\u003cassign,assigning players to a team\u003e\u003e or \u003c\u003crename,renaming a team\u003e\u003e."},{"lineNumber":583,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools like \u003c\u003cview,viewing a team\u003e\u003e."},{"lineNumber":584,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":585,"author":{"gitId":"-"},"content":"// tag::create[]"},{"lineNumber":586,"author":{"gitId":"-"},"content":"[[create]]"},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a team: `create` `[Since v1.2]`"},{"lineNumber":588,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":589,"author":{"gitId":"-"},"content":"What is a team management application without the functionality of creating a team? When you use this command, it allows you to create a team that can be assigned to players later on."},{"lineNumber":590,"author":{"gitId":"-"},"content":""},{"lineNumber":591,"author":{"gitId":"-"},"content":"Format: `create TEAM_NAME` +"},{"lineNumber":592,"author":{"gitId":"-"},"content":"Alias: `ct`"},{"lineNumber":593,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":594,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":595,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":596,"author":{"gitId":"-"},"content":"* You can\u0027t create a team that already exist in MTM."},{"lineNumber":597,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":598,"author":{"gitId":"-"},"content":""},{"lineNumber":599,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":600,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":601,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":602,"author":{"gitId":"-"},"content":"Your newly specified team will be created with the name you have given without any players in it, and your team name will appear in the team bar below."},{"lineNumber":603,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":604,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":605,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:"},{"lineNumber":606,"author":{"gitId":"-"},"content":""},{"lineNumber":607,"author":{"gitId":"-"},"content":"* `create Liverpool`"},{"lineNumber":608,"author":{"gitId":"-"},"content":""},{"lineNumber":609,"author":{"gitId":"-"},"content":"Creates another new team with the name \"Liverpool\" by entering `create Liverpool` into the Command Box and pressing kbd:[Enter]."},{"lineNumber":610,"author":{"gitId":"-"},"content":""},{"lineNumber":611,"author":{"gitId":"-"},"content":"image::TeamCreateExampleBefore.png[width\u003d\"200\"]"},{"lineNumber":612,"author":{"gitId":"-"},"content":""},{"lineNumber":613,"author":{"gitId":"-"},"content":"\"Liverpool\" will be shown in the Team List."},{"lineNumber":614,"author":{"gitId":"-"},"content":""},{"lineNumber":615,"author":{"gitId":"-"},"content":"image::TeamCreateExampleAfter.png[width\u003d\"350\"]"},{"lineNumber":616,"author":{"gitId":"-"},"content":"// end::create[]"},{"lineNumber":617,"author":{"gitId":"-"},"content":""},{"lineNumber":618,"author":{"gitId":"-"},"content":"// tag::view[]"},{"lineNumber":619,"author":{"gitId":"-"},"content":"[[view]]"},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a team: `view` `[Since v1.3]`"},{"lineNumber":621,"author":{"gitId":"-"},"content":""},{"lineNumber":622,"author":{"gitId":"-"},"content":"With the ability to manage different teams, you will be able to identify all players in a team easily with the `view` command."},{"lineNumber":623,"author":{"gitId":"-"},"content":""},{"lineNumber":624,"author":{"gitId":"-"},"content":"`Coming in v2.0` +"},{"lineNumber":625,"author":{"gitId":"-"},"content":"Details of your team will be displayed on the right panel when `view` command is executed."},{"lineNumber":626,"author":{"gitId":"-"},"content":""},{"lineNumber":627,"author":{"gitId":"-"},"content":"Format: `view TEAM_NAME` +"},{"lineNumber":628,"author":{"gitId":"-"},"content":"Alias: `vt`"},{"lineNumber":629,"author":{"gitId":"-"},"content":""},{"lineNumber":630,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":631,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":632,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":633,"author":{"gitId":"-"},"content":"Displays the list of players on the left panel that are in the team specified."},{"lineNumber":634,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":635,"author":{"gitId":"-"},"content":""},{"lineNumber":636,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `view` command:"},{"lineNumber":637,"author":{"gitId":"-"},"content":""},{"lineNumber":638,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":639,"author":{"gitId":"-"},"content":""},{"lineNumber":640,"author":{"gitId":"-"},"content":"You can use the command above to easily view all the players that exist in \"Arsenal\"."},{"lineNumber":641,"author":{"gitId":"-"},"content":""},{"lineNumber":642,"author":{"gitId":"-"},"content":"image::TeamViewExampleBefore.png[width\u003d\"350\"]"},{"lineNumber":643,"author":{"gitId":"-"},"content":""},{"lineNumber":644,"author":{"gitId":"-"},"content":"The Player List will be updated with all players in the specified team, \"Arsenal\"."},{"lineNumber":645,"author":{"gitId":"-"},"content":""},{"lineNumber":646,"author":{"gitId":"-"},"content":"image::TeamViewExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":647,"author":{"gitId":"-"},"content":"// end::view[]"},{"lineNumber":648,"author":{"gitId":"-"},"content":""},{"lineNumber":649,"author":{"gitId":"-"},"content":"// tag::assign[]"},{"lineNumber":650,"author":{"gitId":"-"},"content":"[[assign]]"},{"lineNumber":651,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning player to teams: `assign` `[Since v1.3]`"},{"lineNumber":652,"author":{"gitId":"-"},"content":""},{"lineNumber":653,"author":{"gitId":"-"},"content":"Have a player without a team, or have yet to assigned one during the addition of player into MTM, you can call `assign` command to assign that player to a particular team of your choice."},{"lineNumber":654,"author":{"gitId":"-"},"content":""},{"lineNumber":655,"author":{"gitId":"-"},"content":"Format: `assign [TEAM_NAME] i/INDEX [INDEX]...` +"},{"lineNumber":656,"author":{"gitId":"-"},"content":"Alias: `at`"},{"lineNumber":657,"author":{"gitId":"-"},"content":""},{"lineNumber":658,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":659,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":660,"author":{"gitId":"-"},"content":"* You can assign multiple players to a team by including more than one valid \u003c\u003cIndex, `INDEX`\u003e\u003e."},{"lineNumber":661,"author":{"gitId":"-"},"content":"* A player can only consist of 1 team, assigning a player that have an existing team, will be re-assigned the new team."},{"lineNumber":662,"author":{"gitId":"-"},"content":"* Assigning a player without a given team will unassign the player from its current team."},{"lineNumber":663,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":664,"author":{"gitId":"-"},"content":""},{"lineNumber":665,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":666,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":667,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":668,"author":{"gitId":"-"},"content":"Your specified player, via \u003c\u003cIndex, `INDEX`\u003e\u003e, will be assigned to the specified team or unassigned from any team."},{"lineNumber":669,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":670,"author":{"gitId":"-"},"content":""},{"lineNumber":671,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:"},{"lineNumber":672,"author":{"gitId":"-"},"content":""},{"lineNumber":673,"author":{"gitId":"-"},"content":"* `list`"},{"lineNumber":674,"author":{"gitId":"-"},"content":""},{"lineNumber":675,"author":{"gitId":"-"},"content":"View the full list of players in MTM so that you can determine which player you want to assign a team."},{"lineNumber":676,"author":{"gitId":"-"},"content":""},{"lineNumber":677,"author":{"gitId":"-"},"content":"image::TeamAssignListExample.png[width\u003d\"700\"]"},{"lineNumber":678,"author":{"gitId":"-"},"content":""},{"lineNumber":679,"author":{"gitId":"-"},"content":"* `assign Liverpool i/1 2`"},{"lineNumber":680,"author":{"gitId":"-"},"content":""},{"lineNumber":681,"author":{"gitId":"-"},"content":"Enter the command into the Command Box which will assign the player with \u003c\u003cIndex, `INDEX`\u003e\u003e 1 and 2 to team \"Liverpool\"."},{"lineNumber":682,"author":{"gitId":"-"},"content":""},{"lineNumber":683,"author":{"gitId":"-"},"content":"image::TeamAssignExampleBefore.png[width\u003d\"200\"]"},{"lineNumber":684,"author":{"gitId":"-"},"content":""},{"lineNumber":685,"author":{"gitId":"-"},"content":"image::TeamAssignExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":686,"author":{"gitId":"-"},"content":""},{"lineNumber":687,"author":{"gitId":"-"},"content":"* `add n/Rembart Loeri e/remlo@tam.com tm/Liverpool`"},{"lineNumber":688,"author":{"gitId":"-"},"content":""},{"lineNumber":689,"author":{"gitId":"-"},"content":"Add a player with the prefix `tm/` for `Team` will automatically be assigned to the team specified."},{"lineNumber":690,"author":{"gitId":"-"},"content":""},{"lineNumber":691,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleBefore.png[width\u003d\"350\"]"},{"lineNumber":692,"author":{"gitId":"-"},"content":""},{"lineNumber":693,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::assign[]"},{"lineNumber":695,"author":{"gitId":"-"},"content":""},{"lineNumber":696,"author":{"gitId":"-"},"content":"// tag::rename[]"},{"lineNumber":697,"author":{"gitId":"-"},"content":"[[rename]]"},{"lineNumber":698,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Rename a team: `rename` `[Since v1.4]`"},{"lineNumber":699,"author":{"gitId":"-"},"content":""},{"lineNumber":700,"author":{"gitId":"-"},"content":"Entered your team name wrongly or you need to update it to accordingly, you can use the `rename` command to help you make that change."},{"lineNumber":701,"author":{"gitId":"-"},"content":""},{"lineNumber":702,"author":{"gitId":"-"},"content":"Format: `rename TEAM_NAME tm/RENAME_TEAM_NAME` +"},{"lineNumber":703,"author":{"gitId":"-"},"content":"Alias: `rnt`"},{"lineNumber":704,"author":{"gitId":"-"},"content":""},{"lineNumber":705,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":706,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":708,"author":{"gitId":"-"},"content":"Your specified team will be updated with the new team name along with the affected players in the existing team."},{"lineNumber":709,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":710,"author":{"gitId":"-"},"content":""},{"lineNumber":711,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `rename` command:"},{"lineNumber":712,"author":{"gitId":"-"},"content":""},{"lineNumber":713,"author":{"gitId":"-"},"content":"* `rename Liverpool tm/Tello Mello`"},{"lineNumber":714,"author":{"gitId":"-"},"content":""},{"lineNumber":715,"author":{"gitId":"-"},"content":"You can rename a `Team` easily by entering a similar command above, which will rename \"Liverpool\" into \"Tello Mello\"."},{"lineNumber":716,"author":{"gitId":"-"},"content":""},{"lineNumber":717,"author":{"gitId":"-"},"content":"image::TeamRenameExampleBefore.png[width\u003d\"700\"]"},{"lineNumber":718,"author":{"gitId":"-"},"content":""},{"lineNumber":719,"author":{"gitId":"-"},"content":"After renaming, the team name will be updated in the Team List and will be update for each individual player."},{"lineNumber":720,"author":{"gitId":"-"},"content":""},{"lineNumber":721,"author":{"gitId":"-"},"content":"image::TeamRenameExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":722,"author":{"gitId":"-"},"content":"// end::rename[]"},{"lineNumber":723,"author":{"gitId":"-"},"content":""},{"lineNumber":724,"author":{"gitId":"-"},"content":"// tag::remove[]"},{"lineNumber":725,"author":{"gitId":"-"},"content":"[[remove]]"},{"lineNumber":726,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a team: `remove` `[Since v1.4]`"},{"lineNumber":727,"author":{"gitId":"-"},"content":""},{"lineNumber":728,"author":{"gitId":"-"},"content":"No longer managing the team or the team has been disbanded, you can easily remove the team from MTM."},{"lineNumber":729,"author":{"gitId":"-"},"content":""},{"lineNumber":730,"author":{"gitId":"-"},"content":"Format: `remove TEAM_NAME` +"},{"lineNumber":731,"author":{"gitId":"-"},"content":"Alias: `rt`"},{"lineNumber":732,"author":{"gitId":"-"},"content":""},{"lineNumber":733,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":734,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":735,"author":{"gitId":"-"},"content":"* Removing a team will automatically update all affected players\u0027 `Team` field."},{"lineNumber":736,"author":{"gitId":"-"},"content":"* Players without a team will need to be re-assigned."},{"lineNumber":737,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":738,"author":{"gitId":"-"},"content":""},{"lineNumber":739,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":740,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":741,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":742,"author":{"gitId":"-"},"content":"Remove the specified team and update all affected players."},{"lineNumber":743,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":744,"author":{"gitId":"-"},"content":""},{"lineNumber":745,"author":{"gitId":"-"},"content":"Here are a few valid examples of how you can use the `remove` command:"},{"lineNumber":746,"author":{"gitId":"-"},"content":""},{"lineNumber":747,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":748,"author":{"gitId":"-"},"content":""},{"lineNumber":749,"author":{"gitId":"-"},"content":"Here we show you what it would be like before the removal of \"Arsenal\"."},{"lineNumber":750,"author":{"gitId":"-"},"content":""},{"lineNumber":751,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleBefore.png[width\u003d\"700\"]"},{"lineNumber":752,"author":{"gitId":"-"},"content":""},{"lineNumber":753,"author":{"gitId":"-"},"content":"* `remove Arsenal`"},{"lineNumber":754,"author":{"gitId":"-"},"content":""},{"lineNumber":755,"author":{"gitId":"-"},"content":"After typing the command, you will remove the the team from MTM and will be taken off the Team Display as well as updating each individual player affected to be without a team."},{"lineNumber":756,"author":{"gitId":"-"},"content":""},{"lineNumber":757,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleAfter.png[width\u003d\"700\"]"},{"lineNumber":758,"author":{"gitId":"-"},"content":"// end::remove[]"},{"lineNumber":759,"author":{"gitId":"-"},"content":""},{"lineNumber":760,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands"},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":762,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful commands to change the look of My Team Manager to \u003c\u003csetTagColour, set the colour of your tags\u003e\u003e and \u003c\u003cchangeTeam,change the theme\u003e\u003e."},{"lineNumber":763,"author":{"gitId":"-"},"content":""},{"lineNumber":764,"author":{"gitId":"-"},"content":"// tag::setTagColour[]"},{"lineNumber":765,"author":{"gitId":"lithiumlkid"},"content":"[[setTagColour]]"},{"lineNumber":766,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting colour of tags : `setTagColour` `[Since v1.2]`"},{"lineNumber":767,"author":{"gitId":"-"},"content":""},{"lineNumber":768,"author":{"gitId":"-"},"content":"You can set the tags to a colour of your choice with the \u0027setColourTag\u0027 command."},{"lineNumber":769,"author":{"gitId":"-"},"content":""},{"lineNumber":770,"author":{"gitId":"-"},"content":"Format: `setTagColour t/TAG tc/COLOUR` +"},{"lineNumber":771,"author":{"gitId":"-"},"content":"Alias: `stc`"},{"lineNumber":772,"author":{"gitId":"-"},"content":""},{"lineNumber":773,"author":{"gitId":"codeeong"},"content":"[NOTE]"},{"lineNumber":774,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":775,"author":{"gitId":"-"},"content":"* The tag must currently be in used in MTM for this command to work."},{"lineNumber":776,"author":{"gitId":"-"},"content":"* Current version of `setTagColour` supports only this list of preset `COLOUR`:"},{"lineNumber":777,"author":{"gitId":"-"},"content":"** `teal`, `red`, `yellow`, `blue`, `orange`, `brown`, `green`, `pink`, `black`, `grey`"},{"lineNumber":778,"author":{"gitId":"-"},"content":"* The current version of `setTagColour` is *NOT* an UndoableCommand."},{"lineNumber":779,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a setTagCommand."},{"lineNumber":780,"author":{"gitId":"-"},"content":"* Instead, just enter `stc t/TAG tc/COLOUR` to change the colour back!"},{"lineNumber":781,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":782,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":783,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]"},{"lineNumber":784,"author":{"gitId":"codeeong"},"content":".*What to expect*"},{"lineNumber":785,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":786,"author":{"gitId":"codeeong"},"content":"You will see the specified tags in the left panel change to the colour of your choice."},{"lineNumber":787,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":788,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":789,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `setTagColour` command:"},{"lineNumber":790,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":791,"author":{"gitId":"codeeong"},"content":"* `stc t/redCard t/red`"},{"lineNumber":792,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":793,"author":{"gitId":"codeeong"},"content":"All the tags that say \"redCard\" in the left panel will now turn red."},{"lineNumber":794,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":795,"author":{"gitId":"-"},"content":"// end::setTagColour[]"},{"lineNumber":796,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":797,"author":{"gitId":"-"},"content":"// tag::changeTheme[]"},{"lineNumber":798,"author":{"gitId":"-"},"content":"[[changeTheme]]"},{"lineNumber":799,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Changing theme : `changeTheme` `[Since v1.5]`"},{"lineNumber":800,"author":{"gitId":"codeeong"},"content":"If you feel that the dark theme is not for you, and you prefer to work on a brighter interface,"},{"lineNumber":801,"author":{"gitId":"codeeong"},"content":"you can change the theme from the default Dark Theme to Light Theme with the \u0027changeTheme\u0027 command."},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":803,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":804,"author":{"gitId":"-"},"content":"Format: `changeTheme THEME` +"},{"lineNumber":805,"author":{"gitId":"codeeong"},"content":"Alias: `cte`"},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":"[NOTE]"},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":809,"author":{"gitId":"-"},"content":"* Current version of `changeTheme` only supports this 2 `THEME`:"},{"lineNumber":810,"author":{"gitId":"-"},"content":"** `Light` or `Dark`"},{"lineNumber":811,"author":{"gitId":"-"},"content":"* The current version of `changTheme` is *NOT* an UndoableCommand."},{"lineNumber":812,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a `changeTheme` command."},{"lineNumber":813,"author":{"gitId":"-"},"content":"* Instead, just enter `cte THEME` to change the colour back!"},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":815,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":816,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `changeTheme` command:"},{"lineNumber":817,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":818,"author":{"gitId":"codeeong"},"content":"* `cte Light`"},{"lineNumber":819,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":820,"author":{"gitId":"codeeong"},"content":"You will see the whole interface change from a dark-coloured theme to become light-coloured."},{"lineNumber":821,"author":{"gitId":"-"},"content":"// end::changeTheme[]"},{"lineNumber":822,"author":{"gitId":"-"},"content":""},{"lineNumber":823,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coming Soon"},{"lineNumber":824,"author":{"gitId":"-"},"content":""},{"lineNumber":825,"author":{"gitId":"lohtianwei"},"content":"There is more to come with the next upcoming update! Keep a lookout for these newly implemented features soon!"},{"lineNumber":826,"author":{"gitId":"-"},"content":""},{"lineNumber":827,"author":{"gitId":"-"},"content":"// tag::changePass2.0[]"},{"lineNumber":828,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change password: `changepass` `[Coming in v2.0]`"},{"lineNumber":829,"author":{"gitId":"-"},"content":""},{"lineNumber":830,"author":{"gitId":"-"},"content":"Should you feel that the default password used in `key` could be more secure, you may change it to a password of your"},{"lineNumber":831,"author":{"gitId":"-"},"content":"choosing with this command."},{"lineNumber":832,"author":{"gitId":"-"},"content":""},{"lineNumber":833,"author":{"gitId":"-"},"content":"Format: `changepass CURRENT_PASSWORD NEW_PASSWORD CONFIRM_PASSWORD` +"},{"lineNumber":834,"author":{"gitId":"-"},"content":"Alias: `cpw`"},{"lineNumber":835,"author":{"gitId":"-"},"content":""},{"lineNumber":836,"author":{"gitId":"-"},"content":"Here is how you can change the your password:"},{"lineNumber":837,"author":{"gitId":"-"},"content":""},{"lineNumber":838,"author":{"gitId":"-"},"content":"* `changepass ilikesports Securep@ssword1 Securep@ssword1`"},{"lineNumber":839,"author":{"gitId":"-"},"content":"// end::changePass2.0[]"},{"lineNumber":840,"author":{"gitId":"-"},"content":""},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"// tag::showBest2.0[]"},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Showing Best XI players: `showBest` `[Coming in v2.0]`"},{"lineNumber":843,"author":{"gitId":"-"},"content":""},{"lineNumber":844,"author":{"gitId":"-"},"content":"If you went to see your current best 11 players in your team based on their respective stats, this command"},{"lineNumber":845,"author":{"gitId":"-"},"content":"is for you."},{"lineNumber":846,"author":{"gitId":"-"},"content":""},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"Format: `showBest` +"},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":"Alias: `sb`"},{"lineNumber":849,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":850,"author":{"gitId":"lohtianwei"},"content":"[IMPORTANT]"},{"lineNumber":851,"author":{"gitId":"lohtianwei"},"content":".*What to expect*"},{"lineNumber":852,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":853,"author":{"gitId":"lohtianwei"},"content":"A lineup of the best 11 players would be displayed. It would consist of 1 Goalkeeper,"},{"lineNumber":854,"author":{"gitId":"lohtianwei"},"content":"4 Defenders, 4 Midfielders and 2 Strikers."},{"lineNumber":855,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":856,"author":{"gitId":"lohtianwei"},"content":"// end::showBest2.0[]"},{"lineNumber":857,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":858,"author":{"gitId":"-"},"content":"// tag::team2.0[]"},{"lineNumber":859,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting an upcoming match with an opposing team: `setmatch` `[Coming in v2.0]`"},{"lineNumber":860,"author":{"gitId":"-"},"content":""},{"lineNumber":861,"author":{"gitId":"-"},"content":"With this command, it gives you a convenient way to keep track of the upcoming match of a team."},{"lineNumber":862,"author":{"gitId":"-"},"content":""},{"lineNumber":863,"author":{"gitId":"-"},"content":"Format: `setmatch TEAM_NAME OPPONENT_TEAM_NAME DATE` +"},{"lineNumber":864,"author":{"gitId":"-"},"content":"Alias: `sm`"},{"lineNumber":865,"author":{"gitId":"-"},"content":""},{"lineNumber":866,"author":{"gitId":"-"},"content":"[NOTE]"},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":868,"author":{"gitId":"-"},"content":"* Date format to be entered is in `DD/MM/YYYY`. +"},{"lineNumber":869,"author":{"gitId":"-"},"content":"* Opponent team does not need to exist in MTM."},{"lineNumber":870,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":871,"author":{"gitId":"-"},"content":""},{"lineNumber":872,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":873,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":874,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":875,"author":{"gitId":"-"},"content":"The upcoming match of the team will be captured and displayed to you."},{"lineNumber":876,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":877,"author":{"gitId":"-"},"content":""},{"lineNumber":878,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:"},{"lineNumber":879,"author":{"gitId":"-"},"content":""},{"lineNumber":880,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":881,"author":{"gitId":"-"},"content":"* `setmatch Arsenal Liverpool 14/03/2018`"},{"lineNumber":882,"author":{"gitId":"-"},"content":""},{"lineNumber":883,"author":{"gitId":"-"},"content":"Display the list of players in team \"Arsenal\" and set an upcoming match for Arsenal with Liverpool on 14/03/2018."},{"lineNumber":884,"author":{"gitId":"-"},"content":""},{"lineNumber":885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing the team\u0027s next upcoming match: `nextmatch` `[Coming in v2.0]`"},{"lineNumber":886,"author":{"gitId":"-"},"content":""},{"lineNumber":887,"author":{"gitId":"codeeong"},"content":"You can easily determine the up and coming match with the team so that you never miss an important date."},{"lineNumber":888,"author":{"gitId":"-"},"content":""},{"lineNumber":889,"author":{"gitId":"-"},"content":"Format: `nextmatch TEAM_NAME` +"},{"lineNumber":890,"author":{"gitId":"-"},"content":"Alias: `nm`"},{"lineNumber":891,"author":{"gitId":"-"},"content":""},{"lineNumber":892,"author":{"gitId":"-"},"content":"[IMPORTANT]"},{"lineNumber":893,"author":{"gitId":"-"},"content":".*What to expect*"},{"lineNumber":894,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":895,"author":{"gitId":"-"},"content":"Displays the date and opponent for the upcoming match of the team specified."},{"lineNumber":896,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":897,"author":{"gitId":"-"},"content":""},{"lineNumber":898,"author":{"gitId":"codeeong"},"content":"Here are a few valid examples on how you can use the `nextmatch` command:"},{"lineNumber":899,"author":{"gitId":"-"},"content":""},{"lineNumber":900,"author":{"gitId":"-"},"content":"* `view Arsenal`"},{"lineNumber":901,"author":{"gitId":"-"},"content":"* `nextmatch Arsenal`"},{"lineNumber":902,"author":{"gitId":"-"},"content":""},{"lineNumber":903,"author":{"gitId":"-"},"content":"Displays the list of players in team \"Arsenal\" and view the next upcoming match for \"Arsenal\"."},{"lineNumber":904,"author":{"gitId":"-"},"content":"// end::team2.0[]"},{"lineNumber":905,"author":{"gitId":"-"},"content":""},{"lineNumber":906,"author":{"gitId":"codeeong"},"content":"// tag::showlineup[]"},{"lineNumber":907,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Displaying lineup for next match: `showLineup` `[Coming in v2.0]`"},{"lineNumber":908,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":909,"author":{"gitId":"codeeong"},"content":"You can view the lineup for the current best 11 players."},{"lineNumber":910,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":911,"author":{"gitId":"-"},"content":"Format: `showLineup TEAM_NAME` +"},{"lineNumber":912,"author":{"gitId":"codeeong"},"content":"Alias: `sl`"},{"lineNumber":913,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":914,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]"},{"lineNumber":915,"author":{"gitId":"codeeong"},"content":".*What to expect*"},{"lineNumber":916,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":917,"author":{"gitId":"codeeong"},"content":"The panel on the right will show the avatars of the 11 players that will be playing for the next match."},{"lineNumber":918,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d"},{"lineNumber":919,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":920,"author":{"gitId":"codeeong"},"content":"Here is an valid example on how you can use the `showLineup` command:"},{"lineNumber":921,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `showLineup Arsenal`"},{"lineNumber":923,"author":{"gitId":"-"},"content":""},{"lineNumber":924,"author":{"gitId":"codeeong"},"content":"Displays the 11 main players that will be playing for the next match."},{"lineNumber":925,"author":{"gitId":"codeeong"},"content":"// end::showlineup[]"},{"lineNumber":926,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":927,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Scheduling trainings for team `schedule` `[Coming in v2.0]`"},{"lineNumber":928,"author":{"gitId":"-"},"content":""},{"lineNumber":929,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sending reminder emails to players: `send` `[Coming in v2.0]`"},{"lineNumber":930,"author":{"gitId":"-"},"content":""},{"lineNumber":931,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving feedback to developers: `feedback` `[Coming in v2.0]`"},{"lineNumber":932,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":933,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving demerit to players based on performance: `demerit` `[Coming in v2.0]`"},{"lineNumber":934,"author":{"gitId":"-"},"content":""},{"lineNumber":935,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ"},{"lineNumber":936,"author":{"gitId":"-"},"content":""},{"lineNumber":937,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +"},{"lineNumber":938,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous MTM folder."},{"lineNumber":939,"author":{"gitId":"-"},"content":""},{"lineNumber":940,"author":{"gitId":"-"},"content":"// tag::commandsummary[]"},{"lineNumber":941,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":942,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Glossary"},{"lineNumber":943,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":944,"author":{"gitId":"-"},"content":"[[Index]]`INDEX` - The `INDEX` refers to the index number shown in the last player listing. The `INDEX` must be a positive integer 1, 2, 3, …"},{"lineNumber":945,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d Command Summary"},{"lineNumber":947,"author":{"gitId":"-"},"content":""},{"lineNumber":948,"author":{"gitId":"-"},"content":"Just a quick reference sheet for all your needs. Never forget how to use MTM ever again."},{"lineNumber":949,"author":{"gitId":"-"},"content":""},{"lineNumber":950,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Basic Commands and Features"},{"lineNumber":951,"author":{"gitId":"-"},"content":""},{"lineNumber":952,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":953,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":954,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":955,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":956,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":957,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":958,"author":{"gitId":"-"},"content":""},{"lineNumber":959,"author":{"gitId":"-"},"content":"|\u003c\u003cautocomplete, `Autocomplete`\u003e\u003e"},{"lineNumber":960,"author":{"gitId":"-"},"content":"|kbd:[tab]"},{"lineNumber":961,"author":{"gitId":"-"},"content":"|kbd:[tab] kbd:[space] kbd:[\u0026uarr;] kbd:[\u0026darr;]"},{"lineNumber":962,"author":{"gitId":"-"},"content":"d|Fills in your command for you"},{"lineNumber":963,"author":{"gitId":"-"},"content":""},{"lineNumber":964,"author":{"gitId":"-"},"content":"|\u003c\u003chelp, `help`\u003e\u003e"},{"lineNumber":965,"author":{"gitId":"-"},"content":"|kbd:[F1]"},{"lineNumber":966,"author":{"gitId":"-"},"content":"|help"},{"lineNumber":967,"author":{"gitId":"-"},"content":"d|Shows the user guide"},{"lineNumber":968,"author":{"gitId":"-"},"content":""},{"lineNumber":969,"author":{"gitId":"-"},"content":"|\u003c\u003chistory, `history`\u003e\u003e"},{"lineNumber":970,"author":{"gitId":"-"},"content":"|`h`"},{"lineNumber":971,"author":{"gitId":"-"},"content":"|history"},{"lineNumber":972,"author":{"gitId":"-"},"content":"d|Displays the list of commands entered previously"},{"lineNumber":973,"author":{"gitId":"-"},"content":""},{"lineNumber":974,"author":{"gitId":"-"},"content":"|\u003c\u003cundo, `undo`\u003e\u003e"},{"lineNumber":975,"author":{"gitId":"-"},"content":"|`u`"},{"lineNumber":976,"author":{"gitId":"-"},"content":"|undo"},{"lineNumber":977,"author":{"gitId":"-"},"content":"d|Undo the previous command"},{"lineNumber":978,"author":{"gitId":"-"},"content":""},{"lineNumber":979,"author":{"gitId":"-"},"content":"|\u003c\u003credo, `redo`\u003e\u003e"},{"lineNumber":980,"author":{"gitId":"-"},"content":"|`r`"},{"lineNumber":981,"author":{"gitId":"-"},"content":"|redo"},{"lineNumber":982,"author":{"gitId":"-"},"content":"d|Redo the previous command"},{"lineNumber":983,"author":{"gitId":"-"},"content":""},{"lineNumber":984,"author":{"gitId":"-"},"content":"|\u003c\u003ctoggleprivacy, `toggleprivacy`\u003e\u003e"},{"lineNumber":985,"author":{"gitId":"-"},"content":"|`tp`"},{"lineNumber":986,"author":{"gitId":"-"},"content":"|toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]"},{"lineNumber":987,"author":{"gitId":"-"},"content":"|toggleprivacy 2 a/"},{"lineNumber":988,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":989,"author":{"gitId":"-"},"content":"|\u003c\u003ckey, `key`\u003e\u003e"},{"lineNumber":990,"author":{"gitId":"-"},"content":"|`k`"},{"lineNumber":991,"author":{"gitId":"-"},"content":"|key PASSWORD"},{"lineNumber":992,"author":{"gitId":"-"},"content":"|key ilikesports"},{"lineNumber":993,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":994,"author":{"gitId":"-"},"content":"|\u003c\u003cclear, `clear`\u003e\u003e"},{"lineNumber":995,"author":{"gitId":"-"},"content":"|`c`"},{"lineNumber":996,"author":{"gitId":"-"},"content":"|clear"},{"lineNumber":997,"author":{"gitId":"-"},"content":"d|Removes all information in the application"},{"lineNumber":998,"author":{"gitId":"-"},"content":""},{"lineNumber":999,"author":{"gitId":"-"},"content":"|\u003c\u003cexit, `exit`\u003e\u003e"},{"lineNumber":1000,"author":{"gitId":"-"},"content":"|`NONE`"},{"lineNumber":1001,"author":{"gitId":"-"},"content":"|exit"},{"lineNumber":1002,"author":{"gitId":"-"},"content":"d|Exits the application"},{"lineNumber":1003,"author":{"gitId":"-"},"content":""},{"lineNumber":1004,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1005,"author":{"gitId":"-"},"content":""},{"lineNumber":1006,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands"},{"lineNumber":1007,"author":{"gitId":"-"},"content":""},{"lineNumber":1008,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":1009,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1010,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":1011,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":1012,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":1013,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":1014,"author":{"gitId":"-"},"content":""},{"lineNumber":1015,"author":{"gitId":"-"},"content":"|\u003c\u003cadd, `add`\u003e\u003e"},{"lineNumber":1016,"author":{"gitId":"-"},"content":"|`a`"},{"lineNumber":1017,"author":{"gitId":"lithiumlkid"},"content":"|add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]..."},{"lineNumber":1018,"author":{"gitId":"lithiumlkid"},"content":"|add n/Ospina e/Ospina@arsenal.com tm/Arsenal a/70 Jurong Central Circle p/90722998 j/1 ra/2 po/4 av/Capture.png t/redCard"},{"lineNumber":1019,"author":{"gitId":"-"},"content":""},{"lineNumber":1020,"author":{"gitId":"-"},"content":"|\u003c\u003cedit, `edit`\u003e\u003e"},{"lineNumber":1021,"author":{"gitId":"-"},"content":"|`e`"},{"lineNumber":1022,"author":{"gitId":"-"},"content":"|edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]..."},{"lineNumber":1023,"author":{"gitId":"-"},"content":"|edit 2 n/James Lee e/jameslee@example.com"},{"lineNumber":1024,"author":{"gitId":"-"},"content":""},{"lineNumber":1025,"author":{"gitId":"-"},"content":"|\u003c\u003cdelete, `delete`\u003e\u003e"},{"lineNumber":1026,"author":{"gitId":"-"},"content":"|`d`"},{"lineNumber":1027,"author":{"gitId":"-"},"content":"|delete INDEX"},{"lineNumber":1028,"author":{"gitId":"-"},"content":"|delete 3"},{"lineNumber":1029,"author":{"gitId":"-"},"content":""},{"lineNumber":1030,"author":{"gitId":"-"},"content":"|\u003c\u003cremark, `remark`\u003e\u003e"},{"lineNumber":1031,"author":{"gitId":"-"},"content":"|`rm`"},{"lineNumber":1032,"author":{"gitId":"-"},"content":"|remark INDEX [r/[REMARK]]"},{"lineNumber":1033,"author":{"gitId":"-"},"content":"|remark 4 r/Gotta go faster"},{"lineNumber":1034,"author":{"gitId":"-"},"content":""},{"lineNumber":1035,"author":{"gitId":"-"},"content":"|\u003c\u003clist, `list`\u003e\u003e"},{"lineNumber":1036,"author":{"gitId":"-"},"content":"|`l`"},{"lineNumber":1037,"author":{"gitId":"-"},"content":"|list"},{"lineNumber":1038,"author":{"gitId":"-"},"content":"d|List all the players"},{"lineNumber":1039,"author":{"gitId":"-"},"content":""},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003c\u003csort, `sort`\u003e\u003e"},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|`so`"},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|sort FIELD ORDER"},{"lineNumber":1043,"author":{"gitId":"-"},"content":"|sort name asc"},{"lineNumber":1044,"author":{"gitId":"-"},"content":""},{"lineNumber":1045,"author":{"gitId":"-"},"content":"|\u003c\u003cfind, `find`\u003e\u003e"},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`f`"},{"lineNumber":1047,"author":{"gitId":"-"},"content":"|find KEYWORD [KEYWORD]..."},{"lineNumber":1048,"author":{"gitId":"-"},"content":"|find James Jake"},{"lineNumber":1049,"author":{"gitId":"-"},"content":""},{"lineNumber":1050,"author":{"gitId":"-"},"content":"|\u003c\u003cselect, `select`\u003e\u003e"},{"lineNumber":1051,"author":{"gitId":"-"},"content":"|`s`"},{"lineNumber":1052,"author":{"gitId":"-"},"content":"|select INDEX"},{"lineNumber":1053,"author":{"gitId":"-"},"content":"|select 2"},{"lineNumber":1054,"author":{"gitId":"-"},"content":""},{"lineNumber":1055,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1056,"author":{"gitId":"-"},"content":""},{"lineNumber":1057,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands"},{"lineNumber":1058,"author":{"gitId":"-"},"content":""},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":1060,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1061,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":1062,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":1063,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":1064,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":1065,"author":{"gitId":"-"},"content":""},{"lineNumber":1066,"author":{"gitId":"-"},"content":"|\u003c\u003ccreate, `create`\u003e\u003e"},{"lineNumber":1067,"author":{"gitId":"-"},"content":"|`ct`"},{"lineNumber":1068,"author":{"gitId":"-"},"content":"|create TEAM_NAME"},{"lineNumber":1069,"author":{"gitId":"-"},"content":"|create Arsenal"},{"lineNumber":1070,"author":{"gitId":"-"},"content":""},{"lineNumber":1071,"author":{"gitId":"-"},"content":"|\u003c\u003cview, `view`\u003e\u003e"},{"lineNumber":1072,"author":{"gitId":"-"},"content":"|`vt`"},{"lineNumber":1073,"author":{"gitId":"-"},"content":"|view TEAM_NAME"},{"lineNumber":1074,"author":{"gitId":"-"},"content":"|view Liverpool"},{"lineNumber":1075,"author":{"gitId":"-"},"content":""},{"lineNumber":1076,"author":{"gitId":"-"},"content":"|\u003c\u003cassign, `assign`\u003e\u003e"},{"lineNumber":1077,"author":{"gitId":"-"},"content":"|`at`"},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|assign [TEAM_NAME] i/INDEX [INDEX]..."},{"lineNumber":1079,"author":{"gitId":"-"},"content":"|assign Barcelona i/1 2 3"},{"lineNumber":1080,"author":{"gitId":"-"},"content":""},{"lineNumber":1081,"author":{"gitId":"-"},"content":"|\u003c\u003crename, `rename`\u003e\u003e"},{"lineNumber":1082,"author":{"gitId":"-"},"content":"|`rnt`"},{"lineNumber":1083,"author":{"gitId":"-"},"content":"|rename TEAM_NAME tm/RENAME_TEAM_NAME"},{"lineNumber":1084,"author":{"gitId":"-"},"content":"|rename Arsenal tm/Neo Arsenal"},{"lineNumber":1085,"author":{"gitId":"-"},"content":""},{"lineNumber":1086,"author":{"gitId":"-"},"content":"|\u003c\u003cremove, `remove`\u003e\u003e"},{"lineNumber":1087,"author":{"gitId":"-"},"content":"|`rt`"},{"lineNumber":1088,"author":{"gitId":"-"},"content":"|remove TEAM_NAME"},{"lineNumber":1089,"author":{"gitId":"-"},"content":"|remove Real Madrid"},{"lineNumber":1090,"author":{"gitId":"-"},"content":""},{"lineNumber":1091,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1092,"author":{"gitId":"-"},"content":""},{"lineNumber":1093,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands"},{"lineNumber":1094,"author":{"gitId":"-"},"content":""},{"lineNumber":1095,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]"},{"lineNumber":1096,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1097,"author":{"gitId":"-"},"content":"^|Command"},{"lineNumber":1098,"author":{"gitId":"-"},"content":"^|Alias"},{"lineNumber":1099,"author":{"gitId":"-"},"content":"^|Parameter"},{"lineNumber":1100,"author":{"gitId":"-"},"content":"^|Example"},{"lineNumber":1101,"author":{"gitId":"-"},"content":""},{"lineNumber":1102,"author":{"gitId":"-"},"content":"|\u003c\u003csetTagColour, `setTagColour`\u003e\u003e"},{"lineNumber":1103,"author":{"gitId":"-"},"content":"|`stc`"},{"lineNumber":1104,"author":{"gitId":"-"},"content":"|setTagColour t/TAG tc/COLOUR"},{"lineNumber":1105,"author":{"gitId":"-"},"content":"|setTagColour t/friends tc/yellow"},{"lineNumber":1106,"author":{"gitId":"-"},"content":""},{"lineNumber":1107,"author":{"gitId":"-"},"content":"|\u003c\u003cchangeTheme, `changeTheme`\u003e\u003e"},{"lineNumber":1108,"author":{"gitId":"-"},"content":"|`cte`"},{"lineNumber":1109,"author":{"gitId":"-"},"content":"|changeTheme THEME"},{"lineNumber":1110,"author":{"gitId":"-"},"content":"|changeTheme Dark"},{"lineNumber":1111,"author":{"gitId":"-"},"content":""},{"lineNumber":1112,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d"},{"lineNumber":1113,"author":{"gitId":"-"},"content":"// end::commandsummary[]"}],"authorContributionMap":{"lithiumlkid":106,"lohtianwei":26,"codeeong":64,"-":917}},{"path":"docs/team/ahmadsyafiq.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lithiumlkid"},"content":"\u003d Ahmad Syafiq - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"lithiumlkid"},"content":":imagesDir: ../images"},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":stylesDir: ../stylesheets"},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d PROJECT: My Team Manager"},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"---"},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Overview"},{"lineNumber":8,"author":{"gitId":"lithiumlkid"},"content":"My Team Manager is a desktop address book application developed as part of a Software Engineering module requirement. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 6 kLoC."},{"lineNumber":9,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":10,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":11,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Summary of contributions"},{"lineNumber":12,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":13,"author":{"gitId":"lithiumlkid"},"content":"* *Major enhancement*: added *replaced person object with player object*"},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to add and edit players that contain more attributes/information such as jersey, position, rating and avatar"},{"lineNumber":15,"author":{"gitId":"lithiumlkid"},"content":"** Justification: This feature improves the product significantly because a user can fill the address book with more important information which can be used for other utility functions such as sort."},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":"It is accompanied with improved GUI to increase usability. Eg. the user can see player\u0027s avatar for better identification."},{"lineNumber":17,"author":{"gitId":"lithiumlkid"},"content":"** Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands."},{"lineNumber":18,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":19,"author":{"gitId":"lithiumlkid"},"content":"* *Minor enhancement*: added a *tab - autocomplete function*"},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to enter command lines more quickly by helping them complete commands by pressing the tab key. It also allows them to view suggested command and command parameters in case"},{"lineNumber":21,"author":{"gitId":"lithiumlkid"},"content":"the forget."},{"lineNumber":22,"author":{"gitId":"lithiumlkid"},"content":"** Credits: To make the search optimal, I used Tries as suggested on geek-for-geeks."},{"lineNumber":23,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lithiumlkid.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lithiumlkid.md[Test code]]"},{"lineNumber":25,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":26,"author":{"gitId":"lithiumlkid"},"content":"* *Other contributions*:"},{"lineNumber":27,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":28,"author":{"gitId":"lithiumlkid"},"content":"** Project management:"},{"lineNumber":29,"author":{"gitId":"lithiumlkid"},"content":"*** Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub"},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"** Enhancements to existing features:"},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"*** Enhanced the help function to only allow one help window at a time. (Pull request https://github.com/CS2103JAN2018-F14-B1/main/pull/169[#169])"},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":"** Documentation:"},{"lineNumber":33,"author":{"gitId":"lithiumlkid"},"content":"*** Did cosmetic tweaks to existing contents of the User Guide: https://github.com/CS2103JAN2018-F14-B1/main/pull/53[#53]"},{"lineNumber":34,"author":{"gitId":"lithiumlkid"},"content":"** Community:"},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":"*** PRs reviewed (with non-trivial review comments): https://github.com/CS2103JAN2018-F14-B1/main/pull/172[#172]"},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"*** Contributed to forum discussions (examples: https://github.com/nus-cs2103-AY1718S2/forum/issues/39[39], https://github.com/nus-cs2103-AY1718S2/forum/issues/47[#47])"},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":"*** Reported bugs and suggestions for other teams in the class (example: https://github.com/CS2103JAN2018-F14-B3/main/issues/228[#228])"},{"lineNumber":38,"author":{"gitId":"lithiumlkid"},"content":"** Tools:"},{"lineNumber":39,"author":{"gitId":"lithiumlkid"},"content":"*** Integrated a new Github plugin (CircleCI) to the team repo"},{"lineNumber":40,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":41,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the User Guide"},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":43,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":44,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":45,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._"},{"lineNumber":46,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":47,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":48,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003daddplayer]"},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":50,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003dautocomplete]"},{"lineNumber":51,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the Developer Guide"},{"lineNumber":53,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":55,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._"},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d"},{"lineNumber":57,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dplayer]"},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":""},{"lineNumber":60,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dautocomplete]"},{"lineNumber":61,"author":{"gitId":"lithiumlkid"},"content":""}],"authorContributionMap":{"lithiumlkid":60,"-":1}},{"path":"docs/team/codeeong.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"\u003d Codee Ong - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":":imagesDir: ../images"},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":":stylesDir: ../stylesheets"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"---"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Overview"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop application for *football team managers* to organise the information of players they are in charge of."},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"The primary usage of this application is to add and assign players to teams, and then edit and remove information related to"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"the players as and when it is required. MTM is value added with usability features that help the team manager manage his/her"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"teams and players efficiently."},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"The user interacts with MTM using a *Command Line Interface*, and it has a GUI created with JavaFX."},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Summary of contributions"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"* *Major enhancement*: Revamped the original user interface to one that suits the usage of an application for *team managers*."},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"** What it does: The change in UI allows the user to *keep track* of which team he/she is looking at, to *view his/her players\u0027 details*,"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"and even perform some *customisation* of the application theme."},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"** Justification: The overhaul of the UI is absolutely necessary to ensure the *best user experience* for users of My Team Manager. Previously,"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"the existing UI components were neither sufficient nor suitable for management of sports teams."},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"** Highlights: Addition of the *team display bar*, the *player details pane* when a player is selected, addition of *MTM logo*,"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"and *changeTheme* command."},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"* *Minor enhancement*: addition of a *setTagCommand* that allows the user to change existing tags to a colour of their choice."},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/Codee.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/Codee.md[Test code]]"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"* *Other contributions*:"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"** Project management:"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"*** Generated release files (.jar) in `v1.4` and `v1.5rc` (2 releases), and contributed release descriptions on GitHub."},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"** Enhancements to existing features:"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"*** changed the original GUI colour scheme [https://github.com/CS2103JAN2018-F14-B1/main/pull/89[PR #89]]"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"** Documentation:"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"*** changed the project name in all the relevant files so that it will be \"My Team Manager\" and not \"Address Book App\", including the data files. [https://github.com/CS2103JAN2018-F14-B1/main/pull/120[PR #120]]"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"*** Constantly updated the README and UserGuide\u0027s application preview image. [https://github.com/CS2103JAN2018-F14-B1/main/pull/99[PR #99]][https://github.com/CS2103JAN2018-F14-B1/main/pull/160[PR #160]]"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"** Community:"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"*** PRs Reviewed (with non trivial comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/95[PR #95]][https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR #169]][https://github.com/CS2103JAN2018-F14-B1/main/pull/175[PR #175]]"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the User Guide"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting the users of MTM._"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dchangeTheme]"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dsetTagColour]"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dshowlineup]"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the Developer Guide"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dsettagcolour]"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dteamDisplay]"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dPlayerDetails]"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dchangeThemeCommand]"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":72}},{"path":"docs/team/lohtianwei.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"\u003d Loh Tian Wei - Project Portfolio"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":":imagesDir: ../images"},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":":stylesDir: ../stylesheets"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"---"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Overview"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"My Team Manager (MTM) is a dekstop address book application for *football team managers*."},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"It can also be personalised to be used for other sports team management too such as basketball."},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"With the features it provides, management of your players\u0027 contact details and team information is made easy. While"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"interactions between user and application is mainly by a *Command Line Interface (CLI)*, it features a JavaFx GUI display."},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Summary of contributions"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"* *Major enhancement*: Added *security and privacy features*"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"** *What it does*: Ensures the information stored in MTM is *secured and kept private* when needed"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"** *Justification*: This feature is crucial for protecting the *confidentiality and integrity* of the details stored in MTM."},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"It prevents unauthorised tampering of information while also maintaining confidentiality."},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"** *Highlights*: Addition of a *locking mechanism* to limit functionality of MTM and changing *privacy of fields* that would maintain"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"confidentiality of certain information"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"* *Minor enhancement*:"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"** Added a sort function that allows the list to be sorted by fields for quick viewing of relevant information"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lohtianwei.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lohtianwei.md[Test code]]"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"* *Other contributions*:"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"** Project management:"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"*** Documented issues of project using GitHub\u0027s Issue Tracker and address the issues accordingly."},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"** Enhancements to existing features:"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"*** Changes are mentioned in \u003c\u003cMinor Enhancement, Minor enhancement\u003e\u003e."},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"** Documentation:"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"** Community:"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":"*** PRs reviewed (with non-trivial review comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR#169]]"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"*** Reported bugs and suggestions for other teams in the class (https://github.com/CS2103JAN2018-W09-B2/main/issues/198[1],"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/194[2],"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/182[3],"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/174[4])"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the User Guide"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dtogglePrivacy]"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dkey]"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the Developer Guide"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dkey]"}],"authorContributionMap":{"lohtianwei":68,"-":1}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * The main entry point to the application."},{"lineNumber":40,"author":{"gitId":"-"},"content":" */"},{"lineNumber":41,"author":{"gitId":"-"},"content":"public class MainApp extends Application {"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" public static final Version VERSION \u003d new Version(1, 1, 0, true);"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" protected Ui ui;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Logic logic;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Storage storage;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Model model;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Config config;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void init() throws Exception {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":" super.init();"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" initLogging(config);"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" logic \u003d new LogicManager(model);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" initEventsCenter();"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":84,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,"},{"lineNumber":86,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book."},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();"},{"lineNumber":93,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");"},{"lineNumber":99,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":100,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":102,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" LogsCenter.init(config);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null."},{"lineNumber":116,"author":{"gitId":"-"},"content":" */"},{"lineNumber":117,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" Config initializedConfig;"},{"lineNumber":119,"author":{"gitId":"-"},"content":" String configFilePathUsed;"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":131,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());"},{"lineNumber":133,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \""},{"lineNumber":135,"author":{"gitId":"-"},"content":" + \"Using default config properties\");"},{"lineNumber":136,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":140,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":141,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);"},{"lineNumber":142,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":143,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":144,"author":{"gitId":"-"},"content":" }"},{"lineNumber":145,"author":{"gitId":"-"},"content":" return initializedConfig;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":149,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,"},{"lineNumber":150,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * reading from the file."},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();"},{"lineNumber":155,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;"},{"lineNumber":158,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();"},{"lineNumber":160,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());"},{"lineNumber":161,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {"},{"lineNumber":162,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \""},{"lineNumber":163,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");"},{"lineNumber":164,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":165,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":166,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");"},{"lineNumber":167,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();"},{"lineNumber":168,"author":{"gitId":"-"},"content":" }"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields"},{"lineNumber":171,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" return initializedPrefs;"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" private void initEventsCenter() {"},{"lineNumber":181,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);"},{"lineNumber":182,"author":{"gitId":"-"},"content":" }"},{"lineNumber":183,"author":{"gitId":"-"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":186,"author":{"gitId":"-"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);"},{"lineNumber":187,"author":{"gitId":"-"},"content":" ui.start(primaryStage);"},{"lineNumber":188,"author":{"gitId":"-"},"content":" }"},{"lineNumber":189,"author":{"gitId":"-"},"content":""},{"lineNumber":190,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":191,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":192,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");"},{"lineNumber":193,"author":{"gitId":"-"},"content":" ui.stop();"},{"lineNumber":194,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(userPrefs);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));"},{"lineNumber":198,"author":{"gitId":"-"},"content":" }"},{"lineNumber":199,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":200,"author":{"gitId":"-"},"content":" System.exit(0);"},{"lineNumber":201,"author":{"gitId":"-"},"content":" }"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {"},{"lineNumber":205,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":206,"author":{"gitId":"-"},"content":" this.stop();"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" public static void main(String[] args) {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" launch(args);"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":211}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app"},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private String appTitle \u003d \"My Team Manager\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;"},{"lineNumber":20,"author":{"gitId":"-"},"content":" }"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well."},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)"},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)"},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);"},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages."},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_THEME \u003d \"This theme does not exist!\\n\";"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TEAM_NOT_FOUND \u003d \"Team does not exist or is not specified!\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_ALL_INDEX \u003d \"All person index provided is invalid\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":15}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeTagColourEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to change tag colour"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeTagColourEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String tagColour;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public final String tagName;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public ChangeTagColourEvent(String tagName, String tagColour) {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":23}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**@@author Codee */"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Indicates a request for theme change."},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String theme;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ChangeThemeEvent(String theme) {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().toString();"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/ClearTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for clearing of all teams."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ClearTeamsEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public ClearTeamsEvent() {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" }"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" }"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"}"},{"lineNumber":20,"author":{"gitId":"-"},"content":""}],"authorContributionMap":{"codeeong":7,"-":13}},{"path":"src/main/java/seedu/address/commons/events/ui/DeselectTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to deselected selected teams."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"public class DeselectTeamEvent extends BaseEvent {"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" public DeselectTeamEvent() {"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/HighlightSelectedTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to highlight selected team name."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class HighlightSelectedTeamEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public HighlightSelectedTeamEvent(String teamName) {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel."},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedEvent extends BaseEvent {"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" private final Person editedPerson;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private final Index index;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedEvent(Person editedPerson, Index index) {"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" this.editedPerson \u003d editedPerson;"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" this.index \u003d index;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" public Person getPerson() {"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" return this.editedPerson;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" public Index getIndex() {"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" return this.index;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":34}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedNoParamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel, but no paramaters."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedNoParamEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedNoParamEvent() { }"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/ShowNewTeamNameEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to show new team name."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ShowNewTeamNameEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ShowNewTeamNameEvent(String teamName) {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":22}},{"path":"src/main/java/seedu/address/commons/events/ui/UndoTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for undoing clearing of all teams."},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class UndoTeamsEvent extends BaseEvent {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public UndoTeamsEvent() {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" }"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();"},{"lineNumber":17,"author":{"gitId":"-"},"content":" }"},{"lineNumber":18,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":7,"-":11}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"-"},"content":" * API of the Logic component"},{"lineNumber":13,"author":{"gitId":"-"},"content":" */"},{"lineNumber":14,"author":{"gitId":"-"},"content":"public interface Logic {"},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Executes the command and returns the result."},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user."},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @return the result of the command execution."},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution."},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of list of teams */"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /** Returns the command trie. */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" CommandTrie getCommandTrie();"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":4,"-":32}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app."},{"lineNumber":20,"author":{"gitId":"-"},"content":" */"},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final CommandHistory history;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final CommandTrie commandTrie;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":32,"author":{"gitId":"-"},"content":" history \u003d new CommandHistory();"},{"lineNumber":33,"author":{"gitId":"-"},"content":" addressBookParser \u003d new AddressBookParser();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" commandTrie \u003d new CommandTrie();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" }"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");"},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();"},{"lineNumber":45,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" return result;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" } finally {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" history.add(commandText);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return model.getInitTeamList();"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":63,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public CommandTrie getCommandTrie() {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" return commandTrie;"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":6,"-":64}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TEAM_NAME;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Adds a player to the address book."},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a player to the address book. \""},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"Parameters: \""},{"lineNumber":39,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \""},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \""},{"lineNumber":41,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TEAM_NAME + \"TEAMNAME] \""},{"lineNumber":42,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":43,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":44,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":45,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":46,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":47,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":48,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":49,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":50,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \""},{"lineNumber":51,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \""},{"lineNumber":52,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \""},{"lineNumber":53,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \""},{"lineNumber":54,"author":{"gitId":"-"},"content":" + PREFIX_RATING + \"0 \""},{"lineNumber":55,"author":{"gitId":"-"},"content":" + PREFIX_POSITION + \"1 \""},{"lineNumber":56,"author":{"gitId":"-"},"content":" + PREFIX_JERSEY_NUMBER + \"17 \""},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"goodAttitude\";"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_NAME + \"NAME \""},{"lineNumber":60,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \""},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New player added: %1$s\";"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book\";"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" private final Person toAdd;"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code Person}"},{"lineNumber":77,"author":{"gitId":"-"},"content":" */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public AddCommand(Person person) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" requireNonNull(person);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" toAdd \u003d person;"},{"lineNumber":81,"author":{"gitId":"-"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());"},{"lineNumber":93,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());"},{"lineNumber":94,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));"},{"lineNumber":95,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));"},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException e) {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);"},{"lineNumber":105,"author":{"gitId":"-"},"content":" }"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":109,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" TeamName teamName \u003d toAdd.getTeamName();"},{"lineNumber":111,"author":{"gitId":"-"},"content":" if (!model.getAddressBook().getTeamList().stream().anyMatch(t -\u003e t.getTeamName().equals(teamName))) {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (!teamName.toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" throw new CommandException((Messages.MESSAGE_TEAM_NOT_FOUND));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":" }"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":119,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":121,"author":{"gitId":"-"},"content":" || (other instanceof AddCommand // instanceof handles nulls"},{"lineNumber":122,"author":{"gitId":"-"},"content":" \u0026\u0026 toAdd.equals(((AddCommand) other).toAdd));"},{"lineNumber":123,"author":{"gitId":"-"},"content":" }"},{"lineNumber":124,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":122}},{"path":"src/main/java/seedu/address/logic/commands/ChangeThemeCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.MainWindow;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Changes the theme of the Address Book."},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"changeTheme\";"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"cte\";"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" + \": Changes the theme of MTM.\\n\""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" + \"Parameters: THEME (must be either Light, or Dark)\\n\""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Examples: changeTheme Light, cte Dark\";"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_THEME_SUCCESS \u003d \"Theme updated to: %1$s\";"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final String theme;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" if (!isValidTheme(this.theme)) {"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_THEME);"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" if ((MainWindow.getCurrentTheme()).contains(this.theme)) {"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" throw new CommandException(\"Theme is already set to \" + this.theme + \"!\");"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private boolean isValidTheme(String theme) {"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" return theme.equals(\"Light\") || theme.equals(\"Dark\");"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" || (other instanceof ChangeThemeCommand // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.theme.equals(((ChangeThemeCommand) other).theme)); // state check"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":54}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Clears the address book."},{"lineNumber":11,"author":{"gitId":"-"},"content":" */"},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" model.resetData(new AddressBook());"},{"lineNumber":23,"author":{"gitId":"-"},"content":" // @@author Codee"},{"lineNumber":24,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new ClearTeamsEvent());"},{"lineNumber":25,"author":{"gitId":"-"},"content":" // @@author"},{"lineNumber":26,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":2,"-":25}},{"path":"src/main/java/seedu/address/logic/commands/CreateCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Creates a team to the application"},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class CreateCommand extends UndoableCommand {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"create\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"ct\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \"Creates a team in MTM. \""},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \"Parameters: \""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"TEAM_NAME\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Arsenal\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New team created: %1$s\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_TEAM \u003d \"This team already exist in the manager\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Team toCreate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Creates a CreateCommand to add the specified (@code Team)"},{"lineNumber":35,"author":{"gitId":"-"},"content":" *"},{"lineNumber":36,"author":{"gitId":"-"},"content":" */"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CreateCommand(Team team) {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" requireNonNull(team);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.toCreate \u003d team;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireNonNull(model);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" model.createTeam(toCreate);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TEAM);"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ShowNewTeamNameEvent(toCreate.getTeamName().toString()));"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toCreate.getTeamName().toString()));"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof CreateCommand // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 toCreate.equals(((CreateCommand) other).toCreate));"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":3,"-":57}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Deletes a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":16,"author":{"gitId":"-"},"content":" */"},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \": Deletes the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" private Person personToDelete;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public DeleteCommand(Index targetIndex) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" requireNonNull(personToDelete);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":44,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);"},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" personToDelete \u003d lastShownList.get(targetIndex.getZeroBased());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls"},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex) // state check"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(this.personToDelete, ((DeleteCommand) other).personToDelete));"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":69}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":47,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Edits the details of an existing player in the address book."},{"lineNumber":49,"author":{"gitId":"-"},"content":" */"},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the player identified \""},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \""},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":60,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\""},{"lineNumber":68,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":69,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \""},{"lineNumber":70,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \""},{"lineNumber":73,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \""},{"lineNumber":74,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \""},{"lineNumber":75,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \""},{"lineNumber":76,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \""},{"lineNumber":77,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \""},{"lineNumber":78,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \""},{"lineNumber":79,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \""},{"lineNumber":80,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \""},{"lineNumber":81,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: %1$s\";"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book.\";"},{"lineNumber":86,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" private final Index index;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" private Person personToEdit;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" private Person editedPerson;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":95,"author":{"gitId":"-"},"content":" * @param index of the player in the filtered player list to edit"},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the player with"},{"lineNumber":97,"author":{"gitId":"-"},"content":" */"},{"lineNumber":98,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" requireNonNull(index);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" this.index \u003d index;"},{"lineNumber":103,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" if (!editedPerson.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" editedPerson.getAvatar().setFilePath(editedPerson.getName().fullName);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":114,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":115,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":116,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");"},{"lineNumber":117,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":121,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));"},{"lineNumber":122,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":123,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());"},{"lineNumber":124,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":137,"author":{"gitId":"-"},"content":" editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * edited with {@code editPersonDescriptor}."},{"lineNumber":143,"author":{"gitId":"-"},"content":" * NOTE: Private fields will not be edited."},{"lineNumber":144,"author":{"gitId":"-"},"content":" */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static Person createEditedPerson(Person personToEdit, EditPersonDescriptor editPersonDescriptor) {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" Name updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());"},{"lineNumber":149,"author":{"gitId":"-"},"content":" Phone updatedPhone \u003d (personToEdit.getPhone().isPrivate())"},{"lineNumber":150,"author":{"gitId":"-"},"content":" ? personToEdit.getPhone() : editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());"},{"lineNumber":151,"author":{"gitId":"-"},"content":" Email updatedEmail \u003d (personToEdit.getEmail().isPrivate())"},{"lineNumber":152,"author":{"gitId":"-"},"content":" ? personToEdit.getEmail() : editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());"},{"lineNumber":153,"author":{"gitId":"-"},"content":" Address updatedAddress \u003d (personToEdit.getAddress().isPrivate())"},{"lineNumber":154,"author":{"gitId":"-"},"content":" ? personToEdit.getAddress() : editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());"},{"lineNumber":155,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate())"},{"lineNumber":156,"author":{"gitId":"-"},"content":" ? personToEdit.getRemark() : personToEdit.getRemark();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();"},{"lineNumber":158,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());"},{"lineNumber":159,"author":{"gitId":"-"},"content":" Rating updatedRating \u003d editPersonDescriptor.getRating().orElse(personToEdit.getRating());"},{"lineNumber":160,"author":{"gitId":"-"},"content":" JerseyNumber updatedJerseyNumber \u003d editPersonDescriptor.getJerseyNumber()"},{"lineNumber":161,"author":{"gitId":"-"},"content":" .orElse(personToEdit.getJerseyNumber());"},{"lineNumber":162,"author":{"gitId":"-"},"content":" Position updatedPosition \u003d editPersonDescriptor.getPosition().orElse(personToEdit.getPosition());"},{"lineNumber":163,"author":{"gitId":"-"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":167,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" }"},{"lineNumber":169,"author":{"gitId":"-"},"content":""},{"lineNumber":170,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":171,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":178,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {"},{"lineNumber":179,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":180,"author":{"gitId":"-"},"content":" }"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":183,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;"},{"lineNumber":184,"author":{"gitId":"-"},"content":" return index.equals(e.index)"},{"lineNumber":185,"author":{"gitId":"-"},"content":" \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor)"},{"lineNumber":186,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(personToEdit, e.personToEdit);"},{"lineNumber":187,"author":{"gitId":"-"},"content":" }"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":190,"author":{"gitId":"-"},"content":" * Stores the details to edit the player with. Each non-empty field value will replace the"},{"lineNumber":191,"author":{"gitId":"-"},"content":" * corresponding field value of the player."},{"lineNumber":192,"author":{"gitId":"-"},"content":" */"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" private Name name;"},{"lineNumber":195,"author":{"gitId":"-"},"content":" private Phone phone;"},{"lineNumber":196,"author":{"gitId":"-"},"content":" private Email email;"},{"lineNumber":197,"author":{"gitId":"-"},"content":" private Address address;"},{"lineNumber":198,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;"},{"lineNumber":199,"author":{"gitId":"-"},"content":" private Rating rating;"},{"lineNumber":200,"author":{"gitId":"-"},"content":" private Position position;"},{"lineNumber":201,"author":{"gitId":"-"},"content":" private JerseyNumber jerseyNumber;"},{"lineNumber":202,"author":{"gitId":"-"},"content":" private Avatar avatar;"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Copy constructor."},{"lineNumber":208,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally."},{"lineNumber":209,"author":{"gitId":"-"},"content":" */"},{"lineNumber":210,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {"},{"lineNumber":211,"author":{"gitId":"-"},"content":" setName(toCopy.name);"},{"lineNumber":212,"author":{"gitId":"-"},"content":" setPhone(toCopy.phone);"},{"lineNumber":213,"author":{"gitId":"-"},"content":" setEmail(toCopy.email);"},{"lineNumber":214,"author":{"gitId":"-"},"content":" setAddress(toCopy.address);"},{"lineNumber":215,"author":{"gitId":"-"},"content":" setTags(toCopy.tags);"},{"lineNumber":216,"author":{"gitId":"-"},"content":" setRating(toCopy.rating);"},{"lineNumber":217,"author":{"gitId":"-"},"content":" setPosition(toCopy.position);"},{"lineNumber":218,"author":{"gitId":"-"},"content":" setJerseyNumber(toCopy.jerseyNumber);"},{"lineNumber":219,"author":{"gitId":"-"},"content":" setAvatar(toCopy.avatar);"},{"lineNumber":220,"author":{"gitId":"-"},"content":" }"},{"lineNumber":221,"author":{"gitId":"-"},"content":""},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited."},{"lineNumber":224,"author":{"gitId":"-"},"content":" */"},{"lineNumber":225,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {"},{"lineNumber":226,"author":{"gitId":"-"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.tags,"},{"lineNumber":227,"author":{"gitId":"-"},"content":" this.rating, this.position, this.jerseyNumber, this.avatar);"},{"lineNumber":228,"author":{"gitId":"-"},"content":" }"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void setName(Name name) {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" this.name \u003d name;"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {"},{"lineNumber":235,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);"},{"lineNumber":236,"author":{"gitId":"-"},"content":" }"},{"lineNumber":237,"author":{"gitId":"-"},"content":""},{"lineNumber":238,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {"},{"lineNumber":239,"author":{"gitId":"-"},"content":" this.phone \u003d phone;"},{"lineNumber":240,"author":{"gitId":"-"},"content":" }"},{"lineNumber":241,"author":{"gitId":"-"},"content":""},{"lineNumber":242,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {"},{"lineNumber":243,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);"},{"lineNumber":244,"author":{"gitId":"-"},"content":" }"},{"lineNumber":245,"author":{"gitId":"-"},"content":""},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {"},{"lineNumber":247,"author":{"gitId":"-"},"content":" this.email \u003d email;"},{"lineNumber":248,"author":{"gitId":"-"},"content":" }"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {"},{"lineNumber":251,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);"},{"lineNumber":252,"author":{"gitId":"-"},"content":" }"},{"lineNumber":253,"author":{"gitId":"-"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" this.address \u003d address;"},{"lineNumber":256,"author":{"gitId":"-"},"content":" }"},{"lineNumber":257,"author":{"gitId":"-"},"content":""},{"lineNumber":258,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {"},{"lineNumber":259,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);"},{"lineNumber":260,"author":{"gitId":"-"},"content":" }"},{"lineNumber":261,"author":{"gitId":"-"},"content":""},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Sets {@code tags} to this object\u0027s {@code tags}."},{"lineNumber":264,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally."},{"lineNumber":265,"author":{"gitId":"-"},"content":" */"},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":267,"author":{"gitId":"-"},"content":" this.tags \u003d (tags !\u003d null) ? new HashSet\u003c\u003e(tags) : null;"},{"lineNumber":268,"author":{"gitId":"-"},"content":" }"},{"lineNumber":269,"author":{"gitId":"-"},"content":""},{"lineNumber":270,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * Returns an unmodifiable tag set, which throws {@code UnsupportedOperationException}"},{"lineNumber":272,"author":{"gitId":"-"},"content":" * if modification is attempted."},{"lineNumber":273,"author":{"gitId":"-"},"content":" * Returns {@code Optional#empty()} if {@code tags} is null."},{"lineNumber":274,"author":{"gitId":"-"},"content":" */"},{"lineNumber":275,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {"},{"lineNumber":276,"author":{"gitId":"-"},"content":" return (tags !\u003d null) ? Optional.of(Collections.unmodifiableSet(tags)) : Optional.empty();"},{"lineNumber":277,"author":{"gitId":"-"},"content":" }"},{"lineNumber":278,"author":{"gitId":"-"},"content":""},{"lineNumber":279,"author":{"gitId":"-"},"content":" public void setRating(Rating rating) {"},{"lineNumber":280,"author":{"gitId":"-"},"content":" this.rating \u003d rating;"},{"lineNumber":281,"author":{"gitId":"-"},"content":" }"},{"lineNumber":282,"author":{"gitId":"-"},"content":""},{"lineNumber":283,"author":{"gitId":"-"},"content":" public Optional\u003cRating\u003e getRating() {"},{"lineNumber":284,"author":{"gitId":"-"},"content":" return Optional.ofNullable(rating);"},{"lineNumber":285,"author":{"gitId":"-"},"content":" }"},{"lineNumber":286,"author":{"gitId":"-"},"content":""},{"lineNumber":287,"author":{"gitId":"-"},"content":" public void setPosition(Position position) {"},{"lineNumber":288,"author":{"gitId":"-"},"content":" this.position \u003d position;"},{"lineNumber":289,"author":{"gitId":"-"},"content":" }"},{"lineNumber":290,"author":{"gitId":"-"},"content":""},{"lineNumber":291,"author":{"gitId":"-"},"content":" public Optional\u003cPosition\u003e getPosition() {"},{"lineNumber":292,"author":{"gitId":"-"},"content":" return Optional.ofNullable(position);"},{"lineNumber":293,"author":{"gitId":"-"},"content":" }"},{"lineNumber":294,"author":{"gitId":"-"},"content":""},{"lineNumber":295,"author":{"gitId":"-"},"content":" public void setJerseyNumber(JerseyNumber jerseyNumber) {"},{"lineNumber":296,"author":{"gitId":"-"},"content":" this.jerseyNumber \u003d jerseyNumber;"},{"lineNumber":297,"author":{"gitId":"-"},"content":" }"},{"lineNumber":298,"author":{"gitId":"-"},"content":""},{"lineNumber":299,"author":{"gitId":"-"},"content":" public Optional\u003cJerseyNumber\u003e getJerseyNumber() {"},{"lineNumber":300,"author":{"gitId":"-"},"content":" return Optional.ofNullable(jerseyNumber);"},{"lineNumber":301,"author":{"gitId":"-"},"content":" }"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" public void setAvatar(Avatar avatar) {"},{"lineNumber":304,"author":{"gitId":"-"},"content":" this.avatar \u003d avatar;"},{"lineNumber":305,"author":{"gitId":"-"},"content":" }"},{"lineNumber":306,"author":{"gitId":"-"},"content":""},{"lineNumber":307,"author":{"gitId":"-"},"content":" public Optional\u003cAvatar\u003e getAvatar() {"},{"lineNumber":308,"author":{"gitId":"-"},"content":" return Optional.ofNullable(avatar);"},{"lineNumber":309,"author":{"gitId":"-"},"content":" }"},{"lineNumber":310,"author":{"gitId":"-"},"content":""},{"lineNumber":311,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":312,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":313,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":314,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":315,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":316,"author":{"gitId":"-"},"content":" }"},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":319,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {"},{"lineNumber":320,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":321,"author":{"gitId":"-"},"content":" }"},{"lineNumber":322,"author":{"gitId":"-"},"content":""},{"lineNumber":323,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":324,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())"},{"lineNumber":327,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())"},{"lineNumber":328,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())"},{"lineNumber":329,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())"},{"lineNumber":330,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags())"},{"lineNumber":331,"author":{"gitId":"-"},"content":" \u0026\u0026 getRating().equals(e.getRating())"},{"lineNumber":332,"author":{"gitId":"-"},"content":" \u0026\u0026 getPosition().equals(e.getPosition())"},{"lineNumber":333,"author":{"gitId":"-"},"content":" \u0026\u0026 getJerseyNumber().equals(e.getJerseyNumber())"},{"lineNumber":334,"author":{"gitId":"-"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar());"},{"lineNumber":335,"author":{"gitId":"-"},"content":" }"},{"lineNumber":336,"author":{"gitId":"-"},"content":" }"},{"lineNumber":337,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":335}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Finds and lists all persons in address book whose name contains any of the argument keywords."},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive."},{"lineNumber":8,"author":{"gitId":"-"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \""},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\""},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\""},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"KEYWORD [MORE KEYWORD]\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final NameContainsKeywordsPredicate predicate;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" this.predicate \u003d predicate;"},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(predicate);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":36,"author":{"gitId":"-"},"content":" || (other instanceof FindCommand // instanceof handles nulls"},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 this.predicate.equals(((FindCommand) other).predicate)); // state check"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {"},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" }"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);"},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));"},{"lineNumber":32,"author":{"gitId":"-"},"content":" }"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/KeyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import java.util.logging.Logger;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Sets lock in model to true/false depending on current state"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"key\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"k\";"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the lock on MTM. \""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"Functionality of MTM reduced\\n\""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Input empty password to see current lock state\\n\""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: [PASSWORD]\\n\""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \" myPassword\";"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"MTM lock toggled!\";"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_WRONG_PASS \u003d \"Password entered is incorrect. Please try again.\";"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"[PASSWORD]\";"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" private String password;"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final Logger logger \u003d LogsCenter.getLogger(KeyCommand.class);"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand(String password) {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" this.password \u003d password;"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" * Checks if input password is correct."},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" private boolean correctPassword() {"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" UserPrefs up \u003d model.getUserPrefs();"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" return hash.equals(up.getAddressBookHashedPass());"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" private boolean emptyPass() {"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" return password.isEmpty();"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (emptyPass()) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_USAGE + \"\\nLock state is now: \""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" if (correctPassword()) {"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (model.getLockState()) {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS + \"\\nLock state is now: \""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_WRONG_PASS);"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":74}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user."},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all persons\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult execute() {"},{"lineNumber":21,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());"},{"lineNumber":23,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":24,"author":{"gitId":"-"},"content":" }"},{"lineNumber":25,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":4,"-":20}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Redo the previously undone command."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee"},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/RemarkCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Updates the remark of an existing player in the address book."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RemarkCommand extends UndoableCommand {"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"remark\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"rm\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Updates the remark of the player identified \""},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \""},{"lineNumber":29,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\""},{"lineNumber":30,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":31,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"[REMARK]\\n\""},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"Must put on field\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADD_REMARK_SUCCESS \u003d \"Remark added to: %1$s\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_REMARK_SUCCESS \u003d \"Remark removed from: %1$s\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" private final Index index;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Remark remark;"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" private Person personToEdit;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Person editedPerson;"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public RemarkCommand(Index index, Remark remark) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" requireNonNull(index);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" requireNonNull(remark);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" this.index \u003d index;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.remark \u003d remark;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" requireNonNull(personToEdit);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Updating remark should not result in duplicate\");"},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new CommandResult(getSuccessMessage(editedPerson));"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":80,"author":{"gitId":"-"},"content":" editedPerson \u003d new Person(personToEdit.getName(), personToEdit.getPhone(), personToEdit.getEmail(),"},{"lineNumber":81,"author":{"gitId":"-"},"content":" personToEdit.getAddress(), remark, personToEdit.getTeamName(), personToEdit.getTags(),"},{"lineNumber":82,"author":{"gitId":"-"},"content":" personToEdit.getRating(), personToEdit.getPosition(), personToEdit.getJerseyNumber(),"},{"lineNumber":83,"author":{"gitId":"-"},"content":" personToEdit.getAvatar());"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":89,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!(other instanceof RemarkCommand)) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":99,"author":{"gitId":"-"},"content":" RemarkCommand e \u003d (RemarkCommand) other;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return index.equals(e.index)"},{"lineNumber":101,"author":{"gitId":"-"},"content":" \u0026\u0026 remark.equals(e.remark);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Gets the corresponding success message based on the remark field from {@code personToEdit} after editing."},{"lineNumber":106,"author":{"gitId":"-"},"content":" */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" private String getSuccessMessage(Person person) {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" String message \u003d remark.value.isEmpty() ? MESSAGE_DELETE_REMARK_SUCCESS : MESSAGE_ADD_REMARK_SUCCESS;"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return String.format(message, personToEdit);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":4,"-":107}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book."},{"lineNumber":14,"author":{"gitId":"-"},"content":" */"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final Index targetIndex;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":52,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls"},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"-":54}},{"path":"src/main/java/seedu/address/logic/commands/SetCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" * Adds a colour to a tag in address book."},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/** @@author Codee Ong Ong */"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"setTagColour\";"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sets the colour of tags to the colour of choice \""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Parameters: \""},{"lineNumber":22,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"TAG \""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\\n\""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" + \"Example: \" + COMMAND_WORD + \" \""},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"friends \""},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG_COLOUR + \"green\\n\""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" + \"Colours to choose from are : teal, red, yellow, blue, orange, brown, \\n\""},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" + \"green, pink, black, grey\\n\";"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_TAG + \"TAG \" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_TAG \u003d \"tag is invalid! Please input a valid tag name!\";"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_SUCCESS \u003d \"tag %1$s colour changed to %2$s\";"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private final String tagColour;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" * Creates an AddCommand to add the specified {@code Person}"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" if (!tagToSet.isValidTagName(tagToSet.getTagName()) || !isTagValid) {"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_INVALID_TAG));"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // Check if"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" // (a) Object is the same object"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" // (b) Object is an instance of the object and that toSet, tag and color are the same"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" || (other instanceof SetCommand // instanceof handles nulls"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagToSet.getTagName().equals(((SetCommand) other).tagToSet.getTagName()))"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagColour.equals(((SetCommand) other).tagColour);"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Sorts all players in address book by field. Can be done in asc or desc order."},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class SortCommand extends UndoableCommand {"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"sort\";"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_ASCENDING \u003d \"asc\";"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_DESCENDING \u003d \"desc\";"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts players in address book \""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"by fields in either ascending or descending order.\\n\""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: FIELD ORDER\\n\""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted fields for sort: name, email, address, rating, jersey, pos\\n\""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted orders: asc \u0026 desc\\n\""},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" + \" name \" + BY_ASCENDING;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"FIELD ORDER\";"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Players in address book have been sorted.\";"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_EMPTY_BOOK \u003d \"No player(s) to sort.\";"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private final String field;"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final String order;"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public SortCommand(String field, String order) {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(field);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(order);"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" this.field \u003d field;"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" this.order \u003d order;"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public String getField() {"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" return this.field;"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public String getOrder() {"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return this.order;"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" model.sortPlayers(getField(), getOrder());"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" } catch (NoPlayerException npe) {"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_EMPTY_BOOK);"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":62}},{"path":"src/main/java/seedu/address/logic/commands/TogglePrivacyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import java.util.Set;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" * Toggles privacy of fields of player identified using it\u0027s last displayed index from the address book."},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommand extends UndoableCommand {"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"toggleprivacy\";"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"tp\";"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the field privacy of the person\""},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" + \" identified by the index number used in the last person listing.\\n\""},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: INDEX (must be a positive integer) \""},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"]\""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_EMAIL + \"]\""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_REMARK + \"]\""},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_RATING + \"]\""},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_ADDRESS + \"]\\n\""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE + \" \""},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_EMAIL + \" \""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_ADDRESS;"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"No prefixes were specified!\";"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \""},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE]\""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_EMAIL + \"EMAIL]\""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_REMARK + \"REMARK]\""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_RATING + \"RATING]\""},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_ADDRESS + \"ADDRESS]\";"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" private final Index index;"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" private final EditPersonPrivacy epp;"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" private Person personToEdit;"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" private Person editedPerson;"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" * @param index of the person in the filtered person list to edit privacy"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand(Index index, EditPersonPrivacy epp) {"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(index);"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(epp);"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.index \u003d index;"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d epp;"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" editedPerson \u003d createEditedPrivacyPerson(personToEdit, epp);"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException e) {"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Person must have all fields!\");"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" model.updatePerson(personToEdit, editedPerson);"},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"The target person cannot be missing\");"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));"},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" * edited with {@code editPersonPrivacy}."},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" * NOTE: Private fields will not be edited."},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;"},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);"},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();"},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();"},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,"},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" Phone phone;"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());"},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {"},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());"},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" return phone;"},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" private static Email createEmailPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" Email email;"},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {"},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();"},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();"},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());"},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Email\");"},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateEmail() !\u003d null) {"},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());"},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" email.togglePrivacy();"},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());"},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" return email;"},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" private static Address createAddressPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" Address address;"},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();"},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();"},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());"},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Address\");"},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateAddress() !\u003d null) {"},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());"},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":" address.togglePrivacy();"},{"lineNumber":214,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":215,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());"},{"lineNumber":216,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" return address;"},{"lineNumber":218,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":219,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":220,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" private static Remark createRemarkPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" Remark remark;"},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":228,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {"},{"lineNumber":229,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();"},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();"},{"lineNumber":232,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":233,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());"},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Remark\");"},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRemark() !\u003d null) {"},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());"},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":" remark.togglePrivacy();"},{"lineNumber":241,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":242,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());"},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" return remark;"},{"lineNumber":245,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":246,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Rating) based on the input (@code Person) and (@code EditPersonPrivacy)"},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Rating) with the same value as that of the (@code Person)\u0027s but with the privacy set to that"},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)"},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" private static Rating createRatingPrivacy(Person person, EditPersonPrivacy epp) {"},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":" Rating rating;"},{"lineNumber":254,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":255,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {"},{"lineNumber":256,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();"},{"lineNumber":257,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());"},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();"},{"lineNumber":259,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":260,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());"},{"lineNumber":261,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":262,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {"},{"lineNumber":263,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Rating\");"},{"lineNumber":264,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRating() !\u003d null) {"},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());"},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":" rating.togglePrivacy();"},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());"},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" return rating;"},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" public Index getIndex() {"},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":" return index;"},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy getEpp() {"},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" return epp;"},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {"},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object"},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" return true;"},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls"},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof TogglePrivacyCommand)) {"},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" return false;"},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":293,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":294,"author":{"gitId":"lohtianwei"},"content":" // state check"},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand e \u003d (TogglePrivacyCommand) other;"},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" return index.equals(e.index)"},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 epp.equals(e.epp);"},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the"},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" * corresponding field value of the person."},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" public static class EditPersonPrivacy {"},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" private Boolean privatePhone;"},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateEmail;"},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateAddress;"},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRemark;"},{"lineNumber":309,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRating;"},{"lineNumber":310,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":311,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy() {}"},{"lineNumber":312,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":313,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":" * Copy constructor."},{"lineNumber":315,"author":{"gitId":"lohtianwei"},"content":" * A defensive copy of {@code tags} is used internally."},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":317,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy (EditPersonPrivacy toCopy) {"},{"lineNumber":318,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d toCopy.privateAddress;"},{"lineNumber":319,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d toCopy.privateEmail;"},{"lineNumber":320,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d toCopy.privatePhone;"},{"lineNumber":321,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d toCopy.privateRemark;"},{"lineNumber":322,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d toCopy.privateRating;"},{"lineNumber":323,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":324,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":325,"author":{"gitId":"lohtianwei"},"content":" public void setPrivatePhone(boolean privatePhone) {"},{"lineNumber":326,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d privatePhone;"},{"lineNumber":327,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":328,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":329,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivatePhone() {"},{"lineNumber":330,"author":{"gitId":"lohtianwei"},"content":" return privatePhone;"},{"lineNumber":331,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":332,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":333,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateEmail(boolean privateEmail) {"},{"lineNumber":334,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d privateEmail;"},{"lineNumber":335,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":336,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":337,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateEmail() {"},{"lineNumber":338,"author":{"gitId":"lohtianwei"},"content":" return privateEmail;"},{"lineNumber":339,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":340,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":341,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateAddress(boolean privateAddress) {"},{"lineNumber":342,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d privateAddress;"},{"lineNumber":343,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":344,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":345,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateAddress() {"},{"lineNumber":346,"author":{"gitId":"lohtianwei"},"content":" return privateAddress;"},{"lineNumber":347,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":348,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":349,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRemark(boolean privateRemark) {"},{"lineNumber":350,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d privateRemark;"},{"lineNumber":351,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":352,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":353,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRemark() {"},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":" return privateRemark;"},{"lineNumber":355,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":356,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":357,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRating(boolean privateRating) {"},{"lineNumber":358,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d privateRating;"},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":360,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":361,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRating() {"},{"lineNumber":362,"author":{"gitId":"lohtianwei"},"content":" return privateRating;"},{"lineNumber":363,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":364,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":365,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":366,"author":{"gitId":"lohtianwei"},"content":" *"},{"lineNumber":367,"author":{"gitId":"lohtianwei"},"content":" * @return true if at least one field is not null"},{"lineNumber":368,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":" public boolean anyNonNullField() {"},{"lineNumber":370,"author":{"gitId":"lohtianwei"},"content":" return CollectionUtil.isAnyNonNull(this.privateAddress, this.privateEmail, this.privatePhone,"},{"lineNumber":371,"author":{"gitId":"lohtianwei"},"content":" this.privateRating, this.privateRemark);"},{"lineNumber":372,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":373,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":374,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":375,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {"},{"lineNumber":376,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object"},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":378,"author":{"gitId":"lohtianwei"},"content":" return true;"},{"lineNumber":379,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":380,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":381,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls"},{"lineNumber":382,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof EditPersonPrivacy)) {"},{"lineNumber":383,"author":{"gitId":"lohtianwei"},"content":" return false;"},{"lineNumber":384,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":385,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":386,"author":{"gitId":"lohtianwei"},"content":" // state check"},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy e \u003d (EditPersonPrivacy) other;"},{"lineNumber":388,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":389,"author":{"gitId":"lohtianwei"},"content":" return getPrivatePhone().equals(e.getPrivatePhone())"},{"lineNumber":390,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateAddress().equals(e.getPrivateAddress())"},{"lineNumber":391,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateEmail().equals(e.getPrivateEmail())"},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRemark().equals(e.getPrivateRemark())"},{"lineNumber":393,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRating().equals(e.getPrivateRating());"},{"lineNumber":394,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":395,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":396,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":394,"-":2}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();"},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee"},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author"},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" }"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/ViewCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"-"},"content":" * View a team identified using it\u0027s team name from the address book."},{"lineNumber":15,"author":{"gitId":"-"},"content":" */"},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ViewCommand extends Command {"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"view\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"vt\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD"},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \": Views the team identified by the team name.\\n\""},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: TEAM_NAME\\n\""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" Arsenal\";"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_VIEW_TEAM_SUCCESS \u003d \"Viewing Team: %1$s\";"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final TeamName targetTeam;"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" public ViewCommand(TeamName targetTeam) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.targetTeam \u003d targetTeam;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {"},{"lineNumber":38,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(targetTeam.toString()));"},{"lineNumber":40,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(targetTeam);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_VIEW_TEAM_SUCCESS, targetTeam.toString()));"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof ViewCommand // instanceof handles nulls"},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetTeam.equals(((ViewCommand) other).targetTeam)); // state check"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":51}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AssignCommand;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.Command;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemoveCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RenameCommand;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ViewCommand;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Parses user input."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddressBookParser {"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_RESTRICTED \u003d \"Not allowed! Please unlock MTM before execution.\\n\""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" + KeyCommand.MESSAGE_USAGE;"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input into command for execution."},{"lineNumber":50,"author":{"gitId":"-"},"content":" *"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * @param userInput full user input string"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @return the command based on the user input"},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":54,"author":{"gitId":"-"},"content":" */"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());"},{"lineNumber":57,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");"},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Command res \u003d lowLevelCommand(commandWord, arguments);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" if (res !\u003d null) {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return res;"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" if (lockState) {"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(MESSAGE_RESTRICTED);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" switch (commandWord) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" case AddCommand.COMMAND_ALIAS:"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" case EditCommand.COMMAND_ALIAS:"},{"lineNumber":81,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" case SelectCommand.COMMAND_ALIAS:"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" case DeleteCommand.COMMAND_ALIAS:"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" case ClearCommand.COMMAND_ALIAS:"},{"lineNumber":93,"author":{"gitId":"-"},"content":" return new ClearCommand();"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_WORD:"},{"lineNumber":96,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_ALIAS:"},{"lineNumber":97,"author":{"gitId":"-"},"content":" return new RemarkCommandParser().parse(arguments);"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:"},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" case HistoryCommand.COMMAND_ALIAS:"},{"lineNumber":101,"author":{"gitId":"-"},"content":" return new HistoryCommand();"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_WORD:"},{"lineNumber":104,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_ALIAS:"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new CreateCommandParser().parse(arguments);"},{"lineNumber":106,"author":{"gitId":"-"},"content":""},{"lineNumber":107,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_WORD:"},{"lineNumber":108,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_ALIAS:"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return new RemoveCommandParser().parse(arguments);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_WORD:"},{"lineNumber":112,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_ALIAS:"},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new AssignCommandParser().parse(arguments);"},{"lineNumber":114,"author":{"gitId":"-"},"content":""},{"lineNumber":115,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_WORD:"},{"lineNumber":116,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_ALIAS:"},{"lineNumber":117,"author":{"gitId":"-"},"content":" return new RenameCommandParser().parse(arguments);"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" case UndoCommand.COMMAND_ALIAS:"},{"lineNumber":121,"author":{"gitId":"-"},"content":" return new UndoCommand();"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case RedoCommand.COMMAND_ALIAS:"},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new RedoCommand();"},{"lineNumber":126,"author":{"gitId":"-"},"content":""},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_WORD:"},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_ALIAS:"},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" return new SetCommandParser().parse(arguments);"},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_WORD:"},{"lineNumber":132,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_ALIAS:"},{"lineNumber":133,"author":{"gitId":"-"},"content":" return new TogglePrivacyCommandParser().parse(arguments);"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" default:"},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * Checks for low level command words or aliases that do not violate restriction of a locked MTM."},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" * Else, control is returned back to original parseCommand method."},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" * @param commandWord"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" * @param arguments"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" switch(commandWord) {"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_WORD:"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" return new ChangeThemeCommandParser().parse(arguments);"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_WORD:"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_ALIAS:"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" return new FindCommandParser().parse(arguments);"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_WORD:"},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_ALIAS:"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" return new ListCommand();"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_WORD:"},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_ALIAS:"},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommandParser().parse(arguments);"},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_WORD:"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_ALIAS:"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" return new ViewCommandParser().parse(arguments);"},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case ExitCommand.COMMAND_WORD:"},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" return new ExitCommand();"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" case HelpCommand.COMMAND_WORD:"},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" return new HelpCommand();"},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_WORD:"},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_ALIAS:"},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" return new SortCommandParser().parse(arguments);"},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" return null;"},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":82,"codeeong":6,"-":95}},{"path":"src/main/java/seedu/address/logic/parser/ChangeThemeCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.ChangeThemeCommand.MESSAGE_USAGE;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Parses input arguments and creates a new ThemeCommand object."},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParser implements Parser\u003cChangeThemeCommand\u003e {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" * Parses the given (@code String) in the context of a ThemeCommand."},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" * @return ThemeCommand Object for execution"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand parse(String userInput) throws ParseException {"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" if (userInput.length() \u003d\u003d 0) {"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" return new ChangeThemeCommand(userInput);"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":26}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands"},{"lineNumber":5,"author":{"gitId":"-"},"content":" */"},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */"},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");"},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");"},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");"},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final Prefix PREFIX_TAG_COLOUR \u003d new Prefix(\"tc/\");"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TEAM_NAME \u003d new Prefix(\"tm/\");"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_INDEX \u003d new Prefix(\"i/\");"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_RATING \u003d new Prefix(\"ra/\");"},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_JERSEY_NUMBER \u003d new Prefix(\"j/\");"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_POSITION \u003d new Prefix(\"po/\");"},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"av/\");"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");"},{"lineNumber":23,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":21}},{"path":"src/main/java/seedu/address/logic/parser/KeyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Parses input and creates KeyCommand object with password provided"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandParser implements Parser\u003cKeyCommand\u003e {"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the KeyCommand"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" * and returns a KeyCommand object for execution."},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand parse(String args) throws ParseException {"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" /*if (trimmedArgs.isEmpty()) {"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }*/"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length \u003e 1) {"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommand(argKeywords[0]);"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":31}},{"path":"src/main/java/seedu/address/logic/parser/SetCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Stream;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" * This class is to check whether Set Command was input correctly"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" * Parses the given {@code String} of arguments in the context of the SetCommand"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * and returns an SetCommand object for execution."},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG, PREFIX_TAG_COLOUR);"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG, PREFIX_TAG_COLOUR)"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" || !argMultimap.getPreamble().isEmpty()) {"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d ParserUtil.parseTag(argMultimap.getValue(PREFIX_TAG).get());"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" String colour \u003d ParserUtil.parseTagColour(argMultimap.getValue(PREFIX_TAG_COLOUR).get());"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" if (!tag.isValidTagColour(colour)) {"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" throw new ParseException("},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" return new SetCommand(tag, colour);"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" throw new ParseException("},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" * {@code ArgumentMultimap}."},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":56}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Arrays;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new SortCommand object with field and order parameters provided"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_FIELDS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" \"name\", \"email\", \"address\", \"rating\", \"jersey\", \"pos\"));"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_ORDERS \u003d new ArrayList\u003c\u003e(Arrays.asList("},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" \"asc\", \"desc\"));"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public SortCommand parse(String args) throws ParseException {"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (trimmedArgs.isEmpty()) {"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" //eliminates spaces"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" //accounts for caps entries"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length !\u003d 2) {"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_FIELDS.contains(argKeywords[0])) {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_ORDERS.contains(argKeywords[1])) {"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return new SortCommand(argKeywords[0], argKeywords[1]);"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":51}},{"path":"src/main/java/seedu/address/logic/parser/TogglePrivacyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new TogglePrivacyCommand object"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParser implements Parser\u003cTogglePrivacyCommand\u003e {"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the TogglePrivacyCommand"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" * and returns an TogglePrivacyCommand object for execution."},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand parse(String args) throws ParseException {"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(args);"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" ArgumentMultimap argMultimap \u003d"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" ArgumentTokenizer.tokenize(args,"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" PREFIX_REMARK, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_RATING);"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" Index index;"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException ive) {"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_RATING).isPresent()) {"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" if (!epp.anyNonNullField()) {"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(TogglePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" return new TogglePrivacyCommand(index, epp);"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":67,"-":2}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.UniqueTeamList;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)"},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;"},{"lineNumber":38,"author":{"gitId":"-"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html"},{"lineNumber":42,"author":{"gitId":"-"},"content":" *"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors."},{"lineNumber":45,"author":{"gitId":"-"},"content":" */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}"},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}."},{"lineNumber":78,"author":{"gitId":"-"},"content":" */"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);"},{"lineNumber":81,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));"},{"lineNumber":82,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e syncedPersonList \u003d newData.getPersonList().stream()"},{"lineNumber":83,"author":{"gitId":"-"},"content":" .map(this::syncWithMasterTagList)"},{"lineNumber":84,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());"},{"lineNumber":85,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e syncedTeamList \u003d newData.getTeamList();"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(syncedPersonList);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" setTeams(syncedTeamList);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBooks should not have duplicate persons\");"},{"lineNumber":92,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" throw new AssertionError(\"MTM should not have duplicate teams\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":" }"},{"lineNumber":96,"author":{"gitId":"-"},"content":""},{"lineNumber":97,"author":{"gitId":"-"},"content":" //// person-level operations"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Adds a person to the address book."},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}."},{"lineNumber":103,"author":{"gitId":"-"},"content":" *"},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists."},{"lineNumber":105,"author":{"gitId":"-"},"content":" */"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person p) throws DuplicatePersonException {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person person \u003d syncWithMasterTagList(p);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":109,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":110,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":111,"author":{"gitId":"-"},"content":" persons.add(person);"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedPerson}."},{"lineNumber":116,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedPerson}."},{"lineNumber":117,"author":{"gitId":"-"},"content":" *"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":119,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":120,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":121,"author":{"gitId":"-"},"content":" *"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * @see #syncWithMasterTagList(Person)"},{"lineNumber":123,"author":{"gitId":"-"},"content":" */"},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":125,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":126,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person syncedEditedPerson \u003d syncWithMasterTagList(editedPerson);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails."},{"lineNumber":130,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person"},{"lineNumber":131,"author":{"gitId":"-"},"content":" // in the person list."},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" removeUnusedTags();"},{"lineNumber":137,"author":{"gitId":"-"},"content":" }"},{"lineNumber":138,"author":{"gitId":"-"},"content":""},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayersBy(String field, String order) throws NoPlayerException {"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" persons.sortBy(field, order);"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" //@@author"},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Updates the master tag list to include tags in {@code person} that are not in the list."},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @return a copy of this {@code person} such that every tag in this person points to a Tag object in the master"},{"lineNumber":148,"author":{"gitId":"-"},"content":" * list."},{"lineNumber":149,"author":{"gitId":"-"},"content":" */"},{"lineNumber":150,"author":{"gitId":"-"},"content":" private Person syncWithMasterTagList(Person person) {"},{"lineNumber":151,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());"},{"lineNumber":152,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list"},{"lineNumber":155,"author":{"gitId":"-"},"content":" // used for checking person tag references"},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();"},{"lineNumber":157,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list."},{"lineNumber":160,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));"},{"lineNumber":162,"author":{"gitId":"-"},"content":" return new Person("},{"lineNumber":163,"author":{"gitId":"-"},"content":" person.getName(), person.getPhone(), person.getEmail(), person.getAddress(), person.getRemark(),"},{"lineNumber":164,"author":{"gitId":"-"},"content":" person.getTeamName(), correctTagReferences, person.getRating(), person.getPosition(),"},{"lineNumber":165,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":166,"author":{"gitId":"-"},"content":" }"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}."},{"lineNumber":170,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}."},{"lineNumber":171,"author":{"gitId":"-"},"content":" */"},{"lineNumber":172,"author":{"gitId":"-"},"content":" public boolean removePerson(Person key) throws PersonNotFoundException {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {"},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":175,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":176,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" }"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":""},{"lineNumber":180,"author":{"gitId":"-"},"content":" //// tag-level operations"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {"},{"lineNumber":183,"author":{"gitId":"-"},"content":" tags.add(t);"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }"},{"lineNumber":185,"author":{"gitId":"-"},"content":""},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" * Sets the colour of {@code tag}."},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" public void setTagColour(Tag tag, String colour) {"},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" for (Tag t : tags) {"},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" if (t.getTagName().equals(tag.getTagName())) {"},{"lineNumber":194,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(colour);"},{"lineNumber":195,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":196,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":197,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":198,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":200,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":201,"author":{"gitId":"-"},"content":" *"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Removes {@code tag} from all persons in this {@code AddressBook}."},{"lineNumber":203,"author":{"gitId":"-"},"content":" */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void removeTag(Tag tag) {"},{"lineNumber":205,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":206,"author":{"gitId":"-"},"content":" for (Person person : persons) {"},{"lineNumber":207,"author":{"gitId":"-"},"content":" removeTagFromPerson(tag, person);"},{"lineNumber":208,"author":{"gitId":"-"},"content":" }"},{"lineNumber":209,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":" }"},{"lineNumber":213,"author":{"gitId":"-"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Removes {@code tag} from {@code person} in this {@code AddressBook}."},{"lineNumber":216,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code person} is not in this {@code AddressBook}."},{"lineNumber":217,"author":{"gitId":"-"},"content":" */"},{"lineNumber":218,"author":{"gitId":"-"},"content":" private void removeTagFromPerson(Tag tag, Person person) throws PersonNotFoundException {"},{"lineNumber":219,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003c\u003e(person.getTags());"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (!newTags.remove(tag)) {"},{"lineNumber":222,"author":{"gitId":"-"},"content":" return;"},{"lineNumber":223,"author":{"gitId":"-"},"content":" }"},{"lineNumber":224,"author":{"gitId":"-"},"content":""},{"lineNumber":225,"author":{"gitId":"-"},"content":" Person newPerson \u003d"},{"lineNumber":226,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":227,"author":{"gitId":"-"},"content":" person.getRemark(), person.getTeamName(), newTags, person.getRating(), person.getPosition(),"},{"lineNumber":228,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":229,"author":{"gitId":"-"},"content":""},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":231,"author":{"gitId":"-"},"content":" updatePerson(person, newPerson);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person \""},{"lineNumber":234,"author":{"gitId":"-"},"content":" + \"after updating person\u0027s tag.\");"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }"},{"lineNumber":236,"author":{"gitId":"-"},"content":" }"},{"lineNumber":237,"author":{"gitId":"-"},"content":""},{"lineNumber":238,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":239,"author":{"gitId":"-"},"content":" * Removes all {@code tag} that are not in used by any {@code Person} in this {@code AddressBook}."},{"lineNumber":240,"author":{"gitId":"-"},"content":" */"},{"lineNumber":241,"author":{"gitId":"-"},"content":" private void removeUnusedTags() {"},{"lineNumber":242,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e tagsInPersons \u003d persons.asObservableList().stream()"},{"lineNumber":243,"author":{"gitId":"-"},"content":" .map(Person::getTags)"},{"lineNumber":244,"author":{"gitId":"-"},"content":" .flatMap(Set::stream)"},{"lineNumber":245,"author":{"gitId":"-"},"content":" .collect(Collectors.toSet());"},{"lineNumber":246,"author":{"gitId":"-"},"content":" tags.setTags(tagsInPersons);"},{"lineNumber":247,"author":{"gitId":"-"},"content":" }"},{"lineNumber":248,"author":{"gitId":"-"},"content":""},{"lineNumber":249,"author":{"gitId":"-"},"content":" //@@author jordancjq"},{"lineNumber":250,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":251,"author":{"gitId":"-"},"content":" * Creates a team in the manager."},{"lineNumber":252,"author":{"gitId":"-"},"content":" * @throws DuplicateTeamException if an equivalent team already exists."},{"lineNumber":253,"author":{"gitId":"-"},"content":" */"},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void createTeam(Team t) throws DuplicateTeamException {"},{"lineNumber":255,"author":{"gitId":"-"},"content":" teams.add(t);"},{"lineNumber":256,"author":{"gitId":"-"},"content":" }"},{"lineNumber":257,"author":{"gitId":"-"},"content":""},{"lineNumber":258,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Assigns a {@code person} to a {@code team}."},{"lineNumber":260,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}."},{"lineNumber":261,"author":{"gitId":"-"},"content":" */"},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":263,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":" if (!person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":266,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":267,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());"},{"lineNumber":268,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":269,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");"},{"lineNumber":270,"author":{"gitId":"-"},"content":" }"},{"lineNumber":271,"author":{"gitId":"-"},"content":" }"},{"lineNumber":272,"author":{"gitId":"-"},"content":""},{"lineNumber":273,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d"},{"lineNumber":274,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":275,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(), person.getPosition(),"},{"lineNumber":276,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":277,"author":{"gitId":"-"},"content":""},{"lineNumber":278,"author":{"gitId":"-"},"content":" if (!person.getTeamName().equals(newPersonWithTeam.getTeamName())) {"},{"lineNumber":279,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":280,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);"},{"lineNumber":281,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":282,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":283,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":284,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":285,"author":{"gitId":"-"},"content":" }"},{"lineNumber":286,"author":{"gitId":"-"},"content":" }"},{"lineNumber":287,"author":{"gitId":"-"},"content":" }"},{"lineNumber":288,"author":{"gitId":"-"},"content":""},{"lineNumber":289,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":290,"author":{"gitId":"-"},"content":" * Unassigns a {@code person} from team."},{"lineNumber":291,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code teamName} in {@code person} is {@code UNSPECIFIED_FIELD}."},{"lineNumber":292,"author":{"gitId":"-"},"content":" */"},{"lineNumber":293,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {"},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {"},{"lineNumber":295,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException(person.getName().toString());"},{"lineNumber":296,"author":{"gitId":"-"},"content":" }"},{"lineNumber":297,"author":{"gitId":"-"},"content":""},{"lineNumber":298,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d"},{"lineNumber":299,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":300,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),"},{"lineNumber":301,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":302,"author":{"gitId":"-"},"content":""},{"lineNumber":303,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":304,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());"},{"lineNumber":305,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":306,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");"},{"lineNumber":307,"author":{"gitId":"-"},"content":" }"},{"lineNumber":308,"author":{"gitId":"-"},"content":""},{"lineNumber":309,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":310,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);"},{"lineNumber":311,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":312,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":313,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":314,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":315,"author":{"gitId":"-"},"content":" }"},{"lineNumber":316,"author":{"gitId":"-"},"content":" }"},{"lineNumber":317,"author":{"gitId":"-"},"content":""},{"lineNumber":318,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":319,"author":{"gitId":"-"},"content":" * Immediately add a {@code person} to a {@code team}."},{"lineNumber":320,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}."},{"lineNumber":321,"author":{"gitId":"-"},"content":" */"},{"lineNumber":322,"author":{"gitId":"-"},"content":" public void addPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":323,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));"},{"lineNumber":324,"author":{"gitId":"-"},"content":" }"},{"lineNumber":325,"author":{"gitId":"-"},"content":""},{"lineNumber":326,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":327,"author":{"gitId":"-"},"content":" * Removes a {@code person} from a {@code team}."},{"lineNumber":328,"author":{"gitId":"-"},"content":" */"},{"lineNumber":329,"author":{"gitId":"-"},"content":" private void removePersonFromTeam(Person person, TeamName teamName) throws PersonNotFoundException {"},{"lineNumber":330,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":331,"author":{"gitId":"-"},"content":" teams.removePersonFromTeam(person, teams.getTeam(teamName));"},{"lineNumber":332,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":333,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":334,"author":{"gitId":"-"},"content":" }"},{"lineNumber":335,"author":{"gitId":"-"},"content":" }"},{"lineNumber":336,"author":{"gitId":"-"},"content":""},{"lineNumber":337,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":338,"author":{"gitId":"-"},"content":" * Removes a {@code team} from {@code teams}."},{"lineNumber":339,"author":{"gitId":"-"},"content":" */"},{"lineNumber":340,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {"},{"lineNumber":341,"author":{"gitId":"-"},"content":" if (!teams.contains(teamName)) {"},{"lineNumber":342,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();"},{"lineNumber":343,"author":{"gitId":"-"},"content":" }"},{"lineNumber":344,"author":{"gitId":"-"},"content":""},{"lineNumber":345,"author":{"gitId":"-"},"content":" Team teamToRemove \u003d teams.getTeam(teamName);"},{"lineNumber":346,"author":{"gitId":"-"},"content":""},{"lineNumber":347,"author":{"gitId":"-"},"content":" for (Person person : teamToRemove) {"},{"lineNumber":348,"author":{"gitId":"-"},"content":" removeTeamFromPerson(person);"},{"lineNumber":349,"author":{"gitId":"-"},"content":" }"},{"lineNumber":350,"author":{"gitId":"-"},"content":""},{"lineNumber":351,"author":{"gitId":"-"},"content":" teams.remove(teamToRemove);"},{"lineNumber":352,"author":{"gitId":"-"},"content":" }"},{"lineNumber":353,"author":{"gitId":"-"},"content":""},{"lineNumber":354,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":355,"author":{"gitId":"-"},"content":" * Removes {@code teamName} from {@code person} in this {@code Team}."},{"lineNumber":356,"author":{"gitId":"-"},"content":" */"},{"lineNumber":357,"author":{"gitId":"-"},"content":" private void removeTeamFromPerson(Person person) {"},{"lineNumber":358,"author":{"gitId":"-"},"content":" Person personWithRemoveTeam \u003d"},{"lineNumber":359,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":360,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),"},{"lineNumber":361,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":362,"author":{"gitId":"-"},"content":""},{"lineNumber":363,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":364,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRemoveTeam);"},{"lineNumber":365,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":366,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":367,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":368,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":369,"author":{"gitId":"-"},"content":" }"},{"lineNumber":370,"author":{"gitId":"-"},"content":" }"},{"lineNumber":371,"author":{"gitId":"-"},"content":""},{"lineNumber":372,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":373,"author":{"gitId":"-"},"content":" * Renames {@code Team} with {@code updatedTeamName}."},{"lineNumber":374,"author":{"gitId":"-"},"content":" * @return"},{"lineNumber":375,"author":{"gitId":"-"},"content":" */"},{"lineNumber":376,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {"},{"lineNumber":377,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":378,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e renameTeamPersonList \u003d new ArrayList\u003c\u003e();"},{"lineNumber":379,"author":{"gitId":"-"},"content":""},{"lineNumber":380,"author":{"gitId":"-"},"content":" for (Person person : persons) {"},{"lineNumber":381,"author":{"gitId":"-"},"content":" if (person.getTeamName().equals(targetTeam.getTeamName())) {"},{"lineNumber":382,"author":{"gitId":"-"},"content":" renameTeamPersonList.add(renameTeamInPerson(person, updatedTeamName, targetTeam));"},{"lineNumber":383,"author":{"gitId":"-"},"content":" }"},{"lineNumber":384,"author":{"gitId":"-"},"content":" }"},{"lineNumber":385,"author":{"gitId":"-"},"content":""},{"lineNumber":386,"author":{"gitId":"-"},"content":" Team updatedTeam \u003d new Team(updatedTeamName, renameTeamPersonList);"},{"lineNumber":387,"author":{"gitId":"-"},"content":""},{"lineNumber":388,"author":{"gitId":"-"},"content":" teams.setTeam(targetTeam, updatedTeam);"},{"lineNumber":389,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException dte) {"},{"lineNumber":390,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate team after renaming\");"},{"lineNumber":391,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {"},{"lineNumber":392,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Teams should contain this team\");"},{"lineNumber":393,"author":{"gitId":"-"},"content":" }"},{"lineNumber":394,"author":{"gitId":"-"},"content":" }"},{"lineNumber":395,"author":{"gitId":"-"},"content":""},{"lineNumber":396,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":397,"author":{"gitId":"-"},"content":" * Renames {@code teamName} in {@code person} with {@code teamName}."},{"lineNumber":398,"author":{"gitId":"-"},"content":" */"},{"lineNumber":399,"author":{"gitId":"-"},"content":" private Person renameTeamInPerson(Person person, TeamName teamName, Team targetTeam) {"},{"lineNumber":400,"author":{"gitId":"-"},"content":" Person personWithRenameTeam \u003d"},{"lineNumber":401,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),"},{"lineNumber":402,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(),"},{"lineNumber":403,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());"},{"lineNumber":404,"author":{"gitId":"-"},"content":""},{"lineNumber":405,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":406,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRenameTeam);"},{"lineNumber":407,"author":{"gitId":"-"},"content":" return personWithRenameTeam;"},{"lineNumber":408,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":409,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");"},{"lineNumber":410,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {"},{"lineNumber":411,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");"},{"lineNumber":412,"author":{"gitId":"-"},"content":" }"},{"lineNumber":413,"author":{"gitId":"-"},"content":" }"},{"lineNumber":414,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":415,"author":{"gitId":"-"},"content":" //// util methods"},{"lineNumber":416,"author":{"gitId":"-"},"content":""},{"lineNumber":417,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":418,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":419,"author":{"gitId":"-"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\";"},{"lineNumber":420,"author":{"gitId":"-"},"content":" // TODO: refine later"},{"lineNumber":421,"author":{"gitId":"-"},"content":" }"},{"lineNumber":422,"author":{"gitId":"-"},"content":""},{"lineNumber":423,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":424,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getPersonList() {"},{"lineNumber":425,"author":{"gitId":"-"},"content":" return persons.asObservableList();"},{"lineNumber":426,"author":{"gitId":"-"},"content":" }"},{"lineNumber":427,"author":{"gitId":"-"},"content":""},{"lineNumber":428,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":429,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {"},{"lineNumber":430,"author":{"gitId":"-"},"content":" return tags.asObservableList();"},{"lineNumber":431,"author":{"gitId":"-"},"content":" }"},{"lineNumber":432,"author":{"gitId":"-"},"content":""},{"lineNumber":433,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":434,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {"},{"lineNumber":435,"author":{"gitId":"-"},"content":" return teams.asObservableList();"},{"lineNumber":436,"author":{"gitId":"-"},"content":" }"},{"lineNumber":437,"author":{"gitId":"-"},"content":""},{"lineNumber":438,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":439,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":440,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":441,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls"},{"lineNumber":442,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)"},{"lineNumber":443,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags));"},{"lineNumber":444,"author":{"gitId":"-"},"content":" }"},{"lineNumber":445,"author":{"gitId":"-"},"content":""},{"lineNumber":446,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":447,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":448,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own"},{"lineNumber":449,"author":{"gitId":"-"},"content":" return Objects.hash(persons, tags);"},{"lineNumber":450,"author":{"gitId":"-"},"content":" }"},{"lineNumber":451,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":7,"codeeong":13,"-":431}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The API of the Model component."},{"lineNumber":18,"author":{"gitId":"-"},"content":" */"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public interface Model {"},{"lineNumber":20,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */"},{"lineNumber":21,"author":{"gitId":"-"},"content":" Predicate\u003cPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Deletes the given person. */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" void deletePerson(Person target) throws PersonNotFoundException;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Adds the given person */"},{"lineNumber":33,"author":{"gitId":"-"},"content":" void addPerson(Person person) throws DuplicatePersonException;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}."},{"lineNumber":37,"author":{"gitId":"-"},"content":" *"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * another existing person in the list."},{"lineNumber":40,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":" void updatePerson(Person target, Person editedPerson)"},{"lineNumber":43,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */"},{"lineNumber":46,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}."},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":51,"author":{"gitId":"-"},"content":" */"},{"lineNumber":52,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate);"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code teamName}."},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null."},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException;"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" * Sorts players in address book by field in asc or desc order"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" * @param field"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" * @param order"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" void sortPlayers(String field, String order) throws NoPlayerException;"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" boolean getLockState();"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" UserPrefs getUserPrefs();"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" /** Locks address book from model*/"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" void lockAddressBookModel();"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /** Unlocks address book from model*/"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" void unlockAddressBookModel();"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" /** Removes the given {@code tag} from all {@code Person}s. */"},{"lineNumber":78,"author":{"gitId":"-"},"content":" void deleteTag(Tag tag);"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" /** Create the given team */"},{"lineNumber":81,"author":{"gitId":"-"},"content":" void createTeam(Team team) throws DuplicateTeamException;"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" /** Assign person to team */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" void assignPersonToTeam(Person person, TeamName teamName)"},{"lineNumber":85,"author":{"gitId":"-"},"content":" throws DuplicatePersonException;"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /** Unassign person from team */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" void unassignPersonFromTeam(Person person) throws TeamNotFoundException;"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" /** Removes the given team */"},{"lineNumber":91,"author":{"gitId":"-"},"content":" void removeTeam(TeamName teamName) throws TeamNotFoundException;"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Renames the given team */"},{"lineNumber":94,"author":{"gitId":"-"},"content":" void renameTeam(Team targetTeam, TeamName teamName);"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" /** sets the given {@code tag} to color. */"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" boolean setTagColour(Tag tag, String colour);"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of the team list */"},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();"},{"lineNumber":101,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":18,"codeeong":5,"-":78}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data."},{"lineNumber":29,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final FilteredList\u003cPerson\u003e filteredPersons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private final UserPrefs userPrefs;"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" this.userPrefs \u003d userPrefs;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager() {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */"},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(Person target) throws PersonNotFoundException {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);"},{"lineNumber":76,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public synchronized void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);"},{"lineNumber":90,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" addressBook.sortPlayersBy(field, order);"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" indicateAddressBookChanged();"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" return userPrefs;"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().lockAddressBook();"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {"},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().unlockAddressBook();"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" return getUserPrefs().getAddressBookLockState();"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" //@@author"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":119,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {"},{"lineNumber":120,"author":{"gitId":"-"},"content":" addressBook.removeTag(tag);"},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" indicateAddressBookChanged();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" }"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" //@@author jordancjq"},{"lineNumber":125,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"-"},"content":" public synchronized void createTeam(Team team) throws DuplicateTeamException {"},{"lineNumber":127,"author":{"gitId":"-"},"content":" addressBook.createTeam(team);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":129,"author":{"gitId":"-"},"content":" }"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"-"},"content":" public synchronized void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":133,"author":{"gitId":"-"},"content":" addressBook.assignPersonToTeam(person, teamName);"},{"lineNumber":134,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public synchronized void unassignPersonFromTeam(Person person) throws TeamNotFoundException {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" addressBook.unassignPersonFromTeam(person);"},{"lineNumber":140,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":141,"author":{"gitId":"-"},"content":" }"},{"lineNumber":142,"author":{"gitId":"-"},"content":""},{"lineNumber":143,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":144,"author":{"gitId":"-"},"content":" public synchronized void removeTeam(TeamName teamName) throws TeamNotFoundException {"},{"lineNumber":145,"author":{"gitId":"-"},"content":" requireNonNull(teamName);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" raise(new RemoveSelectedTeamEvent(teamName));"},{"lineNumber":147,"author":{"gitId":"-"},"content":" addressBook.removeTeam(teamName);"},{"lineNumber":148,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":149,"author":{"gitId":"-"},"content":" }"},{"lineNumber":150,"author":{"gitId":"-"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":152,"author":{"gitId":"-"},"content":" public synchronized void renameTeam(Team targetTeam, TeamName updatedTeamName) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" requireAllNonNull(targetTeam, updatedTeamName);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" addressBook.renameTeam(targetTeam, updatedTeamName);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public boolean setTagColour(Tag tag, String colour) {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e allTags \u003d addressBook.getTagList();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" boolean isTagValid \u003d false;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" for (Tag t : allTags) {"},{"lineNumber":164,"author":{"gitId":"-"},"content":" if (t.getTagName().equals(tag.getTagName())) {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" isTagValid \u003d true;"},{"lineNumber":166,"author":{"gitId":"-"},"content":" break;"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }"},{"lineNumber":168,"author":{"gitId":"-"},"content":" }"},{"lineNumber":169,"author":{"gitId":"-"},"content":" if (!isTagValid) {"},{"lineNumber":170,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":171,"author":{"gitId":"-"},"content":" }"},{"lineNumber":172,"author":{"gitId":"-"},"content":" addressBook.setTagColour(tag, colour);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();"},{"lineNumber":174,"author":{"gitId":"-"},"content":" return isTagValid;"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {"},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" return addressBook.getTeamList();"},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code Person} backed by the internal list of"},{"lineNumber":186,"author":{"gitId":"-"},"content":" * {@code addressBook}"},{"lineNumber":187,"author":{"gitId":"-"},"content":" */"},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":""},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {"},{"lineNumber":195,"author":{"gitId":"-"},"content":" requireNonNull(predicate);"},{"lineNumber":196,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" }"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author jordancjq"},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {"},{"lineNumber":202,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {"},{"lineNumber":207,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));"},{"lineNumber":208,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":209,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":215,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":217,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {"},{"lineNumber":218,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":222,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {"},{"lineNumber":223,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":224,"author":{"gitId":"-"},"content":" }"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":227,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;"},{"lineNumber":228,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)"},{"lineNumber":229,"author":{"gitId":"-"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons);"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":28,"codeeong":7,"-":197}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String addressBookFilePath \u003d \"data/myteammanager.xml\";"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private String addressBookName \u003d \"MyTeamManager\";"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private String addressBookTheme \u003d \"DarkTheme.css\";"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean addressBookLockState \u003d false;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" private String addressBookHashedPass \u003d Hashing.sha256()"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" .hashString(\"ilikesports\", StandardCharsets.UTF_8).toString();"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" public UserPrefs() {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.setGuiSettings(500, 500, 0, 0);"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return addressBookFilePath;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddressBookName() {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressBookName;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBook() {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d true;"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBook() {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d false;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public String getAddressBookHashedPass() {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" return addressBookHashedPass;"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean getAddressBookLockState() {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return this.addressBookLockState;"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" public String getAddressBookTheme() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return addressBookTheme;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" public void setAddressBookTheme(String addressBookTheme) {"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" this.addressBookTheme \u003d addressBookTheme;"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well."},{"lineNumber":89,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)"},{"lineNumber":95,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookHashedPass, o.addressBookHashedPass)"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":102,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());"},{"lineNumber":110,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nPassword: \" + addressBookHashedPass);"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));"},{"lineNumber":114,"author":{"gitId":"-"},"content":" return sb.toString();"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":28,"codeeong":9,"-":80}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Address {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d"},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,"},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input."},{"lineNumber":19,"author":{"gitId":"-"},"content":" */"},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs an {@code Address}."},{"lineNumber":27,"author":{"gitId":"-"},"content":" *"},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @param address A valid address."},{"lineNumber":29,"author":{"gitId":"-"},"content":" */"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Address(String address) {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(address);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" checkArgument(isValidAddress(address), MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d address;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" public Address(String address, boolean isPrivate) {"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" this(address);"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Address\u003e\";"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls"},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":73}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.nio.file.Files;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.nio.file.Path;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.nio.file.Paths;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.nio.file.StandardCopyOption;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s avatar in the address book. Contains filepath to avatar image file."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAvatar(String)}"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class Avatar {"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d"},{"lineNumber":26,"author":{"gitId":"-"},"content":" \"Please specify the absolute filepath for the avatar image eg. av/C:\\\\image.png\\n (for Windows), \""},{"lineNumber":27,"author":{"gitId":"-"},"content":" + \"av//User/username/path/to/image.jpg (for MacOS). \""},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"Image file should be 200x200 and in jpg or png format\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String AVATAR_VALIDATION_PATTERN \u003d \"([^\\\\s]+(\\\\.(?i)(jpg|png))$)\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private String value;"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Constructs an {@code Avatar}."},{"lineNumber":36,"author":{"gitId":"-"},"content":" *"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @param avatar A valid avatar."},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":" public Avatar(String avatar) {"},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(avatar);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" checkArgument(isValidAvatar(avatar), MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.value \u003d avatar;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s avatar."},{"lineNumber":47,"author":{"gitId":"-"},"content":" */"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidAvatar(String test) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" Pattern pattern \u003d Pattern.compile(AVATAR_VALIDATION_PATTERN);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" Matcher matcher \u003d pattern.matcher(test);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return matcher.matches() || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls"},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" */"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Copies the image file from file path entered into images/ and renames it as [name].png"},{"lineNumber":70,"author":{"gitId":"-"},"content":" * and saves the file path in value"},{"lineNumber":71,"author":{"gitId":"-"},"content":" * @param player player\u0027s avatar image filepath string"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * @throws IOException thrown when file not found"},{"lineNumber":73,"author":{"gitId":"-"},"content":" */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setFilePath(String player) throws IOException {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":" final File file \u003d new File(value);"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();"},{"lineNumber":81,"author":{"gitId":"-"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any"},{"lineNumber":82,"author":{"gitId":"-"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.value \u003d dest.toString();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" public String getValue() {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public static void setUpPlaceholderForTest() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" Files.copy(Avatar.class.getResourceAsStream(\"/images/placeholder_test.png\"),"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" Paths.get(\"images/placeholder_test.png\"), StandardCopyOption.REPLACE_EXISTING);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (IOException e) {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" LogsCenter.getLogger(Avatar.class).warning(\"placeholder image file missing\");"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":" }"},{"lineNumber":98,"author":{"gitId":"-"},"content":""},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":100,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":102,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls"},{"lineNumber":103,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":107,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":108,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":108}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s email in the address book."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Email {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" private static final String SPECIAL_CHARACTERS \u003d \"!#$%\u0026\u0027*+/\u003d?`{|}~^.-\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d \"Person emails should be of the format local-part@domain \""},{"lineNumber":14,"author":{"gitId":"-"},"content":" + \"and adhere to the following constraints:\\n\""},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"1. The local-part should only contain alphanumeric characters and these special characters, excluding \""},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the parentheses, (\" + SPECIAL_CHARACTERS + \") .\\n\""},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"2. This is followed by a \u0027@\u0027 and then a domain name. \""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"The domain name must:\\n\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \" - be at least 2 characters long\\n\""},{"lineNumber":20,"author":{"gitId":"-"},"content":" + \" - start and end with alphanumeric characters\\n\""},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \" - consist of alphanumeric characters, a period or a hyphen for the characters in between, if any.\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" // alphanumeric and special characters"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String LOCAL_PART_REGEX \u003d \"^[\\\\w\" + SPECIAL_CHARACTERS + \"]+\";"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String DOMAIN_FIRST_CHARACTER_REGEX \u003d \"[^\\\\W_]\"; // alphanumeric characters except underscore"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String DOMAIN_MIDDLE_REGEX \u003d \"[a-zA-Z0-9.-]*\"; // alphanumeric, period and hyphen"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String DOMAIN_LAST_CHARACTER_REGEX \u003d \"[^\\\\W_]$\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d LOCAL_PART_REGEX + \"@\""},{"lineNumber":28,"author":{"gitId":"-"},"content":" + DOMAIN_FIRST_CHARACTER_REGEX + DOMAIN_MIDDLE_REGEX + DOMAIN_LAST_CHARACTER_REGEX;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Constructs an {@code Email}."},{"lineNumber":35,"author":{"gitId":"-"},"content":" *"},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @param email A valid email address."},{"lineNumber":37,"author":{"gitId":"-"},"content":" */"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public Email(String email) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" requireNonNull(email);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" checkArgument(isValidEmail(email), MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.value \u003d email;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" public Email(String email, boolean isPrivate) {"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" this(email);"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" return test.matches(EMAIL_VALIDATION_REGEX);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Email\u003e\";"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":78,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":80,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls"},{"lineNumber":81,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":81}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book."},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}"},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Phone {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":18,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Constructs a {@code Phone}."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @param phone A valid phone number."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" requireNonNull(phone);"},{"lineNumber":27,"author":{"gitId":"-"},"content":" checkArgument(isValidPhone(phone), MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" this.value \u003d phone;"},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" public Phone(String phone, boolean isPrivate) {"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" this(phone);"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number."},{"lineNumber":39,"author":{"gitId":"-"},"content":" */"},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Phone\u003e\";"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls"},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":68}},{"path":"src/main/java/seedu/address/model/person/Rating.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"//@@author lithiumlkid"},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s rating in the address book."},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRating(String)}"},{"lineNumber":11,"author":{"gitId":"-"},"content":" */"},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class Rating {"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_RATING_CONSTRAINTS \u003d"},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Player\u0027s rating should be an integer from 0 - 5.\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String RATING_VALIDATION_REGEX \u003d \"[0-5]\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean isPrivate;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs an {@code Rating}."},{"lineNumber":24,"author":{"gitId":"-"},"content":" *"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param rating A valid rating."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Rating(String rating) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(rating);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidRating(rating), MESSAGE_RATING_CONSTRAINTS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.value \u003d rating;"},{"lineNumber":31,"author":{"gitId":"-"},"content":" }"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public Rating(String rating, boolean isPrivate) {"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this(rating);"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s rating."},{"lineNumber":40,"author":{"gitId":"-"},"content":" */"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static boolean isValidRating(String test) {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" return test.matches(RATING_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Rating\u003e\";"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void togglePrivacy() {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":68,"author":{"gitId":"-"},"content":" || (other instanceof Rating // instanceof handles nulls"},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Rating) other).value)); // state check"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":75,"author":{"gitId":"-"},"content":" }"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":21,"-":56}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s remark in the address book."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is always valid}"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Remark {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_REMARK_CONSTRAINTS \u003d"},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Remark can contain any values, can even be blank\";"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" public final String value;"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private boolean isPrivate;"},{"lineNumber":17,"author":{"gitId":"-"},"content":""},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Constructs a {@code Remark}"},{"lineNumber":20,"author":{"gitId":"-"},"content":" *"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @param remark Any remark"},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Remark(String remark) {"},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(remark);"},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.value \u003d remark;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;"},{"lineNumber":27,"author":{"gitId":"-"},"content":" }"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" public Remark(String remark, boolean isPrivate) {"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" this(remark);"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" if (isPrivate) {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Remarks\u003e\";"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":" return value;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"-"},"content":""},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void togglePrivacy() {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof Remark // instanceof handles nulls"},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" return value.hashCode();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":8,"-":57}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collection;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.Comparator;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import java.util.Iterator;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":21,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls."},{"lineNumber":22,"author":{"gitId":"-"},"content":" *"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations."},{"lineNumber":24,"author":{"gitId":"-"},"content":" *"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)"},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument."},{"lineNumber":34,"author":{"gitId":"-"},"content":" */"},{"lineNumber":35,"author":{"gitId":"-"},"content":" public boolean contains(Person toCheck) {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Adds a person to the list."},{"lineNumber":42,"author":{"gitId":"-"},"content":" *"},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list."},{"lineNumber":44,"author":{"gitId":"-"},"content":" */"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void add(Person toAdd) throws DuplicatePersonException {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":" internalList.add(toAdd);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}."},{"lineNumber":55,"author":{"gitId":"-"},"content":" *"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list."},{"lineNumber":57,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list."},{"lineNumber":58,"author":{"gitId":"-"},"content":" */"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void setPerson(Person target, Person editedPerson)"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {"},{"lineNumber":65,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" }"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" internalList.set(index, editedPerson);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list."},{"lineNumber":77,"author":{"gitId":"-"},"content":" *"},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list."},{"lineNumber":79,"author":{"gitId":"-"},"content":" */"},{"lineNumber":80,"author":{"gitId":"-"},"content":" public boolean remove(Person toRemove) throws PersonNotFoundException {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);"},{"lineNumber":83,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {"},{"lineNumber":94,"author":{"gitId":"-"},"content":" requireAllNonNull(persons);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();"},{"lineNumber":96,"author":{"gitId":"-"},"content":" for (final Person person : persons) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" replacement.add(person);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":" setPersons(replacement);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e asObservableList() {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(internalList);"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" * Sorts players by selected field in asc or desc order."},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" * @return"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" public void sortBy(String field, String order) throws NoPlayerException {"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" if (internalList.size() \u003c 1) {"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" throw new NoPlayerException();"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);"},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e jerseyComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" return p1.getJerseyNumber().value.compareTo(p2.getJerseyNumber().value);"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e ratingComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" return p1.getRating().toString().compareTo(p2.getRating().toString());"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e posComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" return p1.getPosition().value.compareTo(p2.getPosition().value);"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e emailComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" return p1.getEmail().toString().compareTo(p2.getEmail().toString());"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e addressComparator \u003d new Comparator\u003cPerson\u003e() {"},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" return p1.getAddress().toString().compareTo(p2.getAddress().toString());"},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" };"},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" switch (field) {"},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case \"name\":"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case \"jersey\":"},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d jerseyComparator;"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" case \"pos\":"},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d posComparator;"},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" case \"rating\":"},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d ratingComparator;"},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" case \"email\":"},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d emailComparator;"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" case \"address\":"},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d addressComparator;"},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":" switch (order) {"},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":"},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);"},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":"},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));"},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");"},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" //@@author"},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":208,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {"},{"lineNumber":209,"author":{"gitId":"-"},"content":" return internalList.iterator();"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":213,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":214,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":215,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls"},{"lineNumber":216,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":220,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":221,"author":{"gitId":"-"},"content":" return internalList.hashCode();"},{"lineNumber":222,"author":{"gitId":"-"},"content":" }"},{"lineNumber":223,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":105,"-":118}},{"path":"src/main/java/seedu/address/model/person/exceptions/NoPlayerException.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.model.person.exceptions;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":" * Singals that the operation is unable to sort due to no players in book."},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"public class NoPlayerException extends Exception {"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":7}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book."},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}"},{"lineNumber":9,"author":{"gitId":"-"},"content":" */"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Tag {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be a string\";"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_COLOUR_CONSTRAINTS \u003d \"Tag colours should be one of these colours:\""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" + \"teal, red, yellow, blue, orange, brown, green, pink, black, grey\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private static final String[] TAG_COLOR_STYLES \u003d"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" { \"teal\", \"red\", \"yellow\", \"blue\", \"orange\", \"brown\", \"green\", \"pink\", \"black\", \"grey\" };"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String tagName;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" private String tagColour;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs a {@code Tag}."},{"lineNumber":24,"author":{"gitId":"-"},"content":" *"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param tagName A valid tag name."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Tag(String tagName) {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(tagName);"},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Overloaded constructor for a {@code Tag}."},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" * @param tagName A valid tag name"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" * @param tagColour A valid tag colour."},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" public Tag(String tagName, String tagColour) {"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" requireNonNull(tagName);"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" public String getTagName() {"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" return this.tagName;"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag name."},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagName(String test) {"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return test.matches(TAG_VALIDATION_REGEX);"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public String getTagColour() {"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" return this.tagColour;"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" * Changes the {@code tagColour} for {@code tagName}\u0027s label"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" public void changeTagColour(String colour) {"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d colour;"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag colour."},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagColour(String testColour) {"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (String tcs : TAG_COLOR_STYLES) {"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (testColour.equals(tcs)) {"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" return true;"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" return false;"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object"},{"lineNumber":87,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls"},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":92,"author":{"gitId":"-"},"content":" public int hashCode() {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" return tagName.hashCode();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":97,"author":{"gitId":"-"},"content":" * Format state as text for viewing."},{"lineNumber":98,"author":{"gitId":"-"},"content":" */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public String toString() {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":54,"-":49}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data."},{"lineNumber":26,"author":{"gitId":"-"},"content":" */"},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class SampleDataUtil {"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new Person[] {"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Aaron Ramsey\"), new Phone(\"87438807\"), new Email(\"aramsey@example.com\"),"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), new Remark(\"Sign him for one more year\"),"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"),"},{"lineNumber":34,"author":{"gitId":"-"},"content":" getTagSet(\"redCard\"), new Rating(\"3\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":35,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Hector Moruno\"), new Phone(\"99272758\"), new Email(\"hectorm@example.com\"),"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":39,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cesc Fabregas\"), new Phone(\"93210283\"), new Email(\"cescfabregas@example.com\"),"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":42,"author":{"gitId":"-"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":43,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ospina\"), new Phone(\"99272758\"), new Email(\"Ospina@arsenal.com\"),"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"22\"),"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cech\"), new Phone(\"93210283\"), new Email(\"cech@arsenal.com\"),"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mertesacker\"), new Phone(\"95432223\"), new Email(\"mertesacker@arsenal.com\"),"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Koscielny\"), new Phone(\"92352021\"), new Email(\"koscielny@example.com\"),"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Holding\"), new Phone(\"92624417\"), new Email(\"holding@example.com\"),"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Monreal\"), new Phone(\"99272758\"), new Email(\"monreal@arsenal.com\"),"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mustafi\"), new Phone(\"93215483\"), new Email(\"mustafi@arsenal.com\"),"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"4\"),"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"91031282\"), new Email(\"chambers@arsenal.com\"),"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"92492021\"), new Email(\"chambers@arsenal.com\"),"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":88,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),"},{"lineNumber":89,"author":{"gitId":"-"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),"},{"lineNumber":90,"author":{"gitId":"-"},"content":" new TeamName(\"Chelsea\"), getTagSet(\"injured\"),"},{"lineNumber":91,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":92,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Irfan Fandi\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":96,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":97,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mavropanos\"), new Phone(\"92624417\"), new Email(\"mavropanos@arsenal.com\"),"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),"},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"98\"),"},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Kolasinac\"), new Phone(\"99272758\"), new Email(\"kolasinac@arsenal.com\"),"},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"2\"), new JerseyNumber(\"52\"),"},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mkhitaryan\"), new Phone(\"93210283\"), new Email(\"mkhitaryan@arsenal.com\"),"},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Wilshere\"), new Phone(\"95432223\"), new Email(\"wilshere@arsenal.com\"),"},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),"},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),"},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),"},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ozil\"), new Phone(\"92352021\"), new Email(\"ozil@example.com\"),"},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),"},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),"},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Xhaka\"), new Phone(\"92624417\"), new Email(\"xhaka@example.com\"),"},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),"},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),"},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),"},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":125,"author":{"gitId":"-"},"content":" };"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":129,"author":{"gitId":"-"},"content":" public static Team[] getSampleTeams() {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" return new Team[] {"},{"lineNumber":131,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Arsenal\")),"},{"lineNumber":132,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Chelsea\"))"},{"lineNumber":133,"author":{"gitId":"-"},"content":" };"},{"lineNumber":134,"author":{"gitId":"-"},"content":" }"},{"lineNumber":135,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {"},{"lineNumber":138,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();"},{"lineNumber":140,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":141,"author":{"gitId":"-"},"content":" for (Team sampleTeam : getSampleTeams()) {"},{"lineNumber":142,"author":{"gitId":"-"},"content":" sampleAb.createTeam(sampleTeam);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":145,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);"},{"lineNumber":147,"author":{"gitId":"-"},"content":" sampleAb.addPersonToTeam(samplePerson, samplePerson.getTeamName());"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }"},{"lineNumber":149,"author":{"gitId":"-"},"content":" return sampleAb;"},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);"},{"lineNumber":152,"author":{"gitId":"codeeong"},"content":" } catch (DuplicateTeamException e) {"},{"lineNumber":153,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\" sample data cannot contain duplicate teams\", e);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given."},{"lineNumber":159,"author":{"gitId":"-"},"content":" */"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();"},{"lineNumber":162,"author":{"gitId":"-"},"content":" for (String s : strings) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));"},{"lineNumber":164,"author":{"gitId":"-"},"content":" }"},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" return tags;"},{"lineNumber":167,"author":{"gitId":"-"},"content":" }"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":86,"-":83}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Person\u0027s %s field is missing!\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String name;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":35,"author":{"gitId":"-"},"content":" private String phone;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Boolean phonePrivacy;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private String email;"},{"lineNumber":40,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Boolean emailPrivacy;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":43,"author":{"gitId":"-"},"content":" private String address;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Boolean addressPrivacy;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private String remark;"},{"lineNumber":48,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Boolean remarkPrivacy;"},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private String teamName;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private String rating;"},{"lineNumber":54,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" private Boolean ratingPrivacy;"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":57,"author":{"gitId":"-"},"content":" private String position;"},{"lineNumber":58,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private String jerseyNumber;"},{"lineNumber":60,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":61,"author":{"gitId":"-"},"content":" private String avatar;"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":64,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson."},{"lineNumber":68,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":69,"author":{"gitId":"-"},"content":" */"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":73,"author":{"gitId":"-"},"content":" * Constructs an {@code XmlAdaptedPerson} with the given person details."},{"lineNumber":74,"author":{"gitId":"-"},"content":" */"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(String name, String phone, String email, String address, List\u003cXmlAdaptedTag\u003e tagged) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" this.name \u003d name;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.phone \u003d phone;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.email \u003d email;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.address \u003d address;"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.remarkPrivacy \u003d false;"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.phonePrivacy \u003d false;"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" this.addressPrivacy \u003d false;"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" this.emailPrivacy \u003d false;"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" if (tagged !\u003d null) {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" this.tagged \u003d new ArrayList\u003c\u003e(tagged);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Converts a given Person into this class for JAXB use."},{"lineNumber":93,"author":{"gitId":"-"},"content":" *"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson"},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(Person source) {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" name \u003d source.getName().fullName;"},{"lineNumber":98,"author":{"gitId":"-"},"content":" phone \u003d source.getPhone().value;"},{"lineNumber":99,"author":{"gitId":"-"},"content":" email \u003d source.getEmail().value;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" address \u003d source.getAddress().value;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" remark \u003d source.getRemark().value;"},{"lineNumber":102,"author":{"gitId":"-"},"content":" teamName \u003d source.getTeamName().fullName;"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" phonePrivacy \u003d source.getPhone().isPrivate();"},{"lineNumber":105,"author":{"gitId":"-"},"content":" emailPrivacy \u003d source.getEmail().isPrivate();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" addressPrivacy \u003d source.getAddress().isPrivate();"},{"lineNumber":107,"author":{"gitId":"-"},"content":" remarkPrivacy \u003d source.getRemark().isPrivate();"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d source.getRating().isPrivate();"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"-"},"content":" tagged \u003d new ArrayList\u003c\u003e();"},{"lineNumber":111,"author":{"gitId":"-"},"content":" rating \u003d source.getRating().value;"},{"lineNumber":112,"author":{"gitId":"-"},"content":" position \u003d source.getPosition().value;"},{"lineNumber":113,"author":{"gitId":"-"},"content":" jerseyNumber \u003d source.getJerseyNumber().value;"},{"lineNumber":114,"author":{"gitId":"-"},"content":" avatar \u003d source.getAvatar().getValue();"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" for (Tag tag : source.getTags()) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" tagged.add(new XmlAdaptedTag(tag));"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object."},{"lineNumber":123,"author":{"gitId":"-"},"content":" *"},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":125,"author":{"gitId":"-"},"content":" */"},{"lineNumber":126,"author":{"gitId":"-"},"content":" public Person toModelType() throws IllegalValueException {"},{"lineNumber":127,"author":{"gitId":"-"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":128,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag tag : tagged) {"},{"lineNumber":129,"author":{"gitId":"-"},"content":" personTags.add(tag.toModelType());"},{"lineNumber":130,"author":{"gitId":"-"},"content":" }"},{"lineNumber":131,"author":{"gitId":"-"},"content":""},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" if (phonePrivacy \u003d\u003d null) {"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" phonePrivacy \u003d false;"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" if (emailPrivacy \u003d\u003d null) {"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" emailPrivacy \u003d false;"},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" if (addressPrivacy \u003d\u003d null) {"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" addressPrivacy \u003d false;"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" if (remarkPrivacy \u003d\u003d null) {"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" remarkPrivacy \u003d false;"},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" if (ratingPrivacy \u003d\u003d null) {"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d false;"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" if (this.name \u003d\u003d null) {"},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName()));"},{"lineNumber":154,"author":{"gitId":"-"},"content":" }"},{"lineNumber":155,"author":{"gitId":"-"},"content":" if (!Name.isValidName(this.name)) {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":" final Name name \u003d new Name(this.name);"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" if (this.phone \u003d\u003d null) {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName()));"},{"lineNumber":162,"author":{"gitId":"-"},"content":" }"},{"lineNumber":163,"author":{"gitId":"-"},"content":" if (!Phone.isValidPhone(this.phone)) {"},{"lineNumber":164,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":165,"author":{"gitId":"-"},"content":" }"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" final Phone phone \u003d new Phone(this.phone, this.phonePrivacy);"},{"lineNumber":167,"author":{"gitId":"-"},"content":""},{"lineNumber":168,"author":{"gitId":"-"},"content":" if (this.email \u003d\u003d null) {"},{"lineNumber":169,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName()));"},{"lineNumber":170,"author":{"gitId":"-"},"content":" }"},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (!Email.isValidEmail(this.email)) {"},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" }"},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" final Email email \u003d new Email(this.email, this.emailPrivacy);"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" if (this.address \u003d\u003d null) {"},{"lineNumber":177,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName()));"},{"lineNumber":178,"author":{"gitId":"-"},"content":" }"},{"lineNumber":179,"author":{"gitId":"-"},"content":" if (!Address.isValidAddress(this.address)) {"},{"lineNumber":180,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Address.MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" final Address address \u003d new Address(this.address, this.addressPrivacy);"},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkPrivacy);"},{"lineNumber":185,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);"},{"lineNumber":186,"author":{"gitId":"-"},"content":""},{"lineNumber":187,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" if (this.rating \u003d\u003d null) {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Rating.class.getSimpleName()));"},{"lineNumber":191,"author":{"gitId":"-"},"content":" }"},{"lineNumber":192,"author":{"gitId":"-"},"content":" if (!Rating.isValidRating(this.rating)) {"},{"lineNumber":193,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Rating.MESSAGE_RATING_CONSTRAINTS);"},{"lineNumber":194,"author":{"gitId":"-"},"content":" }"},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" final Rating rating \u003d new Rating(this.rating, this.ratingPrivacy);"},{"lineNumber":196,"author":{"gitId":"-"},"content":""},{"lineNumber":197,"author":{"gitId":"-"},"content":" if (this.position \u003d\u003d null) {"},{"lineNumber":198,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":199,"author":{"gitId":"-"},"content":" Position.class.getSimpleName()));"},{"lineNumber":200,"author":{"gitId":"-"},"content":" }"},{"lineNumber":201,"author":{"gitId":"-"},"content":" if (!Position.isValidPosition(this.position)) {"},{"lineNumber":202,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Position.MESSAGE_POSITION_CONSTRAINTS);"},{"lineNumber":203,"author":{"gitId":"-"},"content":" }"},{"lineNumber":204,"author":{"gitId":"-"},"content":" final Position position \u003d new Position(this.position);"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (this.jerseyNumber \u003d\u003d null) {"},{"lineNumber":207,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":208,"author":{"gitId":"-"},"content":" JerseyNumber.class.getSimpleName()));"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"-"},"content":" if (!JerseyNumber.isValidJerseyNumber(this.jerseyNumber)) {"},{"lineNumber":211,"author":{"gitId":"-"},"content":" throw new IllegalValueException(JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);"},{"lineNumber":212,"author":{"gitId":"-"},"content":" }"},{"lineNumber":213,"author":{"gitId":"-"},"content":" final JerseyNumber jerseyNumber \u003d new JerseyNumber(this.jerseyNumber);"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" if (this.avatar \u003d\u003d null) {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":217,"author":{"gitId":"-"},"content":" Avatar.class.getSimpleName()));"},{"lineNumber":218,"author":{"gitId":"-"},"content":" }"},{"lineNumber":219,"author":{"gitId":"-"},"content":" if (!Avatar.isValidAvatar(this.avatar)) {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Avatar.MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);"},{"lineNumber":223,"author":{"gitId":"-"},"content":" return new Person(name, phone, email, address, remark, teamName, tags, rating, position, jerseyNumber, avatar);"},{"lineNumber":224,"author":{"gitId":"-"},"content":" }"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":227,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":228,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":229,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedPerson)) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":234,"author":{"gitId":"-"},"content":" }"},{"lineNumber":235,"author":{"gitId":"-"},"content":""},{"lineNumber":236,"author":{"gitId":"-"},"content":" XmlAdaptedPerson otherPerson \u003d (XmlAdaptedPerson) other;"},{"lineNumber":237,"author":{"gitId":"-"},"content":" return Objects.equals(name, otherPerson.name)"},{"lineNumber":238,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(phone, otherPerson.phone)"},{"lineNumber":239,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(email, otherPerson.email)"},{"lineNumber":240,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(address, otherPerson.address)"},{"lineNumber":241,"author":{"gitId":"-"},"content":" \u0026\u0026 tagged.equals(otherPerson.tagged);"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }"},{"lineNumber":243,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":34,"-":209}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":9,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Tag."},{"lineNumber":10,"author":{"gitId":"-"},"content":" */"},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class XmlAdaptedTag {"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @XmlElement"},{"lineNumber":14,"author":{"gitId":"-"},"content":" private String tagName;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" @XmlElement"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String tagColour;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedTag."},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":22,"author":{"gitId":"-"},"content":" */"},{"lineNumber":23,"author":{"gitId":"-"},"content":" public XmlAdaptedTag() {}"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName}."},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" */"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(String tagName) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName} and {@code tagColour}."},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTag(String tagName, String tagColour) {"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Converts a given Tag into this class for JAXB use."},{"lineNumber":45,"author":{"gitId":"-"},"content":" *"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created"},{"lineNumber":47,"author":{"gitId":"-"},"content":" */"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(Tag source) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" tagName \u003d source.tagName;"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" tagColour \u003d source.getTagColour();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Tag object."},{"lineNumber":55,"author":{"gitId":"-"},"content":" *"},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":57,"author":{"gitId":"-"},"content":" */"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public Tag toModelType() throws IllegalValueException {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (!Tag.isValidTagName(tagName)) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" if (!Tag.isValidTagColour(tagColour)) {"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_COLOUR_CONSTRAINTS);"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" return new Tag(tagName, tagColour);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":68,"author":{"gitId":"-"},"content":""},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":71,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedTag)) {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" }"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" return tagName.equals(((XmlAdaptedTag) other).tagName);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":22,"-":59}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTeam.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Objects;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":15,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Team"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class XmlAdaptedTeam {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Team\u0027s %s field is missing!\";"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private String teamName;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" * Constructs an XmlAdaptedTeam."},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" * This is the no-arg constructor that is required by JAXB."},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam() {}"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTeam} with the given {@code teamName}."},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":" public XmlAdaptedTeam(String teamName, List\u003cXmlAdaptedPerson\u003e persons) {"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (persons !\u003d null) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.players \u003d new ArrayList\u003c\u003e(persons);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" }"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" * Converts a given Team into this class for JAXB use."},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTeam"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam(Team source) {"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" teamName \u003d source.getTeamName().toString();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" players \u003d new ArrayList\u003c\u003e();"},{"lineNumber":51,"author":{"gitId":"-"},"content":" for (Person person : source.getTeamPlayers()) {"},{"lineNumber":52,"author":{"gitId":"-"},"content":" players.add(new XmlAdaptedPerson(person));"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Team object."},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" public Team toModelType() throws IllegalValueException {"},{"lineNumber":62,"author":{"gitId":"-"},"content":" if (this.teamName \u003d\u003d null) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new IllegalValueException((String.format(MISSING_FIELD_MESSAGE_FORMAT,"},{"lineNumber":64,"author":{"gitId":"-"},"content":" TeamName.class.getSimpleName())));"},{"lineNumber":65,"author":{"gitId":"-"},"content":" }"},{"lineNumber":66,"author":{"gitId":"-"},"content":" if (!TeamName.isValidName(this.teamName)) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" throw new IllegalValueException(TeamName.MESSAGE_TEAM_NAME_CONSTRAINTS);"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" final List\u003cPerson\u003e teamPlayers \u003d new ArrayList\u003c\u003e();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson player : players) {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" teamPlayers.add(player.toModelType());"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" return new Team(teamName, teamPlayers);"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" return true;"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" if (!(other instanceof XmlAdaptedTeam)) {"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" return false;"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":" XmlAdaptedTeam otherTeam \u003d (XmlAdaptedTeam) other;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return Objects.equals(teamName, otherTeam.teamName)"},{"lineNumber":90,"author":{"gitId":"-"},"content":" \u0026\u0026 players.equals(otherTeam.players);"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":60,"-":33}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":2,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":3,"author":{"gitId":"-"},"content":""},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":16,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format"},{"lineNumber":17,"author":{"gitId":"-"},"content":" */"},{"lineNumber":18,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")"},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTeam\u003e teams;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":27,"author":{"gitId":"-"},"content":" @XmlElement"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook."},{"lineNumber":32,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling."},{"lineNumber":33,"author":{"gitId":"-"},"content":" */"},{"lineNumber":34,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {"},{"lineNumber":35,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();"},{"lineNumber":36,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();"},{"lineNumber":37,"author":{"gitId":"-"},"content":" teams \u003d new ArrayList\u003c\u003e();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Conversion"},{"lineNumber":42,"author":{"gitId":"-"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" /** @@author Codee */"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));"},{"lineNumber":48,"author":{"gitId":"-"},"content":" teams.addAll(src.getTeamList().stream().map(XmlAdaptedTeam::new).collect(Collectors.toList()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Converts this addressbook into the model\u0027s {@code AddressBook} object."},{"lineNumber":53,"author":{"gitId":"-"},"content":" *"},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated or duplicates in the"},{"lineNumber":55,"author":{"gitId":"-"},"content":" * {@code XmlAdaptedPerson} or {@code XmlAdaptedTag}."},{"lineNumber":56,"author":{"gitId":"-"},"content":" */"},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook toModelType() throws IllegalValueException {"},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBook();"},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag t : tags) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" addressBook.addTag(t.toModelType());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson p : persons) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" addressBook.addPerson(p.toModelType());"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":" for (XmlAdaptedTeam tm : teams) {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" addressBook.createTeam(tm.toModelType());"},{"lineNumber":67,"author":{"gitId":"-"},"content":" }"},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBook;"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":71,"author":{"gitId":"-"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlSerializableAddressBook)) {"},{"lineNumber":79,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook otherAb \u003d (XmlSerializableAddressBook) other;"},{"lineNumber":83,"author":{"gitId":"-"},"content":" return persons.equals(otherAb.persons) \u0026\u0026 tags.equals(otherAb.tags) \u0026\u0026 teams.equals(otherAb.teams);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" }"},{"lineNumber":85,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":83}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Menu;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.Image;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.ImageView;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.VBox;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing"},{"lineNumber":31,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed."},{"lineNumber":32,"author":{"gitId":"-"},"content":" */"},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cStage\u003e {"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private static String currentTheme \u003d \"view/DarkTheme.css\";"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" private Stage primaryStage;"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HelpWindow helpWindow;"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" private Menu mtmLogo;"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":53,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":59,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":62,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" private StackPane teamDisplayPlaceholder;"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" private VBox mainWindow;"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {"},{"lineNumber":74,"author":{"gitId":"-"},"content":" super(FXML, primaryStage);"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" // Set dependencies"},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;"},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // Configure the UI"},{"lineNumber":83,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());"},{"lineNumber":84,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" setAccelerators();"},{"lineNumber":87,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return primaryStage;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":""},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void setAccelerators() {"},{"lineNumber":95,"author":{"gitId":"-"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));"},{"lineNumber":96,"author":{"gitId":"-"},"content":" }"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem."},{"lineNumber":100,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator"},{"lineNumber":101,"author":{"gitId":"-"},"content":" */"},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" /*"},{"lineNumber":106,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here"},{"lineNumber":107,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666"},{"lineNumber":108,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK."},{"lineNumber":109,"author":{"gitId":"-"},"content":" *"},{"lineNumber":110,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will"},{"lineNumber":111,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and"},{"lineNumber":112,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by"},{"lineNumber":114,"author":{"gitId":"-"},"content":" * the TextInputControl(s)."},{"lineNumber":115,"author":{"gitId":"-"},"content":" *"},{"lineNumber":116,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open"},{"lineNumber":117,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is"},{"lineNumber":118,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay."},{"lineNumber":119,"author":{"gitId":"-"},"content":" */"},{"lineNumber":120,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {"},{"lineNumber":122,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());"},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.consume();"},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":" });"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window."},{"lineNumber":130,"author":{"gitId":"-"},"content":" */"},{"lineNumber":131,"author":{"gitId":"-"},"content":" void fillInnerParts() {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":133,"author":{"gitId":"-"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();"},{"lineNumber":134,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(currentTheme);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(\"view/Extensions.css\");"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" final Image image \u003d new Image(\"images/MyTeamManagerLogo.png\", true);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" mtmLogo.setGraphic(new ImageView(image));"},{"lineNumber":139,"author":{"gitId":"-"},"content":" mtmLogo.setDisable(true);"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":142,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());"},{"lineNumber":143,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();"},{"lineNumber":146,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"codeeong"},"content":" TeamDisplay teamDisplay \u003d new TeamDisplay(logic.getInitTeamList());"},{"lineNumber":149,"author":{"gitId":"codeeong"},"content":" teamDisplayPlaceholder.getChildren().add(teamDisplay.getRoot());"},{"lineNumber":150,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":151,"author":{"gitId":"-"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(prefs.getAddressBookFilePath());"},{"lineNumber":152,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" void hide() {"},{"lineNumber":159,"author":{"gitId":"-"},"content":" primaryStage.hide();"},{"lineNumber":160,"author":{"gitId":"-"},"content":" }"},{"lineNumber":161,"author":{"gitId":"-"},"content":""},{"lineNumber":162,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {"},{"lineNumber":163,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);"},{"lineNumber":164,"author":{"gitId":"-"},"content":" }"},{"lineNumber":165,"author":{"gitId":"-"},"content":""},{"lineNumber":166,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":167,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences."},{"lineNumber":168,"author":{"gitId":"-"},"content":" */"},{"lineNumber":169,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {"},{"lineNumber":170,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());"},{"lineNumber":171,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());"},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":" }"},{"lineNumber":177,"author":{"gitId":"-"},"content":""},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" * @returns the {@code currentTheme}."},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":" public static String getCurrentTheme() {"},{"lineNumber":183,"author":{"gitId":"codeeong"},"content":" return currentTheme;"},{"lineNumber":184,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" public void handleChangeThemeRequestEvent(ChangeThemeEvent event) throws CommandException {"},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().remove(currentTheme);"},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" prefs.setAddressBookTheme(event.theme + \"Theme.css\");"},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();"},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().add(currentTheme);"},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":194,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":197,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window."},{"lineNumber":198,"author":{"gitId":"-"},"content":" */"},{"lineNumber":199,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {"},{"lineNumber":200,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),"},{"lineNumber":201,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());"},{"lineNumber":202,"author":{"gitId":"-"},"content":" }"},{"lineNumber":203,"author":{"gitId":"-"},"content":""},{"lineNumber":204,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":205,"author":{"gitId":"-"},"content":" * Opens the help window."},{"lineNumber":206,"author":{"gitId":"-"},"content":" */"},{"lineNumber":207,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":208,"author":{"gitId":"-"},"content":" public void handleHelp() {"},{"lineNumber":209,"author":{"gitId":"-"},"content":" if (helpWindow \u003d\u003d null) {"},{"lineNumber":210,"author":{"gitId":"-"},"content":" helpWindow \u003d new HelpWindow();"},{"lineNumber":211,"author":{"gitId":"-"},"content":" }"},{"lineNumber":212,"author":{"gitId":"-"},"content":" helpWindow.show();"},{"lineNumber":213,"author":{"gitId":"-"},"content":" }"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" void show() {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" primaryStage.show();"},{"lineNumber":217,"author":{"gitId":"-"},"content":" }"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":220,"author":{"gitId":"-"},"content":" * Closes the application."},{"lineNumber":221,"author":{"gitId":"-"},"content":" */"},{"lineNumber":222,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":223,"author":{"gitId":"-"},"content":" private void handleExit() {"},{"lineNumber":224,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());"},{"lineNumber":225,"author":{"gitId":"-"},"content":" }"},{"lineNumber":226,"author":{"gitId":"-"},"content":""},{"lineNumber":227,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {"},{"lineNumber":228,"author":{"gitId":"-"},"content":" return this.personListPanel;"},{"lineNumber":229,"author":{"gitId":"-"},"content":" }"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":232,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {"},{"lineNumber":233,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":234,"author":{"gitId":"-"},"content":" handleHelp();"},{"lineNumber":235,"author":{"gitId":"-"},"content":" }"},{"lineNumber":236,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":35,"-":201}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.Iterator;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Set;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.logging.Logger;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.scene.paint.ImagePattern;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.scene.shape.Circle;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":34,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":35,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":36,"author":{"gitId":"-"},"content":" *"},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":38,"author":{"gitId":"-"},"content":" */"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public final Person person;"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonCard.class);"},{"lineNumber":42,"author":{"gitId":"-"},"content":""},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":44,"author":{"gitId":"-"},"content":" private HBox cardPane;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":46,"author":{"gitId":"-"},"content":" private Label name;"},{"lineNumber":47,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":48,"author":{"gitId":"-"},"content":" private Label id;"},{"lineNumber":49,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":50,"author":{"gitId":"-"},"content":" private Label teamName;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":52,"author":{"gitId":"-"},"content":" private FlowPane tags;"},{"lineNumber":53,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Label rating;"},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":56,"author":{"gitId":"-"},"content":" private Label position;"},{"lineNumber":57,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":58,"author":{"gitId":"-"},"content":" private Label jerseyNumber;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Circle avatar;"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" public PersonCard(Person person, int displayedIndex) {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" this.person \u003d person;"},{"lineNumber":65,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");"},{"lineNumber":66,"author":{"gitId":"-"},"content":" name.setText(person.getName().fullName);"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" rating.setText(person.getRating().toString());"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" rating.setText(person.getRating().value);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" teamName.setText(person.getTeamName().fullName);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" position.setText(person.getPosition().getPositionName());"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" initTags(person);"},{"lineNumber":75,"author":{"gitId":"-"},"content":" setContactImage(person.getAvatar().getValue());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void setContactImage(String path) {"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" Image img \u003d null;"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (new File(path).isFile()) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" img \u003d new Image(new File(path).toURI().toURL().toString());"},{"lineNumber":86,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":87,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":" } catch (MalformedURLException e) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":" avatar.setVisible(true);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" avatar.setFill(new ImagePattern(img));"},{"lineNumber":94,"author":{"gitId":"-"},"content":" avatar.setVisible(true);"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}."},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" private void initTags(Person person) {"},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" person.getTags().forEach(tag -\u003e {"},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" Label tagLabel \u003d new Label(tag.getTagName());"},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" tagLabel.getStyleClass().add(tag.getTagColour());"},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(tagLabel);"},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" });"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":110,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {"},{"lineNumber":111,"author":{"gitId":"-"},"content":" // short circuit if same object"},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" return true;"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" // instanceof handles nulls"},{"lineNumber":117,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {"},{"lineNumber":118,"author":{"gitId":"-"},"content":" return false;"},{"lineNumber":119,"author":{"gitId":"-"},"content":" }"},{"lineNumber":120,"author":{"gitId":"-"},"content":""},{"lineNumber":121,"author":{"gitId":"-"},"content":" // state check"},{"lineNumber":122,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;"},{"lineNumber":123,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())"},{"lineNumber":124,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" }"},{"lineNumber":126,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */"},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" public void handleColourChangeEvent(ChangeTagColourEvent event) {"},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":131,"author":{"gitId":"codeeong"},"content":" Set\u003cTag\u003e tagSet \u003d person.getTags();"},{"lineNumber":132,"author":{"gitId":"codeeong"},"content":" int i \u003d 0;"},{"lineNumber":133,"author":{"gitId":"codeeong"},"content":" for (Iterator\u003cTag\u003e it \u003d tagSet.iterator(); it.hasNext();) {"},{"lineNumber":134,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d it.next();"},{"lineNumber":135,"author":{"gitId":"codeeong"},"content":" if (tag.getTagName().equals(event.tagName)) {"},{"lineNumber":136,"author":{"gitId":"codeeong"},"content":" tags.getChildren().remove(i);"},{"lineNumber":137,"author":{"gitId":"codeeong"},"content":" Label newTagLabel \u003d new Label(event.tagName);"},{"lineNumber":138,"author":{"gitId":"codeeong"},"content":" newTagLabel.getStyleClass().add(event.tagColour);"},{"lineNumber":139,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(i, newTagLabel);"},{"lineNumber":140,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":141,"author":{"gitId":"codeeong"},"content":" i++;"},{"lineNumber":142,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":143,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":5,"codeeong":42,"-":97}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.StackPane;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":21,"author":{"gitId":"-"},"content":""},{"lineNumber":22,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Panel containing the list of persons."},{"lineNumber":24,"author":{"gitId":"-"},"content":" */"},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private PlayerDetails playerDetails;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Integer selectedCardIndex;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private StackPane playerDetailsPlaceholder;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cPerson\u003e personList) {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" super(FXML);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" setConnections(personList);"},{"lineNumber":41,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cPerson\u003e personList) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map("},{"lineNumber":46,"author":{"gitId":"-"},"content":" personList, (person) -\u003e new PersonCard(person, personList.indexOf(person) + 1));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());"},{"lineNumber":49,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().clear();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");"},{"lineNumber":58,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" playerDetails \u003d new PlayerDetails(newValue.person);"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" }"},{"lineNumber":62,"author":{"gitId":"-"},"content":" });"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it."},{"lineNumber":67,"author":{"gitId":"-"},"content":" */"},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);"},{"lineNumber":71,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" this.selectedCardIndex \u003d index;"},{"lineNumber":73,"author":{"gitId":"-"},"content":" });"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":79,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":84,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedNoParamEvent(PersonDetailsChangedNoParamEvent event) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":86,"author":{"gitId":"-"},"content":" PersonCard newPersonCard \u003d personListView.getItems().get(selectedCardIndex);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().clear();"},{"lineNumber":88,"author":{"gitId":"-"},"content":" playerDetails \u003d new PlayerDetails(newPersonCard.person);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":" //@author"},{"lineNumber":92,"author":{"gitId":"-"},"content":""},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}."},{"lineNumber":95,"author":{"gitId":"-"},"content":" */"},{"lineNumber":96,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":99,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" setGraphic(null);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" setText(null);"},{"lineNumber":105,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":12,"-":98}},{"path":"src/main/java/seedu/address/ui/PlayerDetails.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.HBox;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" * The Browser Panel of the App."},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX."},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * or an exception will be thrown by JavaFX during runtime."},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public final Person person;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Person personBeforeChange;"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private HBox cardPane;"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private Label name;"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" private Label phone;"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" private Label address;"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private Label email;"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private Label jerseyNumber;"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" private Label remark;"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public PlayerDetails(Person person) {"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" super(FXML);"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" this.person \u003d person;"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" name.setText(person.getName().fullName);"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" jerseyNumber.setText(\"Jersey Number: \" + person.getJerseyNumber().value);"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().toString());"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().value);"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().toString());"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().value);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().toString());"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().value);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().toString());"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().value);"},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" personBeforeChange \u003d this.person;"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":83,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {"},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (event.getPerson().getName().fullName.equals(person.getName().fullName)) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" name.setText((event.getPerson().getName().toString()));"},{"lineNumber":86,"author":{"gitId":"-"},"content":" phone.setText(event.getPerson().getPhone().toString());"},{"lineNumber":87,"author":{"gitId":"-"},"content":" jerseyNumber.setText(\"Jersey Number: \" + event.getPerson().getJerseyNumber().toString());"},{"lineNumber":88,"author":{"gitId":"-"},"content":" address.setText(event.getPerson().getAddress().toString());"},{"lineNumber":89,"author":{"gitId":"-"},"content":" email.setText(event.getPerson().getEmail().toString());"},{"lineNumber":90,"author":{"gitId":"-"},"content":" remark.setText(\"Remarks: \" + event.getPerson().getRemark().toString());"},{"lineNumber":91,"author":{"gitId":"-"},"content":" }"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"-"},"content":"}"},{"lineNumber":94,"author":{"gitId":"-"},"content":""}],"authorContributionMap":{"lohtianwei":34,"codeeong":46,"-":14}},{"path":"src/main/java/seedu/address/ui/TeamDisplay.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.FlowPane;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * A ui for displaying the team currently chosen"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(TeamDisplay.class);"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";"},{"lineNumber":32,"author":{"gitId":"-"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private FlowPane teams;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public TeamDisplay(ObservableList\u003cTeam\u003e teamList) {"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" super(FXML);"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.teamList \u003d teamList;"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" initTeams();"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" getTeams();"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}."},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void initTeams() {"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" for (Team t: this.teamList) {"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" Label teamLabel \u003d new Label(t.getTeamName().toString());"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" teamLabel.setStyle(\"-fx-text-fill: #3f7bbf\");"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(teamLabel);"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" teams.setHgap(10);"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e listOfTeams \u003d FXCollections.observableArrayList();"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" for (Team t: teamList) {"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" listOfTeams.add(t.getTeamName().toString());"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return listOfTeams;"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(newTeamLabel);"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (event.teamName.equals(teamList.get(i).getTeamName().toString())) {"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass().add(\"selected\");"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" } else {"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleRemoveSelectedTeamEvent(RemoveSelectedTeamEvent event) {"},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":103,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c teams.getChildren().size(); i++) {"},{"lineNumber":104,"author":{"gitId":"-"},"content":" if (teamList.get(i).getTeamName().equals(event.teamName)) {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" teams.getChildren().remove(i);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":" }"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" private void handleClearTeamsEvent(ClearTeamsEvent event) {"},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();"},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" @Subscribe"},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" private void handleUndoTeamsEvent(UndoTeamsEvent event) {"},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();"},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" initTeams();"},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" getTeams();"},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":"}"},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":109,"-":15}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private static final String ICON_APPLICATION \u003d \"/images/football.png\";"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;"},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;"},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;"},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;"},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;"},{"lineNumber":45,"author":{"gitId":"-"},"content":" }"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" //Set the application icon."},{"lineNumber":52,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts"},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (Throwable e) {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));"},{"lineNumber":61,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void stop() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" mainWindow.hide();"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();"},{"lineNumber":73,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {"},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));"},{"lineNumber":78,"author":{"gitId":"-"},"content":" }"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {"},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" }"},{"lineNumber":83,"author":{"gitId":"-"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters."},{"lineNumber":86,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog."},{"lineNumber":87,"author":{"gitId":"-"},"content":" */"},{"lineNumber":88,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,"},{"lineNumber":89,"author":{"gitId":"-"},"content":" String contentText) {"},{"lineNumber":90,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");"},{"lineNumber":92,"author":{"gitId":"-"},"content":" alert.initOwner(owner);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" alert.setTitle(title);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);"},{"lineNumber":95,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.showAndWait();"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));"},{"lineNumber":106,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Platform.exit();"},{"lineNumber":108,"author":{"gitId":"-"},"content":" System.exit(1);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"lineNumber":112,"author":{"gitId":"-"},"content":""},{"lineNumber":113,"author":{"gitId":"-"},"content":" @Subscribe"},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {"},{"lineNumber":115,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));"},{"lineNumber":116,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,"},{"lineNumber":117,"author":{"gitId":"-"},"content":" event.exception);"},{"lineNumber":118,"author":{"gitId":"-"},"content":" }"},{"lineNumber":119,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/guitests/guihandles/MainWindowHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Provides a handle for {@code MainWindow}."},{"lineNumber":7,"author":{"gitId":"-"},"content":" */"},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class MainWindowHandle extends StageHandle {"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":" private final PersonListPanelHandle personListPanel;"},{"lineNumber":11,"author":{"gitId":"-"},"content":" private final ResultDisplayHandle resultDisplay;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" private final TeamDisplayHandle teamDisplayBar;"},{"lineNumber":13,"author":{"gitId":"-"},"content":" private final CommandBoxHandle commandBox;"},{"lineNumber":14,"author":{"gitId":"-"},"content":" private final StatusBarFooterHandle statusBarFooter;"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private final MainMenuHandle mainMenu;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public MainWindowHandle(Stage stage) {"},{"lineNumber":18,"author":{"gitId":"-"},"content":" super(stage);"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanelHandle(getChildNode(PersonListPanelHandle.PERSON_LIST_VIEW_ID));"},{"lineNumber":21,"author":{"gitId":"-"},"content":" resultDisplay \u003d new ResultDisplayHandle(getChildNode(ResultDisplayHandle.RESULT_DISPLAY_ID));"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" teamDisplayBar \u003d new TeamDisplayHandle(getChildNode(TeamDisplayHandle.TEAM_DISPLAY_ID));"},{"lineNumber":23,"author":{"gitId":"-"},"content":" commandBox \u003d new CommandBoxHandle(getChildNode(CommandBoxHandle.COMMAND_INPUT_FIELD_ID));"},{"lineNumber":24,"author":{"gitId":"-"},"content":" statusBarFooter \u003d new StatusBarFooterHandle(getChildNode(StatusBarFooterHandle.STATUS_BAR_PLACEHOLDER));"},{"lineNumber":25,"author":{"gitId":"-"},"content":" mainMenu \u003d new MainMenuHandle(getChildNode(MainMenuHandle.MENU_BAR_ID));"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" return personListPanel;"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return resultDisplay;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return commandBox;"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return statusBarFooter;"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return mainMenu;"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":46}},{"path":"src/test/java/guitests/guihandles/PersonCardHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.scene.Node;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Provides a handle to a person card in the person list panel."},{"lineNumber":12,"author":{"gitId":"-"},"content":" */"},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class PersonCardHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String TAGS_FIELD_ID \u003d \"#tags\";"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private static final String RATING_FIELD_ID \u003d \"#rating\";"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private static final String POSITION_FIELD_ID \u003d \"#position\";"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String TEAMNAME_FIELD_ID \u003d \"#teamName\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label idLabel;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label nameLabel;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private final Label positionLabel;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private final Label ratingLabel;"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final Label teamNameLabel;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final List\u003cLabel\u003e tagLabels;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" public PersonCardHandle(Node cardNode) {"},{"lineNumber":30,"author":{"gitId":"-"},"content":" super(cardNode);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" this.positionLabel \u003d getChildNode(POSITION_FIELD_ID);"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" this.ratingLabel \u003d getChildNode(RATING_FIELD_ID);"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" this.teamNameLabel \u003d getChildNode(TEAMNAME_FIELD_ID);"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" Region tagsContainer \u003d getChildNode(TAGS_FIELD_ID);"},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.tagLabels \u003d tagsContainer"},{"lineNumber":40,"author":{"gitId":"-"},"content":" .getChildrenUnmodifiable()"},{"lineNumber":41,"author":{"gitId":"-"},"content":" .stream()"},{"lineNumber":42,"author":{"gitId":"-"},"content":" .map(Label.class::cast)"},{"lineNumber":43,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String getId() {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" return idLabel.getText();"},{"lineNumber":48,"author":{"gitId":"-"},"content":" }"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String getName() {"},{"lineNumber":51,"author":{"gitId":"-"},"content":" return nameLabel.getText();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" }"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public String getPosition() {"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return positionLabel.getText();"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public String getRating() {"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return ratingLabel.getText();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" }"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" public String getTeamName() {"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return teamNameLabel.getText();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" }"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" public List\u003cString\u003e getTags() {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" return tagLabels"},{"lineNumber":68,"author":{"gitId":"-"},"content":" .stream()"},{"lineNumber":69,"author":{"gitId":"-"},"content":" .map(Label::getText)"},{"lineNumber":70,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" }"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTagStyleClasses(String tag) {"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" return tagLabels"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" .stream()"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" .filter(label -\u003e label.getText().equals(tag))"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" .map(Label::getStyleClass)"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" .findFirst()"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" .orElseThrow(() -\u003e new IllegalArgumentException(\"No such tag.\"));"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":25,"-":56}},{"path":"src/test/java/guitests/guihandles/PlayerDetailsHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Provides a handle to a player details pane."},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class PlayerDetailsHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String PLAYER_DETAILS_DISPLAY_ID \u003d \"#playerDetails\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";"},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String JERSEY_FIELD_ID \u003d \"#jerseyNumber\";"},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String PHONE_FIELD_ID \u003d \"#phone\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" private static final String EMAIL_FIELD_ID \u003d \"#email\";"},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String ADDRESS_FIELD_ID \u003d \"#address\";"},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String REMARK_FIELD_ID \u003d \"#remark\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label nameLabel;"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label jerseyLabel;"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private final Label addressLabel;"},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Label phoneLabel;"},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final Label emailLabel;"},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final Label remarkLabel;"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PlayerDetailsHandle(Node cardNode) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" super(cardNode);"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.phoneLabel \u003d getChildNode(PHONE_FIELD_ID);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.addressLabel \u003d getChildNode(ADDRESS_FIELD_ID);"},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.emailLabel \u003d getChildNode(EMAIL_FIELD_ID);"},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.remarkLabel \u003d getChildNode(REMARK_FIELD_ID);"},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.jerseyLabel \u003d getChildNode(JERSEY_FIELD_ID);"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getPhone() {"},{"lineNumber":41,"author":{"gitId":"-"},"content":" return phoneLabel.getText();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" public String getName() {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" return nameLabel.getText();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" }"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddress() {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressLabel.getText();"},{"lineNumber":50,"author":{"gitId":"-"},"content":" }"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" public String getJerseyNumber() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" return jerseyLabel.getText().substring(15);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" }"},{"lineNumber":55,"author":{"gitId":"-"},"content":""},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getRemarks() {"},{"lineNumber":57,"author":{"gitId":"-"},"content":" return remarkLabel.getText().substring(9);"},{"lineNumber":58,"author":{"gitId":"-"},"content":" }"},{"lineNumber":59,"author":{"gitId":"-"},"content":""},{"lineNumber":60,"author":{"gitId":"-"},"content":" public String getEmail() {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" return emailLabel.getText();"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":8,"-":56}},{"path":"src/test/java/guitests/guihandles/TeamDisplayHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Collectors;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" * Provides a handle for {@code TeamDisplayHandle} containing the list of {@code Teams}."},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayHandle extends NodeHandle\u003cNode\u003e {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String TEAM_DISPLAY_ID \u003d \"#teams\";"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private final List\u003cLabel\u003e teamLabels;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public TeamDisplayHandle(Node teamDisplayNode) {"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" super(teamDisplayNode);"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" Region teamContainer \u003d getChildNode(TEAM_DISPLAY_ID);"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" this.teamLabels \u003d teamContainer"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" .getChildrenUnmodifiable()"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" .stream()"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" .map(Label.class::cast)"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" return teamLabels"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" .stream()"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" .map(Label::getText)"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":37}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":10,"author":{"gitId":"-"},"content":""},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {"},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" String defaultConfigAsString \u003d \"App title : My Team Manager\\n\""},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\""},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());"},{"lineNumber":22,"author":{"gitId":"-"},"content":" }"},{"lineNumber":23,"author":{"gitId":"-"},"content":""},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {"},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();"},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);"},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));"},{"lineNumber":29,"author":{"gitId":"-"},"content":" }"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/XmlUtilTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Collections;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javax.xml.bind.JAXBException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedPerson;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedTag;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlSerializableAddressBook;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TestUtil;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class XmlUtilTest {"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"src/test/data/XmlUtilTest/\");"},{"lineNumber":28,"author":{"gitId":"-"},"content":" private static final File EMPTY_FILE \u003d new File(TEST_DATA_FOLDER + \"empty.xml\");"},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final File MISSING_FILE \u003d new File(TEST_DATA_FOLDER + \"missing.xml\");"},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final File VALID_FILE \u003d new File(TEST_DATA_FOLDER + \"validAddressBook.xml\");"},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final File MISSING_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"missingPersonField.xml\");"},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final File INVALID_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"invalidPersonField.xml\");"},{"lineNumber":33,"author":{"gitId":"-"},"content":" private static final File VALID_PERSON_FILE \u003d new File(TEST_DATA_FOLDER + \"validPerson.xml\");"},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final File TEMP_FILE \u003d new File(TestUtil.getFilePathInSandboxFolder(\"tempAddressBook.xml\"));"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"9482asf424\";"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Hans Muster\";"},{"lineNumber":39,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"9482424\";"},{"lineNumber":40,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"hans@example\";"},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"4th street\";"},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final List\u003cXmlAdaptedTag\u003e VALID_TAGS \u003d Collections.singletonList(new XmlAdaptedTag(\"friends\"));"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullFile_throwsNullPointerException() throws Exception {"},{"lineNumber":49,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":50,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(null, AddressBook.class);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" }"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullClass_throwsNullPointerException() throws Exception {"},{"lineNumber":55,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(VALID_FILE, null);"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void getDataFromFile_missingFile_fileNotFoundException() throws Exception {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(MISSING_FILE, AddressBook.class);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" }"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void getDataFromFile_emptyFile_dataFormatMismatchException() throws Exception {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" thrown.expect(JAXBException.class);"},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(EMPTY_FILE, AddressBook.class);"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void getDataFromFile_validFile_validResult() throws Exception {"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook dataFromFile \u003d XmlUtil.getDataFromFile(VALID_FILE, XmlSerializableAddressBook.class).toModelType();"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" assertEquals(0, dataFromFile.getTeamList().size());"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertEquals(0, dataFromFile.getTagList().size());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithMissingPersonField_validResult() throws Exception {"},{"lineNumber":80,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile("},{"lineNumber":81,"author":{"gitId":"-"},"content":" MISSING_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);"},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson("},{"lineNumber":83,"author":{"gitId":"-"},"content":" null, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" }"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithInvalidPersonField_validResult() throws Exception {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile("},{"lineNumber":90,"author":{"gitId":"-"},"content":" INVALID_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);"},{"lineNumber":91,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson("},{"lineNumber":92,"author":{"gitId":"-"},"content":" VALID_NAME, INVALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithValidPerson_validResult() throws Exception {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile("},{"lineNumber":99,"author":{"gitId":"-"},"content":" VALID_PERSON_FILE, XmlAdaptedPersonWithRootElement.class);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson("},{"lineNumber":101,"author":{"gitId":"-"},"content":" VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);"},{"lineNumber":103,"author":{"gitId":"-"},"content":" }"},{"lineNumber":104,"author":{"gitId":"-"},"content":""},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullFile_throwsNullPointerException() throws Exception {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(null, new AddressBook());"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullClass_throwsNullPointerException() throws Exception {"},{"lineNumber":113,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":114,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(VALID_FILE, null);"},{"lineNumber":115,"author":{"gitId":"-"},"content":" }"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":118,"author":{"gitId":"-"},"content":" public void saveDataToFile_missingFile_fileNotFoundException() throws Exception {"},{"lineNumber":119,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(MISSING_FILE, new AddressBook());"},{"lineNumber":121,"author":{"gitId":"-"},"content":" }"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void saveDataToFile_validFile_dataSaved() throws Exception {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" TEMP_FILE.createNewFile();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataToWrite \u003d new XmlSerializableAddressBook(new AddressBook());"},{"lineNumber":127,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);"},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);"},{"lineNumber":130,"author":{"gitId":"-"},"content":""},{"lineNumber":131,"author":{"gitId":"-"},"content":" AddressBookBuilder builder \u003d new AddressBookBuilder(new AddressBook());"},{"lineNumber":132,"author":{"gitId":"-"},"content":" dataToWrite \u003d new XmlSerializableAddressBook("},{"lineNumber":133,"author":{"gitId":"-"},"content":" builder.withPerson(new PersonBuilder().build()).withTag(\"Friends\").build());"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);"},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" }"},{"lineNumber":139,"author":{"gitId":"-"},"content":""},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Test class annotated with {@code XmlRootElement} to allow unmarshalling of .xml data to {@code XmlAdaptedPerson}"},{"lineNumber":142,"author":{"gitId":"-"},"content":" * objects."},{"lineNumber":143,"author":{"gitId":"-"},"content":" */"},{"lineNumber":144,"author":{"gitId":"-"},"content":" @XmlRootElement(name \u003d \"person\")"},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static class XmlAdaptedPersonWithRootElement extends XmlAdaptedPerson {}"},{"lineNumber":146,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":145}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddCommandTest {"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void constructor_nullPerson_throwsNullPointerException() {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":43,"author":{"gitId":"-"},"content":" new AddCommand(null);"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {"},{"lineNumber":48,"author":{"gitId":"-"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" ModelStub modelStub \u003d new ModelStubThrowingDuplicatePersonException();"},{"lineNumber":60,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();"},{"lineNumber":61,"author":{"gitId":"-"},"content":""},{"lineNumber":62,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);"},{"lineNumber":63,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);"},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different person -\u003e returns false"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person."},{"lineNumber":94,"author":{"gitId":"-"},"content":" */"},{"lineNumber":95,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {"},{"lineNumber":96,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);"},{"lineNumber":97,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":98,"author":{"gitId":"-"},"content":" return command;"},{"lineNumber":99,"author":{"gitId":"-"},"content":" }"},{"lineNumber":100,"author":{"gitId":"-"},"content":""},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":102,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing."},{"lineNumber":103,"author":{"gitId":"-"},"content":" */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":108,"author":{"gitId":"-"},"content":" }"},{"lineNumber":109,"author":{"gitId":"-"},"content":""},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {"},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" return false;"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" @Override"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return null;"},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {"},{"lineNumber":139,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":143,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":144,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":145,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" }"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void deletePerson(Person target) throws PersonNotFoundException {"},{"lineNumber":150,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":151,"author":{"gitId":"-"},"content":" }"},{"lineNumber":152,"author":{"gitId":"-"},"content":""},{"lineNumber":153,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":154,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)"},{"lineNumber":155,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {"},{"lineNumber":156,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":157,"author":{"gitId":"-"},"content":" }"},{"lineNumber":158,"author":{"gitId":"-"},"content":""},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":160,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {"},{"lineNumber":161,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":162,"author":{"gitId":"-"},"content":" return null;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" }"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":166,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {"},{"lineNumber":167,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":168,"author":{"gitId":"codeeong"},"content":" return null;"},{"lineNumber":169,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":170,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":171,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":172,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":""},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {"},{"lineNumber":178,"author":{"gitId":"-"},"content":" fail(\"This method should not be called\");"},{"lineNumber":179,"author":{"gitId":"-"},"content":" }"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {"},{"lineNumber":183,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":184,"author":{"gitId":"-"},"content":" }"},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void createTeam(Team team) {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" fail(\"This method should not be be called.\");"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":192,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {"},{"lineNumber":193,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":194,"author":{"gitId":"-"},"content":" }"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":197,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {"},{"lineNumber":198,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {"},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":204,"author":{"gitId":"-"},"content":" }"},{"lineNumber":205,"author":{"gitId":"-"},"content":""},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":207,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {"},{"lineNumber":208,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":209,"author":{"gitId":"-"},"content":" }"},{"lineNumber":210,"author":{"gitId":"-"},"content":""},{"lineNumber":211,"author":{"gitId":"codeeong"},"content":" @Override"},{"lineNumber":212,"author":{"gitId":"codeeong"},"content":" public boolean setTagColour(Tag tag, String colour) {"},{"lineNumber":213,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");"},{"lineNumber":214,"author":{"gitId":"codeeong"},"content":" return false;"},{"lineNumber":215,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":216,"author":{"gitId":"-"},"content":" }"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":219,"author":{"gitId":"-"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person."},{"lineNumber":220,"author":{"gitId":"-"},"content":" */"},{"lineNumber":221,"author":{"gitId":"-"},"content":" private class ModelStubThrowingDuplicatePersonException extends ModelStub {"},{"lineNumber":222,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":223,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":225,"author":{"gitId":"-"},"content":" }"},{"lineNumber":226,"author":{"gitId":"-"},"content":""},{"lineNumber":227,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":228,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":229,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":" }"},{"lineNumber":232,"author":{"gitId":"-"},"content":""},{"lineNumber":233,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * A Model stub that always accept the person being added."},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();"},{"lineNumber":238,"author":{"gitId":"-"},"content":""},{"lineNumber":239,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":240,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {"},{"lineNumber":241,"author":{"gitId":"-"},"content":" requireNonNull(person);"},{"lineNumber":242,"author":{"gitId":"-"},"content":" personsAdded.add(person);"},{"lineNumber":243,"author":{"gitId":"-"},"content":" }"},{"lineNumber":244,"author":{"gitId":"-"},"content":""},{"lineNumber":245,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName)"},{"lineNumber":247,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();"},{"lineNumber":249,"author":{"gitId":"-"},"content":" }"},{"lineNumber":250,"author":{"gitId":"-"},"content":""},{"lineNumber":251,"author":{"gitId":"-"},"content":" @Override"},{"lineNumber":252,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {"},{"lineNumber":253,"author":{"gitId":"-"},"content":" return new AddressBook();"},{"lineNumber":254,"author":{"gitId":"-"},"content":" }"},{"lineNumber":255,"author":{"gitId":"-"},"content":" }"},{"lineNumber":256,"author":{"gitId":"-"},"content":""},{"lineNumber":257,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":29,"codeeong":12,"-":216}},{"path":"src/test/java/seedu/address/logic/commands/ChangeThemeCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandTest {"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public void execute_validTheme_success() {"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertExecutionSuccess(listThemes[0]);"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" public void execute_invalidTheme_failure() {"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" assertExecutionFailure(\"FakeTheme\", Messages.MESSAGE_INVALID_THEME);"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public void equals() {"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand[] listThemeCommands \u003d new ChangeThemeCommand[2];"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" listThemeCommands[i] \u003d new ChangeThemeCommand(listThemes[i]);"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" // same object -\u003e returns true"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertTrue(listThemeCommands[i].equals(new ChangeThemeCommand(listThemes[i])));"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" // different types -\u003e returns false"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(1));"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" // null -\u003e returns false"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(null));"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" // different theme -\u003e returns false"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" int j \u003d 1;"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" if (i !\u003d j) {"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(listThemeCommands[j]));"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" j--;"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}."},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" private void assertExecutionSuccess(String theme) {"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" CommandResult commandResult \u003d changethemeCommand.execute();"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" assertEquals(String.format(ChangeThemeCommand.MESSAGE_THEME_SUCCESS, theme),"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" commandResult.feedbackToUser);"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);"},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}."},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" private void assertExecutionFailure(String theme, String expectedMessage) {"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" changethemeCommand.execute();"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" fail(\"The expected CommandException was not thrown.\");"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedMessage, ce.getMessage());"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":89}},{"path":"src/test/java/seedu/address/logic/commands/KeyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Before;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandTest {"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" private Model model;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" @Before"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public void start() {"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" model \u003d new ModelManager();"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public void checkKey() throws Exception {"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" //checks that default lock state is false"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" //checks that key can lock MTM"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" //checks that key can unlock MTM"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" //checks that toggling works"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":44}},{"path":"src/test/java/seedu/address/logic/commands/RemarkCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_EMPTY;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareRedoCommand;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareUndoCommand;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":"//@@author jordancjq"},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for RemarkCommand."},{"lineNumber":35,"author":{"gitId":"-"},"content":" */"},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class RemarkCommandTest {"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void execute_addRemarkUnfilteredList_success() throws Exception {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_AMY).build();"},{"lineNumber":47,"author":{"gitId":"-"},"content":""},{"lineNumber":48,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":""},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_deleteRemarkUnfilteredList_success() throws Exception {"},{"lineNumber":60,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":61,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());"},{"lineNumber":62,"author":{"gitId":"-"},"content":""},{"lineNumber":63,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);"},{"lineNumber":64,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_EMPTY).build();"},{"lineNumber":65,"author":{"gitId":"-"},"content":""},{"lineNumber":66,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_DELETE_REMARK_SUCCESS, remarkedPerson);"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);"},{"lineNumber":79,"author":{"gitId":"-"},"content":""},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":81,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personInFilteredList).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, remarkedPerson.getRemark().toString());"},{"lineNumber":84,"author":{"gitId":"-"},"content":""},{"lineNumber":85,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":88,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personInFilteredList, remarkedPerson);"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" }"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":96,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":98,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":101,"author":{"gitId":"-"},"content":" }"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Remark filtered list where index is larger than size of filtered list,"},{"lineNumber":105,"author":{"gitId":"-"},"content":" * but smaller than size of address book"},{"lineNumber":106,"author":{"gitId":"-"},"content":" */"},{"lineNumber":107,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":108,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);"},{"lineNumber":110,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;"},{"lineNumber":111,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list"},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexUnfilteredList_success() throws Exception {"},{"lineNumber":121,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);"},{"lineNumber":123,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);"},{"lineNumber":124,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":125,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_AMY).build();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" // remark -\u003e first person remarked"},{"lineNumber":130,"author":{"gitId":"-"},"content":" remarkCommand.execute();"},{"lineNumber":131,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);"},{"lineNumber":132,"author":{"gitId":"-"},"content":""},{"lineNumber":133,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" // redo -\u003e same first person remarked again"},{"lineNumber":137,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);"},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":139,"author":{"gitId":"-"},"content":" }"},{"lineNumber":140,"author":{"gitId":"-"},"content":""},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":142,"author":{"gitId":"-"},"content":" public void executeUndoRedo_invalidIndexUnfilteredList_failure() {"},{"lineNumber":143,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":144,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);"},{"lineNumber":145,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);"},{"lineNumber":146,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);"},{"lineNumber":147,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_EMPTY);"},{"lineNumber":148,"author":{"gitId":"-"},"content":""},{"lineNumber":149,"author":{"gitId":"-"},"content":" // execution failed -\u003e remarkCommand not pushed into undoRedoStack"},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" // no commands in undoRedoStack -\u003e undoCommand and redoCommand fail"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);"},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" }"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":158,"author":{"gitId":"-"},"content":" * 1. Updates {@code Person#remark} from a filtered list."},{"lineNumber":159,"author":{"gitId":"-"},"content":" * 2. Undo the update."},{"lineNumber":160,"author":{"gitId":"-"},"content":" * 3. The unfiltered list should be shown now. Verify that the index of the previously updated person in the"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * unfiltered list is different from the index at the filtered list."},{"lineNumber":162,"author":{"gitId":"-"},"content":" * 4. Redo the update. This ensures {@code RedoCommand} updates the person object regardless of indexing."},{"lineNumber":163,"author":{"gitId":"-"},"content":" */"},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":165,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexFilteredList_samePersonRemarked() throws Exception {"},{"lineNumber":166,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();"},{"lineNumber":167,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);"},{"lineNumber":168,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);"},{"lineNumber":169,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_BOB);"},{"lineNumber":170,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_SECOND_PERSON);"},{"lineNumber":173,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_BOB).build();"},{"lineNumber":175,"author":{"gitId":"-"},"content":" // remark -\u003e remarks second person in unfiltered person list / first person in filtered person list"},{"lineNumber":176,"author":{"gitId":"-"},"content":" remarkCommand.execute();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);"},{"lineNumber":178,"author":{"gitId":"-"},"content":""},{"lineNumber":179,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons"},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":181,"author":{"gitId":"-"},"content":""},{"lineNumber":182,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);"},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertNotEquals(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), personToRemark);"},{"lineNumber":184,"author":{"gitId":"-"},"content":" // redo -\u003e remarks same second person in unfiltered person list"},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);"},{"lineNumber":186,"author":{"gitId":"-"},"content":" }"},{"lineNumber":187,"author":{"gitId":"-"},"content":""},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":190,"author":{"gitId":"-"},"content":" final RemarkCommand standardCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" // same values -\u003e returns true"},{"lineNumber":193,"author":{"gitId":"-"},"content":" RemarkCommand commandWithSameValues \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);"},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));"},{"lineNumber":195,"author":{"gitId":"-"},"content":""},{"lineNumber":196,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));"},{"lineNumber":201,"author":{"gitId":"-"},"content":""},{"lineNumber":202,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":203,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));"},{"lineNumber":204,"author":{"gitId":"-"},"content":""},{"lineNumber":205,"author":{"gitId":"-"},"content":" // different index -\u003e returns false"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_SECOND_PERSON, new Remark(VALID_REMARK_AMY))));"},{"lineNumber":207,"author":{"gitId":"-"},"content":""},{"lineNumber":208,"author":{"gitId":"-"},"content":" // different remark -\u003e returns false"},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_FIRST_PERSON, new Remark(VALID_REMARK_BOB))));"},{"lineNumber":210,"author":{"gitId":"-"},"content":" }"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Returns an {@code RemarkCommand} with parameters {@code index} and {@code remark}."},{"lineNumber":214,"author":{"gitId":"-"},"content":" */"},{"lineNumber":215,"author":{"gitId":"-"},"content":" private RemarkCommand prepareCommand(Index index, String remark) {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d new RemarkCommand(index, new Remark(remark));"},{"lineNumber":217,"author":{"gitId":"-"},"content":" remarkCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":218,"author":{"gitId":"-"},"content":" return remarkCommand;"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":218}},{"path":"src/test/java/seedu/address/logic/commands/SetCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.Model;"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * This is the unit test for {@code SetCommand}."},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"public class SetCommandTest {"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private Model model;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Tag tagOne \u003d new Tag(\"testTagOne\");"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private Tag tagTwo \u003d new Tag(\"testTagTwo\");"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" @Before"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" public void setUp() {"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public void equals() {"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" SetCommand testCommand \u003d new SetCommand(tagOne, \"teal\");"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" SetCommand testCommandTwo \u003d new SetCommand(tagOne, \"teal\");"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" //Test to ensure command is strictly a SetCommand"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new AddCommand(CARL)));"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ClearCommand()));"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new DeleteCommand(INDEX_FIRST_PERSON)));"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HistoryCommand()));"},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HelpCommand()));"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new RedoCommand()));"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new UndoCommand()));"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ListCommand()));"},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_AMY)));"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" //Test to check that different tag string returns false"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagTwo, \"teal\")));"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"teal\")));"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" //Test to check that different color strings returns false"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagOne, \"red\")));"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"red\")));"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" public void checkCommandResult() throws CommandException {"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" //Check if the result message is correct when there is no tags found"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" SetCommand command \u003d new SetCommand(new Tag(\"blablabla\"), \"teal\");"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag is invalid! Please input a valid tag name!\"));"},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" //When tags is present"},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"red\");"},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" assertFalse(command.execute().feedbackToUser.equals(\"No such tag\"));"},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to red\"));"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" //Check if friends tags are set to color"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"teal\");"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to teal\"));"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" for (Tag tag : model.getAddressBook().getTagList()) {"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" if (\"friends\".equals(tag.tagName)) {"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" assertTrue(tag.getTagColour().equals(\"teal\"));"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" assertFalse(tag.getTagColour().equals(\"pink\"));"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" resetAllTagsToDefault();"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" * This method allows all tags to be set to the default colour \"teal\""},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" public void resetAllTagsToDefault() {"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTag\u003e allTags \u003d model.getAddressBook().getTagList();"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" for (Tag t : allTags) {"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(\"teal\");"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":100}},{"path":"src/test/java/seedu/address/logic/commands/SortCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_SUCCESS;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getEmptyAddressBook;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getSortedAddressBook;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandTest {"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public ExpectedException error \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" private Model emptyModel \u003d new ModelManager(getEmptyAddressBook(), new UserPrefs());"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByNameDesc \u003d new ModelManager("},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"name\", \"desc\"), new UserPrefs());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAdd \u003d new ModelManager("},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"asc\"), new UserPrefs());"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAddDesc \u003d new ModelManager("},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"desc\"), new UserPrefs());"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmail \u003d new ModelManager(getSortedAddressBook(\"email\", \"asc\"), new UserPrefs());"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmailDesc \u003d new ModelManager("},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"email\", \"desc\"), new UserPrefs());"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void noPlayers() throws CommandException {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" error.expect(CommandException.class);"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" prepareCommand(\"name\", \"asc\", emptyModel).execute();"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" public void emptySortField_throwsNullPointerEx() {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", null);"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void emptySortOrder_throwsNullPointerEx() {"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(null, \"asc\");"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public void sortByName_success() throws Exception {"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"asc\", model);"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"asc\");"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, model);"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public void sortByNameDesc_success() throws Exception {"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"desc\", model);"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"desc\");"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByNameDesc);"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" public void sortByAdd_success() throws Exception {"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"asc\", model);"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"asc\");"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAdd);"},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" public void sortByAddDesc_success() throws Exception {"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"desc\", model);"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"desc\");"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAddDesc);"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmail_success() throws Exception {"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"asc\", model);"},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"asc\");"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmail);"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmailDesc_success() throws Exception {"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"desc\", model);"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"desc\");"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmailDesc);"},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" * Returns a {@code sortCommand} with the parameters {@code field and @code order}."},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" private SortCommand prepareCommand(String field, String order, Model model) {"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" SortCommand sortCommand \u003d new SortCommand(field, order);"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" sortCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" return sortCommand;"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":108}},{"path":"src/test/java/seedu/address/logic/commands/TogglePrivacyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertEquals;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertFalse;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandTest {"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" public void editPersonPrivacyTest() {"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertFalse(epp.anyNonNullField());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy eppBuilder \u003d new EditPersonPrivacyBuilder().setAddressPrivate(\"false\")"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" .setEmailPrivate(\"false\").setPhonePrivate(\"true\").setRatingPrivate(\"false\")"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" .setRemarkPrivate(\"true\").build();"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateAddress(), epp.getPrivateAddress());"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateEmail(), epp.getPrivateEmail());"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivatePhone(), epp.getPrivatePhone());"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRating(), epp.getPrivateRating());"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRemark(), epp.getPrivateRemark());"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" public void oneFieldToggledSuccess() throws Exception {"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" Index indexLast \u003d Index.fromOneBased(model.getFilteredPersonList().size());"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLast.getZeroBased());"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" Person listedPerson \u003d new PersonBuilder().withName(lastPerson.getName().toString())"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" .withEmail(lastPerson.getEmail().toString()).withRating(lastPerson.getRating().toString())"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" .withPhone(lastPerson.getPhone().toString()).build();"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" listedPerson.getPhone().setPrivate(true);"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder(listedPerson).setPhonePrivate(\"true\").build();"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand togglePrivacyCommand \u003d new TogglePrivacyCommand(indexLast, epp);"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" togglePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(TogglePrivacyCommand.MESSAGE_SUCCESS, listedPerson);"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" expectedModel.updatePerson(lastPerson, listedPerson);"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":67}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TEAM_ARSENAL;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" private static final boolean DEFAULT_LOCK_STATE \u003d false;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void parseCommand_add() throws Exception {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person), DEFAULT_LOCK_STATE);"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_addAlias() throws Exception {"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":67,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \""},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new AddCommand(person), command);"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void parseCommand_clear() throws Exception {"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":76,"author":{"gitId":"-"},"content":" }"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_clearAlias() throws Exception {"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void parseCommand_delete() throws Exception {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_deleteAlias() throws Exception {"},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand("},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseCommand_edit() throws Exception {"},{"lineNumber":100,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":101,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \""},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_editAlias() throws Exception {"},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \""},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":117,"author":{"gitId":"-"},"content":" public void parseCommand_exit() throws Exception {"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ExitCommand);"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ExitCommand);"},{"lineNumber":120,"author":{"gitId":"-"},"content":" }"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void parseCommand_remark() throws Exception {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");"},{"lineNumber":125,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_WORD + \" \""},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);"},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);"},{"lineNumber":128,"author":{"gitId":"-"},"content":" }"},{"lineNumber":129,"author":{"gitId":"-"},"content":""},{"lineNumber":130,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":131,"author":{"gitId":"-"},"content":" public void parseCommand_remarkAlias() throws Exception {"},{"lineNumber":132,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");"},{"lineNumber":133,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_ALIAS + \" \""},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);"},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);"},{"lineNumber":136,"author":{"gitId":"-"},"content":" }"},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":139,"author":{"gitId":"-"},"content":" public void parseCommand_find() throws Exception {"},{"lineNumber":140,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":141,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream()"},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":145,"author":{"gitId":"-"},"content":" }"},{"lineNumber":146,"author":{"gitId":"-"},"content":""},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_findAlias() throws Exception {"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand("},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream()"},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);"},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);"},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":157,"author":{"gitId":"-"},"content":" public void parseCommand_help() throws Exception {"},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HelpCommand);"},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\","},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HelpCommand);"},{"lineNumber":161,"author":{"gitId":"-"},"content":" }"},{"lineNumber":162,"author":{"gitId":"-"},"content":""},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":164,"author":{"gitId":"-"},"content":" public void parseCommand_history() throws Exception {"},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\","},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"histories\", DEFAULT_LOCK_STATE);"},{"lineNumber":171,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");"},{"lineNumber":172,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {"},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());"},{"lineNumber":174,"author":{"gitId":"-"},"content":" }"},{"lineNumber":175,"author":{"gitId":"-"},"content":" }"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_historyAlias() throws Exception {"},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\","},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);"},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void parseCommand_create() throws Exception {"},{"lineNumber":186,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));"},{"lineNumber":187,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_WORD + \" \""},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);"},{"lineNumber":190,"author":{"gitId":"-"},"content":" }"},{"lineNumber":191,"author":{"gitId":"-"},"content":""},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parseCommand_createAlias() throws Exception {"},{"lineNumber":194,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));"},{"lineNumber":195,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_ALIAS + \" \""},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);"},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);"},{"lineNumber":198,"author":{"gitId":"-"},"content":" }"},{"lineNumber":199,"author":{"gitId":"-"},"content":""},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void parseCommand_list() throws Exception {"},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\","},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":205,"author":{"gitId":"-"},"content":" }"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_listAlias() throws Exception {"},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\","},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);"},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":215,"author":{"gitId":"-"},"content":" public void parseCommand_select() throws Exception {"},{"lineNumber":216,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":219,"author":{"gitId":"-"},"content":" }"},{"lineNumber":220,"author":{"gitId":"-"},"content":""},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_selectAlias() throws Exception {"},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand("},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);"},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);"},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":229,"author":{"gitId":"-"},"content":" public void parseCommand_redoCommandWord_returnsRedoCommand() throws Exception {"},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":232,"author":{"gitId":"-"},"content":" }"},{"lineNumber":233,"author":{"gitId":"-"},"content":""},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_redoCommandAlias_returnsRedoCommand() throws Exception {"},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS + \" 1\","},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof RedoCommand);"},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":241,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":242,"author":{"gitId":"-"},"content":" public void parseCommand_undoCommandWord_returnsUndoCommand() throws Exception {"},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":245,"author":{"gitId":"-"},"content":" }"},{"lineNumber":246,"author":{"gitId":"-"},"content":""},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_undoCommandAlias_returnsUndoCommand() throws Exception {"},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS + \" 3\","},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof UndoCommand);"},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":254,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":255,"author":{"gitId":"-"},"content":" public void parseCommand_unrecognisedInput_throwsParseException() throws Exception {"},{"lineNumber":256,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":257,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));"},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"\", DEFAULT_LOCK_STATE);"},{"lineNumber":259,"author":{"gitId":"-"},"content":" }"},{"lineNumber":260,"author":{"gitId":"-"},"content":""},{"lineNumber":261,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void parseCommand_unknownCommand_throwsParseException() throws Exception {"},{"lineNumber":263,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);"},{"lineNumber":264,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_LOCK_STATE);"},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" /** @lohtianwei */"},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sort() throws Exception {"},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \""},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \""},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);"},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sortAlias() throws Exception {"},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \""},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \""},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);"},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_key() throws Exception {"},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD"},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);"},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_keyAlias() throws Exception {"},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD"},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);"},{"lineNumber":293,"author":{"gitId":"-"},"content":" }"},{"lineNumber":294,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacy() throws Exception {"},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_WORD + \" \""},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);"},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacyAlias() throws Exception {"},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_ALIAS + \" \""},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \""},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);"},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":309,"author":{"gitId":"codeeong"},"content":" /** @@Codee */"},{"lineNumber":310,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":311,"author":{"gitId":"codeeong"},"content":" public void parseCommand_theme() throws Exception {"},{"lineNumber":312,"author":{"gitId":"codeeong"},"content":" String[] listThemes \u003d { \"Light\", \"Dark\" };"},{"lineNumber":313,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":314,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":315,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand command \u003d (ChangeThemeCommand) parser.parseCommand("},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" ChangeThemeCommand.COMMAND_WORD + \" \" + listThemes[i], DEFAULT_LOCK_STATE);"},{"lineNumber":317,"author":{"gitId":"codeeong"},"content":" assertEquals(new ChangeThemeCommand(listThemes[i]), command);"},{"lineNumber":318,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":319,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":320,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":321,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"lohtianwei":150,"codeeong":12,"-":159}},{"path":"src/test/java/seedu/address/logic/parser/ChangeThemeCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParserTest {"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private ChangeThemeCommandParser parser \u003d new ChangeThemeCommandParser();"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsThemeCommand() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, listThemes[i], new ChangeThemeCommand(listThemes[i]));"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public void parse_invalidArgs_throwsParseException() {"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" // Empty Argument"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" assertParseFailure(parser, \"\","},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangeThemeCommand.MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":30}},{"path":"src/test/java/seedu/address/logic/parser/SetCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalTags.FRIEND;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class SetCommandParserTest {"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private SetCommandParser parser \u003d new SetCommandParser();"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsSetCommand() {"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" String userInput \u003d \" \" + PREFIX_TAG + FRIEND.getTagName() + \" \" + PREFIX_TAG_COLOUR + \"green\";"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, userInput, new SetCommand(FRIEND, \"green\"));"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":23}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_ASCENDING;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_DESCENDING;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"//import seedu.address.logic.commands.SortCommand;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParserTest {"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" private SortCommandParser parser \u003d new SortCommandParser();"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public void noArguments_throwsParseException() {"},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" public void parse_invalidArguments_failure() {"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" //more than 1 field entered"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"address\" + \" \" + \"asc\","},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" //invalid field entered"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"invalid\" + \"asc\","},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //invalid sort order entered"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"invalid\","},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" //no field entered"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"asc\","},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" //no order entered"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\","},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" /*"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public void parse_validArguments_success() {"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in asc order"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_ASCENDING,"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_ASCENDING));"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in desc order"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_DESCENDING,"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_DESCENDING));"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in asc order"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_ASCENDING,"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_ASCENDING));"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in desc order"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_DESCENDING,"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_DESCENDING));"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in asc order"},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_ASCENDING,"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_ASCENDING));"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in desc order"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_DESCENDING,"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_DESCENDING));"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in asc order"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_ASCENDING,"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_ASCENDING));"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in desc order"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_DESCENDING,"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_DESCENDING));"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":82}},{"path":"src/test/java/seedu/address/logic/parser/TogglePrivacyCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;"},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;"},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;"},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParserTest {"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d String.format"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" (MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE);"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_NO_FIELDS \u003d String.format(TogglePrivacyCommand.MESSAGE_NO_FIELDS);"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private TogglePrivacyCommandParser parser \u003d new TogglePrivacyCommandParser();"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidIndex() {"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" // zero index"},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //negative index"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" //invalid index"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1 random\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void parseMissingField_fail() {"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" // no prefix specified"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\", MESSAGE_NO_FIELDS);"},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" //no index specified"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" //nothing specified after command word"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidPrefix_fail() {"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME,"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void parseOneField_success() throws ParseException {"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE;"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" @Test"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" public void parseValidFollowedbyInvalid_success() throws ParseException {"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE + \" \" + PREFIX_NAME;"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" * Checks if two TP commands are equal"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" * @param expected"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" * @param actual"},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" private void compareTpCommand(TogglePrivacyCommand expected, TogglePrivacyCommand actual) {"},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getIndex(), actual.getIndex());"},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRemark(), actual.getEpp().getPrivateRemark());"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateAddress(), actual.getEpp().getPrivateAddress());"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRating(), actual.getEpp().getPrivateRating());"},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivatePhone(), actual.getEpp().getPrivatePhone());"},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateEmail(), actual.getEpp().getPrivateEmail());"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":95}},{"path":"src/test/java/seedu/address/model/tag/TagTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":4,"author":{"gitId":"-"},"content":""},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;"},{"lineNumber":6,"author":{"gitId":"-"},"content":""},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class TagTest {"},{"lineNumber":8,"author":{"gitId":"-"},"content":""},{"lineNumber":9,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":10,"author":{"gitId":"-"},"content":" public void constructor_null_throwsNullPointerException() {"},{"lineNumber":11,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new Tag(null));"},{"lineNumber":12,"author":{"gitId":"-"},"content":" }"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":15,"author":{"gitId":"-"},"content":" public void constructor_invalidTagName_throwsIllegalArgumentException() {"},{"lineNumber":16,"author":{"gitId":"-"},"content":" String invalidTagName \u003d \"\";"},{"lineNumber":17,"author":{"gitId":"-"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagName));"},{"lineNumber":18,"author":{"gitId":"-"},"content":" }"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" public void constructor_invalidTagColourName_throwsIllegalArgumentException() {"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" String invalidTagColourName \u003d \"\";"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagColourName));"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void isValidTagName() {"},{"lineNumber":28,"author":{"gitId":"-"},"content":" // null tag name"},{"lineNumber":29,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagName(null));"},{"lineNumber":30,"author":{"gitId":"-"},"content":" }"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public void isValidTagColour() {"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" // null tag name"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagColour(null));"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":12,"-":26}},{"path":"src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.File;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":14,"author":{"gitId":"-"},"content":""},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class JsonUserPrefsStorageTest {"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/JsonUserPrefsStorageTest/\");"},{"lineNumber":22,"author":{"gitId":"-"},"content":""},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":25,"author":{"gitId":"-"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void readUserPrefs_nullFilePath_throwsNullPointerException() throws DataConversionException {"},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":32,"author":{"gitId":"-"},"content":" readUserPrefs(null);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" }"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Optional\u003cUserPrefs\u003e readUserPrefs(String userPrefsFileInTestDataFolder) throws DataConversionException {"},{"lineNumber":36,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d addToTestDataPathIfNotNull(userPrefsFileInTestDataFolder);"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new JsonUserPrefsStorage(prefsFilePath).readUserPrefs(prefsFilePath);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void readUserPrefs_missingFile_emptyResult() throws DataConversionException {"},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertFalse(readUserPrefs(\"NonExistentFile.json\").isPresent());"},{"lineNumber":43,"author":{"gitId":"-"},"content":" }"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void readUserPrefs_notJsonFormat_exceptionThrown() throws DataConversionException {"},{"lineNumber":47,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);"},{"lineNumber":48,"author":{"gitId":"-"},"content":" readUserPrefs(\"NotJsonFormatUserPrefs.json\");"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored."},{"lineNumber":51,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method"},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" }"},{"lineNumber":54,"author":{"gitId":"-"},"content":""},{"lineNumber":55,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String userPrefsFileInTestDataFolder) {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" return userPrefsFileInTestDataFolder !\u003d null"},{"lineNumber":57,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + userPrefsFileInTestDataFolder"},{"lineNumber":58,"author":{"gitId":"-"},"content":" : null;"},{"lineNumber":59,"author":{"gitId":"-"},"content":" }"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void readUserPrefs_fileInOrder_successfullyRead() throws DataConversionException {"},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();"},{"lineNumber":64,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"TypicalUserPref.json\").get();"},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void readUserPrefs_valuesMissingFromFile_defaultValuesUsed() throws DataConversionException {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"EmptyUserPrefs.json\").get();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(new UserPrefs(), actual);"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":75,"author":{"gitId":"-"},"content":" public void readUserPrefs_extraValuesInFile_extraValuesIgnored() throws DataConversionException {"},{"lineNumber":76,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();"},{"lineNumber":77,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"ExtraValuesUserPref.json\").get();"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" private UserPrefs getTypicalUserPrefs() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" userPrefs.setGuiSettings(1000, 500, 300, 100);"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" userPrefs.setAddressBookFilePath(\"myteammanager.xml\");"},{"lineNumber":86,"author":{"gitId":"-"},"content":" userPrefs.setAddressBookName(\"TypicalAddressBookName\");"},{"lineNumber":87,"author":{"gitId":"-"},"content":" return userPrefs;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" }"},{"lineNumber":89,"author":{"gitId":"-"},"content":""},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void savePrefs_nullPrefs_throwsNullPointerException() {"},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveUserPrefs(null, \"SomeFile.json\");"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void saveUserPrefs_nullFilePath_throwsNullPointerException() {"},{"lineNumber":98,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);"},{"lineNumber":99,"author":{"gitId":"-"},"content":" saveUserPrefs(new UserPrefs(), null);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Saves {@code userPrefs} at the specified {@code prefsFileInTestDataFolder} filepath."},{"lineNumber":104,"author":{"gitId":"-"},"content":" */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" private void saveUserPrefs(UserPrefs userPrefs, String prefsFileInTestDataFolder) {"},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(addToTestDataPathIfNotNull(prefsFileInTestDataFolder))"},{"lineNumber":108,"author":{"gitId":"-"},"content":" .saveUserPrefs(userPrefs);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {"},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file\", ioe);"},{"lineNumber":111,"author":{"gitId":"-"},"content":" }"},{"lineNumber":112,"author":{"gitId":"-"},"content":" }"},{"lineNumber":113,"author":{"gitId":"-"},"content":""},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":115,"author":{"gitId":"-"},"content":" public void saveUserPrefs_allInOrder_success() throws DataConversionException, IOException {"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();"},{"lineNumber":118,"author":{"gitId":"-"},"content":" original.setGuiSettings(1200, 200, 0, 2);"},{"lineNumber":119,"author":{"gitId":"-"},"content":""},{"lineNumber":120,"author":{"gitId":"-"},"content":" String pefsFilePath \u003d testFolder.getRoot() + File.separator + \"TempPrefs.json\";"},{"lineNumber":121,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage jsonUserPrefsStorage \u003d new JsonUserPrefsStorage(pefsFilePath);"},{"lineNumber":122,"author":{"gitId":"-"},"content":""},{"lineNumber":123,"author":{"gitId":"-"},"content":" //Try writing when the file doesn\u0027t exist"},{"lineNumber":124,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);"},{"lineNumber":125,"author":{"gitId":"-"},"content":" UserPrefs readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" //Try saving when the file exists"},{"lineNumber":129,"author":{"gitId":"-"},"content":" original.setGuiSettings(5, 5, 5, 5);"},{"lineNumber":130,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();"},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);"},{"lineNumber":133,"author":{"gitId":"-"},"content":" }"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":134}},{"path":"src/test/java/seedu/address/testutil/EditPersonPrivacyBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei"},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;"},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"/**"},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":" * A utility class to help with building EditPersonPrivacy objects."},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"public class EditPersonPrivacyBuilder {"},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" private EditPersonPrivacy epp;"},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder() {"},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();"},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(EditPersonPrivacy epp) {"},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d new EditPersonPrivacy(epp);"},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" * Returns an {@code EditPersonPrivacy} with fields containing {@code person}\u0027s privacy details"},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" */"},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(Person p) {"},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();"},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(p.getAddress().isPrivate());"},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(p.getEmail().isPrivate());"},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(p.getPhone().isPrivate());"},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(p.getRemark().isPrivate());"},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(p.getRating().isPrivate());"},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setPhonePrivate(String phone) {"},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {"},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);"},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {"},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);"},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");"},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setEmailPrivate(String email) {"},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {"},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(true);"},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {"},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);"},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");"},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setAddressPrivate(String address) {"},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {"},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(true);"},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {"},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);"},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");"},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRatingPrivate(String rating) {"},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (rating.equals(\"Optional[true]\") || rating.equals(\"true\")) {"},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(true);"},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else if (rating.equals(\"Optional[false]\") || rating.equals(\"false\")) {"},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);"},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of rating should be true or false\");"},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRemarkPrivate(String remark) {"},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {"},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);"},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {"},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);"},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" } else {"},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");"},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" return this;"},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy build() {"},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" return epp;"},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":89,"-":2}},{"path":"src/test/java/seedu/address/testutil/TeamBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * A utility class to help with building a TeamList."},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee"},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class TeamBuilder {"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TEAM_NAME \u003d \"Arsenal\";"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":" private TeamName teamName;"},{"lineNumber":15,"author":{"gitId":"-"},"content":""},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" public TeamBuilder() {"},{"lineNumber":18,"author":{"gitId":"-"},"content":" teamName \u003d new TeamName(DEFAULT_TEAM_NAME);"},{"lineNumber":19,"author":{"gitId":"-"},"content":" }"},{"lineNumber":20,"author":{"gitId":"-"},"content":""},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Initializes the TeamBuilder with the data of {@code teamToCopy}."},{"lineNumber":23,"author":{"gitId":"-"},"content":" */"},{"lineNumber":24,"author":{"gitId":"-"},"content":" public TeamBuilder(Team teamToCopy) {"},{"lineNumber":25,"author":{"gitId":"-"},"content":" teamName \u003d teamToCopy.getTeamName();"},{"lineNumber":26,"author":{"gitId":"-"},"content":" }"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Sets the {@code TeamName} of the {@code Team} that we are building."},{"lineNumber":30,"author":{"gitId":"-"},"content":" */"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public TeamBuilder withTeamName(String teamName) {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.teamName \u003d new TeamName(teamName);"},{"lineNumber":33,"author":{"gitId":"-"},"content":" return this;"},{"lineNumber":34,"author":{"gitId":"-"},"content":" }"},{"lineNumber":35,"author":{"gitId":"-"},"content":""},{"lineNumber":36,"author":{"gitId":"-"},"content":" public Team build() {"},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new Team(teamName);"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":8,"-":31}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":19,"author":{"gitId":"-"},"content":""},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":28,"author":{"gitId":"-"},"content":""},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":30,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests."},{"lineNumber":31,"author":{"gitId":"-"},"content":" */"},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class TypicalPersons {"},{"lineNumber":33,"author":{"gitId":"-"},"content":""},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final Person ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")"},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")"},{"lineNumber":36,"author":{"gitId":"-"},"content":" .withPhone(\"85355255\").withTags(\"friends\").withRating(\"0\")"},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"1\").build();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final Person BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")"},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")"},{"lineNumber":40,"author":{"gitId":"-"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\")"},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withTags(\"owesMoney\", \"friends\").withRating(\"1\")"},{"lineNumber":42,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"2\").build();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final Person CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")"},{"lineNumber":44,"author":{"gitId":"-"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withRating(\"2\")"},{"lineNumber":45,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"3\").build();"},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final Person DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")"},{"lineNumber":47,"author":{"gitId":"-"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withRating(\"3\")"},{"lineNumber":48,"author":{"gitId":"-"},"content":" .withPosition(\"4\").withJerseyNumber(\"4\").build();"},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final Person ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")"},{"lineNumber":50,"author":{"gitId":"-"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withRating(\"4\")"},{"lineNumber":51,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"5\").build();"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final Person FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")"},{"lineNumber":53,"author":{"gitId":"-"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withRating(\"5\")"},{"lineNumber":54,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"6\").build();"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final Person GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")"},{"lineNumber":56,"author":{"gitId":"-"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withRemark(\"Could be famous\").withRating(\"0\")"},{"lineNumber":57,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"7\").build();"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" // Manually added"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final Person HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")"},{"lineNumber":61,"author":{"gitId":"-"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").build();"},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final Person IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")"},{"lineNumber":63,"author":{"gitId":"-"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").build();"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final Person AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)"},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRating(VALID_RATING_0)"},{"lineNumber":68,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2)"},{"lineNumber":69,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final Person BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRating(VALID_RATING_1)"},{"lineNumber":72,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_MIDFIELD).withJerseyNumber(VALID_JERSEY_NUMBER_17)"},{"lineNumber":73,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();"},{"lineNumber":74,"author":{"gitId":"-"},"content":""},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER"},{"lineNumber":76,"author":{"gitId":"-"},"content":""},{"lineNumber":77,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation"},{"lineNumber":78,"author":{"gitId":"-"},"content":""},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons."},{"lineNumber":81,"author":{"gitId":"-"},"content":" */"},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" for (Person person : getTypicalPersons()) {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" ab.addPerson(person);"},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new AssertionError(\"not possible\");"},{"lineNumber":89,"author":{"gitId":"-"},"content":" }"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":" return ab;"},{"lineNumber":92,"author":{"gitId":"-"},"content":" }"},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei"},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersons() {"},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));"},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByAddress() {"},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(DANIEL, ALICE, BENSON, GEORGE, FIONA, ELLE, CARL));"},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByEmail() {"},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, GEORGE, DANIEL, CARL, BENSON, FIONA, ELLE));"},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByPhone() {"},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, DANIEL, ELLE, FIONA, GEORGE, CARL, BENSON));"},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getSortedAddressBook(String field, String order) {"},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e personList;"},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" switch(field) {"},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" case \"name\":"},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();"},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" case \"phone\":"},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByPhone();"},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" case \"email\":"},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByEmail();"},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case \"address\":"},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByAddress();"},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" break;"},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" default:"},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();"},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" if (order.equals(\"desc\")) {"},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Collections.reverse(personList);"},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" for (Person person : personList) {"},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" try {"},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" ab.addPerson(person);"},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException e) {"},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" assert false : \"not possible\";"},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" return ab;"},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":""},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getEmptyAddressBook() {"},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" return ab;"},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" }"},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":"}"}],"authorContributionMap":{"lohtianwei":59,"-":91}},{"path":"src/test/java/seedu/address/testutil/TypicalTags.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.List;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.UniqueTagList;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" * A utility class containing a list of {@code Tag} objects to be used in tests."},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"public class TypicalTags {"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final Tag GOOD_ATTITUDE \u003d new Tag(\"goodAttitude\", \"teal\");"},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public static final Tag FRIEND \u003d new Tag(\"friends\", \"teal\");"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" private TypicalTags() {} //prevents instantiation"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * Returns an {@code AddressBook} with all the typical teams."},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public static AddressBook getTypicalAddressBook() {"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" AddressBook ab \u003d new AddressBook();"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" for (Tag tag : getTypicalTags()) {"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" try {"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" ab.addTag(tag);"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" } catch (UniqueTagList.DuplicateTagException e) {"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\"not possible\");"},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" return ab;"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public static List\u003cTag\u003e getTypicalTags() {"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(GOOD_ATTITUDE, FRIEND));"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":43}},{"path":"src/test/java/seedu/address/ui/PlayerDetailsTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertPlayerDetailsDisplaysPerson;"},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;"},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"//@@author Codee"},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class PlayerDetailsTest extends GuiUnitTest {"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void display() {"},{"lineNumber":19,"author":{"gitId":"-"},"content":" // no tags"},{"lineNumber":20,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();"},{"lineNumber":21,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(personWithNoTags);"},{"lineNumber":22,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(playerDetails);"},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertCardDisplay(playerDetails, personWithNoTags);"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" }"},{"lineNumber":26,"author":{"gitId":"-"},"content":""},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public void equals() {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();"},{"lineNumber":30,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(person);"},{"lineNumber":31,"author":{"gitId":"-"},"content":""},{"lineNumber":32,"author":{"gitId":"-"},"content":" // same object -\u003e returns true"},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(playerDetails.equals(playerDetails));"},{"lineNumber":34,"author":{"gitId":"-"},"content":""},{"lineNumber":35,"author":{"gitId":"-"},"content":" // null -\u003e returns false"},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(null));"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different types -\u003e returns false"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(0));"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false"},{"lineNumber":42,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(new PlayerDetails(differentPerson)));"},{"lineNumber":44,"author":{"gitId":"-"},"content":" }"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Asserts that {@code playerDetails} displays the details of {@code expectedPerson} correctly"},{"lineNumber":48,"author":{"gitId":"-"},"content":" */"},{"lineNumber":49,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PlayerDetails playerDetails, Person expectedPerson) {"},{"lineNumber":50,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":51,"author":{"gitId":"-"},"content":""},{"lineNumber":52,"author":{"gitId":"-"},"content":" PlayerDetailsHandle playerDetailsHandle \u003d new PlayerDetailsHandle(playerDetails.getRoot());"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" // verify player details are displayed correctly"},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertPlayerDetailsDisplaysPerson(expectedPerson, playerDetailsHandle);"},{"lineNumber":56,"author":{"gitId":"-"},"content":" }"},{"lineNumber":57,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":13,"-":44}},{"path":"src/test/java/seedu/address/ui/TeamDisplayTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.EventsUtil.postNow;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertTeamDisplayEquals;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;"},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;"},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;"},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;"},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;"},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.TeamBuilder;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/**"},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * tests for TeamDisplay UI Component."},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */"},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayTest extends GuiUnitTest {"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private static final String NEW_TEAM_NAME \u003d \"myTeam\";"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private static final ShowNewTeamNameEvent SHOW_NEW_TEAM_NAME_EVENT \u003d new ShowNewTeamNameEvent(NEW_TEAM_NAME);"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" private TeamDisplay teamDisplay;"},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" private TeamDisplayHandle teamDisplayHandle;"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Before"},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public void setUp() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" teamList \u003d FXCollections.observableArrayList();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Arsenal\").build());"},{"lineNumber":35,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Chelsea\").build());"},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" teamDisplay \u003d new TeamDisplay(teamList);"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" uiPartRule.setUiPart(teamDisplay);"},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());"},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" public void display() {"},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" assertTeamDisplay(teamDisplay, teamList);"},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches"},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * {@code expectedId}."},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void assertTeamDisplay(TeamDisplay teamDisplay, ObservableList\u003cTeam\u003e teamlist) {"},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly"},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(teamDisplay, teamDisplayHandle);"},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" @Test"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" public void handleShowNewTeamNameEvent() {"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" postNow(SHOW_NEW_TEAM_NAME_EVENT);"},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly after event"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" teamList.add(new Team(new TeamName(NEW_TEAM_NAME)));"},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" TeamDisplay expectedTeamDisplay \u003d new TeamDisplay(teamList);"},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());"},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly"},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(expectedTeamDisplay, teamDisplayHandle);"},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"}"}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":""},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;"},{"lineNumber":12,"author":{"gitId":"-"},"content":""},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;"},{"lineNumber":16,"author":{"gitId":"-"},"content":""},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class UiPartTest {"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";"},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";"},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";"},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_WITH_FX_ROOT_PATH \u003d \"UiPartTest/validFileWithFxRoot.fxml\";"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");"},{"lineNumber":24,"author":{"gitId":"-"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":26,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule"},{"lineNumber":29,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();"},{"lineNumber":30,"author":{"gitId":"-"},"content":""},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void constructor_nullFileUrl_throwsNullPointerException() {"},{"lineNumber":33,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null));"},{"lineNumber":34,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null, new Object()));"},{"lineNumber":35,"author":{"gitId":"-"},"content":" }"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void constructor_missingFileUrl_throwsAssertionError() throws Exception {"},{"lineNumber":39,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);"},{"lineNumber":40,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl));"},{"lineNumber":41,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl, new Object()));"},{"lineNumber":42,"author":{"gitId":"-"},"content":" }"},{"lineNumber":43,"author":{"gitId":"-"},"content":""},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void constructor_invalidFileUrl_throwsAssertionError() {"},{"lineNumber":46,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);"},{"lineNumber":47,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl));"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl, new Object()));"},{"lineNumber":49,"author":{"gitId":"-"},"content":" }"},{"lineNumber":50,"author":{"gitId":"-"},"content":""},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void constructor_validFileUrl_loadsFile() {"},{"lineNumber":53,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());"},{"lineNumber":55,"author":{"gitId":"-"},"content":" }"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void constructor_validFileWithFxRootUrl_loadsFile() {"},{"lineNumber":59,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_WITH_FX_ROOT_PATH);"},{"lineNumber":60,"author":{"gitId":"-"},"content":" TestFxmlObject root \u003d new TestFxmlObject();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl, root).getRoot());"},{"lineNumber":62,"author":{"gitId":"-"},"content":" }"},{"lineNumber":63,"author":{"gitId":"-"},"content":""},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void constructor_nullFileName_throwsNullPointerException() {"},{"lineNumber":66,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null));"},{"lineNumber":67,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null, new Object()));"},{"lineNumber":68,"author":{"gitId":"-"},"content":" }"},{"lineNumber":69,"author":{"gitId":"-"},"content":""},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void constructor_missingFileName_throwsNullPointerException() {"},{"lineNumber":72,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH));"},{"lineNumber":73,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH, new Object()));"},{"lineNumber":74,"author":{"gitId":"-"},"content":" }"},{"lineNumber":75,"author":{"gitId":"-"},"content":""},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void constructor_invalidFileName_throwsAssertionError() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH));"},{"lineNumber":79,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH, new Object()));"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {"},{"lineNumber":83,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;"},{"lineNumber":84,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);"},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);"},{"lineNumber":86,"author":{"gitId":"-"},"content":" return testFileUrl;"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * UiPart used for testing."},{"lineNumber":91,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}."},{"lineNumber":92,"author":{"gitId":"-"},"content":" */"},{"lineNumber":93,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {"},{"lineNumber":94,"author":{"gitId":"-"},"content":""},{"lineNumber":95,"author":{"gitId":"-"},"content":" @FXML"},{"lineNumber":96,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl, T root) {"},{"lineNumber":99,"author":{"gitId":"-"},"content":" super(fxmlFileUrl, root);"},{"lineNumber":100,"author":{"gitId":"-"},"content":" }"},{"lineNumber":101,"author":{"gitId":"-"},"content":""},{"lineNumber":102,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName, T root) {"},{"lineNumber":103,"author":{"gitId":"-"},"content":" super(fxmlFileName, root);"},{"lineNumber":104,"author":{"gitId":"-"},"content":" }"},{"lineNumber":105,"author":{"gitId":"-"},"content":""},{"lineNumber":106,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {"},{"lineNumber":107,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);"},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":109,"author":{"gitId":"-"},"content":" }"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {"},{"lineNumber":112,"author":{"gitId":"-"},"content":" super(fxmlFileName);"},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);"},{"lineNumber":114,"author":{"gitId":"-"},"content":" }"},{"lineNumber":115,"author":{"gitId":"-"},"content":""},{"lineNumber":116,"author":{"gitId":"-"},"content":" }"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":"}"},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":""}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;"},{"lineNumber":5,"author":{"gitId":"-"},"content":""},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.PersonCard;"},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.TeamDisplay;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class GuiTestAssert {"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private static final String LABEL_DEFAULT_STYLE \u003d \"label\";"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard}."},{"lineNumber":27,"author":{"gitId":"-"},"content":" */"},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {"},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());"},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getPosition(), actualCard.getPosition());"},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getRating(), actualCard.getRating());"},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());"},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTeamName(), actualCard.getTeamName());"},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());"},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" expectedCard.getTags().forEach(tag -\u003e"},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTagStyleClasses(tag), actualCard.getTagStyleClasses(tag)));"},{"lineNumber":38,"author":{"gitId":"-"},"content":" }"},{"lineNumber":39,"author":{"gitId":"-"},"content":""},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualTeamDisplay} displays the details of {@code expectedTeamDisplay}."},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":43,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static void assertTeamDisplayEquals(TeamDisplay expectedTeamDisplay, TeamDisplayHandle actualTeamDisplay) {"},{"lineNumber":45,"author":{"gitId":"-"},"content":" expectedTeamDisplay.getTeams().forEach(team -\u003e"},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedTeamDisplay.getTeams().toString(), actualTeamDisplay.getTeams().toString()));"},{"lineNumber":47,"author":{"gitId":"-"},"content":" }"},{"lineNumber":48,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}."},{"lineNumber":52,"author":{"gitId":"-"},"content":" */"},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(Person expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());"},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getTeamName().toString(), actualCard.getTeamName());"},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getRating().value, actualCard.getRating());"},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getPosition().getPositionName(), actualCard.getPosition());"},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" assertTagsEqual(expectedPerson, actualCard);"},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualPlayerDetails} displays the details of {@code expectedPerson}."},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":65,"author":{"gitId":"-"},"content":" //@@author Codee"},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static void assertPlayerDetailsDisplaysPerson(Person expectedPerson, PlayerDetailsHandle actualPlayerPanel) {"},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualPlayerPanel.getName());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().toString(), actualPlayerPanel.getAddress());"},{"lineNumber":69,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualPlayerPanel.getEmail());"},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getJerseyNumber().value, actualPlayerPanel.getJerseyNumber());"},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualPlayerPanel.getPhone());"},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getRemark().toString(), actualPlayerPanel.getRemarks());"},{"lineNumber":73,"author":{"gitId":"-"},"content":" }"},{"lineNumber":74,"author":{"gitId":"-"},"content":" //@@author"},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Returns the color style for {@code tagName}\u0027s label. The tag\u0027s color is determined by looking up the color"},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" * of {@tagColour}"},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" *"},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" * @see PersonCard getTagColorStyleFor(String)"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" private static String getTagColorStyleFor(String tagName) {"},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" switch (tagName) {"},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" case \"classmates\":"},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" case \"owesMoney\":"},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" case \"colleagues\":"},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" case \"neighbours\":"},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" case \"family\":"},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" case \"friend\":"},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" case \"friends\":"},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" case \"husband\":"},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" case \"redCard\":"},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" case \"yellowCard\":"},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" case \"goodAttitude\":"},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" case \"badAttitude\":"},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" case \"injured\":"},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" case \"fastRunner\":"},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" return \"teal\";"},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" default:"},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" fail(tagName + \" does not have a color assigned.\");"},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" return \"\";"},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" }"},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" /**"},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" * Asserts that the tags in {@code actualCard} matches all the tags in {@code expectedPerson} with the correct"},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" * color."},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" */"},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" private static void assertTagsEqual(Person expectedPerson, PersonCardHandle actualCard) {"},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e expectedTags \u003d expectedPerson.getTags().stream()"},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" .map(tag -\u003e tag.tagName).collect(Collectors.toList());"},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedTags, actualCard.getTags());"},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" expectedTags.forEach(tag -\u003e"},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" assertEquals(Arrays.asList(LABEL_DEFAULT_STYLE, getTagColorStyleFor(tag)),"},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" actualCard.getTagStyleClasses(tag)));"},{"lineNumber":117,"author":{"gitId":"-"},"content":" }"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":120,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":121,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":122,"author":{"gitId":"-"},"content":" */"},{"lineNumber":123,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, Person... persons) {"},{"lineNumber":124,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {"},{"lineNumber":125,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));"},{"lineNumber":126,"author":{"gitId":"-"},"content":" }"},{"lineNumber":127,"author":{"gitId":"-"},"content":" }"},{"lineNumber":128,"author":{"gitId":"-"},"content":""},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and"},{"lineNumber":131,"author":{"gitId":"-"},"content":" * in the correct order."},{"lineNumber":132,"author":{"gitId":"-"},"content":" */"},{"lineNumber":133,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cPerson\u003e persons) {"},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new Person[0]));"},{"lineNumber":135,"author":{"gitId":"-"},"content":" }"},{"lineNumber":136,"author":{"gitId":"-"},"content":""},{"lineNumber":137,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":138,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}."},{"lineNumber":139,"author":{"gitId":"-"},"content":" */"},{"lineNumber":140,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {"},{"lineNumber":141,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();"},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);"},{"lineNumber":143,"author":{"gitId":"-"},"content":" }"},{"lineNumber":144,"author":{"gitId":"-"},"content":""},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}."},{"lineNumber":147,"author":{"gitId":"-"},"content":" */"},{"lineNumber":148,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {"},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());"},{"lineNumber":150,"author":{"gitId":"-"},"content":" }"},{"lineNumber":151,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":70,"-":81}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_MAC_LINUX;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_WINDOWS;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_JERSEY_NUMBER_DESC;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_POSITION_DESC;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_RATING_DESC;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;"},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_MAC_LINUX;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_WINDOWS;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;"},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;"},{"lineNumber":46,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":47,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":"import com.sun.javafx.PlatformUtil;"},{"lineNumber":60,"author":{"gitId":"-"},"content":""},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;"},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":68,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":69,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":70,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;"},{"lineNumber":71,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":72,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":74,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;"},{"lineNumber":75,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;"},{"lineNumber":76,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":77,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":78,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":79,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":82,"author":{"gitId":"-"},"content":""},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void add() throws Exception {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":86,"author":{"gitId":"-"},"content":""},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operations on the shown unfiltered list ----------------------------- */"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces"},{"lineNumber":90,"author":{"gitId":"-"},"content":" * -\u003e added"},{"lineNumber":91,"author":{"gitId":"-"},"content":" */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();"},{"lineNumber":93,"author":{"gitId":"-"},"content":" Person toAdd \u003d AMY;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" String command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":95,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":100,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":102,"author":{"gitId":"-"},"content":""},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */"},{"lineNumber":104,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":105,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);"},{"lineNumber":106,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":108,"author":{"gitId":"-"},"content":""},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */"},{"lineNumber":110,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":111,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":114,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \""},{"lineNumber":115,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":117,"author":{"gitId":"-"},"content":""},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */"},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":120,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":121,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":122,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */"},{"lineNumber":127,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":128,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":130,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY"},{"lineNumber":131,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \""},{"lineNumber":132,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":134,"author":{"gitId":"-"},"content":""},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */"},{"lineNumber":136,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":137,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)"},{"lineNumber":138,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":139,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB"},{"lineNumber":140,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \""},{"lineNumber":141,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":143,"author":{"gitId":"-"},"content":""},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" deleteAllPersons();"},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);"},{"lineNumber":147,"author":{"gitId":"-"},"content":""},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */"},{"lineNumber":149,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;"},{"lineNumber":150,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB"},{"lineNumber":151,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_HUSBAND + EMAIL_DESC_BOB + POSITION_DESC_MIDFILED + JERSEY_NUMBER_DESC_17 + RATING_DESC_1;"},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":153,"author":{"gitId":"-"},"content":""},{"lineNumber":154,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);"},{"lineNumber":156,"author":{"gitId":"-"},"content":""},{"lineNumber":157,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e added */"},{"lineNumber":158,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)"},{"lineNumber":159,"author":{"gitId":"-"},"content":" .withPhone(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)"},{"lineNumber":160,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":161,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0"},{"lineNumber":162,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e added */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":167,"author":{"gitId":"-"},"content":" .withAddress(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)"},{"lineNumber":168,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":169,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + RATING_DESC_0"},{"lineNumber":170,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":171,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: missing rating -\u003e added */"},{"lineNumber":174,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)"},{"lineNumber":175,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags().withRating(UNSPECIFIED_FIELD)"},{"lineNumber":176,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":177,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":178,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" if (PlatformUtil.isWindows()) {"},{"lineNumber":182,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":183,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_WINDOWS)"},{"lineNumber":184,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)"},{"lineNumber":185,"author":{"gitId":"-"},"content":" .build();"},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_WINDOWS"},{"lineNumber":187,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER"},{"lineNumber":188,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;"},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":190,"author":{"gitId":"-"},"content":" } else if (PlatformUtil.isMac() || PlatformUtil.isLinux()) {"},{"lineNumber":191,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)"},{"lineNumber":192,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_MAC_LINUX)"},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)"},{"lineNumber":194,"author":{"gitId":"-"},"content":" .build();"},{"lineNumber":195,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_MAC_LINUX"},{"lineNumber":196,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER"},{"lineNumber":197,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;"},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" /* -------------------------- Perform add operation on the shown filtered list ------------------------------ */"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);"},{"lineNumber":206,"author":{"gitId":"-"},"content":""},{"lineNumber":207,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operation while a person card is selected --------------------------- */"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */"},{"lineNumber":210,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));"},{"lineNumber":211,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);"},{"lineNumber":212,"author":{"gitId":"-"},"content":""},{"lineNumber":213,"author":{"gitId":"-"},"content":" /* ----------------------------------- Perform invalid add operations --------------------------------------- */"},{"lineNumber":214,"author":{"gitId":"-"},"content":""},{"lineNumber":215,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */"},{"lineNumber":216,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON);"},{"lineNumber":217,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":218,"author":{"gitId":"-"},"content":""},{"lineNumber":219,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */"},{"lineNumber":220,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE"},{"lineNumber":221,"author":{"gitId":"-"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in"},{"lineNumber":222,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(Person)"},{"lineNumber":223,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON) + \" \" + PREFIX_TAG.getPrefix() + \"friends\";"},{"lineNumber":224,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":225,"author":{"gitId":"-"},"content":""},{"lineNumber":226,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */"},{"lineNumber":227,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0"},{"lineNumber":228,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":230,"author":{"gitId":"-"},"content":""},{"lineNumber":231,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */"},{"lineNumber":232,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0"},{"lineNumber":233,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":234,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));"},{"lineNumber":235,"author":{"gitId":"-"},"content":""},{"lineNumber":236,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */"},{"lineNumber":237,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);"},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);"},{"lineNumber":239,"author":{"gitId":"-"},"content":""},{"lineNumber":240,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":241,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":242,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":243,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":244,"author":{"gitId":"-"},"content":""},{"lineNumber":245,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":246,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":247,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":249,"author":{"gitId":"-"},"content":""},{"lineNumber":250,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":251,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC + ADDRESS_DESC_AMY"},{"lineNumber":252,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":254,"author":{"gitId":"-"},"content":""},{"lineNumber":255,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */"},{"lineNumber":256,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + INVALID_ADDRESS_DESC"},{"lineNumber":257,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Address.MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":261,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":262,"author":{"gitId":"-"},"content":" + INVALID_TAG_DESC + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":263,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":264,"author":{"gitId":"-"},"content":""},{"lineNumber":265,"author":{"gitId":"-"},"content":" //@@author lithiumlkid"},{"lineNumber":266,"author":{"gitId":"-"},"content":" /* Case: invalid rating -\u003e rejected */"},{"lineNumber":267,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":268,"author":{"gitId":"-"},"content":" + INVALID_RATING_DESC + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Rating.MESSAGE_RATING_CONSTRAINTS);"},{"lineNumber":270,"author":{"gitId":"-"},"content":""},{"lineNumber":271,"author":{"gitId":"-"},"content":" /* Case: invalid position -\u003e rejected */"},{"lineNumber":272,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":273,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + INVALID_POSITION_DESC + JERSEY_NUMBER_DESC_2;"},{"lineNumber":274,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Position.MESSAGE_POSITION_CONSTRAINTS);"},{"lineNumber":275,"author":{"gitId":"-"},"content":""},{"lineNumber":276,"author":{"gitId":"-"},"content":" /* Case: invalid jersey number -\u003e rejected */"},{"lineNumber":277,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":278,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + INVALID_JERSEY_NUMBER_DESC;"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandFailure(command, JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);"},{"lineNumber":280,"author":{"gitId":"-"},"content":""},{"lineNumber":281,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */"},{"lineNumber":282,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":283,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_NO_FILE;"},{"lineNumber":284,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":285,"author":{"gitId":"-"},"content":""},{"lineNumber":286,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */"},{"lineNumber":287,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY"},{"lineNumber":288,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_TYPE;"},{"lineNumber":289,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Avatar.MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":290,"author":{"gitId":"-"},"content":" }"},{"lineNumber":291,"author":{"gitId":"-"},"content":""},{"lineNumber":292,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":293,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and asserts that the,\u003cbr\u003e"},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 1. Command box displays an empty string.\u003cbr\u003e"},{"lineNumber":295,"author":{"gitId":"-"},"content":" * 2. Command box has the default style class.\u003cbr\u003e"},{"lineNumber":296,"author":{"gitId":"-"},"content":" * 3. Result display box displays the success message of executing {@code AddCommand} with the details of"},{"lineNumber":297,"author":{"gitId":"-"},"content":" * {@code toAdd}.\u003cbr\u003e"},{"lineNumber":298,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in"},{"lineNumber":299,"author":{"gitId":"-"},"content":" * the current model added with {@code toAdd}.\u003cbr\u003e"},{"lineNumber":300,"author":{"gitId":"-"},"content":" * 5. Browser url and selected card remain unchanged.\u003cbr\u003e"},{"lineNumber":301,"author":{"gitId":"-"},"content":" * 6. Status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":302,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by"},{"lineNumber":303,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":304,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":305,"author":{"gitId":"-"},"content":" */"},{"lineNumber":306,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Person toAdd) {"},{"lineNumber":307,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);"},{"lineNumber":308,"author":{"gitId":"-"},"content":" }"},{"lineNumber":309,"author":{"gitId":"-"},"content":""},{"lineNumber":310,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":311,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(Person)}. Executes {@code command}"},{"lineNumber":312,"author":{"gitId":"-"},"content":" * instead."},{"lineNumber":313,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(Person)"},{"lineNumber":314,"author":{"gitId":"-"},"content":" */"},{"lineNumber":315,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Person toAdd) {"},{"lineNumber":316,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":318,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);"},{"lineNumber":319,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {"},{"lineNumber":320,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");"},{"lineNumber":321,"author":{"gitId":"-"},"content":" }"},{"lineNumber":322,"author":{"gitId":"-"},"content":" // TODO: place holder for success message, change to proper assert method"},{"lineNumber":323,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);"},{"lineNumber":324,"author":{"gitId":"-"},"content":""},{"lineNumber":325,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);"},{"lineNumber":326,"author":{"gitId":"-"},"content":" }"},{"lineNumber":327,"author":{"gitId":"-"},"content":""},{"lineNumber":328,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":329,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Person)} except asserts that"},{"lineNumber":330,"author":{"gitId":"-"},"content":" * the,\u003cbr\u003e"},{"lineNumber":331,"author":{"gitId":"-"},"content":" * 1. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":332,"author":{"gitId":"-"},"content":" * 2. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in"},{"lineNumber":333,"author":{"gitId":"-"},"content":" * {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":334,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, Person)"},{"lineNumber":335,"author":{"gitId":"-"},"content":" */"},{"lineNumber":336,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":337,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":338,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":339,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":342,"author":{"gitId":"-"},"content":" }"},{"lineNumber":343,"author":{"gitId":"-"},"content":""},{"lineNumber":344,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":345,"author":{"gitId":"-"},"content":" * Executes {@code command} and asserts that the,\u003cbr\u003e"},{"lineNumber":346,"author":{"gitId":"-"},"content":" * 1. Command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":347,"author":{"gitId":"-"},"content":" * 2. Command box has the error style class.\u003cbr\u003e"},{"lineNumber":348,"author":{"gitId":"-"},"content":" * 3. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":349,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} remain unchanged.\u003cbr\u003e"},{"lineNumber":350,"author":{"gitId":"-"},"content":" * 5. Browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":351,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by"},{"lineNumber":352,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":353,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":354,"author":{"gitId":"-"},"content":" */"},{"lineNumber":355,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":356,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":357,"author":{"gitId":"-"},"content":""},{"lineNumber":358,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":359,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":360,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":361,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":362,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":363,"author":{"gitId":"-"},"content":" }"},{"lineNumber":364,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":5,"-":359}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.List;"},{"lineNumber":13,"author":{"gitId":"-"},"content":""},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.After;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Before;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;"},{"lineNumber":23,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;"},{"lineNumber":24,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;"},{"lineNumber":37,"author":{"gitId":"-"},"content":""},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":39,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods"},{"lineNumber":40,"author":{"gitId":"-"},"content":" * for test verification."},{"lineNumber":41,"author":{"gitId":"-"},"content":" */"},{"lineNumber":42,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {"},{"lineNumber":43,"author":{"gitId":"-"},"content":" @ClassRule"},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();"},{"lineNumber":45,"author":{"gitId":"-"},"content":""},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");"},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d"},{"lineNumber":48,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);"},{"lineNumber":49,"author":{"gitId":"-"},"content":""},{"lineNumber":50,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;"},{"lineNumber":51,"author":{"gitId":"-"},"content":" private TestApp testApp;"},{"lineNumber":52,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;"},{"lineNumber":53,"author":{"gitId":"-"},"content":""},{"lineNumber":54,"author":{"gitId":"-"},"content":" @BeforeClass"},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {"},{"lineNumber":56,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initialize();"},{"lineNumber":57,"author":{"gitId":"-"},"content":" }"},{"lineNumber":58,"author":{"gitId":"-"},"content":""},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Before"},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setUp() {"},{"lineNumber":61,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();"},{"lineNumber":62,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication(this::getInitialData, getDataFileLocation());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();"},{"lineNumber":66,"author":{"gitId":"-"},"content":" }"},{"lineNumber":67,"author":{"gitId":"-"},"content":""},{"lineNumber":68,"author":{"gitId":"-"},"content":" @After"},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {"},{"lineNumber":70,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();"},{"lineNumber":71,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();"},{"lineNumber":72,"author":{"gitId":"-"},"content":" }"},{"lineNumber":73,"author":{"gitId":"-"},"content":""},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Returns the data to be loaded into the file in {@link #getDataFileLocation()}."},{"lineNumber":76,"author":{"gitId":"-"},"content":" */"},{"lineNumber":77,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {"},{"lineNumber":78,"author":{"gitId":"-"},"content":" return TypicalPersons.getTypicalAddressBook();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" }"},{"lineNumber":80,"author":{"gitId":"-"},"content":""},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Returns the directory of the data file."},{"lineNumber":83,"author":{"gitId":"-"},"content":" */"},{"lineNumber":84,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {"},{"lineNumber":85,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;"},{"lineNumber":86,"author":{"gitId":"-"},"content":" }"},{"lineNumber":87,"author":{"gitId":"-"},"content":""},{"lineNumber":88,"author":{"gitId":"-"},"content":" public MainWindowHandle getMainWindowHandle() {"},{"lineNumber":89,"author":{"gitId":"-"},"content":" return mainWindowHandle;"},{"lineNumber":90,"author":{"gitId":"-"},"content":" }"},{"lineNumber":91,"author":{"gitId":"-"},"content":""},{"lineNumber":92,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {"},{"lineNumber":93,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();"},{"lineNumber":94,"author":{"gitId":"-"},"content":" }"},{"lineNumber":95,"author":{"gitId":"-"},"content":""},{"lineNumber":96,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {"},{"lineNumber":97,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();"},{"lineNumber":98,"author":{"gitId":"-"},"content":" }"},{"lineNumber":99,"author":{"gitId":"-"},"content":""},{"lineNumber":100,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {"},{"lineNumber":101,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();"},{"lineNumber":102,"author":{"gitId":"-"},"content":" }"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {"},{"lineNumber":105,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();"},{"lineNumber":106,"author":{"gitId":"-"},"content":" }"},{"lineNumber":107,"author":{"gitId":"-"},"content":""},{"lineNumber":108,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {"},{"lineNumber":109,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();"},{"lineNumber":110,"author":{"gitId":"-"},"content":" }"},{"lineNumber":111,"author":{"gitId":"-"},"content":""},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}."},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated."},{"lineNumber":115,"author":{"gitId":"-"},"content":" */"},{"lineNumber":116,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {"},{"lineNumber":117,"author":{"gitId":"-"},"content":" rememberStates();"},{"lineNumber":118,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar"},{"lineNumber":119,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command."},{"lineNumber":120,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();"},{"lineNumber":121,"author":{"gitId":"-"},"content":""},{"lineNumber":122,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);"},{"lineNumber":123,"author":{"gitId":"-"},"content":""},{"lineNumber":124,"author":{"gitId":"-"},"content":" }"},{"lineNumber":125,"author":{"gitId":"-"},"content":""},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons in the address book."},{"lineNumber":128,"author":{"gitId":"-"},"content":" */"},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showAllPersons() {"},{"lineNumber":130,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);"},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(getModel().getAddressBook().getPersonList().size(), getModel().getFilteredPersonList().size());"},{"lineNumber":132,"author":{"gitId":"-"},"content":" }"},{"lineNumber":133,"author":{"gitId":"-"},"content":""},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive)."},{"lineNumber":136,"author":{"gitId":"-"},"content":" */"},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {"},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + keyword);"},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertTrue(getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size());"},{"lineNumber":140,"author":{"gitId":"-"},"content":" }"},{"lineNumber":141,"author":{"gitId":"-"},"content":""},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list."},{"lineNumber":144,"author":{"gitId":"-"},"content":" */"},{"lineNumber":145,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {"},{"lineNumber":146,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + index.getOneBased());"},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertEquals(index.getZeroBased(), getPersonListPanel().getSelectedCardIndex());"},{"lineNumber":148,"author":{"gitId":"-"},"content":" }"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Deletes all persons in the address book."},{"lineNumber":152,"author":{"gitId":"-"},"content":" */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected void deleteAllPersons() {"},{"lineNumber":154,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);"},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertEquals(0, getModel().getAddressBook().getPersonList().size());"},{"lineNumber":156,"author":{"gitId":"-"},"content":" }"},{"lineNumber":157,"author":{"gitId":"-"},"content":""},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays"},{"lineNumber":160,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}"},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly."},{"lineNumber":162,"author":{"gitId":"-"},"content":" */"},{"lineNumber":163,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,"},{"lineNumber":164,"author":{"gitId":"-"},"content":" Model expectedModel) {"},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());"},{"lineNumber":167,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());"},{"lineNumber":168,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());"},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());"},{"lineNumber":170,"author":{"gitId":"-"},"content":" }"},{"lineNumber":171,"author":{"gitId":"-"},"content":""},{"lineNumber":172,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":173,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember"},{"lineNumber":174,"author":{"gitId":"-"},"content":" * their current state."},{"lineNumber":175,"author":{"gitId":"-"},"content":" */"},{"lineNumber":176,"author":{"gitId":"-"},"content":" private void rememberStates() {"},{"lineNumber":177,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();"},{"lineNumber":178,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();"},{"lineNumber":179,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();"},{"lineNumber":180,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();"},{"lineNumber":181,"author":{"gitId":"-"},"content":" }"},{"lineNumber":182,"author":{"gitId":"-"},"content":""},{"lineNumber":183,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":184,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details"},{"lineNumber":185,"author":{"gitId":"-"},"content":" * of the previously selected person."},{"lineNumber":186,"author":{"gitId":"-"},"content":" */"},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {"},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());"},{"lineNumber":189,"author":{"gitId":"-"},"content":" }"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at"},{"lineNumber":193,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected."},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":195,"author":{"gitId":"-"},"content":" */"},{"lineNumber":196,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {"},{"lineNumber":197,"author":{"gitId":"-"},"content":""},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());"},{"lineNumber":199,"author":{"gitId":"-"},"content":" }"},{"lineNumber":200,"author":{"gitId":"-"},"content":""},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged."},{"lineNumber":203,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()"},{"lineNumber":204,"author":{"gitId":"-"},"content":" */"},{"lineNumber":205,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {"},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());"},{"lineNumber":207,"author":{"gitId":"-"},"content":" }"},{"lineNumber":208,"author":{"gitId":"-"},"content":""},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style."},{"lineNumber":211,"author":{"gitId":"-"},"content":" */"},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {"},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":214,"author":{"gitId":"-"},"content":" }"},{"lineNumber":215,"author":{"gitId":"-"},"content":""},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style."},{"lineNumber":218,"author":{"gitId":"-"},"content":" */"},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {"},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());"},{"lineNumber":221,"author":{"gitId":"-"},"content":" }"},{"lineNumber":222,"author":{"gitId":"-"},"content":""},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same."},{"lineNumber":225,"author":{"gitId":"-"},"content":" */"},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {"},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());"},{"lineNumber":230,"author":{"gitId":"-"},"content":" }"},{"lineNumber":231,"author":{"gitId":"-"},"content":""},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of"},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same."},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {"},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();"},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);"},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());"},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());"},{"lineNumber":242,"author":{"gitId":"-"},"content":" }"},{"lineNumber":243,"author":{"gitId":"-"},"content":""},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct."},{"lineNumber":246,"author":{"gitId":"-"},"content":" */"},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {"},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());"},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());"},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());"},{"lineNumber":252,"author":{"gitId":"codeeong"},"content":" //assertEquals that the detail card is correct"},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());"},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());"},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {"},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);"},{"lineNumber":257,"author":{"gitId":"-"},"content":" }"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model."},{"lineNumber":262,"author":{"gitId":"-"},"content":" */"},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {"},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();"},{"lineNumber":265,"author":{"gitId":"-"},"content":" }"},{"lineNumber":266,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":2,"-":264}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":""},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;"},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;"},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;"},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;"},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;"},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;"},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;"},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;"},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;"},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;"},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;"},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;"},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;"},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;"},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;"},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;"},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;"},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;"},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;"},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;"},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;"},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;"},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;"},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;"},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;"},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;"},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;"},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;"},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;"},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":46,"author":{"gitId":"-"},"content":""},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;"},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;"},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;"},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;"},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;"},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;"},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;"},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;"},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;"},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;"},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;"},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;"},{"lineNumber":59,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;"},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;"},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;"},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;"},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":66,"author":{"gitId":"-"},"content":""},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void edit() throws Exception {"},{"lineNumber":69,"author":{"gitId":"-"},"content":" Model model \u003d getModel();"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */"},{"lineNumber":72,"author":{"gitId":"-"},"content":""},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field"},{"lineNumber":74,"author":{"gitId":"-"},"content":" * -\u003e edited"},{"lineNumber":75,"author":{"gitId":"-"},"content":" */"},{"lineNumber":76,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":77,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \""},{"lineNumber":78,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + TAG_DESC_HUSBAND + \" \""},{"lineNumber":79,"author":{"gitId":"-"},"content":" + RATING_DESC_1 + \" \" + POSITION_DESC_MIDFILED + \" \" + JERSEY_NUMBER_DESC_2;"},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)"},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND)"},{"lineNumber":82,"author":{"gitId":"-"},"content":" .withRating(VALID_RATING_1).withPosition(VALID_POSITION_MIDFIELD)"},{"lineNumber":83,"author":{"gitId":"-"},"content":" .withJerseyNumber(VALID_JERSEY_NUMBER_2).build();"},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":85,"author":{"gitId":"-"},"content":""},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */"},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;"},{"lineNumber":88,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;"},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":90,"author":{"gitId":"-"},"content":""},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */"},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;"},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;"},{"lineNumber":94,"author":{"gitId":"-"},"content":" model.updatePerson("},{"lineNumber":95,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);"},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);"},{"lineNumber":97,"author":{"gitId":"-"},"content":""},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */"},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":100,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + POSITION_DESC_MIDFILED + RATING_DESC_1"},{"lineNumber":101,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_17;"},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);"},{"lineNumber":103,"author":{"gitId":"-"},"content":""},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */"},{"lineNumber":105,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;"},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":108,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).build();"},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":110,"author":{"gitId":"-"},"content":""},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */"},{"lineNumber":112,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();"},{"lineNumber":114,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().build();"},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":116,"author":{"gitId":"-"},"content":""},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */"},{"lineNumber":118,"author":{"gitId":"-"},"content":""},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */"},{"lineNumber":120,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":121,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());"},{"lineNumber":123,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;"},{"lineNumber":124,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());"},{"lineNumber":125,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();"},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);"},{"lineNumber":127,"author":{"gitId":"-"},"content":""},{"lineNumber":128,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list"},{"lineNumber":129,"author":{"gitId":"-"},"content":" * -\u003e rejected"},{"lineNumber":130,"author":{"gitId":"-"},"content":" */"},{"lineNumber":131,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);"},{"lineNumber":132,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();"},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":134,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":135,"author":{"gitId":"-"},"content":""},{"lineNumber":136,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */"},{"lineNumber":137,"author":{"gitId":"-"},"content":""},{"lineNumber":138,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but"},{"lineNumber":139,"author":{"gitId":"-"},"content":" * browser url changes"},{"lineNumber":140,"author":{"gitId":"-"},"content":" */"},{"lineNumber":141,"author":{"gitId":"-"},"content":" showAllPersons();"},{"lineNumber":142,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":143,"author":{"gitId":"-"},"content":" selectPerson(index);"},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY"},{"lineNumber":145,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_AMY + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;"},{"lineNumber":146,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the"},{"lineNumber":147,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name"},{"lineNumber":148,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);"},{"lineNumber":149,"author":{"gitId":"-"},"content":""},{"lineNumber":150,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */"},{"lineNumber":151,"author":{"gitId":"-"},"content":""},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */"},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,"},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":155,"author":{"gitId":"-"},"content":""},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */"},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,"},{"lineNumber":158,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":159,"author":{"gitId":"-"},"content":""},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */"},{"lineNumber":161,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;"},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,"},{"lineNumber":163,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);"},{"lineNumber":164,"author":{"gitId":"-"},"content":""},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */"},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,"},{"lineNumber":167,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));"},{"lineNumber":168,"author":{"gitId":"-"},"content":""},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */"},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),"},{"lineNumber":171,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);"},{"lineNumber":172,"author":{"gitId":"-"},"content":""},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */"},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,"},{"lineNumber":175,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);"},{"lineNumber":176,"author":{"gitId":"-"},"content":""},{"lineNumber":177,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */"},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,"},{"lineNumber":179,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);"},{"lineNumber":180,"author":{"gitId":"-"},"content":""},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */"},{"lineNumber":182,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,"},{"lineNumber":183,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);"},{"lineNumber":184,"author":{"gitId":"-"},"content":""},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */"},{"lineNumber":186,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_ADDRESS_DESC,"},{"lineNumber":187,"author":{"gitId":"-"},"content":" Address.MESSAGE_ADDRESS_CONSTRAINTS);"},{"lineNumber":188,"author":{"gitId":"-"},"content":""},{"lineNumber":189,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();"},{"lineNumber":190,"author":{"gitId":"-"},"content":""},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */"},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,"},{"lineNumber":193,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);"},{"lineNumber":194,"author":{"gitId":"-"},"content":""},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */"},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_NO_FILE,"},{"lineNumber":197,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_FILE_NOT_FOUND);"},{"lineNumber":198,"author":{"gitId":"-"},"content":""},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */"},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_TYPE,"},{"lineNumber":201,"author":{"gitId":"-"},"content":" Avatar.MESSAGE_AVATAR_CONSTRAINTS);"},{"lineNumber":202,"author":{"gitId":"-"},"content":""},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */"},{"lineNumber":204,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));"},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));"},{"lineNumber":206,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;"},{"lineNumber":207,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));"},{"lineNumber":208,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":209,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;"},{"lineNumber":210,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":211,"author":{"gitId":"-"},"content":""},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */"},{"lineNumber":213,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB"},{"lineNumber":214,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND;"},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);"},{"lineNumber":216,"author":{"gitId":"-"},"content":" }"},{"lineNumber":217,"author":{"gitId":"-"},"content":""},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":219,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, Person, Index)} except that"},{"lineNumber":220,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged."},{"lineNumber":221,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list"},{"lineNumber":222,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, Person, Index)"},{"lineNumber":223,"author":{"gitId":"-"},"content":" */"},{"lineNumber":224,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson) {"},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);"},{"lineNumber":226,"author":{"gitId":"-"},"content":" }"},{"lineNumber":227,"author":{"gitId":"-"},"content":""},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e"},{"lineNumber":230,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e"},{"lineNumber":231,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being"},{"lineNumber":232,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e"},{"lineNumber":233,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list."},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":235,"author":{"gitId":"-"},"content":" */"},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson,"},{"lineNumber":237,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":238,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":239,"author":{"gitId":"-"},"content":" try {"},{"lineNumber":240,"author":{"gitId":"-"},"content":" expectedModel.updatePerson("},{"lineNumber":241,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);"},{"lineNumber":242,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":243,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {"},{"lineNumber":244,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException("},{"lineNumber":245,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");"},{"lineNumber":246,"author":{"gitId":"-"},"content":" }"},{"lineNumber":247,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,"},{"lineNumber":248,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);"},{"lineNumber":249,"author":{"gitId":"-"},"content":" }"},{"lineNumber":250,"author":{"gitId":"-"},"content":""},{"lineNumber":251,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":252,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the"},{"lineNumber":253,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged."},{"lineNumber":254,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)"},{"lineNumber":255,"author":{"gitId":"-"},"content":" */"},{"lineNumber":256,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {"},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);"},{"lineNumber":258,"author":{"gitId":"-"},"content":" }"},{"lineNumber":259,"author":{"gitId":"-"},"content":""},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":262,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e"},{"lineNumber":263,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e"},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at"},{"lineNumber":266,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e"},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e"},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e"},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":272,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)"},{"lineNumber":273,"author":{"gitId":"-"},"content":" */"},{"lineNumber":274,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,"},{"lineNumber":275,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {"},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":277,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);"},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);"},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":280,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {"},{"lineNumber":281,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);"},{"lineNumber":282,"author":{"gitId":"-"},"content":" } else {"},{"lineNumber":283,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":284,"author":{"gitId":"-"},"content":" }"},{"lineNumber":285,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();"},{"lineNumber":286,"author":{"gitId":"-"},"content":" }"},{"lineNumber":287,"author":{"gitId":"-"},"content":""},{"lineNumber":288,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":289,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e"},{"lineNumber":290,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e"},{"lineNumber":291,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e"},{"lineNumber":292,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e"},{"lineNumber":293,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e"},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e"},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by"},{"lineNumber":296,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e"},{"lineNumber":297,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)"},{"lineNumber":298,"author":{"gitId":"-"},"content":" */"},{"lineNumber":299,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {"},{"lineNumber":300,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();"},{"lineNumber":301,"author":{"gitId":"-"},"content":""},{"lineNumber":302,"author":{"gitId":"-"},"content":" executeCommand(command);"},{"lineNumber":303,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);"},{"lineNumber":304,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();"},{"lineNumber":305,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();"},{"lineNumber":306,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();"},{"lineNumber":307,"author":{"gitId":"-"},"content":" }"},{"lineNumber":308,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":6,"-":302}},{"path":"src/test/java/systemtests/HelpCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;"},{"lineNumber":2,"author":{"gitId":"-"},"content":""},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;"},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;"},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;"},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;"},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;"},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;"},{"lineNumber":9,"author":{"gitId":"-"},"content":""},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;"},{"lineNumber":11,"author":{"gitId":"-"},"content":""},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.GuiRobot;"},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.HelpWindowHandle;"},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;"},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;"},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;"},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.ui.StatusBarFooter;"},{"lineNumber":18,"author":{"gitId":"-"},"content":""},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**"},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A system test class for the help window, which contains interaction with other UI components."},{"lineNumber":21,"author":{"gitId":"-"},"content":" */"},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class HelpCommandSystemTest extends AddressBookSystemTest {"},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String ERROR_MESSAGE \u003d \"ATTENTION!!!! : On some computers, this test may fail when run on \""},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"non-headless mode as FxRobot#clickOn(Node, MouseButton...) clicks on the wrong location. We suspect \""},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"that this is a bug with TestFX library that we are using. If this test fails, you have to run your \""},{"lineNumber":26,"author":{"gitId":"-"},"content":" + \"tests on headless mode. See UsingGradle.adoc on how to do so.\";"},{"lineNumber":27,"author":{"gitId":"-"},"content":""},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final GuiRobot guiRobot \u003d new GuiRobot();"},{"lineNumber":29,"author":{"gitId":"-"},"content":""},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test"},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void openHelpWindow() {"},{"lineNumber":32,"author":{"gitId":"-"},"content":" //use accelerator"},{"lineNumber":33,"author":{"gitId":"-"},"content":" getCommandBox().click();"},{"lineNumber":34,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();"},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":36,"author":{"gitId":"-"},"content":""},{"lineNumber":37,"author":{"gitId":"-"},"content":" getResultDisplay().click();"},{"lineNumber":38,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();"},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":40,"author":{"gitId":"-"},"content":""},{"lineNumber":41,"author":{"gitId":"-"},"content":" getPersonListPanel().click();"},{"lineNumber":42,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();"},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":44,"author":{"gitId":"-"},"content":""},{"lineNumber":45,"author":{"gitId":"-"},"content":" //use menu button"},{"lineNumber":46,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingMenu();"},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":48,"author":{"gitId":"-"},"content":""},{"lineNumber":49,"author":{"gitId":"-"},"content":" //use command box"},{"lineNumber":50,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);"},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();"},{"lineNumber":52,"author":{"gitId":"-"},"content":""},{"lineNumber":53,"author":{"gitId":"-"},"content":" // open help window and give it focus"},{"lineNumber":54,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);"},{"lineNumber":55,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();"},{"lineNumber":56,"author":{"gitId":"-"},"content":""},{"lineNumber":57,"author":{"gitId":"-"},"content":" // assert that while the help window is open the UI updates correctly for a command execution"},{"lineNumber":58,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());"},{"lineNumber":60,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();"},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertNotEquals(HelpCommand.SHOWING_HELP_MESSAGE, getResultDisplay().getText());"},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" //assertNotEquals(BrowserPanel.DEFAULT_PAGE, getBrowserPanel().getLoadedUrl());"},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());"},{"lineNumber":64,"author":{"gitId":"-"},"content":""},{"lineNumber":65,"author":{"gitId":"-"},"content":" // assert that the status bar too is updated correctly while the help window is open"},{"lineNumber":66,"author":{"gitId":"-"},"content":" // note: the select command tested above does not update the status bar"},{"lineNumber":67,"author":{"gitId":"-"},"content":" executeCommand(DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());"},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertNotEquals(StatusBarFooter.SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());"},{"lineNumber":69,"author":{"gitId":"-"},"content":" }"},{"lineNumber":70,"author":{"gitId":"-"},"content":""},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Asserts that the help window is open, and closes it after checking."},{"lineNumber":73,"author":{"gitId":"-"},"content":" */"},{"lineNumber":74,"author":{"gitId":"-"},"content":" private void assertHelpWindowOpen() {"},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertTrue(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());"},{"lineNumber":76,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();"},{"lineNumber":77,"author":{"gitId":"-"},"content":""},{"lineNumber":78,"author":{"gitId":"-"},"content":" new HelpWindowHandle(guiRobot.getStage(HelpWindowHandle.HELP_WINDOW_TITLE)).close();"},{"lineNumber":79,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();"},{"lineNumber":80,"author":{"gitId":"-"},"content":" }"},{"lineNumber":81,"author":{"gitId":"-"},"content":""},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**"},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts that the help window isn\u0027t open."},{"lineNumber":84,"author":{"gitId":"-"},"content":" */"},{"lineNumber":85,"author":{"gitId":"-"},"content":" private void assertHelpWindowNotOpen() {"},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());"},{"lineNumber":87,"author":{"gitId":"-"},"content":" }"},{"lineNumber":88,"author":{"gitId":"-"},"content":""},{"lineNumber":89,"author":{"gitId":"-"},"content":"}"}],"authorContributionMap":{"codeeong":1,"-":88}}] +[{"path":"README.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"ifdef::env-github,env-browser[:relfileprefix: docs/]","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":"https://travis-ci.org/CS2103JAN2018-F14-B1/main[image:https://travis-ci.org/CS2103JAN2018-F14-B1/main.svg?branch\u003dmaster[Build Status]]","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"https://ci.appveyor.com/project/lithiumlkid/main/branch/master[image:https://ci.appveyor.com/api/projects/status/2itvfqp2b8xnaqqn/branch/master?svg\u003dtrue[Build status]]","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"https://coveralls.io/github/CS2103JAN2018-F14-B1/main?branch\u003dmaster[image:https://coveralls.io/repos/github/CS2103JAN2018-F14-B1/main/badge.svg?branch\u003dmaster[Coverage Status]]","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"image:https://circleci.com/gh/CS2103JAN2018-F14-B1/main.svg?style\u003dsvg[\"CircleCI\", link\u003d\"https://circleci.com/gh/CS2103JAN2018-F14-B1/main\"]","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"https://gitter.im/se-edu/Lobby[image:https://badges.gitter.im/se-edu/Lobby.svg[Gitter chat]]","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"image::docs/images/MyTeamManagerLogo.png[width\u003d\"100\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"image::images/MyTeamManagerLogo.png[width\u003d\"600\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"image::docs/images/Ui.png[width\u003d\"600\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"ifndef::env-github[]","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"image::images/Ui.png[width\u003d\"600\", align\u003d\"center\"]","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction to MTM","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop based team managing application for football team managers. +","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"It uses a Command Line Interface (CLI).","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"MTM is equipped with multiple features in helping you efficiently","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"and effectively manage your players, while keeping track of the team\u0027s schedule. +","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"With MTM\u0027s aesthetically pleasing graphical user interface, viewing critical information will be quick and painless.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"Never lose track of your training schedule again! +","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"Say goodbye to manual tracking of information on excel sheet after excel sheet!","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"\u003d\u003d What MTM Can Do - Key Features","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"* Set up Teams","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"* Add Players to Teams","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":"* Add Player\u0027s personal details, position, rating, avatar etc.","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"* View, Edit and Delete Players","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"* Sort players by field of choice","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"Come and take a look at our \u003c\u003cUserGuide#, User Guide\u003e\u003e to get started with MTM now.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"\u003d\u003d Site Map","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"* \u003c\u003cUserGuide#, User Guide\u003e\u003e","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"* \u003c\u003cDeveloperGuide#, Developer Guide\u003e\u003e","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"* \u003c\u003cAboutUs#, About Us\u003e\u003e","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"* \u003c\u003cContactUs#, Contact Us\u003e\u003e","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"\u003d\u003d Acknowledgements","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"* My Team Manager is morphed from https://github.com/se-edu/addressbook-level4[AddressBook-Level4] application, a project created by SE-EDU initiative.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"_Marco Jakob_.","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"* Libraries used: https://github.com/TomasMikula/EasyBind[EasyBind], https://github.com/TestFX/TestFX[TextFX], https://bitbucket.org/controlsfx/controlsfx/[ControlsFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/google/guava[Guava], https://github.com/junit-team/junit4[JUnit4]","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"\u003d\u003d Licence : link:LICENSE[MIT]","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":5,"codeeong":16,"-":41}},{"path":"docs/DeveloperGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - Developer Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":":toc-title:","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main/tree/master","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"By: `F14-B1`      Since: `Mar 2018`      Licence: `MIT`","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"// tag::overview[]","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a team managing application for football coaches. MTM is designed to be quick and easy for you to manage a team of players without the need of a mouse.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"This developer\u0027s guide provides information that will not only show the design principles of the project, but allow you to understand the different implementations, and give you the opportunity to get started with being a contributor or as a reference for experienced developer.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"This developer\u0027s guide consist of the following sections:","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"* \u003c\u003cSetting up, Setting up\u003e\u003e","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign, Design\u003e\u003e","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"* \u003c\u003cImplementation, Implementation\u003e\u003e","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"* \u003c\u003cDocumentation, Documentation\u003e\u003e","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"* \u003c\u003cTesting, Testing\u003e\u003e","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"* \u003c\u003cDev Ops, Dev Ops\u003e\u003e","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"// end::overview[]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"\u003d\u003d Setting up","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"The following pointers teach you how to get started with developing on our application. You’ll learn how to prepare yourself with the project on IntelliJ and run it. Then, you’ll update configurations in IntelliJ to easily match the coding standards and you’ll be ready to start coding.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"But before you start, there are two fundamental prerequisites you should know about MTM:","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Prerequisites","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"MTM is written in Java 8 and with the use of an integrated development environment (IDE) such as IntelliJ, it provides you as a developer with a better environment suited for developing MTM to maintain coding standards and provide continuous integration.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":". You are required to have *JDK `1.8.0_60`* or later,","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"This app will not work with earlier versions of Java 8. +","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"You can download Java 8 from link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151[here].","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":". and *IntelliJ* IDE.","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"IntelliJ by default has Gradle and JavaFx plugins installed. +","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"Do not disable them. If you have disabled them, go to `File` \u003e `Settings` \u003e `Plugins` to re-enable them. +","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"You can download IntelliJ from link:https://www.jetbrains.com/idea/download/#section\u003dwindows[here].","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Setting up the project on your computer","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"Before you begin setting up the project, please ensure that you’ve done the following on our GitHub repository (repo).","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":". Fork this repo, and clone the fork to your computer","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"Upon completion of forking from our GitHub repo, you can proceed to set up your project on IntelliJ.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":". Open IntelliJ (if you are not in the welcome screen, click `File` \u003e `Close Project` to close the existing project dialog first)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":". Set up the correct JDK version for Gradle","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":".. Click `Configure` \u003e `Project Defaults` \u003e `Project Structure`","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":".. Click `New...` and find the directory of the JDK","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":". Click `Import Project`","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":". Locate the `build.gradle` file and select it. Click `OK`","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":". Click `Open as Project`","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":". Click `OK` to accept the default settings","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":". Open a console and run the command `gradlew processResources` (Mac/Linux: `./gradlew processResources`). It should finish with the `BUILD SUCCESSFUL` message which will generate all resources required by the application and tests.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Verifying the setup","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"Now that you’ve properly setup your project, you can verify that you have done everything properly.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":". Run the `seedu.address.MainApp` and try a few commands","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":". \u003c\u003cTesting,Run the tests\u003e\u003e to ensure they all pass.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configurations to do before writing code","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"You have verified the setup and you’re all ready to dive into the code, but before you do, check out the following configurations that will help you make your coding more integrated and accurate.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Configuring the coding style","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"This project follows https://github.com/oss-generic/process/blob/master/docs/CodingStandards.adoc[oss-generic coding standards]. IntelliJ\u0027s default style is mostly compliant with ours but it uses a different import order from ours. To rectify,","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":". Go to `File` \u003e `Settings...` (Windows/Linux), or `IntelliJ IDEA` \u003e `Preferences...` (macOS)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":". Select `Editor` \u003e `Code Style` \u003e `Java`","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":". Click on the `Imports` tab to set the order","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"* For `Class count to use import with \u0027\\*\u0027` and `Names count to use static import with \u0027*\u0027`: Set to `999` to prevent IntelliJ from contracting the import statements","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"* For `Import Layout`: The order is `import static all other imports`, `import java.\\*`, `import javax.*`, `import org.\\*`, `import com.*`, `import all other imports`. Add a `\u003cblank line\u003e` between each `import`","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"Optionally, you can follow the \u003c\u003cUsingCheckstyle#, UsingCheckstyle.adoc\u003e\u003e document to configure Intellij to check style-compliance as you write code.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Updating documentation to match your fork","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"After forking the repo, links in the documentation will still point to the `se-edu/addressbook-level4` repo. If you plan to develop this as a separate product (i.e. instead of contributing to the `se-edu/addressbook-level4`) , you should replace the URL in the variable `repoURL` in `DeveloperGuide.adoc` and `UserGuide.adoc` with the URL of your fork.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting up CI","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"Set up Travis to perform Continuous Integration (CI) for your fork. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e to learn how to set it up.","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"After setting up Travis, you can optionally set up coverage reporting for your team fork (see \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"Coverage reporting could be useful for a team repository that hosts the final version but it is not that useful for your personal fork.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"Optionally, you can set up AppVeyor as a second CI (see \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e).","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"Having both Travis and AppVeyor ensures your App works on both Unix-based platforms and Windows-based platforms (Travis is Unix-based and AppVeyor is Windows-based)","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Getting started with coding","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"When you are ready to start coding,","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"1. Get some sense of the overall design by reading \u003c\u003cDesign-Architecture\u003e\u003e.","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"2. Dive right in and get started with programming.","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"\u003d\u003d Design","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"After you have successfully configured MTM, you are encouraged to read through the following section to understand the design of the software. The design section covers a high level overview the architecture and components of the software, as well as how common classes, configuration and logging throughout development are being used.","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"[[Design-Architecture]]","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Software Architecture","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"The *_Architecture Diagram_* given below (Figure 1) explains the high-level design of the App.","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":".Architecture Diagram","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"image::Architecture.png[width\u003d\"600\"]","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"Given below is a quick overview of each component.","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"The `.pptx` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. To update a diagram, modify the diagram in the pptx file, select the objects of the diagram, and choose `Save as picture`.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":"`Main` has only one class called link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for,","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"* At app launch: Initializes the components in the correct sequence, and connects them up with each other.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"* At shut down: Shuts down the components and invokes cleanup method where necessary.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"\u003c\u003cDesign-Commons,*`Commons`*\u003e\u003e represents a collection of classes used by multiple other components. Two of those classes play important roles at the architecture level.","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"* `EventsCenter` : This class (written using https://github.com/google/guava/wiki/EventBusExplained[Google\u0027s Event Bus library]) is used by components to communicate with other components using events (i.e. a form of _Event Driven_ design)","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"* `LogsCenter` : Used by many classes to write log messages to the App\u0027s log file.","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"The rest of the App consists of four components.","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Ui,*`UI`*\u003e\u003e: The UI of the App.","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Logic,*`Logic`*\u003e\u003e: The command executor.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Model,*`Model`*\u003e\u003e: Holds the data of the App in-memory.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":"* \u003c\u003cDesign-Storage,*`Storage`*\u003e\u003e: Reads data from, and writes data to, the hard disk.","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"Each of the four components","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"* Defines its _API_ in an `interface` with the same name as the Component.","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"* Exposes its functionality using a `{Component Name}Manager` class.","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"For example, the `Logic` component (see the class diagram given below) defines it\u0027s API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":".Class Diagram of the Logic Component","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Events-Driven nature of the design","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"The _Sequence Diagram_ below shows how the components interact for the scenario where the user issues the command `delete 1`.","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 1)","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"image::SDforDeletePerson.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"Note how the `Model` simply raises a `AddressBookChangedEvent` when the Address Book data are changed, instead of asking the `Storage` to save the updates to the hard disk.","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"The diagram below shows how the `EventsCenter` reacts to that event, which eventually results in the updates being saved to the hard disk and the status bar of the UI being updated to reflect the \u0027Last Updated\u0027 time.","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":".Component interactions for `delete 1` command (part 2)","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"image::SDforDeletePersonEventHandling.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"Note how the event is propagated through the `EventsCenter` to the `Storage` and `UI` without `Model` having to be coupled to either of them. This is an example of how this Event Driven approach helps us reduce direct coupling between components.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"The sections below give more details of each component.","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":"[[Design-Ui]]","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI component","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":"The UI Component contains a MainWindow that consists of various parts e.g. CommandBox, ResultDisplayer, TeamDetails, PersonListPanel, PlayerDetails etc. The UI classes are all child classes of the abstract UiPart class.","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"lithiumlkid"},"content":"The structure of the UI component is shown in the figure below:","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":".Structure of the UI Component","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"image::UiClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`]","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter`, `PlayerDetails` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"The `UI` component,","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"* Executes user commands using the `Logic` component.","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"* Binds itself to some data in the `Model` so that the UI can auto-update when data in the `Model` change.","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"* Responds to events raised from various parts of the App and updates the UI accordingly.","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"[[Design-Logic]]","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logic component","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"lithiumlkid"},"content":"The Logic Component handles how each command would be parsed and executed. The class diagrams below illustrates the structure of the Logic Component and the structure of each individual commands.","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"[[fig-LogicClassDiagram]]","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":".Structure of the Logic Component","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"image::LogicClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":".Structure of Commands in the Logic Component. This diagram shows finer details concerning `XYZCommand` and `Command` in \u003c\u003cfig-LogicClassDiagram\u003e\u003e","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"*API* :","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":"link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`]","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":". `Logic` uses the `AddressBookParser` class to parse the user command.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":". This results in a `Command` object which is executed by the `LogicManager`.","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":". The command execution can affect the `Model` (e.g. adding a person) and/or raise events.","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":". The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`.","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute(\"delete 1\")` API call.","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":".Interactions Inside the Logic Component for the `delete 1` Command","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"image::DeletePersonSdForLogic.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"[[Design-Model]]","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Model component","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"lithiumlkid"},"content":"The Model Component handles the players and teams data structures in My Team Manager. These structures also provide APIs to create, read, update and delete the details of these objects. The class diagram below shows the structure of the Model Component.","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":".Structure of the Model Component","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"image::ModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`]","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"The `Model`,","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"* stores a `UserPref` object that represents the user\u0027s preferences.","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"* stores the Address Book data.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"* exposes an unmodifiable `ObservableList\u003cPerson\u003e` that can be \u0027observed\u0027 e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"* does not depend on any of the other three components.","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"[[Design-Storage]]","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Storage component","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"lithiumlkid"},"content":"Any changes made to the data is retained and handled by the Storage Component. The structure of this component is shown in Figure 10 below.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":".Structure of the Storage Component","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"image::StorageClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":"*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`]","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":"The `Storage` component,","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"* can save `UserPref` objects in json format and read it back.","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"* can save the Address Book data in xml format and read it back.","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"[[Design-Commons]]","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Common classes","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"lithiumlkid"},"content":"All classes used by the different components can be found in the `seedu.addressbook.commons` package.","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Configuration","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"Certain properties of the application can be controlled (e.g App name, logging level) through the configuration file (default: `config.json`).","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"// tag::logging[]","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Logging","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations.","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"lithiumlkid"},"content":"* The logging level can be controlled using the `logLevel` setting in the configuration file (See \u003c\u003cConfiguration,Configuration\u003e\u003e)","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"* Currently log messages are output through: `Console` and to a `.log` file.","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"*Logging Levels*","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"* `SEVERE` : Critical problem detected which may possibly cause the termination of the application","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"* `WARNING` : Can continue, but with caution","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"* `INFO` : Information showing the noteworthy actions by the App","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"* `FINE` : Details that is not usually noteworthy but may be useful in debugging e.g. print the actual list instead of just its size","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"[[Implementation-Configuration]]","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"// end::logging[]","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"\u003d\u003d Implementation","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"This section describes some noteworthy details on how certain features are implemented.","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Pre-existing","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undo/Redo feature","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"The undo/redo mechanism is facilitated by an `UndoRedoStack`, which resides inside `LogicManager`. It supports undoing and redoing of commands that modifies the state of the address book (e.g. `add`, `edit`). Such commands will inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"`UndoRedoStack` only deals with `UndoableCommands`. Commands that cannot be undone will inherit from `Command` instead. The following diagram shows the inheritance diagram for commands:","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":".Logic Class Diagram","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"image::LogicCommandClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"As you can see from the diagram, `UndoableCommand` adds an extra layer between the abstract `Command` class and concrete commands that can be undone, such as the `DeleteCommand`. Note that extra tasks need to be done when executing a command in an _undoable_ way, such as saving the state of the address book before execution. `UndoableCommand` contains the high-level algorithm for those extra tasks while the child classes implements the details of how to execute the specific command. Note that this technique of putting the high-level algorithm in the parent class and lower-level steps of the algorithm in child classes is also known as the https://www.tutorialspoint.com/design_pattern/template_pattern.htm[template pattern].","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"Commands that are not undoable are implemented this way:","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" // ... list logic ...","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"With the extra layer, the commands that are undoable are implemented this way:","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"public abstract class UndoableCommand extends Command {","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" // ... undo logic ...","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" executeUndoableCommand();","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" // ... delete logic ...","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"Suppose that the user has just launched the application. The `UndoRedoStack` will be empty at the beginning.","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"The user executes a new `UndoableCommand`, `delete 5`, to delete the 5th person in the address book. The current state of the address book is saved before the `delete 5` command executes. The `delete 5` command will then be pushed onto the `undoStack` (the current state is saved together with the command).","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 1)","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"image::UndoRedoStartingStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"As the user continues to use the program, more commands are added into the `undoStack`. For example, the user may execute `add n/David ...` to add a new person.","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 1)","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand1StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"If a command fails its execution, it will not be pushed to the `UndoRedoStack` at all.","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"The user now decides that adding the person was a mistake, and decides to undo that action using `undo`.","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"We will pop the most recent command out of the `undoStack` and push it back to the `redoStack`. We will restore the address book to the state before the `add` command executed.","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Stack Diagram (Part 2)","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"image::UndoRedoExecuteUndoStackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"If the `undoStack` is empty, then there are no other commands left to be undone, and an `Exception` will be thrown when popping the `undoStack`.","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"The following sequence diagram shows how the undo operation works:","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Sequence Diagram","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"image::UndoRedoSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"The redo does the exact opposite (pops from `redoStack`, push to `undoStack`, and restores the address book to the state after the command is executed).","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"If the `redoStack` is empty, then there are no other commands left to be redone, and an `Exception` will be thrown when popping the `redoStack`.","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"The user now decides to execute a new command, `clear`. As before, `clear` will be pushed into the `undoStack`. This time the `redoStack` is no longer empty. It will be purged as it no longer make sense to redo the `add n/David` command (this is the behavior that most modern desktop applications follow).","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 2)","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand2StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"Commands that are not undoable are not added into the `undoStack`. For example, `list`, which inherits from `Command` rather than `UndoableCommand`, will not be added after execution:","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo New Command Stack Diagram (Part 3)","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"image::UndoRedoNewCommand3StackDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"The following activity diagram summarize what happens inside the `UndoRedoStack` when a user executes a new command:","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"lohtianwei"},"content":".Undo/Redo Activity Diagram","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"image::UndoRedoActivityDiagram.png[width\u003d\"650\"]","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `UndoableCommand`","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Add a new abstract method `executeUndoableCommand()`.","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"** Pros: We will not lose any undone/redone functionality as it is now part of the default behaviour. Classes that deal with `Command` do not have to know that `executeUndoableCommand()` exist.","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"** Cons: Hard for new developers to understand the template pattern.","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"* **Alternative 2:** Just override `execute()`.","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"** Pros: Does not involve the template pattern, easier for new developers to understand.","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"** Cons: Classes that inherit from `UndoableCommand` must remember to call `super.execute()`, or lose the ability to undo/redo.","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How undo \u0026 redo executes","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Saves the entire address book.","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"** Pros: Easy to implement.","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":"** Cons: May have performance issues in terms of memory usage.","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"* **Alternative 2:** Individual command knows how to undo/redo by itself.","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"** Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"** Cons: We must ensure that the implementation of each individual command are correct.","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Type of commands that can be undone/redone","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Only include commands that modifies the address book (`add`, `clear`, `edit`).","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"** Pros: We only revert changes that are hard to change back (the view can easily be re-modified as no data are * lost).","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"** Cons: User might think that undo also applies when the list is modified (undoing filtering for example), * only to realize that it does not do that, after executing `undo`.","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"* **Alternative 2:** Include all commands.","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"** Pros: Might be more intuitive for the user.","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"** Cons: User have no way of skipping such commands if he or she just want to reset the state of the address * book and not the view.","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"**Additional Info:** See our discussion https://github.com/se-edu/addressbook-level4/issues/390#issuecomment-298936672[here].","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Aspect: Data structure to support the undo/redo commands","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Use separate stack for undo and redo.","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"** Pros: Easy to understand for new Computer Science student undergraduates to understand, who are likely to be * the new incoming developers of our project.","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"** Cons: Logic is duplicated twice. For example, when a new command is executed, we must remember to update * both `HistoryManager` and `UndoRedoStack`.","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"* **Alternative 2:** Use `HistoryManager` for undo/redo.","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"** Pros: We do not need to maintain a separate stack, and just reuse what is already in the codebase.","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"** Cons: Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two * different things.","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Player-Related Enhancements","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"lithiumlkid"},"content":"// tag::player[]","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Player Component `[since v1.3]`","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"lithiumlkid"},"content":"`Player` is one of the core components of MTM. To implement it, we used the same `Person` object and added additional attributes to it. Shown below is the","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"lithiumlkid"},"content":"new constructor for the Person object followed by the class diagram.","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"lithiumlkid"},"content":"public Person(Name name, Phone phone, Email email, Address address, Remark remark, TeamName teamName,","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"lithiumlkid"},"content":" Set\u003cTag\u003e tags, Rating rating, Position position, JerseyNumber jerseyNumber, Avatar avatar) {","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"lithiumlkid"},"content":" ...","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"lithiumlkid"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"lithiumlkid"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"lithiumlkid"},"content":" this.rating \u003d rating;","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"lithiumlkid"},"content":" this.position \u003d position;","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"lithiumlkid"},"content":" this.jerseyNumber \u003d jerseyNumber;","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"lithiumlkid"},"content":" this.avatar \u003d avatar;","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"lithiumlkid"},"content":".Person Class Diagram","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"lithiumlkid"},"content":"image::PlayerClassDiagram.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"lithiumlkid"},"content":"The additional attributes are: \u003c\u003cteam,teamName\u003e\u003e, \u003c\u003cremark,Remark\u003e\u003e, \u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e.","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"lithiumlkid"},"content":"The add and edit command has also been updated to include \u003c\u003cteam,teamName\u003e\u003e,\u003c\u003crating,Rating\u003e\u003e, \u003c\u003cposition,Position\u003e\u003e, \u003c\u003cjersey,Jersey Number\u003e\u003e and \u003c\u003cavatar,Avatar\u003e\u003e.","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"lithiumlkid"},"content":"One thing to note is that in `executeUndoableCommand()`","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"lithiumlkid"},"content":"in both add and edit commands now does two additional things, setting the file path for players avatar, and assigning a player to a team","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"lithiumlkid"},"content":"and adding person to current filtered list. Shown below is the code snippet of the new `executeUndoableCommand()` and sequence diagram","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"lithiumlkid"},"content":"of the new add command as an example.","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"lithiumlkid"},"content":"[[AddSequence]]","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"lithiumlkid"},"content":" @Override","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"lithiumlkid"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"lithiumlkid"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"lithiumlkid"},"content":" try {","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"lithiumlkid"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"lithiumlkid"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"lithiumlkid"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"lithiumlkid"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"lithiumlkid"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"lithiumlkid"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"lithiumlkid"},"content":" } else { ...","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"lithiumlkid"},"content":".Add Sequence Diagram","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"lithiumlkid"},"content":"image::AddSequenceDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"lithiumlkid"},"content":"[[rating]]","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Rating Class","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"lithiumlkid"},"content":"The `Rating` class contains a `String value`. `value` holds the players rating, an integer from 0 to 5. It uses a validation regex `[0-5]`","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"lithiumlkid"},"content":"to ensure valid input.","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Rating` is `ra/`","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"lithiumlkid"},"content":"[[position]]","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Position Class","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"lithiumlkid"},"content":"The`Position` class contains a `String value`. `value` here holds the players position, an integer from 1 to 4. It uses a validation regex `[1-4]` to ensure valid input.","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `po/`.","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"lithiumlkid"},"content":"A static hashmap is used to store and retrieve the corresponding position names of the position values. The position name can be called using the method `getPositionName()` which returns `myMap.get(value)`.","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for the `hashmap` and `getPositionName()` is shown below.","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"lithiumlkid"},"content":"private static final Map\u003cString, String\u003e myMap;","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"lithiumlkid"},"content":"static {","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"lithiumlkid"},"content":" Map\u003cString, String\u003e aMap \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"1\", \"Striker\");","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"2\", \"Midfielder\");","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"3\", \"Defender\");","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"lithiumlkid"},"content":" aMap.put(\"4\", \"Goalkeeper\");","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"lithiumlkid"},"content":" myMap \u003d Collections.unmodifiableMap(aMap);","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"lithiumlkid"},"content":"}","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"lithiumlkid"},"content":"public String getPositionName() {","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"lithiumlkid"},"content":" return myMap.get(value);","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"lithiumlkid"},"content":"}","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"lithiumlkid"},"content":"[[jersey]]","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d JerseyNumber Class","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"lithiumlkid"},"content":"The`JerseyNumber` class contains a `String value`. `value` here holds the players jersey number, an integer from 0 to 99. It uses a validation regex `[0-9]|[1-8][0-9]|9[0-9]` to ensure valid input.","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Position` is `j/`.","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"lithiumlkid"},"content":"[[avatar]]","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d\u003d\u003d Avatar Class","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"lithiumlkid"},"content":"The`Avatar` class contains a `String value`. `value` here holds the absolute filepath to the players avatar image file, a png of jpeg file. It uses a validation regex `([^\\s]+(\\.(?i)(jpg|png))$)` to ensure valid input.","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"lithiumlkid"},"content":"The prefix for `Avatar` is `av/`.","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"lithiumlkid"},"content":"When the class is created, the `value` stores the original location of the players avatar image file eg. `C:\\image.png` or if not specified, stores \"\u003cUNSPECIFIED\u003e\".","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"lithiumlkid"},"content":"Thereafter, if the avatar is specified when \u003c\u003cAddSequence,adding\u003e\u003e or editing a player, `setFilePath()` is called which will attempt to copy the image file to a `/image` folder that is in the same directory as the `MTM.jar` file.","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"lithiumlkid"},"content":"`value` is then updated to the new file path.","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"lithiumlkid"},"content":"The code snippet for setFilePath() is shown below.","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"lithiumlkid"},"content":"[source, java]","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"lithiumlkid"},"content":"public void setFilePath(String player) throws IOException {","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"lithiumlkid"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"lithiumlkid"},"content":" return;","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"lithiumlkid"},"content":" final File file \u003d new File(value);","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"lithiumlkid"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"lithiumlkid"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"lithiumlkid"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"lithiumlkid"},"content":" this.value \u003d dest.toString();","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"lithiumlkid"},"content":" }","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"lithiumlkid"},"content":"// end::player[]","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"// tag::remark[]","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Remark a Player `[since v1.1]`","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"Leaving a remark would be ideal for the user to note down any important detail of a player that is useful in the future.","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"-"},"content":"Remarks given can be in any format and therefore would not look good if it was done using tags instead, as tags are used with minimal words.","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"-"},"content":"The remark mechanism is facilitated by `RemarkCommand` and it inherits from `UndoableCommand`, making it undoable. The mechanism allows user to perform the adding, editing, and deleting of a single remark to a specified `Person` via the `INDEX` from the list shown in the `UI`. The field `remark` is similar to the other fields of `Person`, hence some of its logic in `AddCommand.java` and `EditCommand.java` are updated.","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"The mechanism uses the command `remark` and a `r/` prefix to add, edit, and delete a single remark of a `Person`. When the user leaves the remark as empty after the `r/` prefix, it is an indication to delete the remark, and when it is valid, it either create a new remark for that `Person` or overwrites the current existing remark. Only one `remark` is saved at a time. If the user `remark` on the same person, it will be overwritten.","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"-"},"content":"The field `remark` is found in `Person`, and it is not modified via `add` or `edit` commands. All functions related to `remark` is done strictly via the `remark` command.","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remark` command:","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"-"},"content":".Remark Activity Diagram","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"image::RemarkActivityDiagram.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"The `remark` field is not required when adding or editing a `Person`, and it will be initialized to an empty string or retrieved to fit the implementation of the other fields.","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows how remark is initialized as empty.","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"-"},"content":" //...AddCommandParser code...","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"-"},"content":" Remark remark \u003d new Remark(\"\");","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":" Person person \u003d new Person(name, phone, email, address, remark, teamName, tagList, rating,","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":" position, jerseyNumber, avatar);","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":" //...AddCommandParser code...","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"lithiumlkid"},"content":"}","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"-"},"content":"Code snippet from `EditCommand.java` that shows how remark is being retrieved.","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"private static Person createEditedPerson(Person personToEdit,","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":" EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":" //...EditCommand code...","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate()) ? personToEdit.getRemark()","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":" : personToEdit.getRemark();","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber,","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":" updatedAvatar);","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"lithiumlkid"},"content":"----","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` field","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Creates an additional `remark` field in `Person`.","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"** Pros: Follows the existing style of similar fields, making implementation easier.","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"** Cons: Could only have 1 remark per person, unless `remark` mechanism follows the `tag` mechanism to have multiple remarks.","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"* **Alternative 2:** Have a list of remarks that associates with the specified `Person`.","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"** Pros: Can have multiple remarks associating with a specific `Person`.","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"** Cons: Harder to maintain, more complicated.","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Remark` command","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Create a specific command for remarking `Person`.","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"** Pros: Optional for user to enter remark during add, and have an isolated command to give remarks to a player that works as an add and edit command for remark.","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"** Cons: Increases the number of commands available for the user, and could mistaken that remark can be done using add/edit command.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make it similar to how other fields are implemented in `Person`.","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"** Pros: Quick and easy implementation as it uses the same format as other fields, and can be added and modified through `add` and `edit` commands.","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"** Cons: An additional field that can be input when adding a player, making the process longer to execute the command.","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"// end::remark[]","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"// tag::privatefield[]","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Setting various player fields to private `[since v1.4]`","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"lohtianwei"},"content":"`Phone`, `Email`, `Remark`, `Rating` and `Address` of a player has an additional boolean attribute","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"lohtianwei"},"content":"`isPrivate` which tracks the privacy of the particular field. When a player is added into MTM, `isPrivate` of these","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"lohtianwei"},"content":"fields are set to \u0027false\u0027 by default.","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"lohtianwei"},"content":"Each of these fields have a different `toString` method which would return `\u003cPrivate \u0027FIELD\u0027\u003e` if privacy of","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"lohtianwei"},"content":"the field is set to \u0027true\u0027, as shown in the following code snippet:","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"lohtianwei"},"content":"@Override","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"lohtianwei"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"lohtianwei"},"content":" return value;","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"lohtianwei"},"content":"`XmlAdaptedPerson` under the storage portion has been edited to save the `isPrivate` value for the fields:","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"lohtianwei"},"content":"@XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"lohtianwei"},"content":" private Boolean phonePrivacy;","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"lohtianwei"},"content":"Toggling of privacy works in a similar way to `Edit`. New fields will be created with privacy settings of `EditPersonPrivacy`","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"lohtianwei"},"content":" based on user input. This is done by first detecting if a particular prefix is present when command is","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"lohtianwei"},"content":"entered in `TogglePrivacyCommandParser`:","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"lohtianwei"},"content":"if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"lohtianwei"},"content":"If prefix of a field is not present, the privacy setting of that particular field in `EditPersonPrivacy` would be null.","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"lohtianwei"},"content":"In `TogglePrivacyCommand`, the new fields are created with this:","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"lohtianwei"},"content":"private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"lohtianwei"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"lohtianwei"},"content":" return phone;","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"lohtianwei"},"content":"Note that in the second portion of the code, if `epp.getPrivatePhone()` is null, this would mean that it\u0027s privacy","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"lohtianwei"},"content":"setting was not toggled and thus is set to the same as it was before. Else, it would be toggled:","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"lohtianwei"},"content":"public void togglePrivacy() {","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"lohtianwei"},"content":"A new person object is then created:","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"lohtianwei"},"content":"private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"lohtianwei"},"content":"and is used to update current person:","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"lohtianwei"},"content":"model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: How field privacy is implemented","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Boolean `isPrivate` added to field classes.","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"lohtianwei"},"content":"** Pros: Privacy settings can be obtained straight from class by calling getter method.","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"lohtianwei"},"content":"** Cons: Adddtional methods are needed to set and get value of `isPrivate`.","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Field privacy settings stored in `Person` in a HashMap.","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"lohtianwei"},"content":"** Pros: Field privacy can be accessed and modified easily","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"lohtianwei"},"content":"** Cons: `Person` has to be accessed every time field privacy needs to be checked","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Privacy of fields upon adding of player","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** All newly added players\u0027 fields are not private by default.","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"lohtianwei"},"content":"** Pros: `Add` command does not need to be tweaked to allow adding player with private fields.","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"lohtianwei"},"content":"** Cons: After adding players, user has to do additional command to toggle privacy of fields.","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Include implementation of prefixes that denotes private field during `Add`.","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"lohtianwei"},"content":"** Pros: Newly added players can have private fields right away.","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"lohtianwei"},"content":"** Cons: Addtional changes has to be made to `Add` command.","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"-"},"content":"// end::privatefield[]","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Sorting players by fields `[since v1.2]`","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"lohtianwei"},"content":"The `sort` command is currently able to sort players by name, email, address, rating, jersey and postition in either ascending or descending order. Support for more fields will be added in subsequent updates.","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"lohtianwei"},"content":"* The `sort` command is parsed through `SortCommandParser` which hands control to the `SortCommand` class.","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"lohtianwei"},"content":"* Java Collections Sort API is used together with a custom `Comparator` in this implementation","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"lohtianwei"},"content":"Sorting is facilitated by the `SortCommand` which uses method `sortPlayers` to ultimately call method `sortBy` in UniquePersonList for the actual sorting as shown in this code snippet:","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"lohtianwei"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"lohtianwei"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"lohtianwei"},"content":" //... code for other switch cases...","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"lohtianwei"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"lohtianwei"},"content":"The code above utilises a custom `Comparator` defined in the sample code below:","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":"[source, java]","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"lohtianwei"},"content":"----","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"lohtianwei"},"content":"The following sequence diagram shows the program flow when `sort` is used:","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":".Sort Sequence Diagram","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"lohtianwei"},"content":"image::sortSeq.png[width\u003d\"900\"]","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"lohtianwei"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"lohtianwei"},"content":"If address book is empty, a `NoPlayerException` will be thrown by `sortBy` method in UniquePlayerList.","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `sort`","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sorting is done in `UniquePersonList`.","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"lohtianwei"},"content":"** Pros: Sorting methods resides in class that handles most operations done to list. Future changes to implementation would be easier.","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"-"},"content":"** Cons: Complicated flow of control passed between classes.","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sorting is done in `SortCommand`.","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":"** Pros: Easier to trace flow of control as lesser passing between classes.","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":"** Cons: Unnecessary coupling if `UniquePersonList` has to rely on `SortCommand`.","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort by multiple fields","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Sort can only be done by 1 field.","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and input is straightforward.","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"** Cons: Unable to fine tune to great detail how teams are sorted and displayed.","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"* **Alternative 2:** Sort can be done by multiple fields.","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":"** Pros: Able to fine tune to great detail how teams are sorted and displayed.","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":"** Cons: Unnecessary as team managers would not need to sort players by multiple fields.","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Sort Persistence","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 1 (current choice):** Address book is saved after sorting.","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"lohtianwei"},"content":"** Pros: Easy to implement. Allows team managers to use preferred sort pattern in every session.","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"lohtianwei"},"content":"** Cons: Previous order of players will be lost.","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"lohtianwei"},"content":"* **Alternative 2:** Address book is not saved after sorting.","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"** Pros: Good if team manager wants to sort players for current session only.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"lohtianwei"},"content":"** Cons: Sort order is lost when program exits. More memory is used to sort a list and reverse it after.","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Team-Related Enhancements","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"-"},"content":"// tag::team[]","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"lithiumlkid"},"content":"[[team]]","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Component `[since v1.2]`","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"-"},"content":"One of the core components to MTM is `Team`, and it is the base to creating more commands for the user to access capability on team management. The `Team` component provides user with better organizational methods for organizing their players and interact with multiple teams to manage them effectively.","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"We achieved the implementation of `Team` component by introducing a `UniqueTeamList` into the application which consists of a list of `Team` objects. `UniqueTeamList` is similar in context to `UniquePersonList` in which it keeps a unique list of all the `Team` objects. `Team` objects consist of `TeamName` object, which is used to uniquely identify the team. `Team` inherits `UniquePersonList` object which stores the a list of unique `Person` objects, containing information of the player.","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":"The class diagrams below shoes the relationship between the related classes. The Team Class Diagrams are an extension to the current existing Designs of \u003c\u003cDesign-Model, `Model`\u003e\u003e, \u003c\u003cDesign-Storage, `Storage`\u003e\u003e, and \u003c\u003cDesign-Ui, `UI`\u003e\u003e.","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":".Model Component: Team Class Diagram","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"image::TeamModelClassDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":".Storage Component: Team Class Diagram","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"image::TeamStorageClassDiagram.png[width\u003d\"400\"]","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":".UI Component: Team Class Diagram","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"image::TeamUiClassDiagram.png[width\u003d\"400\"]","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"Code snippet from `Team.java` that shows the constructor for `Team`.","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"public class Team {","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":" private final TeamName teamName;","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":" public Team(TeamName teamName) {","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"For the application to store the information of `Team` into a list, we will need to introduce a new `UniqueTeamList` variable into the `AddressBook.java`, so that it will have a container for all the new `Team` objects that is going to be created in MTM.","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the declaration and initialization of `UniqueTeamList`.","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":" //...AddressBook code...","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList;","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":" return teams.asObservableList();","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":" //...AddressBook code...","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"Since `Team` inherits the `UniquePersonList` class, we are able to store `Person` object into `Team` by using the super class method `add` in `UniquePersonList`. By storing a list of players inside `Team` object, future enhancements can easily make use of the data to perform functions that requires quick access to all players in a team. However, this have created a coupling in which data made to the `changes made to `AddressBook.persons` needs to be updated in `Team` to maintain synchronicity.","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"-"},"content":"Code snippet from `AddressBook.java` that shows the propagation of details updated in `Person` from the full player list to the `Person` objects in `Team`.","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"-"},"content":"public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"-"},"content":" //...syncEditedPerson initialisation...","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"An additional `TeamName` field is also added to `Person` so that the user can quickly determine the team the player is in through the use of `PREDICATE`.","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"Code snippet from `Person.java` that shows the `TeamName` field.","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"public class Person {","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":" private final TeamName teamName;","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":" public Person(Name name, Phone phone, Email email, Address address, Remark remark,","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":" TeamName teamName, Set\u003cTag\u003e tags, Rating rating, Position position,","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"-"},"content":" JerseyNumber jerseyNumber, Avatar avatar) {","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"-"},"content":" //...attributes initialisation...","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"-"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":" public TeamName getTeamName() {","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":" return teamName;","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":"Code snippet from `ModelManager.java` that shows the use of filtering the person list using the `TeamName` field in `Person`.","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"@Override","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"Additional exception classes are also created so that these new exceptions can be thrown during the program, such that when these exceptions are thrown, the code is easily comprehensible.","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":".`TeamNotFoundException.java`","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"public class TeamNotFoundException extends Exception {","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":" //...TeamNotFoundException...","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":".`DupliecateTeamException.java`","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"public class DuplicateTeamException extends DuplicateDataException {","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":" //...DuplicateTeamException...","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"-"},"content":"Implementing a new component into MTM, the data consisting of `Team` is also stored into storage using `XmlAdaptedTeam.java` to format the output.","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"Code snippet from `XmlAdaptedTeam.java` that shows the elements that will be stored into storage.","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":"public class XmlAdaptedTeam {","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":" private String teamName;","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Team`","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `Team` object stores a `Person` object that is also in `UniquePersonList` and `TeamName` is also an attribute of `Person`.","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"** Pros: Provides an easier lookup of person belonging in which team without the need of iterating through the `UniqueTeamList` for a specific `Person`, and provide ease of access to data for future enhancements.","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"** Cons: Checks to ensure synchronicity need to be done thoroughly to ensure that player information is in sync between Team and full player list","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"* **Alternative 2:** `Team` object is stored in `Person` object as an attribute.","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"-"},"content":"** Pros: Logical thought process to include `Team` as an attribute.","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"-"},"content":"** Cons: Excess storage wasted due to duplicated data of `Team` in every `Person`.","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"-"},"content":"// end::team[]","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"-"},"content":"// tag::teamfunction[]","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Team Functions `[since v1.4]`","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"To assist the user with manging teams, we have decided to use the design concept of Create-Read-Update-Delete (CRUD) to implement commands related to `Team`.","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"-"},"content":"This set of commands provide the basic necessities for the user to efficiently use our application.","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"-"},"content":"Based on the principles of CRUD, we have created the commands that corresponds to each principles, namely, `create`, `view`, `rename` and `assign`, `remove`.","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"-"},"content":"With these commands, the application is ready to support the features that the application is designed to be used.","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"-"},"content":"Team-related commands that modifies the data in the application, such as `create`, `rename`, `assign`, and `remove`, inherits from `UndoableCommand` class which makes all these commands undoable. Each command has its own `Parser` to uniquely parse user input arguments for the commands, so that it is validated and the command understand what it should be doing.","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"-"},"content":"For each feature, new functions are created in `AddressBook.java` and `ModelManager.java` so that the commands executed are able to manipulate the data accordingly.","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `create`: Creates a `Team`, so that other team-related commands can be executed.","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"-"},"content":"After the creation of a new team, the user will then be able to perform a new set of commands that performs team management functionality. Moreover, the `add` command can be used with the prefix `tm/` to immediately add the user into MTM and into the team specified.","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `create` command:","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":".Logic Component: Create Sequence Diagram","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram1.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"-"},"content":".Model Component: Create Sequence Diagram","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"image::TeamCreateSequenceDiagram2.png[width\u003d\"70%\"]","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `view`: Views a `Team`, which shows all players in the team.","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"The command uses the `filteredPersons` list, and an overloaded `updateFilteredPersonList` method that sets a predicate that filters the list based on a `TeamName`, in `ModelManager.java` so that it can be displayed via the UI.","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `view` command:","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":".View Sequence Diagram","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"image::TeamViewSequenceDiagram.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `rename`: Renames a given `Team`.","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":"The user can rename a specified team to a new team name only if the current team name does not existing in MTM. On a side note, it prevents the user from renaming the team to the same name that it currently have.","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"This command will update the name of the teams that are in `teams` in `AddressBook.java` and will update all the players `TeamName` field in `persons` and `Team` with the new team name.","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `rename` command:","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"-"},"content":".Logic Component: Rename Sequence Diagram","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram1.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":".Model Component: Rename Sequence Diagram","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"image::TeamRenameSequenceDiagram2.png[width\u003d\"70%\"]","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `assign`: Assign a set of `Person` to a specified `Team`.","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"The core feature that organizes the player into teams so that the user can easily view the desired team players quickly. The command have 2 functions, firstly it is able to assign an individual or a set of players to a specified team, and secondly, it is able to unassign an individual or a set of players from any team.","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"The command takes in a set of indexes that corresponds to the player in the current list, and will perform the assign operation in ascending index order. If the command is unable to process an index given, it will process all the valid index until the index that causes an issue.","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"Typical issues that the command handles are,","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"* Assigning a player to the same team that it is currently in.","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":"* Assigning a player to team that does not exist.","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"* Unassigning a player that does not exist in any team.","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"* Process index starting from 1.","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"* Removes all index that exceeds the current number of player listed.","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"This command will update and synchronise all affected players in `persons` and in the specified `Team` object, such that their `TeamName` field in `Person` are updated with the new assigned or unassigned team. At the same time, the list of players in `Team` gets update if new player are assigned or unassigned.","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `assign` command:","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":".Assign Sequence Diagram","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"image::TeamAssignSequenceDiagram.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d `remove`: Removes the given `Team`.","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":"The final step in completing the CRUD design is the removal of team. It will delete the `Team` from `teams` list in `AddressBook.java` and will update all affected players in the team to be unassigned from the team by having their `TeamName` field updated with an unspecifed field.","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":"The sequence diagram below illustrates the operation of the `remove` command:","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":".Logic Component: Remove Sequence Diagram","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram1.png[width\u003d\"100%\"]","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":".Model Component: Remove Sequence Diagram","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"-"},"content":"image::TeamRemoveSequenceDiagram2.png[width\u003d\"70%\"]","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Team Functions","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Uses CRUD design concept to create new commands.","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"** Pros: Systematic approach in dealing with what functions should be created to ensure that the product has the features required to perform team management, and provides a platform to work on ideal features that target the needs of the audience.","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"-"},"content":"** Cons: Simple and only captures the basic requirements of the product.","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"-"},"content":"* **Alternative 2:** Implement commands based on suggested features.","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"** Pros: End product will have features that targets the need of the audiences.","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"** Cons: Possible to miss out basic and core features of a team management application.","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Undoable commands for Team Functions","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Make all functions that modifies data to be undoable.","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"** Pros: Follows the current implementation of `undo` such that if data are modified in MTM, it will be an undoable command.","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"-"},"content":"** Cons: Need to ensure that regression bugs are squashed when the new commands are executed, and time consuming in identifying regression.","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"-"},"content":"* **Alternative 2:** Make all functions not undoable.","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"-"},"content":"** Pros: Easy to implement and will produce lesser regression bugs.","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"-"},"content":"** Cons: Does not align with the current implementation of `undo` \u0026 `redo`, and the user would require more steps to revert any changes made.","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"// end::teamfunction[]","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"-"},"content":"// tag::showbestxi[]","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Show Best XI `[coming in v2.0]`","isFullCredit":true},{"lineNumber":1114,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1115,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1116,"author":{"gitId":"lohtianwei"},"content":"The `showBest` command is able to show the current team\u0027s best 11 players. There is however no functional implementation for this feature yet. Coming soon!","isFullCredit":true},{"lineNumber":1117,"author":{"gitId":"-"},"content":"// end::showbestxi[]","isFullCredit":true},{"lineNumber":1118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1119,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Usability Enhancements","isFullCredit":true},{"lineNumber":1120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1121,"author":{"gitId":"-"},"content":"// tag::key[]","isFullCredit":true},{"lineNumber":1122,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d Toggle lock on MTM `[since v1.5]`","isFullCredit":true},{"lineNumber":1123,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1124,"author":{"gitId":"-"},"content":"Locking mechanism of MTM can be toggled on and off using the `Key` command. It utilises the Model to access","isFullCredit":true},{"lineNumber":1125,"author":{"gitId":"-"},"content":"user preferences of MTM. Current lock state and password is stored in `UserPrefs` in the Storage component.","isFullCredit":true},{"lineNumber":1126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1127,"author":{"gitId":"lohtianwei"},"content":"This activity diagram shows the logic behind the `Key` command:","isFullCredit":true},{"lineNumber":1128,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1129,"author":{"gitId":"lohtianwei"},"content":".Key Activity Diagram","isFullCredit":true},{"lineNumber":1130,"author":{"gitId":"lohtianwei"},"content":"image::Keyactdiag.png[width\u003d\"900\"]","isFullCredit":true},{"lineNumber":1131,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1132,"author":{"gitId":"-"},"content":"Password checking done in `Key` command:","isFullCredit":true},{"lineNumber":1133,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1134,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1135,"author":{"gitId":"-"},"content":"private boolean correctPassword() {","isFullCredit":true},{"lineNumber":1136,"author":{"gitId":"-"},"content":" UserPrefs up \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":1137,"author":{"gitId":"-"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":1138,"author":{"gitId":"-"},"content":" return hash.equals(up.getAddressBookHashedPass());","isFullCredit":true},{"lineNumber":1139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1140,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1141,"author":{"gitId":"-"},"content":"When password check is done, the lock on MTM is toggled to the state opposite of the current:","isFullCredit":true},{"lineNumber":1142,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1143,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1144,"author":{"gitId":"-"},"content":"if (correctPassword()) {","isFullCredit":true},{"lineNumber":1145,"author":{"gitId":"-"},"content":" if (model.getLockState()) {","isFullCredit":true},{"lineNumber":1146,"author":{"gitId":"-"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":1147,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1148,"author":{"gitId":"-"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":1149,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1151,"author":{"gitId":"-"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":1152,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":1153,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1154,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1156,"author":{"gitId":"-"},"content":"In a locked state, only certain functions of MTM can be used. This is to prevent unauthorised tampering with the details","isFullCredit":true},{"lineNumber":1157,"author":{"gitId":"-"},"content":"stored on MTM.","isFullCredit":true},{"lineNumber":1158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1159,"author":{"gitId":"-"},"content":"This is done in `AddressBookParser`. Commands are split into low level or not. When a command is","isFullCredit":true},{"lineNumber":1160,"author":{"gitId":"-"},"content":"being executed, it is checked if it falls under the low level category. If so, it would execute. When adding new features,","isFullCredit":true},{"lineNumber":1161,"author":{"gitId":"-"},"content":"add them to this list should you feel it is \u0027low level\u0027:","isFullCredit":true},{"lineNumber":1162,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1163,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1164,"author":{"gitId":"-"},"content":"private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {","isFullCredit":true},{"lineNumber":1165,"author":{"gitId":"-"},"content":" switch(commandWord) {","isFullCredit":true},{"lineNumber":1166,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1167,"author":{"gitId":"-"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1168,"author":{"gitId":"-"},"content":" return new ChangeThemeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1170,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1171,"author":{"gitId":"-"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1172,"author":{"gitId":"-"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1173,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1174,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1175,"author":{"gitId":"-"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1176,"author":{"gitId":"-"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":1177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1178,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1179,"author":{"gitId":"-"},"content":" case KeyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1180,"author":{"gitId":"-"},"content":" return new KeyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1182,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1183,"author":{"gitId":"-"},"content":" case ViewCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1184,"author":{"gitId":"-"},"content":" return new ViewCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1186,"author":{"gitId":"-"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1187,"author":{"gitId":"-"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":1188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1189,"author":{"gitId":"-"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1190,"author":{"gitId":"-"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":1191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1192,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":1193,"author":{"gitId":"-"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":1194,"author":{"gitId":"-"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":1195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1196,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":1197,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":1198,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1200,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1201,"author":{"gitId":"-"},"content":"If command being executed does not fall into the category of \u0027low level\u0027, a check on the lock state of MTM is done","isFullCredit":true},{"lineNumber":1202,"author":{"gitId":"-"},"content":"before allowing or restricting access:","isFullCredit":true},{"lineNumber":1203,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1204,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1205,"author":{"gitId":"-"},"content":"if (lockState) {","isFullCredit":true},{"lineNumber":1206,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_RESTRICTED);","isFullCredit":true},{"lineNumber":1207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1208,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1209,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1210,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1211,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of locking MTM","isFullCredit":true},{"lineNumber":1212,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Lock is toggled with only a single command `Key`.","isFullCredit":true},{"lineNumber":1213,"author":{"gitId":"-"},"content":"** Pros: Easy to implement, just check current lock state and switch it.","isFullCredit":true},{"lineNumber":1214,"author":{"gitId":"-"},"content":"** Cons: With a toggle, user might unlock MTM thinking he/she is locking it.","isFullCredit":true},{"lineNumber":1215,"author":{"gitId":"-"},"content":"* **Alternative 2:** Locking and unlocking of MTM is done with two separate commands.","isFullCredit":true},{"lineNumber":1216,"author":{"gitId":"-"},"content":"** Pros: Ensures that when a lock is done, MTM is truly locked.","isFullCredit":true},{"lineNumber":1217,"author":{"gitId":"-"},"content":"** Cons: Addtional command needs to be created, along with its command parser and implementations.","isFullCredit":true},{"lineNumber":1218,"author":{"gitId":"-"},"content":"// end::key[]","isFullCredit":true},{"lineNumber":1219,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1220,"author":{"gitId":"-"},"content":"// tag::changepass[]","isFullCredit":true},{"lineNumber":1221,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change Password `[coming in v2.0]`","isFullCredit":true},{"lineNumber":1222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1223,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1224,"author":{"gitId":"-"},"content":"Default password used for toggling lock on MTM is currently \u0027ilikesports\u0027. In an upcoming update, user would be able","isFullCredit":true},{"lineNumber":1225,"author":{"gitId":"-"},"content":"to change this password to one of his choosing. There is currently no functional implementation for this feature yet.","isFullCredit":true},{"lineNumber":1226,"author":{"gitId":"-"},"content":"Coming soon!","isFullCredit":true},{"lineNumber":1227,"author":{"gitId":"-"},"content":"// end::changepass[]","isFullCredit":true},{"lineNumber":1228,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1229,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d User Experience Enhancements","isFullCredit":true},{"lineNumber":1230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1231,"author":{"gitId":"-"},"content":"// tag::autocomplete[]","isFullCredit":true},{"lineNumber":1232,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Tab Autocomplete","isFullCredit":true},{"lineNumber":1233,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1234,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1235,"author":{"gitId":"-"},"content":"The tab autocomplete feature works by handling the Tab key pressed event, searching for any commands with matching prefix and returns one if found.","isFullCredit":true},{"lineNumber":1236,"author":{"gitId":"-"},"content":"The command strings are stored in a Trie data structure, named `CommandTrie`, for optimal search.","isFullCredit":true},{"lineNumber":1237,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1238,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1239,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1240,"author":{"gitId":"-"},"content":"public class CommandTrie {","isFullCredit":true},{"lineNumber":1241,"author":{"gitId":"-"},"content":" String attemptAutoComplete (String input);","isFullCredit":true},{"lineNumber":1242,"author":{"gitId":"-"},"content":" void insert (String input);","isFullCredit":true},{"lineNumber":1243,"author":{"gitId":"-"},"content":" Set\u003cString\u003e getCommandSet();","isFullCredit":true},{"lineNumber":1244,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1245,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1246,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1247,"author":{"gitId":"-"},"content":"The trie is made up of `TrieNode` objects which contains three objects. The `TrieNode sibling` represents a character on the same level as the current one. The `TrieNode child` represents a next possible letter.","isFullCredit":true},{"lineNumber":1248,"author":{"gitId":"-"},"content":"For example in the words `edit` and `exit`, the node for `d` would have a child `i` and a sibling `x`. `x` would have a child `i`.","isFullCredit":true},{"lineNumber":1249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1250,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1251,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1252,"author":{"gitId":"-"},"content":"public class TrieNode {","isFullCredit":true},{"lineNumber":1253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1254,"author":{"gitId":"-"},"content":" private TrieNode sibling;","isFullCredit":true},{"lineNumber":1255,"author":{"gitId":"-"},"content":" private TrieNode child;","isFullCredit":true},{"lineNumber":1256,"author":{"gitId":"-"},"content":" private char key;","isFullCredit":true},{"lineNumber":1257,"author":{"gitId":"-"},"content":" ...","isFullCredit":true},{"lineNumber":1258,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1260,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1261,"author":{"gitId":"-"},"content":"Upon the pressing of the tab key, the command box calls `attemptAutoComplete`, in the `commandTrie` class. With the content of the command box as the query, attemptAutoComplete searches for the query using the standard Trie search algortihm.","isFullCredit":true},{"lineNumber":1262,"author":{"gitId":"-"},"content":"If the query prefix itself is not present in the trie, then the attempt fails. If the query reaches a `TrieNode` with a `sibling` or `child` `TrieNode`,","isFullCredit":true},{"lineNumber":1263,"author":{"gitId":"-"},"content":"it will provide the user with possible commands for a given input. In this case, a dropdown box will appear in the UI that lists the possible commands for the user.","isFullCredit":true},{"lineNumber":1264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1265,"author":{"gitId":"-"},"content":"Upon finding a matching command, `attemptAutoComplete` returns it and replaces the text in the Command Line. If the no matching command is found, the text is turned red.","isFullCredit":true},{"lineNumber":1266,"author":{"gitId":"-"},"content":"// end::autocomplete[]","isFullCredit":true},{"lineNumber":1267,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1268,"author":{"gitId":"-"},"content":"// tag::enhancedadd[]","isFullCredit":true},{"lineNumber":1269,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Optional Field Add Command `[since v1.1]`","isFullCredit":true},{"lineNumber":1270,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1271,"author":{"gitId":"-"},"content":"MTM is designed to manage a multitude of players and the main function that would be used repetitively is the `add` command, hence it would alleviate the cumbersomeness of entering every detail of the players when you want the command to be executed quickly.","isFullCredit":true},{"lineNumber":1272,"author":{"gitId":"-"},"content":"Having the option to only entering the mandatory fields and leaving the optional ones empty will make the process of adding players more efficient.","isFullCredit":true},{"lineNumber":1273,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1274,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1275,"author":{"gitId":"-"},"content":"This mechanism enhances the original implementation of the `add` command.","isFullCredit":true},{"lineNumber":1276,"author":{"gitId":"-"},"content":"The required fields that are mandatory to be filled by the user are `n/NAME` and `e/EMAIL`.","isFullCredit":true},{"lineNumber":1277,"author":{"gitId":"-"},"content":"This implementation of making fields optional for `AddCommand` allows user to add players without their full information, and can be updated accordingly when the user retrieves their full information.","isFullCredit":true},{"lineNumber":1278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1279,"author":{"gitId":"-"},"content":"Code snippet from `ParserUtil.java` that shows the implementation of when a field is left empty.","isFullCredit":true},{"lineNumber":1280,"author":{"gitId":"-"},"content":"\"\u003cUNSPECIFIED\u003e\" string will be return when the value passed in is empty.","isFullCredit":true},{"lineNumber":1281,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1282,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1283,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1284,"author":{"gitId":"-"},"content":"public class ParserUtil {","isFullCredit":true},{"lineNumber":1285,"author":{"gitId":"-"},"content":" public static final String UNSPECIFIED_FIELD \u003d \"\u003cUNSPECIFIED\u003e\";","isFullCredit":true},{"lineNumber":1286,"author":{"gitId":"-"},"content":" //...ParserUtil code...","isFullCredit":true},{"lineNumber":1287,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1288,"author":{"gitId":"-"},"content":" public static Optional\u003cString\u003e parseValue(Optional\u003cString\u003e value, String messageConstraints)","isFullCredit":true},{"lineNumber":1289,"author":{"gitId":"-"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":1290,"author":{"gitId":"-"},"content":" if (value.isPresent() \u0026\u0026 value.get().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":1291,"author":{"gitId":"-"},"content":" throw new IllegalValueException(messageConstraints);","isFullCredit":true},{"lineNumber":1292,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":1293,"author":{"gitId":"-"},"content":" return Optional.of(value.orElse(UNSPECIFIED_FIELD));","isFullCredit":true},{"lineNumber":1294,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1295,"author":{"gitId":"-"},"content":" //...ParserUtil code ...","isFullCredit":true},{"lineNumber":1296,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1297,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1298,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1299,"author":{"gitId":"-"},"content":"Code snippet from `AddCommandParser.java` that shows the usage of parsing fields that are set as optional.","isFullCredit":true},{"lineNumber":1300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1301,"author":{"gitId":"-"},"content":"[source,java]","isFullCredit":true},{"lineNumber":1302,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1303,"author":{"gitId":"-"},"content":"public AddCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1304,"author":{"gitId":"-"},"content":" //...tokenize arguments...","isFullCredit":true},{"lineNumber":1305,"author":{"gitId":"-"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_EMAIL)","isFullCredit":true},{"lineNumber":1306,"author":{"gitId":"-"},"content":" || !argMultimap.getPreamble().isEmpty()) {","isFullCredit":true},{"lineNumber":1307,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,","isFullCredit":true},{"lineNumber":1308,"author":{"gitId":"-"},"content":" AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":1309,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1311,"author":{"gitId":"-"},"content":" //...get person details from arguments...","isFullCredit":true},{"lineNumber":1312,"author":{"gitId":"-"},"content":" Address address \u003d ParserUtil.parseAddress(ParserUtil.parseValue(argMultimap","isFullCredit":true},{"lineNumber":1313,"author":{"gitId":"-"},"content":" .getValue(PREFIX_ADDRESS), Address.MESSAGE_ADDRESS_CONSTRAINTS)).get();","isFullCredit":true},{"lineNumber":1314,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1315,"author":{"gitId":"-"},"content":" return new AddCommand(person);","isFullCredit":true},{"lineNumber":1316,"author":{"gitId":"-"},"content":" //...AddCommandParser code...","isFullCredit":true},{"lineNumber":1317,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1318,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1320,"author":{"gitId":"-"},"content":"Code snippet from `Address.java` that shows an example of an optional field being valid when not specified.","isFullCredit":true},{"lineNumber":1321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1322,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1323,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1324,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":1325,"author":{"gitId":"-"},"content":" //...Address code...","isFullCredit":true},{"lineNumber":1326,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":1327,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":1328,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1329,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1330,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1331,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1332,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Consideration","isFullCredit":true},{"lineNumber":1333,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of Optional fields","isFullCredit":true},{"lineNumber":1334,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1335,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** Set a default value for unspecified fields and parse fields that are mandatory.","isFullCredit":true},{"lineNumber":1336,"author":{"gitId":"-"},"content":"** Pros: Easy to implement as fields are still filled with information even though user did not specify.","isFullCredit":true},{"lineNumber":1337,"author":{"gitId":"-"},"content":"** Cons: Unattractive display of fields when it is unspecified.","isFullCredit":true},{"lineNumber":1338,"author":{"gitId":"-"},"content":"* **Alternative 2:** Require users to input all fields.","isFullCredit":true},{"lineNumber":1339,"author":{"gitId":"-"},"content":"** Pros: The current implementation is used, hence there is no additional code to ensure validity of unspecified input.","isFullCredit":true},{"lineNumber":1340,"author":{"gitId":"-"},"content":"** Cons: Less flexibility is given to the user when adding a player into the application.","isFullCredit":true},{"lineNumber":1341,"author":{"gitId":"-"},"content":"// end::enhancedadd[]","isFullCredit":true},{"lineNumber":1342,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1343,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d UI Enhancements","isFullCredit":true},{"lineNumber":1344,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1345,"author":{"gitId":"-"},"content":"// tag::teamDisplay[]","isFullCredit":true},{"lineNumber":1346,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Team Display Bar `[since v1.3]`","isFullCredit":true},{"lineNumber":1347,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1348,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1349,"author":{"gitId":"codeeong"},"content":"The Team Display Bar is implemented as `TeamDisplay` in the UI Component and renders `TeamDisplay.fxml`.","isFullCredit":true},{"lineNumber":1350,"author":{"gitId":"codeeong"},"content":"It is called from `MainWindow` and highlights","isFullCredit":true},{"lineNumber":1351,"author":{"gitId":"codeeong"},"content":"the current team that has been selected in the Command Line Interface by the user. +","isFullCredit":true},{"lineNumber":1352,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1353,"author":{"gitId":"codeeong"},"content":"It calls the `Team` model and displays the `Player` cards associated with that `Team`.","isFullCredit":true},{"lineNumber":1354,"author":{"gitId":"codeeong"},"content":"It contains event handler methods such as handleShowNewTeamEvent(), handleHighlightSelectedTeamEvent(),","isFullCredit":true},{"lineNumber":1355,"author":{"gitId":"codeeong"},"content":"and handleDeselectTeamEvent(), which update the UI accordingly. +","isFullCredit":true},{"lineNumber":1356,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1357,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `TeamDisplay` below, using the example of a `create` command:","isFullCredit":true},{"lineNumber":1358,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1359,"author":{"gitId":"codeeong"},"content":".Component interactions for `create Team` command","isFullCredit":true},{"lineNumber":1360,"author":{"gitId":"codeeong"},"content":"image::ShowNewTeamDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1361,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1362,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1363,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027TeamDisplay\u0027 to show initialisation of UI component and event handlers:","isFullCredit":true},{"lineNumber":1364,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1365,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1366,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1367,"author":{"gitId":"-"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":1368,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1369,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";","isFullCredit":true},{"lineNumber":1370,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1371,"author":{"gitId":"-"},"content":" public TeamDisplay() {","isFullCredit":true},{"lineNumber":1372,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":1373,"author":{"gitId":"codeeong"},"content":" //...initialise Teams code...","isFullCredit":true},{"lineNumber":1374,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":1375,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1376,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1377,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1378,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {","isFullCredit":true},{"lineNumber":1379,"author":{"gitId":"codeeong"},"content":" //...handleShowNewTeamEvent code...","isFullCredit":true},{"lineNumber":1380,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1381,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1382,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1383,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {","isFullCredit":true},{"lineNumber":1384,"author":{"gitId":"codeeong"},"content":" //...handleHighlightSelectedTeamEvent code...","isFullCredit":true},{"lineNumber":1385,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1386,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1387,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1388,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {","isFullCredit":true},{"lineNumber":1389,"author":{"gitId":"codeeong"},"content":" //...handleDeselectTeamEvent code...","isFullCredit":true},{"lineNumber":1390,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1391,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1392,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1393,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1394,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1395,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience","isFullCredit":true},{"lineNumber":1396,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1397,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `TeamDisplay` is placed underneath the `ResultDisplay` and above the `PersonListPanel`.","isFullCredit":true},{"lineNumber":1398,"author":{"gitId":"-"},"content":"** Pros: Located at an obvious location for the user to view the team currently selected.","isFullCredit":true},{"lineNumber":1399,"author":{"gitId":"-"},"content":"** Cons: There will be less space for the `ResultDisplay` and `CommandBox`.","isFullCredit":true},{"lineNumber":1400,"author":{"gitId":"-"},"content":"* **Alternative 2:** `TeamDisplay` is placed on the left of the `PersonListPanel` as a vertical bar.","isFullCredit":true},{"lineNumber":1401,"author":{"gitId":"-"},"content":"** Pros: There will be more space for the `ResultDisplay` and `CommandBox`.","isFullCredit":true},{"lineNumber":1402,"author":{"gitId":"-"},"content":"** Cons: It is less obvious to the user as it is at the side.","isFullCredit":true},{"lineNumber":1403,"author":{"gitId":"-"},"content":"// end::teamDisplay[]","isFullCredit":true},{"lineNumber":1404,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1405,"author":{"gitId":"-"},"content":"// tag::PlayerDetails[]","isFullCredit":true},{"lineNumber":1406,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Player Details Pane `[since v1.4]`","isFullCredit":true},{"lineNumber":1407,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1408,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1409,"author":{"gitId":"codeeong"},"content":"The `Player Details` pane is implemented as `PlayerDetails` in the UI Component.","isFullCredit":true},{"lineNumber":1410,"author":{"gitId":"codeeong"},"content":"It is called from `PlayerListPanel`. It renders `PlayerDetails.fxml` and displays the selected `PersonCard`.","isFullCredit":true},{"lineNumber":1411,"author":{"gitId":"codeeong"},"content":"It calls the `Person` model and displays the fields in the `Person` model that are not displayed in the left panel.","isFullCredit":true},{"lineNumber":1412,"author":{"gitId":"codeeong"},"content":"It contains the event handler method handlePersonDetailsChangedEvent(), which updates the UI component when the `edit `","isFullCredit":true},{"lineNumber":1413,"author":{"gitId":"codeeong"},"content":"or `remark` commands are entered. +","isFullCredit":true},{"lineNumber":1414,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1415,"author":{"gitId":"codeeong"},"content":"The component interactions can be seen in the high level sequence diagram for `PlayerDetails` below, using the example of a `remark` command:","isFullCredit":true},{"lineNumber":1416,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1417,"author":{"gitId":"codeeong"},"content":".Component interactions for `remark 1 r/test` command","isFullCredit":true},{"lineNumber":1418,"author":{"gitId":"codeeong"},"content":"image::PlayerDetailsDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1419,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1420,"author":{"gitId":"-"},"content":"Code snippet from \u0027PlayerDetails\u0027 to show initialisation of UI component:","isFullCredit":true},{"lineNumber":1421,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1422,"author":{"gitId":"-"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1423,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1424,"author":{"gitId":"-"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":1425,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1426,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";","isFullCredit":true},{"lineNumber":1427,"author":{"gitId":"-"},"content":" public final Person person;","isFullCredit":true},{"lineNumber":1428,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1429,"author":{"gitId":"-"},"content":" public PlayerDetails(Person person) {","isFullCredit":true},{"lineNumber":1430,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":1431,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":1432,"author":{"gitId":"-"},"content":" //....player details code...","isFullCredit":true},{"lineNumber":1433,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":1434,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1435,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":1436,"author":{"gitId":"codeeong"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {","isFullCredit":true},{"lineNumber":1437,"author":{"gitId":"codeeong"},"content":" ...handlePersonDetailsChangedEvent code...","isFullCredit":true},{"lineNumber":1438,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1439,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1440,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":1441,"author":{"gitId":"-"},"content":"----","isFullCredit":true},{"lineNumber":1442,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1443,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1444,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience","isFullCredit":true},{"lineNumber":1445,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1446,"author":{"gitId":"-"},"content":"* **Alternative 1 (current choice):** `PlayerDetails` is placed on the right of `Person List Panel`, replacing the `BrowserPanel`.","isFullCredit":true},{"lineNumber":1447,"author":{"gitId":"-"},"content":"** Pros: It is the only large unused space in the software left and is right beside the `Person List Panel`, thus is the logical","isFullCredit":true},{"lineNumber":1448,"author":{"gitId":"-"},"content":"place to look at after selection of a person card.","isFullCredit":true},{"lineNumber":1449,"author":{"gitId":"-"},"content":"** Cons: This is a lot of whitespace in the pane as are not many fields.","isFullCredit":true},{"lineNumber":1450,"author":{"gitId":"-"},"content":"* **Alternative 2:** `PlayerDetails` pane size is reduced and the extra space is repurposed.","isFullCredit":true},{"lineNumber":1451,"author":{"gitId":"-"},"content":"** Pros: There will be more space for another new feature e.g. calendar.","isFullCredit":true},{"lineNumber":1452,"author":{"gitId":"-"},"content":"** Cons: It can only be implemented in v2.0 due to time constraints in development.","isFullCredit":true},{"lineNumber":1453,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1454,"author":{"gitId":"codeeong"},"content":"// end::PlayerDetails[]","isFullCredit":true},{"lineNumber":1455,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1456,"author":{"gitId":"codeeong"},"content":"// tag::changeThemeCommand[]","isFullCredit":true},{"lineNumber":1457,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Change Theme Command `[since v1.5]`","isFullCredit":true},{"lineNumber":1458,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1459,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1460,"author":{"gitId":"codeeong"},"content":"The `ChangeThemeCommand` is a new feature that allows user to change the current theme to another theme. A new css class is implemented to accommodate the new theme, LightTheme.","isFullCredit":true},{"lineNumber":1461,"author":{"gitId":"codeeong"},"content":"The `MainWindow` class is also changed to contain a handleChangeThemeRequestEvent() method which is an event handler to `setAddressBookTheme`,","isFullCredit":true},{"lineNumber":1462,"author":{"gitId":"codeeong"},"content":"which is a method in `UserPrefs`. +","isFullCredit":true},{"lineNumber":1463,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1464,"author":{"gitId":"codeeong"},"content":"Below is the sequence diagram for how the `ChangeThemeCommand` works:","isFullCredit":true},{"lineNumber":1465,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1466,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `changeTheme` Command","isFullCredit":true},{"lineNumber":1467,"author":{"gitId":"codeeong"},"content":"image::ChangeThemeDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1468,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1469,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1470,"author":{"gitId":"codeeong"},"content":"Code snippet from \u0027ChangeThemeCommand\u0027:","isFullCredit":true},{"lineNumber":1471,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1472,"author":{"gitId":"codeeong"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1473,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1474,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {","isFullCredit":true},{"lineNumber":1475,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1476,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {","isFullCredit":true},{"lineNumber":1477,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();","isFullCredit":true},{"lineNumber":1478,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1479,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1480,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":1481,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":1482,"author":{"gitId":"codeeong"},"content":" //...check for valid theme code...","isFullCredit":true},{"lineNumber":1483,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));","isFullCredit":true},{"lineNumber":1484,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));","isFullCredit":true},{"lineNumber":1485,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1486,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":1487,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1488,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1489,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1490,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Command Syntax","isFullCredit":true},{"lineNumber":1491,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1492,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** The command syntax is in the form \"changeTheme Dark\" or \"changeTheme Light\".","isFullCredit":true},{"lineNumber":1493,"author":{"gitId":"codeeong"},"content":"** Pros: This supports future implementation of more themes, so that the developer can easily add the new themes without","isFullCredit":true},{"lineNumber":1494,"author":{"gitId":"codeeong"},"content":"having to change the execution.","isFullCredit":true},{"lineNumber":1495,"author":{"gitId":"codeeong"},"content":"** Cons: The command is longer than it could be. (see alternative 2)","isFullCredit":true},{"lineNumber":1496,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** The command syntax in the form \"changeTheme\", which would automatically toggle the theme.","isFullCredit":true},{"lineNumber":1497,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly.","isFullCredit":true},{"lineNumber":1498,"author":{"gitId":"codeeong"},"content":"** Cons: Future implementation of more themes would be harder for the developer as the toggle function would have to be","isFullCredit":true},{"lineNumber":1499,"author":{"gitId":"codeeong"},"content":"changed quite drastically to become a command for selecting a theme out of multiple themes.","isFullCredit":true},{"lineNumber":1500,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1501,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: User Experience","isFullCredit":true},{"lineNumber":1502,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1503,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** `ChangeThemeCommand` is implemented as a CLI command.","isFullCredit":true},{"lineNumber":1504,"author":{"gitId":"codeeong"},"content":"** Pros: Consistent with the rest of the application, of which all changes are made by the CLI.","isFullCredit":true},{"lineNumber":1505,"author":{"gitId":"codeeong"},"content":"** Cons: User has yet another command to remember the syntax of.","isFullCredit":true},{"lineNumber":1506,"author":{"gitId":"codeeong"},"content":"* **Alternative 2:** Change of theme is implemented as a button to change onClick.","isFullCredit":true},{"lineNumber":1507,"author":{"gitId":"codeeong"},"content":"** Pros: User does not have to type anything to change the theme, so it might be more user friendly.","isFullCredit":true},{"lineNumber":1508,"author":{"gitId":"codeeong"},"content":"** Cons: Inconsistent with the rest of the application, which is CLI-based.","isFullCredit":true},{"lineNumber":1509,"author":{"gitId":"codeeong"},"content":"// end::changeThemeCommand[]","isFullCredit":true},{"lineNumber":1510,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1511,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1512,"author":{"gitId":"codeeong"},"content":"// tag::settagcolour[]","isFullCredit":true},{"lineNumber":1513,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Set Tag Colour feature `[since v1.1]`","isFullCredit":true},{"lineNumber":1514,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Current Implementation","isFullCredit":true},{"lineNumber":1515,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1516,"author":{"gitId":"codeeong"},"content":"The `Set` Command is an entirely new command that allows the user to assign a colour to a specific tag.","isFullCredit":true},{"lineNumber":1517,"author":{"gitId":"codeeong"},"content":"This mechanism is facilitated by the `SetCommandParser`, which creates and returns a new `SetCommand`.","isFullCredit":true},{"lineNumber":1518,"author":{"gitId":"codeeong"},"content":"In `SetCommandParser`, which implements the `Parser` interface, it parses the arguments inputted into the CLI, and checks whether the arguments are valid.","isFullCredit":true},{"lineNumber":1519,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1520,"author":{"gitId":"codeeong"},"content":"`SetCommandParser` is implemented as such:","isFullCredit":true},{"lineNumber":1521,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1522,"author":{"gitId":"codeeong"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1523,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1524,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {","isFullCredit":true},{"lineNumber":1525,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1526,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":1527,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1528,"author":{"gitId":"codeeong"},"content":" // ...parse arguments and check for invalid arguments...","isFullCredit":true},{"lineNumber":1529,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1530,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":1531,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1532,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1533,"author":{"gitId":"codeeong"},"content":"`SetCommand` inherits the abstract `Command` class. After `execute()` is called in `SetCommand`, the tag colour is set through the logic portions of `ModelManager` and `AddressBook`, then","isFullCredit":true},{"lineNumber":1534,"author":{"gitId":"codeeong"},"content":"lastly changes `tagColour` attribute within the `Tag` object itself. It also posts an event in `SetCommand`, to which","isFullCredit":true},{"lineNumber":1535,"author":{"gitId":"codeeong"},"content":"its handler in `PersonCard` responds and performs the UI update. +","isFullCredit":true},{"lineNumber":1536,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1537,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1538,"author":{"gitId":"codeeong"},"content":"`SetCommand` is implemented in this way:","isFullCredit":true},{"lineNumber":1539,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1540,"author":{"gitId":"codeeong"},"content":"[source, java]","isFullCredit":true},{"lineNumber":1541,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1542,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {","isFullCredit":true},{"lineNumber":1543,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1544,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;","isFullCredit":true},{"lineNumber":1545,"author":{"gitId":"codeeong"},"content":" private final String tagColour;","isFullCredit":true},{"lineNumber":1546,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1547,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":1548,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);","isFullCredit":true},{"lineNumber":1549,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;","isFullCredit":true},{"lineNumber":1550,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;","isFullCredit":true},{"lineNumber":1551,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1552,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1553,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":1554,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":1555,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":1556,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);","isFullCredit":true},{"lineNumber":1557,"author":{"gitId":"codeeong"},"content":" //...check for valid tagName code....","isFullCredit":true},{"lineNumber":1558,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));","isFullCredit":true},{"lineNumber":1559,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));","isFullCredit":true},{"lineNumber":1560,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":1561,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":1562,"author":{"gitId":"codeeong"},"content":"----","isFullCredit":true},{"lineNumber":1563,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1564,"author":{"gitId":"codeeong"},"content":"The following sequence diagram shows how the set command operation works:","isFullCredit":true},{"lineNumber":1565,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1566,"author":{"gitId":"codeeong"},"content":".Interactions of the Logic Component with the UI and Model Components for the `setTagColour` Command","isFullCredit":true},{"lineNumber":1567,"author":{"gitId":"codeeong"},"content":"image::SetTagCommandDiagram.png[width\u003d\"800\"]","isFullCredit":true},{"lineNumber":1568,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1569,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d Design Considerations","isFullCredit":true},{"lineNumber":1570,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d\u003d\u003d Aspect: Implementation of `Command` vs `UndoableCommand`","isFullCredit":true},{"lineNumber":1571,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1572,"author":{"gitId":"codeeong"},"content":"* **Alternative 1 (current choice):** Inherit from `Command`.","isFullCredit":true},{"lineNumber":1573,"author":{"gitId":"codeeong"},"content":"** Pros: Does not involve complicated undo/redo tests, simple and quicker implementation,","isFullCredit":true},{"lineNumber":1574,"author":{"gitId":"codeeong"},"content":"lessen chances of mistakes made in implementation.","isFullCredit":true},{"lineNumber":1575,"author":{"gitId":"codeeong"},"content":"** Cons: User cannot use the `undo/redo` command.","isFullCredit":true},{"lineNumber":1576,"author":{"gitId":"codeeong"},"content":"* **Alternative 2 :** Inherit from `UndoableCommand`.","isFullCredit":true},{"lineNumber":1577,"author":{"gitId":"codeeong"},"content":"** Pros: User can utilise the `undo/redo` command.","isFullCredit":true},{"lineNumber":1578,"author":{"gitId":"codeeong"},"content":"** Cons: Hard for developers to implement extra tests, not very necessary as users can just as easily type","isFullCredit":true},{"lineNumber":1579,"author":{"gitId":"codeeong"},"content":"out the colour they would like to change their tag to; it is a short command, especially with the `stc` alias.","isFullCredit":true},{"lineNumber":1580,"author":{"gitId":"codeeong"},"content":"// end::settagcolour[]","isFullCredit":true},{"lineNumber":1581,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1582,"author":{"gitId":"-"},"content":"\u003d\u003d Documentation","isFullCredit":true},{"lineNumber":1583,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1584,"author":{"gitId":"-"},"content":"We use https://asciidoctor.org[asciidoc] for writing documentation.","isFullCredit":true},{"lineNumber":1585,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1586,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1587,"author":{"gitId":"-"},"content":"We chose asciidoc over Markdown because asciidoc, although a bit more complex than Markdown, provides more flexibility in formatting.","isFullCredit":true},{"lineNumber":1588,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1589,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Editing Documentation","isFullCredit":true},{"lineNumber":1590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1591,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to learn how to render `.adoc` files locally to preview the end result of your edits.","isFullCredit":true},{"lineNumber":1592,"author":{"gitId":"-"},"content":"Alternatively, you can download the AsciiDoc plugin for IntelliJ, which allows you to preview the changes you have made to your `.adoc` files in real-time.","isFullCredit":true},{"lineNumber":1593,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1594,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Publishing Documentation","isFullCredit":true},{"lineNumber":1595,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1596,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingTravis#deploying-github-pages, UsingTravis.adoc\u003e\u003e to learn how to deploy GitHub Pages using Travis.","isFullCredit":true},{"lineNumber":1597,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1598,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Converting Documentation to PDF format","isFullCredit":true},{"lineNumber":1599,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1600,"author":{"gitId":"-"},"content":"We use https://www.google.com/chrome/browser/desktop/[Google Chrome] for converting documentation to PDF format, as Chrome\u0027s PDF engine preserves hyperlinks used in webpages.","isFullCredit":true},{"lineNumber":1601,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1602,"author":{"gitId":"-"},"content":"Here are the steps to convert the project documentation files to PDF format.","isFullCredit":true},{"lineNumber":1603,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1604,"author":{"gitId":"-"},"content":". Follow the instructions in \u003c\u003cUsingGradle#rendering-asciidoc-files, UsingGradle.adoc\u003e\u003e to convert the AsciiDoc files in the `docs/` directory to HTML format.","isFullCredit":true},{"lineNumber":1605,"author":{"gitId":"-"},"content":". Go to your generated HTML files in the `build/docs` folder, right click on them and select `Open with` -\u003e `Google Chrome`.","isFullCredit":true},{"lineNumber":1606,"author":{"gitId":"-"},"content":". Within Chrome, click on the `Print` option in Chrome\u0027s menu.","isFullCredit":true},{"lineNumber":1607,"author":{"gitId":"-"},"content":". Set the destination to `Save as PDF`, then click `Save` to save a copy of the file in PDF format. For best results, use the settings indicated in the screenshot below.","isFullCredit":true},{"lineNumber":1608,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1609,"author":{"gitId":"-"},"content":".Saving documentation as PDF files in Chrome","isFullCredit":true},{"lineNumber":1610,"author":{"gitId":"-"},"content":"image::chrome_save_as_pdf.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":1611,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1612,"author":{"gitId":"-"},"content":"[[Testing]]","isFullCredit":true},{"lineNumber":1613,"author":{"gitId":"-"},"content":"\u003d\u003d Testing","isFullCredit":true},{"lineNumber":1614,"author":{"gitId":"codeeong"},"content":"If you are intending to develop our software further, it is highly recommended that you run tests in the ways listed below.","isFullCredit":true},{"lineNumber":1615,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1616,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Running Tests","isFullCredit":true},{"lineNumber":1617,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1618,"author":{"gitId":"-"},"content":"There are three ways to run tests.","isFullCredit":true},{"lineNumber":1619,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1620,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":1621,"author":{"gitId":"-"},"content":"The most reliable way to run tests is the 3rd one. The first two methods might fail some GUI tests due to platform/resolution-specific idiosyncrasies.","isFullCredit":true},{"lineNumber":1622,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1623,"author":{"gitId":"-"},"content":"*Method 1: Using IntelliJ JUnit test runner*","isFullCredit":true},{"lineNumber":1624,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1625,"author":{"gitId":"-"},"content":"* To run all tests, right-click on the `src/test/java` folder and choose `Run \u0027All Tests\u0027`","isFullCredit":true},{"lineNumber":1626,"author":{"gitId":"-"},"content":"* To run a subset of tests, you can right-click on a test package, test class, or a test and choose `Run \u0027ABC\u0027`","isFullCredit":true},{"lineNumber":1627,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1628,"author":{"gitId":"-"},"content":"*Method 2: Using Gradle*","isFullCredit":true},{"lineNumber":1629,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1630,"author":{"gitId":"-"},"content":"* Open a console and run the command `gradlew clean allTests` (Mac/Linux: `./gradlew clean allTests`)","isFullCredit":true},{"lineNumber":1631,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1632,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1633,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e for more info on how to run tests using Gradle.","isFullCredit":true},{"lineNumber":1634,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1635,"author":{"gitId":"-"},"content":"*Method 3: Using Gradle (headless)*","isFullCredit":true},{"lineNumber":1636,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1637,"author":{"gitId":"-"},"content":"Thanks to the https://github.com/TestFX/TestFX[TestFX] library we use, our GUI tests can be run in the _headless_ mode. In the headless mode, GUI tests do not show up on the screen. That means the developer can do other things on the Computer while the tests are running.","isFullCredit":true},{"lineNumber":1638,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1639,"author":{"gitId":"-"},"content":"To run tests in headless mode, open a console and run the command `gradlew clean headless allTests` (Mac/Linux: `./gradlew clean headless allTests`)","isFullCredit":true},{"lineNumber":1640,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1641,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Types of tests","isFullCredit":true},{"lineNumber":1642,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1643,"author":{"gitId":"-"},"content":"We have two types of tests:","isFullCredit":true},{"lineNumber":1644,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1645,"author":{"gitId":"-"},"content":". *GUI Tests* - These are tests involving the GUI. They include,","isFullCredit":true},{"lineNumber":1646,"author":{"gitId":"-"},"content":".. _System Tests_ that test the entire App by simulating user actions on the GUI. These are in the `systemtests` package.","isFullCredit":true},{"lineNumber":1647,"author":{"gitId":"-"},"content":".. _Unit tests_ that test the individual components. These are in `seedu.address.ui` package.","isFullCredit":true},{"lineNumber":1648,"author":{"gitId":"-"},"content":". *Non-GUI Tests* - These are tests not involving the GUI. They include,","isFullCredit":true},{"lineNumber":1649,"author":{"gitId":"-"},"content":".. _Unit tests_ targeting the lowest level methods/classes. +","isFullCredit":true},{"lineNumber":1650,"author":{"gitId":"-"},"content":"e.g. `seedu.address.commons.StringUtilTest`","isFullCredit":true},{"lineNumber":1651,"author":{"gitId":"-"},"content":".. _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). +","isFullCredit":true},{"lineNumber":1652,"author":{"gitId":"-"},"content":"e.g. `seedu.address.storage.StorageManagerTest`","isFullCredit":true},{"lineNumber":1653,"author":{"gitId":"-"},"content":".. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. +","isFullCredit":true},{"lineNumber":1654,"author":{"gitId":"-"},"content":"e.g. `seedu.address.logic.LogicManagerTest`","isFullCredit":true},{"lineNumber":1655,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1656,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1657,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Troubleshooting Testing","isFullCredit":true},{"lineNumber":1658,"author":{"gitId":"-"},"content":"**Problem: `HelpWindowTest` fails with a `NullPointerException`.**","isFullCredit":true},{"lineNumber":1659,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1660,"author":{"gitId":"-"},"content":"* Reason: One of its dependencies, `UserGuide.html` in `src/main/resources/docs` is missing.","isFullCredit":true},{"lineNumber":1661,"author":{"gitId":"-"},"content":"* Solution: Execute Gradle task `processResources`.","isFullCredit":true},{"lineNumber":1662,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1663,"author":{"gitId":"-"},"content":"\u003d\u003d Dev Ops","isFullCredit":true},{"lineNumber":1664,"author":{"gitId":"codeeong"},"content":"This section covers resources for you to develop this software with good practices and prepare it for release.","isFullCredit":true},{"lineNumber":1665,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1666,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Build Automation","isFullCredit":true},{"lineNumber":1667,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1668,"author":{"gitId":"-"},"content":"See \u003c\u003cUsingGradle#, UsingGradle.adoc\u003e\u003e to learn how to use Gradle for build automation.","isFullCredit":true},{"lineNumber":1669,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1670,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Continuous Integration","isFullCredit":true},{"lineNumber":1671,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1672,"author":{"gitId":"-"},"content":"We use https://travis-ci.org/[Travis CI] and https://www.appveyor.com/[AppVeyor] to perform _Continuous Integration_ on our projects. See \u003c\u003cUsingTravis#, UsingTravis.adoc\u003e\u003e and \u003c\u003cUsingAppVeyor#, UsingAppVeyor.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1673,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1674,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coverage Reporting","isFullCredit":true},{"lineNumber":1675,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1676,"author":{"gitId":"-"},"content":"We use https://coveralls.io/[Coveralls] to track the code coverage of our projects. See \u003c\u003cUsingCoveralls#, UsingCoveralls.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1677,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1678,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Documentation Previews","isFullCredit":true},{"lineNumber":1679,"author":{"gitId":"-"},"content":"When a pull request has changes to asciidoc files, you can use https://www.netlify.com/[Netlify] to see a preview of how the HTML version of those asciidoc files will look like when the pull request is merged. See \u003c\u003cUsingNetlify#, UsingNetlify.adoc\u003e\u003e for more details.","isFullCredit":true},{"lineNumber":1680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1681,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Making a Release","isFullCredit":true},{"lineNumber":1682,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1683,"author":{"gitId":"-"},"content":"Here are the steps to create a new release.","isFullCredit":true},{"lineNumber":1684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1685,"author":{"gitId":"-"},"content":". Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`].","isFullCredit":true},{"lineNumber":1686,"author":{"gitId":"-"},"content":". Generate a JAR file \u003c\u003cUsingGradle#creating-the-jar-file, using Gradle\u003e\u003e.","isFullCredit":true},{"lineNumber":1687,"author":{"gitId":"-"},"content":". Tag the repo with the version number. e.g. `v0.1`","isFullCredit":true},{"lineNumber":1688,"author":{"gitId":"-"},"content":". https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created.","isFullCredit":true},{"lineNumber":1689,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1690,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Managing Dependencies","isFullCredit":true},{"lineNumber":1691,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1692,"author":{"gitId":"-"},"content":"A project often depends on third-party libraries. For example, Address Book depends on the http://wiki.fasterxml.com/JacksonHome[Jackson library] for XML parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives. +","isFullCredit":true},{"lineNumber":1693,"author":{"gitId":"-"},"content":"a. Include those libraries in the repo (this bloats the repo size) +","isFullCredit":true},{"lineNumber":1694,"author":{"gitId":"-"},"content":"b. Require developers to download those libraries manually (this creates extra work for developers)","isFullCredit":true},{"lineNumber":1695,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1696,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1697,"author":{"gitId":"-"},"content":"\u003d\u003d Product Scope","isFullCredit":true},{"lineNumber":1698,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1699,"author":{"gitId":"codeeong"},"content":"This section tells you more details of our software, our target users, the user stories, and gives you a sneak peak into our development process.","isFullCredit":true},{"lineNumber":1700,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1701,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Target user profile:","isFullCredit":true},{"lineNumber":1702,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1703,"author":{"gitId":"lohtianwei"},"content":"* football team managers","isFullCredit":true},{"lineNumber":1704,"author":{"gitId":"-"},"content":"* has a need to manage a significant number of contacts","isFullCredit":true},{"lineNumber":1705,"author":{"gitId":"-"},"content":"* prefer desktop apps over other types","isFullCredit":true},{"lineNumber":1706,"author":{"gitId":"-"},"content":"* can type fast","isFullCredit":true},{"lineNumber":1707,"author":{"gitId":"-"},"content":"* prefers typing over mouse input","isFullCredit":true},{"lineNumber":1708,"author":{"gitId":"-"},"content":"* is reasonably comfortable using CLI apps","isFullCredit":true},{"lineNumber":1709,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1710,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Value proposition:","isFullCredit":true},{"lineNumber":1711,"author":{"gitId":"codeeong"},"content":"Exclusive application for management of footballers and football teams that provides an enhanced listing of footballers and convenient lookup on updated information of players.","isFullCredit":true},{"lineNumber":1712,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1713,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Feature Contribution","isFullCredit":true},{"lineNumber":1714,"author":{"gitId":"codeeong"},"content":"* Codee +","isFullCredit":true},{"lineNumber":1715,"author":{"gitId":"-"},"content":"** Major - Revamp MTM’s whole GUI for ease of viewing teams and players’ details.","isFullCredit":true},{"lineNumber":1716,"author":{"gitId":"-"},"content":"*** e.g. remove browser panel, add player details panel, change person card.","isFullCredit":true},{"lineNumber":1717,"author":{"gitId":"-"},"content":"** Minor - Command to set the colour of tags to colour of choice.","isFullCredit":true},{"lineNumber":1718,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1719,"author":{"gitId":"codeeong"},"content":"* Jordan","isFullCredit":true},{"lineNumber":1720,"author":{"gitId":"-"},"content":"** Major - Implementation of Team Component and Related Functions.","isFullCredit":true},{"lineNumber":1721,"author":{"gitId":"-"},"content":"*** e.g. creation of team, assignment of players, viewing of teams, removal of team, renaming of team.","isFullCredit":true},{"lineNumber":1722,"author":{"gitId":"codeeong"},"content":"** Minor","isFullCredit":true},{"lineNumber":1723,"author":{"gitId":"-"},"content":"*** Introduce `remark` command and `remark` field.","isFullCredit":true},{"lineNumber":1724,"author":{"gitId":"-"},"content":"*** Enhanced add functionality to allow optional fields.","isFullCredit":true},{"lineNumber":1725,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1726,"author":{"gitId":"codeeong"},"content":"* Syafiq","isFullCredit":true},{"lineNumber":1727,"author":{"gitId":"-"},"content":"** Major - Create a new player class that contains more information about the players.","isFullCredit":true},{"lineNumber":1728,"author":{"gitId":"-"},"content":"*** e.g. Position, Rating (0 - 5 Star), Remarks","isFullCredit":true},{"lineNumber":1729,"author":{"gitId":"-"},"content":"*** Update add, edit ,list, sort to include these fields accordingly.","isFullCredit":true},{"lineNumber":1730,"author":{"gitId":"codeeong"},"content":"** Minor - Autocomplete command","isFullCredit":true},{"lineNumber":1731,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":1732,"author":{"gitId":"codeeong"},"content":"* Tianwei","isFullCredit":true},{"lineNumber":1733,"author":{"gitId":"codeeong"},"content":"** Major - privacy","isFullCredit":true},{"lineNumber":1734,"author":{"gitId":"codeeong"},"content":"*** Set private field and passwords","isFullCredit":true},{"lineNumber":1735,"author":{"gitId":"codeeong"},"content":"*** Make accounts","isFullCredit":true},{"lineNumber":1736,"author":{"gitId":"codeeong"},"content":"** Minor - Sorting players by different fields","isFullCredit":true},{"lineNumber":1737,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1738,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1739,"author":{"gitId":"-"},"content":"\u003d\u003d User Stories","isFullCredit":true},{"lineNumber":1740,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1741,"author":{"gitId":"-"},"content":"Priorities: High (must have) - `* * \\*`, Medium (nice to have) - `* \\*`, Low (unlikely to have) - `*`","isFullCredit":true},{"lineNumber":1742,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1743,"author":{"gitId":"-"},"content":"[width\u003d\"75%\",cols\u003d\"^8%,^23%,\u003c25%,\u003c30%\",options\u003d\"header\",]","isFullCredit":true},{"lineNumber":1744,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1745,"author":{"gitId":"-"},"content":"|Priority |As a ... |I want to ... |So that I can...","isFullCredit":true},{"lineNumber":1746,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":1747,"author":{"gitId":"-"},"content":"4.1+^s|First Time User Stories","isFullCredit":true},{"lineNumber":1748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1749,"author":{"gitId":"-"},"content":"|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App","isFullCredit":true},{"lineNumber":1750,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1751,"author":{"gitId":"-"},"content":"|`* * *` |new user |access the user guide |find out how to use fancy features of the application","isFullCredit":true},{"lineNumber":1752,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1753,"author":{"gitId":"-"},"content":"|`* * *` |new user |see a list of instructions available |navigate and use the application easily","isFullCredit":true},{"lineNumber":1754,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1755,"author":{"gitId":"-"},"content":"4.1+^s|Player Related User Stories","isFullCredit":true},{"lineNumber":1756,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1757,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add a new player|","isFullCredit":true},{"lineNumber":1758,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1759,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s address |mail him important documents","isFullCredit":true},{"lineNumber":1760,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1761,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s contact number |contact him when needed","isFullCredit":true},{"lineNumber":1762,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1763,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s email |email him when needed","isFullCredit":true},{"lineNumber":1764,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1765,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s jersey number |easily identify them during the game","isFullCredit":true},{"lineNumber":1766,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1767,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player’s position |easily pick my lineup for match","isFullCredit":true},{"lineNumber":1768,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1769,"author":{"gitId":"-"},"content":"|`* * *` |team manager |add player\u0027s ratings |easily identify the better players","isFullCredit":true},{"lineNumber":1770,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1771,"author":{"gitId":"-"},"content":"|`* * *` |team manager |delete a player |remove him if I kick him out from the team or he quits","isFullCredit":true},{"lineNumber":1772,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1773,"author":{"gitId":"-"},"content":"|`* * *` |team manager |find a player by name |locate details of players without having to go through the entire list","isFullCredit":true},{"lineNumber":1774,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1775,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s contact number |","isFullCredit":true},{"lineNumber":1776,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1777,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s email |","isFullCredit":true},{"lineNumber":1778,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1779,"author":{"gitId":"-"},"content":"|`* * *` |team manager |edit player’s jersey number |","isFullCredit":true},{"lineNumber":1780,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1781,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s match stats (e.g. goals scored) |decide the lineup, give award","isFullCredit":true},{"lineNumber":1782,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1783,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player remarks |for self note","isFullCredit":true},{"lineNumber":1784,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1785,"author":{"gitId":"-"},"content":"|`* *` |team manager |add player’s avatar |for facial recognition","isFullCredit":true},{"lineNumber":1786,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1787,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s position |easily pick my lineup for match","isFullCredit":true},{"lineNumber":1788,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1789,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s address |","isFullCredit":true},{"lineNumber":1790,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1791,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s avatar |","isFullCredit":true},{"lineNumber":1792,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1793,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player remarks |for self note","isFullCredit":true},{"lineNumber":1794,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1795,"author":{"gitId":"-"},"content":"|`* *` |team manager |hide \u003c\u003cprivate-contact-detail,private contact details\u003e\u003e by default |minimize chance of someone else seeing them by accident","isFullCredit":true},{"lineNumber":1796,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1797,"author":{"gitId":"-"},"content":"|`*` |team manager |edit player’s name |","isFullCredit":true},{"lineNumber":1798,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1799,"author":{"gitId":"-"},"content":"|`*` |team manager with many players in the team managing application |sort by player name |locate a person easily","isFullCredit":true},{"lineNumber":1800,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1801,"author":{"gitId":"-"},"content":"4.1+^s|Team Related User Stories","isFullCredit":true},{"lineNumber":1802,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1803,"author":{"gitId":"-"},"content":"|`* * *` |team manager |create teams |organize and manage my players through their respective team","isFullCredit":true},{"lineNumber":1804,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1805,"author":{"gitId":"-"},"content":"|`* * *` |team manager |assign player to teams |identify the team that the player is playing for","isFullCredit":true},{"lineNumber":1806,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1807,"author":{"gitId":"-"},"content":"|`* * *` |team manager |view players in specified team |identify the lineup of the team and which player belongs to which team","isFullCredit":true},{"lineNumber":1808,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1809,"author":{"gitId":"-"},"content":"|`* * *` |team manager |remove teams |remove teams that I no longer managed","isFullCredit":true},{"lineNumber":1810,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1811,"author":{"gitId":"-"},"content":"|`* *` |team manager |set match with competing team |acknowledge and plan training session for the team","isFullCredit":true},{"lineNumber":1812,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1813,"author":{"gitId":"-"},"content":"|`* *` |team manager |view upcoming match |keep track of the upcoming matches with opponent teams","isFullCredit":true},{"lineNumber":1814,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1815,"author":{"gitId":"-"},"content":"|`* *` |team manager |edit player’s allocated team |move players between teams","isFullCredit":true},{"lineNumber":1816,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1817,"author":{"gitId":"-"},"content":"|`* *` |team manager |schedule training programs for team |I do not have any conflicting schedule between different teams","isFullCredit":true},{"lineNumber":1818,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1819,"author":{"gitId":"-"},"content":"|`* *` |team manager |send reminder to team of schedule |my players does not forget about training session","isFullCredit":true},{"lineNumber":1820,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1821,"author":{"gitId":"-"},"content":"|`*` |team manager |sort by team name |identify group lineup easily","isFullCredit":true},{"lineNumber":1822,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1823,"author":{"gitId":"-"},"content":"4.1+^s|Additional User Stories","isFullCredit":true},{"lineNumber":1824,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1825,"author":{"gitId":"-"},"content":"|`* *` |team manager who remembers better with visual |set colours to tags |easily identify the tag that I have set to players","isFullCredit":true},{"lineNumber":1826,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1827,"author":{"gitId":"-"},"content":"|`* *` |team manager |autofill command |perform task quickly","isFullCredit":true},{"lineNumber":1828,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1829,"author":{"gitId":"-"},"content":"|`* *` |team manager |password login |if team manager wants to protect certain information","isFullCredit":true},{"lineNumber":1830,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":1831,"author":{"gitId":"-"},"content":"|`* *` |team manager |submit feedback to developers |developers can improve the application constantly","isFullCredit":true},{"lineNumber":1832,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1833,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1834,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1835,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1836,"author":{"gitId":"-"},"content":"\u003d\u003d Use Cases","isFullCredit":true},{"lineNumber":1837,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1838,"author":{"gitId":"-"},"content":"(For all use cases below, the *System* is the `MTM` and the *Team Manager* is the `user`, unless specified otherwise)","isFullCredit":true},{"lineNumber":1839,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1840,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1841,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Add player","isFullCredit":true},{"lineNumber":1842,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1843,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1844,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1845,"author":{"gitId":"-"},"content":"1. User enter command to add","isFullCredit":true},{"lineNumber":1846,"author":{"gitId":"-"},"content":"2. MTM prompt user of format to enter player\u0027s name and details","isFullCredit":true},{"lineNumber":1847,"author":{"gitId":"-"},"content":"3. User enter player\u0027s name and details in required format","isFullCredit":true},{"lineNumber":1848,"author":{"gitId":"-"},"content":"4. User press enter to insert person into storage","isFullCredit":true},{"lineNumber":1849,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1850,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1851,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1852,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1853,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1854,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1855,"author":{"gitId":"-"},"content":"* 4a. User did not enter any details.","isFullCredit":true},{"lineNumber":1856,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1857,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1858,"author":{"gitId":"-"},"content":"** 4a1. MTM inform user that it is an invalid add command.","isFullCredit":true},{"lineNumber":1859,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1860,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1861,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1862,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1863,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Edit player\u0027s team","isFullCredit":true},{"lineNumber":1864,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1865,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1866,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1867,"author":{"gitId":"-"},"content":"1. User enter command to find","isFullCredit":true},{"lineNumber":1868,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name","isFullCredit":true},{"lineNumber":1869,"author":{"gitId":"-"},"content":"3. MTM display list of players found","isFullCredit":true},{"lineNumber":1870,"author":{"gitId":"-"},"content":"4. User enter command to edit player\u0027s team using index of displayed list","isFullCredit":true},{"lineNumber":1871,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1872,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1873,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1874,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1875,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1876,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1877,"author":{"gitId":"-"},"content":"* 2a. Player name does not exist.","isFullCredit":true},{"lineNumber":1878,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1879,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1880,"author":{"gitId":"-"},"content":"** 2a1. MTM inform user that player does not exist.","isFullCredit":true},{"lineNumber":1881,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1882,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1883,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1884,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Find player by team name","isFullCredit":true},{"lineNumber":1886,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1887,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1888,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1889,"author":{"gitId":"-"},"content":"1. User enter command to find team","isFullCredit":true},{"lineNumber":1890,"author":{"gitId":"-"},"content":"2. User enter team name","isFullCredit":true},{"lineNumber":1891,"author":{"gitId":"-"},"content":"3. MTM display list of players in team","isFullCredit":true},{"lineNumber":1892,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1893,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1894,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1895,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1896,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1897,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1898,"author":{"gitId":"-"},"content":"* 2a. Team name does not exist.","isFullCredit":true},{"lineNumber":1899,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1900,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1901,"author":{"gitId":"-"},"content":"** 2a1. MTM informs user that team name does not exist","isFullCredit":true},{"lineNumber":1902,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1903,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1904,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1905,"author":{"gitId":"-"},"content":"[discrete]","isFullCredit":true},{"lineNumber":1906,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Use case: Remove player from team","isFullCredit":true},{"lineNumber":1907,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1908,"author":{"gitId":"-"},"content":"*MSS*","isFullCredit":true},{"lineNumber":1909,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1910,"author":{"gitId":"-"},"content":"1. User enter command to find","isFullCredit":true},{"lineNumber":1911,"author":{"gitId":"-"},"content":"2. User enter player\u0027s name","isFullCredit":true},{"lineNumber":1912,"author":{"gitId":"-"},"content":"3. MTM display list of players found","isFullCredit":true},{"lineNumber":1913,"author":{"gitId":"-"},"content":"4. User enter remove command and index associated with player","isFullCredit":true},{"lineNumber":1914,"author":{"gitId":"-"},"content":"5. MTM displays player that is removed and updated list of players","isFullCredit":true},{"lineNumber":1915,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1916,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1917,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1918,"author":{"gitId":"-"},"content":"*Extensions*","isFullCredit":true},{"lineNumber":1919,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1920,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1921,"author":{"gitId":"-"},"content":"* 4a. Invalid index entered.","isFullCredit":true},{"lineNumber":1922,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1923,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1924,"author":{"gitId":"-"},"content":"** 4a1. MTM informs user that index is invalid.","isFullCredit":true},{"lineNumber":1925,"author":{"gitId":"-"},"content":"** 4a2. User enters valid index.","isFullCredit":true},{"lineNumber":1926,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1927,"author":{"gitId":"-"},"content":"Use case resumes at step 5.","isFullCredit":true},{"lineNumber":1928,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1929,"author":{"gitId":"-"},"content":"* 4b. User removes wrong index unintentionally.","isFullCredit":true},{"lineNumber":1930,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1931,"author":{"gitId":"-"},"content":"[none]","isFullCredit":true},{"lineNumber":1932,"author":{"gitId":"-"},"content":"** 4b1. User undo remove by entering command to undo.","isFullCredit":true},{"lineNumber":1933,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":1934,"author":{"gitId":"-"},"content":"Use case ends.","isFullCredit":true},{"lineNumber":1935,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1936,"author":{"gitId":"-"},"content":"_{More to be added}_","isFullCredit":true},{"lineNumber":1937,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1938,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1939,"author":{"gitId":"-"},"content":"\u003d\u003d Non Functional Requirements","isFullCredit":true},{"lineNumber":1940,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1941,"author":{"gitId":"codeeong"},"content":". Should work on any mainstream OS as long as it has Java 1.8.0_60 or higher installed.","isFullCredit":true},{"lineNumber":1942,"author":{"gitId":"-"},"content":". Should be able to hold up to 150 players without a noticeable sluggishness in performance for typical usage.","isFullCredit":true},{"lineNumber":1943,"author":{"gitId":"-"},"content":". A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse.","isFullCredit":true},{"lineNumber":1944,"author":{"gitId":"codeeong"},"content":". Works on both 32-bit and 64-bit machines","isFullCredit":true},{"lineNumber":1945,"author":{"gitId":"codeeong"},"content":". Should respond within 1 second of query","isFullCredit":true},{"lineNumber":1946,"author":{"gitId":"codeeong"},"content":". Should be intuitive and easy to use for a first-time user.","isFullCredit":true},{"lineNumber":1947,"author":{"gitId":"codeeong"},"content":". Should be able to handle any sort of input, i.e. should recover from invalid input.","isFullCredit":true},{"lineNumber":1948,"author":{"gitId":"codeeong"},"content":". Should have audience-focused user guides and developer guides.","isFullCredit":true},{"lineNumber":1949,"author":{"gitId":"codeeong"},"content":". Should have command names that concisely describe their function.","isFullCredit":true},{"lineNumber":1950,"author":{"gitId":"codeeong"},"content":". Should be an open-source project.","isFullCredit":true},{"lineNumber":1951,"author":{"gitId":"codeeong"},"content":". Development be cost effective or free.","isFullCredit":true},{"lineNumber":1952,"author":{"gitId":"codeeong"},"content":". App should be able to work offline.","isFullCredit":true},{"lineNumber":1953,"author":{"gitId":"-"},"content":". Should save and backup the state of the team managing application regularly.","isFullCredit":true},{"lineNumber":1954,"author":{"gitId":"codeeong"},"content":". Current versions must be backward compatible with older versions to support undo.","isFullCredit":true},{"lineNumber":1955,"author":{"gitId":"codeeong"},"content":". The user interface should be simple and minimise distractions so that user can continue with their work in a focused manner.","isFullCredit":true},{"lineNumber":1956,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1957,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1958,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1959,"author":{"gitId":"-"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":1960,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1961,"author":{"gitId":"-"},"content":"[[mainstream-os]] Mainstream OS::","isFullCredit":true},{"lineNumber":1962,"author":{"gitId":"-"},"content":"Windows, Linux, Unix, OS-X","isFullCredit":true},{"lineNumber":1963,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1964,"author":{"gitId":"-"},"content":"[[private-contact-detail]] Private contact detail::","isFullCredit":true},{"lineNumber":1965,"author":{"gitId":"-"},"content":"A contact detail that is not meant to be shared with others","isFullCredit":true},{"lineNumber":1966,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1967,"author":{"gitId":"-"},"content":"[[lineuo]] Lineup::","isFullCredit":true},{"lineNumber":1968,"author":{"gitId":"-"},"content":"A list of players that are playing for a match, with their positions specified","isFullCredit":true},{"lineNumber":1969,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1970,"author":{"gitId":"-"},"content":"[[user-guide]] User Guide::","isFullCredit":true},{"lineNumber":1971,"author":{"gitId":"-"},"content":"A documentation on the functionality and usability of MTM","isFullCredit":true},{"lineNumber":1972,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1973,"author":{"gitId":"-"},"content":"[appendix]","isFullCredit":true},{"lineNumber":1974,"author":{"gitId":"-"},"content":"\u003d\u003d Instructions for Manual Testing","isFullCredit":true},{"lineNumber":1975,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1976,"author":{"gitId":"-"},"content":"Given below are instructions to test the app manually.","isFullCredit":true},{"lineNumber":1977,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1978,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":1979,"author":{"gitId":"-"},"content":"These instructions only provide a starting point for testers to work on; testers are expected to do more _exploratory_ testing.","isFullCredit":true},{"lineNumber":1980,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1981,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Launch and Shutdown","isFullCredit":true},{"lineNumber":1982,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1983,"author":{"gitId":"-"},"content":". Initial launch","isFullCredit":true},{"lineNumber":1984,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1985,"author":{"gitId":"-"},"content":".. Download the jar file and copy into an empty folder","isFullCredit":true},{"lineNumber":1986,"author":{"gitId":"-"},"content":".. Double-click the jar file +","isFullCredit":true},{"lineNumber":1987,"author":{"gitId":"-"},"content":" Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.","isFullCredit":true},{"lineNumber":1988,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1989,"author":{"gitId":"-"},"content":". Saving window preferences","isFullCredit":true},{"lineNumber":1990,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1991,"author":{"gitId":"-"},"content":".. Resize the window to an optimum size. Move the window to a different location. Close the window.","isFullCredit":true},{"lineNumber":1992,"author":{"gitId":"-"},"content":".. Re-launch the app by double-clicking the jar file. +","isFullCredit":true},{"lineNumber":1993,"author":{"gitId":"-"},"content":" Expected: The most recent window size and location is retained.","isFullCredit":true},{"lineNumber":1994,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1995,"author":{"gitId":"-"},"content":"_{ more test cases ... }_","isFullCredit":true},{"lineNumber":1996,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1997,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Deleting a player","isFullCredit":true},{"lineNumber":1998,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1999,"author":{"gitId":"codeeong"},"content":". Deleting a player while all players are listed","isFullCredit":true},{"lineNumber":2000,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2001,"author":{"gitId":"codeeong"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list.","isFullCredit":true},{"lineNumber":2002,"author":{"gitId":"-"},"content":".. Test case: `delete 1` +","isFullCredit":true},{"lineNumber":2003,"author":{"gitId":"codeeong"},"content":" Expected: First player is deleted from the list. Details of the deleted player shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2004,"author":{"gitId":"-"},"content":".. Test case: `delete 0` +","isFullCredit":true},{"lineNumber":2005,"author":{"gitId":"-"},"content":" Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2006,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `delete`, `delete x` (where x is larger than the list size) _{give more}_ +","isFullCredit":true},{"lineNumber":2007,"author":{"gitId":"-"},"content":" Expected: Similar to previous.","isFullCredit":true},{"lineNumber":2008,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2009,"author":{"gitId":"-"},"content":"_{ more test cases ... }_","isFullCredit":true},{"lineNumber":2010,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2011,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Saving data","isFullCredit":true},{"lineNumber":2012,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2013,"author":{"gitId":"-"},"content":". Dealing with missing/corrupted data files","isFullCredit":true},{"lineNumber":2014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2015,"author":{"gitId":"-"},"content":".. _{explain how to simulate a missing/corrupted file and the expected behavior}_","isFullCredit":true},{"lineNumber":2016,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2017,"author":{"gitId":"-"},"content":"_{ more test cases ... }_","isFullCredit":true},{"lineNumber":2018,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2019,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Remarking a player","isFullCredit":true},{"lineNumber":2020,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2021,"author":{"gitId":"-"},"content":". Remarking a player while all players are listed","isFullCredit":true},{"lineNumber":2022,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2023,"author":{"gitId":"-"},"content":".. Prerequisites: List all players using the `list` command. Multiple players in the list.","isFullCredit":true},{"lineNumber":2024,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/This is my remark to you.` +","isFullCredit":true},{"lineNumber":2025,"author":{"gitId":"-"},"content":"Expected: First player is remarked from the list. Details of the remarked player shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2026,"author":{"gitId":"-"},"content":".. Test case: `remark 0` +","isFullCredit":true},{"lineNumber":2027,"author":{"gitId":"-"},"content":"Expected: No person is remarked. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2028,"author":{"gitId":"-"},"content":".. Other incorrect delete commands to try: `remark`, `remark x` (where x is larger than the list size), `remark -1`, `remark 2 x/` (where x is not the prefix for remark) +","isFullCredit":true},{"lineNumber":2029,"author":{"gitId":"-"},"content":"Expected: Similar to previous.","isFullCredit":true},{"lineNumber":2030,"author":{"gitId":"-"},"content":".. Test case: `remark 1` +","isFullCredit":true},{"lineNumber":2031,"author":{"gitId":"-"},"content":"Expected: First player has its remark removed. Details of the remarked player shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2032,"author":{"gitId":"-"},"content":".. Test case: `remark 1 r/I want to delete this.` -\u003e `remark 1 r/` +","isFullCredit":true},{"lineNumber":2033,"author":{"gitId":"-"},"content":"Expected: Similar to previous.","isFullCredit":true},{"lineNumber":2034,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2035,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Adding a player without all fields","isFullCredit":true},{"lineNumber":2036,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2037,"author":{"gitId":"-"},"content":". Adding a player where player is unique","isFullCredit":true},{"lineNumber":2038,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2039,"author":{"gitId":"-"},"content":".. Prerequisites: Newly added player must not exist in MTM.","isFullCredit":true},{"lineNumber":2040,"author":{"gitId":"-"},"content":".. Test case: `add n/Tumeric Turner e/tt@tuner.com` +","isFullCredit":true},{"lineNumber":2041,"author":{"gitId":"-"},"content":"Expected: Player added into MTM and will be on the list. Details of the newly added player shown in the status message. Fields that are not input during addition are replaced with `\u003cUNSPECIFIED\u003e` Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2042,"author":{"gitId":"-"},"content":".. Test case: `add n/Guavi Hollae` +","isFullCredit":true},{"lineNumber":2043,"author":{"gitId":"-"},"content":"Expected: Player is not added into MTM. Errors details shown in status message. Name and email are compulsory fields that need to be entered for `add` to work.","isFullCredit":true},{"lineNumber":2044,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2045,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Functions","isFullCredit":true},{"lineNumber":2046,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2047,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a Team","isFullCredit":true},{"lineNumber":2048,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2049,"author":{"gitId":"-"},"content":". Creating a Team with current existing data in MTM","isFullCredit":true},{"lineNumber":2050,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2051,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently does not exist in MTM.","isFullCredit":true},{"lineNumber":2052,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +","isFullCredit":true},{"lineNumber":2053,"author":{"gitId":"-"},"content":"Expected: Team is created and displayed in Team Display Panel. Team name will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2054,"author":{"gitId":"-"},"content":".. Test case: `create NUSTeam` +","isFullCredit":true},{"lineNumber":2055,"author":{"gitId":"-"},"content":"Expected: Team is not created due to team already existing in MTM. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2056,"author":{"gitId":"-"},"content":".. Test case: `create \u0026-Team-\u0026` +","isFullCredit":true},{"lineNumber":2057,"author":{"gitId":"-"},"content":"Expected: Team does not allow names with special characters, only alphanumeric, can consist of all numbers and can contain space in name. Team Display Panel remains the same. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2058,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2059,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a Team","isFullCredit":true},{"lineNumber":2060,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2061,"author":{"gitId":"-"},"content":". Viewing a Team with current existing data in MTM","isFullCredit":true},{"lineNumber":2062,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2063,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM.","isFullCredit":true},{"lineNumber":2064,"author":{"gitId":"-"},"content":"... Test case: `view Arsenal` +","isFullCredit":true},{"lineNumber":2065,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be updated with list of players that are in the Team. Team name will be shown in the status message.","isFullCredit":true},{"lineNumber":2066,"author":{"gitId":"-"},"content":"... Test case: `view NonExistingTeam` +","isFullCredit":true},{"lineNumber":2067,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM. Error details shown in the status message.","isFullCredit":true},{"lineNumber":2068,"author":{"gitId":"-"},"content":"... Test case: `view chelsea` +","isFullCredit":true},{"lineNumber":2069,"author":{"gitId":"-"},"content":"Expected: Team is not viewed as it does not exist in MTM, as team names are case sensitive. Error details shown in the status message.","isFullCredit":true},{"lineNumber":2070,"author":{"gitId":"-"},"content":".. Prerequisites: The command `create NUSTeam` was executed right before executing this test case.","isFullCredit":true},{"lineNumber":2071,"author":{"gitId":"-"},"content":"... Test case: `view NUSTeam` +","isFullCredit":true},{"lineNumber":2072,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be selected. Player list will be empty as no players are in the team yet. Team name will be shown in the status message.","isFullCredit":true},{"lineNumber":2073,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2074,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning Players to Team","isFullCredit":true},{"lineNumber":2075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2076,"author":{"gitId":"-"},"content":". Assigning players to a Team after executing `create NUSTeam`","isFullCredit":true},{"lineNumber":2077,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2078,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/1 3 5` +","isFullCredit":true},{"lineNumber":2079,"author":{"gitId":"-"},"content":"Expected: Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2080,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/3` +","isFullCredit":true},{"lineNumber":2081,"author":{"gitId":"-"},"content":"Expected: No player is assigned as player already exist in the team. Error details shown in the status message. Status bar remains the same.","isFullCredit":true},{"lineNumber":2082,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/2 3 4` +","isFullCredit":true},{"lineNumber":2083,"author":{"gitId":"-"},"content":"Expected: Only the player at index 2 is assigned. Assign command will stop once it detects that a player cannot be assigned. Team Display Panel will not be updated. Person Card of index 2 will be updated with assigned team. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2084,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/9 6 4` +","isFullCredit":true},{"lineNumber":2085,"author":{"gitId":"-"},"content":"Expected: All players will be assigned by ascending index order. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2086,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/7 40` +","isFullCredit":true},{"lineNumber":2087,"author":{"gitId":"-"},"content":"Expected: Index exceeding the number of players listed in the Player List Panel will be ignored. Team in Team Display panel will be selected. Player list will be updated with list of players that are in the Team with the newly assigned players. Each individual player assign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2088,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam i/-1` +","isFullCredit":true},{"lineNumber":2089,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message. Team is not viewed.","isFullCredit":true},{"lineNumber":2090,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign NUSTeam` +","isFullCredit":true},{"lineNumber":2091,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Invalid command format as no index is given. Team is not viewed.","isFullCredit":true},{"lineNumber":2092,"author":{"gitId":"-"},"content":".. Test case: `assign NoTeam` +","isFullCredit":true},{"lineNumber":2093,"author":{"gitId":"-"},"content":"Expected: Error deatils shown in the status message. No such team found in MTM. Team is not viewed, player list not updated.","isFullCredit":true},{"lineNumber":2094,"author":{"gitId":"-"},"content":".. Test case: `add n/Barry Putter e/bp@hotwot.com tm/NUSTeam` +","isFullCredit":true},{"lineNumber":2095,"author":{"gitId":"-"},"content":"Expected: New person is added into MTM. Team in Team Display Panel will be selected. Player list will be updated with the new added person. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2096,"author":{"gitId":"-"},"content":".. Test case: `add n/Himonie Branger e/hb@notwot.com tm/MissingTeam` +","isFullCredit":true},{"lineNumber":2097,"author":{"gitId":"-"},"content":"Expected: Person is not added into MTM. Team does not exist in MTM. Error details shown in the status message.","isFullCredit":true},{"lineNumber":2098,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2099,"author":{"gitId":"-"},"content":". Unassigning players from a Team","isFullCredit":true},{"lineNumber":2100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2101,"author":{"gitId":"-"},"content":".. Prerequisites: Players are already existing in the team","isFullCredit":true},{"lineNumber":2102,"author":{"gitId":"-"},"content":".. Test case: `view NUSTeam` -\u003e `assign i/1 2 3` +","isFullCredit":true},{"lineNumber":2103,"author":{"gitId":"-"},"content":"Expected: Player list will be updated as the specified players to be unassigned will be removed from the team. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2104,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/10 11` +","isFullCredit":true},{"lineNumber":2105,"author":{"gitId":"-"},"content":"Expected: Player list will be updated with the specified players to be unassigned will have their team name updated to `\u003cUNSPECIFIED\u003e`. Each individual player unassign will be shown in the status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2106,"author":{"gitId":"-"},"content":".. Test case: `assign i/NUS` +","isFullCredit":true},{"lineNumber":2107,"author":{"gitId":"-"},"content":"Expected: Invalid index will have error details shown in the status message.","isFullCredit":true},{"lineNumber":2108,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `assign i/1` +","isFullCredit":true},{"lineNumber":2109,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Player already has no team and can\u0027t be unassigned.","isFullCredit":true},{"lineNumber":2110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2111,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Renaming a Team","isFullCredit":true},{"lineNumber":2112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2113,"author":{"gitId":"-"},"content":". Renaming a Team after assigning players above","isFullCredit":true},{"lineNumber":2114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2115,"author":{"gitId":"-"},"content":".. Prerequisites: Ensure that the team to be renamed into does not exist","isFullCredit":true},{"lineNumber":2116,"author":{"gitId":"-"},"content":".. Test case: `rename NUSTeam tm/SUNTeam` +","isFullCredit":true},{"lineNumber":2117,"author":{"gitId":"-"},"content":"Expected: Team in Team Display Panel will be renamed to the new team name. New team name will be selected in the Team Display Panel. Player list of all the players in the new team name will be displayed. All players in the team will have their team name updated to the new team name. Team rename will be shown in the result status message. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2118,"author":{"gitId":"-"},"content":".. Test case: `rename NewTeam tm/MooTeam` +","isFullCredit":true},{"lineNumber":2119,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename does not exist in MTM.","isFullCredit":true},{"lineNumber":2120,"author":{"gitId":"-"},"content":".. Test case: `rename SUNTeam tm/\u0026-Team` +","isFullCredit":true},{"lineNumber":2121,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team to be rename into is invalid and should only contains alphanumeric characters.","isFullCredit":true},{"lineNumber":2122,"author":{"gitId":"-"},"content":".. Test case: `rename tm/SmoovTeam` +","isFullCredit":true},{"lineNumber":2123,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Did not specify which team to rename and will indicate invalid command format.","isFullCredit":true},{"lineNumber":2124,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2125,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a Team","isFullCredit":true},{"lineNumber":2126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2127,"author":{"gitId":"-"},"content":". Removing a Team after renaming the team above","isFullCredit":true},{"lineNumber":2128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":2129,"author":{"gitId":"-"},"content":".. Prerequisites: Team currently exist in MTM.","isFullCredit":true},{"lineNumber":2130,"author":{"gitId":"-"},"content":".. Test case: `view SUNTeam` -\u003e `remove SUNTeam` +","isFullCredit":true},{"lineNumber":2131,"author":{"gitId":"-"},"content":"Expected: Team is removed and Team Display Panel is updated to reflect that the team has been removed. Team name that is being removed will be shown in the status message. All players in the team will have their team name updated in the Player List Panel. Player List Panel will show the full list of players in MTM. Timestamp in the status bar is updated.","isFullCredit":true},{"lineNumber":2132,"author":{"gitId":"-"},"content":".. Test case: `list` -\u003e `remove Arsenal` +","isFullCredit":true},{"lineNumber":2133,"author":{"gitId":"-"},"content":"Expected: Similar to above, will be displaying full list of players before and after `remove` command.","isFullCredit":true},{"lineNumber":2134,"author":{"gitId":"-"},"content":".. Test case: `remove SUNTeam` +","isFullCredit":true},{"lineNumber":2135,"author":{"gitId":"-"},"content":"Expected: Error details shown in the status message. Team does not exist in MTM.","isFullCredit":true},{"lineNumber":2136,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2137,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d Appearance Related Functions","isFullCredit":true},{"lineNumber":2138,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2139,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Changing a Theme","isFullCredit":true},{"lineNumber":2140,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2141,"author":{"gitId":"codeeong"},"content":". Changing the theme that MTM is currently on","isFullCredit":true},{"lineNumber":2142,"author":{"gitId":"codeeong"},"content":".. Test case: `cte Dark` (if current theme is Light) or `cte Light` (if current theme is Dark) +","isFullCredit":true},{"lineNumber":2143,"author":{"gitId":"codeeong"},"content":"Expected: MTM colour scheme will change to the respective themes as shown below:","isFullCredit":true},{"lineNumber":2144,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2145,"author":{"gitId":"codeeong"},"content":"image::DarkTheme.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":2146,"author":{"gitId":"codeeong"},"content":"image::LightTheme.png[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":2147,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2148,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2149,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d Setting Tag Colours","isFullCredit":true},{"lineNumber":2150,"author":{"gitId":"codeeong"},"content":". Setting the tags to colour of choice","isFullCredit":true},{"lineNumber":2151,"author":{"gitId":"codeeong"},"content":".. Prerequisites: Player has tags","isFullCredit":true},{"lineNumber":2152,"author":{"gitId":"codeeong"},"content":".. Test case: `setTagColour t/redCard tc/blue`","isFullCredit":true},{"lineNumber":2153,"author":{"gitId":"codeeong"},"content":"Expected: All tags with the name `redCard` would become blue","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":189,"lohtianwei":210,"codeeong":253,"-":1501}},{"path":"docs/UserGuide.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"\u003d My Team Manager - User Guide","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":":toc:","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":toc-title: Table Of Contents","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":":toclevels: 3","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":":toc-placement: preamble","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":":sectnums:","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":":imagesDir: images","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":":stylesDir: stylesheets","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":":xrefstyle: full","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":":experimental:","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"ifdef::env-github[]","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":":tip-caption: :bulb:","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":":note-caption: :information_source:","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":":important-caption: :white_check_mark:","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"endif::[]","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":":repoURL: https://github.com/CS2103JAN2018-F14-B1/main","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"By: `F14-B1` Since: `Mar 2018` Licence: `MIT`","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"// tag::introduction[]","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"\u003d\u003d Introduction","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"My Team Manager (MTM) is a link:https://en.wikipedia.org/wiki/Command-line_interface[Command-Line Interface] (CLI) based address book application for *football team managers*.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"It is a one-stop solution to help you manage your player\u0027s contact details in an efficient and convenient manner.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"Using MTM, you can organize players into teams, view player statistics, and, generate player line-ups.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"Head to \u003c\u003cQuick Start\u003e\u003e to get started with My Team Manager!","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"\u003d\u003d Quick Start","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"Welcome! If you want to learn more about using My Team Manager, you\u0027ve come to the right place. My Team Manager is the easiest","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"way for you to manage your team efficiently, and this quick start section will help you learn the basics so you can get going.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"Your teams, their players, and all the relevant information is organized clearly in My Team Manager. Teams can be created and","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"players can be assigned to teams.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Before we begin","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":". Ensure you have Java version `1.8.0_60` or later installed in your Computer.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":". You can download Java 8 link:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html[here].","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"* Having any Java 8 version is not enough. +","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"* This app will not work with *earlier* or *later* versions of Java 8.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":". Download the latest `MyTeamManager.jar` link:{repoURL}/releases[here].","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":". Copy the file to the folder you want to use as the home folder for your MTM.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":". Double-click the file to start the app. The software interface should appear in a few seconds as shown below.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"+","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"image::UiNew.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Navigating the interface","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"The figure below shows the different components in My Team Manager and the list below explains their purpose.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"image::UIGuide.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":". *Command Box*: This is where you _key in the commands_ to use My Team Manager.","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":". *Display Box*: The display box _displays results_ to any command you input.","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":". *Team List* : This _displays the teams_ you have created in My Team Manager. +","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"* If a team is being viewed, it would be highlighted.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":". *Details Panel*: This _displays details of the player_ that is currently selected. +","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"* Here, the player\u0027s _name_, _phone number_, _address_, _email_, _jersey number_ followed by _remarks_ are shown.","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":". *Systems Panel*: This displays information regarding modification to MTM\u0027s data.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"* On the left, it displays the time and date when MTM is last updated.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"* On the right, is the location of the data.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":". *Player List*: This is the list of player cards. In each player card, +","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"* The player\u0027s _name_, _tags_, _team_, _rating_, followed by _position_ is displayed.","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"* The player\u0027s _avatar_ is also shown on the right column.","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lithiumlkid"},"content":"[[Using_Commands]]","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Using Commands","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":".*Getting started with Commands*","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"* Words in `UPPER_CASE` are the parameters to be supplied by the user.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"** An example in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"* Fields that are in enclosed with `[ ]` are optional.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"** An example, `n/NAME [t/TAG]`, can be used as, `n/John Doe t/friend`, or as, `n/John Doe`.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"* Items with `…`​ after them can be used multiple times including zero times.","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"** In this example, `[t/TAG]...`, these parameters are valid, `t/friend`, `t/friend t/family`, and even `{nbsp}` (no parameter).","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"* Parameters can be entered in any order.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"** For example, if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":".*The Use of Alias*","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"* Some commands have an alias that you can use to execute the command. This alias acts as a shortcut to execute the commands you want without typing the full command out.","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"** For example, you can type the alias `a` instead of the `add` command word to add a player into MTM.","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":".*Lookout for Tips, Notes, and Expected Outcomes*","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"TIP: This box give _tips_ that *might be useful*.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"NOTE: This box _notes_ down *important details* regarding a feature.","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"IMPORTANT: This box will let you know the _outcome_ and what MTM should be *expected to do*.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"****","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lithiumlkid"},"content":"Now that you are familiar with the interface and using commands, you are now ready to begin using My Team Manager!","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Three steps to get started","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Add your first player","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lithiumlkid"},"content":". Add your first player, `Ronaldo` by typing the command `add n/Ronaldo e/Ronaldo@arsenal.com` in the command box and pressing kbd:[Enter] to execute it.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lithiumlkid"},"content":"image::add.png[width\u003d\"400\"]","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lithiumlkid"},"content":". Your new player, `Ronaldo` should appear in the player list as shown in the white box above.","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lithiumlkid"},"content":"TIP: The `Add` command has additional optional parameters for you to include more information. For the full list,","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"refer to \u003c\u003cadd, Adding a player\u003e\u003e.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Create your first team","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lithiumlkid"},"content":"Now that you have a player, let\u0027s explore teams. Teams allow you to manage and group your players together according to","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lithiumlkid"},"content":"the teams they belong to.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lithiumlkid"},"content":". Create your first team, `NUS` by typing the command `create NUS` in the command box and pressing kbd:[Enter] to execute it.","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lithiumlkid"},"content":"image::create.PNG[width\u003d\"300\"]","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lithiumlkid"},"content":". Your new team, `NUS` should appear in the team list.","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lithiumlkid"},"content":". You can now assign `Ronaldo` to `NUS` by typing the command `assign tm/NUS i/1` in the command box and pressing kbd:[Enter] to execute it.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lithiumlkid"},"content":"- The Team List should now show NUS highlighted as shown in the white box labeled 1 above.","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lithiumlkid"},"content":"- `Ronaldo` \u0027s player card should now show NUS in the team field as shown in the white box labeled 2 above.","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lithiumlkid"},"content":"- The player list shows only players assigned to the team `NUS`","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Viewing more details","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":". View more details about a player, by entering `select` followed by the \u003c\u003cIndex, `INDEX`\u003e\u003e of the player. For example, to view","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lithiumlkid"},"content":"`Ronaldo` \u0027s details, enter `select 1`.","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lithiumlkid"},"content":". The details panel should now show the player\u0027s details.","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lithiumlkid"},"content":"image::select.png[width\u003d\"790\"]","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lithiumlkid"},"content":"+","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lithiumlkid"},"content":". You may notice that there are fields that show `\u003cUNSPECIFIED\u003e`. These are optional fields that you can edit later on.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lithiumlkid"},"content":"There are also many ways you can customize and add to My Team Manager. Here are a few ways to start:","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":".. \u003c\u003cedit, Editing a player\u003e\u003e","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003cchangeTheme, Changing MTM theme\u003e\u003e","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csetTagColour, Setting Tag Colour\u003e\u003e","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":".. \u003c\u003ctoggleprivacy, Setting privacy\u003e\u003e","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lithiumlkid"},"content":".. \u003c\u003csort, Sorting players in the list\u003e\u003e","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lithiumlkid"},"content":"// end::introduction[]","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Commands in My Team Manager","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful information regarding all the commands in My Team Manager.","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lithiumlkid"},"content":"If you are not familiar on how to use commands yet, you can refer to \u003c\u003cUsing_Commands\u003e\u003e","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Fundamentals","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lithiumlkid"},"content":"MTM provides tools that gives you the power to use MTM more efficiently and teach you how to navigate through MTM with ease.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lithiumlkid"},"content":"Enter commands more quickly with \u003c\u003cautocomplete,kbd:[tab] autocomplete\u003e\u003e, get \u003c\u003chelp,help\u003e\u003e or find out how to \u003c\u003cundo,undo\u003e\u003e and \u003c\u003credo,redo\u003e\u003e commands.","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lithiumlkid"},"content":"You can also find information to secure your information in My Team Manger by \u003c\u003ctogglePrivacy, toggling privacy\u003e\u003e or \u003c\u003ckey,set a key to prevent tampering\u003e\u003e","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Saving the data","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"There is no need to save anything manually as My Team Manager will save","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"any data entered directly to the hard drive.","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"// tag::autocomplete[]","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"[[autocomplete]]","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Using kbd:[tab] Autocomplete","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"After typing in the first few characters of a command, pressing kbd:[tab] will fill in the rest of the item.","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"To view the parameters for a command, press tab after the whole command is typed in. Pressing tab again will remove the parameters.","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"You can use the autocompleted parameters as a template after viewing them.","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"lithiumlkid"},"content":"Text will turn red if the input has no parameters or if no matching command exists.","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"lithiumlkid"},"content":"If there are multiple possible commands for a given input, i.e. \u0027e\u0027 could be \u0027edit\u0027 or \u0027exit\u0027,","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"then a dropdown box will appear with the possible commands. These can be navigated using mouse or arrow keys. Press enter to select the desired command.","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"// end::autocomplete[]","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"[[help]]","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing help : `help`","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"Feeling lost? Not sure what to do? Don\u0027t worry, our friendly guide will help you! All you have to do is just type the `help` command, and you will get all the information you require.","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"Format: `help` +","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"Alias: kbd:[F1]","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"[[history]]","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing entered commands : `history`","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"Have you been extensively using MTM and in the midst of entering more commands, you could not remember what commands you have entered? MTM allows you to look at all your past commands that you have entered in reverse chronological order.","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"Format: `history` +","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"Alias: `h`","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"* Pressing the kbd:[\u0026uarr;] and kbd:[\u0026darr;] arrows will display the previous and next input respectively in the command box.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"A list of your previously entered command will be shown to you.","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"// tag::undoredo[]","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"[[undo]]","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Undoing previous command : `undo`","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":"Have you entered a wrong command or might have accidentally entered the wrong values to the specified fields to a command? +","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"You don\u0027t have to worry, as MTM provides you with the command to undo most mistakes that you might have made. MTM will restore itself to the state before the previous command was executed.","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"Format: `undo` +","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"Alias: `u`","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"* There are a few commands that can be undoable: commands that modify MTM\u0027s content that are related to players or teams.","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"** Player related commands: `add`, `delete`, `edit`, `clear`, `remark` +","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"** Team related commands: `create`, `assign`, `remove`, `rename`","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"Commands that are _undoAble_ will be reversed and MTM will be in the state before the command was executed.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"[[redo]]","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Redoing the previously undone command : `redo`","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"codeeong"},"content":"If you accidentally call the `undo` command too many times and need a way to quickly reverse that, MTM allows you to redo the most recent `undo` command.","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":"Format: `redo` +","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"Alias: `r`","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":"Previously executed `undo` command will be reversed and MTM will be in its previous state.","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"// end::undoredo[]","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":"// tag::togglePrivacy[]","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":"[[toggleprivacy]]","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling various fields to private: `toggleprivacy` `[Since v1.4]`","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"You can toggle the privacy of various fields of players in MTM.","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":"Format: `toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]` +","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"Alias: `tp`","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"codeeong"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":"* Current version of `toggleprivacy` supports the field to be privated: +","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":"** `p/`: PHONE, `e/`: EMAIL, `r/`: REMARK, `ra/`:RATING \u0026 `a/`: ADDRESS.","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"Privacy of field will be toggled between private or public. +","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":"If Phone: `p/` of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1 is private, running command: `tp 1 p/` would change phone field to public. +","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"Private fields are shown as \u003cPrivate `FIELD`\u003e.","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"Here are some examples on how you can use the `toggleprivacy` command:","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"* `tp 1 p/ ra/`","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":"Toggles privacy of phone and rating of player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1.","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"// end::togglePrivacy[]","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":"// tag::key[]","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":"[[key]]","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Toggling lock on MTM: `key` `[Since v1.5]`","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":"You can toggle a lock on MTM to prevent unauthorised changes to your details in MTM. When MTM is in a locked state, functionality will be limited.","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"Format: `key PASSWORD` +","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":"Alias: `k`","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":"* Current version of `key` uses a fixed default `PASSWORD`: *ilikesports*","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"When MTM is locked, only the following commands can be executed: +","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"`changeTheme`, `exit`, `find`, `help`, `key`, `list`, `sort` and `view`","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":"Here are examples on how to use `key`:","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":"* `key ilikesports`","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"If MTM is in a lock state, use this command to unlock it.","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":"* `key ilikesports`","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"To lock MTM, use this command to lock.","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"// end::key[]","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":"[[clear]]","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Clearing all entries : `clear`","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":"You can clear all entries from MTM with the \u0027clear\u0027 command.","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":"Format: `clear` +","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":"Alias: `c`","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":"[[exit]]","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Exiting the program : `exit`","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"You can exit the program by entering the \u0027exit\u0027 command.","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":"Format: `exit`","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your players and their information in My Team Manager +","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003cadd,adding a player\u003e\u003e, \u003c\u003cedit,editing a player\u003e\u003e or \u003c\u003cremark,adding a remark\u003e\u003e.","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools to \u003c\u003cfind,find\u003e\u003e a player or \u003c\u003csort,sort\u003e\u003e players in your list.","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"lithiumlkid"},"content":"// tag::addplayer[]","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":"[[add]]","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Adding a player: `add`","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"lithiumlkid"},"content":"This is the command that you will be using most frequently, especially when dealing with new players. You will be able to add new players with the details that you have obtained into MTM by using the `add` command.","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"lithiumlkid"},"content":"Format: `add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]...` +","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":"Alias: `a`","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":"The table below explains the correct inputs for the parameters.","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":"[width\u003d\"80%\",cols\u003d\"1,2,2\",options\u003d\"header\"]","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":"|Parameter |Input type |Example","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":"|n/NAME |Player name | n/Ronaldo","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"|e/EMAIL |Player\u0027s email address | a/ronaldo@soccer.com","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":"|tm/TEAM |Player\u0027s Team | tm/Real Madrid","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"|a/ADDRESS |Player\u0027s address| a/Blk 123 Bukit Batok St 21","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":"|p/PHONE_NUMBER| Player\u0027s phone number| p/92343433","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":"|j/JERSEY_NUMBER| Player\u0027s jersey number| j/17","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":"|ra/RATING| Player\u0027s performance rating (From 1 to 5)| ra/5","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":"|po/POSITION| Player\u0027s postion +","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":"(1 for Striker, +","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":"2 for Midfiled, +","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"3 for Defender, +","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":"4 for Goalkeeper)| po/1","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":"|av/AVATAR| Absolute filepath to player\u0027s avatar image file| av/C:\\avatar.png (for Windows) av//User/username/path/to/image.jpg (for MacOS)","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":"|t/TAG| Your tag for the player| t/Injured","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":"* A player can only be added to an existing team.","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":"* If you have not created the team yet, you can create one first using the \u003c\u003cCreating a team: `create` `[Since v1.2]`, `create`\u003e\u003e command.","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":"[TIP]","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"A player can have any number of tags (including 0).","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"Output: The added player should appear in the player list panel.","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":"* `add n/Mo Salah e/mo@soccer.com`","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":"Adds a player named `Mo Salah` with email `mo@soccer.com`.","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"* `add n/Ronaldo p/92331322 e/ronaldo@soccer.com a/Portugal tm/Real Madrid j/17 ra/5 po/1`","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":"Adds a player named Ronaldo with phone number `92331322`, email `ronaldo@soccer.com`, address `Portugal`,","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":"team `Real Madrid`, jersey number `17`, rating `5`, and position `1` corresponding to `Striker`.","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":"[[edit]]","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Editing a player : `edit`","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"lithiumlkid"},"content":"If you made a mistake when adding a player, or if there\u0027s player information that needs updating, you may edit an existing player in MTM with the \u0027edit\u0027 command.","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":"Format: `edit INDEX [n/NAME] [e/EMAIL] [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]...` +","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":"Alias: `e`","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":"* Edits the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e.","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":"* Please only edit the player that is currently being selected. If you were to edit a player who is not selected, the player\u0027s details will be updated, but the selection will remain at the currently selected player.","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":"* At least one of the optional fields must be provided.","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":"* Existing values will be updated to the input values.","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":"* When you edit tags, the existing tags of the player will be removed i.e adding of tags is not cumulative.","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":"* You can remove all the player\u0027s tags by typing `t/` without specifying any tags after it.","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":"* `edit 1 p/91234567 e/johndoe@example.com`","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"Edits the phone number and email address of the 1st player to be `91234567` and `johndoe@example.com` respectively.","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":"* `edit 2 n/Betsy Crower t/`","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":"Edits the name of the 2nd player to be `Betsy Crower` and clears all existing tags.","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"lithiumlkid"},"content":"// end::addplayer[]","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":"[[delete]]","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Deleting a player : `delete`","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"codeeong"},"content":"If you want to remove a player from MTM, you may use this command to delete the player.","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":"Format: `delete INDEX` +","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":"Alias: `d`","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":"* Deletes the player at the specified \u003c\u003cIndex, `INDEX`\u003e\u003e.","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":"* `list`","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"* `delete 2`","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":"Deletes the 2nd player in the MTM.","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":"* `find Betsy`","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"-"},"content":"* `delete 1`","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":452,"author":{"gitId":"lohtianwei"},"content":"Deletes the 1st player in the results of the `find` command.","isFullCredit":true},{"lineNumber":453,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":454,"author":{"gitId":"-"},"content":"[[remark]]","isFullCredit":true},{"lineNumber":455,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Noting down a remark for player: `remark` `[Since v1.1]`","isFullCredit":true},{"lineNumber":456,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":457,"author":{"gitId":"-"},"content":"When you need to drop yourself a self-note with regards to a specific player you\u0027re managing, you can make a self-note","isFullCredit":true},{"lineNumber":458,"author":{"gitId":"-"},"content":"of a specific player easily by giving the player a remark for you to remember by.","isFullCredit":true},{"lineNumber":459,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":460,"author":{"gitId":"-"},"content":"Format: `remark INDEX [r/[REMARK]]` +","isFullCredit":true},{"lineNumber":461,"author":{"gitId":"-"},"content":"Alias: `rm`","isFullCredit":true},{"lineNumber":462,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":463,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":464,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":465,"author":{"gitId":"-"},"content":"* By leaving out `r/REMARK` or `REMARK`, the command acts as a remark removal.","isFullCredit":true},{"lineNumber":466,"author":{"gitId":"-"},"content":"* Only use the `remark` command when you want to leave a remark, `add` or `edit` does not allow you to create a remark for the player.","isFullCredit":true},{"lineNumber":467,"author":{"gitId":"-"},"content":"* Please only add remarks to the player that is currently being selected. If you were to add remarks to a player who is not selected, the player\u0027s remarks will be updated, but the selection will remain at the currently selected player.","isFullCredit":true},{"lineNumber":468,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":469,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":470,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":471,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":472,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":473,"author":{"gitId":"-"},"content":"Your specified player will either be given a new remark or have its existing remark removed.","isFullCredit":true},{"lineNumber":474,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":475,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":476,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `remark` command:","isFullCredit":true},{"lineNumber":477,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":478,"author":{"gitId":"-"},"content":"* `remark 1`","isFullCredit":true},{"lineNumber":479,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":480,"author":{"gitId":"-"},"content":"Removes the remark from the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 1.","isFullCredit":true},{"lineNumber":481,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":482,"author":{"gitId":"-"},"content":"* `remark 5 r/MVP Player`","isFullCredit":true},{"lineNumber":483,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":484,"author":{"gitId":"-"},"content":"Give a remark to the specified player at \u003c\u003cIndex, `INDEX`\u003e\u003e 5 with the remark \"MVP Player\".","isFullCredit":true},{"lineNumber":485,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":486,"author":{"gitId":"-"},"content":"[[list]]","isFullCredit":true},{"lineNumber":487,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Listing all players : `list`","isFullCredit":true},{"lineNumber":488,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":489,"author":{"gitId":"-"},"content":"To view a list of all the players you are managing, you can use the `list` command to see all of your players.","isFullCredit":true},{"lineNumber":490,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":491,"author":{"gitId":"-"},"content":"Format: `list` +","isFullCredit":true},{"lineNumber":492,"author":{"gitId":"-"},"content":"Alias: `l`","isFullCredit":true},{"lineNumber":493,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":494,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":495,"author":{"gitId":"lohtianwei"},"content":"// tag::sort[]","isFullCredit":true},{"lineNumber":496,"author":{"gitId":"lithiumlkid"},"content":"[[sort]]","isFullCredit":true},{"lineNumber":497,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sorting players by field: `sort` `[Since v1.2]`","isFullCredit":true},{"lineNumber":498,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":499,"author":{"gitId":"-"},"content":"You can sort the players by fields with the \u0027sort\u0027 command. Players can be sorted in both ascending or descending order.","isFullCredit":true},{"lineNumber":500,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":501,"author":{"gitId":"-"},"content":"Format: `sort FIELD ORDER` +","isFullCredit":true},{"lineNumber":502,"author":{"gitId":"-"},"content":"Alias: `so`","isFullCredit":true},{"lineNumber":503,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":504,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":505,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":506,"author":{"gitId":"-"},"content":"* Current version of `sort` supports the following fields and order:","isFullCredit":true},{"lineNumber":507,"author":{"gitId":"-"},"content":"** `FIELD`: `name`, `email`, `address`, `rating`, `jersey` \u0026 `position`","isFullCredit":true},{"lineNumber":508,"author":{"gitId":"-"},"content":"** `ORDER`: `asc` \u0026 `desc`","isFullCredit":true},{"lineNumber":509,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":510,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":511,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `sort` command:","isFullCredit":true},{"lineNumber":512,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":513,"author":{"gitId":"-"},"content":"* `sort name asc`","isFullCredit":true},{"lineNumber":514,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":515,"author":{"gitId":"-"},"content":"This will sort MTM by names, in alphabetical order.","isFullCredit":true},{"lineNumber":516,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":517,"author":{"gitId":"-"},"content":"* `sort name desc`","isFullCredit":true},{"lineNumber":518,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":519,"author":{"gitId":"-"},"content":"This will sort MTM by names, in reverse alphabetical order.","isFullCredit":true},{"lineNumber":520,"author":{"gitId":"lohtianwei"},"content":"// end::sort[]","isFullCredit":true},{"lineNumber":521,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":522,"author":{"gitId":"-"},"content":"[[find]]","isFullCredit":true},{"lineNumber":523,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Locating players by name: `find`","isFullCredit":true},{"lineNumber":524,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":525,"author":{"gitId":"-"},"content":"You can find a player whose name contain any of the given keywords with this command within the full player listing of MTM.","isFullCredit":true},{"lineNumber":526,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":527,"author":{"gitId":"-"},"content":"Format: `find KEYWORD [KEYWORD]...` +","isFullCredit":true},{"lineNumber":528,"author":{"gitId":"-"},"content":"Alias: `f`","isFullCredit":true},{"lineNumber":529,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":530,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":531,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":532,"author":{"gitId":"-"},"content":"* The search is case insensitive. e.g `hans` will match `Hans`.","isFullCredit":true},{"lineNumber":533,"author":{"gitId":"-"},"content":"* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`.","isFullCredit":true},{"lineNumber":534,"author":{"gitId":"-"},"content":"* Only the name is searched.","isFullCredit":true},{"lineNumber":535,"author":{"gitId":"-"},"content":"* Only full words will be matched e.g. `Han` will not match `Hans`.","isFullCredit":true},{"lineNumber":536,"author":{"gitId":"-"},"content":"* Players matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`.","isFullCredit":true},{"lineNumber":537,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":538,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":539,"author":{"gitId":"-"},"content":"Examples:","isFullCredit":true},{"lineNumber":540,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":541,"author":{"gitId":"-"},"content":"* `find John`","isFullCredit":true},{"lineNumber":542,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":543,"author":{"gitId":"-"},"content":"MTM will find all players with the name `john` with uppercase/lowercase characters in it.","isFullCredit":true},{"lineNumber":544,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":545,"author":{"gitId":"-"},"content":"* `find Betsy Tim John`","isFullCredit":true},{"lineNumber":546,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":547,"author":{"gitId":"-"},"content":"Display all players that have the name `betsy`, `tim`, or `john`.","isFullCredit":true},{"lineNumber":548,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":549,"author":{"gitId":"-"},"content":"[[select]]","isFullCredit":true},{"lineNumber":550,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Selecting a player : `select`","isFullCredit":true},{"lineNumber":551,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":552,"author":{"gitId":"-"},"content":"Identified the player you\u0027re looking for and want to see more details about the player?","isFullCredit":true},{"lineNumber":553,"author":{"gitId":"-"},"content":"MTM offers you the ability to view details of your specified player via an \u003c\u003cIndex, `INDEX`\u003e\u003e shown in the current listing of players.","isFullCredit":true},{"lineNumber":554,"author":{"gitId":"-"},"content":"Alternatively, you can just scroll to the player you want, click their card,","isFullCredit":true},{"lineNumber":555,"author":{"gitId":"-"},"content":"and their details will be displayed on the right hand side of the screen.","isFullCredit":true},{"lineNumber":556,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":557,"author":{"gitId":"-"},"content":"Format: `select INDEX` +","isFullCredit":true},{"lineNumber":558,"author":{"gitId":"-"},"content":"Alias: `s`","isFullCredit":true},{"lineNumber":559,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":560,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":561,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":562,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":563,"author":{"gitId":"codeeong"},"content":"The details panel will display your selected player\u0027s name, phone number, address, email address,","isFullCredit":true},{"lineNumber":564,"author":{"gitId":"codeeong"},"content":"jersey number, and remarks on the right side of the screen.","isFullCredit":true},{"lineNumber":565,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":566,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":567,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `select` command:","isFullCredit":true},{"lineNumber":568,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":569,"author":{"gitId":"-"},"content":"* `list`","isFullCredit":true},{"lineNumber":570,"author":{"gitId":"-"},"content":"* `select 2`","isFullCredit":true},{"lineNumber":571,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":572,"author":{"gitId":"-"},"content":"Displays the list of all players and selects the 2nd player in that list.","isFullCredit":true},{"lineNumber":573,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":574,"author":{"gitId":"-"},"content":"* `find Betsy`","isFullCredit":true},{"lineNumber":575,"author":{"gitId":"-"},"content":"* `select 1`","isFullCredit":true},{"lineNumber":576,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":577,"author":{"gitId":"-"},"content":"Finds a player named `betsy` and selects the 1st player in the results of the `find` command.","isFullCredit":true},{"lineNumber":578,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":579,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands","isFullCredit":true},{"lineNumber":580,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":581,"author":{"gitId":"lithiumlkid"},"content":"Here you can find commands to change your teams and their players in My Team Manager +","isFullCredit":true},{"lineNumber":582,"author":{"gitId":"lithiumlkid"},"content":"such as \u003c\u003ccreate,creating a team\u003e\u003e, \u003c\u003cassign,assigning players to a team\u003e\u003e or \u003c\u003crename,renaming a team\u003e\u003e.","isFullCredit":true},{"lineNumber":583,"author":{"gitId":"lithiumlkid"},"content":"You can also find useful tools like \u003c\u003cview,viewing a team\u003e\u003e.","isFullCredit":true},{"lineNumber":584,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":585,"author":{"gitId":"-"},"content":"// tag::create[]","isFullCredit":true},{"lineNumber":586,"author":{"gitId":"-"},"content":"[[create]]","isFullCredit":true},{"lineNumber":587,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Creating a team: `create` `[Since v1.2]`","isFullCredit":true},{"lineNumber":588,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":589,"author":{"gitId":"-"},"content":"What is a team management application without the functionality of creating a team? When you use this command, it allows you to create a team that can be assigned to players later on.","isFullCredit":true},{"lineNumber":590,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":591,"author":{"gitId":"-"},"content":"Format: `create TEAM_NAME` +","isFullCredit":true},{"lineNumber":592,"author":{"gitId":"-"},"content":"Alias: `ct`","isFullCredit":true},{"lineNumber":593,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":594,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":595,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":596,"author":{"gitId":"-"},"content":"* You can\u0027t create a team that already exist in MTM.","isFullCredit":true},{"lineNumber":597,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":598,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":599,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":600,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":601,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":602,"author":{"gitId":"-"},"content":"Your newly specified team will be created with the name you have given without any players in it, and your team name will appear in the team bar below.","isFullCredit":true},{"lineNumber":603,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":604,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":605,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:","isFullCredit":true},{"lineNumber":606,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":607,"author":{"gitId":"-"},"content":"* `create Liverpool`","isFullCredit":true},{"lineNumber":608,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":609,"author":{"gitId":"-"},"content":"Creates another new team with the name \"Liverpool\" by entering `create Liverpool` into the Command Box and pressing kbd:[Enter].","isFullCredit":true},{"lineNumber":610,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":611,"author":{"gitId":"-"},"content":"image::TeamCreateExampleBefore.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":612,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":613,"author":{"gitId":"-"},"content":"\"Liverpool\" will be shown in the Team List.","isFullCredit":true},{"lineNumber":614,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":615,"author":{"gitId":"-"},"content":"image::TeamCreateExampleAfter.png[width\u003d\"350\"]","isFullCredit":true},{"lineNumber":616,"author":{"gitId":"-"},"content":"// end::create[]","isFullCredit":true},{"lineNumber":617,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":618,"author":{"gitId":"-"},"content":"// tag::view[]","isFullCredit":true},{"lineNumber":619,"author":{"gitId":"-"},"content":"[[view]]","isFullCredit":true},{"lineNumber":620,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing a team: `view` `[Since v1.3]`","isFullCredit":true},{"lineNumber":621,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":622,"author":{"gitId":"-"},"content":"With the ability to manage different teams, you will be able to identify all players in a team easily with the `view` command.","isFullCredit":true},{"lineNumber":623,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":624,"author":{"gitId":"-"},"content":"`Coming in v2.0` +","isFullCredit":true},{"lineNumber":625,"author":{"gitId":"-"},"content":"Details of your team will be displayed on the right panel when `view` command is executed.","isFullCredit":true},{"lineNumber":626,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":627,"author":{"gitId":"-"},"content":"Format: `view TEAM_NAME` +","isFullCredit":true},{"lineNumber":628,"author":{"gitId":"-"},"content":"Alias: `vt`","isFullCredit":true},{"lineNumber":629,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":630,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":631,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":632,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":633,"author":{"gitId":"-"},"content":"Displays the list of players on the left panel that are in the team specified.","isFullCredit":true},{"lineNumber":634,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":635,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":636,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `view` command:","isFullCredit":true},{"lineNumber":637,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":638,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":639,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":640,"author":{"gitId":"-"},"content":"You can use the command above to easily view all the players that exist in \"Arsenal\".","isFullCredit":true},{"lineNumber":641,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":642,"author":{"gitId":"-"},"content":"image::TeamViewExampleBefore.png[width\u003d\"350\"]","isFullCredit":true},{"lineNumber":643,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":644,"author":{"gitId":"-"},"content":"The Player List will be updated with all players in the specified team, \"Arsenal\".","isFullCredit":true},{"lineNumber":645,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":646,"author":{"gitId":"-"},"content":"image::TeamViewExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":647,"author":{"gitId":"-"},"content":"// end::view[]","isFullCredit":true},{"lineNumber":648,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":649,"author":{"gitId":"-"},"content":"// tag::assign[]","isFullCredit":true},{"lineNumber":650,"author":{"gitId":"-"},"content":"[[assign]]","isFullCredit":true},{"lineNumber":651,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Assigning player to teams: `assign` `[Since v1.3]`","isFullCredit":true},{"lineNumber":652,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":653,"author":{"gitId":"-"},"content":"Have a player without a team, or have yet to assigned one during the addition of player into MTM, you can call `assign` command to assign that player to a particular team of your choice.","isFullCredit":true},{"lineNumber":654,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":655,"author":{"gitId":"-"},"content":"Format: `assign [TEAM_NAME] i/INDEX [INDEX]...` +","isFullCredit":true},{"lineNumber":656,"author":{"gitId":"-"},"content":"Alias: `at`","isFullCredit":true},{"lineNumber":657,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":658,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":659,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":660,"author":{"gitId":"-"},"content":"* You can assign multiple players to a team by including more than one valid \u003c\u003cIndex, `INDEX`\u003e\u003e.","isFullCredit":true},{"lineNumber":661,"author":{"gitId":"-"},"content":"* A player can only consist of 1 team, assigning a player that have an existing team, will be re-assigned the new team.","isFullCredit":true},{"lineNumber":662,"author":{"gitId":"-"},"content":"* Assigning a player without a given team will unassign the player from its current team.","isFullCredit":true},{"lineNumber":663,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":664,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":665,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":666,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":667,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":668,"author":{"gitId":"-"},"content":"Your specified player, via \u003c\u003cIndex, `INDEX`\u003e\u003e, will be assigned to the specified team or unassigned from any team.","isFullCredit":true},{"lineNumber":669,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":670,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":671,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:","isFullCredit":true},{"lineNumber":672,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":673,"author":{"gitId":"-"},"content":"* `list`","isFullCredit":true},{"lineNumber":674,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":675,"author":{"gitId":"-"},"content":"View the full list of players in MTM so that you can determine which player you want to assign a team.","isFullCredit":true},{"lineNumber":676,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":677,"author":{"gitId":"-"},"content":"image::TeamAssignListExample.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":678,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":679,"author":{"gitId":"-"},"content":"* `assign Liverpool i/1 2`","isFullCredit":true},{"lineNumber":680,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":681,"author":{"gitId":"-"},"content":"Enter the command into the Command Box which will assign the player with \u003c\u003cIndex, `INDEX`\u003e\u003e 1 and 2 to team \"Liverpool\".","isFullCredit":true},{"lineNumber":682,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":683,"author":{"gitId":"-"},"content":"image::TeamAssignExampleBefore.png[width\u003d\"200\"]","isFullCredit":true},{"lineNumber":684,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":685,"author":{"gitId":"-"},"content":"image::TeamAssignExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":686,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":687,"author":{"gitId":"-"},"content":"* `add n/Rembart Loeri e/remlo@tam.com tm/Liverpool`","isFullCredit":true},{"lineNumber":688,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":689,"author":{"gitId":"-"},"content":"Add a player with the prefix `tm/` for `Team` will automatically be assigned to the team specified.","isFullCredit":true},{"lineNumber":690,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":691,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleBefore.png[width\u003d\"350\"]","isFullCredit":true},{"lineNumber":692,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":693,"author":{"gitId":"-"},"content":"image::TeamAssignAddExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":694,"author":{"gitId":"-"},"content":"// end::assign[]","isFullCredit":true},{"lineNumber":695,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":696,"author":{"gitId":"-"},"content":"// tag::rename[]","isFullCredit":true},{"lineNumber":697,"author":{"gitId":"-"},"content":"[[rename]]","isFullCredit":true},{"lineNumber":698,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Rename a team: `rename` `[Since v1.4]`","isFullCredit":true},{"lineNumber":699,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":700,"author":{"gitId":"-"},"content":"Entered your team name wrongly or you need to update it to accordingly, you can use the `rename` command to help you make that change.","isFullCredit":true},{"lineNumber":701,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":702,"author":{"gitId":"-"},"content":"Format: `rename TEAM_NAME tm/RENAME_TEAM_NAME` +","isFullCredit":true},{"lineNumber":703,"author":{"gitId":"-"},"content":"Alias: `rnt`","isFullCredit":true},{"lineNumber":704,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":705,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":706,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":707,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":708,"author":{"gitId":"-"},"content":"Your specified team will be updated with the new team name along with the affected players in the existing team.","isFullCredit":true},{"lineNumber":709,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":710,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":711,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `rename` command:","isFullCredit":true},{"lineNumber":712,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":713,"author":{"gitId":"-"},"content":"* `rename Liverpool tm/Tello Mello`","isFullCredit":true},{"lineNumber":714,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":715,"author":{"gitId":"-"},"content":"You can rename a `Team` easily by entering a similar command above, which will rename \"Liverpool\" into \"Tello Mello\".","isFullCredit":true},{"lineNumber":716,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":717,"author":{"gitId":"-"},"content":"image::TeamRenameExampleBefore.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":718,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":719,"author":{"gitId":"-"},"content":"After renaming, the team name will be updated in the Team List and will be update for each individual player.","isFullCredit":true},{"lineNumber":720,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":721,"author":{"gitId":"-"},"content":"image::TeamRenameExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":722,"author":{"gitId":"-"},"content":"// end::rename[]","isFullCredit":true},{"lineNumber":723,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":724,"author":{"gitId":"-"},"content":"// tag::remove[]","isFullCredit":true},{"lineNumber":725,"author":{"gitId":"-"},"content":"[[remove]]","isFullCredit":true},{"lineNumber":726,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Removing a team: `remove` `[Since v1.4]`","isFullCredit":true},{"lineNumber":727,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":728,"author":{"gitId":"-"},"content":"No longer managing the team or the team has been disbanded, you can easily remove the team from MTM.","isFullCredit":true},{"lineNumber":729,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":730,"author":{"gitId":"-"},"content":"Format: `remove TEAM_NAME` +","isFullCredit":true},{"lineNumber":731,"author":{"gitId":"-"},"content":"Alias: `rt`","isFullCredit":true},{"lineNumber":732,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":733,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":734,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":735,"author":{"gitId":"-"},"content":"* Removing a team will automatically update all affected players\u0027 `Team` field.","isFullCredit":true},{"lineNumber":736,"author":{"gitId":"-"},"content":"* Players without a team will need to be re-assigned.","isFullCredit":true},{"lineNumber":737,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":738,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":739,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":740,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":741,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":742,"author":{"gitId":"-"},"content":"Remove the specified team and update all affected players.","isFullCredit":true},{"lineNumber":743,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":744,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":745,"author":{"gitId":"-"},"content":"Here are a few valid examples of how you can use the `remove` command:","isFullCredit":true},{"lineNumber":746,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":747,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":748,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":749,"author":{"gitId":"-"},"content":"Here we show you what it would be like before the removal of \"Arsenal\".","isFullCredit":true},{"lineNumber":750,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":751,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleBefore.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":752,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":753,"author":{"gitId":"-"},"content":"* `remove Arsenal`","isFullCredit":true},{"lineNumber":754,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":755,"author":{"gitId":"-"},"content":"After typing the command, you will remove the the team from MTM and will be taken off the Team Display as well as updating each individual player affected to be without a team.","isFullCredit":true},{"lineNumber":756,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":757,"author":{"gitId":"-"},"content":"image::TeamRemoveExampleAfter.png[width\u003d\"700\"]","isFullCredit":true},{"lineNumber":758,"author":{"gitId":"-"},"content":"// end::remove[]","isFullCredit":true},{"lineNumber":759,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":760,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands","isFullCredit":true},{"lineNumber":761,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":762,"author":{"gitId":"lithiumlkid"},"content":"Here you can find useful commands to change the look of My Team Manager to \u003c\u003csetTagColour, set the colour of your tags\u003e\u003e and \u003c\u003cchangeTeam,change the theme\u003e\u003e.","isFullCredit":true},{"lineNumber":763,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":764,"author":{"gitId":"-"},"content":"// tag::setTagColour[]","isFullCredit":true},{"lineNumber":765,"author":{"gitId":"lithiumlkid"},"content":"[[setTagColour]]","isFullCredit":true},{"lineNumber":766,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting colour of tags : `setTagColour` `[Since v1.2]`","isFullCredit":true},{"lineNumber":767,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":768,"author":{"gitId":"-"},"content":"You can set the tags to a colour of your choice with the \u0027setColourTag\u0027 command.","isFullCredit":true},{"lineNumber":769,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":770,"author":{"gitId":"-"},"content":"Format: `setTagColour t/TAG tc/COLOUR` +","isFullCredit":true},{"lineNumber":771,"author":{"gitId":"-"},"content":"Alias: `stc`","isFullCredit":true},{"lineNumber":772,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":773,"author":{"gitId":"codeeong"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":774,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":775,"author":{"gitId":"-"},"content":"* The tag must currently be in used in MTM for this command to work.","isFullCredit":true},{"lineNumber":776,"author":{"gitId":"-"},"content":"* Current version of `setTagColour` supports only this list of preset `COLOUR`:","isFullCredit":true},{"lineNumber":777,"author":{"gitId":"-"},"content":"** `teal`, `red`, `yellow`, `blue`, `orange`, `brown`, `green`, `pink`, `black`, `grey`","isFullCredit":true},{"lineNumber":778,"author":{"gitId":"-"},"content":"* The current version of `setTagColour` is *NOT* an UndoableCommand.","isFullCredit":true},{"lineNumber":779,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a setTagCommand.","isFullCredit":true},{"lineNumber":780,"author":{"gitId":"-"},"content":"* Instead, just enter `stc t/TAG tc/COLOUR` to change the colour back!","isFullCredit":true},{"lineNumber":781,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":782,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":783,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":784,"author":{"gitId":"codeeong"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":785,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":786,"author":{"gitId":"codeeong"},"content":"You will see the specified tags in the left panel change to the colour of your choice.","isFullCredit":true},{"lineNumber":787,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":788,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":789,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `setTagColour` command:","isFullCredit":true},{"lineNumber":790,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":791,"author":{"gitId":"codeeong"},"content":"* `stc t/redCard t/red`","isFullCredit":true},{"lineNumber":792,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":793,"author":{"gitId":"codeeong"},"content":"All the tags that say \"redCard\" in the left panel will now turn red.","isFullCredit":true},{"lineNumber":794,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":795,"author":{"gitId":"-"},"content":"// end::setTagColour[]","isFullCredit":true},{"lineNumber":796,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":797,"author":{"gitId":"-"},"content":"// tag::changeTheme[]","isFullCredit":true},{"lineNumber":798,"author":{"gitId":"-"},"content":"[[changeTheme]]","isFullCredit":true},{"lineNumber":799,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Changing theme : `changeTheme` `[Since v1.5]`","isFullCredit":true},{"lineNumber":800,"author":{"gitId":"codeeong"},"content":"If you feel that the dark theme is not for you, and you prefer to work on a brighter interface,","isFullCredit":true},{"lineNumber":801,"author":{"gitId":"codeeong"},"content":"you can change the theme from the default Dark Theme to Light Theme with the \u0027changeTheme\u0027 command.","isFullCredit":true},{"lineNumber":802,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":803,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":804,"author":{"gitId":"-"},"content":"Format: `changeTheme THEME` +","isFullCredit":true},{"lineNumber":805,"author":{"gitId":"codeeong"},"content":"Alias: `cte`","isFullCredit":true},{"lineNumber":806,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":807,"author":{"gitId":"lohtianwei"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":808,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":809,"author":{"gitId":"-"},"content":"* Current version of `changeTheme` only supports this 2 `THEME`:","isFullCredit":true},{"lineNumber":810,"author":{"gitId":"-"},"content":"** `Light` or `Dark`","isFullCredit":true},{"lineNumber":811,"author":{"gitId":"-"},"content":"* The current version of `changTheme` is *NOT* an UndoableCommand.","isFullCredit":true},{"lineNumber":812,"author":{"gitId":"-"},"content":"** i.e. You cannot `undo` a `changeTheme` command.","isFullCredit":true},{"lineNumber":813,"author":{"gitId":"-"},"content":"* Instead, just enter `cte THEME` to change the colour back!","isFullCredit":true},{"lineNumber":814,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":815,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":816,"author":{"gitId":"codeeong"},"content":"Here is a valid example on how you can use the `changeTheme` command:","isFullCredit":true},{"lineNumber":817,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":818,"author":{"gitId":"codeeong"},"content":"* `cte Light`","isFullCredit":true},{"lineNumber":819,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":820,"author":{"gitId":"codeeong"},"content":"You will see the whole interface change from a dark-coloured theme to become light-coloured.","isFullCredit":true},{"lineNumber":821,"author":{"gitId":"-"},"content":"// end::changeTheme[]","isFullCredit":true},{"lineNumber":822,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":823,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Coming Soon","isFullCredit":true},{"lineNumber":824,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":825,"author":{"gitId":"lohtianwei"},"content":"There is more to come with the next upcoming update! Keep a lookout for these newly implemented features soon!","isFullCredit":true},{"lineNumber":826,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":827,"author":{"gitId":"-"},"content":"// tag::changePass2.0[]","isFullCredit":true},{"lineNumber":828,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Change password: `changepass` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":829,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":830,"author":{"gitId":"-"},"content":"Should you feel that the default password used in `key` could be more secure, you may change it to a password of your","isFullCredit":true},{"lineNumber":831,"author":{"gitId":"-"},"content":"choosing with this command.","isFullCredit":true},{"lineNumber":832,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":833,"author":{"gitId":"-"},"content":"Format: `changepass CURRENT_PASSWORD NEW_PASSWORD CONFIRM_PASSWORD` +","isFullCredit":true},{"lineNumber":834,"author":{"gitId":"-"},"content":"Alias: `cpw`","isFullCredit":true},{"lineNumber":835,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":836,"author":{"gitId":"-"},"content":"Here is how you can change the your password:","isFullCredit":true},{"lineNumber":837,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":838,"author":{"gitId":"-"},"content":"* `changepass ilikesports Securep@ssword1 Securep@ssword1`","isFullCredit":true},{"lineNumber":839,"author":{"gitId":"-"},"content":"// end::changePass2.0[]","isFullCredit":true},{"lineNumber":840,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":841,"author":{"gitId":"lohtianwei"},"content":"// tag::showBest2.0[]","isFullCredit":true},{"lineNumber":842,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Showing Best XI players: `showBest` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":843,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":844,"author":{"gitId":"-"},"content":"If you went to see your current best 11 players in your team based on their respective stats, this command","isFullCredit":true},{"lineNumber":845,"author":{"gitId":"-"},"content":"is for you.","isFullCredit":true},{"lineNumber":846,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":847,"author":{"gitId":"lohtianwei"},"content":"Format: `showBest` +","isFullCredit":true},{"lineNumber":848,"author":{"gitId":"lohtianwei"},"content":"Alias: `sb`","isFullCredit":true},{"lineNumber":849,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":850,"author":{"gitId":"lohtianwei"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":851,"author":{"gitId":"lohtianwei"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":852,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":853,"author":{"gitId":"lohtianwei"},"content":"A lineup of the best 11 players would be displayed. It would consist of 1 Goalkeeper,","isFullCredit":true},{"lineNumber":854,"author":{"gitId":"lohtianwei"},"content":"4 Defenders, 4 Midfielders and 2 Strikers.","isFullCredit":true},{"lineNumber":855,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":856,"author":{"gitId":"lohtianwei"},"content":"// end::showBest2.0[]","isFullCredit":true},{"lineNumber":857,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":858,"author":{"gitId":"-"},"content":"// tag::team2.0[]","isFullCredit":true},{"lineNumber":859,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Setting an upcoming match with an opposing team: `setmatch` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":860,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":861,"author":{"gitId":"-"},"content":"With this command, it gives you a convenient way to keep track of the upcoming match of a team.","isFullCredit":true},{"lineNumber":862,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":863,"author":{"gitId":"-"},"content":"Format: `setmatch TEAM_NAME OPPONENT_TEAM_NAME DATE` +","isFullCredit":true},{"lineNumber":864,"author":{"gitId":"-"},"content":"Alias: `sm`","isFullCredit":true},{"lineNumber":865,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":866,"author":{"gitId":"-"},"content":"[NOTE]","isFullCredit":true},{"lineNumber":867,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":868,"author":{"gitId":"-"},"content":"* Date format to be entered is in `DD/MM/YYYY`. +","isFullCredit":true},{"lineNumber":869,"author":{"gitId":"-"},"content":"* Opponent team does not need to exist in MTM.","isFullCredit":true},{"lineNumber":870,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":871,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":872,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":873,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":874,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":875,"author":{"gitId":"-"},"content":"The upcoming match of the team will be captured and displayed to you.","isFullCredit":true},{"lineNumber":876,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":877,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":878,"author":{"gitId":"-"},"content":"Here are a few valid examples on how you can use the `create` command:","isFullCredit":true},{"lineNumber":879,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":880,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":881,"author":{"gitId":"-"},"content":"* `setmatch Arsenal Liverpool 14/03/2018`","isFullCredit":true},{"lineNumber":882,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":883,"author":{"gitId":"-"},"content":"Display the list of players in team \"Arsenal\" and set an upcoming match for Arsenal with Liverpool on 14/03/2018.","isFullCredit":true},{"lineNumber":884,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":885,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Viewing the team\u0027s next upcoming match: `nextmatch` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":886,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":887,"author":{"gitId":"codeeong"},"content":"You can easily determine the up and coming match with the team so that you never miss an important date.","isFullCredit":true},{"lineNumber":888,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":889,"author":{"gitId":"-"},"content":"Format: `nextmatch TEAM_NAME` +","isFullCredit":true},{"lineNumber":890,"author":{"gitId":"-"},"content":"Alias: `nm`","isFullCredit":true},{"lineNumber":891,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":892,"author":{"gitId":"-"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":893,"author":{"gitId":"-"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":894,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":895,"author":{"gitId":"-"},"content":"Displays the date and opponent for the upcoming match of the team specified.","isFullCredit":true},{"lineNumber":896,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":897,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":898,"author":{"gitId":"codeeong"},"content":"Here are a few valid examples on how you can use the `nextmatch` command:","isFullCredit":true},{"lineNumber":899,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":900,"author":{"gitId":"-"},"content":"* `view Arsenal`","isFullCredit":true},{"lineNumber":901,"author":{"gitId":"-"},"content":"* `nextmatch Arsenal`","isFullCredit":true},{"lineNumber":902,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":903,"author":{"gitId":"-"},"content":"Displays the list of players in team \"Arsenal\" and view the next upcoming match for \"Arsenal\".","isFullCredit":true},{"lineNumber":904,"author":{"gitId":"-"},"content":"// end::team2.0[]","isFullCredit":true},{"lineNumber":905,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":906,"author":{"gitId":"codeeong"},"content":"// tag::showlineup[]","isFullCredit":true},{"lineNumber":907,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Displaying lineup for next match: `showLineup` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":908,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":909,"author":{"gitId":"codeeong"},"content":"You can view the lineup for the current best 11 players.","isFullCredit":true},{"lineNumber":910,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":911,"author":{"gitId":"-"},"content":"Format: `showLineup TEAM_NAME` +","isFullCredit":true},{"lineNumber":912,"author":{"gitId":"codeeong"},"content":"Alias: `sl`","isFullCredit":true},{"lineNumber":913,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":914,"author":{"gitId":"codeeong"},"content":"[IMPORTANT]","isFullCredit":true},{"lineNumber":915,"author":{"gitId":"codeeong"},"content":".*What to expect*","isFullCredit":true},{"lineNumber":916,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":917,"author":{"gitId":"codeeong"},"content":"The panel on the right will show the avatars of the 11 players that will be playing for the next match.","isFullCredit":true},{"lineNumber":918,"author":{"gitId":"codeeong"},"content":"\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":919,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":920,"author":{"gitId":"codeeong"},"content":"Here is an valid example on how you can use the `showLineup` command:","isFullCredit":true},{"lineNumber":921,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":922,"author":{"gitId":"-"},"content":"* `showLineup Arsenal`","isFullCredit":true},{"lineNumber":923,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":924,"author":{"gitId":"codeeong"},"content":"Displays the 11 main players that will be playing for the next match.","isFullCredit":true},{"lineNumber":925,"author":{"gitId":"codeeong"},"content":"// end::showlineup[]","isFullCredit":true},{"lineNumber":926,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":927,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Scheduling trainings for team `schedule` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":928,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":929,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Sending reminder emails to players: `send` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":930,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":931,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving feedback to developers: `feedback` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":932,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":933,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d\u003d Giving demerit to players based on performance: `demerit` `[Coming in v2.0]`","isFullCredit":true},{"lineNumber":934,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":935,"author":{"gitId":"-"},"content":"\u003d\u003d FAQ","isFullCredit":true},{"lineNumber":936,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":937,"author":{"gitId":"-"},"content":"*Q*: How do I transfer my data to another Computer? +","isFullCredit":true},{"lineNumber":938,"author":{"gitId":"-"},"content":"*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous MTM folder.","isFullCredit":true},{"lineNumber":939,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":940,"author":{"gitId":"-"},"content":"// tag::commandsummary[]","isFullCredit":true},{"lineNumber":941,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":942,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Glossary","isFullCredit":true},{"lineNumber":943,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":944,"author":{"gitId":"-"},"content":"[[Index]]`INDEX` - The `INDEX` refers to the index number shown in the last player listing. The `INDEX` must be a positive integer 1, 2, 3, …","isFullCredit":true},{"lineNumber":945,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":946,"author":{"gitId":"-"},"content":"\u003d\u003d Command Summary","isFullCredit":true},{"lineNumber":947,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":948,"author":{"gitId":"-"},"content":"Just a quick reference sheet for all your needs. Never forget how to use MTM ever again.","isFullCredit":true},{"lineNumber":949,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":950,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Basic Commands and Features","isFullCredit":true},{"lineNumber":951,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":952,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":953,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":954,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":955,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":956,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":957,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":958,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":959,"author":{"gitId":"-"},"content":"|\u003c\u003cautocomplete, `Autocomplete`\u003e\u003e","isFullCredit":true},{"lineNumber":960,"author":{"gitId":"-"},"content":"|kbd:[tab]","isFullCredit":true},{"lineNumber":961,"author":{"gitId":"-"},"content":"|kbd:[tab] kbd:[space] kbd:[\u0026uarr;] kbd:[\u0026darr;]","isFullCredit":true},{"lineNumber":962,"author":{"gitId":"-"},"content":"d|Fills in your command for you","isFullCredit":true},{"lineNumber":963,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":964,"author":{"gitId":"-"},"content":"|\u003c\u003chelp, `help`\u003e\u003e","isFullCredit":true},{"lineNumber":965,"author":{"gitId":"-"},"content":"|kbd:[F1]","isFullCredit":true},{"lineNumber":966,"author":{"gitId":"-"},"content":"|help","isFullCredit":true},{"lineNumber":967,"author":{"gitId":"-"},"content":"d|Shows the user guide","isFullCredit":true},{"lineNumber":968,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":969,"author":{"gitId":"-"},"content":"|\u003c\u003chistory, `history`\u003e\u003e","isFullCredit":true},{"lineNumber":970,"author":{"gitId":"-"},"content":"|`h`","isFullCredit":true},{"lineNumber":971,"author":{"gitId":"-"},"content":"|history","isFullCredit":true},{"lineNumber":972,"author":{"gitId":"-"},"content":"d|Displays the list of commands entered previously","isFullCredit":true},{"lineNumber":973,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":974,"author":{"gitId":"-"},"content":"|\u003c\u003cundo, `undo`\u003e\u003e","isFullCredit":true},{"lineNumber":975,"author":{"gitId":"-"},"content":"|`u`","isFullCredit":true},{"lineNumber":976,"author":{"gitId":"-"},"content":"|undo","isFullCredit":true},{"lineNumber":977,"author":{"gitId":"-"},"content":"d|Undo the previous command","isFullCredit":true},{"lineNumber":978,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":979,"author":{"gitId":"-"},"content":"|\u003c\u003credo, `redo`\u003e\u003e","isFullCredit":true},{"lineNumber":980,"author":{"gitId":"-"},"content":"|`r`","isFullCredit":true},{"lineNumber":981,"author":{"gitId":"-"},"content":"|redo","isFullCredit":true},{"lineNumber":982,"author":{"gitId":"-"},"content":"d|Redo the previous command","isFullCredit":true},{"lineNumber":983,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":984,"author":{"gitId":"-"},"content":"|\u003c\u003ctoggleprivacy, `toggleprivacy`\u003e\u003e","isFullCredit":true},{"lineNumber":985,"author":{"gitId":"-"},"content":"|`tp`","isFullCredit":true},{"lineNumber":986,"author":{"gitId":"-"},"content":"|toggleprivacy INDEX [p/] [e/] [r/] [ra/] [a/]","isFullCredit":true},{"lineNumber":987,"author":{"gitId":"-"},"content":"|toggleprivacy 2 a/","isFullCredit":true},{"lineNumber":988,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":989,"author":{"gitId":"-"},"content":"|\u003c\u003ckey, `key`\u003e\u003e","isFullCredit":true},{"lineNumber":990,"author":{"gitId":"-"},"content":"|`k`","isFullCredit":true},{"lineNumber":991,"author":{"gitId":"-"},"content":"|key PASSWORD","isFullCredit":true},{"lineNumber":992,"author":{"gitId":"-"},"content":"|key ilikesports","isFullCredit":true},{"lineNumber":993,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":994,"author":{"gitId":"-"},"content":"|\u003c\u003cclear, `clear`\u003e\u003e","isFullCredit":true},{"lineNumber":995,"author":{"gitId":"-"},"content":"|`c`","isFullCredit":true},{"lineNumber":996,"author":{"gitId":"-"},"content":"|clear","isFullCredit":true},{"lineNumber":997,"author":{"gitId":"-"},"content":"d|Removes all information in the application","isFullCredit":true},{"lineNumber":998,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":999,"author":{"gitId":"-"},"content":"|\u003c\u003cexit, `exit`\u003e\u003e","isFullCredit":true},{"lineNumber":1000,"author":{"gitId":"-"},"content":"|`NONE`","isFullCredit":true},{"lineNumber":1001,"author":{"gitId":"-"},"content":"|exit","isFullCredit":true},{"lineNumber":1002,"author":{"gitId":"-"},"content":"d|Exits the application","isFullCredit":true},{"lineNumber":1003,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1004,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1005,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1006,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Player-Related Commands","isFullCredit":true},{"lineNumber":1007,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1008,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":1009,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1010,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":1011,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":1012,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":1013,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":1014,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1015,"author":{"gitId":"-"},"content":"|\u003c\u003cadd, `add`\u003e\u003e","isFullCredit":true},{"lineNumber":1016,"author":{"gitId":"-"},"content":"|`a`","isFullCredit":true},{"lineNumber":1017,"author":{"gitId":"lithiumlkid"},"content":"|add n/NAME e/EMAIL [tm/TEAM] [a/ADDRESS] [p/PHONE_NUMBER] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [av/AVATAR] [t/TAG]...","isFullCredit":true},{"lineNumber":1018,"author":{"gitId":"lithiumlkid"},"content":"|add n/Ospina e/Ospina@arsenal.com tm/Arsenal a/70 Jurong Central Circle p/90722998 j/1 ra/2 po/4 av/Capture.png t/redCard","isFullCredit":true},{"lineNumber":1019,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1020,"author":{"gitId":"-"},"content":"|\u003c\u003cedit, `edit`\u003e\u003e","isFullCredit":true},{"lineNumber":1021,"author":{"gitId":"-"},"content":"|`e`","isFullCredit":true},{"lineNumber":1022,"author":{"gitId":"-"},"content":"|edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [j/JERSEY_NUMBER] [ra/RATING] [po/POSITION] [t/TAG]...","isFullCredit":true},{"lineNumber":1023,"author":{"gitId":"-"},"content":"|edit 2 n/James Lee e/jameslee@example.com","isFullCredit":true},{"lineNumber":1024,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1025,"author":{"gitId":"-"},"content":"|\u003c\u003cdelete, `delete`\u003e\u003e","isFullCredit":true},{"lineNumber":1026,"author":{"gitId":"-"},"content":"|`d`","isFullCredit":true},{"lineNumber":1027,"author":{"gitId":"-"},"content":"|delete INDEX","isFullCredit":true},{"lineNumber":1028,"author":{"gitId":"-"},"content":"|delete 3","isFullCredit":true},{"lineNumber":1029,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1030,"author":{"gitId":"-"},"content":"|\u003c\u003cremark, `remark`\u003e\u003e","isFullCredit":true},{"lineNumber":1031,"author":{"gitId":"-"},"content":"|`rm`","isFullCredit":true},{"lineNumber":1032,"author":{"gitId":"-"},"content":"|remark INDEX [r/[REMARK]]","isFullCredit":true},{"lineNumber":1033,"author":{"gitId":"-"},"content":"|remark 4 r/Gotta go faster","isFullCredit":true},{"lineNumber":1034,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1035,"author":{"gitId":"-"},"content":"|\u003c\u003clist, `list`\u003e\u003e","isFullCredit":true},{"lineNumber":1036,"author":{"gitId":"-"},"content":"|`l`","isFullCredit":true},{"lineNumber":1037,"author":{"gitId":"-"},"content":"|list","isFullCredit":true},{"lineNumber":1038,"author":{"gitId":"-"},"content":"d|List all the players","isFullCredit":true},{"lineNumber":1039,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1040,"author":{"gitId":"-"},"content":"|\u003c\u003csort, `sort`\u003e\u003e","isFullCredit":true},{"lineNumber":1041,"author":{"gitId":"-"},"content":"|`so`","isFullCredit":true},{"lineNumber":1042,"author":{"gitId":"-"},"content":"|sort FIELD ORDER","isFullCredit":true},{"lineNumber":1043,"author":{"gitId":"-"},"content":"|sort name asc","isFullCredit":true},{"lineNumber":1044,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1045,"author":{"gitId":"-"},"content":"|\u003c\u003cfind, `find`\u003e\u003e","isFullCredit":true},{"lineNumber":1046,"author":{"gitId":"-"},"content":"|`f`","isFullCredit":true},{"lineNumber":1047,"author":{"gitId":"-"},"content":"|find KEYWORD [KEYWORD]...","isFullCredit":true},{"lineNumber":1048,"author":{"gitId":"-"},"content":"|find James Jake","isFullCredit":true},{"lineNumber":1049,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1050,"author":{"gitId":"-"},"content":"|\u003c\u003cselect, `select`\u003e\u003e","isFullCredit":true},{"lineNumber":1051,"author":{"gitId":"-"},"content":"|`s`","isFullCredit":true},{"lineNumber":1052,"author":{"gitId":"-"},"content":"|select INDEX","isFullCredit":true},{"lineNumber":1053,"author":{"gitId":"-"},"content":"|select 2","isFullCredit":true},{"lineNumber":1054,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1055,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1056,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1057,"author":{"gitId":"-"},"content":"\u003d\u003d\u003d Team-Related Commands","isFullCredit":true},{"lineNumber":1058,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1059,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":1060,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1061,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":1062,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":1063,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":1064,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":1065,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1066,"author":{"gitId":"-"},"content":"|\u003c\u003ccreate, `create`\u003e\u003e","isFullCredit":true},{"lineNumber":1067,"author":{"gitId":"-"},"content":"|`ct`","isFullCredit":true},{"lineNumber":1068,"author":{"gitId":"-"},"content":"|create TEAM_NAME","isFullCredit":true},{"lineNumber":1069,"author":{"gitId":"-"},"content":"|create Arsenal","isFullCredit":true},{"lineNumber":1070,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1071,"author":{"gitId":"-"},"content":"|\u003c\u003cview, `view`\u003e\u003e","isFullCredit":true},{"lineNumber":1072,"author":{"gitId":"-"},"content":"|`vt`","isFullCredit":true},{"lineNumber":1073,"author":{"gitId":"-"},"content":"|view TEAM_NAME","isFullCredit":true},{"lineNumber":1074,"author":{"gitId":"-"},"content":"|view Liverpool","isFullCredit":true},{"lineNumber":1075,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1076,"author":{"gitId":"-"},"content":"|\u003c\u003cassign, `assign`\u003e\u003e","isFullCredit":true},{"lineNumber":1077,"author":{"gitId":"-"},"content":"|`at`","isFullCredit":true},{"lineNumber":1078,"author":{"gitId":"-"},"content":"|assign [TEAM_NAME] i/INDEX [INDEX]...","isFullCredit":true},{"lineNumber":1079,"author":{"gitId":"-"},"content":"|assign Barcelona i/1 2 3","isFullCredit":true},{"lineNumber":1080,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1081,"author":{"gitId":"-"},"content":"|\u003c\u003crename, `rename`\u003e\u003e","isFullCredit":true},{"lineNumber":1082,"author":{"gitId":"-"},"content":"|`rnt`","isFullCredit":true},{"lineNumber":1083,"author":{"gitId":"-"},"content":"|rename TEAM_NAME tm/RENAME_TEAM_NAME","isFullCredit":true},{"lineNumber":1084,"author":{"gitId":"-"},"content":"|rename Arsenal tm/Neo Arsenal","isFullCredit":true},{"lineNumber":1085,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1086,"author":{"gitId":"-"},"content":"|\u003c\u003cremove, `remove`\u003e\u003e","isFullCredit":true},{"lineNumber":1087,"author":{"gitId":"-"},"content":"|`rt`","isFullCredit":true},{"lineNumber":1088,"author":{"gitId":"-"},"content":"|remove TEAM_NAME","isFullCredit":true},{"lineNumber":1089,"author":{"gitId":"-"},"content":"|remove Real Madrid","isFullCredit":true},{"lineNumber":1090,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1091,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1092,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1093,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d\u003d Appearance Commands","isFullCredit":true},{"lineNumber":1094,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1095,"author":{"gitId":"-"},"content":"[width\u003d\"100%\", cols\u003d\"^1s, ^1s, \u003c2m, \u003c2m\", options\u003d\"header\"]","isFullCredit":true},{"lineNumber":1096,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1097,"author":{"gitId":"-"},"content":"^|Command","isFullCredit":true},{"lineNumber":1098,"author":{"gitId":"-"},"content":"^|Alias","isFullCredit":true},{"lineNumber":1099,"author":{"gitId":"-"},"content":"^|Parameter","isFullCredit":true},{"lineNumber":1100,"author":{"gitId":"-"},"content":"^|Example","isFullCredit":true},{"lineNumber":1101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1102,"author":{"gitId":"-"},"content":"|\u003c\u003csetTagColour, `setTagColour`\u003e\u003e","isFullCredit":true},{"lineNumber":1103,"author":{"gitId":"-"},"content":"|`stc`","isFullCredit":true},{"lineNumber":1104,"author":{"gitId":"-"},"content":"|setTagColour t/TAG tc/COLOUR","isFullCredit":true},{"lineNumber":1105,"author":{"gitId":"-"},"content":"|setTagColour t/friends tc/yellow","isFullCredit":true},{"lineNumber":1106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1107,"author":{"gitId":"-"},"content":"|\u003c\u003cchangeTheme, `changeTheme`\u003e\u003e","isFullCredit":true},{"lineNumber":1108,"author":{"gitId":"-"},"content":"|`cte`","isFullCredit":true},{"lineNumber":1109,"author":{"gitId":"-"},"content":"|changeTheme THEME","isFullCredit":true},{"lineNumber":1110,"author":{"gitId":"-"},"content":"|changeTheme Dark","isFullCredit":true},{"lineNumber":1111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":1112,"author":{"gitId":"-"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":1113,"author":{"gitId":"-"},"content":"// end::commandsummary[]","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":106,"lohtianwei":26,"codeeong":64,"-":917}},{"path":"docs/team/ahmadsyafiq.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lithiumlkid"},"content":"\u003d Ahmad Syafiq - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lithiumlkid"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lithiumlkid"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d PROJECT: My Team Manager","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lithiumlkid"},"content":"---","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lithiumlkid"},"content":"My Team Manager is a desktop address book application developed as part of a Software Engineering module requirement. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 6 kLoC.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Summary of contributions","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lithiumlkid"},"content":"* *Major enhancement*: added *replaced person object with player object*","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to add and edit players that contain more attributes/information such as jersey, position, rating and avatar","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lithiumlkid"},"content":"** Justification: This feature improves the product significantly because a user can fill the address book with more important information which can be used for other utility functions such as sort.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lithiumlkid"},"content":"It is accompanied with improved GUI to increase usability. Eg. the user can see player\u0027s avatar for better identification.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lithiumlkid"},"content":"** Highlights: This enhancement affects existing commands and commands to be added in future. It required an in-depth analysis of design alternatives. The implementation too was challenging as it required changes to existing commands.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lithiumlkid"},"content":"* *Minor enhancement*: added a *tab - autocomplete function*","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lithiumlkid"},"content":"** What it does: allows the user to enter command lines more quickly by helping them complete commands by pressing the tab key. It also allows them to view suggested command and command parameters in case","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lithiumlkid"},"content":"the forget.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lithiumlkid"},"content":"** Credits: To make the search optimal, I used Tries as suggested on geek-for-geeks.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lithiumlkid.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lithiumlkid.md[Test code]]","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lithiumlkid"},"content":"* *Other contributions*:","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lithiumlkid"},"content":"** Project management:","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lithiumlkid"},"content":"*** Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lithiumlkid"},"content":"** Enhancements to existing features:","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lithiumlkid"},"content":"*** Enhanced the help function to only allow one help window at a time. (Pull request https://github.com/CS2103JAN2018-F14-B1/main/pull/169[#169])","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lithiumlkid"},"content":"** Documentation:","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lithiumlkid"},"content":"*** Did cosmetic tweaks to existing contents of the User Guide: https://github.com/CS2103JAN2018-F14-B1/main/pull/53[#53]","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lithiumlkid"},"content":"** Community:","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lithiumlkid"},"content":"*** PRs reviewed (with non-trivial review comments): https://github.com/CS2103JAN2018-F14-B1/main/pull/172[#172]","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lithiumlkid"},"content":"*** Contributed to forum discussions (examples: https://github.com/nus-cs2103-AY1718S2/forum/issues/39[39], https://github.com/nus-cs2103-AY1718S2/forum/issues/47[#47])","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lithiumlkid"},"content":"*** Reported bugs and suggestions for other teams in the class (example: https://github.com/CS2103JAN2018-F14-B3/main/issues/228[#228])","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lithiumlkid"},"content":"** Tools:","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lithiumlkid"},"content":"*** Integrated a new Github plugin (CircleCI) to the team repo","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the User Guide","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003daddplayer]","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lithiumlkid"},"content":"include::../UserGuide.adoc[tag\u003dautocomplete]","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lithiumlkid"},"content":"\u003d\u003d Contributions to the Developer Guide","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lithiumlkid"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lithiumlkid"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dplayer]","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lithiumlkid"},"content":"include::../DeveloperGuide.adoc[tag\u003dautocomplete]","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lithiumlkid"},"content":"","isFullCredit":true}],"authorContributionMap":{"lithiumlkid":60,"-":1}},{"path":"docs/team/codeeong.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"\u003d Codee Ong - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"---","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"My Team Manager (MTM) is a desktop application for *football team managers* to organise the information of players they are in charge of.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"The primary usage of this application is to add and assign players to teams, and then edit and remove information related to","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"the players as and when it is required. MTM is value added with usability features that help the team manager manage his/her","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"teams and players efficiently.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"The user interacts with MTM using a *Command Line Interface*, and it has a GUI created with JavaFX.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Summary of contributions","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"* *Major enhancement*: Revamped the original user interface to one that suits the usage of an application for *team managers*.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"** What it does: The change in UI allows the user to *keep track* of which team he/she is looking at, to *view his/her players\u0027 details*,","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"and even perform some *customisation* of the application theme.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"** Justification: The overhaul of the UI is absolutely necessary to ensure the *best user experience* for users of My Team Manager. Previously,","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"the existing UI components were neither sufficient nor suitable for management of sports teams.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"** Highlights: Addition of the *team display bar*, the *player details pane* when a player is selected, addition of *MTM logo*,","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"and *changeTheme* command.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"* *Minor enhancement*: addition of a *setTagCommand* that allows the user to change existing tags to a colour of their choice.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/Codee.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/Codee.md[Test code]]","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"* *Other contributions*:","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"** Project management:","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"*** Generated release files (.jar) in `v1.4` and `v1.5rc` (2 releases), and contributed release descriptions on GitHub.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"** Enhancements to existing features:","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"*** changed the original GUI colour scheme [https://github.com/CS2103JAN2018-F14-B1/main/pull/89[PR #89]]","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"** Documentation:","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"*** changed the project name in all the relevant files so that it will be \"My Team Manager\" and not \"Address Book App\", including the data files. [https://github.com/CS2103JAN2018-F14-B1/main/pull/120[PR #120]]","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":"*** Constantly updated the README and UserGuide\u0027s application preview image. [https://github.com/CS2103JAN2018-F14-B1/main/pull/99[PR #99]][https://github.com/CS2103JAN2018-F14-B1/main/pull/160[PR #160]]","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"** Community:","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"*** PRs Reviewed (with non trivial comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/95[PR #95]][https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR #169]][https://github.com/CS2103JAN2018-F14-B1/main/pull/175[PR #175]]","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the User Guide","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting the users of MTM._","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dchangeTheme]","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dsetTagColour]","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"include::../UserGuide.adoc[tag\u003dshowlineup]","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":"\u003d\u003d Contributions to the Developer Guide","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dsettagcolour]","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dteamDisplay]","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dPlayerDetails]","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":"include::../DeveloperGuide.adoc[tag\u003dchangeThemeCommand]","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":72}},{"path":"docs/team/lohtianwei.adoc","fileType":"adoc","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"\u003d Loh Tian Wei - Project Portfolio","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":":imagesDir: ../images","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":":stylesDir: ../stylesheets","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d PROJECT: My Team Manager (MTM)","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"---","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Overview","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"My Team Manager (MTM) is a dekstop address book application for *football team managers*.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"It can also be personalised to be used for other sports team management too such as basketball.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"With the features it provides, management of your players\u0027 contact details and team information is made easy. While","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"interactions between user and application is mainly by a *Command Line Interface (CLI)*, it features a JavaFx GUI display.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Summary of contributions","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"* *Major enhancement*: Added *security and privacy features*","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"** *What it does*: Ensures the information stored in MTM is *secured and kept private* when needed","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"** *Justification*: This feature is crucial for protecting the *confidentiality and integrity* of the details stored in MTM.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"It prevents unauthorised tampering of information while also maintaining confidentiality.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"** *Highlights*: Addition of a *locking mechanism* to limit functionality of MTM and changing *privacy of fields* that would maintain","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"confidentiality of certain information","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"* *Minor enhancement*:","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"** Added a sort function that allows the list to be sorted by fields for quick viewing of relevant information","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"* *Code contributed*: [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/functional/lohtianwei.md[Functional code]] [https://github.com/CS2103JAN2018-F14-B1/main/blob/master/collated/test/lohtianwei.md[Test code]]","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"* *Other contributions*:","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"** Project management:","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"*** Documented issues of project using GitHub\u0027s Issue Tracker and address the issues accordingly.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"** Enhancements to existing features:","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"*** Changes are mentioned in \u003c\u003cMinor Enhancement, Minor enhancement\u003e\u003e.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"** Documentation:","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"** Community:","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":"*** PRs reviewed (with non-trivial review comments) [https://github.com/CS2103JAN2018-F14-B1/main/pull/169[PR#169]]","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"*** Reported bugs and suggestions for other teams in the class (https://github.com/CS2103JAN2018-W09-B2/main/issues/198[1],","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/194[2],","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/182[3],","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":"https://github.com/CS2103JAN2018-W09-B2/main/issues/174[4])","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the User Guide","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dtogglePrivacy]","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":"include::../UserGuide.adoc[tag\u003dkey]","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":"\u003d\u003d Contributions to the Developer Guide","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"|\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dsort]","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"include::../DeveloperGuide.adoc[tag\u003dkey]","isFullCredit":true}],"authorContributionMap":{"lohtianwei":68,"-":1}},{"path":"src/main/java/seedu/address/MainApp.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.application.Application;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Version;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.ConfigUtil;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.LogicManager;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.util.SampleDataUtil;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.storage.AddressBookStorage;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.storage.JsonUserPrefsStorage;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.storage.Storage;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.storage.StorageManager;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.storage.UserPrefsStorage;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAddressBookStorage;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.ui.Ui;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.UiManager;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * The main entry point to the application.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"public class MainApp extends Application {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" public static final Version VERSION \u003d new Version(1, 1, 0, true);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(MainApp.class);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" protected Ui ui;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" protected Logic logic;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" protected Storage storage;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" protected Model model;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" protected Config config;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" protected UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void init() throws Exception {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d[ Initializing AddressBook ]\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" super.init();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" config \u003d initConfig(getApplicationParameter(\"config\"));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" UserPrefsStorage userPrefsStorage \u003d new JsonUserPrefsStorage(config.getUserPrefsFilePath());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" userPrefs \u003d initPrefs(userPrefsStorage);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" AddressBookStorage addressBookStorage \u003d new XmlAddressBookStorage(userPrefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" storage \u003d new StorageManager(addressBookStorage, userPrefsStorage);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" initLogging(config);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" model \u003d initModelManager(storage, userPrefs);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" logic \u003d new LogicManager(model);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" ui \u003d new UiManager(logic, config, userPrefs);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" initEventsCenter();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" private String getApplicationParameter(String parameterName) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" Map\u003cString, String\u003e applicationParameters \u003d getParameters().getNamed();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" return applicationParameters.get(parameterName);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" * Returns a {@code ModelManager} with the data from {@code storage}\u0027s address book and {@code userPrefs}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * The data from the sample address book will be used instead if {@code storage}\u0027s address book is not found,","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * or an empty address book will be used instead if errors occur when reading {@code storage}\u0027s address book.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private Model initModelManager(Storage storage, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" Optional\u003cReadOnlyAddressBook\u003e addressBookOptional;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook initialData;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" addressBookOptional \u003d storage.readAddressBook();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" if (!addressBookOptional.isPresent()) {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" logger.info(\"Data file not found. Will be starting with a sample AddressBook\");","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" initialData \u003d addressBookOptional.orElseGet(SampleDataUtil::getSampleAddressBook);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" logger.warning(\"Data file not in the correct format. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" initialData \u003d new AddressBook();","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new ModelManager(initialData, userPrefs);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" private void initLogging(Config config) {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" LogsCenter.init(config);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Returns a {@code Config} using the file at {@code configFilePath}. \u003cbr\u003e","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * The default file path {@code Config#DEFAULT_CONFIG_FILE} will be used instead","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * if {@code configFilePath} is null.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" protected Config initConfig(String configFilePath) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" Config initializedConfig;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" String configFilePathUsed;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d Config.DEFAULT_CONFIG_FILE;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" if (configFilePath !\u003d null) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" logger.info(\"Custom Config file specified \" + configFilePath);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" configFilePathUsed \u003d configFilePath;","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" logger.info(\"Using config file : \" + configFilePathUsed);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" Optional\u003cConfig\u003e configOptional \u003d ConfigUtil.readConfig(configFilePathUsed);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" initializedConfig \u003d configOptional.orElse(new Config());","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" logger.warning(\"Config file at \" + configFilePathUsed + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" + \"Using default config properties\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" initializedConfig \u003d new Config();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" //Update config file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" ConfigUtil.saveConfig(initializedConfig, configFilePathUsed);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" return initializedConfig;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" * Returns a {@code UserPrefs} using the file at {@code storage}\u0027s user prefs file path,","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" * or a new {@code UserPrefs} with default configuration if errors occur when","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * reading from the file.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected UserPrefs initPrefs(UserPrefsStorage storage) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d storage.getUserPrefsFilePath();","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" logger.info(\"Using prefs file : \" + prefsFilePath);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" UserPrefs initializedPrefs;","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" Optional\u003cUserPrefs\u003e prefsOptional \u003d storage.readUserPrefs();","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" initializedPrefs \u003d prefsOptional.orElse(new UserPrefs());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" } catch (DataConversionException e) {","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" logger.warning(\"UserPrefs file at \" + prefsFilePath + \" is not in the correct format. \"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" + \"Using default user prefs\");","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" logger.warning(\"Problem while reading from the file. Will be starting with an empty AddressBook\");","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" initializedPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" //Update prefs file in case it was missing to begin with or there are new/unused fields","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(initializedPrefs);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" logger.warning(\"Failed to save config file : \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" return initializedPrefs;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" private void initEventsCenter() {","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().registerHandler(this);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" logger.info(\"Starting AddressBook \" + MainApp.VERSION);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" ui.start(primaryStage);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" logger.info(\"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d [ Stopping Address Book ] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\");","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" ui.stop();","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" storage.saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" logger.severe(\"Failed to save preferences \" + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" System.exit(0);","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void handleExitAppRequestEvent(ExitAppRequestEvent event) {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" this.stop();","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" public static void main(String[] args) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" launch(args);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":211}},{"path":"src/main/java/seedu/address/commons/core/Config.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Level;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Config values used by the app","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class Config {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String DEFAULT_CONFIG_FILE \u003d \"config.json\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" // Config values customizable through config file","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private String appTitle \u003d \"My Team Manager\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private Level logLevel \u003d Level.INFO;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private String userPrefsFilePath \u003d \"preferences.json\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public String getAppTitle() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" return appTitle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public void setAppTitle(String appTitle) {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" this.appTitle \u003d appTitle;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public Level getLogLevel() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return logLevel;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void setLogLevel(Level logLevel) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.logLevel \u003d logLevel;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public String getUserPrefsFilePath() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" return userPrefsFilePath;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void setUserPrefsFilePath(String userPrefsFilePath) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.userPrefsFilePath \u003d userPrefsFilePath;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (!(other instanceof Config)) { //this handles null as well.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" Config o \u003d (Config) other;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return Objects.equals(appTitle, o.appTitle)","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(logLevel, o.logLevel)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(userPrefsFilePath, o.userPrefsFilePath);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return Objects.hash(appTitle, logLevel, userPrefsFilePath);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" sb.append(\"App title : \" + appTitle);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" sb.append(\"\\nCurrent log level : \" + logLevel);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" sb.append(\"\\nPreference file Location : \" + userPrefsFilePath);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":71}},{"path":"src/main/java/seedu/address/commons/core/Messages.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Container for user visible messages.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class Messages {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" public static final String MESSAGE_UNKNOWN_COMMAND \u003d \"Unknown command\";","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_COMMAND_FORMAT \u003d \"Invalid command format! \\n%1$s\";","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX \u003d \"The person index provided is invalid\";","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_THEME \u003d \"This theme does not exist!\\n\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PERSONS_LISTED_OVERVIEW \u003d \"%1$d persons listed!\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_TEAM_NOT_FOUND \u003d \"Team does not exist or is not specified!\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_INVALID_ALL_INDEX \u003d \"All person index provided is invalid\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":15}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeTagColourEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to change tag colour","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeTagColourEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String tagColour;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public ChangeTagColourEvent(String tagName, String tagColour) {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":23}},{"path":"src/main/java/seedu/address/commons/events/ui/ChangeThemeEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**@@author Codee */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Indicates a request for theme change.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String theme;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ChangeThemeEvent(String theme) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().toString();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/ClearTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for clearing of all teams.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class ClearTeamsEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public ClearTeamsEvent() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":7,"-":13}},{"path":"src/main/java/seedu/address/commons/events/ui/DeselectTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to deselected selected teams.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"public class DeselectTeamEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" public DeselectTeamEvent() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/HighlightSelectedTeamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to highlight selected team name.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class HighlightSelectedTeamEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public HighlightSelectedTeamEvent(String teamName) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":21}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" private final Person editedPerson;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedEvent(Person editedPerson, Index index) {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" this.editedPerson \u003d editedPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" public Person getPerson() {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" return this.editedPerson;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" return this.index;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":34}},{"path":"src/main/java/seedu/address/commons/events/ui/PersonDetailsChangedNoParamEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Represents a change in the person details panel, but no paramaters.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class PersonDetailsChangedNoParamEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public PersonDetailsChangedNoParamEvent() { }","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":17}},{"path":"src/main/java/seedu/address/commons/events/ui/ShowNewTeamNameEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Indicates a request to show new team name.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"public class ShowNewTeamNameEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" public final String teamName;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public ShowNewTeamNameEvent(String teamName) {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":22}},{"path":"src/main/java/seedu/address/commons/events/ui/UndoTeamsEvent.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.commons.events.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.BaseEvent;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":" * Event handler for undoing clearing of all teams.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"// @@author Codee","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class UndoTeamsEvent extends BaseEvent {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public UndoTeamsEvent() {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" return this.getClass().getSimpleName();","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":7,"-":11}},{"path":"src/main/java/seedu/address/logic/Logic.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" * API of the Logic component","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"public interface Logic {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * Executes the command and returns the result.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * @param commandText The command as entered by the user.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * @return the result of the command execution.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * @throws CommandException If an error occurs during command execution.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * @throws ParseException If an error occurs during parsing.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" CommandResult execute(String commandText) throws CommandException, ParseException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered list of persons */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of list of teams */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /** Returns the list of input entered by the user, encapsulated in a {@code ListElementPointer} object */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" ListElementPointer getHistorySnapshot();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /** Returns the command trie. */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" CommandTrie getCommandTrie();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":4,"-":32}},{"path":"src/main/java/seedu/address/logic/LogicManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandResult;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CommandTrie;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.AddressBookParser;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * The main LogicManager of the app.","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"public class LogicManager extends ComponentManager implements Logic {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(LogicManager.class);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Model model;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final CommandHistory history;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final AddressBookParser addressBookParser;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final UndoRedoStack undoRedoStack;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final CommandTrie commandTrie;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public LogicManager(Model model) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" history \u003d new CommandHistory();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" addressBookParser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" commandTrie \u003d new CommandTrie();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public CommandResult execute(String commandText) throws CommandException, ParseException {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" logger.info(\"----------------[USER COMMAND][\" + commandText + \"]\");","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" Command command \u003d addressBookParser.parseCommand(commandText, model.getLockState());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" command.setData(model, history, undoRedoStack);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" CommandResult result \u003d command.execute();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" undoRedoStack.push(command);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" return result;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" } finally {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" history.add(commandText);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return model.getInitTeamList();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" public ListElementPointer getHistorySnapshot() {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" return new ListElementPointer(history.getHistory());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public CommandTrie getCommandTrie() {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" return commandTrie;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":6,"-":64}},{"path":"src/main/java/seedu/address/logic/commands/AddCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TEAM_NAME;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Adds a player to the address book.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class AddCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"add\";","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"a\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Adds a player to the address book. \"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TEAM_NAME + \"TEAMNAME] \"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" + PREFIX_NAME + \"John Doe \"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johnd@example.com \"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"98765432 \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" + PREFIX_ADDRESS + \"311, Clementi Ave 2, #02-25 \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" + PREFIX_RATING + \"0 \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" + PREFIX_POSITION + \"1 \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + PREFIX_JERSEY_NUMBER + \"17 \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"goodAttitude\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_NAME + \"NAME \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"EMAIL \"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New player added: %1$s\";","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" private final Person toAdd;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Creates an AddCommand to add the specified {@code Person}","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public AddCommand(Person person) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" requireNonNull(person);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" toAdd \u003d person;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" if (!toAdd.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" toAdd.getAvatar().setFilePath(toAdd.getName().fullName);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" if (!toAdd.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" model.assignPersonToTeam(toAdd, toAdd.getTeamName());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(toAdd.getTeamName());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(toAdd.getTeamName().toString()));","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd));","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException e) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" TeamName teamName \u003d toAdd.getTeamName();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" if (!model.getAddressBook().getTeamList().stream().anyMatch(t -\u003e t.getTeamName().equals(teamName))) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (!teamName.toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" throw new CommandException((Messages.MESSAGE_TEAM_NOT_FOUND));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" || (other instanceof AddCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" \u0026\u0026 toAdd.equals(((AddCommand) other).toAdd));","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":122}},{"path":"src/main/java/seedu/address/logic/commands/ChangeThemeCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.MainWindow;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Changes the theme of the Address Book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommand extends Command {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"changeTheme\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"cte\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" + \": Changes the theme of MTM.\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" + \"Parameters: THEME (must be either Light, or Dark)\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Examples: changeTheme Light, cte Dark\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_THEME_SUCCESS \u003d \"Theme updated to: %1$s\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final String theme;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand(String theme) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" this.theme \u003d theme.trim();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" if (!isValidTheme(this.theme)) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_THEME);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" if ((MainWindow.getCurrentTheme()).contains(this.theme)) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" throw new CommandException(\"Theme is already set to \" + this.theme + \"!\");","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeThemeEvent(this.theme));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_THEME_SUCCESS, this.theme));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private boolean isValidTheme(String theme) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" return theme.equals(\"Light\") || theme.equals(\"Dark\");","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" || (other instanceof ChangeThemeCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.theme.equals(((ChangeThemeCommand) other).theme)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":54}},{"path":"src/main/java/seedu/address/logic/commands/ClearCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Clears the address book.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class ClearCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"clear\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"c\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Address book has been cleared!\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" model.resetData(new AddressBook());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" // @@author Codee","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new ClearTeamsEvent());","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" // @@author","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":2,"-":25}},{"path":"src/main/java/seedu/address/logic/commands/CreateCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Creates a team to the application","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class CreateCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"create\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"ct\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \"Creates a team in MTM. \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"TEAM_NAME\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Arsenal\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"New team created: %1$s\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_TEAM \u003d \"This team already exist in the manager\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Team toCreate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Creates a CreateCommand to add the specified (@code Team)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CreateCommand(Team team) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" requireNonNull(team);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.toCreate \u003d team;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" model.createTeam(toCreate);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_TEAM);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ShowNewTeamNameEvent(toCreate.getTeamName().toString()));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, toCreate.getTeamName().toString()));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof CreateCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 toCreate.equals(((CreateCommand) other).toCreate));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":3,"-":57}},{"path":"src/main/java/seedu/address/logic/commands/DeleteCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * Deletes a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class DeleteCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"delete\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"d\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \": Deletes the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_PERSON_SUCCESS \u003d \"Deleted Person: %1$s\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private Person personToDelete;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public DeleteCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" requireNonNull(personToDelete);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" model.deletePerson(personToDelete);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_DELETE_PERSON_SUCCESS, personToDelete));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" personToDelete \u003d lastShownList.get(targetIndex.getZeroBased());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" || (other instanceof DeleteCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((DeleteCommand) other).targetIndex) // state check","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(this.personToDelete, ((DeleteCommand) other).personToDelete));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":69}},{"path":"src/main/java/seedu/address/logic/commands/EditCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_AVATAR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_JERSEY_NUMBER;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_POSITION;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" * Edits the details of an existing player in the address book.","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class EditCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"edit\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"e\";","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Edits the details of the player identified \"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]...\\n\"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" + PREFIX_PHONE + \"91234567 \"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" + PREFIX_EMAIL + \"johndoe@example.com\";","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_NAME + \"NAME] \"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE] \"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_EMAIL + \"EMAIL] \"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_ADDRESS + \"ADDRESS] \"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_RATING + \"RATING] \"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_POSITION + \"POSITION] \"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_JERSEY_NUMBER + \"JERSEY_NUMBER] \"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_AVATAR + \"AVATAR] \"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" + \"[\" + PREFIX_TAG + \"TAG]\";","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EDIT_PERSON_SUCCESS \u003d \"Edited Person: %1$s\";","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NOT_EDITED \u003d \"At least one field to edit must be provided.\";","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This player already exists in the address book.\";","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FILE_NOT_FOUND \u003d \"Avatar image file specified does not exist\";","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" private final EditPersonDescriptor editPersonDescriptor;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" private Person personToEdit;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" private Person editedPerson;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" * @param index of the player in the filtered player list to edit","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" * @param editPersonDescriptor details to edit the player with","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" public EditCommand(Index index, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" requireNonNull(editPersonDescriptor);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" this.editPersonDescriptor \u003d new EditPersonDescriptor(editPersonDescriptor);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" if (!editedPerson.getAvatar().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" editedPerson.getAvatar().setFilePath(editedPerson.getName().fullName);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_EDIT_PERSON_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" editedPerson \u003d createEditedPerson(personToEdit, editPersonDescriptor);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * edited with {@code editPersonDescriptor}.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * NOTE: Private fields will not be edited.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static Person createEditedPerson(Person personToEdit, EditPersonDescriptor editPersonDescriptor) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" Name updatedName \u003d editPersonDescriptor.getName().orElse(personToEdit.getName());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" Phone updatedPhone \u003d (personToEdit.getPhone().isPrivate())","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" ? personToEdit.getPhone() : editPersonDescriptor.getPhone().orElse(personToEdit.getPhone());","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" Email updatedEmail \u003d (personToEdit.getEmail().isPrivate())","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" ? personToEdit.getEmail() : editPersonDescriptor.getEmail().orElse(personToEdit.getEmail());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" Address updatedAddress \u003d (personToEdit.getAddress().isPrivate())","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" ? personToEdit.getAddress() : editPersonDescriptor.getAddress().orElse(personToEdit.getAddress());","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" Remark updatedRemark \u003d (personToEdit.getRemark().isPrivate())","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" ? personToEdit.getRemark() : personToEdit.getRemark();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e updatedTags \u003d editPersonDescriptor.getTags().orElse(personToEdit.getTags());","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" Rating updatedRating \u003d editPersonDescriptor.getRating().orElse(personToEdit.getRating());","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" JerseyNumber updatedJerseyNumber \u003d editPersonDescriptor.getJerseyNumber()","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" .orElse(personToEdit.getJerseyNumber());","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" Position updatedPosition \u003d editPersonDescriptor.getPosition().orElse(personToEdit.getPosition());","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" Avatar updatedAvatar \u003d editPersonDescriptor.getAvatar().orElse(personToEdit.getAvatar());","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" if (!(other instanceof EditCommand)) {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" EditCommand e \u003d (EditCommand) other;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" return index.equals(e.index)","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" \u0026\u0026 editPersonDescriptor.equals(e.editPersonDescriptor)","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(personToEdit, e.personToEdit);","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" * Stores the details to edit the player with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" * corresponding field value of the player.","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public static class EditPersonDescriptor {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" private Name name;","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" private Phone phone;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" private Email email;","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" private Address address;","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" private Set\u003cTag\u003e tags;","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" private Rating rating;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" private Position position;","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" private JerseyNumber jerseyNumber;","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" private Avatar avatar;","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" public EditPersonDescriptor() {}","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" * Copy constructor.","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally.","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" public EditPersonDescriptor(EditPersonDescriptor toCopy) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" setName(toCopy.name);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" setPhone(toCopy.phone);","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" setEmail(toCopy.email);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" setAddress(toCopy.address);","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" setTags(toCopy.tags);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" setRating(toCopy.rating);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" setPosition(toCopy.position);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" setJerseyNumber(toCopy.jerseyNumber);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" setAvatar(toCopy.avatar);","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" * Returns true if at least one field is edited.","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" public boolean isAnyFieldEdited() {","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" return CollectionUtil.isAnyNonNull(this.name, this.phone, this.email, this.address, this.tags,","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" this.rating, this.position, this.jerseyNumber, this.avatar);","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" public void setName(Name name) {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" public Optional\u003cName\u003e getName() {","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" return Optional.ofNullable(name);","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" public void setPhone(Phone phone) {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" public Optional\u003cPhone\u003e getPhone() {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" return Optional.ofNullable(phone);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void setEmail(Email email) {","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" public Optional\u003cEmail\u003e getEmail() {","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" return Optional.ofNullable(email);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void setAddress(Address address) {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" public Optional\u003cAddress\u003e getAddress() {","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" return Optional.ofNullable(address);","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * Sets {@code tags} to this object\u0027s {@code tags}.","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * A defensive copy of {@code tags} is used internally.","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" this.tags \u003d (tags !\u003d null) ? new HashSet\u003c\u003e(tags) : null;","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * Returns an unmodifiable tag set, which throws {@code UnsupportedOperationException}","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" * if modification is attempted.","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" * Returns {@code Optional#empty()} if {@code tags} is null.","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" public Optional\u003cSet\u003cTag\u003e\u003e getTags() {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" return (tags !\u003d null) ? Optional.of(Collections.unmodifiableSet(tags)) : Optional.empty();","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" public void setRating(Rating rating) {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" this.rating \u003d rating;","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" public Optional\u003cRating\u003e getRating() {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" return Optional.ofNullable(rating);","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" public void setPosition(Position position) {","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" this.position \u003d position;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" public Optional\u003cPosition\u003e getPosition() {","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" return Optional.ofNullable(position);","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" public void setJerseyNumber(JerseyNumber jerseyNumber) {","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" this.jerseyNumber \u003d jerseyNumber;","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" public Optional\u003cJerseyNumber\u003e getJerseyNumber() {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" return Optional.ofNullable(jerseyNumber);","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" public void setAvatar(Avatar avatar) {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" this.avatar \u003d avatar;","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" public Optional\u003cAvatar\u003e getAvatar() {","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" return Optional.ofNullable(avatar);","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" if (!(other instanceof EditPersonDescriptor)) {","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" EditPersonDescriptor e \u003d (EditPersonDescriptor) other;","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" return getName().equals(e.getName())","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":" \u0026\u0026 getPhone().equals(e.getPhone())","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" \u0026\u0026 getEmail().equals(e.getEmail())","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":" \u0026\u0026 getAddress().equals(e.getAddress())","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" \u0026\u0026 getTags().equals(e.getTags())","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" \u0026\u0026 getRating().equals(e.getRating())","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" \u0026\u0026 getPosition().equals(e.getPosition())","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":" \u0026\u0026 getJerseyNumber().equals(e.getJerseyNumber())","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" \u0026\u0026 getAvatar().equals(e.getAvatar());","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":335}},{"path":"src/main/java/seedu/address/logic/commands/FindCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Finds and lists all persons in address book whose name contains any of the argument keywords.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Keyword matching is case sensitive.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"public class FindCommand extends Command {","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"find\";","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"f\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Finds all persons whose names contain any of \"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"the specified keywords (case-sensitive) and displays them as a list with index numbers.\\n\"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"Parameters: KEYWORD [MORE_KEYWORDS]...\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" alice bob charlie\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"KEYWORD [MORE KEYWORD]\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final NameContainsKeywordsPredicate predicate;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public FindCommand(NameContainsKeywordsPredicate predicate) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" this.predicate \u003d predicate;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(predicate);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new CommandResult(getMessageForPersonListShownSummary(model.getFilteredPersonList().size()));","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" || (other instanceof FindCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" \u0026\u0026 this.predicate.equals(((FindCommand) other).predicate)); // state check","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/HistoryCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Lists all the commands entered by user from the start of app launch.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class HistoryCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"history\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"h\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Entered commands (from most recent to earliest):\\n%1$s\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_NO_HISTORY \u003d \"You have not yet entered any commands.\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" List\u003cString\u003e previousCommands \u003d history.getHistory();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" if (previousCommands.isEmpty()) {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_NO_HISTORY);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" Collections.reverse(previousCommands);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, String.join(\"\\n\", previousCommands)));","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory history, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(history);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" this.history \u003d history;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":38}},{"path":"src/main/java/seedu/address/logic/commands/KeyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Sets lock in model to true/false depending on current state","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"key\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"k\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the lock on MTM. \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"Functionality of MTM reduced\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Input empty password to see current lock state\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: [PASSWORD]\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \" myPassword\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"MTM lock toggled!\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_WRONG_PASS \u003d \"Password entered is incorrect. Please try again.\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"[PASSWORD]\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" private String password;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final Logger logger \u003d LogsCenter.getLogger(KeyCommand.class);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand(String password) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" this.password \u003d password;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" * Checks if input password is correct.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" private boolean correctPassword() {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" UserPrefs up \u003d model.getUserPrefs();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" String hash \u003d Hashing.sha256().hashString(password, StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" return hash.equals(up.getAddressBookHashedPass());","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" private boolean emptyPass() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" return password.isEmpty();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (emptyPass()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_USAGE + \"\\nLock state is now: \"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" if (correctPassword()) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (model.getLockState()) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" logger.info(\"Lock state is now: \" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS + \"\\nLock state is now: \"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" + Boolean.toString(model.getLockState()));","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_WRONG_PASS);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":74}},{"path":"src/main/java/seedu/address/logic/commands/ListCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Lists all persons in the address book to the user.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ListCommand extends Command {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"list\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"l\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Listed all persons\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new DeselectTeamEvent());","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":4,"-":20}},{"path":"src/main/java/seedu/address/logic/commands/RedoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Redo the previously undone command.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class RedoCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"redo\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"r\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Redo success!\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to redo!\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canRedo()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popRedo().redo();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/RemarkCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Updates the remark of an existing player in the address book.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class RemarkCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"remark\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"rm\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Updates the remark of the player identified \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"by the index number used in the last player listing. \"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" + \"Existing values will be overwritten by the input values.\\n\"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"[REMARK]\\n\"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" + PREFIX_REMARK + \"Must put on field\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADD_REMARK_SUCCESS \u003d \"Remark added to: %1$s\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final String MESSAGE_DELETE_REMARK_SUCCESS \u003d \"Remark removed from: %1$s\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private final Remark remark;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private Person personToEdit;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private Person editedPerson;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public RemarkCommand(Index index, Remark remark) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.remark \u003d remark;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" requireNonNull(personToEdit);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Updating remark should not result in duplicate\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" throw new AssertionError(\"The target player cannot be missing\");","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return new CommandResult(getSuccessMessage(editedPerson));","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" protected void preprocessUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" editedPerson \u003d new Person(personToEdit.getName(), personToEdit.getPhone(), personToEdit.getEmail(),","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" personToEdit.getAddress(), remark, personToEdit.getTeamName(), personToEdit.getTags(),","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" personToEdit.getRating(), personToEdit.getPosition(), personToEdit.getJerseyNumber(),","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" personToEdit.getAvatar());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" if (!(other instanceof RemarkCommand)) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" RemarkCommand e \u003d (RemarkCommand) other;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return index.equals(e.index)","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" \u0026\u0026 remark.equals(e.remark);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" * Gets the corresponding success message based on the remark field from {@code personToEdit} after editing.","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" private String getSuccessMessage(Person person) {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" String message \u003d remark.value.isEmpty() ? MESSAGE_DELETE_REMARK_SUCCESS : MESSAGE_ADD_REMARK_SUCCESS;","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return String.format(message, personToEdit);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":4,"-":107}},{"path":"src/main/java/seedu/address/logic/commands/SelectCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" * Selects a person identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class SelectCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"select\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"s\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \": Selects the person identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \"Parameters: INDEX (must be a positive integer)\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" 1\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX\";","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SELECT_PERSON_SUCCESS \u003d \"Selected Person: %1$s\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final Index targetIndex;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public SelectCommand(Index targetIndex) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.targetIndex \u003d targetIndex;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" if (targetIndex.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new JumpToListRequestEvent(targetIndex));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_SELECT_PERSON_SUCCESS, targetIndex.getOneBased()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" || (other instanceof SelectCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetIndex.equals(((SelectCommand) other).targetIndex)); // state check","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"-":54}},{"path":"src/main/java/seedu/address/logic/commands/SetCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" * Adds a colour to a tag in address book.","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/** @@author Codee Ong Ong */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"public class SetCommand extends Command {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_WORD \u003d \"setTagColour\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final String COMMAND_ALIAS \u003d \"stc\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sets the colour of tags to the colour of choice \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" + \"Parameters: \"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + PREFIX_TAG + \"TAG \"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" + \"Example: \" + COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG + \"friends \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" + PREFIX_TAG_COLOUR + \"green\\n\"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" + \"Colours to choose from are : teal, red, yellow, blue, orange, brown, \\n\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" + \"green, pink, black, grey\\n\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d PREFIX_TAG + \"TAG \" + PREFIX_TAG_COLOUR + \"TAG_COLOUR\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_INVALID_TAG \u003d \"tag is invalid! Please input a valid tag name!\";","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_SUCCESS \u003d \"tag %1$s colour changed to %2$s\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private final Tag tagToSet;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private final String tagColour;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" * Creates an AddCommand to add the specified {@code Person}","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" public SetCommand(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" requireNonNull(tag);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" tagToSet \u003d tag;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" tagColour \u003d colour;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public CommandResult execute() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" requireNonNull(model);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" boolean isTagValid \u003d model.setTagColour(tagToSet, tagColour);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" if (!tagToSet.isValidTagName(tagToSet.getTagName()) || !isTagValid) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_INVALID_TAG));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" EventsCenter.getInstance().post(new ChangeTagColourEvent(tagToSet.getTagName(), tagColour));","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, tagToSet.toString(), tagColour));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // Check if","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" // (a) Object is the same object","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" // (b) Object is an instance of the object and that toSet, tag and color are the same","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" || (other instanceof SetCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagToSet.getTagName().equals(((SetCommand) other).tagToSet.getTagName()))","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" \u0026\u0026 this.tagColour.equals(((SetCommand) other).tagColour);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/main/java/seedu/address/logic/commands/SortCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Sorts all players in address book by field. Can be done in asc or desc order.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class SortCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"sort\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"so\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_ASCENDING \u003d \"asc\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final String BY_DESCENDING \u003d \"desc\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Sorts players in address book \"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" + \"by fields in either ascending or descending order.\\n\"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: FIELD ORDER\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted fields for sort: name, email, address, rating, jersey, pos\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" + \"Accepted orders: asc \u0026 desc\\n\"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" + \" name \" + BY_ASCENDING;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"FIELD ORDER\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Players in address book have been sorted.\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_EMPTY_BOOK \u003d \"No player(s) to sort.\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private final String field;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" private final String order;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" public SortCommand(String field, String order) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(field);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(order);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" this.field \u003d field;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" this.order \u003d order;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public String getField() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" return this.field;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public String getOrder() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return this.order;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" model.sortPlayers(getField(), getOrder());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" } catch (NoPlayerException npe) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_EMPTY_BOOK);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":62}},{"path":"src/main/java/seedu/address/logic/commands/TogglePrivacyCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" * Toggles privacy of fields of player identified using it\u0027s last displayed index from the address book.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommand extends UndoableCommand {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_WORD \u003d \"toggleprivacy\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"tp\";","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD + \": Toggles the field privacy of the person\"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" + \" identified by the index number used in the last person listing.\\n\"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" + \"Parameters: INDEX (must be a positive integer) \"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"]\"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_EMAIL + \"]\"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_REMARK + \"]\"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_RATING + \"]\"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_ADDRESS + \"]\\n\"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" + \"Example: \" + COMMAND_WORD + \" 1 \"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE + \" \"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_EMAIL + \" \"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Changed the Privacy of the Person: %1$s\";","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_DUPLICATE_PERSON \u003d \"This person already exists in the address book.\";","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_NO_FIELDS \u003d \"No prefixes were specified!\";","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"INDEX \"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" + \"[\" + PREFIX_PHONE + \"PHONE]\"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_EMAIL + \"EMAIL]\"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_REMARK + \"REMARK]\"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_RATING + \"RATING]\"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" + \" [\" + PREFIX_ADDRESS + \"ADDRESS]\";","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" private final Index index;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" private final EditPersonPrivacy epp;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" private Person personToEdit;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" private Person editedPerson;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" * @param index of the person in the filtered person list to edit privacy","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand(Index index, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(index);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(epp);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.index \u003d index;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d epp;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" public CommandResult executeUndoableCommand() throws CommandException {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e lastShownList \u003d model.getFilteredPersonList();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" if (index.getZeroBased() \u003e\u003d lastShownList.size()) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" personToEdit \u003d lastShownList.get(index.getZeroBased());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" editedPerson \u003d createEditedPrivacyPerson(personToEdit, epp);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException e) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Person must have all fields!\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" model.updatePerson(personToEdit, editedPerson);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" throw new CommandException(MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"The target person cannot be missing\");","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedEvent(editedPerson, index));","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" return new CommandResult(String.format(MESSAGE_SUCCESS, editedPerson));","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" * Creates and returns a {@code Person} with the details of {@code personToEdit}","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" * edited with {@code editPersonPrivacy}.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" * NOTE: Private fields will not be edited.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" private static Person createEditedPrivacyPerson(Person personToEdit, EditPersonPrivacy epp)","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" throws IllegalValueException {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" assert personToEdit !\u003d null;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" Name updatedName \u003d personToEdit.getName();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" Phone updatedPhone \u003d createPhonePrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" Email updatedEmail \u003d createEmailPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" Address updatedAddress \u003d createAddressPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" Remark updatedRemark \u003d createRemarkPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" TeamName updatedTeamName \u003d personToEdit.getTeamName();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Set\u003cTag\u003e updatedTags \u003d personToEdit.getTags();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" Rating updatedRating \u003d createRatingPrivacy(personToEdit, epp);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" Position updatedPosition \u003d personToEdit.getPosition();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" JerseyNumber updatedJerseyNumber \u003d personToEdit.getJerseyNumber();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Avatar updatedAvatar \u003d personToEdit.getAvatar();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return new Person(updatedName, updatedPhone, updatedEmail, updatedAddress, updatedRemark,","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" updatedTeamName, updatedTags, updatedRating, updatedPosition, updatedJerseyNumber, updatedAvatar);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Phone) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Phone) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" private static Phone createPhonePrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" Phone phone;","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" person.getPhone().togglePrivacy();","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" phone \u003d new Phone(person.getPhone().toString());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Phone\");","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivatePhone() !\u003d null) {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" phone.togglePrivacy();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" phone.setPrivate(person.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" return phone;","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Email) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Email) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" private static Email createEmailPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" Email email;","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" person.getEmail().togglePrivacy();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" email \u003d new Email(person.getEmail().toString());","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Email\");","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateEmail() !\u003d null) {","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" email.togglePrivacy();","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" email.setPrivate(person.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" return email;","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Address) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Address) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" private static Address createAddressPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" Address address;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" person.getAddress().togglePrivacy();","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":" address \u003d new Address(person.getAddress().toString());","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Address\");","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateAddress() !\u003d null) {","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":" address.togglePrivacy();","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"lohtianwei"},"content":" address.setPrivate(person.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" return address;","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Remark) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Remark) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" private static Remark createRemarkPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" Remark remark;","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" person.getRemark().togglePrivacy();","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"lohtianwei"},"content":" remark \u003d new Remark(person.getRemark().toString());","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Remark\");","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRemark() !\u003d null) {","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":" remark.togglePrivacy();","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"lohtianwei"},"content":" remark.setPrivate(person.getRemark().isPrivate());","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" return remark;","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" * Creates a new (@code Rating) based on the input (@code Person) and (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" * @return A (@code Rating) with the same value as that of the (@code Person)\u0027s but with the privacy set to that","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" * of the (@code EditPersonPrivacy)","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" private static Rating createRatingPrivacy(Person person, EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":" Rating rating;","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" person.getRating().togglePrivacy();","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"lohtianwei"},"content":" rating \u003d new Rating(person.getRating().toString());","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"lohtianwei"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid Rating\");","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" if (epp.getPrivateRating() !\u003d null) {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":" rating.togglePrivacy();","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" rating.setPrivate(person.getRating().isPrivate());","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" return rating;","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" public Index getIndex() {","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":" return index;","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy getEpp() {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" return epp;","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" return true;","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof TogglePrivacyCommand)) {","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" return false;","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"lohtianwei"},"content":" // state check","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand e \u003d (TogglePrivacyCommand) other;","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" return index.equals(e.index)","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 epp.equals(e.epp);","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":" * Stores the details to edit the person with. Each non-empty field value will replace the","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" * corresponding field value of the person.","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" public static class EditPersonPrivacy {","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" private Boolean privatePhone;","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateEmail;","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateAddress;","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRemark;","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"lohtianwei"},"content":" private Boolean privateRating;","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy() {}","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"lohtianwei"},"content":" * Copy constructor.","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"lohtianwei"},"content":" * A defensive copy of {@code tags} is used internally.","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy (EditPersonPrivacy toCopy) {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d toCopy.privateAddress;","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d toCopy.privateEmail;","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d toCopy.privatePhone;","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d toCopy.privateRemark;","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d toCopy.privateRating;","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"lohtianwei"},"content":" public void setPrivatePhone(boolean privatePhone) {","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"lohtianwei"},"content":" this.privatePhone \u003d privatePhone;","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivatePhone() {","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"lohtianwei"},"content":" return privatePhone;","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateEmail(boolean privateEmail) {","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"lohtianwei"},"content":" this.privateEmail \u003d privateEmail;","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateEmail() {","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"lohtianwei"},"content":" return privateEmail;","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateAddress(boolean privateAddress) {","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"lohtianwei"},"content":" this.privateAddress \u003d privateAddress;","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateAddress() {","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"lohtianwei"},"content":" return privateAddress;","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRemark(boolean privateRemark) {","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"lohtianwei"},"content":" this.privateRemark \u003d privateRemark;","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRemark() {","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"lohtianwei"},"content":" return privateRemark;","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"lohtianwei"},"content":" public void setPrivateRating(boolean privateRating) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"lohtianwei"},"content":" this.privateRating \u003d privateRating;","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"lohtianwei"},"content":" public Boolean getPrivateRating() {","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"lohtianwei"},"content":" return privateRating;","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"lohtianwei"},"content":" *","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"lohtianwei"},"content":" * @return true if at least one field is not null","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"lohtianwei"},"content":" public boolean anyNonNullField() {","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"lohtianwei"},"content":" return CollectionUtil.isAnyNonNull(this.privateAddress, this.privateEmail, this.privatePhone,","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"lohtianwei"},"content":" this.privateRating, this.privateRemark);","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"lohtianwei"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"lohtianwei"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"lohtianwei"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"lohtianwei"},"content":" return true;","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"lohtianwei"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"lohtianwei"},"content":" if (!(other instanceof EditPersonPrivacy)) {","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"lohtianwei"},"content":" return false;","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"lohtianwei"},"content":" // state check","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy e \u003d (EditPersonPrivacy) other;","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"lohtianwei"},"content":" return getPrivatePhone().equals(e.getPrivatePhone())","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateAddress().equals(e.getPrivateAddress())","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateEmail().equals(e.getPrivateEmail())","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRemark().equals(e.getPrivateRemark())","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 getPrivateRating().equals(e.getPrivateRating());","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":394,"-":2}},{"path":"src/main/java/seedu/address/logic/commands/UndoCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * Undo the previous {@code UndoableCommand}.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class UndoCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"undo\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final String COMMAND_ALIAS \u003d \"u\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MESSAGE_SUCCESS \u003d \"Undo success!\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_FAILURE \u003d \"No more commands to undo!\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" requireAllNonNull(model, undoRedoStack);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" if (!undoRedoStack.canUndo()) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" throw new CommandException(MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" undoRedoStack.popUndo().undo();","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // @@author Codee","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new UndoTeamsEvent());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new PersonDetailsChangedNoParamEvent());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // @@author","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" return new CommandResult(MESSAGE_SUCCESS);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public void setData(Model model, CommandHistory commandHistory, UndoRedoStack undoRedoStack) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.model \u003d model;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.undoRedoStack \u003d undoRedoStack;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":3,"-":40}},{"path":"src/main/java/seedu/address/logic/commands/ViewCommand.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" * View a team identified using it\u0027s team name from the address book.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"public class ViewCommand extends Command {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final String COMMAND_WORD \u003d \"view\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final String COMMAND_ALIAS \u003d \"vt\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final String MESSAGE_USAGE \u003d COMMAND_WORD","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" + \": Views the team identified by the team name.\\n\"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" + \"Parameters: TEAM_NAME\\n\"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"Example: \" + COMMAND_WORD + \" Arsenal\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PARAMETERS \u003d \"TEAM_NAME\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String MESSAGE_VIEW_TEAM_SUCCESS \u003d \"Viewing Team: %1$s\";","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private final TeamName targetTeam;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public ViewCommand(TeamName targetTeam) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.targetTeam \u003d targetTeam;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" public CommandResult execute() throws CommandException {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" EventsCenter.getInstance().post(new HighlightSelectedTeamEvent(targetTeam.toString()));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" model.updateFilteredPersonList(targetTeam);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" throw new CommandException(Messages.MESSAGE_TEAM_NOT_FOUND);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" return new CommandResult(String.format(MESSAGE_VIEW_TEAM_SUCCESS, targetTeam.toString()));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" || (other instanceof ViewCommand // instanceof handles nulls","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" \u0026\u0026 this.targetTeam.equals(((ViewCommand) other).targetTeam)); // state check","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":51}},{"path":"src/main/java/seedu/address/logic/parser/AddressBookParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AssignCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.Command;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemoveCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RenameCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ViewCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Parses user input.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"public class AddressBookParser {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" public static final String MESSAGE_RESTRICTED \u003d \"Not allowed! Please unlock MTM before execution.\\n\"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" + KeyCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Used for initial separation of command word and args.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final Pattern BASIC_COMMAND_FORMAT \u003d Pattern.compile(\"(?\u003ccommandWord\u003e\\\\S+)(?\u003carguments\u003e.*)\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Parses user input into command for execution.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * @param userInput full user input string","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * @return the command based on the user input","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public Command parseCommand(String userInput, boolean lockState) throws ParseException {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" final Matcher matcher \u003d BASIC_COMMAND_FORMAT.matcher(userInput.trim());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" if (!matcher.matches()) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" final String commandWord \u003d matcher.group(\"commandWord\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" final String arguments \u003d matcher.group(\"arguments\");","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Command res \u003d lowLevelCommand(commandWord, arguments);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" if (res !\u003d null) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return res;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" if (lockState) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(MESSAGE_RESTRICTED);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" switch (commandWord) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" case AddCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" case AddCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new AddCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" case EditCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" case EditCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" return new EditCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" case SelectCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" case SelectCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return new SelectCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" case DeleteCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" case DeleteCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return new DeleteCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" case ClearCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" case ClearCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" return new ClearCommand();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" case RemarkCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" return new RemarkCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" case HistoryCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" case HistoryCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" return new HistoryCommand();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" case CreateCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return new CreateCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" case RemoveCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return new RemoveCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" case AssignCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" return new AssignCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" case RenameCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" return new RenameCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" case UndoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" case UndoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" return new UndoCommand();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" case RedoCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case RedoCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" return new RedoCommand();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" case SetCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" return new SetCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" case TogglePrivacyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" return new TogglePrivacyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" default:","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" throw new ParseException(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" * Checks for low level command words or aliases that do not violate restriction of a locked MTM.","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" * Else, control is returned back to original parseCommand method.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" * @param commandWord","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" * @param arguments","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" private Command lowLevelCommand(String commandWord, String arguments) throws ParseException {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" switch(commandWord) {","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" case ChangeThemeCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" return new ChangeThemeCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" case FindCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" return new FindCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" case ListCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" return new ListCommand();","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" case KeyCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" case ViewCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" return new ViewCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case ExitCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" return new ExitCommand();","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":" case HelpCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" return new HelpCommand();","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_WORD:","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":" case SortCommand.COMMAND_ALIAS:","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" return new SortCommandParser().parse(arguments);","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" return null;","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":82,"codeeong":6,"-":95}},{"path":"src/main/java/seedu/address/logic/parser/ChangeThemeCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.ChangeThemeCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":" * Parses input arguments and creates a new ThemeCommand object.","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParser implements Parser\u003cChangeThemeCommand\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" * Parses the given (@code String) in the context of a ThemeCommand.","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" * @return ThemeCommand Object for execution","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" public ChangeThemeCommand parse(String userInput) throws ParseException {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" if (userInput.length() \u003d\u003d 0) {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" return new ChangeThemeCommand(userInput);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":26}},{"path":"src/main/java/seedu/address/logic/parser/CliSyntax.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":" * Contains Command Line Interface (CLI) syntax definitions common to multiple commands","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"public class CliSyntax {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" /* Prefix definitions */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_NAME \u003d new Prefix(\"n/\");","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_PHONE \u003d new Prefix(\"p/\");","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_EMAIL \u003d new Prefix(\"e/\");","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_ADDRESS \u003d new Prefix(\"a/\");","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TAG \u003d new Prefix(\"t/\");","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_REMARK \u003d new Prefix(\"r/\");","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final Prefix PREFIX_TAG_COLOUR \u003d new Prefix(\"tc/\");","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_TEAM_NAME \u003d new Prefix(\"tm/\");","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_INDEX \u003d new Prefix(\"i/\");","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_RATING \u003d new Prefix(\"ra/\");","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_JERSEY_NUMBER \u003d new Prefix(\"j/\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_POSITION \u003d new Prefix(\"po/\");","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" public static final Prefix PREFIX_AVATAR \u003d new Prefix(\"av/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" public static final Prefix PREFIX_PASSWORD \u003d new Prefix(\"pw/\");","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":1,"codeeong":1,"-":21}},{"path":"src/main/java/seedu/address/logic/parser/KeyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":" * Parses input and creates KeyCommand object with password provided","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandParser implements Parser\u003cKeyCommand\u003e {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the KeyCommand","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" * and returns a KeyCommand object for execution.","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public KeyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" /*if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }*/","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length \u003e 1) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, KeyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" return new KeyCommand(argKeywords[0]);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":31}},{"path":"src/main/java/seedu/address/logic/parser/SetCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Stream;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" * This class is to check whether Set Command was input correctly","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class SetCommandParser implements Parser\u003cSetCommand\u003e {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" * Parses the given {@code String} of arguments in the context of the SetCommand","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * and returns an SetCommand object for execution.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public SetCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" ArgumentTokenizer.tokenize(args, PREFIX_TAG, PREFIX_TAG_COLOUR);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" if (!arePrefixesPresent(argMultimap, PREFIX_TAG, PREFIX_TAG_COLOUR)","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" || !argMultimap.getPreamble().isEmpty()) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d ParserUtil.parseTag(argMultimap.getValue(PREFIX_TAG).get());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" String colour \u003d ParserUtil.parseTagColour(argMultimap.getValue(PREFIX_TAG_COLOUR).get());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" if (!tag.isValidTagColour(colour)) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" return new SetCommand(tag, colour);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" throw new ParseException(","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, SetCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" * Returns true if none of the prefixes contains empty {@code Optional} values in the given","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" * {@code ArgumentMultimap}.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" private static boolean arePrefixesPresent(ArgumentMultimap argumentMultimap, Prefix... prefixes) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" return Stream.of(prefixes).allMatch(prefix -\u003e argumentMultimap.getValue(prefix).isPresent());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":56}},{"path":"src/main/java/seedu/address/logic/parser/SortCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new SortCommand object with field and order parameters provided","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParser implements Parser\u003cSortCommand\u003e {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_FIELDS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" \"name\", \"email\", \"address\", \"rating\", \"jersey\", \"pos\"));","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" public static final List\u003cString\u003e ACCEPTED_ORDERS \u003d new ArrayList\u003c\u003e(Arrays.asList(","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" \"asc\", \"desc\"));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public SortCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" String trimmedArgs \u003d args.trim();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" if (trimmedArgs.isEmpty()) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" //eliminates spaces","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" String[] argKeywords \u003d trimmedArgs.split(\"\\\\s+\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" //accounts for caps entries","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" for (int i \u003d 0; i \u003c argKeywords.length; i++) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" argKeywords[i] \u003d argKeywords[i].toLowerCase();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" if (argKeywords.length !\u003d 2) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_FIELDS.contains(argKeywords[0])) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (!ACCEPTED_ORDERS.contains(argKeywords[1])) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" return new SortCommand(argKeywords[0], argKeywords[1]);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":51}},{"path":"src/main/java/seedu/address/logic/parser/TogglePrivacyCommandParser.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_RATING;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" * Parses input arguments and creates a new TogglePrivacyCommand object","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParser implements Parser\u003cTogglePrivacyCommand\u003e {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" * Parses the given {@code String} of arguments in the context of the TogglePrivacyCommand","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" * and returns an TogglePrivacyCommand object for execution.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" * @throws ParseException if the user input does not conform the expected format","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" public TogglePrivacyCommand parse(String args) throws ParseException {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" requireNonNull(args);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" ArgumentMultimap argMultimap \u003d","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" ArgumentTokenizer.tokenize(args,","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" PREFIX_REMARK, PREFIX_PHONE, PREFIX_EMAIL, PREFIX_ADDRESS, PREFIX_RATING);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" Index index;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" index \u003d ParserUtil.parseIndex(argMultimap.getPreamble());","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } catch (IllegalValueException ive) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_PHONE).isPresent()) {","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_ADDRESS).isPresent()) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_EMAIL).isPresent()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_REMARK).isPresent()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" if (argMultimap.getValue(PREFIX_RATING).isPresent()) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" if (!epp.anyNonNullField()) {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" throw new ParseException(TogglePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" return new TogglePrivacyCommand(index, epp);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":67,"-":2}},{"path":"src/main/java/seedu/address/model/AddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.HashMap;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Map;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.UniquePersonList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.UniqueTeamList;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * Wraps all data at the address-book level","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Duplicates are not allowed (by .equals comparison)","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class AddressBook implements ReadOnlyAddressBook {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final UniquePersonList persons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private final UniqueTagList tags;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private final UniqueTeamList teams;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * The \u0027unusual\u0027 code block below is an non-static initialization block, sometimes used to avoid duplication","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * between constructors. See https://docs.oracle.com/javase/tutorial/java/javaOO/initial.html","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Note that non-static init blocks are not recommended to use. There are other ways to avoid duplication","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * among constructors.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" persons \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" tags \u003d new UniqueTagList();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" teams \u003d new UniqueTeamList();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public AddressBook() {}","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Creates an AddressBook using the Persons and Tags in the {@code toBeCopied}","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook(ReadOnlyAddressBook toBeCopied) {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" resetData(toBeCopied);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" //// list overwrite operations","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" this.persons.setPersons(persons);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void setTags(Set\u003cTag\u003e tags) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" this.tags.setTags(tags);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void setTeams(List\u003cTeam\u003e teams) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" this.teams.setTeams(teams);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" * Resets the existing data of this {@code AddressBook} with {@code newData}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" requireNonNull(newData);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" setTags(new HashSet\u003c\u003e(newData.getTagList()));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e syncedPersonList \u003d newData.getPersonList().stream()","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" .map(this::syncWithMasterTagList)","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e syncedTeamList \u003d newData.getTeamList();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" setPersons(syncedPersonList);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" setTeams(syncedTeamList);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBooks should not have duplicate persons\");","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException e) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" throw new AssertionError(\"MTM should not have duplicate teams\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" //// person-level operations","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * Adds a person to the address book.","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Also checks the new person\u0027s tags and updates {@link #tags} with any new tags found,","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and updates the Tag objects in the person to point to those in {@link #tags}.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if an equivalent person already exists.","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person p) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person person \u003d syncWithMasterTagList(p);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" persons.add(person);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * {@code AddressBook}\u0027s tag list will be updated with the tags of {@code editedPerson}.","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * @see #syncWithMasterTagList(Person)","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" Person syncedEditedPerson \u003d syncWithMasterTagList(editedPerson);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" // TODO: the tags master list will be updated even though the below line fails.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" // This can cause the tags master list to have additional tags that are not tagged to any person","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" // in the person list.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" if (!editedPerson.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" teams.getTeam(editedPerson.getTeamName()).setPerson(target, editedPerson);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" persons.setPerson(target, syncedEditedPerson);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" removeUnusedTags();","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayersBy(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" persons.sortBy(field, order);","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" //@@author","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Updates the master tag list to include tags in {@code person} that are not in the list.","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" * @return a copy of this {@code person} such that every tag in this person points to a Tag object in the master","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" * list.","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" private Person syncWithMasterTagList(Person person) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" final UniqueTagList personTags \u003d new UniqueTagList(person.getTags());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" tags.mergeFrom(personTags);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" // Create map with values \u003d tag object references in the master list","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" // used for checking person tag references","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" final Map\u003cTag, Tag\u003e masterTagObjects \u003d new HashMap\u003c\u003e();","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" tags.forEach(tag -\u003e masterTagObjects.put(tag, tag));","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" // Rebuild the list of person tags to point to the relevant tags in the master tag list.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e correctTagReferences \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" personTags.forEach(tag -\u003e correctTagReferences.add(masterTagObjects.get(tag)));","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" return new Person(","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" person.getName(), person.getPhone(), person.getEmail(), person.getAddress(), person.getRemark(),","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" person.getTeamName(), correctTagReferences, person.getRating(), person.getPosition(),","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" * Removes {@code key} from this {@code AddressBook}.","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code key} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" public boolean removePerson(Person key) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" if (persons.remove(key)) {","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" //// tag-level operations","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void addTag(Tag t) throws UniqueTagList.DuplicateTagException {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" tags.add(t);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" * Sets the colour of {@code tag}.","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" public void setTagColour(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" for (Tag t : tags) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" if (t.getTagName().equals(tag.getTagName())) {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(colour);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Removes {@code tag} from all persons in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" public void removeTag(Tag tag) {","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" for (Person person : persons) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" removeTagFromPerson(tag, person);","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" * Removes {@code tag} from {@code person} in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if the {@code person} is not in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" private void removeTagFromPerson(Tag tag, Person person) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e newTags \u003d new HashSet\u003c\u003e(person.getTags());","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" if (!newTags.remove(tag)) {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" return;","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" Person newPerson \u003d","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" person.getRemark(), person.getTeamName(), newTags, person.getRating(), person.getPosition(),","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" updatePerson(person, newPerson);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person \"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" + \"after updating person\u0027s tag.\");","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" * Removes all {@code tag} that are not in used by any {@code Person} in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" private void removeUnusedTags() {","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" Set\u003cTag\u003e tagsInPersons \u003d persons.asObservableList().stream()","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" .map(Person::getTags)","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" .flatMap(Set::stream)","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" .collect(Collectors.toSet());","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" tags.setTags(tagsInPersons);","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" //@@author jordancjq","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" * Creates a team in the manager.","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" * @throws DuplicateTeamException if an equivalent team already exists.","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" public void createTeam(Team t) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" teams.add(t);","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" * Assigns a {@code person} to a {@code team}.","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" if (!person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(), person.getPosition(),","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" if (!person.getTeamName().equals(newPersonWithTeam.getTeamName())) {","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" * Unassigns a {@code person} from team.","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code teamName} in {@code person} is {@code UNSPECIFIED_FIELD}.","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" if (person.getTeamName().toString().equals(UNSPECIFIED_FIELD)) {","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException(person.getName().toString());","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" Person newPersonWithTeam \u003d","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" removePersonFromTeam(person, person.getTeamName());","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Team should contain of this person\");","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" updatePerson(person, newPersonWithTeam);","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" * Immediately add a {@code person} to a {@code team}.","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" * @throws TeamNotFoundException if the {@code team} is not found in this {@code AddressBook}.","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" public void addPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" teams.assignPersonToTeam(person, teams.getTeam(teamName));","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":" * Removes a {@code person} from a {@code team}.","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":" private void removePersonFromTeam(Person person, TeamName teamName) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" teams.removePersonFromTeam(person, teams.getTeam(teamName));","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" * Removes a {@code team} from {@code teams}.","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" if (!teams.contains(teamName)) {","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" Team teamToRemove \u003d teams.getTeam(teamName);","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":" for (Person person : teamToRemove) {","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":" removeTeamFromPerson(person);","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" teams.remove(teamToRemove);","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" * Removes {@code teamName} from {@code person} in this {@code Team}.","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":" private void removeTeamFromPerson(Person person) {","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" Person personWithRemoveTeam \u003d","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" person.getRemark(), new TeamName(UNSPECIFIED_FIELD), person.getTags(), person.getRating(),","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRemoveTeam);","isFullCredit":true},{"lineNumber":365,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":366,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":367,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":368,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":369,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":370,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":371,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":372,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":373,"author":{"gitId":"-"},"content":" * Renames {@code Team} with {@code updatedTeamName}.","isFullCredit":true},{"lineNumber":374,"author":{"gitId":"-"},"content":" * @return","isFullCredit":true},{"lineNumber":375,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":376,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {","isFullCredit":true},{"lineNumber":377,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":378,"author":{"gitId":"-"},"content":" List\u003cPerson\u003e renameTeamPersonList \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":379,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":380,"author":{"gitId":"-"},"content":" for (Person person : persons) {","isFullCredit":true},{"lineNumber":381,"author":{"gitId":"-"},"content":" if (person.getTeamName().equals(targetTeam.getTeamName())) {","isFullCredit":true},{"lineNumber":382,"author":{"gitId":"-"},"content":" renameTeamPersonList.add(renameTeamInPerson(person, updatedTeamName, targetTeam));","isFullCredit":true},{"lineNumber":383,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":384,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":385,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":386,"author":{"gitId":"-"},"content":" Team updatedTeam \u003d new Team(updatedTeamName, renameTeamPersonList);","isFullCredit":true},{"lineNumber":387,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":388,"author":{"gitId":"-"},"content":" teams.setTeam(targetTeam, updatedTeam);","isFullCredit":true},{"lineNumber":389,"author":{"gitId":"-"},"content":" } catch (DuplicateTeamException dte) {","isFullCredit":true},{"lineNumber":390,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate team after renaming\");","isFullCredit":true},{"lineNumber":391,"author":{"gitId":"-"},"content":" } catch (TeamNotFoundException tnfe) {","isFullCredit":true},{"lineNumber":392,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: Teams should contain this team\");","isFullCredit":true},{"lineNumber":393,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":394,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":395,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":396,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":397,"author":{"gitId":"-"},"content":" * Renames {@code teamName} in {@code person} with {@code teamName}.","isFullCredit":true},{"lineNumber":398,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":399,"author":{"gitId":"-"},"content":" private Person renameTeamInPerson(Person person, TeamName teamName, Team targetTeam) {","isFullCredit":true},{"lineNumber":400,"author":{"gitId":"-"},"content":" Person personWithRenameTeam \u003d","isFullCredit":true},{"lineNumber":401,"author":{"gitId":"-"},"content":" new Person(person.getName(), person.getPhone(), person.getEmail(), person.getAddress(),","isFullCredit":true},{"lineNumber":402,"author":{"gitId":"-"},"content":" person.getRemark(), teamName, person.getTags(), person.getRating(),","isFullCredit":true},{"lineNumber":403,"author":{"gitId":"-"},"content":" person.getPosition(), person.getJerseyNumber(), person.getAvatar());","isFullCredit":true},{"lineNumber":404,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":405,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":406,"author":{"gitId":"-"},"content":" persons.setPerson(person, personWithRenameTeam);","isFullCredit":true},{"lineNumber":407,"author":{"gitId":"-"},"content":" return personWithRenameTeam;","isFullCredit":true},{"lineNumber":408,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":409,"author":{"gitId":"-"},"content":" throw new AssertionError(\"AddressBook should not have duplicate person after assigning team\");","isFullCredit":true},{"lineNumber":410,"author":{"gitId":"-"},"content":" } catch (PersonNotFoundException pnfe) {","isFullCredit":true},{"lineNumber":411,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Impossible: AddressBook should contain this person\");","isFullCredit":true},{"lineNumber":412,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":413,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":414,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":415,"author":{"gitId":"-"},"content":" //// util methods","isFullCredit":true},{"lineNumber":416,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":417,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":418,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":419,"author":{"gitId":"-"},"content":" return persons.asObservableList().size() + \" persons, \" + tags.asObservableList().size() + \" tags\";","isFullCredit":true},{"lineNumber":420,"author":{"gitId":"-"},"content":" // TODO: refine later","isFullCredit":true},{"lineNumber":421,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":422,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":423,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":424,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getPersonList() {","isFullCredit":true},{"lineNumber":425,"author":{"gitId":"-"},"content":" return persons.asObservableList();","isFullCredit":true},{"lineNumber":426,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":427,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":428,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":429,"author":{"gitId":"-"},"content":" public ObservableList\u003cTag\u003e getTagList() {","isFullCredit":true},{"lineNumber":430,"author":{"gitId":"-"},"content":" return tags.asObservableList();","isFullCredit":true},{"lineNumber":431,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":432,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":433,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":434,"author":{"gitId":"-"},"content":" public ObservableList\u003cTeam\u003e getTeamList() {","isFullCredit":true},{"lineNumber":435,"author":{"gitId":"-"},"content":" return teams.asObservableList();","isFullCredit":true},{"lineNumber":436,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":437,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":438,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":439,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":440,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":441,"author":{"gitId":"-"},"content":" || (other instanceof AddressBook // instanceof handles nulls","isFullCredit":true},{"lineNumber":442,"author":{"gitId":"-"},"content":" \u0026\u0026 this.persons.equals(((AddressBook) other).persons)","isFullCredit":true},{"lineNumber":443,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tags.equalsOrderInsensitive(((AddressBook) other).tags));","isFullCredit":true},{"lineNumber":444,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":445,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":446,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":447,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":448,"author":{"gitId":"-"},"content":" // use this method for custom fields hashing instead of implementing your own","isFullCredit":true},{"lineNumber":449,"author":{"gitId":"-"},"content":" return Objects.hash(persons, tags);","isFullCredit":true},{"lineNumber":450,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":451,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":7,"codeeong":13,"-":431}},{"path":"src/main/java/seedu/address/model/Model.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The API of the Model component.","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public interface Model {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /** {@code Predicate} that always evaluate to true */","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" Predicate\u003cPerson\u003e PREDICATE_SHOW_ALL_PERSONS \u003d unused -\u003e true;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" /** Clears existing backing model and replaces with the provided new data. */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" void resetData(ReadOnlyAddressBook newData);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" /** Returns the AddressBook */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" ReadOnlyAddressBook getAddressBook();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" /** Deletes the given person. */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" void deletePerson(Person target) throws PersonNotFoundException;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /** Adds the given person */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" void addPerson(Person person) throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * Replaces the given person {@code target} with {@code editedPerson}.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if updating the person\u0027s details causes the person to be equivalent to","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * another existing person in the list.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /** Returns an unmodifiable view of the filtered person list */","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" ObservableList\u003cPerson\u003e getFilteredPersonList();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code predicate}.","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * Updates the filter of the filtered person list to filter by the given {@code teamName}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws NullPointerException if {@code predicate} is null.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" * Sorts players in address book by field in asc or desc order","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" * @param field","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" * @param order","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" void sortPlayers(String field, String order) throws NoPlayerException;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" boolean getLockState();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" UserPrefs getUserPrefs();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" /** Locks address book from model*/","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" void lockAddressBookModel();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" /** Unlocks address book from model*/","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" void unlockAddressBookModel();","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" /** Removes the given {@code tag} from all {@code Person}s. */","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" void deleteTag(Tag tag);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" /** Create the given team */","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" void createTeam(Team team) throws DuplicateTeamException;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" /** Assign person to team */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" void assignPersonToTeam(Person person, TeamName teamName)","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" throws DuplicatePersonException;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /** Unassign person from team */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" void unassignPersonFromTeam(Person person) throws TeamNotFoundException;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" /** Removes the given team */","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" void removeTeam(TeamName teamName) throws TeamNotFoundException;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /** Renames the given team */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" void renameTeam(Team targetTeam, TeamName teamName);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" /** sets the given {@code tag} to color. */","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" boolean setTagColour(Tag tag, String colour);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" /** Returns an unmodifiable view of the team list */","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTeam\u003e getInitTeamList();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":18,"codeeong":5,"-":78}},{"path":"src/main/java/seedu/address/model/ModelManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.transformation.FilteredList;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.model.AddressBookChangedEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * Represents the in-memory model of the address book data.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * All changes to any model should be synchronized.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"public class ModelManager extends ComponentManager implements Model {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(ModelManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private final AddressBook addressBook;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private final FilteredList\u003cPerson\u003e filteredPersons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private final UserPrefs userPrefs;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * Initializes a ModelManager with the given addressBook and userPrefs.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" public ModelManager(ReadOnlyAddressBook addressBook, UserPrefs userPrefs) {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" requireAllNonNull(addressBook, userPrefs);","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" this.userPrefs \u003d userPrefs;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" logger.fine(\"Initializing with address book: \" + addressBook + \" and user prefs \" + userPrefs);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" this.addressBook \u003d new AddressBook(addressBook);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" filteredPersons \u003d new FilteredList\u003c\u003e(this.addressBook.getPersonList());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ModelManager() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" this(new AddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" addressBook.resetData(newData);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /** Raises an event to indicate the model has changed */","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" private void indicateAddressBookChanged() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" raise(new AddressBookChangedEvent(addressBook));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public synchronized void deletePerson(Person target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" addressBook.removePerson(target);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public synchronized void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" addressBook.addPerson(person);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" requireAllNonNull(target, editedPerson);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" addressBook.updatePerson(target, editedPerson);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" addressBook.sortPlayersBy(field, order);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" return userPrefs;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().lockAddressBook();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" getUserPrefs().unlockAddressBook();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" return getUserPrefs().getAddressBookLockState();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" //@@author","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" addressBook.removeTag(tag);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" //@@author jordancjq","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" public synchronized void createTeam(Team team) throws DuplicateTeamException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" addressBook.createTeam(team);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" public synchronized void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" addressBook.assignPersonToTeam(person, teamName);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public synchronized void unassignPersonFromTeam(Person person) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" addressBook.unassignPersonFromTeam(person);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" public synchronized void removeTeam(TeamName teamName) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" requireNonNull(teamName);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" raise(new RemoveSelectedTeamEvent(teamName));","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" addressBook.removeTeam(teamName);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" public synchronized void renameTeam(Team targetTeam, TeamName updatedTeamName) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" requireAllNonNull(targetTeam, updatedTeamName);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" addressBook.renameTeam(targetTeam, updatedTeamName);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public boolean setTagColour(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" ObservableList\u003cTag\u003e allTags \u003d addressBook.getTagList();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" boolean isTagValid \u003d false;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" for (Tag t : allTags) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" if (t.getTagName().equals(tag.getTagName())) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" isTagValid \u003d true;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" break;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" if (!isTagValid) {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" addressBook.setTagColour(tag, colour);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" indicateAddressBookChanged();","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" return isTagValid;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" return addressBook.getTeamList();","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Filtered Person List Accessors \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * Returns an unmodifiable view of the list of {@code Person} backed by the internal list of","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" * {@code addressBook}","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(filteredPersons);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" requireNonNull(predicate);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(predicate);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" //@@author jordancjq","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" requireNonNull(targetTeam);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" List\u003cTeam\u003e teamList \u003d addressBook.getTeamList();","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (teamList.stream().anyMatch(target -\u003e target.getTeamName().equals(targetTeam))) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" filteredPersons.setPredicate(t -\u003e t.getTeamName().equals(targetTeam));","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" throw new TeamNotFoundException();","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" public boolean equals(Object obj) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" if (obj \u003d\u003d this) {","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" if (!(obj instanceof ModelManager)) {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" ModelManager other \u003d (ModelManager) obj;","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" return addressBook.equals(other.addressBook)","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" \u0026\u0026 filteredPersons.equals(other.filteredPersons);","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":28,"codeeong":7,"-":197}},{"path":"src/main/java/seedu/address/model/UserPrefs.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"import java.nio.charset.StandardCharsets;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import com.google.common.hash.Hashing;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Represents User\u0027s preferences.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class UserPrefs {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private GuiSettings guiSettings;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String addressBookFilePath \u003d \"data/myteammanager.xml\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private String addressBookName \u003d \"MyTeamManager\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private String addressBookTheme \u003d \"DarkTheme.css\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" private String addressBookHashedPass \u003d Hashing.sha256()","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" .hashString(\"ilikesports\", StandardCharsets.UTF_8).toString();","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public UserPrefs() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.setGuiSettings(500, 500, 0, 0);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public GuiSettings getGuiSettings() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return guiSettings \u003d\u003d null ? new GuiSettings() : guiSettings;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void updateLastUsedGuiSetting(GuiSettings guiSettings) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.guiSettings \u003d guiSettings;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public void setGuiSettings(double width, double height, int x, int y) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" guiSettings \u003d new GuiSettings(width, height, x, y);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getAddressBookFilePath() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return addressBookFilePath;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public void setAddressBookFilePath(String addressBookFilePath) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this.addressBookFilePath \u003d addressBookFilePath;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddressBookName() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressBookName;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBook() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d true;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBook() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.addressBookLockState \u003d false;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public String getAddressBookHashedPass() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" return addressBookHashedPass;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean getAddressBookLockState() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return this.addressBookLockState;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public void setAddressBookName(String addressBookName) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" this.addressBookName \u003d addressBookName;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public String getAddressBookTheme() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return addressBookTheme;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" public void setAddressBookTheme(String addressBookTheme) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" this.addressBookTheme \u003d addressBookTheme;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" if (!(other instanceof UserPrefs)) { //this handles null as well.","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" UserPrefs o \u003d (UserPrefs) other;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" return Objects.equals(guiSettings, o.guiSettings)","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(addressBookFilePath, o.addressBookFilePath)","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookName, o.addressBookName)","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookHashedPass, o.addressBookHashedPass)","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" \u0026\u0026 Objects.equals(addressBookLockState, o.addressBookLockState);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" return Objects.hash(guiSettings, addressBookFilePath, addressBookName);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" StringBuilder sb \u003d new StringBuilder();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" sb.append(\"Gui Settings : \" + guiSettings.toString());","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" sb.append(\"\\nLocal data file location : \" + addressBookFilePath);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" sb.append(\"\\nAddressBook name : \" + addressBookName);","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nPassword: \" + addressBookHashedPass);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" sb.append(\"\\nLock State: \" + Boolean.toString(this.addressBookLockState));","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" return sb.toString();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":28,"codeeong":9,"-":80}},{"path":"src/main/java/seedu/address/model/person/Address.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s address in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Address {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_ADDRESS_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" \"Person addresses can take any values, and it should not be blank\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" * The first character of the address must not be a whitespace,","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" * otherwise \" \" (a blank string) becomes a valid input.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String ADDRESS_VALIDATION_REGEX \u003d \"[^\\\\s].*\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs an {@code Address}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" * @param address A valid address.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public Address(String address) {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" requireNonNull(address);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" checkArgument(isValidAddress(address), MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.value \u003d address;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" public Address(String address, boolean isPrivate) {","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" this(address);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person email.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public static boolean isValidAddress(String test) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" return test.matches(ADDRESS_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Address\u003e\";","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" || (other instanceof Address // instanceof handles nulls","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Address) other).value)); // state check","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":73}},{"path":"src/main/java/seedu/address/model/person/Avatar.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.nio.file.Files;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.nio.file.Path;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.nio.file.Paths;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.nio.file.StandardCopyOption;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.regex.Matcher;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.regex.Pattern;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s avatar in the address book. Contains filepath to avatar image file.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidAvatar(String)}","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"public class Avatar {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public static final String MESSAGE_AVATAR_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" \"Please specify the absolute filepath for the avatar image eg. av/C:\\\\image.png\\n (for Windows), \"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" + \"av//User/username/path/to/image.jpg (for MacOS). \"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" + \"Image file should be 200x200 and in jpg or png format\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String AVATAR_VALIDATION_PATTERN \u003d \"([^\\\\s]+(\\\\.(?i)(jpg|png))$)\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private String value;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * Constructs an {@code Avatar}.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @param avatar A valid avatar.","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" public Avatar(String avatar) {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" requireNonNull(avatar);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" checkArgument(isValidAvatar(avatar), MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.value \u003d avatar;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s avatar.","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public static boolean isValidAvatar(String test) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" Pattern pattern \u003d Pattern.compile(AVATAR_VALIDATION_PATTERN);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" Matcher matcher \u003d pattern.matcher(test);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return matcher.matches() || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" * Copies the image file from file path entered into images/ and renames it as [name].png","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" * and saves the file path in value","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" * @param player player\u0027s avatar image filepath string","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * @throws IOException thrown when file not found","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" public void setFilePath(String player) throws IOException {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (value.equals(\"\u003cUNSPECIFIED\u003e\")) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" final File file \u003d new File(value);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Path dest \u003d new File(\"images/\" + player.replaceAll(\"\\\\s+\", \"\") + \".png\").toPath();","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Files.createDirectories(Paths.get(\"images\")); // Creates missing directories if any","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" Files.copy(file.toPath(), dest, StandardCopyOption.REPLACE_EXISTING);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" this.value \u003d dest.toString();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" public String getValue() {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public static void setUpPlaceholderForTest() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" Files.copy(Avatar.class.getResourceAsStream(\"/images/placeholder_test.png\"),","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" Paths.get(\"images/placeholder_test.png\"), StandardCopyOption.REPLACE_EXISTING);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" } catch (IOException e) {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" LogsCenter.getLogger(Avatar.class).warning(\"placeholder image file missing\");","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" || (other instanceof Avatar // instanceof handles nulls","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Avatar) other).value)); // state check","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":108}},{"path":"src/main/java/seedu/address/model/person/Email.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s email in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Email {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" private static final String SPECIAL_CHARACTERS \u003d \"!#$%\u0026\u0027*+/\u003d?`{|}~^.-\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public static final String MESSAGE_EMAIL_CONSTRAINTS \u003d \"Person emails should be of the format local-part@domain \"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" + \"and adhere to the following constraints:\\n\"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" + \"1. The local-part should only contain alphanumeric characters and these special characters, excluding \"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" + \"the parentheses, (\" + SPECIAL_CHARACTERS + \") .\\n\"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" + \"2. This is followed by a \u0027@\u0027 and then a domain name. \"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"The domain name must:\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \" - be at least 2 characters long\\n\"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" + \" - start and end with alphanumeric characters\\n\"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" + \" - consist of alphanumeric characters, a period or a hyphen for the characters in between, if any.\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" // alphanumeric and special characters","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String LOCAL_PART_REGEX \u003d \"^[\\\\w\" + SPECIAL_CHARACTERS + \"]+\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private static final String DOMAIN_FIRST_CHARACTER_REGEX \u003d \"[^\\\\W_]\"; // alphanumeric characters except underscore","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private static final String DOMAIN_MIDDLE_REGEX \u003d \"[a-zA-Z0-9.-]*\"; // alphanumeric, period and hyphen","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String DOMAIN_LAST_CHARACTER_REGEX \u003d \"[^\\\\W_]$\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public static final String EMAIL_VALIDATION_REGEX \u003d LOCAL_PART_REGEX + \"@\"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" + DOMAIN_FIRST_CHARACTER_REGEX + DOMAIN_MIDDLE_REGEX + DOMAIN_LAST_CHARACTER_REGEX;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Constructs an {@code Email}.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" * @param email A valid email address.","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public Email(String email) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" requireNonNull(email);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" checkArgument(isValidEmail(email), MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" this.value \u003d email;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" public Email(String email, boolean isPrivate) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" this(email);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Returns if a given string is a valid person email.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static boolean isValidEmail(String test) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" return test.matches(EMAIL_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Email\u003e\";","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" || (other instanceof Email // instanceof handles nulls","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Email) other).value)); // state check","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":81}},{"path":"src/main/java/seedu/address/model/person/Phone.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s phone number in the address book.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidPhone(String)}","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class Phone {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_PHONE_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Phone numbers can only contain numbers, and should be at least 3 digits long\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public static final String PHONE_VALIDATION_REGEX \u003d \"\\\\d{3,}\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * Constructs a {@code Phone}.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * @param phone A valid phone number.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public Phone(String phone) {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" requireNonNull(phone);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" checkArgument(isValidPhone(phone), MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" this.value \u003d phone;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" public Phone(String phone, boolean isPrivate) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" this(phone);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid person phone number.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public static boolean isValidPhone(String test) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return test.matches(PHONE_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Phone\u003e\";","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" || (other instanceof Phone // instanceof handles nulls","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Phone) other).value)); // state check","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":68}},{"path":"src/main/java/seedu/address/model/person/Rating.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"//@@author lithiumlkid","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * Represents a Player\u0027s rating in the address book.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is valid as declared in {@link #isValidRating(String)}","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"public class Rating {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" public static final String MESSAGE_RATING_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" \"Player\u0027s rating should be an integer from 0 - 5.\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public static final String RATING_VALIDATION_REGEX \u003d \"[0-5]\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs an {@code Rating}.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param rating A valid rating.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Rating(String rating) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(rating);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidRating(rating), MESSAGE_RATING_CONSTRAINTS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.value \u003d rating;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public Rating(String rating, boolean isPrivate) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" this(rating);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * Returns true if a given string is a valid player\u0027s rating.","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public static boolean isValidRating(String test) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" return test.matches(RATING_VALIDATION_REGEX) || test.equals(UNSPECIFIED_FIELD);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" return \"\u003cPrivate Rating\u003e\";","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" || (other instanceof Rating // instanceof handles nulls","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Rating) other).value)); // state check","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":21,"-":56}},{"path":"src/main/java/seedu/address/model/person/Remark.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Person\u0027s remark in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; is always valid}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Remark {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String MESSAGE_REMARK_CONSTRAINTS \u003d","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" \"Remark can contain any values, can even be blank\";","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public final String value;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private boolean isPrivate;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" * Constructs a {@code Remark}","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * @param remark Any remark","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public Remark(String remark) {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" requireNonNull(remark);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" this.value \u003d remark;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" this.isPrivate \u003d false;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" public Remark(String remark, boolean isPrivate) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" this(remark);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" this.setPrivate(isPrivate);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" if (isPrivate) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return \"\u003cPrivate Remarks\u003e\";","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" return value;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" public boolean isPrivate() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" return isPrivate;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void togglePrivacy() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate ? false : true;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public void setPrivate(boolean isPrivate) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" this.isPrivate \u003d isPrivate;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" || (other instanceof Remark // instanceof handles nulls","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" \u0026\u0026 this.value.equals(((Remark) other).value)); // state check","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" return value.hashCode();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":8,"-":57}},{"path":"src/main/java/seedu/address/model/person/UniquePersonList.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.person;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collection;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import java.util.Comparator;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.CollectionUtil;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * A list of persons that enforces uniqueness between its elements and does not allow nulls.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Supports a minimal set of list operations.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @see Person#equals(Object)","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * @see CollectionUtil#elementsAreUnique(Collection)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class UniquePersonList implements Iterable\u003cPerson\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private final ObservableList\u003cPerson\u003e internalList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Returns true if the list contains an equivalent person as the given argument.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" public boolean contains(Person toCheck) {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" requireNonNull(toCheck);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return internalList.contains(toCheck);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Adds a person to the list.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the person to add is a duplicate of an existing person in the list.","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void add(Person toAdd) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" requireNonNull(toAdd);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" if (contains(toAdd)) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" internalList.add(toAdd);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Replaces the person {@code target} in the list with {@code editedPerson}.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws DuplicatePersonException if the replacement is equivalent to another existing person in the list.","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if {@code target} could not be found in the list.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void setPerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throws DuplicatePersonException, PersonNotFoundException {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" requireNonNull(editedPerson);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" int index \u003d internalList.indexOf(target);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" if (index \u003d\u003d -1) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" if (!target.equals(editedPerson) \u0026\u0026 internalList.contains(editedPerson)) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" internalList.set(index, editedPerson);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" * Removes the equivalent person from the list.","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" * @throws PersonNotFoundException if no such person could be found in the list.","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" public boolean remove(Person toRemove) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" requireNonNull(toRemove);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" final boolean personFoundAndDeleted \u003d internalList.remove(toRemove);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" if (!personFoundAndDeleted) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" throw new PersonNotFoundException();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return personFoundAndDeleted;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" public void setPersons(UniquePersonList replacement) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" this.internalList.setAll(replacement.internalList);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" public void setPersons(List\u003cPerson\u003e persons) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" requireAllNonNull(persons);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" final UniquePersonList replacement \u003d new UniquePersonList();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" for (final Person person : persons) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" replacement.add(person);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" setPersons(replacement);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Returns the backing list as an unmodifiable {@code ObservableList}.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e asObservableList() {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" return FXCollections.unmodifiableObservableList(internalList);","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" * Sorts players by selected field in asc or desc order.","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" * @return","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" public void sortBy(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" if (internalList.size() \u003c 1) {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" throw new NoPlayerException();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e comparator \u003d null;","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e nameComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" return p1.getName().fullName.compareTo(p2.getName().fullName);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e jerseyComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" return p1.getJerseyNumber().value.compareTo(p2.getJerseyNumber().value);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e ratingComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" return p1.getRating().toString().compareTo(p2.getRating().toString());","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e posComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" return p1.getPosition().value.compareTo(p2.getPosition().value);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e emailComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" return p1.getEmail().toString().compareTo(p2.getEmail().toString());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"lohtianwei"},"content":" Comparator\u003cPerson\u003e addressComparator \u003d new Comparator\u003cPerson\u003e() {","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" public int compare(Person p1, Person p2) {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" return p1.getAddress().toString().compareTo(p2.getAddress().toString());","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"lohtianwei"},"content":" };","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"lohtianwei"},"content":" switch (field) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"lohtianwei"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d nameComparator;","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"lohtianwei"},"content":" case \"jersey\":","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d jerseyComparator;","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"lohtianwei"},"content":" case \"pos\":","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d posComparator;","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"lohtianwei"},"content":" case \"rating\":","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d ratingComparator;","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d emailComparator;","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"lohtianwei"},"content":" comparator \u003d addressComparator;","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"lohtianwei"},"content":" switch (order) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"lohtianwei"},"content":" case \"asc\":","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, comparator);","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"lohtianwei"},"content":" case \"desc\":","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"lohtianwei"},"content":" Collections.sort(internalList, Collections.reverseOrder(comparator));","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" throw new AssertionError(\"Invalid field parameter entered...\\n\");","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"lohtianwei"},"content":" //@@author","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" public Iterator\u003cPerson\u003e iterator() {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" return internalList.iterator();","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" || (other instanceof UniquePersonList // instanceof handles nulls","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" \u0026\u0026 this.internalList.equals(((UniquePersonList) other).internalList));","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" return internalList.hashCode();","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":105,"-":118}},{"path":"src/main/java/seedu/address/model/person/exceptions/NoPlayerException.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.model.person.exceptions;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":" * Singals that the operation is unable to sort due to no players in book.","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"public class NoPlayerException extends Exception {","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":7}},{"path":"src/main/java/seedu/address/model/tag/Tag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.commons.util.AppUtil.checkArgument;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" * Represents a Tag in the address book.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":" * Guarantees: immutable; name is valid as declared in {@link #isValidTagName(String)}","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class Tag {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_CONSTRAINTS \u003d \"Tags names should be a string\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" public static final String MESSAGE_TAG_COLOUR_CONSTRAINTS \u003d \"Tag colours should be one of these colours:\"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" + \"teal, red, yellow, blue, orange, brown, green, pink, black, grey\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public static final String TAG_VALIDATION_REGEX \u003d \"\\\\p{Alnum}+\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private static final String[] TAG_COLOR_STYLES \u003d","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" { \"teal\", \"red\", \"yellow\", \"blue\", \"orange\", \"brown\", \"green\", \"pink\", \"black\", \"grey\" };","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" public final String tagName;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" private String tagColour;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Constructs a {@code Tag}.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * @param tagName A valid tag name.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public Tag(String tagName) {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" requireNonNull(tagName);","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Overloaded constructor for a {@code Tag}.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" * @param tagName A valid tag name","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" * @param tagColour A valid tag colour.","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" public Tag(String tagName, String tagColour) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" requireNonNull(tagName);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" checkArgument(isValidTagName(tagName), MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" public String getTagName() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" return this.tagName;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag name.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagName(String test) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return test.matches(TAG_VALIDATION_REGEX);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" public String getTagColour() {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" return this.tagColour;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" * Changes the {@code tagColour} for {@code tagName}\u0027s label","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" public void changeTagColour(String colour) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d colour;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" * Returns true if a given string is a valid tag colour.","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" public static boolean isValidTagColour(String testColour) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (String tcs : TAG_COLOR_STYLES) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (testColour.equals(tcs)) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" return true;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" return false;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return other \u003d\u003d this // short circuit if same object","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" || (other instanceof Tag // instanceof handles nulls","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" \u0026\u0026 this.tagName.equals(((Tag) other).tagName)); // state check","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" public int hashCode() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" return tagName.hashCode();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" * Format state as text for viewing.","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public String toString() {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" return \u0027[\u0027 + tagName + \u0027]\u0027;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":54,"-":49}},{"path":"src/main/java/seedu/address/model/util/SampleDataUtil.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.exceptions.DuplicateTeamException;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" * Contains utility methods for populating {@code AddressBook} with sample data.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"public class SampleDataUtil {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static Person[] getSamplePersons() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" return new Person[] {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Aaron Ramsey\"), new Phone(\"87438807\"), new Email(\"aramsey@example.com\"),","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Geylang Street 29, #06-40\"), new Remark(\"Sign him for one more year\"),","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" getTagSet(\"redCard\"), new Rating(\"3\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Hector Moruno\"), new Phone(\"99272758\"), new Email(\"hectorm@example.com\"),","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cesc Fabregas\"), new Phone(\"93210283\"), new Email(\"cescfabregas@example.com\"),","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Roy Balakrishnan\"), new Phone(\"92624417\"), new Email(\"royb@example.com\"),","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ospina\"), new Phone(\"99272758\"), new Email(\"Ospina@arsenal.com\"),","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"22\"),","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Cech\"), new Phone(\"93210283\"), new Email(\"cech@arsenal.com\"),","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mertesacker\"), new Phone(\"95432223\"), new Email(\"mertesacker@arsenal.com\"),","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Koscielny\"), new Phone(\"92352021\"), new Email(\"koscielny@example.com\"),","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Holding\"), new Phone(\"92624417\"), new Email(\"holding@example.com\"),","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Monreal\"), new Phone(\"99272758\"), new Email(\"monreal@arsenal.com\"),","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 30 Lorong 3 Serangoon Gardens, #07-18\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mustafi\"), new Phone(\"93215483\"), new Email(\"mustafi@arsenal.com\"),","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"4\"),","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"91031282\"), new Email(\"chambers@arsenal.com\"),","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Chambers\"), new Phone(\"92492021\"), new Email(\"chambers@arsenal.com\"),","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" new Person(new Name(\"David Li\"), new Phone(\"91031282\"), new Email(\"lidavid@example.com\"),","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" new Address(\"Blk 436 Serangoon Gardens Street 26, #16-43\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" new TeamName(\"Chelsea\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Irfan Fandi\"), new Phone(\"92492021\"), new Email(\"irfan@example.com\"),","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mavropanos\"), new Phone(\"92624417\"), new Email(\"mavropanos@arsenal.com\"),","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Chelsea\"),","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"98\"),","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Kolasinac\"), new Phone(\"99272758\"), new Email(\"kolasinac@arsenal.com\"),","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" new Address(\"70 Jurong Central Circle\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\", \"goodAttitude\"), new Rating(\"1\"), new Position(\"2\"), new JerseyNumber(\"52\"),","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Mkhitaryan\"), new Phone(\"93210283\"), new Email(\"mkhitaryan@arsenal.com\"),","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 11 Ang Mo Kio Street 74, #11-04\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" getTagSet(\"yellowCard\"), new Rating(\"4\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Wilshere\"), new Phone(\"95432223\"), new Email(\"wilshere@arsenal.com\"),","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 430 Pasir Ris Street 33, #12-26\"), new Remark(\"\"),","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" new TeamName(\"Arsenal\"), getTagSet(\"injured\"),","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"23\"),","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Ozil\"), new Phone(\"92352021\"), new Email(\"ozil@example.com\"),","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 47 Tampines Street 20, #17-35\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" getTagSet(\"badAttitude\"),","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"2\"),","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" new Person(new Name(\"Xhaka\"), new Phone(\"92624417\"), new Email(\"xhaka@example.com\"),","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" new Address(\"Blk 45 Aljunied Street 85, #11-31\"), new Remark(\"\"), new TeamName(\"Arsenal\"),","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" getTagSet(\"fastRunner\"), new Rating(\"0\"), new Position(\"1\"), new JerseyNumber(\"7\"),","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" new Avatar(\"\u003cUNSPECIFIED\u003e\")),","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" public static Team[] getSampleTeams() {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" return new Team[] {","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Arsenal\")),","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" new Team(new TeamName(\"Chelsea\"))","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" };","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" public static ReadOnlyAddressBook getSampleAddressBook() {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" AddressBook sampleAb \u003d new AddressBook();","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" for (Team sampleTeam : getSampleTeams()) {","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" sampleAb.createTeam(sampleTeam);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" for (Person samplePerson : getSamplePersons()) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" sampleAb.addPerson(samplePerson);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" sampleAb.addPersonToTeam(samplePerson, samplePerson.getTeamName());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" return sampleAb;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" throw new AssertionError(\"sample data cannot contain duplicate persons\", e);","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"codeeong"},"content":" } catch (DuplicateTeamException e) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\" sample data cannot contain duplicate teams\", e);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * Returns a tag set containing the list of strings given.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public static Set\u003cTag\u003e getTagSet(String... strings) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" HashSet\u003cTag\u003e tags \u003d new HashSet\u003c\u003e();","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" for (String s : strings) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" tags.add(new Tag(s));","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" return tags;","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":86,"-":83}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedPerson.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.HashSet;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * JAXB-friendly version of the Person.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class XmlAdaptedPerson {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Person\u0027s %s field is missing!\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private String name;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private String phone;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private Boolean phonePrivacy;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private String email;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Boolean emailPrivacy;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" private String address;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Boolean addressPrivacy;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private String remark;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private Boolean remarkPrivacy;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private String teamName;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private String rating;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" private Boolean ratingPrivacy;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" private String position;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private String jerseyNumber;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" private String avatar;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedPerson.","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson() {}","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" * Constructs an {@code XmlAdaptedPerson} with the given person details.","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(String name, String phone, String email, String address, List\u003cXmlAdaptedTag\u003e tagged) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" this.name \u003d name;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.phone \u003d phone;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.email \u003d email;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.address \u003d address;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" this.remarkPrivacy \u003d false;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" this.phonePrivacy \u003d false;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" this.addressPrivacy \u003d false;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" this.emailPrivacy \u003d false;","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" if (tagged !\u003d null) {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" this.tagged \u003d new ArrayList\u003c\u003e(tagged);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" * Converts a given Person into this class for JAXB use.","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedPerson","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public XmlAdaptedPerson(Person source) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" name \u003d source.getName().fullName;","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" phone \u003d source.getPhone().value;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" email \u003d source.getEmail().value;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" address \u003d source.getAddress().value;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" remark \u003d source.getRemark().value;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" teamName \u003d source.getTeamName().fullName;","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" phonePrivacy \u003d source.getPhone().isPrivate();","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" emailPrivacy \u003d source.getEmail().isPrivate();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" addressPrivacy \u003d source.getAddress().isPrivate();","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" remarkPrivacy \u003d source.getRemark().isPrivate();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d source.getRating().isPrivate();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" tagged \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" rating \u003d source.getRating().value;","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" position \u003d source.getPosition().value;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" jerseyNumber \u003d source.getJerseyNumber().value;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" avatar \u003d source.getAvatar().getValue();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" for (Tag tag : source.getTags()) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" tagged.add(new XmlAdaptedTag(tag));","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted person object into the model\u0027s Person object.","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" public Person toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" final List\u003cTag\u003e personTags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag tag : tagged) {","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" personTags.add(tag.toModelType());","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" if (phonePrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" phonePrivacy \u003d false;","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" if (emailPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" emailPrivacy \u003d false;","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" if (addressPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" addressPrivacy \u003d false;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" if (remarkPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":" remarkPrivacy \u003d false;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" if (ratingPrivacy \u003d\u003d null) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" ratingPrivacy \u003d false;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" if (this.name \u003d\u003d null) {","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Name.class.getSimpleName()));","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" if (!Name.isValidName(this.name)) {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" final Name name \u003d new Name(this.name);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" if (this.phone \u003d\u003d null) {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Phone.class.getSimpleName()));","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" if (!Phone.isValidPhone(this.phone)) {","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" final Phone phone \u003d new Phone(this.phone, this.phonePrivacy);","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" if (this.email \u003d\u003d null) {","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Email.class.getSimpleName()));","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" if (!Email.isValidEmail(this.email)) {","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"lohtianwei"},"content":" final Email email \u003d new Email(this.email, this.emailPrivacy);","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" if (this.address \u003d\u003d null) {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Address.class.getSimpleName()));","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" if (!Address.isValidAddress(this.address)) {","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Address.MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":" final Address address \u003d new Address(this.address, this.addressPrivacy);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"lohtianwei"},"content":" final Remark remark \u003d new Remark(this.remark, this.remarkPrivacy);","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" final Set\u003cTag\u003e tags \u003d new HashSet\u003c\u003e(personTags);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" if (this.rating \u003d\u003d null) {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Rating.class.getSimpleName()));","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" if (!Rating.isValidRating(this.rating)) {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Rating.MESSAGE_RATING_CONSTRAINTS);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"lohtianwei"},"content":" final Rating rating \u003d new Rating(this.rating, this.ratingPrivacy);","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" if (this.position \u003d\u003d null) {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" Position.class.getSimpleName()));","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" if (!Position.isValidPosition(this.position)) {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Position.MESSAGE_POSITION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" final Position position \u003d new Position(this.position);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" if (this.jerseyNumber \u003d\u003d null) {","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" JerseyNumber.class.getSimpleName()));","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" if (!JerseyNumber.isValidJerseyNumber(this.jerseyNumber)) {","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" throw new IllegalValueException(JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" final JerseyNumber jerseyNumber \u003d new JerseyNumber(this.jerseyNumber);","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" if (this.avatar \u003d\u003d null) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" Avatar.class.getSimpleName()));","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" if (!Avatar.isValidAvatar(this.avatar)) {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Avatar.MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" final Avatar avatar \u003d new Avatar(this.avatar);","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" return new Person(name, phone, email, address, remark, teamName, tags, rating, position, jerseyNumber, avatar);","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedPerson)) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" XmlAdaptedPerson otherPerson \u003d (XmlAdaptedPerson) other;","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" return Objects.equals(name, otherPerson.name)","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(phone, otherPerson.phone)","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(email, otherPerson.email)","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" \u0026\u0026 Objects.equals(address, otherPerson.address)","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" \u0026\u0026 tagged.equals(otherPerson.tagged);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":34,"-":209}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTag.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Tag.","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class XmlAdaptedTag {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private String tagName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private String tagColour;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * Constructs an XmlAdaptedTag.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" public XmlAdaptedTag() {}","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(String tagName) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d \"teal\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTag} with the given {@code tagName} and {@code tagColour}.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTag(String tagName, String tagColour) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" this.tagName \u003d tagName;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.tagColour \u003d tagColour;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" * Converts a given Tag into this class for JAXB use.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public XmlAdaptedTag(Tag source) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" tagName \u003d source.tagName;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" tagColour \u003d source.getTagColour();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Tag object.","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public Tag toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" if (!Tag.isValidTagName(tagName)) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" if (!Tag.isValidTagColour(tagColour)) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" throw new IllegalValueException(Tag.MESSAGE_TAG_COLOUR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" return new Tag(tagName, tagColour);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlAdaptedTag)) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return tagName.equals(((XmlAdaptedTag) other).tagName);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":22,"-":59}},{"path":"src/main/java/seedu/address/storage/XmlAdaptedTeam.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.Objects;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" * JAXB-friendly adapted version of the Team","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"public class XmlAdaptedTeam {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" public static final String MISSING_FIELD_MESSAGE_FORMAT \u003d \"Team\u0027s %s field is missing!\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement(required \u003d true)","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private String teamName;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e players \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" * Constructs an XmlAdaptedTeam.","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" * This is the no-arg constructor that is required by JAXB.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam() {}","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" * Constructs a {@code XmlAdaptedTeam} with the given {@code teamName}.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public XmlAdaptedTeam(String teamName, List\u003cXmlAdaptedPerson\u003e persons) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" this.teamName \u003d teamName;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" if (persons !\u003d null) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.players \u003d new ArrayList\u003c\u003e(persons);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" * Converts a given Team into this class for JAXB use.","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" * @param source future changes to this will not affect the created XmlAdaptedTeam","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" public XmlAdaptedTeam(Team source) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" teamName \u003d source.getTeamName().toString();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" players \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" for (Person person : source.getTeamPlayers()) {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" players.add(new XmlAdaptedPerson(person));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" * Converts this jaxb-friendly adapted tag object into the model\u0027s Team object.","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" * @throws IllegalValueException if there were any data constraints violated in the adapted person","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" public Team toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" if (this.teamName \u003d\u003d null) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" throw new IllegalValueException((String.format(MISSING_FIELD_MESSAGE_FORMAT,","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" TeamName.class.getSimpleName())));","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" if (!TeamName.isValidName(this.teamName)) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" throw new IllegalValueException(TeamName.MESSAGE_TEAM_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" final TeamName teamName \u003d new TeamName(this.teamName);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" final List\u003cPerson\u003e teamPlayers \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson player : players) {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" teamPlayers.add(player.toModelType());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" return new Team(teamName, teamPlayers);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" return true;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" if (!(other instanceof XmlAdaptedTeam)) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" return false;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" XmlAdaptedTeam otherTeam \u003d (XmlAdaptedTeam) other;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return Objects.equals(teamName, otherTeam.teamName)","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" \u0026\u0026 players.equals(otherTeam.players);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":60,"-":33}},{"path":"src/main/java/seedu/address/storage/XmlSerializableAddressBook.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlElement;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.IllegalValueException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" * An Immutable AddressBook that is serializable to XML format","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"@XmlRootElement(name \u003d \"addressbook\")","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class XmlSerializableAddressBook {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTeam\u003e teams;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedPerson\u003e persons;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @XmlElement","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private List\u003cXmlAdaptedTag\u003e tags;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * Creates an empty XmlSerializableAddressBook.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" * This empty constructor is required for marshalling.","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" persons \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" tags \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" teams \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" * Conversion","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public XmlSerializableAddressBook(ReadOnlyAddressBook src) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" this();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" persons.addAll(src.getPersonList().stream().map(XmlAdaptedPerson::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" tags.addAll(src.getTagList().stream().map(XmlAdaptedTag::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" teams.addAll(src.getTeamList().stream().map(XmlAdaptedTeam::new).collect(Collectors.toList()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" * Converts this addressbook into the model\u0027s {@code AddressBook} object.","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" * @throws IllegalValueException if there were any data constraints violated or duplicates in the","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" * {@code XmlAdaptedPerson} or {@code XmlAdaptedTag}.","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" public AddressBook toModelType() throws IllegalValueException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" AddressBook addressBook \u003d new AddressBook();","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" for (XmlAdaptedTag t : tags) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" addressBook.addTag(t.toModelType());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" for (XmlAdaptedPerson p : persons) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" addressBook.addPerson(p.toModelType());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" for (XmlAdaptedTeam tm : teams) {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" addressBook.createTeam(tm.toModelType());","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" return addressBook;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" if (!(other instanceof XmlSerializableAddressBook)) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook otherAb \u003d (XmlSerializableAddressBook) other;","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" return persons.equals(otherAb.persons) \u0026\u0026 tags.equals(otherAb.tags) \u0026\u0026 teams.equals(otherAb.teams);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":83}},{"path":"src/main/java/seedu/address/ui/MainWindow.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.event.ActionEvent;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Menu;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.control.MenuItem;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.scene.control.TextInputControl;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.image.ImageView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyCombination;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.input.KeyEvent;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.VBox;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.GuiSettings;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeThemeEvent;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ExitAppRequestEvent;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.ShowHelpRequestEvent;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * The Main Window. Provides the basic application layout containing","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" * a menu bar and space where other JavaFX elements can be placed.","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"public class MainWindow extends UiPart\u003cStage\u003e {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"MainWindow.fxml\";","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private static String currentTheme \u003d \"view/DarkTheme.css\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(this.getClass());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private Stage primaryStage;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" // Independent Ui parts residing in this Ui container","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private PersonListPanel personListPanel;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private HelpWindow helpWindow;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" private Menu mtmLogo;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" private StackPane commandBoxPlaceholder;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private MenuItem helpMenuItem;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" private StackPane personListPanelPlaceholder;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" private StackPane resultDisplayPlaceholder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" private StackPane teamDisplayPlaceholder;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private StackPane statusbarPlaceholder;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" private VBox mainWindow;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public MainWindow(Stage primaryStage, Config config, UserPrefs prefs, Logic logic) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" super(FXML, primaryStage);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" // Set dependencies","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" this.primaryStage \u003d primaryStage;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // Configure the UI","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" setTitle(config.getAppTitle());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" setWindowDefaultSize(prefs);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" setAccelerators();","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" public Stage getPrimaryStage() {","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return primaryStage;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" private void setAccelerators() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" setAccelerator(helpMenuItem, KeyCombination.valueOf(\"F1\"));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" * Sets the accelerator of a MenuItem.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" * @param keyCombination the KeyCombination value of the accelerator","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" private void setAccelerator(MenuItem menuItem, KeyCombination keyCombination) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" menuItem.setAccelerator(keyCombination);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" /*","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" * TODO: the code below can be removed once the bug reported here","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" * https://bugs.openjdk.java.net/browse/JDK-8131666","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" * is fixed in later version of SDK.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" * According to the bug report, TextInputControl (TextField, TextArea) will","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" * consume function-key events. Because CommandBox contains a TextField, and","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" * ResultDisplay contains a TextArea, thus some accelerators (e.g F1) will","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * not work when the focus is in them because the key event is consumed by","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * the TextInputControl(s).","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" * For now, we add following event filter to capture such key events and open","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" * help window purposely so to support accelerators even when focus is","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" * in CommandBox or ResultDisplay.","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" getRoot().addEventFilter(KeyEvent.KEY_PRESSED, event -\u003e {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" if (event.getTarget() instanceof TextInputControl \u0026\u0026 keyCombination.match(event)) {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" menuItem.getOnAction().handle(new ActionEvent());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" event.consume();","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * Fills up all the placeholders of this window.","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" void fillInnerParts() {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(currentTheme);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" mainWindow.getStylesheets().add(\"view/Extensions.css\");","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" final Image image \u003d new Image(\"images/MyTeamManagerLogo.png\", true);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" mtmLogo.setGraphic(new ImageView(image));","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" mtmLogo.setDisable(true);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanel(logic.getFilteredPersonList());","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" personListPanelPlaceholder.getChildren().add(personListPanel.getRoot());","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" ResultDisplay resultDisplay \u003d new ResultDisplay();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot());","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"codeeong"},"content":" TeamDisplay teamDisplay \u003d new TeamDisplay(logic.getInitTeamList());","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"codeeong"},"content":" teamDisplayPlaceholder.getChildren().add(teamDisplay.getRoot());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" StatusBarFooter statusBarFooter \u003d new StatusBarFooter(prefs.getAddressBookFilePath());","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot());","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" CommandBox commandBox \u003d new CommandBox(logic);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" commandBoxPlaceholder.getChildren().add(commandBox.getRoot());","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" void hide() {","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" primaryStage.hide();","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" private void setTitle(String appTitle) {","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" primaryStage.setTitle(appTitle);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" * Sets the default size based on user preferences.","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" private void setWindowDefaultSize(UserPrefs prefs) {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" primaryStage.setHeight(prefs.getGuiSettings().getWindowHeight());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" primaryStage.setWidth(prefs.getGuiSettings().getWindowWidth());","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" if (prefs.getGuiSettings().getWindowCoordinates() !\u003d null) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" primaryStage.setX(prefs.getGuiSettings().getWindowCoordinates().getX());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" primaryStage.setY(prefs.getGuiSettings().getWindowCoordinates().getY());","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"codeeong"},"content":" * @returns the {@code currentTheme}.","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"codeeong"},"content":" public static String getCurrentTheme() {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"codeeong"},"content":" return currentTheme;","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"codeeong"},"content":" public void handleChangeThemeRequestEvent(ChangeThemeEvent event) throws CommandException {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().remove(currentTheme);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"codeeong"},"content":" prefs.setAddressBookTheme(event.theme + \"Theme.css\");","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"codeeong"},"content":" currentTheme \u003d \"view/\" + prefs.getAddressBookTheme();","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"codeeong"},"content":" mainWindow.getStylesheets().add(currentTheme);","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" * Returns the current size and the position of the main Window.","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" GuiSettings getCurrentGuiSetting() {","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" (int) primaryStage.getX(), (int) primaryStage.getY());","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" * Opens the help window.","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" public void handleHelp() {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" if (helpWindow \u003d\u003d null) {","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" helpWindow \u003d new HelpWindow();","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" helpWindow.show();","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" void show() {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" primaryStage.show();","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" * Closes the application.","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" private void handleExit() {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" raise(new ExitAppRequestEvent());","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" public PersonListPanel getPersonListPanel() {","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" return this.personListPanel;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" private void handleShowHelpEvent(ShowHelpRequestEvent event) {","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" handleHelp();","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":35,"-":201}},{"path":"src/main/java/seedu/address/ui/PersonCard.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.net.MalformedURLException;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.Iterator;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Set;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import javafx.scene.paint.ImagePattern;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import javafx.scene.shape.Circle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ChangeTagColourEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * An UI component that displays information of a {@code Person}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"public class PersonCard extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListCard.fxml\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" *","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public final Person person;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonCard.class);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private Label name;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" private Label id;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private Label teamName;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private FlowPane tags;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" private Label rating;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" private Label position;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" private Label jerseyNumber;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" private Circle avatar;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public PersonCard(Person person, int displayedIndex) {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" id.setText(displayedIndex + \". \");","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" name.setText(person.getName().fullName);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getRating().isPrivate()) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" rating.setText(person.getRating().toString());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" rating.setText(person.getRating().value);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" teamName.setText(person.getTeamName().fullName);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" position.setText(person.getPosition().getPositionName());","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" initTags(person);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" setContactImage(person.getAvatar().getValue());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" private void setContactImage(String path) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Image img \u003d null;","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (new File(path).isFile()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" img \u003d new Image(new File(path).toURI().toURL().toString());","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" } catch (MalformedURLException e) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" img \u003d new Image(getClass().getResource(\"/images/placeholder_test.png\").toString());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" avatar.setVisible(true);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" avatar.setFill(new ImagePattern(img));","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" avatar.setVisible(true);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}.","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" private void initTags(Person person) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" person.getTags().forEach(tag -\u003e {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" Label tagLabel \u003d new Label(tag.getTagName());","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" tagLabel.getStyleClass().add(tag.getTagColour());","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(tagLabel);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" });","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" public boolean equals(Object other) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" // short circuit if same object","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" if (other \u003d\u003d this) {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" return true;","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" // instanceof handles nulls","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" if (!(other instanceof PersonCard)) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" return false;","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" // state check","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" PersonCard card \u003d (PersonCard) other;","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" return id.getText().equals(card.id.getText())","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" \u0026\u0026 person.equals(card.person);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"codeeong"},"content":" /** @@author Codee */","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"codeeong"},"content":" public void handleColourChangeEvent(ChangeTagColourEvent event) {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"codeeong"},"content":" Set\u003cTag\u003e tagSet \u003d person.getTags();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"codeeong"},"content":" int i \u003d 0;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"codeeong"},"content":" for (Iterator\u003cTag\u003e it \u003d tagSet.iterator(); it.hasNext();) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"codeeong"},"content":" Tag tag \u003d it.next();","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"codeeong"},"content":" if (tag.getTagName().equals(event.tagName)) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"codeeong"},"content":" tags.getChildren().remove(i);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"codeeong"},"content":" Label newTagLabel \u003d new Label(event.tagName);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"codeeong"},"content":" newTagLabel.getStyleClass().add(event.tagColour);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"codeeong"},"content":" tags.getChildren().add(i, newTagLabel);","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"codeeong"},"content":" i++;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":5,"codeeong":42,"-":97}},{"path":"src/main/java/seedu/address/ui/PersonListPanel.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import org.fxmisc.easybind.EasyBind;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListCell;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.scene.control.ListView;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.StackPane;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.JumpToListRequestEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedNoParamEvent;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.PersonPanelSelectionChangedEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" * Panel containing the list of persons.","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class PersonListPanel extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private static final String FXML \u003d \"PersonListPanel.fxml\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final Logger logger \u003d LogsCenter.getLogger(PersonListPanel.class);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private PlayerDetails playerDetails;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Integer selectedCardIndex;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private ListView\u003cPersonCard\u003e personListView;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private StackPane playerDetailsPlaceholder;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public PersonListPanel(ObservableList\u003cPerson\u003e personList) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" setConnections(personList);","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" private void setConnections(ObservableList\u003cPerson\u003e personList) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" ObservableList\u003cPersonCard\u003e mappedList \u003d EasyBind.map(","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" personList, (person) -\u003e new PersonCard(person, personList.indexOf(person) + 1));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" personListView.setItems(mappedList);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" personListView.setCellFactory(listView -\u003e new PersonListViewCell());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" setEventHandlerForSelectionChangeEvent();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private void setEventHandlerForSelectionChangeEvent() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().selectedItemProperty()","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .addListener((observable, oldValue, newValue) -\u003e {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" if (newValue !\u003d null) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" logger.fine(\"Selection in person list panel changed to : \u0027\" + newValue + \"\u0027\");","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" raise(new PersonPanelSelectionChangedEvent(newValue));","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" playerDetails \u003d new PlayerDetails(newValue.person);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" * Scrolls to the {@code PersonCard} at the {@code index} and selects it.","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" private void scrollTo(int index) {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Platform.runLater(() -\u003e {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" personListView.scrollTo(index);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" personListView.getSelectionModel().clearAndSelect(index);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" this.selectedCardIndex \u003d index;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" });","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private void handleJumpToListRequestEvent(JumpToListRequestEvent event) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" scrollTo(event.targetIndex);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedNoParamEvent(PersonDetailsChangedNoParamEvent event) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" PersonCard newPersonCard \u003d personListView.getItems().get(selectedCardIndex);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().clear();","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" playerDetails \u003d new PlayerDetails(newPersonCard.person);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" playerDetailsPlaceholder.getChildren().add(playerDetails.getRoot());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" //@author","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" * Custom {@code ListCell} that displays the graphics of a {@code PersonCard}.","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" class PersonListViewCell extends ListCell\u003cPersonCard\u003e {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" protected void updateItem(PersonCard person, boolean empty) {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" super.updateItem(person, empty);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" if (empty || person \u003d\u003d null) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" setGraphic(null);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" setText(null);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" setGraphic(person.getRoot());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":12,"-":98}},{"path":"src/main/java/seedu/address/ui/PlayerDetails.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.HBox;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.PersonDetailsChangedEvent;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" * The Browser Panel of the App.","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"public class PlayerDetails extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"PlayerDetails.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" * Note: Certain keywords such as \"location\" and \"resources\" are reserved keywords in JavaFX.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" * As a consequence, UI elements\u0027 variable names cannot be set to such keywords","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * or an exception will be thrown by JavaFX during runtime.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" * @see \u003ca href\u003d\"https://github.com/se-edu/addressbook-level4/issues/336\"\u003eThe issue on AddressBook level 4\u003c/a\u003e","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public final Person person;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Person personBeforeChange;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private HBox cardPane;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" private Label name;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" private Label phone;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" private Label address;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" private Label email;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" private Label jerseyNumber;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" private Label remark;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public PlayerDetails(Person person) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" this.person \u003d person;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" name.setText(person.getName().fullName);","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" jerseyNumber.setText(\"Jersey Number: \" + person.getJerseyNumber().value);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" if (person.getPhone().isPrivate()) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().toString());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" phone.setText(person.getPhone().value);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" if (person.getAddress().isPrivate()) {","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().toString());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" address.setText(person.getAddress().value);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (person.getEmail().isPrivate()) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().toString());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" email.setText(person.getEmail().value);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" if (person.getRemark().isPrivate()) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().toString());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" remark.setText(\"Remarks: \" + person.getRemark().value);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" personBeforeChange \u003d this.person;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" private void handlePersonDetailsChangedEvent(PersonDetailsChangedEvent event) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" if (event.getPerson().getName().fullName.equals(person.getName().fullName)) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" name.setText((event.getPerson().getName().toString()));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" phone.setText(event.getPerson().getPhone().toString());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" jerseyNumber.setText(\"Jersey Number: \" + event.getPerson().getJerseyNumber().toString());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" address.setText(event.getPerson().getAddress().toString());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" email.setText(event.getPerson().getEmail().toString());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" remark.setText(\"Remarks: \" + event.getPerson().getRemark().toString());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true}],"authorContributionMap":{"lohtianwei":34,"codeeong":46,"-":14}},{"path":"src/main/java/seedu/address/ui/TeamDisplay.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.FlowPane;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ClearTeamsEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.DeselectTeamEvent;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.HighlightSelectedTeamEvent;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.ui.RemoveSelectedTeamEvent;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.UndoTeamsEvent;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * A ui for displaying the team currently chosen","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"public class TeamDisplay extends UiPart\u003cRegion\u003e {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(TeamDisplay.class);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private static final String FXML \u003d \"TeamDisplay.fxml\";","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" @FXML","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" private FlowPane teams;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" public TeamDisplay(ObservableList\u003cTeam\u003e teamList) {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" super(FXML);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" this.teamList \u003d teamList;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" initTeams();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" getTeams();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" registerAsAnEventHandler(this);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * Creates the tag labels for {@code person}.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void initTeams() {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" for (Team t: this.teamList) {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" Label teamLabel \u003d new Label(t.getTeamName().toString());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" teamLabel.setStyle(\"-fx-text-fill: #3f7bbf\");","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(teamLabel);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" teams.setHgap(10);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e listOfTeams \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" for (Team t: teamList) {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" listOfTeams.add(t.getTeamName().toString());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return listOfTeams;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" private void handleShowNewTeamEvent(ShowNewTeamNameEvent event) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(newTeamLabel);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" private void handleHighlightSelectedTeamEvent(HighlightSelectedTeamEvent event) {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" if (event.teamName.equals(teamList.get(i).getTeamName().toString())) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(event.teamName);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass().add(\"selected\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" } else {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" private void handleDeselectTeamEvent(DeselectTeamEvent event) {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c teamList.size(); i++) {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" Label newTeamLabel \u003d new Label(teamList.get(i).getTeamName().toString());","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" newTeamLabel.getStyleClass();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" teams.getChildren().add(i, newTeamLabel);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" private void handleRemoveSelectedTeamEvent(RemoveSelectedTeamEvent event) {","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c teams.getChildren().size(); i++) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" if (teamList.get(i).getTeamName().equals(event.teamName)) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" teams.getChildren().remove(i);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" private void handleClearTeamsEvent(ClearTeamsEvent event) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"codeeong"},"content":" private void handleUndoTeamsEvent(UndoTeamsEvent event) {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"codeeong"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":" teams.getChildren().clear();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"codeeong"},"content":" initTeams();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"codeeong"},"content":" getTeams();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":109,"-":15}},{"path":"src/main/java/seedu/address/ui/UiManager.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.logging.Logger;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import com.google.common.eventbus.Subscribe;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.application.Platform;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import javafx.scene.control.Alert.AlertType;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.scene.image.Image;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.ComponentManager;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Config;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.LogsCenter;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.events.storage.DataSavingExceptionEvent;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.StringUtil;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.Logic;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * The manager of the UI component.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"public class UiManager extends ComponentManager implements Ui {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public static final String ALERT_DIALOG_PANE_FIELD_ID \u003d \"alertDialogPane\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_STAGE_TITLE \u003d \"File Op Error\";","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE \u003d \"Could not save data\";","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public static final String FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE \u003d \"Could not save data to file\";","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final Logger logger \u003d LogsCenter.getLogger(UiManager.class);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" private static final String ICON_APPLICATION \u003d \"/images/football.png\";","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Logic logic;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private Config config;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" private UserPrefs prefs;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private MainWindow mainWindow;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public UiManager(Logic logic, Config config, UserPrefs prefs) {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" super();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" this.logic \u003d logic;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" this.config \u003d config;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" this.prefs \u003d prefs;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void start(Stage primaryStage) {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" logger.info(\"Starting UI...\");","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" //Set the application icon.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" primaryStage.getIcons().add(getImage(ICON_APPLICATION));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" mainWindow \u003d new MainWindow(primaryStage, config, prefs, logic);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" mainWindow.show(); //This should be called before creating other UI parts","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" mainWindow.fillInnerParts();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" } catch (Throwable e) {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" logger.severe(StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" showFatalErrorDialogAndShutdown(\"Fatal error during initializing\", e);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void stop() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" prefs.updateLastUsedGuiSetting(mainWindow.getCurrentGuiSetting());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" mainWindow.hide();","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" private void showFileOperationAlertAndWait(String description, String details, Throwable cause) {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" final String content \u003d details + \":\\n\" + cause.toString();","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(AlertType.ERROR, FILE_OPS_ERROR_DIALOG_STAGE_TITLE, description, content);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" private Image getImage(String imagePath) {","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" return new Image(MainApp.class.getResourceAsStream(imagePath));","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" void showAlertDialogAndWait(Alert.AlertType type, String title, String headerText, String contentText) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(mainWindow.getPrimaryStage(), type, title, headerText, contentText);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" * Shows an alert dialog on {@code owner} with the given parameters.","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" * This method only returns after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" private static void showAlertDialogAndWait(Stage owner, AlertType type, String title, String headerText,","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" String contentText) {","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" final Alert alert \u003d new Alert(type);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" alert.getDialogPane().getStylesheets().add(\"view/DarkTheme.css\");","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" alert.initOwner(owner);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" alert.setTitle(title);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" alert.setHeaderText(headerText);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" alert.setContentText(contentText);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" alert.getDialogPane().setId(ALERT_DIALOG_PANE_FIELD_ID);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" alert.showAndWait();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" * Shows an error alert dialog with {@code title} and error message, {@code e},","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * and exits the application after the user has closed the alert dialog.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" private void showFatalErrorDialogAndShutdown(String title, Throwable e) {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" logger.severe(title + \" \" + e.getMessage() + StringUtil.getDetails(e));","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" showAlertDialogAndWait(Alert.AlertType.ERROR, title, e.getMessage(), e.toString());","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Platform.exit();","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" System.exit(1);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" //\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d Event Handling Code \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" @Subscribe","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" private void handleDataSavingExceptionEvent(DataSavingExceptionEvent event) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" logger.info(LogsCenter.getEventHandlingLogMessage(event));","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" showFileOperationAlertAndWait(FILE_OPS_ERROR_DIALOG_HEADER_MESSAGE, FILE_OPS_ERROR_DIALOG_CONTENT_MESSAGE,","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" event.exception);","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/guitests/guihandles/MainWindowHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import javafx.stage.Stage;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":" * Provides a handle for {@code MainWindow}.","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"public class MainWindowHandle extends StageHandle {","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" private final PersonListPanelHandle personListPanel;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" private final ResultDisplayHandle resultDisplay;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" private final TeamDisplayHandle teamDisplayBar;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" private final CommandBoxHandle commandBox;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private final StatusBarFooterHandle statusBarFooter;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private final MainMenuHandle mainMenu;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public MainWindowHandle(Stage stage) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" super(stage);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" personListPanel \u003d new PersonListPanelHandle(getChildNode(PersonListPanelHandle.PERSON_LIST_VIEW_ID));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" resultDisplay \u003d new ResultDisplayHandle(getChildNode(ResultDisplayHandle.RESULT_DISPLAY_ID));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" teamDisplayBar \u003d new TeamDisplayHandle(getChildNode(TeamDisplayHandle.TEAM_DISPLAY_ID));","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" commandBox \u003d new CommandBoxHandle(getChildNode(CommandBoxHandle.COMMAND_INPUT_FIELD_ID));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" statusBarFooter \u003d new StatusBarFooterHandle(getChildNode(StatusBarFooterHandle.STATUS_BAR_PLACEHOLDER));","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" mainMenu \u003d new MainMenuHandle(getChildNode(MainMenuHandle.MENU_BAR_ID));","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" return personListPanel;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return resultDisplay;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return commandBox;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return statusBarFooter;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return mainMenu;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":46}},{"path":"src/test/java/guitests/guihandles/PersonCardHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" * Provides a handle to a person card in the person list panel.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"public class PersonCardHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String ID_FIELD_ID \u003d \"#id\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String TAGS_FIELD_ID \u003d \"#tags\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private static final String RATING_FIELD_ID \u003d \"#rating\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" private static final String POSITION_FIELD_ID \u003d \"#position\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" private static final String TEAMNAME_FIELD_ID \u003d \"#teamName\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label idLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label nameLabel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private final Label positionLabel;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private final Label ratingLabel;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private final Label teamNameLabel;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private final List\u003cLabel\u003e tagLabels;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public PersonCardHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.idLabel \u003d getChildNode(ID_FIELD_ID);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" this.positionLabel \u003d getChildNode(POSITION_FIELD_ID);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" this.ratingLabel \u003d getChildNode(RATING_FIELD_ID);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" this.teamNameLabel \u003d getChildNode(TEAMNAME_FIELD_ID);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" Region tagsContainer \u003d getChildNode(TAGS_FIELD_ID);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" this.tagLabels \u003d tagsContainer","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" .getChildrenUnmodifiable()","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" .stream()","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" .map(Label.class::cast)","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public String getId() {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" return idLabel.getText();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" public String getName() {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" return nameLabel.getText();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" public String getPosition() {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" return positionLabel.getText();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" public String getRating() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" return ratingLabel.getText();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" public String getTeamName() {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" return teamNameLabel.getText();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public List\u003cString\u003e getTags() {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" return tagLabels","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" .stream()","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" .map(Label::getText)","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTagStyleClasses(String tag) {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" return tagLabels","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" .stream()","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" .filter(label -\u003e label.getText().equals(tag))","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" .map(Label::getStyleClass)","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" .findFirst()","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" .orElseThrow(() -\u003e new IllegalArgumentException(\"No such tag.\"));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":25,"-":56}},{"path":"src/test/java/guitests/guihandles/PlayerDetailsHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * Provides a handle to a player details pane.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class PlayerDetailsHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String PLAYER_DETAILS_DISPLAY_ID \u003d \"#playerDetails\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private static final String NAME_FIELD_ID \u003d \"#name\";","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" private static final String JERSEY_FIELD_ID \u003d \"#jerseyNumber\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" private static final String PHONE_FIELD_ID \u003d \"#phone\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" private static final String EMAIL_FIELD_ID \u003d \"#email\";","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" private static final String ADDRESS_FIELD_ID \u003d \"#address\";","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String REMARK_FIELD_ID \u003d \"#remark\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private final Label nameLabel;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private final Label jerseyLabel;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private final Label addressLabel;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" private final Label phoneLabel;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" private final Label emailLabel;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" private final Label remarkLabel;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public PlayerDetailsHandle(Node cardNode) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" super(cardNode);","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" this.nameLabel \u003d getChildNode(NAME_FIELD_ID);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.phoneLabel \u003d getChildNode(PHONE_FIELD_ID);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" this.addressLabel \u003d getChildNode(ADDRESS_FIELD_ID);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" this.emailLabel \u003d getChildNode(EMAIL_FIELD_ID);","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" this.remarkLabel \u003d getChildNode(REMARK_FIELD_ID);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" this.jerseyLabel \u003d getChildNode(JERSEY_FIELD_ID);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" public String getPhone() {","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" return phoneLabel.getText();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public String getName() {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" return nameLabel.getText();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public String getAddress() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" return addressLabel.getText();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public String getJerseyNumber() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" return jerseyLabel.getText().substring(15);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" public String getRemarks() {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" return remarkLabel.getText().substring(9);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public String getEmail() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" return emailLabel.getText();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":8,"-":56}},{"path":"src/test/java/guitests/guihandles/TeamDisplayHandle.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package guitests.guihandles;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import javafx.scene.Node;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import javafx.scene.control.Label;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import javafx.scene.layout.Region;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":" * Provides a handle for {@code TeamDisplayHandle} containing the list of {@code Teams}.","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayHandle extends NodeHandle\u003cNode\u003e {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" public static final String TEAM_DISPLAY_ID \u003d \"#teams\";","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" private final List\u003cLabel\u003e teamLabels;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public TeamDisplayHandle(Node teamDisplayNode) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" super(teamDisplayNode);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" Region teamContainer \u003d getChildNode(TEAM_DISPLAY_ID);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" this.teamLabels \u003d teamContainer","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" .getChildrenUnmodifiable()","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" .stream()","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" .map(Label.class::cast)","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" public List\u003cString\u003e getTeams() {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" return teamLabels","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" .stream()","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" .map(Label::getText)","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" .collect(Collectors.toList());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":37}},{"path":"src/test/java/seedu/address/commons/core/ConfigTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.core;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"public class ConfigTest {","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" public void toString_defaultObject_stringReturned() {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" String defaultConfigAsString \u003d \"App title : My Team Manager\\n\"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" + \"Current log level : INFO\\n\"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" + \"Preference file Location : preferences.json\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" assertEquals(defaultConfigAsString, new Config().toString());","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" public void equalsMethod() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" Config defaultConfig \u003d new Config();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" assertNotNull(defaultConfig);","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" assertTrue(defaultConfig.equals(defaultConfig));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":31}},{"path":"src/test/java/seedu/address/commons/util/XmlUtilTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.commons.util;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.FileNotFoundException;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javax.xml.bind.JAXBException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import javax.xml.bind.annotation.XmlRootElement;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedPerson;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlAdaptedTag;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.storage.XmlSerializableAddressBook;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.testutil.AddressBookBuilder;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TestUtil;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"public class XmlUtilTest {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"src/test/data/XmlUtilTest/\");","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private static final File EMPTY_FILE \u003d new File(TEST_DATA_FOLDER + \"empty.xml\");","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" private static final File MISSING_FILE \u003d new File(TEST_DATA_FOLDER + \"missing.xml\");","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" private static final File VALID_FILE \u003d new File(TEST_DATA_FOLDER + \"validAddressBook.xml\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" private static final File MISSING_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"missingPersonField.xml\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" private static final File INVALID_PERSON_FIELD_FILE \u003d new File(TEST_DATA_FOLDER + \"invalidPersonField.xml\");","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" private static final File VALID_PERSON_FILE \u003d new File(TEST_DATA_FOLDER + \"validPerson.xml\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" private static final File TEMP_FILE \u003d new File(TestUtil.getFilePathInSandboxFolder(\"tempAddressBook.xml\"));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" private static final String INVALID_PHONE \u003d \"9482asf424\";","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private static final String VALID_NAME \u003d \"Hans Muster\";","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" private static final String VALID_PHONE \u003d \"9482424\";","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" private static final String VALID_EMAIL \u003d \"hans@example\";","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" private static final String VALID_ADDRESS \u003d \"4th street\";","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" private static final List\u003cXmlAdaptedTag\u003e VALID_TAGS \u003d Collections.singletonList(new XmlAdaptedTag(\"friends\"));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullFile_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(null, AddressBook.class);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" public void getDataFromFile_nullClass_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(VALID_FILE, null);","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void getDataFromFile_missingFile_fileNotFoundException() throws Exception {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(MISSING_FILE, AddressBook.class);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public void getDataFromFile_emptyFile_dataFormatMismatchException() throws Exception {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" thrown.expect(JAXBException.class);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" XmlUtil.getDataFromFile(EMPTY_FILE, AddressBook.class);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" public void getDataFromFile_validFile_validResult() throws Exception {","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddressBook dataFromFile \u003d XmlUtil.getDataFromFile(VALID_FILE, XmlSerializableAddressBook.class).toModelType();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" assertEquals(0, dataFromFile.getTeamList().size());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertEquals(0, dataFromFile.getTagList().size());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithMissingPersonField_validResult() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile(","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" MISSING_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson(","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" null, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithInvalidPersonField_validResult() throws Exception {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile(","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" INVALID_PERSON_FIELD_FILE, XmlAdaptedPersonWithRootElement.class);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson(","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" VALID_NAME, INVALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void xmlAdaptedPersonFromFile_fileWithValidPerson_validResult() throws Exception {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" XmlAdaptedPerson actualPerson \u003d XmlUtil.getDataFromFile(","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" VALID_PERSON_FILE, XmlAdaptedPersonWithRootElement.class);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" XmlAdaptedPerson expectedPerson \u003d new XmlAdaptedPerson(","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" VALID_NAME, VALID_PHONE, VALID_EMAIL, VALID_ADDRESS, VALID_TAGS);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson, actualPerson);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullFile_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(null, new AddressBook());","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" public void saveDataToFile_nullClass_throwsNullPointerException() throws Exception {","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(VALID_FILE, null);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" public void saveDataToFile_missingFile_fileNotFoundException() throws Exception {","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" thrown.expect(FileNotFoundException.class);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(MISSING_FILE, new AddressBook());","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" public void saveDataToFile_validFile_dataSaved() throws Exception {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" TEMP_FILE.createNewFile();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataToWrite \u003d new XmlSerializableAddressBook(new AddressBook());","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" XmlSerializableAddressBook dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" AddressBookBuilder builder \u003d new AddressBookBuilder(new AddressBook());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" dataToWrite \u003d new XmlSerializableAddressBook(","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" builder.withPerson(new PersonBuilder().build()).withTag(\"Friends\").build());","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" XmlUtil.saveDataToFile(TEMP_FILE, dataToWrite);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" dataFromFile \u003d XmlUtil.getDataFromFile(TEMP_FILE, XmlSerializableAddressBook.class);","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" assertEquals(dataToWrite, dataFromFile);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" * Test class annotated with {@code XmlRootElement} to allow unmarshalling of .xml data to {@code XmlAdaptedPerson}","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" * objects.","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" @XmlRootElement(name \u003d \"person\")","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" private static class XmlAdaptedPersonWithRootElement extends XmlAdaptedPerson {}","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":145}},{"path":"src/test/java/seedu/address/logic/commands/AddCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static java.util.Objects.requireNonNull;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.function.Predicate;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.model.ReadOnlyAddressBook;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.exceptions.NoPlayerException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.model.team.exceptions.TeamNotFoundException;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"public class AddCommandTest {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void constructor_nullPerson_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" new AddCommand(null);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" public void execute_personAcceptedByModel_addSuccessful() throws Exception {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" ModelStubAcceptingPersonAdded modelStub \u003d new ModelStubAcceptingPersonAdded();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" CommandResult commandResult \u003d getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" assertEquals(String.format(AddCommand.MESSAGE_SUCCESS, validPerson), commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(Arrays.asList(validPerson), modelStub.personsAdded);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void execute_duplicatePerson_throwsCommandException() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" ModelStub modelStub \u003d new ModelStubThrowingDuplicatePersonException();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Person validPerson \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" thrown.expect(CommandException.class);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" thrown.expectMessage(AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" getAddCommandForPerson(validPerson, modelStub).execute();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Person alice \u003d new PersonBuilder().withName(\"Alice\").build();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" Person bob \u003d new PersonBuilder().withName(\"Bob\").build();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" AddCommand addAliceCommand \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" AddCommand addBobCommand \u003d new AddCommand(bob);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommand));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" AddCommand addAliceCommandCopy \u003d new AddCommand(alice);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" assertTrue(addAliceCommand.equals(addAliceCommandCopy));","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(1));","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(null));","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" // different person -\u003e returns false","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertFalse(addAliceCommand.equals(addBobCommand));","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" * Generates a new AddCommand with the details of the given person.","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" private AddCommand getAddCommandForPerson(Person person, Model model) {","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" AddCommand command \u003d new AddCommand(person);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" return command;","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" * A default model stub that have all of the methods failing.","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" private class ModelStub implements Model {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" public void sortPlayers(String field, String order) throws NoPlayerException {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" public void lockAddressBookModel() {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" public void unlockAddressBookModel() {","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" public boolean getLockState() {","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" return false;","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" @Override","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" public UserPrefs getUserPrefs() {","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" return null;","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" public void resetData(ReadOnlyAddressBook newData) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" public void deletePerson(Person target) throws PersonNotFoundException {","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" public void updatePerson(Person target, Person editedPerson)","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" public ObservableList\u003cPerson\u003e getFilteredPersonList() {","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" return null;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"codeeong"},"content":" public ObservableList\u003cTeam\u003e getInitTeamList() {","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"codeeong"},"content":" return null;","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(Predicate\u003cPerson\u003e predicate) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" public void updateFilteredPersonList(TeamName targetTeam) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" fail(\"This method should not be called\");","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" public void deleteTag(Tag tag) {","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" public void createTeam(Team team) {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" fail(\"This method should not be be called.\");","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" public void unassignPersonFromTeam(Person person) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" public void removeTeam(TeamName teamName) throws TeamNotFoundException {","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" public void renameTeam(Team targetTeam, TeamName updatedTeamName) {","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"codeeong"},"content":" @Override","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"codeeong"},"content":" public boolean setTagColour(Tag tag, String colour) {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"codeeong"},"content":" fail(\"This method should not be called.\");","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"codeeong"},"content":" return false;","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" * A Model stub that always throw a DuplicatePersonException when trying to add a person.","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" private class ModelStubThrowingDuplicatePersonException extends ModelStub {","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * A Model stub that always accept the person being added.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private class ModelStubAcceptingPersonAdded extends ModelStub {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" final ArrayList\u003cPerson\u003e personsAdded \u003d new ArrayList\u003c\u003e();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" public void addPerson(Person person) throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" requireNonNull(person);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" personsAdded.add(person);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" public void assignPersonToTeam(Person person, TeamName teamName)","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" throws DuplicatePersonException {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" throw new DuplicatePersonException();","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" @Override","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" public ReadOnlyAddressBook getAddressBook() {","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" return new AddressBook();","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":29,"codeeong":12,"-":216}},{"path":"src/test/java/seedu/address/logic/commands/ChangeThemeCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandTest {","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public void execute_validTheme_success() {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertExecutionSuccess(listThemes[0]);","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" public void execute_invalidTheme_failure() {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" assertExecutionFailure(\"FakeTheme\", Messages.MESSAGE_INVALID_THEME);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand[] listThemeCommands \u003d new ChangeThemeCommand[2];","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" listThemeCommands[i] \u003d new ChangeThemeCommand(listThemes[i]);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertTrue(listThemeCommands[i].equals(new ChangeThemeCommand(listThemes[i])));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(1));","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(null));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" // different theme -\u003e returns false","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" int j \u003d 1;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" if (i !\u003d j) {","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertFalse(listThemeCommands[i].equals(listThemeCommands[j]));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" j--;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}.","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" private void assertExecutionSuccess(String theme) {","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" CommandResult commandResult \u003d changethemeCommand.execute();","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" assertEquals(String.format(ChangeThemeCommand.MESSAGE_THEME_SUCCESS, theme),","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" commandResult.feedbackToUser);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":" throw new IllegalArgumentException(\"Execution of command should not fail.\", ce);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Executes a {@code ChangeThemeCommand} with the given {@code theme}.","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" private void assertExecutionFailure(String theme, String expectedMessage) {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand changethemeCommand \u003d new ChangeThemeCommand(theme);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" changethemeCommand.execute();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" fail(\"The expected CommandException was not thrown.\");","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" } catch (CommandException ce) {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedMessage, ce.getMessage());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":89}},{"path":"src/test/java/seedu/address/logic/commands/KeyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"public class KeyCommandTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" private Model model;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" @Before","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" public void start() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" model \u003d new ModelManager();","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" public void checkKey() throws Exception {","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" //checks that default lock state is false","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" //checks that key can lock MTM","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" //checks that key can unlock MTM","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" //checks that toggling works","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" assertFalse(model.getLockState());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" model.unlockAddressBookModel();","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" model.lockAddressBookModel();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertTrue(model.getLockState());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":44}},{"path":"src/test/java/seedu/address/logic/commands/RemarkCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_BOB;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_REMARK_EMPTY;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareRedoCommand;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.prepareUndoCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.showPersonAtIndex;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"//@@author jordancjq","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" * Contains integration tests (interaction with the Model) and unit tests for RemarkCommand.","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"public class RemarkCommandTest {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void execute_addRemarkUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_AMY).build();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" public void execute_deleteRemarkUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" Index indexLastPerson \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLastPerson.getZeroBased());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" PersonBuilder personInList \u003d new PersonBuilder(lastPerson);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d personInList.withRemark(VALID_REMARK_EMPTY).build();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(indexLastPerson, remarkedPerson.getRemark().toString());","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_DELETE_REMARK_SUCCESS, remarkedPerson);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(lastPerson, remarkedPerson);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void execute_filteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person personInFilteredList \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personInFilteredList).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, remarkedPerson.getRemark().toString());","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" String expectedMessage \u003d String.format(RemarkCommand.MESSAGE_ADD_REMARK_SUCCESS, remarkedPerson);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personInFilteredList, remarkedPerson);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" model.updateFilteredPersonList(Model.PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" assertCommandSuccess(remarkCommand, model, expectedMessage, expectedModel);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" * Remark filtered list where index is larger than size of filtered list,","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" * but smaller than size of address book","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" public void execute_invalidPersonIndexFilteredList_failure() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_FIRST_PERSON);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d INDEX_SECOND_PERSON;","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" // ensures that outOfBoundIndex is still in bounds of address book list","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" assertTrue(outOfBoundIndex.getZeroBased() \u003c model.getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_BOB);","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexUnfilteredList_success() throws Exception {","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_AMY).build();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" // remark -\u003e first person remarked","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" remarkCommand.execute();","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" // redo -\u003e same first person remarked again","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" public void executeUndoRedo_invalidIndexUnfilteredList_failure() {","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" Index outOfBoundIndex \u003d Index.fromOneBased(model.getFilteredPersonList().size() + 1);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(outOfBoundIndex, VALID_REMARK_EMPTY);","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" // execution failed -\u003e remarkCommand not pushed into undoRedoStack","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" assertCommandFailure(remarkCommand, model, MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" // no commands in undoRedoStack -\u003e undoCommand and redoCommand fail","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(undoCommand, model, UndoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" assertCommandFailure(redoCommand, model, RedoCommand.MESSAGE_FAILURE);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" * 1. Updates {@code Person#remark} from a filtered list.","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * 2. Undo the update.","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * 3. The unfiltered list should be shown now. Verify that the index of the previously updated person in the","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * unfiltered list is different from the index at the filtered list.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" * 4. Redo the update. This ensures {@code RedoCommand} updates the person object regardless of indexing.","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" public void executeUndoRedo_validIndexFilteredList_samePersonRemarked() throws Exception {","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" UndoRedoStack undoRedoStack \u003d new UndoRedoStack();","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" UndoCommand undoCommand \u003d prepareUndoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" RedoCommand redoCommand \u003d prepareRedoCommand(model, undoRedoStack);","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_BOB);","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" showPersonAtIndex(model, INDEX_SECOND_PERSON);","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" Person personToRemark \u003d model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" Person remarkedPerson \u003d new PersonBuilder(personToRemark).withRemark(VALID_REMARK_BOB).build();","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" // remark -\u003e remarks second person in unfiltered person list / first person in filtered person list","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" remarkCommand.execute();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" undoRedoStack.push(remarkCommand);","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" // undo -\u003e reverts addressbook back to previous state and filtered person list to show all persons","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(personToRemark, remarkedPerson);","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" assertNotEquals(model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), personToRemark);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" // redo -\u003e remarks same second person in unfiltered person list","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" final RemarkCommand standardCommand \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" // same values -\u003e returns true","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" RemarkCommand commandWithSameValues \u003d prepareCommand(INDEX_FIRST_PERSON, VALID_REMARK_AMY);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(commandWithSameValues));","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertTrue(standardCommand.equals(standardCommand));","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(null));","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" // different index -\u003e returns false","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_SECOND_PERSON, new Remark(VALID_REMARK_AMY))));","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" // different remark -\u003e returns false","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" assertFalse(standardCommand.equals(new RemarkCommand(INDEX_FIRST_PERSON, new Remark(VALID_REMARK_BOB))));","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" * Returns an {@code RemarkCommand} with parameters {@code index} and {@code remark}.","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" private RemarkCommand prepareCommand(Index index, String remark) {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" RemarkCommand remarkCommand \u003d new RemarkCommand(index, new Remark(remark));","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" remarkCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" return remarkCommand;","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":218}},{"path":"src/test/java/seedu/address/logic/commands/SetCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.DESC_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" * This is the unit test for {@code SetCommand}.","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":"public class SetCommandTest {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private Model model;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" private Tag tagOne \u003d new Tag(\"testTagOne\");","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" private Tag tagTwo \u003d new Tag(\"testTagTwo\");","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" @Before","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" SetCommand testCommand \u003d new SetCommand(tagOne, \"teal\");","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" SetCommand testCommandTwo \u003d new SetCommand(tagOne, \"teal\");","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" //Test to ensure command is strictly a SetCommand","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new AddCommand(CARL)));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ClearCommand()));","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new DeleteCommand(INDEX_FIRST_PERSON)));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HistoryCommand()));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new HelpCommand()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new RedoCommand()));","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new UndoCommand()));","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new ListCommand()));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new EditCommand(INDEX_FIRST_PERSON, DESC_AMY)));","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" //Test to check that different tag string returns false","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagTwo, \"teal\")));","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"teal\")));","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" //Test to check that different color strings returns false","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommand.equals(new SetCommand(tagOne, \"red\")));","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" assertFalse(testCommandTwo.equals(new SetCommand(tagTwo, \"red\")));","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" public void checkCommandResult() throws CommandException {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" //Check if the result message is correct when there is no tags found","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" SetCommand command \u003d new SetCommand(new Tag(\"blablabla\"), \"teal\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag is invalid! Please input a valid tag name!\"));","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"codeeong"},"content":" //When tags is present","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"red\");","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":" assertFalse(command.execute().feedbackToUser.equals(\"No such tag\"));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to red\"));","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" //Check if friends tags are set to color","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" command \u003d new SetCommand(new Tag(\"friends\"), \"teal\");","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" command.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" assertTrue(command.execute().feedbackToUser.equals(\"tag [friends] colour changed to teal\"));","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" for (Tag tag : model.getAddressBook().getTagList()) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" if (\"friends\".equals(tag.tagName)) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" assertTrue(tag.getTagColour().equals(\"teal\"));","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" assertFalse(tag.getTagColour().equals(\"pink\"));","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" resetAllTagsToDefault();","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" * This method allows all tags to be set to the default colour \"teal\"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" public void resetAllTagsToDefault() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" ObservableList\u003cTag\u003e allTags \u003d model.getAddressBook().getTagList();","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" for (Tag t : allTags) {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" t.changeTagColour(\"teal\");","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":100}},{"path":"src/test/java/seedu/address/logic/commands/SortCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getEmptyAddressBook;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getSortedAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.exceptions.CommandException;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public ExpectedException error \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" private Model emptyModel \u003d new ModelManager(getEmptyAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByNameDesc \u003d new ModelManager(","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"name\", \"desc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAdd \u003d new ModelManager(","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"asc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByAddDesc \u003d new ModelManager(","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"address\", \"desc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmail \u003d new ModelManager(getSortedAddressBook(\"email\", \"asc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" private Model sortedByEmailDesc \u003d new ModelManager(","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" getSortedAddressBook(\"email\", \"desc\"), new UserPrefs());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void noPlayers() throws CommandException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" error.expect(CommandException.class);","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" prepareCommand(\"name\", \"asc\", emptyModel).execute();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" public void emptySortField_throwsNullPointerEx() {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", null);","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" public void emptySortOrder_throwsNullPointerEx() {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" error.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(null, \"asc\");","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" public void sortByName_success() throws Exception {","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"asc\", model);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"asc\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, model);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public void sortByNameDesc_success() throws Exception {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"name\", \"desc\", model);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"name\", \"desc\");","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByNameDesc);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" public void sortByAdd_success() throws Exception {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"asc\", model);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"asc\");","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAdd);","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" public void sortByAddDesc_success() throws Exception {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"address\", \"desc\", model);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"address\", \"desc\");","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByAddDesc);","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmail_success() throws Exception {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"asc\", model);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"asc\");","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmail);","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public void sortByEmailDesc_success() throws Exception {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" SortCommand so \u003d prepareCommand(\"email\", \"desc\", model);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(MESSAGE_SUCCESS, \"email\", \"desc\");","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":" assertCommandSuccess(so, model, expected, sortedByEmailDesc);","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":" * Returns a {@code sortCommand} with the parameters {@code field and @code order}.","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" private SortCommand prepareCommand(String field, String order, Model model) {","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" SortCommand sortCommand \u003d new SortCommand(field, order);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" sortCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" return sortCommand;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":108}},{"path":"src/test/java/seedu/address/logic/commands/TogglePrivacyCommandTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.commands;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static junit.framework.TestCase.assertFalse;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalPersons.getTypicalAddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.CommandHistory;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.UndoRedoStack;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.ModelManager;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private Model model \u003d new ModelManager(getTypicalAddressBook(), new UserPrefs());","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" public void editPersonPrivacyTest() {","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" assertFalse(epp.anyNonNullField());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy eppBuilder \u003d new EditPersonPrivacyBuilder().setAddressPrivate(\"false\")","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" .setEmailPrivate(\"false\").setPhonePrivate(\"true\").setRatingPrivate(\"false\")","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" .setRemarkPrivate(\"true\").build();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateAddress(), epp.getPrivateAddress());","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateEmail(), epp.getPrivateEmail());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivatePhone(), epp.getPrivatePhone());","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRating(), epp.getPrivateRating());","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertEquals(eppBuilder.getPrivateRemark(), epp.getPrivateRemark());","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" public void oneFieldToggledSuccess() throws Exception {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" Index indexLast \u003d Index.fromOneBased(model.getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" Person lastPerson \u003d model.getFilteredPersonList().get(indexLast.getZeroBased());","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" Person listedPerson \u003d new PersonBuilder().withName(lastPerson.getName().toString())","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" .withEmail(lastPerson.getEmail().toString()).withRating(lastPerson.getRating().toString())","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" .withPhone(lastPerson.getPhone().toString()).build();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" listedPerson.getPhone().setPrivate(true);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder(listedPerson).setPhonePrivate(\"true\").build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand togglePrivacyCommand \u003d new TogglePrivacyCommand(indexLast, epp);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" togglePrivacyCommand.setData(model, new CommandHistory(), new UndoRedoStack());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" String expected \u003d String.format(TogglePrivacyCommand.MESSAGE_SUCCESS, listedPerson);","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" Model expectedModel \u003d new ModelManager(new AddressBook(model.getAddressBook()), new UserPrefs());","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" expectedModel.updatePerson(lastPerson, listedPerson);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":67}},{"path":"src/test/java/seedu/address/logic/parser/AddressBookParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_UNKNOWN_COMMAND;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TEAM_ARSENAL;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.CreateCommand;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand.EditPersonDescriptor;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ExitCommand;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HistoryCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.KeyCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RemarkCommand;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import seedu.address.model.person.NameContainsKeywordsPredicate;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Remark;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import seedu.address.testutil.EditPersonDescriptorBuilder;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"public class AddressBookParserTest {","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" private static final boolean DEFAULT_LOCK_STATE \u003d false;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private final AddressBookParser parser \u003d new AddressBookParser();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void parseCommand_add() throws Exception {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(PersonUtil.getAddCommand(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_addAlias() throws Exception {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" AddCommand command \u003d (AddCommand) parser.parseCommand(AddCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new AddCommand(person), command);","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" public void parseCommand_clear() throws Exception {","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_clearAlias() throws Exception {","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ClearCommand.COMMAND_ALIAS + \" 3\", DEFAULT_LOCK_STATE) instanceof ClearCommand);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" public void parseCommand_delete() throws Exception {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_deleteAlias() throws Exception {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand command \u003d (DeleteCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" DeleteCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new DeleteCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" public void parseCommand_edit() throws Exception {","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_editAlias() throws Exception {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" EditPersonDescriptor descriptor \u003d new EditPersonDescriptorBuilder(person).build();","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" EditCommand command \u003d (EditCommand) parser.parseCommand(EditCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PersonUtil.getPersonDetails(person), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new EditCommand(INDEX_FIRST_PERSON, descriptor), command);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" public void parseCommand_exit() throws Exception {","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ExitCommand.COMMAND_WORD + \" 3\", DEFAULT_LOCK_STATE) instanceof ExitCommand);","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public void parseCommand_remark() throws Exception {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" public void parseCommand_remarkAlias() throws Exception {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" final Remark remark \u003d new Remark(\"foobar\");","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" RemarkCommand command \u003d (RemarkCommand) parser.parseCommand(RemarkCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \" + PREFIX_REMARK + remark, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" assertEquals(new RemarkCommand(INDEX_FIRST_PERSON, remark), command);","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" public void parseCommand_find() throws Exception {","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_WORD + \" \" + keywords.stream()","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_findAlias() throws Exception {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" List\u003cString\u003e keywords \u003d Arrays.asList(\"foo\", \"bar\", \"baz\");","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":" FindCommand command \u003d (FindCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"lohtianwei"},"content":" FindCommand.COMMAND_ALIAS + \" \" + keywords.stream()","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"lohtianwei"},"content":" .collect(Collectors.joining(\" \")), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new FindCommand(new NameContainsKeywordsPredicate(keywords)), command);","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" public void parseCommand_help() throws Exception {","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HelpCommand.COMMAND_WORD + \" 3\",","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HelpCommand);","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" public void parseCommand_history() throws Exception {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_WORD + \" 3\",","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"histories\", DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" fail(\"The expected ParseException was not thrown.\");","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" } catch (ParseException pe) {","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" assertEquals(MESSAGE_UNKNOWN_COMMAND, pe.getMessage());","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_historyAlias() throws Exception {","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(HistoryCommand.COMMAND_ALIAS + \" 3\",","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof HistoryCommand);","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" public void parseCommand_create() throws Exception {","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" public void parseCommand_createAlias() throws Exception {","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" Team team \u003d new Team(new TeamName(VALID_TEAM_ARSENAL));","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" CreateCommand command \u003d (CreateCommand) parser.parseCommand(CreateCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"lohtianwei"},"content":" + VALID_TEAM_ARSENAL, DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" assertEquals(new CreateCommand(team), command);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" public void parseCommand_list() throws Exception {","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_WORD + \" 3\",","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_listAlias() throws Exception {","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(ListCommand.COMMAND_ALIAS + \" 3\",","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof ListCommand);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" public void parseCommand_select() throws Exception {","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_selectAlias() throws Exception {","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"lohtianwei"},"content":" SelectCommand command \u003d (SelectCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"lohtianwei"},"content":" SelectCommand.COMMAND_ALIAS + \" \" + INDEX_FIRST_PERSON.getOneBased(), DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"lohtianwei"},"content":" assertEquals(new SelectCommand(INDEX_FIRST_PERSON), command);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" public void parseCommand_redoCommandWord_returnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"redo 1\", DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_redoCommandAlias_returnsRedoCommand() throws Exception {","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(RedoCommand.COMMAND_ALIAS + \" 1\",","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof RedoCommand);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" public void parseCommand_undoCommandWord_returnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_WORD, DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(\"undo 3\", DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_undoCommandAlias_returnsUndoCommand() throws Exception {","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS, DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(UndoCommand.COMMAND_ALIAS + \" 3\",","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"lohtianwei"},"content":" DEFAULT_LOCK_STATE) instanceof UndoCommand);","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" public void parseCommand_unrecognisedInput_throwsParseException() throws Exception {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" thrown.expectMessage(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"\", DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" public void parseCommand_unknownCommand_throwsParseException() throws Exception {","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" thrown.expect(ParseException.class);","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" thrown.expectMessage(MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"lohtianwei"},"content":" parser.parseCommand(\"unknownCommand\", DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"lohtianwei"},"content":" /** @lohtianwei */","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sort() throws Exception {","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \"","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_sortAlias() throws Exception {","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(SortCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_FIELDS.get(0) + \" \"","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"lohtianwei"},"content":" + SortCommandParser.ACCEPTED_ORDERS.get(0), DEFAULT_LOCK_STATE) instanceof SortCommand);","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_key() throws Exception {","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_keyAlias() throws Exception {","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(KeyCommand.COMMAND_WORD","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"lohtianwei"},"content":" + \" ilikesports\", DEFAULT_LOCK_STATE) instanceof KeyCommand);","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacy() throws Exception {","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_WORD + \" \"","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"lohtianwei"},"content":" public void parseCommand_togglePrivacyAlias() throws Exception {","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"lohtianwei"},"content":" assertTrue(parser.parseCommand(TogglePrivacyCommand.COMMAND_ALIAS + \" \"","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"lohtianwei"},"content":" + INDEX_FIRST_PERSON.getOneBased() + \" \"","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"lohtianwei"},"content":" + PREFIX_PHONE, DEFAULT_LOCK_STATE) instanceof TogglePrivacyCommand);","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"codeeong"},"content":" /** @@Codee */","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"codeeong"},"content":" public void parseCommand_theme() throws Exception {","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"codeeong"},"content":" String[] listThemes \u003d { \"Light\", \"Dark\" };","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"codeeong"},"content":" ChangeThemeCommand command \u003d (ChangeThemeCommand) parser.parseCommand(","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"lohtianwei"},"content":" ChangeThemeCommand.COMMAND_WORD + \" \" + listThemes[i], DEFAULT_LOCK_STATE);","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"codeeong"},"content":" assertEquals(new ChangeThemeCommand(listThemes[i]), command);","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":150,"codeeong":12,"-":159}},{"path":"src/test/java/seedu/address/logic/parser/ChangeThemeCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.ChangeThemeCommand;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"public class ChangeThemeCommandParserTest {","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" private ChangeThemeCommandParser parser \u003d new ChangeThemeCommandParser();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private String[] listThemes \u003d { \"Light\", \"Dark\" };","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsThemeCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" for (int i \u003d 0; i \u003c 2; i++) {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, listThemes[i], new ChangeThemeCommand(listThemes[i]));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" public void parse_invalidArgs_throwsParseException() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" // Empty Argument","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" assertParseFailure(parser, \"\",","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, ChangeThemeCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":30}},{"path":"src/test/java/seedu/address/logic/parser/SetCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG_COLOUR;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.TypicalTags.FRIEND;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"import seedu.address.logic.commands.SetCommand;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"public class SetCommandParserTest {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":" private SetCommandParser parser \u003d new SetCommandParser();","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public void parse_validArgs_returnsSetCommand() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" String userInput \u003d \" \" + PREFIX_TAG + FRIEND.getTagName() + \" \" + PREFIX_TAG_COLOUR + \"green\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" assertParseSuccess(parser, userInput, new SetCommand(FRIEND, \"green\"));","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":23}},{"path":"src/test/java/seedu/address/logic/parser/SortCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_ASCENDING;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.commands.SortCommand.BY_DESCENDING;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.SortCommand.MESSAGE_USAGE;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"//import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"//import seedu.address.logic.commands.SortCommand;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"public class SortCommandParserTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" private SortCommandParser parser \u003d new SortCommandParser();","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":" public void noArguments_throwsParseException() {","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \" \", String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" public void parse_invalidArguments_failure() {","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" //more than 1 field entered","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"address\" + \" \" + \"asc\",","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" //invalid field entered","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"invalid\" + \"asc\",","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //invalid sort order entered","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\" + \" \" + \"invalid\",","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" //no field entered","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"asc\",","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" //no order entered","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"name\",","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" /*","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" public void parse_validArguments_success() {","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in asc order","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by name in desc order","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"name\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"name\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in asc order","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by address in desc order","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"address\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"address\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in asc order","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by phone in desc order","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"phone\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"phone\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in asc order","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_ASCENDING,","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_ASCENDING));","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" //valid input for sort by email in desc order","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" assertParseSuccess(parser, \"email\" + \" \" + BY_DESCENDING,","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" new SortCommand(\"email\", BY_DESCENDING));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":82}},{"path":"src/test/java/seedu/address/logic/parser/TogglePrivacyCommandParserTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"lohtianwei"},"content":"package seedu.address.logic.parser;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.parser.exceptions.ParseException;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.testutil.EditPersonPrivacyBuilder;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":"public class TogglePrivacyCommandParserTest {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_INVALID_FORMAT \u003d String.format","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" (MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE);","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" private static final String MESSAGE_NO_FIELDS \u003d String.format(TogglePrivacyCommand.MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" private TogglePrivacyCommandParser parser \u003d new TogglePrivacyCommandParser();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidIndex() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":" // zero index","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"0\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" //negative index","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"-5\" + NAME_DESC_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" //invalid index","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1 random\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" public void parseMissingField_fail() {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" // no prefix specified","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\", MESSAGE_NO_FIELDS);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" //no index specified","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, VALID_NAME_AMY, MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" //nothing specified after command word","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"\", MESSAGE_INVALID_FORMAT);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" public void parseInvalidPrefix_fail() {","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" assertParseFailure(parser, \"1\" + \" \" + PREFIX_NAME,","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" String.format(MESSAGE_INVALID_COMMAND_FORMAT, TogglePrivacyCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" public void parseOneField_success() throws ParseException {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" @Test","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" public void parseValidFollowedbyInvalid_success() throws ParseException {","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" Index target \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" String input \u003d target.getOneBased() + \" \" + PREFIX_PHONE + \" \" + PREFIX_NAME;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" EditPersonPrivacy epp \u003d new EditPersonPrivacyBuilder().setPhonePrivate(\"false\").build();","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand expected \u003d new TogglePrivacyCommand(target, epp);","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" TogglePrivacyCommand actual \u003d parser.parse(input);","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" compareTpCommand(expected, actual);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" * Checks if two TP commands are equal","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" * @param expected","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" * @param actual","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":" private void compareTpCommand(TogglePrivacyCommand expected, TogglePrivacyCommand actual) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getIndex(), actual.getIndex());","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRemark(), actual.getEpp().getPrivateRemark());","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateAddress(), actual.getEpp().getPrivateAddress());","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateRating(), actual.getEpp().getPrivateRating());","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivatePhone(), actual.getEpp().getPrivatePhone());","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" assertEquals(expected.getEpp().getPrivateEmail(), actual.getEpp().getPrivateEmail());","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":95}},{"path":"src/test/java/seedu/address/model/tag/TagTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.model.tag;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"public class TagTest {","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":" public void constructor_null_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new Tag(null));","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":" public void constructor_invalidTagName_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":" String invalidTagName \u003d \"\";","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagName));","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" public void constructor_invalidTagColourName_throwsIllegalArgumentException() {","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":" String invalidTagColourName \u003d \"\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(IllegalArgumentException.class, () -\u003e new Tag(invalidTagColourName));","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public void isValidTagName() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" // null tag name","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagName(null));","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" public void isValidTagColour() {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" // null tag name","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e Tag.isValidTagColour(null));","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":12,"-":26}},{"path":"src/test/java/seedu/address/storage/JsonUserPrefsStorageTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.storage;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.io.File;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.io.IOException;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.Optional;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.commons.exceptions.DataConversionException;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.commons.util.FileUtil;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.model.UserPrefs;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"public class JsonUserPrefsStorageTest {","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String TEST_DATA_FOLDER \u003d FileUtil.getPath(\"./src/test/data/JsonUserPrefsStorageTest/\");","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" public void readUserPrefs_nullFilePath_throwsNullPointerException() throws DataConversionException {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" readUserPrefs(null);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" private Optional\u003cUserPrefs\u003e readUserPrefs(String userPrefsFileInTestDataFolder) throws DataConversionException {","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" String prefsFilePath \u003d addToTestDataPathIfNotNull(userPrefsFileInTestDataFolder);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new JsonUserPrefsStorage(prefsFilePath).readUserPrefs(prefsFilePath);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" public void readUserPrefs_missingFile_emptyResult() throws DataConversionException {","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" assertFalse(readUserPrefs(\"NonExistentFile.json\").isPresent());","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public void readUserPrefs_notJsonFormat_exceptionThrown() throws DataConversionException {","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" thrown.expect(DataConversionException.class);","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" readUserPrefs(\"NotJsonFormatUserPrefs.json\");","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /* IMPORTANT: Any code below an exception-throwing line (like the one above) will be ignored.","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * That means you should not have more than one exception test in one method","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" private String addToTestDataPathIfNotNull(String userPrefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" return userPrefsFileInTestDataFolder !\u003d null","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" ? TEST_DATA_FOLDER + userPrefsFileInTestDataFolder","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" : null;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public void readUserPrefs_fileInOrder_successfullyRead() throws DataConversionException {","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"TypicalUserPref.json\").get();","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void readUserPrefs_valuesMissingFromFile_defaultValuesUsed() throws DataConversionException {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"EmptyUserPrefs.json\").get();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(new UserPrefs(), actual);","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public void readUserPrefs_extraValuesInFile_extraValuesIgnored() throws DataConversionException {","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" UserPrefs expected \u003d getTypicalUserPrefs();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" UserPrefs actual \u003d readUserPrefs(\"ExtraValuesUserPref.json\").get();","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" assertEquals(expected, actual);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private UserPrefs getTypicalUserPrefs() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" UserPrefs userPrefs \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" userPrefs.setGuiSettings(1000, 500, 300, 100);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" userPrefs.setAddressBookFilePath(\"myteammanager.xml\");","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" userPrefs.setAddressBookName(\"TypicalAddressBookName\");","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" return userPrefs;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" public void savePrefs_nullPrefs_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" saveUserPrefs(null, \"SomeFile.json\");","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" public void saveUserPrefs_nullFilePath_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" thrown.expect(NullPointerException.class);","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" saveUserPrefs(new UserPrefs(), null);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" * Saves {@code userPrefs} at the specified {@code prefsFileInTestDataFolder} filepath.","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" private void saveUserPrefs(UserPrefs userPrefs, String prefsFileInTestDataFolder) {","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" new JsonUserPrefsStorage(addToTestDataPathIfNotNull(prefsFileInTestDataFolder))","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" .saveUserPrefs(userPrefs);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" } catch (IOException ioe) {","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" throw new AssertionError(\"There should not be an error writing to the file\", ioe);","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" public void saveUserPrefs_allInOrder_success() throws DataConversionException, IOException {","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" UserPrefs original \u003d new UserPrefs();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" original.setGuiSettings(1200, 200, 0, 2);","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" String pefsFilePath \u003d testFolder.getRoot() + File.separator + \"TempPrefs.json\";","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" JsonUserPrefsStorage jsonUserPrefsStorage \u003d new JsonUserPrefsStorage(pefsFilePath);","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" //Try writing when the file doesn\u0027t exist","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" UserPrefs readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" //Try saving when the file exists","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" original.setGuiSettings(5, 5, 5, 5);","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" jsonUserPrefsStorage.saveUserPrefs(original);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" readBack \u003d jsonUserPrefsStorage.readUserPrefs().get();","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" assertEquals(original, readBack);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":134}},{"path":"src/test/java/seedu/address/testutil/EditPersonPrivacyBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"lohtianwei"},"content":"//@@author lohtianwei","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.logic.commands.TogglePrivacyCommand.EditPersonPrivacy;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"lohtianwei"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"lohtianwei"},"content":"/**","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"lohtianwei"},"content":" * A utility class to help with building EditPersonPrivacy objects.","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"lohtianwei"},"content":"public class EditPersonPrivacyBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"lohtianwei"},"content":" private EditPersonPrivacy epp;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder() {","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(EditPersonPrivacy epp) {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"lohtianwei"},"content":" this.epp \u003d new EditPersonPrivacy(epp);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"lohtianwei"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":" * Returns an {@code EditPersonPrivacy} with fields containing {@code person}\u0027s privacy details","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"lohtianwei"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder(Person p) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"lohtianwei"},"content":" epp \u003d new EditPersonPrivacy();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(p.getAddress().isPrivate());","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(p.getEmail().isPrivate());","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(p.getPhone().isPrivate());","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(p.getRemark().isPrivate());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(p.getRating().isPrivate());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setPhonePrivate(String phone) {","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"lohtianwei"},"content":" if (phone.equals(\"Optional[true]\") || phone.equals(\"true\")) {","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(true);","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"lohtianwei"},"content":" } else if (phone.equals(\"Optional[false]\") || phone.equals(\"false\")) {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivatePhone(false);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of phone should be true or false\");","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setEmailPrivate(String email) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"lohtianwei"},"content":" if (email.equals(\"Optional[true]\") || email.equals(\"true\")) {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(true);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"lohtianwei"},"content":" } else if (email.equals(\"Optional[false]\") || email.equals(\"false\")) {","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateEmail(false);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of email should be true or false\");","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setAddressPrivate(String address) {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"lohtianwei"},"content":" if (address.equals(\"Optional[true]\") || address.equals(\"true\")) {","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(true);","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"lohtianwei"},"content":" } else if (address.equals(\"Optional[false]\") || address.equals(\"false\")) {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateAddress(false);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of address should be true or false\");","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRatingPrivate(String rating) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"lohtianwei"},"content":" if (rating.equals(\"Optional[true]\") || rating.equals(\"true\")) {","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(true);","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"lohtianwei"},"content":" } else if (rating.equals(\"Optional[false]\") || rating.equals(\"false\")) {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRating(false);","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of rating should be true or false\");","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacyBuilder setRemarkPrivate(String remark) {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"lohtianwei"},"content":" if (remark.equals(\"Optional[true]\") || remark.equals(\"true\")) {","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(true);","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"lohtianwei"},"content":" } else if (remark.equals(\"Optional[false]\") || remark.equals(\"false\")) {","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"lohtianwei"},"content":" epp.setPrivateRemark(false);","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"lohtianwei"},"content":" } else {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"lohtianwei"},"content":" throw new IllegalArgumentException(\"Privacy of remark should be true or false\");","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"lohtianwei"},"content":" return this;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"lohtianwei"},"content":" public EditPersonPrivacy build() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"lohtianwei"},"content":" return epp;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":89,"-":2}},{"path":"src/test/java/seedu/address/testutil/TeamBuilder.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":" * A utility class to help with building a TeamList.","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"//@@author Codee","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"public class TeamBuilder {","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":" public static final String DEFAULT_TEAM_NAME \u003d \"Arsenal\";","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":" private TeamName teamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" public TeamBuilder() {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" teamName \u003d new TeamName(DEFAULT_TEAM_NAME);","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" * Initializes the TeamBuilder with the data of {@code teamToCopy}.","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" public TeamBuilder(Team teamToCopy) {","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" teamName \u003d teamToCopy.getTeamName();","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" * Sets the {@code TeamName} of the {@code Team} that we are building.","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public TeamBuilder withTeamName(String teamName) {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" this.teamName \u003d new TeamName(teamName);","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" return this;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" public Team build() {","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" return new Team(teamName);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":8,"-":31}},{"path":"src/test/java/seedu/address/testutil/TypicalPersons.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"lohtianwei"},"content":"import java.util.Collections;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" * A utility class containing a list of {@code Person} objects to be used in tests.","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"public class TypicalPersons {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" public static final Person ALICE \u003d new PersonBuilder().withName(\"Alice Pauline\")","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" .withAddress(\"123, Jurong West Ave 6, #08-111\").withEmail(\"alice@example.com\")","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" .withPhone(\"85355255\").withTags(\"friends\").withRating(\"0\")","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"1\").build();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public static final Person BENSON \u003d new PersonBuilder().withName(\"Benson Meier\")","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" .withAddress(\"311, Clementi Ave 2, #02-25\")","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" .withEmail(\"johnd@example.com\").withPhone(\"98765432\")","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" .withTags(\"owesMoney\", \"friends\").withRating(\"1\")","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"2\").build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" public static final Person CARL \u003d new PersonBuilder().withName(\"Carl Kurz\").withPhone(\"95352563\")","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" .withEmail(\"heinz@example.com\").withAddress(\"wall street\").withRating(\"2\")","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"3\").build();","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" public static final Person DANIEL \u003d new PersonBuilder().withName(\"Daniel Meier\").withPhone(\"87652533\")","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" .withEmail(\"cornelia@example.com\").withAddress(\"10th street\").withRating(\"3\")","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" .withPosition(\"4\").withJerseyNumber(\"4\").build();","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" public static final Person ELLE \u003d new PersonBuilder().withName(\"Elle Meyer\").withPhone(\"9482224\")","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" .withEmail(\"werner@example.com\").withAddress(\"michegan ave\").withRating(\"4\")","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" .withPosition(\"1\").withJerseyNumber(\"5\").build();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public static final Person FIONA \u003d new PersonBuilder().withName(\"Fiona Kunz\").withPhone(\"9482427\")","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" .withEmail(\"lydia@example.com\").withAddress(\"little tokyo\").withRating(\"5\")","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" .withPosition(\"2\").withJerseyNumber(\"6\").build();","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static final Person GEORGE \u003d new PersonBuilder().withName(\"George Best\").withPhone(\"9482442\")","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" .withEmail(\"anna@example.com\").withAddress(\"4th street\").withRemark(\"Could be famous\").withRating(\"0\")","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" .withPosition(\"3\").withJerseyNumber(\"7\").build();","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" // Manually added","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public static final Person HOON \u003d new PersonBuilder().withName(\"Hoon Meier\").withPhone(\"8482424\")","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" .withEmail(\"stefan@example.com\").withAddress(\"little india\").build();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" public static final Person IDA \u003d new PersonBuilder().withName(\"Ida Mueller\").withPhone(\"8482131\")","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" .withEmail(\"hans@example.com\").withAddress(\"chicago ave\").build();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" // Manually added - Person\u0027s details found in {@code CommandTestUtil}","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static final Person AMY \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY)","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2)","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" public static final Person BOB \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withRating(VALID_RATING_1)","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_MIDFIELD).withJerseyNumber(VALID_JERSEY_NUMBER_17)","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_HUSBAND, VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" public static final String KEYWORD_MATCHING_MEIER \u003d \"Meier\"; // A keyword that matches MEIER","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" private TypicalPersons() {} // prevents instantiation","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" * Returns an {@code AddressBook} with all the typical persons.","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" for (Person person : getTypicalPersons()) {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" throw new AssertionError(\"not possible\");","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" return ab;","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"lohtianwei"},"content":" //@@author lohtianwei","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersons() {","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, BENSON, CARL, DANIEL, ELLE, FIONA, GEORGE));","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByAddress() {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(DANIEL, ALICE, BENSON, GEORGE, FIONA, ELLE, CARL));","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByEmail() {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, GEORGE, DANIEL, CARL, BENSON, FIONA, ELLE));","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"lohtianwei"},"content":" public static List\u003cPerson\u003e getTypicalPersonsSortedByPhone() {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"lohtianwei"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(ALICE, DANIEL, ELLE, FIONA, GEORGE, CARL, BENSON));","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getSortedAddressBook(String field, String order) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"lohtianwei"},"content":" List\u003cPerson\u003e personList;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"lohtianwei"},"content":" switch(field) {","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"lohtianwei"},"content":" case \"name\":","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"lohtianwei"},"content":" case \"phone\":","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByPhone();","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"lohtianwei"},"content":" case \"email\":","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByEmail();","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"lohtianwei"},"content":" case \"address\":","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersonsSortedByAddress();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"lohtianwei"},"content":" break;","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"lohtianwei"},"content":" default:","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"lohtianwei"},"content":" personList \u003d getTypicalPersons();","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"lohtianwei"},"content":" if (order.equals(\"desc\")) {","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"lohtianwei"},"content":" Collections.reverse(personList);","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"lohtianwei"},"content":" for (Person person : personList) {","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"lohtianwei"},"content":" try {","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"lohtianwei"},"content":" ab.addPerson(person);","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"lohtianwei"},"content":" } catch (DuplicatePersonException e) {","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"lohtianwei"},"content":" assert false : \"not possible\";","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"lohtianwei"},"content":" return ab;","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"lohtianwei"},"content":"","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"lohtianwei"},"content":" public static AddressBook getEmptyAddressBook() {","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"lohtianwei"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"lohtianwei"},"content":" return ab;","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"lohtianwei"},"content":" }","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"lohtianwei"},"content":"}","isFullCredit":true}],"authorContributionMap":{"lohtianwei":59,"-":91}},{"path":"src/test/java/seedu/address/testutil/TypicalTags.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import java.util.ArrayList;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.tag.UniqueTagList;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":" * A utility class containing a list of {@code Tag} objects to be used in tests.","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"public class TypicalTags {","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" public static final Tag GOOD_ATTITUDE \u003d new Tag(\"goodAttitude\", \"teal\");","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" public static final Tag FRIEND \u003d new Tag(\"friends\", \"teal\");","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":" private TypicalTags() {} //prevents instantiation","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" * Returns an {@code AddressBook} with all the typical teams.","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" public static AddressBook getTypicalAddressBook() {","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" AddressBook ab \u003d new AddressBook();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" for (Tag tag : getTypicalTags()) {","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" try {","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" ab.addTag(tag);","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" } catch (UniqueTagList.DuplicateTagException e) {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" throw new AssertionError(\"not possible\");","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" return ab;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" public static List\u003cTag\u003e getTypicalTags() {","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" return new ArrayList\u003c\u003e(Arrays.asList(GOOD_ATTITUDE, FRIEND));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":43}},{"path":"src/test/java/seedu/address/ui/PlayerDetailsTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertPlayerDetailsDisplaysPerson;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"//@@author Codee","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"public class PlayerDetailsTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":" public void display() {","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" // no tags","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" Person personWithNoTags \u003d new PersonBuilder().withTags(new String[0]).build();","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(personWithNoTags);","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" uiPartRule.setUiPart(playerDetails);","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" assertCardDisplay(playerDetails, personWithNoTags);","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public void equals() {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" Person person \u003d new PersonBuilder().build();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" PlayerDetails playerDetails \u003d new PlayerDetails(person);","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" // same object -\u003e returns true","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" assertTrue(playerDetails.equals(playerDetails));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" // null -\u003e returns false","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(null));","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" // different types -\u003e returns false","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(0));","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" // different person, same index -\u003e returns false","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" Person differentPerson \u003d new PersonBuilder().withName(\"differentName\").build();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertFalse(playerDetails.equals(new PlayerDetails(differentPerson)));","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" * Asserts that {@code playerDetails} displays the details of {@code expectedPerson} correctly","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" private void assertCardDisplay(PlayerDetails playerDetails, Person expectedPerson) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" PlayerDetailsHandle playerDetailsHandle \u003d new PlayerDetailsHandle(playerDetails.getRoot());","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" // verify player details are displayed correctly","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" assertPlayerDetailsDisplaysPerson(expectedPerson, playerDetailsHandle);","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":13,"-":44}},{"path":"src/test/java/seedu/address/ui/TeamDisplayTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"codeeong"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"codeeong"},"content":"import static seedu.address.testutil.EventsUtil.postNow;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertTeamDisplayEquals;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"codeeong"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import javafx.collections.FXCollections;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"codeeong"},"content":"import javafx.collections.ObservableList;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import seedu.address.commons.events.ui.ShowNewTeamNameEvent;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.Team;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import seedu.address.model.team.TeamName;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"codeeong"},"content":"import seedu.address.testutil.TeamBuilder;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"/**","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"codeeong"},"content":" * tests for TeamDisplay UI Component.","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"codeeong"},"content":"/** @@author Codee */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"codeeong"},"content":"public class TeamDisplayTest extends GuiUnitTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":" private static final String NEW_TEAM_NAME \u003d \"myTeam\";","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":" private static final ShowNewTeamNameEvent SHOW_NEW_TEAM_NAME_EVENT \u003d new ShowNewTeamNameEvent(NEW_TEAM_NAME);","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"codeeong"},"content":" private TeamDisplay teamDisplay;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"codeeong"},"content":" private TeamDisplayHandle teamDisplayHandle;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":" private ObservableList\u003cTeam\u003e teamList;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" @Before","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"codeeong"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" teamList \u003d FXCollections.observableArrayList();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Arsenal\").build());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" teamList.add(new TeamBuilder().withTeamName(\"Chelsea\").build());","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" teamDisplay \u003d new TeamDisplay(teamList);","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" uiPartRule.setUiPart(teamDisplay);","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" public void display() {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"codeeong"},"content":" assertTeamDisplay(teamDisplay, teamList);","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code personCard} displays the details of {@code expectedPerson} correctly and matches","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"codeeong"},"content":" * {@code expectedId}.","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":" private void assertTeamDisplay(TeamDisplay teamDisplay, ObservableList\u003cTeam\u003e teamlist) {","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(teamDisplay, teamDisplayHandle);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" @Test","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" public void handleShowNewTeamNameEvent() {","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":" postNow(SHOW_NEW_TEAM_NAME_EVENT);","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly after event","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" teamList.add(new Team(new TeamName(NEW_TEAM_NAME)));","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" TeamDisplay expectedTeamDisplay \u003d new TeamDisplay(teamList);","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"codeeong"},"content":" teamDisplayHandle \u003d new TeamDisplayHandle(teamDisplay.getRoot());","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"codeeong"},"content":" // verify team names are displayed correctly","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"codeeong"},"content":" assertTeamDisplayEquals(expectedTeamDisplay, teamDisplayHandle);","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"codeeong"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":65,"-":4}},{"path":"src/test/java/seedu/address/ui/UiPartTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotNull;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import java.net.URL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import org.junit.Rule;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.rules.ExpectedException;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import org.junit.rules.TemporaryFolder;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import javafx.fxml.FXML;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.MainApp;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.testutil.Assert;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"public class UiPartTest {","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":" private static final String MISSING_FILE_PATH \u003d \"UiPartTest/missingFile.fxml\";","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" private static final String INVALID_FILE_PATH \u003d \"UiPartTest/invalidFile.fxml\";","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_PATH \u003d \"UiPartTest/validFile.fxml\";","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":" private static final String VALID_FILE_WITH_FX_ROOT_PATH \u003d \"UiPartTest/validFileWithFxRoot.fxml\";","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final TestFxmlObject VALID_FILE_ROOT \u003d new TestFxmlObject(\"Hello World!\");","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" public ExpectedException thrown \u003d ExpectedException.none();","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" @Rule","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" public TemporaryFolder testFolder \u003d new TemporaryFolder();","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" public void constructor_nullFileUrl_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null));","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((URL) null, new Object()));","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" public void constructor_missingFileUrl_throwsAssertionError() throws Exception {","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" URL missingFileUrl \u003d new URL(testFolder.getRoot().toURI().toURL(), MISSING_FILE_PATH);","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl));","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(missingFileUrl, new Object()));","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" public void constructor_invalidFileUrl_throwsAssertionError() {","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" URL invalidFileUrl \u003d getTestFileUrl(INVALID_FILE_PATH);","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl));","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(invalidFileUrl, new Object()));","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" public void constructor_validFileUrl_loadsFile() {","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_PATH);","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl).getRoot());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" public void constructor_validFileWithFxRootUrl_loadsFile() {","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" URL validFileUrl \u003d getTestFileUrl(VALID_FILE_WITH_FX_ROOT_PATH);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" TestFxmlObject root \u003d new TestFxmlObject();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, new TestUiPart\u003cTestFxmlObject\u003e(validFileUrl, root).getRoot());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" public void constructor_nullFileName_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null));","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e((String) null, new Object()));","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" public void constructor_missingFileName_throwsNullPointerException() {","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH));","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" Assert.assertThrows(NullPointerException.class, () -\u003e new TestUiPart\u003cObject\u003e(MISSING_FILE_PATH, new Object()));","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" public void constructor_invalidFileName_throwsAssertionError() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH));","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" Assert.assertThrows(AssertionError.class, () -\u003e new TestUiPart\u003cObject\u003e(INVALID_FILE_PATH, new Object()));","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" private URL getTestFileUrl(String testFilePath) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" String testFilePathInView \u003d \"/view/\" + testFilePath;","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" URL testFileUrl \u003d MainApp.class.getResource(testFilePathInView);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" assertNotNull(testFilePathInView + \" does not exist.\", testFileUrl);","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" return testFileUrl;","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * UiPart used for testing.","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}.","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" private static class TestUiPart\u003cT\u003e extends UiPart\u003cT\u003e {","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" @FXML","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" private TestFxmlObject validFileRoot; // Check that @FXML annotations work","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl, T root) {","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" super(fxmlFileUrl, root);","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName, T root) {","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" super(fxmlFileName, root);","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" TestUiPart(URL fxmlFileUrl) {","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" super(fxmlFileUrl);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" TestUiPart(String fxmlFileName) {","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" super(fxmlFileName);","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" assertEquals(VALID_FILE_ROOT, validFileRoot);","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"}","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":118}},{"path":"src/test/java/seedu/address/ui/testutil/GuiTestAssert.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package seedu.address.ui.testutil;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"codeeong"},"content":"import static org.junit.Assert.fail;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"codeeong"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import java.util.stream.Collectors;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonCardHandle;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.PlayerDetailsHandle;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"codeeong"},"content":"import guitests.guihandles.TeamDisplayHandle;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.PersonCard;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"codeeong"},"content":"import seedu.address.ui.TeamDisplay;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A set of assertion methods useful for writing GUI tests.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class GuiTestAssert {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":" private static final String LABEL_DEFAULT_STYLE \u003d \"label\";","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the same values as {@code expectedCard}.","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" public static void assertCardEquals(PersonCardHandle expectedCard, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getId(), actualCard.getId());","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getPosition(), actualCard.getPosition());","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getRating(), actualCard.getRating());","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getName(), actualCard.getName());","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTeamName(), actualCard.getTeamName());","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" assertEquals(expectedCard.getTags(), actualCard.getTags());","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"codeeong"},"content":" expectedCard.getTags().forEach(tag -\u003e","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedCard.getTagStyleClasses(tag), actualCard.getTagStyleClasses(tag)));","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualTeamDisplay} displays the details of {@code expectedTeamDisplay}.","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static void assertTeamDisplayEquals(TeamDisplay expectedTeamDisplay, TeamDisplayHandle actualTeamDisplay) {","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" expectedTeamDisplay.getTeams().forEach(team -\u003e","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" assertEquals(expectedTeamDisplay.getTeams().toString(), actualTeamDisplay.getTeams().toString()));","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" * Asserts that {@code actualCard} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" public static void assertCardDisplaysPerson(Person expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualCard.getName());","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getTeamName().toString(), actualCard.getTeamName());","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getRating().value, actualCard.getRating());","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedPerson.getPosition().getPositionName(), actualCard.getPosition());","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"codeeong"},"content":" assertTagsEqual(expectedPerson, actualCard);","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"codeeong"},"content":" * Asserts that {@code actualPlayerDetails} displays the details of {@code expectedPerson}.","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" //@@author Codee","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" public static void assertPlayerDetailsDisplaysPerson(Person expectedPerson, PlayerDetailsHandle actualPlayerPanel) {","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getName().fullName, actualPlayerPanel.getName());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getAddress().toString(), actualPlayerPanel.getAddress());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getEmail().value, actualPlayerPanel.getEmail());","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getJerseyNumber().value, actualPlayerPanel.getJerseyNumber());","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getPhone().value, actualPlayerPanel.getPhone());","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" assertEquals(expectedPerson.getRemark().toString(), actualPlayerPanel.getRemarks());","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" //@@author","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"codeeong"},"content":" * Returns the color style for {@code tagName}\u0027s label. The tag\u0027s color is determined by looking up the color","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"codeeong"},"content":" * of {@tagColour}","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"codeeong"},"content":" *","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"codeeong"},"content":" * @see PersonCard getTagColorStyleFor(String)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"codeeong"},"content":" private static String getTagColorStyleFor(String tagName) {","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"codeeong"},"content":" switch (tagName) {","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"codeeong"},"content":" case \"classmates\":","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"codeeong"},"content":" case \"owesMoney\":","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"codeeong"},"content":" case \"colleagues\":","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"codeeong"},"content":" case \"neighbours\":","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"codeeong"},"content":" case \"family\":","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"codeeong"},"content":" case \"friend\":","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"codeeong"},"content":" case \"friends\":","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"codeeong"},"content":" case \"husband\":","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"codeeong"},"content":" case \"redCard\":","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"codeeong"},"content":" case \"yellowCard\":","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"codeeong"},"content":" case \"goodAttitude\":","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"codeeong"},"content":" case \"badAttitude\":","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"codeeong"},"content":" case \"injured\":","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"codeeong"},"content":" case \"fastRunner\":","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"codeeong"},"content":" return \"teal\";","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"codeeong"},"content":" default:","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"codeeong"},"content":" fail(tagName + \" does not have a color assigned.\");","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"codeeong"},"content":" return \"\";","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"codeeong"},"content":" }","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"codeeong"},"content":" /**","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"codeeong"},"content":" * Asserts that the tags in {@code actualCard} matches all the tags in {@code expectedPerson} with the correct","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"codeeong"},"content":" * color.","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"codeeong"},"content":" */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"codeeong"},"content":" private static void assertTagsEqual(Person expectedPerson, PersonCardHandle actualCard) {","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"codeeong"},"content":" List\u003cString\u003e expectedTags \u003d expectedPerson.getTags().stream()","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"codeeong"},"content":" .map(tag -\u003e tag.tagName).collect(Collectors.toList());","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"codeeong"},"content":" assertEquals(expectedTags, actualCard.getTags());","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"codeeong"},"content":" expectedTags.forEach(tag -\u003e","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"codeeong"},"content":" assertEquals(Arrays.asList(LABEL_DEFAULT_STYLE, getTagColorStyleFor(tag)),","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"codeeong"},"content":" actualCard.getTagStyleClasses(tag)));","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, Person... persons) {","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" for (int i \u003d 0; i \u003c persons.length; i++) {","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" assertCardDisplaysPerson(persons[i], personListPanelHandle.getPersonCardHandle(i));","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" * Asserts that the list in {@code personListPanelHandle} displays the details of {@code persons} correctly and","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" * in the correct order.","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" public static void assertListMatching(PersonListPanelHandle personListPanelHandle, List\u003cPerson\u003e persons) {","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" assertListMatching(personListPanelHandle, persons.toArray(new Person[0]));","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" * Asserts the size of the list in {@code personListPanelHandle} equals to {@code size}.","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" public static void assertListSize(PersonListPanelHandle personListPanelHandle, int size) {","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" int numberOfPeople \u003d personListPanelHandle.getListSize();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertEquals(size, numberOfPeople);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" * Asserts the message shown in {@code resultDisplayHandle} equals to {@code expected}.","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" public static void assertResultMessage(ResultDisplayHandle resultDisplayHandle, String expected) {","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" assertEquals(expected, resultDisplayHandle.getText());","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":70,"-":81}},{"path":"src/test/java/systemtests/AddCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_MAC_LINUX;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.AVATAR_WINDOWS;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_JERSEY_NUMBER_DESC;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_POSITION_DESC;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_RATING_DESC;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_AMY;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_MAC_LINUX;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_AVATAR_WINDOWS;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_AMY;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_17;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_AMY;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_AMY;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_STRIKER;","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_0;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.ParserUtil.UNSPECIFIED_FIELD;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.ALICE;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.CARL;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.HOON;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.IDA;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"import com.sun.javafx.PlatformUtil;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.AddCommand;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"import seedu.address.model.person.JerseyNumber;","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Position;","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Rating;","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"public class AddCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" public void add() throws Exception {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operations on the shown unfiltered list ----------------------------- */","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" /* Case: add a person without tags to a non-empty address book, command with leading spaces and trailing spaces","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" * -\u003e added","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" Person toAdd \u003d AMY;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" String command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: undo adding Amy to the list -\u003e Amy deleted */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":" /* Case: redo adding Amy to the list -\u003e Amy added again */","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" model.addPerson(toAdd);","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except name -\u003e added */","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \"","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except phone -\u003e added */","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_BOB + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except email -\u003e added */","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_BOB + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \"","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" /* Case: add a person with all fields same as another person in the address book except address -\u003e added */","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_BOB","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND + \" \" + RATING_DESC_0 + \" \" + POSITION_DESC_STRIKER + \" \"","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" /* Case: add to empty address book -\u003e added */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" deleteAllPersons();","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" assertCommandSuccess(ALICE);","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" /* Case: add a person with tags, command with parameters in random order -\u003e added */","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":" toAdd \u003d BOB;","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + TAG_DESC_FRIEND + PHONE_DESC_BOB + ADDRESS_DESC_BOB + NAME_DESC_BOB","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"codeeong"},"content":" + TAG_DESC_HUSBAND + EMAIL_DESC_BOB + POSITION_DESC_MIDFILED + JERSEY_NUMBER_DESC_17 + RATING_DESC_1;","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" /* Case: add a person, missing tags -\u003e added */","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertCommandSuccess(HOON);","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" /* Case: missing phone -\u003e added */","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withEmail(VALID_EMAIL_AMY).withAddress(VALID_ADDRESS_AMY)","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" .withPhone(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing address -\u003e added */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" .withAddress(UNSPECIFIED_FIELD).withTags().withRating(VALID_RATING_0)","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: missing rating -\u003e added */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_AMY).withPhone(VALID_PHONE_AMY).withEmail(VALID_EMAIL_AMY)","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" .withAddress(VALID_ADDRESS_AMY).withTags().withRating(UNSPECIFIED_FIELD)","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" .withPosition(VALID_POSITION_STRIKER).withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" if (PlatformUtil.isWindows()) {","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_WINDOWS)","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" .build();","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_WINDOWS","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":" } else if (PlatformUtil.isMac() || PlatformUtil.isLinux()) {","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" toAdd \u003d new PersonBuilder().withName(VALID_NAME_BOB).withEmail(VALID_EMAIL_BOB)","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" .withPhone(VALID_PHONE_AMY).withAddress(VALID_ADDRESS_AMY).withAvatar(VALID_AVATAR_MAC_LINUX)","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" .withTags(VALID_TAG_FRIEND).withRating(VALID_RATING_0).withJerseyNumber(VALID_JERSEY_NUMBER_17)","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" .build();","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_BOB + EMAIL_DESC_BOB + AVATAR_MAC_LINUX","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0 + JERSEY_NUMBER_DESC_17 + POSITION_DESC_STRIKER","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toAdd);","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /* -------------------------- Perform add operation on the shown filtered list ------------------------------ */","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: filters the person list before adding -\u003e added */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertCommandSuccess(IDA);","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" /* ------------------------ Perform add operation while a person card is selected --------------------------- */","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, add a person -\u003e added, card selection remains unchanged */","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" selectPerson(Index.fromOneBased(1));","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" assertCommandSuccess(CARL);","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" /* ----------------------------------- Perform invalid add operations --------------------------------------- */","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person -\u003e rejected */","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON);","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" /* Case: add a duplicate person except with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" // \"friends\" is an existing tag used in the default model, see TypicalPersons#ALICE","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" // This test will fail if a new tag that is not in the model is used, see the bug documented in","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" // AddressBook#addPerson(Person)","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" command \u003d PersonUtil.getAddCommand(HOON) + \" \" + PREFIX_TAG.getPrefix() + \"friends\";","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" /* Case: missing name -\u003e rejected */","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" /* Case: missing email -\u003e rejected */","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + ADDRESS_DESC_AMY + RATING_DESC_0","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" assertCommandFailure(command, String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" /* Case: invalid keyword -\u003e rejected */","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" command \u003d \"adds \" + PersonUtil.getPersonDetails(toAdd);","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Messages.MESSAGE_UNKNOWN_COMMAND);","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + INVALID_NAME_DESC + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + INVALID_PHONE_DESC + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + INVALID_EMAIL_DESC + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + INVALID_ADDRESS_DESC","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Address.MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" + INVALID_TAG_DESC + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" //@@author lithiumlkid","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" /* Case: invalid rating -\u003e rejected */","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" + INVALID_RATING_DESC + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Rating.MESSAGE_RATING_CONSTRAINTS);","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" /* Case: invalid position -\u003e rejected */","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + INVALID_POSITION_DESC + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Position.MESSAGE_POSITION_CONSTRAINTS);","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" /* Case: invalid jersey number -\u003e rejected */","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + INVALID_JERSEY_NUMBER_DESC;","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandFailure(command, JerseyNumber.MESSAGE_JERSEY_NUMBER_CONSTRAINTS);","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_NO_FILE;","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" assertCommandFailure(command, AddCommand.MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" /* Case: invalid jersey avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":" command \u003d AddCommand.COMMAND_WORD + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY + ADDRESS_DESC_AMY","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2 + INVALID_AVATAR_TYPE;","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" assertCommandFailure(command, Avatar.MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" * Executes the {@code AddCommand} that adds {@code toAdd} to the model and asserts that the,\u003cbr\u003e","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 1. Command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" * 2. Command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" * 3. Result display box displays the success message of executing {@code AddCommand} with the details of","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" * {@code toAdd}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" * the current model added with {@code toAdd}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" * 5. Browser url and selected card remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":" * 6. Status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(Person toAdd) {","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" assertCommandSuccess(PersonUtil.getAddCommand(toAdd), toAdd);","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":309,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":310,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":311,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(Person)}. Executes {@code command}","isFullCredit":true},{"lineNumber":312,"author":{"gitId":"-"},"content":" * instead.","isFullCredit":true},{"lineNumber":313,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(Person)","isFullCredit":true},{"lineNumber":314,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":315,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Person toAdd) {","isFullCredit":true},{"lineNumber":316,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":317,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":318,"author":{"gitId":"-"},"content":" expectedModel.addPerson(toAdd);","isFullCredit":true},{"lineNumber":319,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException dpe) {","isFullCredit":true},{"lineNumber":320,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(\"toAdd already exists in the model.\");","isFullCredit":true},{"lineNumber":321,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":322,"author":{"gitId":"-"},"content":" // TODO: place holder for success message, change to proper assert method","isFullCredit":true},{"lineNumber":323,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d String.format(AddCommand.MESSAGE_SUCCESS, toAdd);","isFullCredit":true},{"lineNumber":324,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":325,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage);","isFullCredit":true},{"lineNumber":326,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":327,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":328,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":329,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Person)} except asserts that","isFullCredit":true},{"lineNumber":330,"author":{"gitId":"-"},"content":" * the,\u003cbr\u003e","isFullCredit":true},{"lineNumber":331,"author":{"gitId":"-"},"content":" * 1. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":332,"author":{"gitId":"-"},"content":" * 2. {@code Model}, {@code Storage} and {@code PersonListPanel} equal to the corresponding components in","isFullCredit":true},{"lineNumber":333,"author":{"gitId":"-"},"content":" * {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":334,"author":{"gitId":"-"},"content":" * @see AddCommandSystemTest#assertCommandSuccess(String, Person)","isFullCredit":true},{"lineNumber":335,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":336,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":337,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":338,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":339,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":340,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":341,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":342,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":343,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":344,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":345,"author":{"gitId":"-"},"content":" * Executes {@code command} and asserts that the,\u003cbr\u003e","isFullCredit":true},{"lineNumber":346,"author":{"gitId":"-"},"content":" * 1. Command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":347,"author":{"gitId":"-"},"content":" * 2. Command box has the error style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":348,"author":{"gitId":"-"},"content":" * 3. Result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":349,"author":{"gitId":"-"},"content":" * 4. {@code Model}, {@code Storage} and {@code PersonListPanel} remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":350,"author":{"gitId":"-"},"content":" * 5. Browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":351,"author":{"gitId":"-"},"content":" * Verifications 1, 3 and 4 are performed by","isFullCredit":true},{"lineNumber":352,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":353,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":354,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":355,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":356,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":357,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":358,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":359,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":360,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":361,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":362,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":363,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":364,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":5,"-":359}},{"path":"src/test/java/systemtests/AddressBookSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_INITIAL;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.ui.StatusBarFooter.SYNC_STATUS_UPDATED;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import java.util.Arrays;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import java.util.Date;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import java.util.List;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import org.junit.After;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import org.junit.Before;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import org.junit.BeforeClass;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import org.junit.ClassRule;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import guitests.guihandles.CommandBoxHandle;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainMenuHandle;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import guitests.guihandles.MainWindowHandle;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import guitests.guihandles.PersonListPanelHandle;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":"import guitests.guihandles.ResultDisplayHandle;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":"import guitests.guihandles.StatusBarFooterHandle;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":"import seedu.address.TestApp;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.EventsCenter;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ClearCommand;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.FindCommand;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.ListCommand;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import seedu.address.model.AddressBook;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import seedu.address.testutil.TypicalPersons;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import seedu.address.ui.CommandBox;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" * A system test class for AddressBook, which provides access to handles of GUI components and helper methods","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":" * for test verification.","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"public abstract class AddressBookSystemTest {","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" @ClassRule","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":" public static ClockRule clockRule \u003d new ClockRule();","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_DEFAULT_STYLE \u003d Arrays.asList(\"text-input\", \"text-field\");","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" private static final List\u003cString\u003e COMMAND_BOX_ERROR_STYLE \u003d","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":" Arrays.asList(\"text-input\", \"text-field\", CommandBox.ERROR_STYLE_CLASS);","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" private MainWindowHandle mainWindowHandle;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" private TestApp testApp;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":" private SystemTestSetupHelper setupHelper;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" @BeforeClass","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" public static void setupBeforeClass() {","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":" SystemTestSetupHelper.initialize();","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" @Before","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" public void setUp() {","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" setupHelper \u003d new SystemTestSetupHelper();","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":" testApp \u003d setupHelper.setupApplication(this::getInitialData, getDataFileLocation());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" mainWindowHandle \u003d setupHelper.setupMainWindowHandle();","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" assertApplicationStartingStateIsCorrect();","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" @After","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" public void tearDown() throws Exception {","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":" setupHelper.tearDownStage();","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" EventsCenter.clearSubscribers();","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" * Returns the data to be loaded into the file in {@link #getDataFileLocation()}.","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" protected AddressBook getInitialData() {","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" return TypicalPersons.getTypicalAddressBook();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" * Returns the directory of the data file.","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" protected String getDataFileLocation() {","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" return TestApp.SAVE_LOCATION_FOR_TESTING;","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" public MainWindowHandle getMainWindowHandle() {","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" return mainWindowHandle;","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" public CommandBoxHandle getCommandBox() {","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" return mainWindowHandle.getCommandBox();","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" public PersonListPanelHandle getPersonListPanel() {","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":" return mainWindowHandle.getPersonListPanel();","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" public MainMenuHandle getMainMenu() {","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" return mainWindowHandle.getMainMenu();","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" public StatusBarFooterHandle getStatusBarFooter() {","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" return mainWindowHandle.getStatusBarFooter();","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" public ResultDisplayHandle getResultDisplay() {","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" return mainWindowHandle.getResultDisplay();","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" * Executes {@code command} in the application\u0027s {@code CommandBox}.","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" * Method returns after UI components have been updated.","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":" protected void executeCommand(String command) {","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" rememberStates();","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":" // Injects a fixed clock before executing a command so that the time stamp shown in the status bar","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" // after each command is predictable and also different from the previous command.","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" clockRule.setInjectedClockToCurrentTime();","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" mainWindowHandle.getCommandBox().run(command);","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":" * Displays all persons in the address book.","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" protected void showAllPersons() {","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" executeCommand(ListCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" assertEquals(getModel().getAddressBook().getPersonList().size(), getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":" * Displays all persons with any parts of their names matching {@code keyword} (case-insensitive).","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":" protected void showPersonsWithName(String keyword) {","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" executeCommand(FindCommand.COMMAND_WORD + \" \" + keyword);","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" assertTrue(getModel().getFilteredPersonList().size() \u003c getModel().getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" * Selects the person at {@code index} of the displayed list.","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" protected void selectPerson(Index index) {","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + index.getOneBased());","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" assertEquals(index.getZeroBased(), getPersonListPanel().getSelectedCardIndex());","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":" * Deletes all persons in the address book.","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" protected void deleteAllPersons() {","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" executeCommand(ClearCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":" assertEquals(0, getModel().getAddressBook().getPersonList().size());","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":" * Asserts that the {@code CommandBox} displays {@code expectedCommandInput}, the {@code ResultDisplay} displays","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" * {@code expectedResultMessage}, the model and storage contains the same person objects as {@code expectedModel}","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" * and the person list panel displays the persons in the model correctly.","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" protected void assertApplicationDisplaysExpected(String expectedCommandInput, String expectedResultMessage,","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":" Model expectedModel) {","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" assertEquals(expectedCommandInput, getCommandBox().getInput());","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertEquals(expectedResultMessage, getResultDisplay().getText());","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" assertEquals(expectedModel, getModel());","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":" assertEquals(expectedModel.getAddressBook(), testApp.readStorageAddressBook());","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), expectedModel.getFilteredPersonList());","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" * Calls {@code BrowserPanelHandle}, {@code PersonListPanelHandle} and {@code StatusBarFooterHandle} to remember","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" * their current state.","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":" private void rememberStates() {","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" StatusBarFooterHandle statusBarFooterHandle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSaveLocation();","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" statusBarFooterHandle.rememberSyncStatus();","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":" getPersonListPanel().rememberSelectedPersonCard();","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":" * Asserts that the previously selected card is now deselected and the browser\u0027s url remains displaying the details","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" * of the previously selected person.","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" protected void assertSelectedCardDeselected() {","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isAnyCardSelected());","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url is changed to display the details of the person in the person list panel at","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}, and only the card at {@code expectedSelectedCardIndex} is selected.","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" protected void assertSelectedCardChanged(Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":" assertEquals(expectedSelectedCardIndex.getZeroBased(), getPersonListPanel().getSelectedCardIndex());","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":" * Asserts that the browser\u0027s url and the selected card in the person list panel remain unchanged.","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" * @see PersonListPanelHandle#isSelectedPersonCardChanged()","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" protected void assertSelectedCardUnchanged() {","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" assertFalse(getPersonListPanel().isSelectedPersonCardChanged());","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the default style.","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsDefaultStyle() {","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_DEFAULT_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":" * Asserts that the command box\u0027s shows the error style.","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" protected void assertCommandBoxShowsErrorStyle() {","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" assertEquals(COMMAND_BOX_ERROR_STYLE, getCommandBox().getStyleClass());","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" * Asserts that the entire status bar remains the same.","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchanged() {","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" assertFalse(handle.isSyncStatusChanged());","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * Asserts that only the sync status in the status bar was changed to the timing of","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * {@code ClockRule#getInjectedClock()}, while the save location remains the same.","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" protected void assertStatusBarUnchangedExceptSyncStatus() {","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" StatusBarFooterHandle handle \u003d getStatusBarFooter();","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" String timestamp \u003d new Date(clockRule.getInjectedClock().millis()).toString();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" String expectedSyncStatus \u003d String.format(SYNC_STATUS_UPDATED, timestamp);","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" assertEquals(expectedSyncStatus, handle.getSyncStatus());","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" assertFalse(handle.isSaveLocationChanged());","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" * Asserts that the starting state of the application is correct.","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" private void assertApplicationStartingStateIsCorrect() {","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":" assertEquals(\"\", getResultDisplay().getText());","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"codeeong"},"content":" //assertEquals that the detail card is correct","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" assertEquals(\"./\" + testApp.getStorageSaveLocation(), getStatusBarFooter().getSaveLocation());","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" assertEquals(SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" } catch (Exception e) {","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" throw new AssertionError(\"Starting state is wrong.\", e);","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Returns a defensive copy of the current model.","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" protected Model getModel() {","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" return testApp.getModel();","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":2,"-":264}},{"path":"src/test/java/systemtests/EditCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"codeeong"},"content":"","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_BOB;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_BOB;","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_ADDRESS_DESC;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_NO_FILE;","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_AVATAR_TYPE;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_EMAIL_DESC;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_NAME_DESC;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_PHONE_DESC;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.INVALID_TAG_DESC;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_17;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_AMY;","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_AMY;","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.PHONE_DESC_BOB;","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_MIDFILED;","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.POSITION_DESC_STRIKER;","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_0;","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"codeeong"},"content":"import static seedu.address.logic.commands.CommandTestUtil.RATING_DESC_1;","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_ADDRESS_BOB;","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_EMAIL_BOB;","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_JERSEY_NUMBER_2;","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_NAME_BOB;","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_PHONE_BOB;","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_POSITION_MIDFIELD;","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_RATING_1;","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_FRIEND;","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":"import static seedu.address.logic.commands.CommandTestUtil.VALID_TAG_HUSBAND;","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":"import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":"import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.AMY;","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.BOB;","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalPersons.KEYWORD_MATCHING_MEIER;","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.Messages;","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"import seedu.address.commons.core.index.Index;","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.EditCommand;","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.RedoCommand;","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.UndoCommand;","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"import seedu.address.model.Model;","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Address;","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Avatar;","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Email;","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Name;","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Person;","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":"import seedu.address.model.person.Phone;","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.DuplicatePersonException;","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":"import seedu.address.model.person.exceptions.PersonNotFoundException;","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":"import seedu.address.model.tag.Tag;","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonBuilder;","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":"import seedu.address.testutil.PersonUtil;","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":"public class EditCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" public void edit() throws Exception {","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" Model model \u003d getModel();","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /* ----------------- Performing edit operation while an unfiltered list is being shown ---------------------- */","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" /* Case: edit all fields, command with leading spaces, trailing spaces and multiple spaces between each field","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" * -\u003e edited","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" Index index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":" String command \u003d \" \" + EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB + \" \"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" + PHONE_DESC_BOB + \" \" + EMAIL_DESC_BOB + \" \" + ADDRESS_DESC_BOB + \" \" + TAG_DESC_HUSBAND + \" \"","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" + RATING_DESC_1 + \" \" + POSITION_DESC_MIDFILED + \" \" + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" Person editedPerson \u003d new PersonBuilder().withName(VALID_NAME_BOB).withPhone(VALID_PHONE_BOB)","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"codeeong"},"content":" .withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB).withTags(VALID_TAG_HUSBAND)","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" .withRating(VALID_RATING_1).withPosition(VALID_POSITION_MIDFIELD)","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" .withJerseyNumber(VALID_JERSEY_NUMBER_2).build();","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" /* Case: undo editing the last person in the list -\u003e last person restored */","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" command \u003d UndoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":" String expectedResultMessage \u003d UndoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":90,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":91,"author":{"gitId":"-"},"content":" /* Case: redo editing the last person in the list -\u003e last person edited again */","isFullCredit":true},{"lineNumber":92,"author":{"gitId":"-"},"content":" command \u003d RedoCommand.COMMAND_WORD;","isFullCredit":true},{"lineNumber":93,"author":{"gitId":"-"},"content":" expectedResultMessage \u003d RedoCommand.MESSAGE_SUCCESS;","isFullCredit":true},{"lineNumber":94,"author":{"gitId":"-"},"content":" model.updatePerson(","isFullCredit":true},{"lineNumber":95,"author":{"gitId":"-"},"content":" getModel().getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":96,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, model, expectedResultMessage);","isFullCredit":true},{"lineNumber":97,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":98,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as existing values -\u003e edited */","isFullCredit":true},{"lineNumber":99,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":100,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND + POSITION_DESC_MIDFILED + RATING_DESC_1","isFullCredit":true},{"lineNumber":101,"author":{"gitId":"-"},"content":" + JERSEY_NUMBER_DESC_17;","isFullCredit":true},{"lineNumber":102,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, BOB);","isFullCredit":true},{"lineNumber":103,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":104,"author":{"gitId":"-"},"content":" /* Case: edit some fields -\u003e edited */","isFullCredit":true},{"lineNumber":105,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":106,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + TAG_DESC_FRIEND;","isFullCredit":true},{"lineNumber":107,"author":{"gitId":"-"},"content":" Person personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":108,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags(VALID_TAG_FRIEND).build();","isFullCredit":true},{"lineNumber":109,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":110,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":111,"author":{"gitId":"-"},"content":" /* Case: clear tags -\u003e cleared */","isFullCredit":true},{"lineNumber":112,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":113,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + PREFIX_TAG.getPrefix();","isFullCredit":true},{"lineNumber":114,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withTags().build();","isFullCredit":true},{"lineNumber":115,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":116,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":117,"author":{"gitId":"-"},"content":" /* ------------------ Performing edit operation while a filtered list is being shown ------------------------ */","isFullCredit":true},{"lineNumber":118,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":119,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book and person list -\u003e edited */","isFullCredit":true},{"lineNumber":120,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":121,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":122,"author":{"gitId":"-"},"content":" assertTrue(index.getZeroBased() \u003c getModel().getFilteredPersonList().size());","isFullCredit":true},{"lineNumber":123,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + \" \" + NAME_DESC_BOB;","isFullCredit":true},{"lineNumber":124,"author":{"gitId":"-"},"content":" personToEdit \u003d getModel().getFilteredPersonList().get(index.getZeroBased());","isFullCredit":true},{"lineNumber":125,"author":{"gitId":"-"},"content":" editedPerson \u003d new PersonBuilder(personToEdit).withName(VALID_NAME_BOB).build();","isFullCredit":true},{"lineNumber":126,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, editedPerson);","isFullCredit":true},{"lineNumber":127,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":128,"author":{"gitId":"-"},"content":" /* Case: filtered person list, edit index within bounds of address book but out of bounds of person list","isFullCredit":true},{"lineNumber":129,"author":{"gitId":"-"},"content":" * -\u003e rejected","isFullCredit":true},{"lineNumber":130,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":131,"author":{"gitId":"-"},"content":" showPersonsWithName(KEYWORD_MATCHING_MEIER);","isFullCredit":true},{"lineNumber":132,"author":{"gitId":"-"},"content":" int invalidIndex \u003d getModel().getAddressBook().getPersonList().size();","isFullCredit":true},{"lineNumber":133,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":134,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":135,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":136,"author":{"gitId":"-"},"content":" /* --------------------- Performing edit operation while a person card is selected -------------------------- */","isFullCredit":true},{"lineNumber":137,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":138,"author":{"gitId":"-"},"content":" /* Case: selects first card in the person list, edit a person -\u003e edited, card selection remains unchanged but","isFullCredit":true},{"lineNumber":139,"author":{"gitId":"-"},"content":" * browser url changes","isFullCredit":true},{"lineNumber":140,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":141,"author":{"gitId":"-"},"content":" showAllPersons();","isFullCredit":true},{"lineNumber":142,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":143,"author":{"gitId":"-"},"content":" selectPerson(index);","isFullCredit":true},{"lineNumber":144,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_AMY + PHONE_DESC_AMY + EMAIL_DESC_AMY","isFullCredit":true},{"lineNumber":145,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_AMY + TAG_DESC_FRIEND + RATING_DESC_0 + POSITION_DESC_STRIKER + JERSEY_NUMBER_DESC_2;","isFullCredit":true},{"lineNumber":146,"author":{"gitId":"-"},"content":" // this can be misleading: card selection actually remains unchanged but the","isFullCredit":true},{"lineNumber":147,"author":{"gitId":"-"},"content":" // browser\u0027s url is updated to reflect the new person\u0027s name","isFullCredit":true},{"lineNumber":148,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, index, AMY, index);","isFullCredit":true},{"lineNumber":149,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":150,"author":{"gitId":"-"},"content":" /* --------------------------------- Performing invalid edit operation -------------------------------------- */","isFullCredit":true},{"lineNumber":151,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":152,"author":{"gitId":"-"},"content":" /* Case: invalid index (0) -\u003e rejected */","isFullCredit":true},{"lineNumber":153,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" 0\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":154,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":155,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":156,"author":{"gitId":"-"},"content":" /* Case: invalid index (-1) -\u003e rejected */","isFullCredit":true},{"lineNumber":157,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" -1\" + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":158,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":159,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":160,"author":{"gitId":"-"},"content":" /* Case: invalid index (size + 1) -\u003e rejected */","isFullCredit":true},{"lineNumber":161,"author":{"gitId":"-"},"content":" invalidIndex \u003d getModel().getFilteredPersonList().size() + 1;","isFullCredit":true},{"lineNumber":162,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + invalidIndex + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":163,"author":{"gitId":"-"},"content":" Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);","isFullCredit":true},{"lineNumber":164,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":165,"author":{"gitId":"-"},"content":" /* Case: missing index -\u003e rejected */","isFullCredit":true},{"lineNumber":166,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + NAME_DESC_BOB,","isFullCredit":true},{"lineNumber":167,"author":{"gitId":"-"},"content":" String.format(Messages.MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE));","isFullCredit":true},{"lineNumber":168,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":169,"author":{"gitId":"-"},"content":" /* Case: missing all fields -\u003e rejected */","isFullCredit":true},{"lineNumber":170,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased(),","isFullCredit":true},{"lineNumber":171,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_NOT_EDITED);","isFullCredit":true},{"lineNumber":172,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":173,"author":{"gitId":"-"},"content":" /* Case: invalid name -\u003e rejected */","isFullCredit":true},{"lineNumber":174,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_NAME_DESC,","isFullCredit":true},{"lineNumber":175,"author":{"gitId":"-"},"content":" Name.MESSAGE_NAME_CONSTRAINTS);","isFullCredit":true},{"lineNumber":176,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":177,"author":{"gitId":"-"},"content":" /* Case: invalid phone -\u003e rejected */","isFullCredit":true},{"lineNumber":178,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_PHONE_DESC,","isFullCredit":true},{"lineNumber":179,"author":{"gitId":"-"},"content":" Phone.MESSAGE_PHONE_CONSTRAINTS);","isFullCredit":true},{"lineNumber":180,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":181,"author":{"gitId":"-"},"content":" /* Case: invalid email -\u003e rejected */","isFullCredit":true},{"lineNumber":182,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_EMAIL_DESC,","isFullCredit":true},{"lineNumber":183,"author":{"gitId":"-"},"content":" Email.MESSAGE_EMAIL_CONSTRAINTS);","isFullCredit":true},{"lineNumber":184,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":185,"author":{"gitId":"-"},"content":" /* Case: invalid address -\u003e rejected */","isFullCredit":true},{"lineNumber":186,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_ADDRESS_DESC,","isFullCredit":true},{"lineNumber":187,"author":{"gitId":"-"},"content":" Address.MESSAGE_ADDRESS_CONSTRAINTS);","isFullCredit":true},{"lineNumber":188,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":189,"author":{"gitId":"-"},"content":" Avatar.setUpPlaceholderForTest();","isFullCredit":true},{"lineNumber":190,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":191,"author":{"gitId":"-"},"content":" /* Case: invalid tag -\u003e rejected */","isFullCredit":true},{"lineNumber":192,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_TAG_DESC,","isFullCredit":true},{"lineNumber":193,"author":{"gitId":"-"},"content":" Tag.MESSAGE_TAG_CONSTRAINTS);","isFullCredit":true},{"lineNumber":194,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":195,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":196,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_NO_FILE,","isFullCredit":true},{"lineNumber":197,"author":{"gitId":"-"},"content":" EditCommand.MESSAGE_FILE_NOT_FOUND);","isFullCredit":true},{"lineNumber":198,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":199,"author":{"gitId":"-"},"content":" /* Case: invalid avatar -\u003e rejected */","isFullCredit":true},{"lineNumber":200,"author":{"gitId":"-"},"content":" assertCommandFailure(EditCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased() + INVALID_AVATAR_TYPE,","isFullCredit":true},{"lineNumber":201,"author":{"gitId":"-"},"content":" Avatar.MESSAGE_AVATAR_CONSTRAINTS);","isFullCredit":true},{"lineNumber":202,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":203,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values -\u003e rejected */","isFullCredit":true},{"lineNumber":204,"author":{"gitId":"-"},"content":" executeCommand(PersonUtil.getAddCommand(BOB));","isFullCredit":true},{"lineNumber":205,"author":{"gitId":"-"},"content":" assertTrue(getModel().getAddressBook().getPersonList().contains(BOB));","isFullCredit":true},{"lineNumber":206,"author":{"gitId":"-"},"content":" index \u003d INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":207,"author":{"gitId":"-"},"content":" assertFalse(getModel().getFilteredPersonList().get(index.getZeroBased()).equals(BOB));","isFullCredit":true},{"lineNumber":208,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":209,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_FRIEND + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":210,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":211,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":212,"author":{"gitId":"-"},"content":" /* Case: edit a person with new values same as another person\u0027s values but with different tags -\u003e rejected */","isFullCredit":true},{"lineNumber":213,"author":{"gitId":"-"},"content":" command \u003d EditCommand.COMMAND_WORD + \" \" + index.getOneBased() + NAME_DESC_BOB + PHONE_DESC_BOB + EMAIL_DESC_BOB","isFullCredit":true},{"lineNumber":214,"author":{"gitId":"-"},"content":" + ADDRESS_DESC_BOB + TAG_DESC_HUSBAND;","isFullCredit":true},{"lineNumber":215,"author":{"gitId":"-"},"content":" assertCommandFailure(command, EditCommand.MESSAGE_DUPLICATE_PERSON);","isFullCredit":true},{"lineNumber":216,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":217,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":218,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":219,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Index, Person, Index)} except that","isFullCredit":true},{"lineNumber":220,"author":{"gitId":"-"},"content":" * the browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":221,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list","isFullCredit":true},{"lineNumber":222,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Index, Person, Index)","isFullCredit":true},{"lineNumber":223,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":224,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson) {","isFullCredit":true},{"lineNumber":225,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, toEdit, editedPerson, null);","isFullCredit":true},{"lineNumber":226,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":227,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":228,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":229,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":230,"author":{"gitId":"-"},"content":" * 1. Asserts that result display box displays the success message of executing {@code EditCommand}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":231,"author":{"gitId":"-"},"content":" * 2. Asserts that the model related components are updated to reflect the person at index {@code toEdit} being","isFullCredit":true},{"lineNumber":232,"author":{"gitId":"-"},"content":" * updated to values specified {@code editedPerson}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":233,"author":{"gitId":"-"},"content":" * @param toEdit the index of the current model\u0027s filtered list.","isFullCredit":true},{"lineNumber":234,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":235,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":236,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Index toEdit, Person editedPerson,","isFullCredit":true},{"lineNumber":237,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":238,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":239,"author":{"gitId":"-"},"content":" try {","isFullCredit":true},{"lineNumber":240,"author":{"gitId":"-"},"content":" expectedModel.updatePerson(","isFullCredit":true},{"lineNumber":241,"author":{"gitId":"-"},"content":" expectedModel.getFilteredPersonList().get(toEdit.getZeroBased()), editedPerson);","isFullCredit":true},{"lineNumber":242,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":243,"author":{"gitId":"-"},"content":" } catch (DuplicatePersonException | PersonNotFoundException e) {","isFullCredit":true},{"lineNumber":244,"author":{"gitId":"-"},"content":" throw new IllegalArgumentException(","isFullCredit":true},{"lineNumber":245,"author":{"gitId":"-"},"content":" \"editedPerson is a duplicate in expectedModel, or it isn\u0027t found in the model.\");","isFullCredit":true},{"lineNumber":246,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":247,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel,","isFullCredit":true},{"lineNumber":248,"author":{"gitId":"-"},"content":" String.format(EditCommand.MESSAGE_EDIT_PERSON_SUCCESS, editedPerson), expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":249,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":250,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":251,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":252,"author":{"gitId":"-"},"content":" * Performs the same verification as {@code assertCommandSuccess(String, Model, String, Index)} except that the","isFullCredit":true},{"lineNumber":253,"author":{"gitId":"-"},"content":" * browser url and selected card remain unchanged.","isFullCredit":true},{"lineNumber":254,"author":{"gitId":"-"},"content":" * @see EditCommandSystemTest#assertCommandSuccess(String, Model, String, Index)","isFullCredit":true},{"lineNumber":255,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":256,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":257,"author":{"gitId":"-"},"content":" assertCommandSuccess(command, expectedModel, expectedResultMessage, null);","isFullCredit":true},{"lineNumber":258,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":259,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":260,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":261,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":262,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays an empty string.\u003cbr\u003e","isFullCredit":true},{"lineNumber":263,"author":{"gitId":"-"},"content":" * 2. Asserts that the result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":264,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to {@code expectedModel}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":265,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url and selected card update accordingly depending on the card at","isFullCredit":true},{"lineNumber":266,"author":{"gitId":"-"},"content":" * {@code expectedSelectedCardIndex}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":267,"author":{"gitId":"-"},"content":" * 5. Asserts that the status bar\u0027s sync status changes.\u003cbr\u003e","isFullCredit":true},{"lineNumber":268,"author":{"gitId":"-"},"content":" * 6. Asserts that the command box has the default style class.\u003cbr\u003e","isFullCredit":true},{"lineNumber":269,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":270,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":271,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":272,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertSelectedCardChanged(Index)","isFullCredit":true},{"lineNumber":273,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":274,"author":{"gitId":"-"},"content":" private void assertCommandSuccess(String command, Model expectedModel, String expectedResultMessage,","isFullCredit":true},{"lineNumber":275,"author":{"gitId":"-"},"content":" Index expectedSelectedCardIndex) {","isFullCredit":true},{"lineNumber":276,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":277,"author":{"gitId":"-"},"content":" expectedModel.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);","isFullCredit":true},{"lineNumber":278,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(\"\", expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":279,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":280,"author":{"gitId":"-"},"content":" if (expectedSelectedCardIndex !\u003d null) {","isFullCredit":true},{"lineNumber":281,"author":{"gitId":"-"},"content":" assertSelectedCardChanged(expectedSelectedCardIndex);","isFullCredit":true},{"lineNumber":282,"author":{"gitId":"-"},"content":" } else {","isFullCredit":true},{"lineNumber":283,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":284,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":285,"author":{"gitId":"-"},"content":" assertStatusBarUnchangedExceptSyncStatus();","isFullCredit":true},{"lineNumber":286,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":287,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":288,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":289,"author":{"gitId":"-"},"content":" * Executes {@code command} and in addition,\u003cbr\u003e","isFullCredit":true},{"lineNumber":290,"author":{"gitId":"-"},"content":" * 1. Asserts that the command box displays {@code command}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":291,"author":{"gitId":"-"},"content":" * 2. Asserts that result display box displays {@code expectedResultMessage}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":292,"author":{"gitId":"-"},"content":" * 3. Asserts that the model related components equal to the current model.\u003cbr\u003e","isFullCredit":true},{"lineNumber":293,"author":{"gitId":"-"},"content":" * 4. Asserts that the browser url, selected card and status bar remain unchanged.\u003cbr\u003e","isFullCredit":true},{"lineNumber":294,"author":{"gitId":"-"},"content":" * 5. Asserts that the command box has the error style.\u003cbr\u003e","isFullCredit":true},{"lineNumber":295,"author":{"gitId":"-"},"content":" * Verifications 1 to 3 are performed by","isFullCredit":true},{"lineNumber":296,"author":{"gitId":"-"},"content":" * {@code AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)}.\u003cbr\u003e","isFullCredit":true},{"lineNumber":297,"author":{"gitId":"-"},"content":" * @see AddressBookSystemTest#assertApplicationDisplaysExpected(String, String, Model)","isFullCredit":true},{"lineNumber":298,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":299,"author":{"gitId":"-"},"content":" private void assertCommandFailure(String command, String expectedResultMessage) {","isFullCredit":true},{"lineNumber":300,"author":{"gitId":"-"},"content":" Model expectedModel \u003d getModel();","isFullCredit":true},{"lineNumber":301,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":302,"author":{"gitId":"-"},"content":" executeCommand(command);","isFullCredit":true},{"lineNumber":303,"author":{"gitId":"-"},"content":" assertApplicationDisplaysExpected(command, expectedResultMessage, expectedModel);","isFullCredit":true},{"lineNumber":304,"author":{"gitId":"-"},"content":" assertSelectedCardUnchanged();","isFullCredit":true},{"lineNumber":305,"author":{"gitId":"-"},"content":" assertCommandBoxShowsErrorStyle();","isFullCredit":true},{"lineNumber":306,"author":{"gitId":"-"},"content":" assertStatusBarUnchanged();","isFullCredit":true},{"lineNumber":307,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":308,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":6,"-":302}},{"path":"src/test/java/systemtests/HelpCommandSystemTest.java","fileType":"java","lines":[{"lineNumber":1,"author":{"gitId":"-"},"content":"package systemtests;","isFullCredit":true},{"lineNumber":2,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":3,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertEquals;","isFullCredit":true},{"lineNumber":4,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertFalse;","isFullCredit":true},{"lineNumber":5,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertNotEquals;","isFullCredit":true},{"lineNumber":6,"author":{"gitId":"-"},"content":"import static org.junit.Assert.assertTrue;","isFullCredit":true},{"lineNumber":7,"author":{"gitId":"-"},"content":"import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON;","isFullCredit":true},{"lineNumber":8,"author":{"gitId":"-"},"content":"import static seedu.address.ui.testutil.GuiTestAssert.assertListMatching;","isFullCredit":true},{"lineNumber":9,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":10,"author":{"gitId":"-"},"content":"import org.junit.Test;","isFullCredit":true},{"lineNumber":11,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":12,"author":{"gitId":"-"},"content":"import guitests.GuiRobot;","isFullCredit":true},{"lineNumber":13,"author":{"gitId":"-"},"content":"import guitests.guihandles.HelpWindowHandle;","isFullCredit":true},{"lineNumber":14,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.DeleteCommand;","isFullCredit":true},{"lineNumber":15,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.HelpCommand;","isFullCredit":true},{"lineNumber":16,"author":{"gitId":"-"},"content":"import seedu.address.logic.commands.SelectCommand;","isFullCredit":true},{"lineNumber":17,"author":{"gitId":"-"},"content":"import seedu.address.ui.StatusBarFooter;","isFullCredit":true},{"lineNumber":18,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":19,"author":{"gitId":"-"},"content":"/**","isFullCredit":true},{"lineNumber":20,"author":{"gitId":"-"},"content":" * A system test class for the help window, which contains interaction with other UI components.","isFullCredit":true},{"lineNumber":21,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":22,"author":{"gitId":"-"},"content":"public class HelpCommandSystemTest extends AddressBookSystemTest {","isFullCredit":true},{"lineNumber":23,"author":{"gitId":"-"},"content":" private static final String ERROR_MESSAGE \u003d \"ATTENTION!!!! : On some computers, this test may fail when run on \"","isFullCredit":true},{"lineNumber":24,"author":{"gitId":"-"},"content":" + \"non-headless mode as FxRobot#clickOn(Node, MouseButton...) clicks on the wrong location. We suspect \"","isFullCredit":true},{"lineNumber":25,"author":{"gitId":"-"},"content":" + \"that this is a bug with TestFX library that we are using. If this test fails, you have to run your \"","isFullCredit":true},{"lineNumber":26,"author":{"gitId":"-"},"content":" + \"tests on headless mode. See UsingGradle.adoc on how to do so.\";","isFullCredit":true},{"lineNumber":27,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":28,"author":{"gitId":"-"},"content":" private final GuiRobot guiRobot \u003d new GuiRobot();","isFullCredit":true},{"lineNumber":29,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":30,"author":{"gitId":"-"},"content":" @Test","isFullCredit":true},{"lineNumber":31,"author":{"gitId":"-"},"content":" public void openHelpWindow() {","isFullCredit":true},{"lineNumber":32,"author":{"gitId":"-"},"content":" //use accelerator","isFullCredit":true},{"lineNumber":33,"author":{"gitId":"-"},"content":" getCommandBox().click();","isFullCredit":true},{"lineNumber":34,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();","isFullCredit":true},{"lineNumber":35,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":36,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":37,"author":{"gitId":"-"},"content":" getResultDisplay().click();","isFullCredit":true},{"lineNumber":38,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();","isFullCredit":true},{"lineNumber":39,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":40,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":41,"author":{"gitId":"-"},"content":" getPersonListPanel().click();","isFullCredit":true},{"lineNumber":42,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingAccelerator();","isFullCredit":true},{"lineNumber":43,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":44,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":45,"author":{"gitId":"-"},"content":" //use menu button","isFullCredit":true},{"lineNumber":46,"author":{"gitId":"-"},"content":" getMainMenu().openHelpWindowUsingMenu();","isFullCredit":true},{"lineNumber":47,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":48,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":49,"author":{"gitId":"-"},"content":" //use command box","isFullCredit":true},{"lineNumber":50,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":51,"author":{"gitId":"-"},"content":" assertHelpWindowOpen();","isFullCredit":true},{"lineNumber":52,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":53,"author":{"gitId":"-"},"content":" // open help window and give it focus","isFullCredit":true},{"lineNumber":54,"author":{"gitId":"-"},"content":" executeCommand(HelpCommand.COMMAND_WORD);","isFullCredit":true},{"lineNumber":55,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();","isFullCredit":true},{"lineNumber":56,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":57,"author":{"gitId":"-"},"content":" // assert that while the help window is open the UI updates correctly for a command execution","isFullCredit":true},{"lineNumber":58,"author":{"gitId":"-"},"content":" executeCommand(SelectCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":59,"author":{"gitId":"-"},"content":" assertEquals(\"\", getCommandBox().getInput());","isFullCredit":true},{"lineNumber":60,"author":{"gitId":"-"},"content":" assertCommandBoxShowsDefaultStyle();","isFullCredit":true},{"lineNumber":61,"author":{"gitId":"-"},"content":" assertNotEquals(HelpCommand.SHOWING_HELP_MESSAGE, getResultDisplay().getText());","isFullCredit":true},{"lineNumber":62,"author":{"gitId":"codeeong"},"content":" //assertNotEquals(BrowserPanel.DEFAULT_PAGE, getBrowserPanel().getLoadedUrl());","isFullCredit":true},{"lineNumber":63,"author":{"gitId":"-"},"content":" assertListMatching(getPersonListPanel(), getModel().getFilteredPersonList());","isFullCredit":true},{"lineNumber":64,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":65,"author":{"gitId":"-"},"content":" // assert that the status bar too is updated correctly while the help window is open","isFullCredit":true},{"lineNumber":66,"author":{"gitId":"-"},"content":" // note: the select command tested above does not update the status bar","isFullCredit":true},{"lineNumber":67,"author":{"gitId":"-"},"content":" executeCommand(DeleteCommand.COMMAND_WORD + \" \" + INDEX_FIRST_PERSON.getOneBased());","isFullCredit":true},{"lineNumber":68,"author":{"gitId":"-"},"content":" assertNotEquals(StatusBarFooter.SYNC_STATUS_INITIAL, getStatusBarFooter().getSyncStatus());","isFullCredit":true},{"lineNumber":69,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":70,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":71,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":72,"author":{"gitId":"-"},"content":" * Asserts that the help window is open, and closes it after checking.","isFullCredit":true},{"lineNumber":73,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":74,"author":{"gitId":"-"},"content":" private void assertHelpWindowOpen() {","isFullCredit":true},{"lineNumber":75,"author":{"gitId":"-"},"content":" assertTrue(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());","isFullCredit":true},{"lineNumber":76,"author":{"gitId":"-"},"content":" guiRobot.pauseForHuman();","isFullCredit":true},{"lineNumber":77,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":78,"author":{"gitId":"-"},"content":" new HelpWindowHandle(guiRobot.getStage(HelpWindowHandle.HELP_WINDOW_TITLE)).close();","isFullCredit":true},{"lineNumber":79,"author":{"gitId":"-"},"content":" getMainWindowHandle().focus();","isFullCredit":true},{"lineNumber":80,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":81,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":82,"author":{"gitId":"-"},"content":" /**","isFullCredit":true},{"lineNumber":83,"author":{"gitId":"-"},"content":" * Asserts that the help window isn\u0027t open.","isFullCredit":true},{"lineNumber":84,"author":{"gitId":"-"},"content":" */","isFullCredit":true},{"lineNumber":85,"author":{"gitId":"-"},"content":" private void assertHelpWindowNotOpen() {","isFullCredit":true},{"lineNumber":86,"author":{"gitId":"-"},"content":" assertFalse(ERROR_MESSAGE, HelpWindowHandle.isWindowPresent());","isFullCredit":true},{"lineNumber":87,"author":{"gitId":"-"},"content":" }","isFullCredit":true},{"lineNumber":88,"author":{"gitId":"-"},"content":"","isFullCredit":true},{"lineNumber":89,"author":{"gitId":"-"},"content":"}","isFullCredit":true}],"authorContributionMap":{"codeeong":1,"-":88}}] From 71839dd571e934ffdcb13bada579623c937ad371 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Mon, 7 Aug 2023 15:19:10 +0800 Subject: [PATCH 18/47] update comment --- .../java/reposense/authorship/analyzer/AuthorshipAnalyzer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java index f9aba512b6..8ee3f05d16 100644 --- a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java +++ b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java @@ -78,7 +78,7 @@ public static boolean analyzeAuthorship(RepoConfiguration config, String filePat return false; } - // Continue with next iteration + // Check the previous version as currentAuthor is the same as author of the previous version return analyzeAuthorship(config, deletedLine.getFilePath(), deletedLine.getLineContent(), deletedLineInfo.getCommitHash(), deletedLineInfo.getAuthor()); } From c8442b8b93a211b9dd17553a39e2d79029ccd6a0 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Sun, 13 Aug 2023 17:09:53 +0800 Subject: [PATCH 19/47] add test cases for new git methods --- src/test/java/reposense/git/GitBlameTest.java | 25 +++++++++++++++++ src/test/java/reposense/git/GitDiffTest.java | 14 +++++++++- src/test/java/reposense/git/GitLogTest.java | 28 +++++++++++++++++++ .../reposense/template/GitTestTemplate.java | 4 +++ 4 files changed, 70 insertions(+), 1 deletion(-) diff --git a/src/test/java/reposense/git/GitBlameTest.java b/src/test/java/reposense/git/GitBlameTest.java index 2fd113279e..fd96052f6a 100644 --- a/src/test/java/reposense/git/GitBlameTest.java +++ b/src/test/java/reposense/git/GitBlameTest.java @@ -52,4 +52,29 @@ public void blameWithPreviousAuthorsRaw_nonExistentFile_throwsRunTimeException() Assertions.assertThrows(RuntimeException.class, () -> GitBlame.blameWithPreviousAuthors(config.getRepoRoot(), "nonExistentFile")); } + + @Test + public void blameLine_allValidArguments_success() { + String content = GitBlame.blameLine(config.getRepoRoot(), FAKE_AUTHOR_BLAME_TEST_FILE_COMMIT_08022018_STRING, + "blameTest.java", 1); + Assertions.assertFalse(content.isEmpty()); + } + + @Test + public void blameLine_nonExistentCommit_throwsRunTimeException() { + Assertions.assertThrows(RuntimeException.class, () -> GitBlame.blameLine(config.getRepoRoot(), + NONEXISTENT_COMMIT_HASH, "blameTest.java", 1)); + } + + @Test + public void blameLine_nonExistentFile_throwsRunTimeException() { + Assertions.assertThrows(RuntimeException.class, () -> GitBlame.blameLine(config.getRepoRoot(), + FAKE_AUTHOR_BLAME_TEST_FILE_COMMIT_08022018_STRING, "nonExistentFile", 1)); + } + + @Test + public void blameLine_nonExistentLine_throwsRunTimeException() { + Assertions.assertThrows(RuntimeException.class, () -> GitBlame.blameLine(config.getRepoRoot(), + FAKE_AUTHOR_BLAME_TEST_FILE_COMMIT_08022018_STRING, "blameTest.java", 5)); + } } diff --git a/src/test/java/reposense/git/GitDiffTest.java b/src/test/java/reposense/git/GitDiffTest.java index a7c01530b7..defd573f25 100644 --- a/src/test/java/reposense/git/GitDiffTest.java +++ b/src/test/java/reposense/git/GitDiffTest.java @@ -7,7 +7,6 @@ import reposense.model.RepoConfiguration; import reposense.template.GitTestTemplate; - public class GitDiffTest extends GitTestTemplate { private RepoConfiguration config; @@ -49,4 +48,17 @@ public void diffCommit_commitContainingSubmodule_ignoresSubmodule() { String diffResult = GitDiff.diffCommit(config.getRepoRoot(), EMPTY_TREE_HASH); Assertions.assertFalse(diffResult.contains("Subproject commit")); } + + @Test + public void diffCommits_validCommitHashes_success() { + String diffResult = GitDiff.diffCommits(config.getRepoRoot(), + FAKE_AUTHOR_BLAME_TEST_FILE_COMMIT_08022018_STRING, LATEST_COMMIT_HASH); + Assertions.assertFalse(diffResult.isEmpty()); + } + + @Test + public void diffCommits_nonexistentCommitHash_throwsRunTimeException() { + Assertions.assertThrows(RuntimeException.class, () -> GitDiff.diffCommits(config.getRepoRoot(), + NONEXISTENT_COMMIT_HASH, LATEST_COMMIT_HASH)); + } } diff --git a/src/test/java/reposense/git/GitLogTest.java b/src/test/java/reposense/git/GitLogTest.java index c73c584f57..d0184aecd2 100644 --- a/src/test/java/reposense/git/GitLogTest.java +++ b/src/test/java/reposense/git/GitLogTest.java @@ -2,6 +2,7 @@ import java.time.LocalDateTime; import java.time.Month; +import java.util.Arrays; import java.util.Collections; import org.junit.jupiter.api.Assertions; @@ -191,4 +192,31 @@ public void gitLog_emailWithAdditionOperator_success() { String content = GitLog.get(config, author); Assertions.assertTrue(TestUtil.compareNumberExpectedCommitsToGitLogLines(1, content)); } + + @Test + public void gitLog_getParentOfInitialCommit_noContent() { + String content = GitLog.getParentCommits(config.getRepoRoot(), ROOT_COMMIT_HASH); + Assertions.assertTrue(content.isEmpty()); + } + + @Test + public void gitLog_getParentOfSecondCommit_initialCommit() { + String content = GitLog.getParentCommits(config.getRepoRoot(), SECOND_COMMIT_HASH); + Assertions.assertEquals(ROOT_COMMIT_HASH, content); + } + + @Test + public void gitLog_getParentOfMergeCommit_success() { + config.setBranch("945-GitLogTest-getParentCommit_mergeCommit_success"); + GitCheckout.checkoutBranch(config.getRepoRoot(), config.getBranch()); + + String content = GitLog.getParentCommits(config.getRepoRoot(), MERGE_COMMIT_HASH); + Assertions.assertEquals(MERGE_COMMIT_PARENTS_HASHES, Arrays.asList(content.split(" "))); + } + + @Test + public void gitLog_getParentOfNonExistentCommit_throwsRunTimeException() { + Assertions.assertThrows(RuntimeException.class, () -> GitLog.getParentCommits(config.getRepoRoot(), + NONEXISTENT_COMMIT_HASH)); + } } diff --git a/src/test/java/reposense/template/GitTestTemplate.java b/src/test/java/reposense/template/GitTestTemplate.java index 452d9c6317..369e0fc0f5 100644 --- a/src/test/java/reposense/template/GitTestTemplate.java +++ b/src/test/java/reposense/template/GitTestTemplate.java @@ -44,6 +44,10 @@ public class GitTestTemplate { protected static final String TEST_COMMIT_HASH = "2fb6b9b"; protected static final String TEST_COMMIT_HASH_LONG = "2fb6b9b2dd9fa40bf0f9815da2cb0ae8731436c7"; protected static final String TEST_COMMIT_HASH_PARENT = "c5a6dc774e22099cd9ddeb0faff1e75f9cf4f151"; + protected static final String SECOND_COMMIT_HASH = "05310e79fe8e54c5096bacc97b886ab24304d12b"; + protected static final String MERGE_COMMIT_HASH = "7937ff5334ee45cb51e8cfd83a2237d33568a20c"; + protected static final List MERGE_COMMIT_PARENTS_HASHES = List.of( + "22aec0be218b0c71065e65460ab48a2d95c8c681", "271bfbb0f0624481825abd812ff1d27768f9aba0"); protected static final String MAIN_AUTHOR_NAME = "harryggg"; protected static final String FAKE_AUTHOR_NAME = "fakeAuthor"; protected static final String UNCONVENTIONAL_AUTHOR_NAME = "-unconventional_author-"; From 7b69c310409167504240f853d75037836f3f0e6b Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Sun, 13 Aug 2023 18:20:33 +0800 Subject: [PATCH 20/47] add AuthorshipAnalyzer test cases --- .../authorship/AuthorshipAnalyzerTest.java | 218 ++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java diff --git a/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java b/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java new file mode 100644 index 0000000000..904616ba62 --- /dev/null +++ b/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java @@ -0,0 +1,218 @@ +package reposense.authorship; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.time.LocalDateTime; +import java.time.Month; +import java.util.List; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import reposense.authorship.analyzer.AuthorshipAnalyzer; +import reposense.authorship.model.FileInfo; +import reposense.git.GitCheckout; +import reposense.model.Author; +import reposense.model.CommitHash; +import reposense.model.RepoConfiguration; +import reposense.template.GitTestTemplate; +import reposense.util.TestUtil; + +public class AuthorshipAnalyzerTest extends GitTestTemplate { + private static final LocalDateTime SINCE_DATE = TestUtil.getSinceDate(2018, Month.JANUARY.getValue(), 1); + private static final LocalDateTime UNTIL_DATE = TestUtil.getUntilDate(2019, Month.DECEMBER.getValue(), 1); + private static final String TEST_FILENAME = "analyzeAuthorshipTest.java"; + private static final String TEST1_FILENAME = "analyzeAuthorshipTest1.java"; + private static final String TEST2_FILENAME = "analyzeAuthorshipTest2.java"; + private static final String BRANCH_NAME = "945-FileAnalyzerTest-analyzeAuthorship"; + private static final CommitHash IGNORE_HASH = new CommitHash("f874c0992645bed626de2113659ce48d7a2233dd"); + private static final Author MINGYI_AUTHOR = new Author(MINGYI_AUTHOR_NAME); + + private RepoConfiguration config; + + @BeforeEach + public void before() throws Exception { + super.before(); + + config = configs.get(); + + config.setBranch(BRANCH_NAME); + GitCheckout.checkoutBranch(config.getRepoRoot(), config.getBranch()); + + config.setSinceDate(SINCE_DATE); + config.setUntilDate(UNTIL_DATE); + config.setZoneId(TIME_ZONE_ID); + + config.addAuthorNamesToAuthorMapEntry(FAKE_AUTHOR, FAKE_AUTHOR_NAME); + config.addAuthorNamesToAuthorMapEntry(MINGYI_AUTHOR, MINGYI_AUTHOR_NAME); + } + + @Test + public void analyzeAuthorship_partialCredit_success() { + FileInfo fileInfo = analyzeTextFile(TEST_FILENAME); + + Assertions.assertEquals(FAKE_AUTHOR, fileInfo.getLine(1).getAuthor()); + Assertions.assertEquals(MINGYI_AUTHOR, fileInfo.getLine(2).getAuthor()); + Assertions.assertEquals(MINGYI_AUTHOR, fileInfo.getLine(3).getAuthor()); + + Assertions.assertTrue(fileInfo.getLine(1).isFullCredit()); + + // Partial credit given as author only appended a full stop to the line + Assertions.assertFalse(fileInfo.getLine(2).isFullCredit()); + Assertions.assertFalse(fileInfo.getLine(3).isFullCredit()); + } + + @Test + public void analyzeAuthorship_unknownAuthor_success() { + // Actually should remove fakeAuthor, but this does the same job + config.addAuthorNamesToAuthorMapEntry(Author.UNKNOWN_AUTHOR, FAKE_AUTHOR_NAME); + + FileInfo fileInfo = analyzeTextFile(TEST_FILENAME); + + // fakeAuthor is not in authorEmailsAndAliasesMap, so line has unknown author + Assertions.assertEquals(Author.UNKNOWN_AUTHOR, fileInfo.getLine(1).getAuthor()); + Assertions.assertEquals(MINGYI_AUTHOR, fileInfo.getLine(2).getAuthor()); + Assertions.assertEquals(MINGYI_AUTHOR, fileInfo.getLine(3).getAuthor()); + + // Full credit given since analysis is not performed on unknown author + Assertions.assertTrue(fileInfo.getLine(1).isFullCredit()); + + // Full credit given since previous author (fakeAuthor) is not recognized + Assertions.assertTrue(fileInfo.getLine(2).isFullCredit()); + Assertions.assertTrue(fileInfo.getLine(3).isFullCredit()); + } + + @Test + public void analyzeAuthorship_beforeSinceDate_success() { + config.setSinceDate(TestUtil.getSinceDate(2019, Month.NOVEMBER.getValue(), 20)); + + FileInfo fileInfo = analyzeTextFile(TEST_FILENAME); + + Assertions.assertEquals(FAKE_AUTHOR, fileInfo.getLine(1).getAuthor()); + Assertions.assertEquals(MINGYI_AUTHOR, fileInfo.getLine(2).getAuthor()); + Assertions.assertEquals(MINGYI_AUTHOR, fileInfo.getLine(3).getAuthor()); + + Assertions.assertTrue(fileInfo.getLine(1).isFullCredit()); + + // Full credit given since previous version was made in a commit before the sinceDate + Assertions.assertTrue(fileInfo.getLine(2).isFullCredit()); + Assertions.assertTrue(fileInfo.getLine(3).isFullCredit()); + } + + @Test + public void analyzeAuthorship_insideIgnoreCommitList_success() { + config.setIgnoreCommitList(List.of(IGNORE_HASH)); + + FileInfo fileInfo = analyzeTextFile(TEST_FILENAME); + + // Unknown author since previous version was made in commit that is ignored + Assertions.assertEquals(Author.UNKNOWN_AUTHOR, fileInfo.getLine(1).getAuthor()); + Assertions.assertEquals(MINGYI_AUTHOR, fileInfo.getLine(2).getAuthor()); + Assertions.assertEquals(MINGYI_AUTHOR, fileInfo.getLine(3).getAuthor()); + + Assertions.assertTrue(fileInfo.getLine(1).isFullCredit()); + + // Full credit given since previous version was made in commit that is ignored + Assertions.assertTrue(fileInfo.getLine(2).isFullCredit()); + Assertions.assertTrue(fileInfo.getLine(3).isFullCredit()); + } + + @Test + public void analyzeAuthorship_emptyLine_success() { + FileInfo fileInfo = analyzeTextFile(TEST1_FILENAME); + + // Empty line is given full credit + Assertions.assertEquals(FAKE_AUTHOR, fileInfo.getLine(1).getAuthor()); + Assertions.assertTrue(fileInfo.getLine(1).isFullCredit()); + } + + @Test + public void analyzeAuthorship_matchesIgnoreGlob_success() { + Author fakeAuthor = config.getAuthor("fakeAuthor", ""); + + // File was renamed analyzeAuthorshipTest2.java -> analyzeAuthorshipTest1.java, ignore previous file name + fakeAuthor.importIgnoreGlobList(List.of(TEST2_FILENAME)); + + FileInfo fileInfo = analyzeTextFile(TEST1_FILENAME); + + // Full credit given since previous author ignores the previous file name + Assertions.assertEquals(MINGYI_AUTHOR, fileInfo.getLine(4).getAuthor()); + Assertions.assertTrue(fileInfo.getLine(4).isFullCredit()); + } + + @Test + public void analyzeAuthorship_sameAuthor_success() { + FileInfo fileInfo = analyzeTextFile(TEST1_FILENAME); + + // Full credit given since current author is also the author of the previous version + Assertions.assertEquals(FAKE_AUTHOR, fileInfo.getLine(3).getAuthor()); + Assertions.assertTrue(fileInfo.getLine(3).isFullCredit()); + } + + private FileInfo analyzeTextFile(String relativePath) { + FileInfoExtractor fileInfoExtractor = new FileInfoExtractor(); + FileInfo fileInfo = fileInfoExtractor.generateFileInfo(config, relativePath); + + FileInfoAnalyzer fileInfoAnalyzer = new FileInfoAnalyzer(); + fileInfoAnalyzer.analyzeTextFile(config, fileInfo, true); + + return fileInfo; + } + + @Test + public void getLevenshteinDistance_success() + throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { + Method getLevenshteinDistance = getLevenshteinDistanceMethod(); + Assertions.assertEquals(4, getLevenshteinDistance.invoke(null, "potato", "tomatoes")); + } + + @Test + public void getLevenshteinDistance_insertion_success() + throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { + Method getLevenshteinDistance = getLevenshteinDistanceMethod(); + Assertions.assertEquals(2, getLevenshteinDistance.invoke(null, "abcd", "abcdef")); + } + + @Test + public void getLevenshteinDistance_deletion_success() + throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { + Method getLevenshteinDistance = getLevenshteinDistanceMethod(); + Assertions.assertEquals(3, getLevenshteinDistance.invoke(null, "abcde", "ab")); + } + + @Test + public void getLevenshteinDistance_substitution_success() + throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { + Method getLevenshteinDistance = getLevenshteinDistanceMethod(); + Assertions.assertEquals(4, getLevenshteinDistance.invoke(null, "xxxxefg", "abcdefg")); + } + + @Test + public void getLevenshteinDistance_identicalStrings_success() + throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { + Method getLevenshteinDistance = getLevenshteinDistanceMethod(); + Assertions.assertEquals(0, getLevenshteinDistance.invoke(null, "abcdefg", "abcdefg")); + } + + @Test + public void getLevenshteinDistance_emptyStrings_success() + throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { + Method getLevenshteinDistance = getLevenshteinDistanceMethod(); + Assertions.assertEquals(0, getLevenshteinDistance.invoke(null, "", "")); + } + + @Test + public void getLevenshteinDistance_emptyString_success() + throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { + Method getLevenshteinDistance = getLevenshteinDistanceMethod(); + Assertions.assertEquals(6, getLevenshteinDistance.invoke(null, "abcdef", "")); + } + + private Method getLevenshteinDistanceMethod() throws NoSuchMethodException, SecurityException { + Method getLevenshteinDistance = + AuthorshipAnalyzer.class.getDeclaredMethod("getLevenshteinDistance", String.class, String.class); + getLevenshteinDistance.setAccessible(true); + return getLevenshteinDistance; + } +} From 983c784d599b09cf2a4a266ed0e1ee0da0c864fa Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Sun, 13 Aug 2023 19:58:10 +0800 Subject: [PATCH 21/47] convert since date to millisec using config's zone id --- .../java/reposense/authorship/analyzer/AuthorshipAnalyzer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java index 8ee3f05d16..08c64873f4 100644 --- a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java +++ b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java @@ -1,7 +1,6 @@ package reposense.authorship.analyzer; import java.nio.file.Paths; -import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.logging.Logger; import java.util.regex.Matcher; @@ -63,7 +62,7 @@ public static boolean analyzeAuthorship(RepoConfiguration config, String filePat } GitBlameLineInfo deletedLineInfo = getGitBlameLineInfo(config, deletedLine); - long sinceDateInMilliseconds = ZonedDateTime.of(config.getSinceDate(), ZoneId.systemDefault()).toEpochSecond(); + long sinceDateInMilliseconds = ZonedDateTime.of(config.getSinceDate(), config.getZoneId()).toEpochSecond(); // Give full credit if author is unknown, is before since date, is in ignored list, or is an ignored file if (deletedLineInfo.getAuthor().equals(Author.UNKNOWN_AUTHOR) From dc57517418ba90db0ea92ee6713cc0476ec0286e Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Sun, 13 Aug 2023 19:58:41 +0800 Subject: [PATCH 22/47] fix error in obtaining commit time --- .../reposense/authorship/analyzer/AuthorshipAnalyzer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java index 08c64873f4..6b0e610637 100644 --- a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java +++ b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java @@ -237,9 +237,8 @@ private static GitBlameLineInfo getGitBlameLineInfo(RepoConfiguration config, Ca String commitHash = blameResultLines[0].substring(0, FULL_COMMIT_HASH_LENGTH); String authorName = blameResultLines[1].substring(AUTHOR_NAME_OFFSET); - String authorEmail = blameResultLines[2] - .substring(AUTHOR_EMAIL_OFFSET).replaceAll("<|>", ""); - long timestampMilliseconds = Long.parseLong(blameResultLines[3].substring(COMMIT_TIME_OFFSET)) * 1000; + String authorEmail = blameResultLines[2].substring(AUTHOR_EMAIL_OFFSET).replaceAll("<|>", ""); + long timestampMilliseconds = Long.parseLong(blameResultLines[5].substring(COMMIT_TIME_OFFSET)); Author author = config.getAuthor(authorName, authorEmail); return new GitBlameLineInfo(commitHash, author, timestampMilliseconds); From cadbeb21e2478ce2e0c24be350dcb7cb05b63858 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Wed, 16 Aug 2023 11:11:24 +0800 Subject: [PATCH 23/47] shift getLevenshteinDistance to StringsUtil --- .../analyzer/AuthorshipAnalyzer.java | 37 +----------- src/main/java/reposense/util/StringsUtil.java | 36 ++++++++++- .../authorship/AuthorshipAnalyzerTest.java | 59 ------------------- .../java/reposense/util/StringsUtilTest.java | 35 +++++++++++ 4 files changed, 72 insertions(+), 95 deletions(-) diff --git a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java index 6b0e610637..bb0e72fc9e 100644 --- a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java +++ b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java @@ -15,6 +15,7 @@ import reposense.model.CommitHash; import reposense.model.RepoConfiguration; import reposense.system.LogsManager; +import reposense.util.StringsUtil; /** * Analyzes a line to find out if the author should be assigned partial or full credit. @@ -189,44 +190,10 @@ private static int getPreImageStartingLineNumber(String linesChangedHeader) { * Calculates the similarity score of {@code s} with {@code baseString}. */ private static double similarityScore(String s, String baseString) { - double levenshteinDistance = getLevenshteinDistance(s, baseString); + double levenshteinDistance = StringsUtil.getLevenshteinDistance(s, baseString); return 1 - (levenshteinDistance / baseString.length()); } - /** - * Calculates the Levenshtein Distance between two strings using Dynamic Programming. - */ - private static int getLevenshteinDistance(String s, String t) { - // dp[i][j] stores the distance between s.substring(0, i) and t.substring(0, j) -> distance(s[:i], t[:j]) - int[][] dp = new int[s.length() + 1][t.length() + 1]; - - // Distance between a string and an empty string is the length of the string - for (int i = 0; i <= s.length(); i++) { - dp[i][0] = i; - } - - for (int i = 0; i <= t.length(); i++) { - dp[0][i] = i; - } - - for (int i = 1; i <= s.length(); i++) { - for (int j = 1; j <= t.length(); j++) { - // If s[i-1] and t[j-1] are equal, distance(s[:i], t[:j]) equals to distance(s[:i-1], t[:j-1]) - if (s.charAt(i - 1) == t.charAt(j - 1)) { - dp[i][j] = dp[i - 1][j - 1]; - } else { - // distance(s[:i], t[:j]) is the minimum of: - // 1) distance(s[:i-1], t[:j]) + 1 -> add s[i] - // 2) distance(s[:i], t[:j-1]) + 1 -> add t[j] - // 3) distance(s[:i-1], t[:j-1]) + 1 -> substitute s[i] with t[j] - dp[i][j] = Math.min(dp[i - 1][j], Math.min(dp[i][j - 1], dp[i - 1][j - 1])) + 1; - } - } - } - - return dp[s.length()][t.length()]; - } - /** * Returns the git blame line info for {@code line}. */ diff --git a/src/main/java/reposense/util/StringsUtil.java b/src/main/java/reposense/util/StringsUtil.java index 93411366bb..02787e8c38 100644 --- a/src/main/java/reposense/util/StringsUtil.java +++ b/src/main/java/reposense/util/StringsUtil.java @@ -15,7 +15,7 @@ public class StringsUtil { public static String filterText(String text, String regex) { String[] split = text.split("\n"); StringBuilder sb = new StringBuilder(); - for (String line: split) { + for (String line : split) { if (line.matches(regex)) { sb.append(line + "\n"); } @@ -91,4 +91,38 @@ public static String removeTrailingBackslash(String string) { public static boolean isNumeric(String string) { return Pattern.compile("^\\d+$").matcher(string).matches(); } + + /** + * Calculates the Levenshtein Distance between two strings using Dynamic Programming. + */ + public static int getLevenshteinDistance(String s, String t) { + // dp[i][j] stores the distance between s.substring(0, i) and t.substring(0, j) -> distance(s[:i], t[:j]) + int[][] dp = new int[s.length() + 1][t.length() + 1]; + + // Distance between a string and an empty string is the length of the string + for (int i = 0; i <= s.length(); i++) { + dp[i][0] = i; + } + + for (int i = 0; i <= t.length(); i++) { + dp[0][i] = i; + } + + for (int i = 1; i <= s.length(); i++) { + for (int j = 1; j <= t.length(); j++) { + // If s[i-1] and t[j-1] are equal, distance(s[:i], t[:j]) equals to distance(s[:i-1], t[:j-1]) + if (s.charAt(i - 1) == t.charAt(j - 1)) { + dp[i][j] = dp[i - 1][j - 1]; + } else { + // distance(s[:i], t[:j]) is the minimum of: + // 1) distance(s[:i-1], t[:j]) + 1 -> add s[i] + // 2) distance(s[:i], t[:j-1]) + 1 -> add t[j] + // 3) distance(s[:i-1], t[:j-1]) + 1 -> substitute s[i] with t[j] + dp[i][j] = Math.min(dp[i - 1][j], Math.min(dp[i][j - 1], dp[i - 1][j - 1])) + 1; + } + } + } + + return dp[s.length()][t.length()]; + } } diff --git a/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java b/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java index 904616ba62..c5ccaa26cb 100644 --- a/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java +++ b/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java @@ -1,7 +1,5 @@ package reposense.authorship; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.time.LocalDateTime; import java.time.Month; import java.util.List; @@ -10,7 +8,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import reposense.authorship.analyzer.AuthorshipAnalyzer; import reposense.authorship.model.FileInfo; import reposense.git.GitCheckout; import reposense.model.Author; @@ -159,60 +156,4 @@ private FileInfo analyzeTextFile(String relativePath) { return fileInfo; } - - @Test - public void getLevenshteinDistance_success() - throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { - Method getLevenshteinDistance = getLevenshteinDistanceMethod(); - Assertions.assertEquals(4, getLevenshteinDistance.invoke(null, "potato", "tomatoes")); - } - - @Test - public void getLevenshteinDistance_insertion_success() - throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { - Method getLevenshteinDistance = getLevenshteinDistanceMethod(); - Assertions.assertEquals(2, getLevenshteinDistance.invoke(null, "abcd", "abcdef")); - } - - @Test - public void getLevenshteinDistance_deletion_success() - throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { - Method getLevenshteinDistance = getLevenshteinDistanceMethod(); - Assertions.assertEquals(3, getLevenshteinDistance.invoke(null, "abcde", "ab")); - } - - @Test - public void getLevenshteinDistance_substitution_success() - throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { - Method getLevenshteinDistance = getLevenshteinDistanceMethod(); - Assertions.assertEquals(4, getLevenshteinDistance.invoke(null, "xxxxefg", "abcdefg")); - } - - @Test - public void getLevenshteinDistance_identicalStrings_success() - throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { - Method getLevenshteinDistance = getLevenshteinDistanceMethod(); - Assertions.assertEquals(0, getLevenshteinDistance.invoke(null, "abcdefg", "abcdefg")); - } - - @Test - public void getLevenshteinDistance_emptyStrings_success() - throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { - Method getLevenshteinDistance = getLevenshteinDistanceMethod(); - Assertions.assertEquals(0, getLevenshteinDistance.invoke(null, "", "")); - } - - @Test - public void getLevenshteinDistance_emptyString_success() - throws NoSuchMethodException, SecurityException, InvocationTargetException, IllegalAccessException { - Method getLevenshteinDistance = getLevenshteinDistanceMethod(); - Assertions.assertEquals(6, getLevenshteinDistance.invoke(null, "abcdef", "")); - } - - private Method getLevenshteinDistanceMethod() throws NoSuchMethodException, SecurityException { - Method getLevenshteinDistance = - AuthorshipAnalyzer.class.getDeclaredMethod("getLevenshteinDistance", String.class, String.class); - getLevenshteinDistance.setAccessible(true); - return getLevenshteinDistance; - } } diff --git a/src/test/java/reposense/util/StringsUtilTest.java b/src/test/java/reposense/util/StringsUtilTest.java index 72f0e4a2ba..38defe0b0e 100644 --- a/src/test/java/reposense/util/StringsUtilTest.java +++ b/src/test/java/reposense/util/StringsUtilTest.java @@ -88,4 +88,39 @@ public void addQuotesForFilePath_specialBashCharacters_success() { Assertions.assertEquals(specialBashSymbols, result); } + + @Test + public void getLevenshteinDistance_success() { + Assertions.assertEquals(4, StringsUtil.getLevenshteinDistance("potato", "tomatoes")); + } + + @Test + public void getLevenshteinDistance_insertion_success() { + Assertions.assertEquals(2, StringsUtil.getLevenshteinDistance("abcd", "abcdef")); + } + + @Test + public void getLevenshteinDistance_deletion_success() { + Assertions.assertEquals(3, StringsUtil.getLevenshteinDistance("abcde", "ab")); + } + + @Test + public void getLevenshteinDistance_substitution_success() { + Assertions.assertEquals(4, StringsUtil.getLevenshteinDistance("xxxxefg", "abcdefg")); + } + + @Test + public void getLevenshteinDistance_identicalStrings_success() { + Assertions.assertEquals(0, StringsUtil.getLevenshteinDistance("abcdefg", "abcdefg")); + } + + @Test + public void getLevenshteinDistance_emptyStrings_success() { + Assertions.assertEquals(0, StringsUtil.getLevenshteinDistance("", "")); + } + + @Test + public void getLevenshteinDistance_emptyString_success() { + Assertions.assertEquals(6, StringsUtil.getLevenshteinDistance("abcdef", "")); + } } From 45539c11e3bf15210558274b6141e8bf34e651dd Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Wed, 16 Aug 2023 11:49:34 +0800 Subject: [PATCH 24/47] fix warnings --- .../reposense/authorship/analyzer/AuthorshipAnalyzer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java index bb0e72fc9e..0df2731268 100644 --- a/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java +++ b/src/main/java/reposense/authorship/analyzer/AuthorshipAnalyzer.java @@ -51,7 +51,7 @@ public class AuthorshipAnalyzer { public static boolean analyzeAuthorship(RepoConfiguration config, String filePath, String lineContent, String commitHash, Author currentAuthor) { // Empty lines are ignored and given full credit - if (lineContent.length() == 0) { + if (lineContent.isEmpty()) { return true; } @@ -204,7 +204,7 @@ private static GitBlameLineInfo getGitBlameLineInfo(RepoConfiguration config, Ca String commitHash = blameResultLines[0].substring(0, FULL_COMMIT_HASH_LENGTH); String authorName = blameResultLines[1].substring(AUTHOR_NAME_OFFSET); - String authorEmail = blameResultLines[2].substring(AUTHOR_EMAIL_OFFSET).replaceAll("<|>", ""); + String authorEmail = blameResultLines[2].substring(AUTHOR_EMAIL_OFFSET).replaceAll("[<>]", ""); long timestampMilliseconds = Long.parseLong(blameResultLines[5].substring(COMMIT_TIME_OFFSET)); Author author = config.getAuthor(authorName, authorEmail); From 397ca6f3e9d524c6ba050f3476e1a197420031fa Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Fri, 18 Aug 2023 11:45:09 +0800 Subject: [PATCH 25/47] store isFullCredit info into segments --- frontend/src/types/types.ts | 1 + frontend/src/types/zod/authorship-type.ts | 1 + frontend/src/utils/segment.ts | 10 +++++++++- frontend/src/views/c-authorship.vue | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/src/types/types.ts b/frontend/src/types/types.ts index b825eb8593..20a0cb99af 100644 --- a/frontend/src/types/types.ts +++ b/frontend/src/types/types.ts @@ -63,6 +63,7 @@ export interface AuthorshipFileSegment { knownAuthor: string | null; lineNumbers: number[]; lines: string[]; + isFullCredits: boolean[]; } export interface AuthorshipFile { diff --git a/frontend/src/types/zod/authorship-type.ts b/frontend/src/types/zod/authorship-type.ts index 5455267144..1785ab6e9b 100644 --- a/frontend/src/types/zod/authorship-type.ts +++ b/frontend/src/types/zod/authorship-type.ts @@ -4,6 +4,7 @@ const lineSchema = z.object({ lineNumber: z.number(), author: z.object({ gitId: z.string() }), content: z.string(), + isFullCredit: z.boolean(), }); const fileResult = z.object({ diff --git a/frontend/src/utils/segment.ts b/frontend/src/utils/segment.ts index 673cd52d18..fd69529985 100644 --- a/frontend/src/utils/segment.ts +++ b/frontend/src/utils/segment.ts @@ -5,9 +5,17 @@ export default class Segment { lines: Array; - constructor(knownAuthor: string | null, lineNumbers: Array, lines: Array) { + isFullCredits: Array; + + constructor( + knownAuthor: string | null, + lineNumbers: Array, + lines: Array, + isFullCredits: Array, + ) { this.knownAuthor = knownAuthor; this.lineNumbers = lineNumbers; this.lines = lines; + this.isFullCredits = isFullCredits; } } diff --git a/frontend/src/views/c-authorship.vue b/frontend/src/views/c-authorship.vue index 12a0caef69..83ab0d03a8 100644 --- a/frontend/src/views/c-authorship.vue +++ b/frontend/src/views/c-authorship.vue @@ -526,6 +526,7 @@ export default defineComponent({ knownAuthor, [], [], + [], )); lastId += 1; @@ -536,6 +537,7 @@ export default defineComponent({ segments[lastId].lines.push(content); segments[lastId].lineNumbers.push(lineCount + 1); + segments[lastId].isFullCredits.push(line.isFullCredit); if (line.content === '' && knownAuthor) { blankLineCount += 1; From 40a759801720bdd36a594f8bbab98c7e185b497c Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Fri, 18 Aug 2023 12:19:51 +0800 Subject: [PATCH 26/47] store as a single value when the whole segment are all full credit, switch to a new segment if changes --- frontend/src/types/types.ts | 2 +- frontend/src/utils/segment.ts | 8 ++++---- frontend/src/views/c-authorship.vue | 8 +++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/types/types.ts b/frontend/src/types/types.ts index 20a0cb99af..6cba33c358 100644 --- a/frontend/src/types/types.ts +++ b/frontend/src/types/types.ts @@ -61,9 +61,9 @@ export interface Repo extends RepoRaw { export interface AuthorshipFileSegment { knownAuthor: string | null; + isFullCredits: boolean; lineNumbers: number[]; lines: string[]; - isFullCredits: boolean[]; } export interface AuthorshipFile { diff --git a/frontend/src/utils/segment.ts b/frontend/src/utils/segment.ts index fd69529985..6efa932f56 100644 --- a/frontend/src/utils/segment.ts +++ b/frontend/src/utils/segment.ts @@ -1,21 +1,21 @@ export default class Segment { knownAuthor: string | null; + isFullCredits: boolean; + lineNumbers: Array; lines: Array; - isFullCredits: Array; - constructor( knownAuthor: string | null, + isFullCredits: boolean, lineNumbers: Array, lines: Array, - isFullCredits: Array, ) { this.knownAuthor = knownAuthor; + this.isFullCredits = isFullCredits; this.lineNumbers = lineNumbers; this.lines = lines; - this.isFullCredits = isFullCredits; } } diff --git a/frontend/src/views/c-authorship.vue b/frontend/src/views/c-authorship.vue index 83ab0d03a8..3fb87e06b2 100644 --- a/frontend/src/views/c-authorship.vue +++ b/frontend/src/views/c-authorship.vue @@ -511,6 +511,7 @@ export default defineComponent({ splitSegments(lines: Line[]): { segments: Segment[]; blankLineCount: number; } { // split into segments separated by knownAuthor let lastState: string | null; + let lastCreditState: boolean; let lastId = -1; const segments: Segment[] = []; let blankLineCount = 0; @@ -520,24 +521,25 @@ export default defineComponent({ ? !this.isUnknownAuthor(line.author.gitId) : line.author.gitId === this.info.author; const knownAuthor = (line.author && isAuthorMatched) ? line.author.gitId : null; + const isFullCredit = line.isFullCredit; - if (knownAuthor !== lastState || lastId === -1) { + if (knownAuthor !== lastState || lastId === -1 || (knownAuthor && isFullCredit !== lastCreditState)) { segments.push(new Segment( knownAuthor, - [], + isFullCredit, [], [], )); lastId += 1; lastState = knownAuthor; + lastCreditState = isFullCredit; } const content = line.content || ' '; segments[lastId].lines.push(content); segments[lastId].lineNumbers.push(lineCount + 1); - segments[lastId].isFullCredits.push(line.isFullCredit); if (line.content === '' && knownAuthor) { blankLineCount += 1; From 9272869ca51394727ec12e040bc538968a244d38 Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Fri, 18 Aug 2023 12:34:37 +0800 Subject: [PATCH 27/47] rename variable --- frontend/src/types/types.ts | 2 +- frontend/src/utils/segment.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/types/types.ts b/frontend/src/types/types.ts index 6cba33c358..0ac79b6054 100644 --- a/frontend/src/types/types.ts +++ b/frontend/src/types/types.ts @@ -61,7 +61,7 @@ export interface Repo extends RepoRaw { export interface AuthorshipFileSegment { knownAuthor: string | null; - isFullCredits: boolean; + isFullCredit: boolean; lineNumbers: number[]; lines: string[]; } diff --git a/frontend/src/utils/segment.ts b/frontend/src/utils/segment.ts index 6efa932f56..a764524493 100644 --- a/frontend/src/utils/segment.ts +++ b/frontend/src/utils/segment.ts @@ -1,7 +1,7 @@ export default class Segment { knownAuthor: string | null; - isFullCredits: boolean; + isFullCredit: boolean; lineNumbers: Array; @@ -9,12 +9,12 @@ export default class Segment { constructor( knownAuthor: string | null, - isFullCredits: boolean, + isFullCredit: boolean, lineNumbers: Array, lines: Array, ) { this.knownAuthor = knownAuthor; - this.isFullCredits = isFullCredits; + this.isFullCredit = isFullCredit; this.lineNumbers = lineNumbers; this.lines = lines; } From 00c40368666948045978ed0a23fa3a2c583e93aa Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Fri, 18 Aug 2023 13:43:45 +0800 Subject: [PATCH 28/47] update background for is not full credit --- frontend/src/components/c-segment.vue | 2 +- frontend/src/views/c-authorship.vue | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/c-segment.vue b/frontend/src/components/c-segment.vue index 53aa79e2c7..05c38d544f 100644 --- a/frontend/src/components/c-segment.vue +++ b/frontend/src/components/c-segment.vue @@ -1,6 +1,6 @@ - - diff --git a/frontend/src/components/c-ramp.vue b/frontend/src/components/c-ramp.vue index 7440e6d2e1..55e130d7ec 100644 --- a/frontend/src/components/c-ramp.vue +++ b/frontend/src/components/c-ramp.vue @@ -35,10 +35,9 @@ - diff --git a/frontend/src/components/c-stacked-bar-chart.vue b/frontend/src/components/c-stacked-bar-chart.vue index 56a3398f55..4825aae309 100644 --- a/frontend/src/components/c-stacked-bar-chart.vue +++ b/frontend/src/components/c-stacked-bar-chart.vue @@ -9,13 +9,13 @@ + + diff --git a/frontend/src/mixin/dynamicTooltipMixin.ts b/frontend/src/mixin/dynamicTooltipMixin.ts index 5d504c9f8f..c5ecbb5554 100644 --- a/frontend/src/mixin/dynamicTooltipMixin.ts +++ b/frontend/src/mixin/dynamicTooltipMixin.ts @@ -3,17 +3,26 @@ import { defineComponent } from 'vue'; export default defineComponent({ methods: { onTooltipHover(refName: string): void { - const tooltipTextElement = (this.$refs[refName] as HTMLElement[])[0]; + const tooltipTextElement = this.getElementByRef(refName); if (this.isElementAboveViewport(tooltipTextElement)) { tooltipTextElement.classList.add('bottom-aligned'); } }, resetTooltip(refName: string): void { - const tooltipTextElement = (this.$refs[refName] as HTMLElement[])[0]; + const tooltipTextElement = this.getElementByRef(refName); tooltipTextElement.classList.remove('bottom-aligned'); }, isElementAboveViewport(el: Element): boolean { return el.getBoundingClientRect().top <= 0; }, + /** + * Note: this.$refs[refName] can be an array of HTMLElements + * if the ref is on a v-for loop, else it will be a single HTMLElement. + */ + getElementByRef(refName: string): HTMLElement { + return Array.isArray(this.$refs[refName]) + ? (this.$refs[refName] as HTMLElement[])[0] + : this.$refs[refName] as HTMLElement; + }, }, }); diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 145ead4415..0d212752b5 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -3,7 +3,7 @@ import { } from 'vue-router'; import Home from '../views/c-home.vue'; -const routes: Array = [ +const routes: RouteRecordRaw[] = [ { path: '/', component: Home, diff --git a/frontend/src/styles/panels.scss b/frontend/src/styles/panels.scss index 00c988ffb8..7432371be2 100644 --- a/frontend/src/styles/panels.scss +++ b/frontend/src/styles/panels.scss @@ -9,7 +9,6 @@ display: flex; height: 100vh; left: 0; - position: absolute; top: 0; width: 100%; z-index: z-index('app-wrapper'); diff --git a/frontend/src/types/vuex.d.ts b/frontend/src/types/vuex.d.ts index 40e15a73e6..cedee8c21d 100644 --- a/frontend/src/types/vuex.d.ts +++ b/frontend/src/types/vuex.d.ts @@ -1,6 +1,5 @@ import { Store } from 'vuex'; -import { AuthorshipFile } from './types'; -import User from '../utils/user'; +import { AuthorshipFile, User } from './types'; interface AuthorshipInfo { author: string; diff --git a/frontend/src/types/window.ts b/frontend/src/types/window.ts index 8180527408..ffc01a5b5a 100644 --- a/frontend/src/types/window.ts +++ b/frontend/src/types/window.ts @@ -1,6 +1,5 @@ import JSZip from 'jszip'; -import User from '../utils/user'; -import { Repo, User as UserType } from './types'; +import { Repo, User } from './types'; import { AuthorshipSchema } from './zod/authorship-type'; import { AuthorDailyContributions } from './zod/commits-type'; import { DomainUrlMap, ErrorMessage } from './zod/summary-type'; @@ -61,8 +60,8 @@ declare global { getCommitLink: (repoId: string, commitHash: string) => string | undefined; getBlameLink: (repoId: string, branch: string, filepath: string) => string | undefined; getHistoryLink: (repoId: string, branch: string, filepath: string) => string | undefined; - getGroupName: (group: UserType[], filterGroupSelection: string) => string; - getAuthorDisplayName: (authorRepos: UserType[]) => string; + getGroupName: (group: User[], filterGroupSelection: string) => string; + getAuthorDisplayName: (authorRepos: User[]) => string; api: Api; sinceDate: string; untilDate: string; diff --git a/frontend/src/utils/api.ts b/frontend/src/utils/api.ts index 10cfa7d656..1ac4d3c96b 100644 --- a/frontend/src/utils/api.ts +++ b/frontend/src/utils/api.ts @@ -1,8 +1,7 @@ -import { DailyCommit, CommitResult } from '../types/types'; +import { DailyCommit, CommitResult, User } from '../types/types'; import { authorshipSchema } from '../types/zod/authorship-type'; import { commitsSchema } from '../types/zod/commits-type'; import { ErrorMessage, summarySchema } from '../types/zod/summary-type'; -import User from './user'; // utility functions // window.$ = (id) => document.getElementById(id); @@ -71,7 +70,9 @@ window.decodeHash = function decodeHash() { const hashParams: { [key: string]: string } = {}; const hashIndex = window.location.href.indexOf(HASH_ANCHOR); - const parameterString = hashIndex === -1 ? '' : window.location.href.slice(hashIndex + 1); + + // split by # to remove "#/" string at the end of URLs generated by Vue Hash Router + const parameterString = hashIndex === -1 ? '' : window.location.href.slice(hashIndex + 1).split('#')[0]; parameterString.split('&') .forEach((param) => { @@ -258,7 +259,7 @@ window.api = { ]; // commits and checkedFileTypeContribution are set in c-summary - const user = new User({ + const user: User = { name: author, repoId: repoName, variance: commits.authorContributionVariance[author], @@ -270,7 +271,7 @@ window.api = { repoName: `${repo.displayName}`, location: `${repo.location.location}`, checkedFileTypeContribution: undefined, - }); + }; res.push(user); } diff --git a/frontend/src/utils/segment.ts b/frontend/src/utils/segment.ts deleted file mode 100644 index a764524493..0000000000 --- a/frontend/src/utils/segment.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default class Segment { - knownAuthor: string | null; - - isFullCredit: boolean; - - lineNumbers: Array; - - lines: Array; - - constructor( - knownAuthor: string | null, - isFullCredit: boolean, - lineNumbers: Array, - lines: Array, - ) { - this.knownAuthor = knownAuthor; - this.isFullCredit = isFullCredit; - this.lineNumbers = lineNumbers; - this.lines = lines; - } -} diff --git a/frontend/src/utils/user.ts b/frontend/src/utils/user.ts deleted file mode 100644 index 5225aa48d9..0000000000 --- a/frontend/src/utils/user.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Commit, DailyCommit, User as UserType } from '../types/types'; -import { AuthorFileTypeContributions } from '../types/zod/commits-type'; - -export default class User implements UserType { - checkedFileTypeContribution: number | undefined; - - commits: Commit[]; - - dailyCommits: DailyCommit[]; - - displayName: string; - - fileTypeContribution: AuthorFileTypeContributions; - - location: string; - - name: string; - - repoId: string; - - repoName: string; - - searchPath: string; - - variance: number; - - constructor(userObj: User) { - this.checkedFileTypeContribution = userObj.checkedFileTypeContribution; - this.commits = userObj.commits || []; - this.dailyCommits = userObj.dailyCommits || []; - this.displayName = userObj.displayName || ''; - this.fileTypeContribution = userObj.fileTypeContribution || {}; - this.location = userObj.location || ''; - this.name = userObj.name || ''; - this.repoId = userObj.repoId || ''; - this.repoName = userObj.repoName || ''; - this.searchPath = userObj.searchPath || ''; - this.variance = userObj.variance || 0; - } -} diff --git a/frontend/src/views/c-authorship.vue b/frontend/src/views/c-authorship.vue index 550025dfd6..5a9824cb68 100644 --- a/frontend/src/views/c-authorship.vue +++ b/frontend/src/views/c-authorship.vue @@ -99,99 +99,11 @@ .files(v-if="isLoaded") .empty(v-if="info.files.length === 0") nothing to see here :( - template(v-for="(file, i) in selectedFiles", v-bind:key="file.path") - .file(v-bind:ref="file.path") - .title( - v-bind:class="{'sticky':\ file.active}", - v-bind:ref="`${file.path}-title`" - ) - span.caret(v-on:click="toggleFileActiveProperty(file)") - .tooltip( - v-show="file.active", - v-on:mouseover="onTitleTooltipHover(`${file.path}-hide-file-tooltip`, `${file.path}-title`)", - v-on:mouseout="resetTitleTooltip(`${file.path}-hide-file-tooltip`, `${file.path}-title`)" - ) - font-awesome-icon(icon="caret-down", fixed-width) - span.tooltip-text(v-bind:ref="`${file.path}-hide-file-tooltip`") Click to hide file details - .tooltip( - v-show="!file.active", - v-on:mouseover="onTitleTooltipHover(`${file.path}-show-file-tooltip`, `${file.path}-title`)", - v-on:mouseout="resetTitleTooltip(`${file.path}-show-file-tooltip`, `${file.path}-title`)" - ) - font-awesome-icon(icon="caret-right", fixed-width) - span.tooltip-text(v-bind:ref="`${file.path}-show-file-tooltip`") Click to show file details - span.index {{ i + 1 }}.   - span.path - span( - v-bind:class="{'selected-parameter':\ - this.filesSortType === 'path' || this.filesSortType === 'fileName'}" - ) {{ getFirstPartOfPath(file) }}  - span.in(v-if="this.filesSortType === 'fileName'") in  - span(v-if="this.filesSortType === 'fileName'") {{ getSecondPartOfPath(file) }}  - span.fileTypeLabel( - v-if="!file.isBinary && !file.isIgnored", - v-bind:style="{\ - 'background-color': fileTypeColors[file.fileType],\ - 'color': getFontColor(fileTypeColors[file.fileType])\ - }", - v-bind:class="{'selected-label':\ - this.filesSortType === 'linesOfCode' || this.filesSortType === 'fileType'}" - ) - span( - v-bind:class="{'selected-parameter':\ - this.filesSortType === 'linesOfCode' || this.filesSortType === 'fileType'}" - ) {{ getFirstPartOfLabel(file) }}  - span {{ getSecondPartOfLabel(file) }} - span.fileTypeLabel.binary(v-if='file.isBinary') binary   - span.ignored-tag.fileTypeLabel( - v-if='file.isIgnored' - ) ignored ({{ file.lineCount }})   - span.icons - a( - v-bind:class="!isBrokenLink(getHistoryLink(file)) ? '' : 'broken-link'", - v-bind:href="getHistoryLink(file)", target="_blank" - ) - .tooltip( - v-on:mouseover="onTitleTooltipHover(`${file.path}-view-history-tooltip`, `${file.path}-title`)", - v-on:mouseout="resetTitleTooltip(`${file.path}-view-history-tooltip`, `${file.path}-title`)" - ) - font-awesome-icon.button(icon="history") - span.tooltip-text( - v-bind:ref="`${file.path}-view-history-tooltip`" - ) {{getLinkMessage(getHistoryLink(file), 'Click to view the history view of file')}} - a( - v-if='!file.isBinary', - v-bind:class="!isBrokenLink(getBlameLink(file)) ? '' : 'broken-link'", - v-bind:href="getBlameLink(file)", target="_blank", - title="click to view the blame view of file" - ) - .tooltip( - v-on:mouseover="onTitleTooltipHover(`${file.path}-view-blame-tooltip`, `${file.path}-title`)", - v-on:mouseout="resetTitleTooltip(`${file.path}-view-blame-tooltip`, `${file.path}-title`)" - ) - font-awesome-icon.button(icon="user-edit") - span.tooltip-text( - v-bind:ref="`${file.path}-view-blame-tooltip`" - ) {{getLinkMessage(getBlameLink(file), 'Click to view the blame view of file')}} - .author-breakdown(v-if="info.isMergeGroup") - .author-breakdown__legend( - v-for="author in getAuthors(file)", - v-bind:key="author" - ) - font-awesome-icon( - icon="circle", - v-bind:style="{ 'color': authorColors[author] }" - ) - span   {{ author }}   - pre.file-content(v-if="file.isBinary", v-show="file.active") - .binary-segment - .indicator BIN - .bin-text Binary file not shown. - pre.file-content(v-else-if="file.isIgnored", v-show="file.active") - .ignored-segment - .ignore-text File is ignored. - pre.hljs.file-content(v-else-if="file.wasCodeLoaded", v-show="file.active") - c-segment-collection(v-bind:segments="file.segments", v-bind:path="file.path") + template(v-for="(file, index) in selectedFiles", v-bind:key="file.path") + c-authorship-file(v-bind:file="file", v-bind:index="index", + v-bind:files-sort-type="this.filesSortType", v-bind:info="this.info", + v-bind:author-colors="this.authorColors", v-bind:file-type-colors="this.fileTypeColors", + @toggle-file-active-property="toggleFileActiveProperty")